titan-agent 5.0.2 → 5.0.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/dist/agent/agent.js +48 -3
- package/dist/agent/agent.js.map +1 -1
- package/dist/agent/agentLoop.js +83 -5
- package/dist/agent/agentLoop.js.map +1 -1
- package/dist/agent/commandPost.js +1 -1
- package/dist/agent/commandPost.js.map +1 -1
- package/dist/agent/goalProposer.js +2 -2
- package/dist/agent/goalProposer.js.map +1 -1
- package/dist/agent/missionDriver.js +1 -1
- package/dist/agent/missionDriver.js.map +1 -1
- package/dist/agent/promptBudget.js +85 -0
- package/dist/agent/promptBudget.js.map +1 -0
- package/dist/agent/structuredSpawn.js +1 -1
- package/dist/agent/structuredSpawn.js.map +1 -1
- package/dist/agent/subtaskTaxonomy.js +1 -1
- package/dist/agent/subtaskTaxonomy.js.map +1 -1
- package/dist/agent/systemPromptParts.js +10 -1
- package/dist/agent/systemPromptParts.js.map +1 -1
- package/dist/agent/toolRunner.js +16 -0
- package/dist/agent/toolRunner.js.map +1 -1
- package/dist/agent/toolSearch.js +4 -1
- package/dist/agent/toolSearch.js.map +1 -1
- package/dist/analytics/bugReports.js +1 -1
- package/dist/analytics/bugReports.js.map +1 -1
- package/dist/channels/messenger.js +1 -1
- package/dist/channels/messenger.js.map +1 -1
- package/dist/eval/harness.js +141 -0
- package/dist/eval/harness.js.map +1 -0
- package/dist/gateway/server.js +374 -74
- package/dist/gateway/server.js.map +1 -1
- package/dist/hooks/shellHooks.js +1 -1
- package/dist/hooks/shellHooks.js.map +1 -1
- package/dist/lib/auto-heal/repair-strategies.js.map +1 -1
- package/dist/memory/promptIncludes.js +58 -0
- package/dist/memory/promptIncludes.js.map +1 -0
- package/dist/organism/alertsStore.js +70 -0
- package/dist/organism/alertsStore.js.map +1 -0
- package/dist/plugins/memoryRetrieval.js.map +1 -1
- package/dist/providers/ollama.js +7 -7
- package/dist/providers/ollama.js.map +1 -1
- package/dist/safety/invariants.js +60 -0
- package/dist/safety/invariants.js.map +1 -0
- package/dist/safety/opusReview.js +1 -1
- package/dist/safety/opusReview.js.map +1 -1
- package/dist/security/commandScanner.js +2 -2
- package/dist/security/commandScanner.js.map +1 -1
- package/dist/security/secretGuard.js +4 -4
- package/dist/security/secretGuard.js.map +1 -1
- package/dist/skills/builtin/widget_gallery.js +28 -1
- package/dist/skills/builtin/widget_gallery.js.map +1 -1
- package/dist/skills/frontmatterLoader.js +119 -0
- package/dist/skills/frontmatterLoader.js.map +1 -0
- package/dist/skills/registry.js +20 -0
- package/dist/skills/registry.js.map +1 -1
- package/dist/testing/testHealthMonitor.js +1 -2
- package/dist/testing/testHealthMonitor.js.map +1 -1
- package/dist/utils/constants.js +2 -2
- package/dist/utils/constants.js.map +1 -1
- package/dist/utils/replyQuality.js +1 -1
- package/dist/utils/replyQuality.js.map +1 -1
- package/dist/utils/tokens.js +1 -1
- package/dist/utils/tokens.js.map +1 -1
- package/docs/bleeding-edge-agents-2026.md +450 -0
- package/docs/langchain-analysis.md +598 -0
- package/docs/langchain-code-analysis.md +363 -0
- package/docs/space-agent-analysis.md +300 -0
- package/package.json +1 -1
- package/ui/dist/assets/{AuditPanel-G7YA1HzV.js → AuditPanel-B84Mp16G.js} +2 -2
- package/ui/dist/assets/AutonomyPanel-DOtiTFxV.js +11 -0
- package/ui/dist/assets/{AutopilotPanel-CHRjxdh0.js → AutopilotPanel-nTb1Dnru.js} +1 -1
- package/ui/dist/assets/AutoresearchPanel-D46mX8VF.js +6 -0
- package/ui/dist/assets/BackupPanel-DGM1XXbG.js +1 -0
- package/ui/dist/assets/BrowserPanel-Cn1tTN3y.js +6 -0
- package/ui/dist/assets/{CPAgents-D5533PhK.js → CPAgents-CEraUkME.js} +1 -1
- package/ui/dist/assets/{CPDashboard-C-GgqDsI.js → CPDashboard-B_yidGAe.js} +2 -2
- package/ui/dist/assets/CPFiles-BBS8jtYH.js +1 -0
- package/ui/dist/assets/CPGoals-DL5v21TZ.js +1 -0
- package/ui/dist/assets/CPInbox-CyLQJBYF.js +11 -0
- package/ui/dist/assets/{CPSocial-mUQsrSh5.js → CPSocial-BkEtQ1Um.js} +3 -3
- package/ui/dist/assets/ChannelsPanel-CD2kHhA5.js +1 -0
- package/ui/dist/assets/CheckpointsPanel-BrUTFPu_.js +1 -0
- package/ui/dist/assets/CommandPostHub-BPPaUv1B.js +29 -0
- package/ui/dist/assets/CronPanel-CsfQctFp.js +1 -0
- package/ui/dist/assets/DaemonPanel-CNUggBbL.js +1 -0
- package/ui/dist/assets/DataTable-DuAEp_QJ.js +1 -0
- package/ui/dist/assets/{EmptyState-D60-wQrz.js → EmptyState-DFrAEZDm.js} +1 -1
- package/ui/dist/assets/EvalPanel-DEX0a5-b.js +1 -0
- package/ui/dist/assets/{FilesPanel-BNN3h_HW.js → FilesPanel-DATsiAqG.js} +1 -1
- package/ui/dist/assets/FleetPanel-QYQKqx4W.js +1 -0
- package/ui/dist/assets/{HomelabPanel-1mfhRBh6.js → HomelabPanel-DhuXd3ZD.js} +2 -2
- package/ui/dist/assets/{InfraView-Df6SFI7b.js → InfraView-eS7cpESw.js} +2 -2
- package/ui/dist/assets/InlineEditableField-zIAnW4AR.js +1 -0
- package/ui/dist/assets/{Input-DYukme8A.js → Input-bFsLI0fq.js} +1 -1
- package/ui/dist/assets/IntegrationsPanel-C_FswSRN.js +1 -0
- package/ui/dist/assets/IntelligenceView-smQ6aBwx.js +2 -0
- package/ui/dist/assets/{LearningPanel-BPx05bBu.js → LearningPanel-BEgF_iND.js} +1 -1
- package/ui/dist/assets/{LogsPanel-D3Qfp2SE.js → LogsPanel-Br1P8ST6.js} +1 -1
- package/ui/dist/assets/McpPanel-ByvQ12J_.js +1 -0
- package/ui/dist/assets/{MemoryGraphPanel-BFovwaSG.js → MemoryGraphPanel-BGOeSaET.js} +1 -1
- package/ui/dist/assets/MemoryWikiPanel-CR8btd66.js +11 -0
- package/ui/dist/assets/MeshPanel-BjkcSOMz.js +11 -0
- package/ui/dist/assets/NvidiaPanel-NYt42w7L.js +1 -0
- package/ui/dist/assets/OrganismPanel-PHvISvVn.js +1 -0
- package/ui/dist/assets/OverviewPanel-q35zdMr6.js +6 -0
- package/ui/dist/assets/{PageHeader-BdvxKoad.js → PageHeader-Cwn3OALc.js} +1 -1
- package/ui/dist/assets/PaperclipPanel-BDpQki0d.js +1 -0
- package/ui/dist/assets/{PersonasPanel-BpI6Npxv.js → PersonasPanel-DxrGW5C4.js} +1 -1
- package/ui/dist/assets/RecipesPanel-CYRdBx5u.js +1 -0
- package/ui/dist/assets/{SecurityPanel-CBDsEAFz.js → SecurityPanel-i1QMctV0.js} +1 -1
- package/ui/dist/assets/SelfImprovePanel-DbybAZWp.js +1 -0
- package/ui/dist/assets/SelfProposalsPanel-DtcTUDDd.js +2 -0
- package/ui/dist/assets/SessionsPanel-B7QmOizR.js +1 -0
- package/ui/dist/assets/SessionsTab-BdJj_vsI.js +1 -0
- package/ui/dist/assets/{SettingsPanel-BiWHsOAJ.js → SettingsPanel-DnEvJUFe.js} +1 -1
- package/ui/dist/assets/SettingsView-C39dk_yr.js +2 -0
- package/ui/dist/assets/{SkeletonLoader-CGtpZJ-7.js → SkeletonLoader-CsiR8ED9.js} +1 -1
- package/ui/dist/assets/{SkillsPanel-Z_9jA6dU.js → SkillsPanel-DM4qBFDS.js} +1 -1
- package/ui/dist/assets/{SomaView-AP3BXqf-.js → SomaView-CWnPKEQI.js} +1 -1
- package/ui/dist/assets/{StatCard-CrnvXPg5.js → StatCard-CY8lgeWm.js} +1 -1
- package/ui/dist/assets/{StatusBadge-B6r5EWBA.js → StatusBadge-CGvKbP7R.js} +1 -1
- package/ui/dist/assets/TeamsPanel-Bf6GaUni.js +1 -0
- package/ui/dist/assets/{TelemetryPanel-D6o14H-i.js → TelemetryPanel-JZ90gJXC.js} +1 -1
- package/ui/dist/assets/TitanCanvas-Hk49NFcA.js +1092 -0
- package/ui/dist/assets/ToolsView-Cq7Fuq3i.js +2 -0
- package/ui/dist/assets/{Tooltip-DNsYGHC9.js → Tooltip-CcoZrKsl.js} +1 -1
- package/ui/dist/assets/{TraceViewer-TOpdmqLF.js → TraceViewer-ojGf0drx.js} +1 -1
- package/ui/dist/assets/TrainingPanel-CWnP4H2l.js +1 -0
- package/ui/dist/assets/{VoiceOverlay-XIyCbAP7.js → VoiceOverlay-Dn6iaYgd.js} +1 -1
- package/ui/dist/assets/VramPanel-CLd9Ggck.js +1 -0
- package/ui/dist/assets/WatchView-CQBemwsm.js +13 -0
- package/ui/dist/assets/WorkTab-BOfTN-Bd.js +1 -0
- package/ui/dist/assets/WorkflowsPanel-qzNS0p0u.js +11 -0
- package/ui/dist/assets/{arrow-left-CQF-yBIU.js → arrow-left-c-8OFZUV.js} +1 -1
- package/ui/dist/assets/{chart-column-1smg0GbX.js → chart-column-x6L66Qw7.js} +1 -1
- package/ui/dist/assets/{circle-check-big-BiMDFx6C.js → circle-check-big-WaW3U3Xl.js} +1 -1
- package/ui/dist/assets/{dollar-sign-DMYH4Q_a.js → dollar-sign-D2Oce4Ru.js} +1 -1
- package/ui/dist/assets/{download-BYFd-yl6.js → download-YvPDLlFJ.js} +1 -1
- package/ui/dist/assets/eye-off-DIMcxsdQ.js +6 -0
- package/ui/dist/assets/{funnel-pWBglhfw.js → funnel-DqD9srZu.js} +1 -1
- package/ui/dist/assets/{git-branch-Cgqic2Us.js → git-branch-0FamUEbU.js} +1 -1
- package/ui/dist/assets/index-D932CbpQ.css +1 -0
- package/ui/dist/assets/index-NatBSFxj.js +227 -0
- package/ui/dist/assets/{legacy-BHbi-Nm_.js → legacy-DOO7F5cq.js} +1 -1
- package/ui/dist/assets/{lightbulb-D_y0Mtyq.js → lightbulb-Bk6KlR6q.js} +1 -1
- package/ui/dist/assets/pause-DDC_zUiJ.js +6 -0
- package/ui/dist/assets/{play-2xR4_zUG.js → play-BPXbHToG.js} +1 -1
- package/ui/dist/assets/{plug-DhvhYYy_.js → plug-Dxp-sWVF.js} +1 -1
- package/ui/dist/assets/proxy-vU7v4NVM.js +9 -0
- package/ui/dist/assets/square-Bn_0tYME.js +6 -0
- package/ui/dist/assets/target-BrtxUtzl.js +6 -0
- package/ui/dist/assets/toggle-right-CYphlpN5.js +11 -0
- package/ui/dist/assets/{trash-2-DmRaMz9e.js → trash-2-C_Jsp23A.js} +1 -1
- package/ui/dist/assets/{trending-up-DsDcs3Jo.js → trending-up-DrtLViSm.js} +1 -1
- package/ui/dist/assets/trophy-DdRzAOfo.js +6 -0
- package/ui/dist/index.html +2 -2
- package/ui/dist/assets/CPFiles-G7veSjMg.js +0 -6
- package/ui/dist/assets/CPGoals-C3DlKJrJ.js +0 -1
- package/ui/dist/assets/CPInbox-D10curQs.js +0 -16
- package/ui/dist/assets/ChannelsPanel-M3pO2htW.js +0 -1
- package/ui/dist/assets/CommandPostHub-CW9OY1A4.js +0 -37
- package/ui/dist/assets/InlineEditableField-CH-jR3LC.js +0 -11
- package/ui/dist/assets/IntegrationsPanel-EaN999Te.js +0 -1
- package/ui/dist/assets/IntelligenceView-Q4DBmJpJ.js +0 -2
- package/ui/dist/assets/McpPanel-zC7jTaSx.js +0 -6
- package/ui/dist/assets/MeshPanel-CqtYZ74K.js +0 -11
- package/ui/dist/assets/NvidiaPanel-BVIZFHet.js +0 -1
- package/ui/dist/assets/SelfImprovePanel-PSCYO6sx.js +0 -11
- package/ui/dist/assets/SessionsTab-Cn3dGgjX.js +0 -1
- package/ui/dist/assets/SettingsView-3BSIzAfW.js +0 -2
- package/ui/dist/assets/TitanCanvas-cnb7R1gS.js +0 -1056
- package/ui/dist/assets/ToolsView-Dp-xUWJG.js +0 -2
- package/ui/dist/assets/WorkTab-Pgq-iLz9.js +0 -1
- package/ui/dist/assets/WorkflowsPanel-B91LeW7r.js +0 -21
- package/ui/dist/assets/eye-BfW7UcEC.js +0 -11
- package/ui/dist/assets/index-BWSnB6Kr.js +0 -227
- package/ui/dist/assets/index-Dtw1pbjc.css +0 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{l as dt,m as Hn,r as x,j as Ce,n as Kt,R as Te}from"./index-BWSnB6Kr.js";function Je(e){const{margin:t,containerPadding:n,containerWidth:r,cols:o}=e;return(r-t[0]*(o-1)-n[0]*2)/o}function ke(e,t,n){return Number.isFinite(e)?Math.round(t*e+Math.max(0,e-1)*n):e}function Rt(e,t,n,r,o,i,l){const{margin:m,containerPadding:f,rowHeight:y}=e,v=Je(e);let g,S,P,C;if(l?(g=Math.round(l.width),S=Math.round(l.height)):(g=ke(r,v,m[0]),S=ke(o,y,m[1])),i?(P=Math.round(i.top),C=Math.round(i.left)):l?(P=Math.round(l.top),C=Math.round(l.left)):(P=Math.round((y+m[1])*n+f[1]),C=Math.round((v+m[0])*t+f[0])),!i&&!l){if(Number.isFinite(r)){const s=Math.round((v+m[0])*(t+r)+f[0])-C-g;s!==m[0]&&(g+=s-m[0])}if(Number.isFinite(o)){const s=Math.round((y+m[1])*(n+o)+f[1])-P-S;s!==m[1]&&(S+=s-m[1])}}return{top:P,left:C,width:g,height:S}}function hr(e,t,n,r,o){const{margin:i,containerPadding:l,cols:m,rowHeight:f,maxRows:y}=e,v=Je(e);let g=Math.round((n-l[0])/(v+i[0])),S=Math.round((t-l[1])/(f+i[1]));return g=Mt(g,0,m-r),S=Mt(S,0,y-o),{x:g,y:S}}function Dt(e,t,n){const{margin:r,containerPadding:o,rowHeight:i}=e,l=Je(e),m=Math.round((n-o[0])/(l+r[0])),f=Math.round((t-o[1])/(i+r[1]));return{x:m,y:f}}function gr(e,t,n){const{margin:r,rowHeight:o}=e,i=Je(e),l=Math.max(1,Math.round((t+r[0])/(i+r[0]))),m=Math.max(1,Math.round((n+r[1])/(o+r[1])));return{w:l,h:m}}function Mt(e,t,n){return Math.max(Math.min(e,n),t)}function Jt(e,t){return!(e.i===t.i||e.x+e.w<=t.x||e.x>=t.x+t.w||e.y+e.h<=t.y||e.y>=t.y+t.h)}function Ke(e,t){for(let n=0;n<e.length;n++){const r=e[n];if(r!==void 0&&Jt(r,t))return r}}function Wn(e,t){return e.filter(n=>Jt(n,t))}function mr(e,t){return t==="horizontal"?qn(e):t==="vertical"||t==="wrap"?Vt(e):[...e]}function Vt(e){return[...e].sort((t,n)=>t.y!==n.y?t.y-n.y:t.x-n.x)}function qn(e){return[...e].sort((t,n)=>t.x!==n.x?t.x-n.x:t.y-n.y)}function kt(e){let t=0;for(let n=0;n<e.length;n++){const r=e[n];if(r!==void 0){const o=r.y+r.h;o>t&&(t=o)}}return t}function Ue(e,t){for(let n=0;n<e.length;n++){const r=e[n];if(r!==void 0&&r.i===t)return r}}function Tt(e){return e.filter(t=>t.static===!0)}function Ze(e){return{i:e.i,x:e.x,y:e.y,w:e.w,h:e.h,minW:e.minW,maxW:e.maxW,minH:e.minH,maxH:e.maxH,moved:!!e.moved,static:!!e.static,isDraggable:e.isDraggable,isResizable:e.isResizable,resizeHandles:e.resizeHandles,constraints:e.constraints,isBounded:e.isBounded}}function $e(e){const t=new Array(e.length);for(let n=0;n<e.length;n++){const r=e[n];r!==void 0&&(t[n]=Ze(r))}return t}function yr(e,t){const n=new Array(e.length);for(let r=0;r<e.length;r++){const o=e[r];o!==void 0&&(t.i===o.i?n[r]=t:n[r]=o)}return n}function vr(e,t,n){let r=Ue(e,t);return r?(r=n(Ze(r)),[yr(e,r),r]):[[...e],null]}function Zt(e,t){const n=Tt(e);for(let r=0;r<e.length;r++){const o=e[r];if(o!==void 0)if(o.x+o.w>t.cols&&(o.x=t.cols-o.w),o.x<0&&(o.x=0,o.w=t.cols),!o.static)n.push(o);else for(;Ke(n,o);)o.y++}return e}function Ve(e,t,n,r,o,i,l,m,f){if(t.static&&t.isDraggable!==!0)return[...e];if(t.y===r&&t.x===n)return[...e];const y=t.x,v=t.y;typeof n=="number"&&(t.x=n),typeof r=="number"&&(t.y=r),t.moved=!0;let g=mr(e,l);(l==="vertical"&&typeof r=="number"?v>=r:l==="horizontal"&&typeof n=="number"?y>=n:!1)&&(g=g.reverse());const P=Wn(g,t),C=P.length>0;if(C&&f)return $e(e);if(C&&i)return t.x=y,t.y=v,t.moved=!1,e;let p=[...e];for(let s=0;s<P.length;s++){const a=P[s];a!==void 0&&(a.moved||(a.static?p=cn(p,a,t,o,l):p=cn(p,t,a,o,l)))}return p}function cn(e,t,n,r,o,i){const l=o==="horizontal",m=o==="vertical",f=t.static;if(r){r=!1;const g={x:l?Math.max(t.x-n.w,0):n.x,y:m?Math.max(t.y-n.h,0):n.y,w:n.w,h:n.h,i:"-1"},S=Ke(e,g),P=S!==void 0&&S.y+S.h>t.y,C=S!==void 0&&t.x+t.w>S.x;if(!S)return Ve(e,n,l?g.x:void 0,m?g.y:void 0,r,f,o);if(P&&m)return Ve(e,n,void 0,n.y+1,r,f,o);if(P&&o===null)return t.y=n.y,n.y=n.y+n.h,[...e];if(C&&l)return Ve(e,t,n.x,void 0,r,f,o)}const y=l?n.x+1:void 0,v=m?n.y+1:void 0;return y===void 0&&v===void 0?[...e]:Ve(e,n,y,v,r,f,o)}function Ge(e,t,n){return Math.max(t,Math.min(n,e))}var br={name:"gridBounds",constrainPosition(e,t,n,{cols:r,maxRows:o}){return{x:Ge(t,0,Math.max(0,r-e.w)),y:Ge(n,0,Math.max(0,o-e.h))}},constrainSize(e,t,n,r,{cols:o,maxRows:i}){const l=r==="w"||r==="nw"||r==="sw"?e.x+e.w:o-e.x,m=r==="n"||r==="nw"||r==="ne"?e.y+e.h:i-e.y;return{w:Ge(t,1,Math.max(1,l)),h:Ge(n,1,Math.max(1,m))}}},wr={name:"minMaxSize",constrainSize(e,t,n){return{w:Ge(t,e.minW??1,e.maxW??1/0),h:Ge(n,e.minH??1,e.maxH??1/0)}}},Sr={name:"containerBounds",constrainPosition(e,t,n,{cols:r,maxRows:o,containerHeight:i,rowHeight:l,margin:m}){const f=i>0?Math.floor((i+m[1])/(l+m[1])):o;return{x:Ge(t,0,Math.max(0,r-e.w)),y:Ge(n,0,Math.max(0,f-e.h))}}},_t=[br,wr];function Pt(e,t,n,r,o){let i={x:n,y:r};for(const l of e)l.constrainPosition&&(i=l.constrainPosition(t,i.x,i.y,o));if(t.constraints)for(const l of t.constraints)l.constrainPosition&&(i=l.constrainPosition(t,i.x,i.y,o));return i}function xr(e,t,n,r,o,i){let l={w:n,h:r};for(const m of e)m.constrainSize&&(l=m.constrainSize(t,l.w,l.h,o,i));if(t.constraints)for(const m of t.constraints)m.constrainSize&&(l=m.constrainSize(t,l.w,l.h,o,i));return l}function Qt({top:e,left:t,width:n,height:r}){const o=`translate(${t}px,${e}px)`;return{transform:o,WebkitTransform:o,MozTransform:o,msTransform:o,OTransform:o,width:`${n}px`,height:`${r}px`,position:"absolute"}}function In({top:e,left:t,width:n,height:r}){return{top:`${e}px`,left:`${t}px`,width:`${n}px`,height:`${r}px`,position:"absolute"}}function fn(e){return e*100+"%"}function Rr(e,t,n,r){return e+n>r?t:n}function An(e,t,n){return e<0?t:n}function Dr(e){return Math.max(0,e)}function jt(e){return Math.max(0,e)}var en=(e,t,n)=>{const{left:r,height:o,width:i}=t,l=e.top-(o-e.height);return{left:r,width:i,height:An(l,e.height,o),top:jt(l)}},tn=(e,t,n)=>{const{top:r,left:o,height:i,width:l}=t;return{top:r,height:i,width:Rr(e.left,e.width,l,n),left:Dr(o)}},nn=(e,t,n)=>{const{top:r,height:o,width:i}=t,l=e.left+e.width-i;return l<0?{height:o,width:e.left+e.width,top:jt(r),left:0}:{height:o,width:i,top:jt(r),left:l}},rn=(e,t,n)=>{const{top:r,left:o,height:i,width:l}=t;return{width:l,left:o,height:An(r,e.height,i),top:jt(r)}},Pr=(e,t,n)=>en(e,tn(e,t,n)),Cr=(e,t,n)=>en(e,nn(e,t)),Or=(e,t,n)=>rn(e,tn(e,t,n)),zr=(e,t,n)=>rn(e,nn(e,t)),Er={n:en,ne:Pr,e:tn,se:Or,s:rn,sw:zr,w:nn,nw:Cr};function Mr(e,t,n,r){const o=Er[e];return o?o(t,{...t,...n},r):n}var on={type:"transform",scale:1,calcStyle(e){return Qt(e)}},Bn={type:"absolute",scale:1,calcStyle(e){return In(e)}};function Yn(e){return{type:"transform",scale:e,calcStyle(t){return Qt(t)},calcDragPosition(t,n,r,o){return{left:(t-r)/e,top:(n-o)/e}}}}var _r=on,jr={cols:12,rowHeight:150,margin:[10,10],containerPadding:null,maxRows:1/0},kr={enabled:!0,bounded:!1,threshold:3},Tr={enabled:!0,handles:["se"]},Lr={enabled:!1,defaultItem:{w:1,h:1}};function sn(e,t,n,r,o){const i=r==="x"?"w":"h";t[r]+=1;const l=e.findIndex(f=>f.i===t.i),m=o??Tt(e).length>0;for(let f=l+1;f<e.length;f++){const y=e[f];if(y!==void 0&&!y.static){if(!m&&y.y>t.y+t.h)break;Jt(t,y)&&sn(e,y,n+t[i],r,m)}}t[r]=n}function Nr(e,t,n,r){for(t.x=Math.max(t.x,0),t.y=Math.max(t.y,0),t.y=Math.min(r,t.y);t.y>0&&!Ke(e,t);)t.y--;let o;for(;(o=Ke(e,t))!==void 0;)sn(n,t,o.y+o.h,"y");return t.y=Math.max(t.y,0),t}function Hr(e,t,n,r){for(t.x=Math.max(t.x,0),t.y=Math.max(t.y,0);t.x>0&&!Ke(e,t);)t.x--;let o;for(;(o=Ke(e,t))!==void 0;)if(sn(r,t,o.x+o.w,"x"),t.x+t.w>n)for(t.x=n-t.w,t.y++;t.x>0&&!Ke(e,t);)t.x--;return t.x=Math.max(t.x,0),t}var Xn={type:"vertical",allowOverlap:!1,compact(e,t){const n=Tt(e);let r=kt(n);const o=Vt(e),i=new Array(e.length);for(let l=0;l<o.length;l++){const m=o[l];if(m===void 0)continue;let f=Ze(m);f.static||(f=Nr(n,f,o,r),r=Math.max(r,f.y+f.h),n.push(f));const y=e.indexOf(m);i[y]=f,f.moved=!1}return i}},Fn={type:"horizontal",allowOverlap:!1,compact(e,t){const n=Tt(e),r=qn(e),o=new Array(e.length);for(let i=0;i<r.length;i++){const l=r[i];if(l===void 0)continue;let m=Ze(l);m.static||(m=Hr(n,m,t,r),n.push(m));const f=e.indexOf(l);o[f]=m,m.moved=!1}return o}},Gn={type:null,allowOverlap:!1,compact(e,t){return $e(e)}},Wr={...Xn,allowOverlap:!0,compact(e,t){return $e(e)}},qr={...Fn,allowOverlap:!0,compact(e,t){return $e(e)}},Ir={...Gn,allowOverlap:!0};function pt(e,t=!1,n=!1){let r;return t?e==="vertical"?r=Wr:e==="horizontal"?r=qr:r=Ir:e==="vertical"?r=Xn:e==="horizontal"?r=Fn:r=Gn,n?{...r,preventCollision:n}:r}function $n(e){return Object.keys(e).sort((n,r)=>e[n]-e[r])}function dn(e,t){const n=$n(e);let r=n[0];if(r===void 0)throw new Error("No breakpoints defined");for(let o=1;o<n.length;o++){const i=n[o];if(i===void 0)continue;const l=e[i];t>l&&(r=i)}return r}function pn(e,t){const n=t[e];if(n===void 0)throw new Error(`ResponsiveReactGridLayout: \`cols\` entry for breakpoint ${String(e)} is missing!`);return n}function Yt(e,t,n,r,o,i){const l=e[n];if(l)return $e(l);let m=e[r];const f=$n(t),y=f.slice(f.indexOf(n));for(let P=0;P<y.length;P++){const C=y[P];if(C===void 0)continue;const p=e[C];if(p){m=p;break}}const v=$e(m||[]),g=Zt(v,{cols:o});return(typeof i=="object"&&i!==null?i:pt(i)).compact(g,o)}function Ct(e,t){if(Array.isArray(e))return e;const n=e,r=n[t];if(r!==void 0)return r;const o=Object.keys(n);for(const i of o){const l=n[i];if(l!==void 0)return l}return[10,10]}var at={exports:{}},Xt={},Ft={exports:{}},Gt,hn;function Ar(){if(hn)return Gt;hn=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Gt=e,Gt}var $t,gn;function Br(){if(gn)return $t;gn=1;var e=Ar();function t(){}function n(){}return n.resetWarningCache=t,$t=function(){function r(l,m,f,y,v,g){if(g!==e){var S=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw S.name="Invariant Violation",S}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},$t}var mn;function Lt(){return mn||(mn=1,Ft.exports=Br()()),Ft.exports}var Ot={exports:{}},yn;function Yr(){if(yn)return Ot.exports;yn=1;function e(n){var r,o,i="";if(typeof n=="string"||typeof n=="number")i+=n;else if(typeof n=="object")if(Array.isArray(n)){var l=n.length;for(r=0;r<l;r++)n[r]&&(o=e(n[r]))&&(i&&(i+=" "),i+=o)}else for(o in n)n[o]&&(i&&(i+=" "),i+=o);return i}function t(){for(var n,r,o=0,i="",l=arguments.length;o<l;o++)(n=arguments[o])&&(r=e(n))&&(i&&(i+=" "),i+=r);return i}return Ot.exports=t,Ot.exports.clsx=t,Ot.exports}var ne={},Xe={},vn;function Nt(){if(vn)return Xe;vn=1,Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.dontSetMe=o,Xe.findInArray=e,Xe.int=r,Xe.isFunction=t,Xe.isNum=n;function e(i,l){for(let m=0,f=i.length;m<f;m++)if(l.apply(l,[i[m],m,i]))return i[m]}function t(i){return typeof i=="function"||Object.prototype.toString.call(i)==="[object Function]"}function n(i){return typeof i=="number"&&!isNaN(i)}function r(i){return parseInt(i,10)}function o(i,l,m){if(i[l])return new Error(`Invalid prop ${l} passed to ${m} - do not set this, set it on the child.`)}return Xe}var Fe={},bn;function Xr(){if(bn)return Fe;bn=1,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.browserPrefixToKey=n,Fe.browserPrefixToStyle=r,Fe.default=void 0,Fe.getPrefix=t;const e=["Moz","Webkit","O","ms"];function t(){var m,f;let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"transform";if(typeof window>"u")return"";const l=(f=(m=window.document)==null?void 0:m.documentElement)==null?void 0:f.style;if(!l||i in l)return"";for(let y=0;y<e.length;y++)if(n(i,e[y])in l)return e[y];return""}function n(i,l){return l?`${l}${o(i)}`:i}function r(i,l){return l?`-${l.toLowerCase()}-${i}`:i}function o(i){let l="",m=!0;for(let f=0;f<i.length;f++)m?(l+=i[f].toUpperCase(),m=!1):i[f]==="-"?m=!0:l+=i[f];return l}return Fe.default=t(),Fe}var wn;function an(){if(wn)return ne;wn=1,Object.defineProperty(ne,"__esModule",{value:!0}),ne.addClassName=D,ne.addEvent=l,ne.addUserSelectStyles=u,ne.createCSSTransform=P,ne.createSVGTransform=C,ne.getTouch=s,ne.getTouchIdentifier=a,ne.getTranslation=p,ne.innerHeight=v,ne.innerWidth=g,ne.matchesSelector=o,ne.matchesSelectorAndParentsTo=i,ne.offsetXYFromParent=S,ne.outerHeight=f,ne.outerWidth=y,ne.removeClassName=b,ne.removeEvent=m,ne.scheduleRemoveUserSelectStyles=h;var e=Nt(),t=n(Xr());function n(c,d){if(typeof WeakMap=="function")var R=new WeakMap,M=new WeakMap;return(n=function(E,T){if(!T&&E&&E.__esModule)return E;var z,j,B={__proto__:null,default:E};if(E===null||typeof E!="object"&&typeof E!="function")return B;if(z=T?M:R){if(z.has(E))return z.get(E);z.set(E,B)}for(const L in E)L!=="default"&&{}.hasOwnProperty.call(E,L)&&((j=(z=Object.defineProperty)&&Object.getOwnPropertyDescriptor(E,L))&&(j.get||j.set)?z(B,L,j):B[L]=E[L]);return B})(c,d)}let r="";function o(c,d){return r||(r=(0,e.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(R){return(0,e.isFunction)(c[R])})),(0,e.isFunction)(c[r])?c[r](d):!1}function i(c,d,R){let M=c;do{if(o(M,d))return!0;if(M===R)return!1;M=M.parentNode}while(M);return!1}function l(c,d,R,M){if(!c)return;const E={capture:!0,...M};c.addEventListener?c.addEventListener(d,R,E):c.attachEvent?c.attachEvent("on"+d,R):c["on"+d]=R}function m(c,d,R,M){if(!c)return;const E={capture:!0,...M};c.removeEventListener?c.removeEventListener(d,R,E):c.detachEvent?c.detachEvent("on"+d,R):c["on"+d]=null}function f(c){let d=c.clientHeight;const R=c.ownerDocument.defaultView.getComputedStyle(c);return d+=(0,e.int)(R.borderTopWidth),d+=(0,e.int)(R.borderBottomWidth),d}function y(c){let d=c.clientWidth;const R=c.ownerDocument.defaultView.getComputedStyle(c);return d+=(0,e.int)(R.borderLeftWidth),d+=(0,e.int)(R.borderRightWidth),d}function v(c){let d=c.clientHeight;const R=c.ownerDocument.defaultView.getComputedStyle(c);return d-=(0,e.int)(R.paddingTop),d-=(0,e.int)(R.paddingBottom),d}function g(c){let d=c.clientWidth;const R=c.ownerDocument.defaultView.getComputedStyle(c);return d-=(0,e.int)(R.paddingLeft),d-=(0,e.int)(R.paddingRight),d}function S(c,d,R){const E=d===d.ownerDocument.body?{left:0,top:0}:d.getBoundingClientRect(),T=(c.clientX+d.scrollLeft-E.left)/R,z=(c.clientY+d.scrollTop-E.top)/R;return{x:T,y:z}}function P(c,d){const R=p(c,d,"px");return{[(0,t.browserPrefixToKey)("transform",t.default)]:R}}function C(c,d){return p(c,d,"")}function p(c,d,R){let{x:M,y:E}=c,T=`translate(${M}${R},${E}${R})`;if(d){const z=`${typeof d.x=="string"?d.x:d.x+R}`,j=`${typeof d.y=="string"?d.y:d.y+R}`;T=`translate(${z}, ${j})`+T}return T}function s(c,d){return c.targetTouches&&(0,e.findInArray)(c.targetTouches,R=>d===R.identifier)||c.changedTouches&&(0,e.findInArray)(c.changedTouches,R=>d===R.identifier)}function a(c){if(c.targetTouches&&c.targetTouches[0])return c.targetTouches[0].identifier;if(c.changedTouches&&c.changedTouches[0])return c.changedTouches[0].identifier}function u(c){if(!c)return;let d=c.getElementById("react-draggable-style-el");d||(d=c.createElement("style"),d.type="text/css",d.id="react-draggable-style-el",d.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
|
|
1
|
+
import{l as dt,m as Hn,r as x,j as Ce,n as Kt,R as Te}from"./index-NatBSFxj.js";function Je(e){const{margin:t,containerPadding:n,containerWidth:r,cols:o}=e;return(r-t[0]*(o-1)-n[0]*2)/o}function ke(e,t,n){return Number.isFinite(e)?Math.round(t*e+Math.max(0,e-1)*n):e}function Rt(e,t,n,r,o,i,l){const{margin:m,containerPadding:f,rowHeight:y}=e,v=Je(e);let g,S,P,C;if(l?(g=Math.round(l.width),S=Math.round(l.height)):(g=ke(r,v,m[0]),S=ke(o,y,m[1])),i?(P=Math.round(i.top),C=Math.round(i.left)):l?(P=Math.round(l.top),C=Math.round(l.left)):(P=Math.round((y+m[1])*n+f[1]),C=Math.round((v+m[0])*t+f[0])),!i&&!l){if(Number.isFinite(r)){const s=Math.round((v+m[0])*(t+r)+f[0])-C-g;s!==m[0]&&(g+=s-m[0])}if(Number.isFinite(o)){const s=Math.round((y+m[1])*(n+o)+f[1])-P-S;s!==m[1]&&(S+=s-m[1])}}return{top:P,left:C,width:g,height:S}}function hr(e,t,n,r,o){const{margin:i,containerPadding:l,cols:m,rowHeight:f,maxRows:y}=e,v=Je(e);let g=Math.round((n-l[0])/(v+i[0])),S=Math.round((t-l[1])/(f+i[1]));return g=Mt(g,0,m-r),S=Mt(S,0,y-o),{x:g,y:S}}function Dt(e,t,n){const{margin:r,containerPadding:o,rowHeight:i}=e,l=Je(e),m=Math.round((n-o[0])/(l+r[0])),f=Math.round((t-o[1])/(i+r[1]));return{x:m,y:f}}function gr(e,t,n){const{margin:r,rowHeight:o}=e,i=Je(e),l=Math.max(1,Math.round((t+r[0])/(i+r[0]))),m=Math.max(1,Math.round((n+r[1])/(o+r[1])));return{w:l,h:m}}function Mt(e,t,n){return Math.max(Math.min(e,n),t)}function Jt(e,t){return!(e.i===t.i||e.x+e.w<=t.x||e.x>=t.x+t.w||e.y+e.h<=t.y||e.y>=t.y+t.h)}function Ke(e,t){for(let n=0;n<e.length;n++){const r=e[n];if(r!==void 0&&Jt(r,t))return r}}function Wn(e,t){return e.filter(n=>Jt(n,t))}function mr(e,t){return t==="horizontal"?qn(e):t==="vertical"||t==="wrap"?Vt(e):[...e]}function Vt(e){return[...e].sort((t,n)=>t.y!==n.y?t.y-n.y:t.x-n.x)}function qn(e){return[...e].sort((t,n)=>t.x!==n.x?t.x-n.x:t.y-n.y)}function kt(e){let t=0;for(let n=0;n<e.length;n++){const r=e[n];if(r!==void 0){const o=r.y+r.h;o>t&&(t=o)}}return t}function Ue(e,t){for(let n=0;n<e.length;n++){const r=e[n];if(r!==void 0&&r.i===t)return r}}function Tt(e){return e.filter(t=>t.static===!0)}function Ze(e){return{i:e.i,x:e.x,y:e.y,w:e.w,h:e.h,minW:e.minW,maxW:e.maxW,minH:e.minH,maxH:e.maxH,moved:!!e.moved,static:!!e.static,isDraggable:e.isDraggable,isResizable:e.isResizable,resizeHandles:e.resizeHandles,constraints:e.constraints,isBounded:e.isBounded}}function $e(e){const t=new Array(e.length);for(let n=0;n<e.length;n++){const r=e[n];r!==void 0&&(t[n]=Ze(r))}return t}function yr(e,t){const n=new Array(e.length);for(let r=0;r<e.length;r++){const o=e[r];o!==void 0&&(t.i===o.i?n[r]=t:n[r]=o)}return n}function vr(e,t,n){let r=Ue(e,t);return r?(r=n(Ze(r)),[yr(e,r),r]):[[...e],null]}function Zt(e,t){const n=Tt(e);for(let r=0;r<e.length;r++){const o=e[r];if(o!==void 0)if(o.x+o.w>t.cols&&(o.x=t.cols-o.w),o.x<0&&(o.x=0,o.w=t.cols),!o.static)n.push(o);else for(;Ke(n,o);)o.y++}return e}function Ve(e,t,n,r,o,i,l,m,f){if(t.static&&t.isDraggable!==!0)return[...e];if(t.y===r&&t.x===n)return[...e];const y=t.x,v=t.y;typeof n=="number"&&(t.x=n),typeof r=="number"&&(t.y=r),t.moved=!0;let g=mr(e,l);(l==="vertical"&&typeof r=="number"?v>=r:l==="horizontal"&&typeof n=="number"?y>=n:!1)&&(g=g.reverse());const P=Wn(g,t),C=P.length>0;if(C&&f)return $e(e);if(C&&i)return t.x=y,t.y=v,t.moved=!1,e;let p=[...e];for(let s=0;s<P.length;s++){const a=P[s];a!==void 0&&(a.moved||(a.static?p=cn(p,a,t,o,l):p=cn(p,t,a,o,l)))}return p}function cn(e,t,n,r,o,i){const l=o==="horizontal",m=o==="vertical",f=t.static;if(r){r=!1;const g={x:l?Math.max(t.x-n.w,0):n.x,y:m?Math.max(t.y-n.h,0):n.y,w:n.w,h:n.h,i:"-1"},S=Ke(e,g),P=S!==void 0&&S.y+S.h>t.y,C=S!==void 0&&t.x+t.w>S.x;if(!S)return Ve(e,n,l?g.x:void 0,m?g.y:void 0,r,f,o);if(P&&m)return Ve(e,n,void 0,n.y+1,r,f,o);if(P&&o===null)return t.y=n.y,n.y=n.y+n.h,[...e];if(C&&l)return Ve(e,t,n.x,void 0,r,f,o)}const y=l?n.x+1:void 0,v=m?n.y+1:void 0;return y===void 0&&v===void 0?[...e]:Ve(e,n,y,v,r,f,o)}function Ge(e,t,n){return Math.max(t,Math.min(n,e))}var br={name:"gridBounds",constrainPosition(e,t,n,{cols:r,maxRows:o}){return{x:Ge(t,0,Math.max(0,r-e.w)),y:Ge(n,0,Math.max(0,o-e.h))}},constrainSize(e,t,n,r,{cols:o,maxRows:i}){const l=r==="w"||r==="nw"||r==="sw"?e.x+e.w:o-e.x,m=r==="n"||r==="nw"||r==="ne"?e.y+e.h:i-e.y;return{w:Ge(t,1,Math.max(1,l)),h:Ge(n,1,Math.max(1,m))}}},wr={name:"minMaxSize",constrainSize(e,t,n){return{w:Ge(t,e.minW??1,e.maxW??1/0),h:Ge(n,e.minH??1,e.maxH??1/0)}}},Sr={name:"containerBounds",constrainPosition(e,t,n,{cols:r,maxRows:o,containerHeight:i,rowHeight:l,margin:m}){const f=i>0?Math.floor((i+m[1])/(l+m[1])):o;return{x:Ge(t,0,Math.max(0,r-e.w)),y:Ge(n,0,Math.max(0,f-e.h))}}},_t=[br,wr];function Pt(e,t,n,r,o){let i={x:n,y:r};for(const l of e)l.constrainPosition&&(i=l.constrainPosition(t,i.x,i.y,o));if(t.constraints)for(const l of t.constraints)l.constrainPosition&&(i=l.constrainPosition(t,i.x,i.y,o));return i}function xr(e,t,n,r,o,i){let l={w:n,h:r};for(const m of e)m.constrainSize&&(l=m.constrainSize(t,l.w,l.h,o,i));if(t.constraints)for(const m of t.constraints)m.constrainSize&&(l=m.constrainSize(t,l.w,l.h,o,i));return l}function Qt({top:e,left:t,width:n,height:r}){const o=`translate(${t}px,${e}px)`;return{transform:o,WebkitTransform:o,MozTransform:o,msTransform:o,OTransform:o,width:`${n}px`,height:`${r}px`,position:"absolute"}}function In({top:e,left:t,width:n,height:r}){return{top:`${e}px`,left:`${t}px`,width:`${n}px`,height:`${r}px`,position:"absolute"}}function fn(e){return e*100+"%"}function Rr(e,t,n,r){return e+n>r?t:n}function An(e,t,n){return e<0?t:n}function Dr(e){return Math.max(0,e)}function jt(e){return Math.max(0,e)}var en=(e,t,n)=>{const{left:r,height:o,width:i}=t,l=e.top-(o-e.height);return{left:r,width:i,height:An(l,e.height,o),top:jt(l)}},tn=(e,t,n)=>{const{top:r,left:o,height:i,width:l}=t;return{top:r,height:i,width:Rr(e.left,e.width,l,n),left:Dr(o)}},nn=(e,t,n)=>{const{top:r,height:o,width:i}=t,l=e.left+e.width-i;return l<0?{height:o,width:e.left+e.width,top:jt(r),left:0}:{height:o,width:i,top:jt(r),left:l}},rn=(e,t,n)=>{const{top:r,left:o,height:i,width:l}=t;return{width:l,left:o,height:An(r,e.height,i),top:jt(r)}},Pr=(e,t,n)=>en(e,tn(e,t,n)),Cr=(e,t,n)=>en(e,nn(e,t)),Or=(e,t,n)=>rn(e,tn(e,t,n)),zr=(e,t,n)=>rn(e,nn(e,t)),Er={n:en,ne:Pr,e:tn,se:Or,s:rn,sw:zr,w:nn,nw:Cr};function Mr(e,t,n,r){const o=Er[e];return o?o(t,{...t,...n},r):n}var on={type:"transform",scale:1,calcStyle(e){return Qt(e)}},Bn={type:"absolute",scale:1,calcStyle(e){return In(e)}};function Yn(e){return{type:"transform",scale:e,calcStyle(t){return Qt(t)},calcDragPosition(t,n,r,o){return{left:(t-r)/e,top:(n-o)/e}}}}var _r=on,jr={cols:12,rowHeight:150,margin:[10,10],containerPadding:null,maxRows:1/0},kr={enabled:!0,bounded:!1,threshold:3},Tr={enabled:!0,handles:["se"]},Lr={enabled:!1,defaultItem:{w:1,h:1}};function sn(e,t,n,r,o){const i=r==="x"?"w":"h";t[r]+=1;const l=e.findIndex(f=>f.i===t.i),m=o??Tt(e).length>0;for(let f=l+1;f<e.length;f++){const y=e[f];if(y!==void 0&&!y.static){if(!m&&y.y>t.y+t.h)break;Jt(t,y)&&sn(e,y,n+t[i],r,m)}}t[r]=n}function Nr(e,t,n,r){for(t.x=Math.max(t.x,0),t.y=Math.max(t.y,0),t.y=Math.min(r,t.y);t.y>0&&!Ke(e,t);)t.y--;let o;for(;(o=Ke(e,t))!==void 0;)sn(n,t,o.y+o.h,"y");return t.y=Math.max(t.y,0),t}function Hr(e,t,n,r){for(t.x=Math.max(t.x,0),t.y=Math.max(t.y,0);t.x>0&&!Ke(e,t);)t.x--;let o;for(;(o=Ke(e,t))!==void 0;)if(sn(r,t,o.x+o.w,"x"),t.x+t.w>n)for(t.x=n-t.w,t.y++;t.x>0&&!Ke(e,t);)t.x--;return t.x=Math.max(t.x,0),t}var Xn={type:"vertical",allowOverlap:!1,compact(e,t){const n=Tt(e);let r=kt(n);const o=Vt(e),i=new Array(e.length);for(let l=0;l<o.length;l++){const m=o[l];if(m===void 0)continue;let f=Ze(m);f.static||(f=Nr(n,f,o,r),r=Math.max(r,f.y+f.h),n.push(f));const y=e.indexOf(m);i[y]=f,f.moved=!1}return i}},Fn={type:"horizontal",allowOverlap:!1,compact(e,t){const n=Tt(e),r=qn(e),o=new Array(e.length);for(let i=0;i<r.length;i++){const l=r[i];if(l===void 0)continue;let m=Ze(l);m.static||(m=Hr(n,m,t,r),n.push(m));const f=e.indexOf(l);o[f]=m,m.moved=!1}return o}},Gn={type:null,allowOverlap:!1,compact(e,t){return $e(e)}},Wr={...Xn,allowOverlap:!0,compact(e,t){return $e(e)}},qr={...Fn,allowOverlap:!0,compact(e,t){return $e(e)}},Ir={...Gn,allowOverlap:!0};function pt(e,t=!1,n=!1){let r;return t?e==="vertical"?r=Wr:e==="horizontal"?r=qr:r=Ir:e==="vertical"?r=Xn:e==="horizontal"?r=Fn:r=Gn,n?{...r,preventCollision:n}:r}function $n(e){return Object.keys(e).sort((n,r)=>e[n]-e[r])}function dn(e,t){const n=$n(e);let r=n[0];if(r===void 0)throw new Error("No breakpoints defined");for(let o=1;o<n.length;o++){const i=n[o];if(i===void 0)continue;const l=e[i];t>l&&(r=i)}return r}function pn(e,t){const n=t[e];if(n===void 0)throw new Error(`ResponsiveReactGridLayout: \`cols\` entry for breakpoint ${String(e)} is missing!`);return n}function Yt(e,t,n,r,o,i){const l=e[n];if(l)return $e(l);let m=e[r];const f=$n(t),y=f.slice(f.indexOf(n));for(let P=0;P<y.length;P++){const C=y[P];if(C===void 0)continue;const p=e[C];if(p){m=p;break}}const v=$e(m||[]),g=Zt(v,{cols:o});return(typeof i=="object"&&i!==null?i:pt(i)).compact(g,o)}function Ct(e,t){if(Array.isArray(e))return e;const n=e,r=n[t];if(r!==void 0)return r;const o=Object.keys(n);for(const i of o){const l=n[i];if(l!==void 0)return l}return[10,10]}var at={exports:{}},Xt={},Ft={exports:{}},Gt,hn;function Ar(){if(hn)return Gt;hn=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Gt=e,Gt}var $t,gn;function Br(){if(gn)return $t;gn=1;var e=Ar();function t(){}function n(){}return n.resetWarningCache=t,$t=function(){function r(l,m,f,y,v,g){if(g!==e){var S=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw S.name="Invariant Violation",S}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},$t}var mn;function Lt(){return mn||(mn=1,Ft.exports=Br()()),Ft.exports}var Ot={exports:{}},yn;function Yr(){if(yn)return Ot.exports;yn=1;function e(n){var r,o,i="";if(typeof n=="string"||typeof n=="number")i+=n;else if(typeof n=="object")if(Array.isArray(n)){var l=n.length;for(r=0;r<l;r++)n[r]&&(o=e(n[r]))&&(i&&(i+=" "),i+=o)}else for(o in n)n[o]&&(i&&(i+=" "),i+=o);return i}function t(){for(var n,r,o=0,i="",l=arguments.length;o<l;o++)(n=arguments[o])&&(r=e(n))&&(i&&(i+=" "),i+=r);return i}return Ot.exports=t,Ot.exports.clsx=t,Ot.exports}var ne={},Xe={},vn;function Nt(){if(vn)return Xe;vn=1,Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.dontSetMe=o,Xe.findInArray=e,Xe.int=r,Xe.isFunction=t,Xe.isNum=n;function e(i,l){for(let m=0,f=i.length;m<f;m++)if(l.apply(l,[i[m],m,i]))return i[m]}function t(i){return typeof i=="function"||Object.prototype.toString.call(i)==="[object Function]"}function n(i){return typeof i=="number"&&!isNaN(i)}function r(i){return parseInt(i,10)}function o(i,l,m){if(i[l])return new Error(`Invalid prop ${l} passed to ${m} - do not set this, set it on the child.`)}return Xe}var Fe={},bn;function Xr(){if(bn)return Fe;bn=1,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.browserPrefixToKey=n,Fe.browserPrefixToStyle=r,Fe.default=void 0,Fe.getPrefix=t;const e=["Moz","Webkit","O","ms"];function t(){var m,f;let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"transform";if(typeof window>"u")return"";const l=(f=(m=window.document)==null?void 0:m.documentElement)==null?void 0:f.style;if(!l||i in l)return"";for(let y=0;y<e.length;y++)if(n(i,e[y])in l)return e[y];return""}function n(i,l){return l?`${l}${o(i)}`:i}function r(i,l){return l?`-${l.toLowerCase()}-${i}`:i}function o(i){let l="",m=!0;for(let f=0;f<i.length;f++)m?(l+=i[f].toUpperCase(),m=!1):i[f]==="-"?m=!0:l+=i[f];return l}return Fe.default=t(),Fe}var wn;function an(){if(wn)return ne;wn=1,Object.defineProperty(ne,"__esModule",{value:!0}),ne.addClassName=D,ne.addEvent=l,ne.addUserSelectStyles=u,ne.createCSSTransform=P,ne.createSVGTransform=C,ne.getTouch=s,ne.getTouchIdentifier=a,ne.getTranslation=p,ne.innerHeight=v,ne.innerWidth=g,ne.matchesSelector=o,ne.matchesSelectorAndParentsTo=i,ne.offsetXYFromParent=S,ne.outerHeight=f,ne.outerWidth=y,ne.removeClassName=b,ne.removeEvent=m,ne.scheduleRemoveUserSelectStyles=h;var e=Nt(),t=n(Xr());function n(c,d){if(typeof WeakMap=="function")var R=new WeakMap,M=new WeakMap;return(n=function(E,T){if(!T&&E&&E.__esModule)return E;var z,j,B={__proto__:null,default:E};if(E===null||typeof E!="object"&&typeof E!="function")return B;if(z=T?M:R){if(z.has(E))return z.get(E);z.set(E,B)}for(const L in E)L!=="default"&&{}.hasOwnProperty.call(E,L)&&((j=(z=Object.defineProperty)&&Object.getOwnPropertyDescriptor(E,L))&&(j.get||j.set)?z(B,L,j):B[L]=E[L]);return B})(c,d)}let r="";function o(c,d){return r||(r=(0,e.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(R){return(0,e.isFunction)(c[R])})),(0,e.isFunction)(c[r])?c[r](d):!1}function i(c,d,R){let M=c;do{if(o(M,d))return!0;if(M===R)return!1;M=M.parentNode}while(M);return!1}function l(c,d,R,M){if(!c)return;const E={capture:!0,...M};c.addEventListener?c.addEventListener(d,R,E):c.attachEvent?c.attachEvent("on"+d,R):c["on"+d]=R}function m(c,d,R,M){if(!c)return;const E={capture:!0,...M};c.removeEventListener?c.removeEventListener(d,R,E):c.detachEvent?c.detachEvent("on"+d,R):c["on"+d]=null}function f(c){let d=c.clientHeight;const R=c.ownerDocument.defaultView.getComputedStyle(c);return d+=(0,e.int)(R.borderTopWidth),d+=(0,e.int)(R.borderBottomWidth),d}function y(c){let d=c.clientWidth;const R=c.ownerDocument.defaultView.getComputedStyle(c);return d+=(0,e.int)(R.borderLeftWidth),d+=(0,e.int)(R.borderRightWidth),d}function v(c){let d=c.clientHeight;const R=c.ownerDocument.defaultView.getComputedStyle(c);return d-=(0,e.int)(R.paddingTop),d-=(0,e.int)(R.paddingBottom),d}function g(c){let d=c.clientWidth;const R=c.ownerDocument.defaultView.getComputedStyle(c);return d-=(0,e.int)(R.paddingLeft),d-=(0,e.int)(R.paddingRight),d}function S(c,d,R){const E=d===d.ownerDocument.body?{left:0,top:0}:d.getBoundingClientRect(),T=(c.clientX+d.scrollLeft-E.left)/R,z=(c.clientY+d.scrollTop-E.top)/R;return{x:T,y:z}}function P(c,d){const R=p(c,d,"px");return{[(0,t.browserPrefixToKey)("transform",t.default)]:R}}function C(c,d){return p(c,d,"")}function p(c,d,R){let{x:M,y:E}=c,T=`translate(${M}${R},${E}${R})`;if(d){const z=`${typeof d.x=="string"?d.x:d.x+R}`,j=`${typeof d.y=="string"?d.y:d.y+R}`;T=`translate(${z}, ${j})`+T}return T}function s(c,d){return c.targetTouches&&(0,e.findInArray)(c.targetTouches,R=>d===R.identifier)||c.changedTouches&&(0,e.findInArray)(c.changedTouches,R=>d===R.identifier)}function a(c){if(c.targetTouches&&c.targetTouches[0])return c.targetTouches[0].identifier;if(c.changedTouches&&c.changedTouches[0])return c.changedTouches[0].identifier}function u(c){if(!c)return;let d=c.getElementById("react-draggable-style-el");d||(d=c.createElement("style"),d.type="text/css",d.id="react-draggable-style-el",d.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
|
|
2
2
|
`,d.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;}
|
|
3
3
|
`,c.getElementsByTagName("head")[0].appendChild(d)),c.body&&D(c.body,"react-draggable-transparent-selection")}function h(c){window.requestAnimationFrame?window.requestAnimationFrame(()=>{w(c)}):w(c)}function w(c){if(c)try{if(c.body&&b(c.body,"react-draggable-transparent-selection"),c.selection)c.selection.empty();else{const d=(c.defaultView||window).getSelection();d&&d.type!=="Caret"&&d.removeAllRanges()}}catch{}}function D(c,d){c.classList?c.classList.add(d):c.className.match(new RegExp(`(?:^|\\s)${d}(?!\\S)`))||(c.className+=` ${d}`)}function b(c,d){c.classList?c.classList.remove(d):c.className=c.className.replace(new RegExp(`(?:^|\\s)${d}(?!\\S)`,"g"),"")}return ne}var je={},Sn;function Un(){if(Sn)return je;Sn=1,Object.defineProperty(je,"__esModule",{value:!0}),je.canDragX=o,je.canDragY=i,je.createCoreData=m,je.createDraggableData=f,je.getBoundPosition=n,je.getControlPosition=l,je.snapToGrid=r;var e=Nt(),t=an();function n(g,S,P){if(!g.props.bounds)return[S,P];let{bounds:C}=g.props;C=typeof C=="string"?C:y(C);const p=v(g);if(typeof C=="string"){const{ownerDocument:s}=p,a=s.defaultView;let u;if(C==="parent"?u=p.parentNode:u=p.getRootNode().querySelector(C),!(u instanceof a.HTMLElement))throw new Error('Bounds selector "'+C+'" could not find an element.');const h=u,w=a.getComputedStyle(p),D=a.getComputedStyle(h);C={left:-p.offsetLeft+(0,e.int)(D.paddingLeft)+(0,e.int)(w.marginLeft),top:-p.offsetTop+(0,e.int)(D.paddingTop)+(0,e.int)(w.marginTop),right:(0,t.innerWidth)(h)-(0,t.outerWidth)(p)-p.offsetLeft+(0,e.int)(D.paddingRight)-(0,e.int)(w.marginRight),bottom:(0,t.innerHeight)(h)-(0,t.outerHeight)(p)-p.offsetTop+(0,e.int)(D.paddingBottom)-(0,e.int)(w.marginBottom)}}return(0,e.isNum)(C.right)&&(S=Math.min(S,C.right)),(0,e.isNum)(C.bottom)&&(P=Math.min(P,C.bottom)),(0,e.isNum)(C.left)&&(S=Math.max(S,C.left)),(0,e.isNum)(C.top)&&(P=Math.max(P,C.top)),[S,P]}function r(g,S,P){const C=Math.round(S/g[0])*g[0],p=Math.round(P/g[1])*g[1];return[C,p]}function o(g){return g.props.axis==="both"||g.props.axis==="x"}function i(g){return g.props.axis==="both"||g.props.axis==="y"}function l(g,S,P){const C=typeof S=="number"?(0,t.getTouch)(g,S):null;if(typeof S=="number"&&!C)return null;const p=v(P),s=P.props.offsetParent||p.offsetParent||p.ownerDocument.body;return(0,t.offsetXYFromParent)(C||g,s,P.props.scale)}function m(g,S,P){const C=!(0,e.isNum)(g.lastX),p=v(g);return C?{node:p,deltaX:0,deltaY:0,lastX:S,lastY:P,x:S,y:P}:{node:p,deltaX:S-g.lastX,deltaY:P-g.lastY,lastX:g.lastX,lastY:g.lastY,x:S,y:P}}function f(g,S){const P=g.props.scale;return{node:S.node,x:g.state.x+S.deltaX/P,y:g.state.y+S.deltaY/P,deltaX:S.deltaX/P,deltaY:S.deltaY/P,lastX:g.state.x,lastY:g.state.y}}function y(g){return{left:g.left,top:g.top,right:g.right,bottom:g.bottom}}function v(g){const S=g.findDOMNode();if(!S)throw new Error("<DraggableCore>: Unmounted during event!");return S}return je}var it={},zt={},xn;function Vn(){if(xn)return zt;xn=1,Object.defineProperty(zt,"__esModule",{value:!0}),zt.default=e;function e(){}return zt}var Rn;function Fr(){if(Rn)return it;Rn=1,Object.defineProperty(it,"__esModule",{value:!0}),it.default=void 0;var e=f(dt()),t=m(Lt()),n=m(Hn()),r=an(),o=Un(),i=Nt(),l=m(Vn());function m(p){return p&&p.__esModule?p:{default:p}}function f(p,s){if(typeof WeakMap=="function")var a=new WeakMap,u=new WeakMap;return(f=function(h,w){if(!w&&h&&h.__esModule)return h;var D,b,c={__proto__:null,default:h};if(h===null||typeof h!="object"&&typeof h!="function")return c;if(D=w?u:a){if(D.has(h))return D.get(h);D.set(h,c)}for(const d in h)d!=="default"&&{}.hasOwnProperty.call(h,d)&&((b=(D=Object.defineProperty)&&Object.getOwnPropertyDescriptor(h,d))&&(b.get||b.set)?D(c,d,b):c[d]=h[d]);return c})(p,s)}function y(p,s,a){return(s=v(s))in p?Object.defineProperty(p,s,{value:a,enumerable:!0,configurable:!0,writable:!0}):p[s]=a,p}function v(p){var s=g(p,"string");return typeof s=="symbol"?s:s+""}function g(p,s){if(typeof p!="object"||!p)return p;var a=p[Symbol.toPrimitive];if(a!==void 0){var u=a.call(p,s);if(typeof u!="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return(s==="string"?String:Number)(p)}const S={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}};let P=S.mouse,C=class extends e.Component{constructor(){super(...arguments),y(this,"dragging",!1),y(this,"lastX",NaN),y(this,"lastY",NaN),y(this,"touchIdentifier",null),y(this,"mounted",!1),y(this,"handleDragStart",s=>{if(this.props.onMouseDown(s),!this.props.allowAnyClick&&typeof s.button=="number"&&s.button!==0)return!1;const a=this.findDOMNode();if(!a||!a.ownerDocument||!a.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:u}=a;if(this.props.disabled||!(s.target instanceof u.defaultView.Node)||this.props.handle&&!(0,r.matchesSelectorAndParentsTo)(s.target,this.props.handle,a)||this.props.cancel&&(0,r.matchesSelectorAndParentsTo)(s.target,this.props.cancel,a))return;s.type==="touchstart"&&!this.props.allowMobileScroll&&s.preventDefault();const h=(0,r.getTouchIdentifier)(s);this.touchIdentifier=h;const w=(0,o.getControlPosition)(s,h,this);if(w==null)return;const{x:D,y:b}=w,c=(0,o.createCoreData)(this,D,b);(0,l.default)("DraggableCore: handleDragStart: %j",c),(0,l.default)("calling",this.props.onStart),!(this.props.onStart(s,c)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&(0,r.addUserSelectStyles)(u),this.dragging=!0,this.lastX=D,this.lastY=b,(0,r.addEvent)(u,P.move,this.handleDrag),(0,r.addEvent)(u,P.stop,this.handleDragStop))}),y(this,"handleDrag",s=>{const a=(0,o.getControlPosition)(s,this.touchIdentifier,this);if(a==null)return;let{x:u,y:h}=a;if(Array.isArray(this.props.grid)){let b=u-this.lastX,c=h-this.lastY;if([b,c]=(0,o.snapToGrid)(this.props.grid,b,c),!b&&!c)return;u=this.lastX+b,h=this.lastY+c}const w=(0,o.createCoreData)(this,u,h);if((0,l.default)("DraggableCore: handleDrag: %j",w),this.props.onDrag(s,w)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch{const c=document.createEvent("MouseEvents");c.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(c)}return}this.lastX=u,this.lastY=h}),y(this,"handleDragStop",s=>{if(!this.dragging)return;const a=(0,o.getControlPosition)(s,this.touchIdentifier,this);if(a==null)return;let{x:u,y:h}=a;if(Array.isArray(this.props.grid)){let c=u-this.lastX||0,d=h-this.lastY||0;[c,d]=(0,o.snapToGrid)(this.props.grid,c,d),u=this.lastX+c,h=this.lastY+d}const w=(0,o.createCoreData)(this,u,h);if(this.props.onStop(s,w)===!1||this.mounted===!1)return!1;const b=this.findDOMNode();b&&this.props.enableUserSelectHack&&(0,r.scheduleRemoveUserSelectStyles)(b.ownerDocument),(0,l.default)("DraggableCore: handleDragStop: %j",w),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,b&&((0,l.default)("DraggableCore: Removing handlers"),(0,r.removeEvent)(b.ownerDocument,P.move,this.handleDrag),(0,r.removeEvent)(b.ownerDocument,P.stop,this.handleDragStop))}),y(this,"onMouseDown",s=>(P=S.mouse,this.handleDragStart(s))),y(this,"onMouseUp",s=>(P=S.mouse,this.handleDragStop(s))),y(this,"onTouchStart",s=>(P=S.touch,this.handleDragStart(s))),y(this,"onTouchEnd",s=>(P=S.touch,this.handleDragStop(s)))}componentDidMount(){this.mounted=!0;const s=this.findDOMNode();s&&(0,r.addEvent)(s,S.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const s=this.findDOMNode();if(s){const{ownerDocument:a}=s;(0,r.removeEvent)(a,S.mouse.move,this.handleDrag),(0,r.removeEvent)(a,S.touch.move,this.handleDrag),(0,r.removeEvent)(a,S.mouse.stop,this.handleDragStop),(0,r.removeEvent)(a,S.touch.stop,this.handleDragStop),(0,r.removeEvent)(s,S.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,r.scheduleRemoveUserSelectStyles)(a)}}findDOMNode(){var s,a,u;return(s=this.props)!=null&&s.nodeRef?(u=(a=this.props)==null?void 0:a.nodeRef)==null?void 0:u.current:n.default.findDOMNode(this)}render(){return e.cloneElement(e.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};return it.default=C,y(C,"displayName","DraggableCore"),y(C,"propTypes",{allowAnyClick:t.default.bool,allowMobileScroll:t.default.bool,children:t.default.node.isRequired,disabled:t.default.bool,enableUserSelectHack:t.default.bool,offsetParent:function(p,s){if(p[s]&&p[s].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:t.default.arrayOf(t.default.number),handle:t.default.string,cancel:t.default.string,nodeRef:t.default.object,onStart:t.default.func,onDrag:t.default.func,onStop:t.default.func,onMouseDown:t.default.func,scale:t.default.number,className:i.dontSetMe,style:i.dontSetMe,transform:i.dontSetMe}),y(C,"defaultProps",{allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),it}var Dn;function Gr(){return Dn||(Dn=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return f.default}}),e.default=void 0;var t=g(dt()),n=v(Lt()),r=v(Hn()),o=Yr(),i=an(),l=Un(),m=Nt(),f=v(Fr()),y=v(Vn());function v(a){return a&&a.__esModule?a:{default:a}}function g(a,u){if(typeof WeakMap=="function")var h=new WeakMap,w=new WeakMap;return(g=function(D,b){if(!b&&D&&D.__esModule)return D;var c,d,R={__proto__:null,default:D};if(D===null||typeof D!="object"&&typeof D!="function")return R;if(c=b?w:h){if(c.has(D))return c.get(D);c.set(D,R)}for(const M in D)M!=="default"&&{}.hasOwnProperty.call(D,M)&&((d=(c=Object.defineProperty)&&Object.getOwnPropertyDescriptor(D,M))&&(d.get||d.set)?c(R,M,d):R[M]=D[M]);return R})(a,u)}function S(){return S=Object.assign?Object.assign.bind():function(a){for(var u=1;u<arguments.length;u++){var h=arguments[u];for(var w in h)({}).hasOwnProperty.call(h,w)&&(a[w]=h[w])}return a},S.apply(null,arguments)}function P(a,u,h){return(u=C(u))in a?Object.defineProperty(a,u,{value:h,enumerable:!0,configurable:!0,writable:!0}):a[u]=h,a}function C(a){var u=p(a,"string");return typeof u=="symbol"?u:u+""}function p(a,u){if(typeof a!="object"||!a)return a;var h=a[Symbol.toPrimitive];if(h!==void 0){var w=h.call(a,u);if(typeof w!="object")return w;throw new TypeError("@@toPrimitive must return a primitive value.")}return(u==="string"?String:Number)(a)}class s extends t.Component{static getDerivedStateFromProps(u,h){let{position:w}=u,{prevPropsPosition:D}=h;return w&&(!D||w.x!==D.x||w.y!==D.y)?((0,y.default)("Draggable: getDerivedStateFromProps %j",{position:w,prevPropsPosition:D}),{x:w.x,y:w.y,prevPropsPosition:{...w}}):null}constructor(u){super(u),P(this,"onDragStart",(h,w)=>{if((0,y.default)("Draggable: onDragStart: %j",w),this.props.onStart(h,(0,l.createDraggableData)(this,w))===!1)return!1;this.setState({dragging:!0,dragged:!0})}),P(this,"onDrag",(h,w)=>{if(!this.state.dragging)return!1;(0,y.default)("Draggable: onDrag: %j",w);const D=(0,l.createDraggableData)(this,w),b={x:D.x,y:D.y,slackX:0,slackY:0};if(this.props.bounds){const{x:d,y:R}=b;b.x+=this.state.slackX,b.y+=this.state.slackY;const[M,E]=(0,l.getBoundPosition)(this,b.x,b.y);b.x=M,b.y=E,b.slackX=this.state.slackX+(d-b.x),b.slackY=this.state.slackY+(R-b.y),D.x=b.x,D.y=b.y,D.deltaX=b.x-this.state.x,D.deltaY=b.y-this.state.y}if(this.props.onDrag(h,D)===!1)return!1;this.setState(b)}),P(this,"onDragStop",(h,w)=>{if(!this.state.dragging||this.props.onStop(h,(0,l.createDraggableData)(this,w))===!1)return!1;(0,y.default)("Draggable: onDragStop: %j",w);const b={dragging:!1,slackX:0,slackY:0};if(!!this.props.position){const{x:d,y:R}=this.props.position;b.x=d,b.y=R}this.setState(b)}),this.state={dragging:!1,dragged:!1,x:u.position?u.position.x:u.defaultPosition.x,y:u.position?u.position.y:u.defaultPosition.y,prevPropsPosition:{...u.position},slackX:0,slackY:0,isElementSVG:!1},u.position&&!(u.onDrag||u.onStop)&&console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){typeof window.SVGElement<"u"&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.state.dragging&&this.setState({dragging:!1})}findDOMNode(){var u,h;return((h=(u=this.props)==null?void 0:u.nodeRef)==null?void 0:h.current)??r.default.findDOMNode(this)}render(){const{axis:u,bounds:h,children:w,defaultPosition:D,defaultClassName:b,defaultClassNameDragging:c,defaultClassNameDragged:d,position:R,positionOffset:M,scale:E,...T}=this.props;let z={},j=null;const L=!!!R||this.state.dragging,Y=R||D,F={x:(0,l.canDragX)(this)&&L?this.state.x:Y.x,y:(0,l.canDragY)(this)&&L?this.state.y:Y.y};this.state.isElementSVG?j=(0,i.createSVGTransform)(F,M):z=(0,i.createCSSTransform)(F,M);const ie=(0,o.clsx)(w.props.className||"",b,{[c]:this.state.dragging,[d]:this.state.dragged});return t.createElement(f.default,S({},T,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),t.cloneElement(t.Children.only(w),{className:ie,style:{...w.props.style,...z},transform:j}))}}e.default=s,P(s,"displayName","Draggable"),P(s,"propTypes",{...f.default.propTypes,axis:n.default.oneOf(["both","x","y","none"]),bounds:n.default.oneOfType([n.default.shape({left:n.default.number,right:n.default.number,top:n.default.number,bottom:n.default.number}),n.default.string,n.default.oneOf([!1])]),defaultClassName:n.default.string,defaultClassNameDragging:n.default.string,defaultClassNameDragged:n.default.string,defaultPosition:n.default.shape({x:n.default.number,y:n.default.number}),positionOffset:n.default.shape({x:n.default.oneOfType([n.default.number,n.default.string]),y:n.default.oneOfType([n.default.number,n.default.string])}),position:n.default.shape({x:n.default.number,y:n.default.number}),className:m.dontSetMe,style:m.dontSetMe,transform:m.dontSetMe}),P(s,"defaultProps",{...f.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})})(Xt)),Xt}var Pn;function ln(){if(Pn)return at.exports;Pn=1;const{default:e,DraggableCore:t}=Gr();return at.exports=e,at.exports.default=e,at.exports.DraggableCore=t,at.exports}var $r=ln(),lt={exports:{}},ut={},Et={},Cn;function Ur(){if(Cn)return Et;Cn=1,Et.__esModule=!0,Et.cloneElement=m;var e=t(dt());function t(f){return f&&f.__esModule?f:{default:f}}function n(f,y){var v=Object.keys(f);if(Object.getOwnPropertySymbols){var g=Object.getOwnPropertySymbols(f);y&&(g=g.filter(function(S){return Object.getOwnPropertyDescriptor(f,S).enumerable})),v.push.apply(v,g)}return v}function r(f){for(var y=1;y<arguments.length;y++){var v=arguments[y]!=null?arguments[y]:{};y%2?n(Object(v),!0).forEach(function(g){o(f,g,v[g])}):Object.getOwnPropertyDescriptors?Object.defineProperties(f,Object.getOwnPropertyDescriptors(v)):n(Object(v)).forEach(function(g){Object.defineProperty(f,g,Object.getOwnPropertyDescriptor(v,g))})}return f}function o(f,y,v){return(y=i(y))in f?Object.defineProperty(f,y,{value:v,enumerable:!0,configurable:!0,writable:!0}):f[y]=v,f}function i(f){var y=l(f,"string");return typeof y=="symbol"?y:y+""}function l(f,y){if(typeof f!="object"||!f)return f;var v=f[Symbol.toPrimitive];if(v!==void 0){var g=v.call(f,y);if(typeof g!="object")return g;throw new TypeError("@@toPrimitive must return a primitive value.")}return(y==="string"?String:Number)(f)}function m(f,y){return y.style&&f.props.style&&(y.style=r(r({},f.props.style),y.style)),y.className&&f.props.className&&(y.className=`${f.props.className} ${y.className}`),e.default.cloneElement(f,y)}return Et}var ct={},On;function Kn(){if(On)return ct;On=1,ct.__esModule=!0,ct.resizableProps=void 0;var e=t(Lt());ln();function t(n){return n&&n.__esModule?n:{default:n}}return ct.resizableProps={axis:e.default.oneOf(["both","x","y","none"]),className:e.default.string,children:e.default.element.isRequired,draggableOpts:e.default.shape({allowAnyClick:e.default.bool,cancel:e.default.string,children:e.default.node,disabled:e.default.bool,enableUserSelectHack:e.default.bool,offsetParent:typeof Element<"u"?e.default.instanceOf(Element):e.default.any,grid:e.default.arrayOf(e.default.number),handle:e.default.string,nodeRef:e.default.object,onStart:e.default.func,onDrag:e.default.func,onStop:e.default.func,onMouseDown:e.default.func,scale:e.default.number}),height:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];const[i]=r;return i.axis==="both"||i.axis==="y"?e.default.number.isRequired(...r):e.default.number(...r)},handle:e.default.oneOfType([e.default.node,e.default.func]),handleSize:e.default.arrayOf(e.default.number),lockAspectRatio:e.default.bool,maxConstraints:e.default.arrayOf(e.default.number),minConstraints:e.default.arrayOf(e.default.number),onResizeStop:e.default.func,onResizeStart:e.default.func,onResize:e.default.func,resizeHandles:e.default.arrayOf(e.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),transformScale:e.default.number,width:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];const[i]=r;return i.axis==="both"||i.axis==="x"?e.default.number.isRequired(...r):e.default.number(...r)}},ct}var zn;function Jn(){if(zn)return ut;zn=1,ut.__esModule=!0,ut.default=void 0;var e=i(dt()),t=ln(),n=Ur(),r=Kn();const o=["children","className","draggableOpts","width","height","handle","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"];function i(p,s){if(typeof WeakMap=="function")var a=new WeakMap,u=new WeakMap;return(i=function(h,w){if(!w&&h&&h.__esModule)return h;var D,b,c={__proto__:null,default:h};if(h===null||typeof h!="object"&&typeof h!="function")return c;if(D=w?u:a){if(D.has(h))return D.get(h);D.set(h,c)}for(const d in h)d!=="default"&&{}.hasOwnProperty.call(h,d)&&((b=(D=Object.defineProperty)&&Object.getOwnPropertyDescriptor(h,d))&&(b.get||b.set)?D(c,d,b):c[d]=h[d]);return c})(p,s)}function l(){return l=Object.assign?Object.assign.bind():function(p){for(var s=1;s<arguments.length;s++){var a=arguments[s];for(var u in a)({}).hasOwnProperty.call(a,u)&&(p[u]=a[u])}return p},l.apply(null,arguments)}function m(p,s){if(p==null)return{};var a,u,h=f(p,s);if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(p);for(u=0;u<w.length;u++)a=w[u],s.indexOf(a)===-1&&{}.propertyIsEnumerable.call(p,a)&&(h[a]=p[a])}return h}function f(p,s){if(p==null)return{};var a={};for(var u in p)if({}.hasOwnProperty.call(p,u)){if(s.indexOf(u)!==-1)continue;a[u]=p[u]}return a}function y(p,s){var a=Object.keys(p);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(p);s&&(u=u.filter(function(h){return Object.getOwnPropertyDescriptor(p,h).enumerable})),a.push.apply(a,u)}return a}function v(p){for(var s=1;s<arguments.length;s++){var a=arguments[s]!=null?arguments[s]:{};s%2?y(Object(a),!0).forEach(function(u){g(p,u,a[u])}):Object.getOwnPropertyDescriptors?Object.defineProperties(p,Object.getOwnPropertyDescriptors(a)):y(Object(a)).forEach(function(u){Object.defineProperty(p,u,Object.getOwnPropertyDescriptor(a,u))})}return p}function g(p,s,a){return(s=S(s))in p?Object.defineProperty(p,s,{value:a,enumerable:!0,configurable:!0,writable:!0}):p[s]=a,p}function S(p){var s=P(p,"string");return typeof s=="symbol"?s:s+""}function P(p,s){if(typeof p!="object"||!p)return p;var a=p[Symbol.toPrimitive];if(a!==void 0){var u=a.call(p,s);if(typeof u!="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return(s==="string"?String:Number)(p)}let C=class extends e.Component{constructor(){super(...arguments),this.handleRefs={},this.lastHandleRect=null,this.slack=null,this.lastSize=null}componentWillUnmount(){this.resetData()}resetData(){this.lastHandleRect=this.slack=this.lastSize=null}runConstraints(s,a){const{minConstraints:u,maxConstraints:h,lockAspectRatio:w}=this.props;if(!u&&!h&&!w)return[s,a];if(w){const R=this.props.width/this.props.height,M=s-this.props.width,E=a-this.props.height;Math.abs(M)>Math.abs(E*R)?a=s/R:s=a*R}const[D,b]=[s,a];let[c,d]=this.slack||[0,0];return s+=c,a+=d,u&&(s=Math.max(u[0],s),a=Math.max(u[1],a)),h&&(s=Math.min(h[0],s),a=Math.min(h[1],a)),this.slack=[c+(D-s),d+(b-a)],[s,a]}resizeHandler(s,a){return(u,h)=>{var Y;let{node:w,deltaX:D,deltaY:b}=h;s==="onResizeStart"&&this.resetData();const c=(this.props.axis==="both"||this.props.axis==="x")&&a!=="n"&&a!=="s",d=(this.props.axis==="both"||this.props.axis==="y")&&a!=="e"&&a!=="w";if(!c&&!d)return;const R=a[0],M=a[a.length-1],E=w.getBoundingClientRect();if(this.lastHandleRect!=null){if(M==="w"){const F=E.left-this.lastHandleRect.left;D+=F}if(R==="n"){const F=E.top-this.lastHandleRect.top;b+=F}}this.lastHandleRect=E,M==="w"&&(D=-D),R==="n"&&(b=-b);let T=this.props.width+(c?D/this.props.transformScale:0),z=this.props.height+(d?b/this.props.transformScale:0);[T,z]=this.runConstraints(T,z),s==="onResizeStop"&&this.lastSize&&({width:T,height:z}=this.lastSize);const j=T!==this.props.width||z!==this.props.height;s!=="onResizeStop"&&(this.lastSize={width:T,height:z});const B=typeof this.props[s]=="function"?this.props[s]:null;B&&!(s==="onResize"&&!j)&&((Y=u.persist)==null||Y.call(u),B(u,{node:w,size:{width:T,height:z},handle:a})),s==="onResizeStop"&&this.resetData()}}renderResizeHandle(s,a){const{handle:u}=this.props;if(!u)return e.createElement("span",{className:`react-resizable-handle react-resizable-handle-${s}`,ref:a});if(typeof u=="function")return u(s,a);const h=typeof u.type=="string",w=v({ref:a},h?{}:{handleAxis:s});return e.cloneElement(u,w)}render(){const s=this.props,{children:a,className:u,draggableOpts:h,width:w,height:D,handle:b,handleSize:c,lockAspectRatio:d,axis:R,minConstraints:M,maxConstraints:E,onResize:T,onResizeStop:z,onResizeStart:j,resizeHandles:B,transformScale:L}=s,Y=m(s,o);return(0,n.cloneElement)(a,v(v({},Y),{},{className:`${u?`${u} `:""}react-resizable`,children:[...e.Children.toArray(a.props.children),...B.map(F=>{const ie=this.handleRefs[F]??(this.handleRefs[F]=e.createRef());return e.createElement(t.DraggableCore,l({},h,{nodeRef:ie,key:`resizableHandle-${F}`,onStop:this.resizeHandler("onResizeStop",F),onStart:this.resizeHandler("onResizeStart",F),onDrag:this.resizeHandler("onResize",F)}),this.renderResizeHandle(F,ie))})]}))}};return ut.default=C,C.propTypes=r.resizableProps,C.defaultProps={axis:"both",handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1},ut}var ft={},En;function Vr(){if(En)return ft;En=1,ft.__esModule=!0,ft.default=void 0;var e=l(dt()),t=i(Lt()),n=i(Jn()),r=Kn();const o=["handle","handleSize","onResize","onResizeStart","onResizeStop","draggableOpts","minConstraints","maxConstraints","lockAspectRatio","axis","width","height","resizeHandles","style","transformScale"];function i(s){return s&&s.__esModule?s:{default:s}}function l(s,a){if(typeof WeakMap=="function")var u=new WeakMap,h=new WeakMap;return(l=function(w,D){if(!D&&w&&w.__esModule)return w;var b,c,d={__proto__:null,default:w};if(w===null||typeof w!="object"&&typeof w!="function")return d;if(b=D?h:u){if(b.has(w))return b.get(w);b.set(w,d)}for(const R in w)R!=="default"&&{}.hasOwnProperty.call(w,R)&&((c=(b=Object.defineProperty)&&Object.getOwnPropertyDescriptor(w,R))&&(c.get||c.set)?b(d,R,c):d[R]=w[R]);return d})(s,a)}function m(){return m=Object.assign?Object.assign.bind():function(s){for(var a=1;a<arguments.length;a++){var u=arguments[a];for(var h in u)({}).hasOwnProperty.call(u,h)&&(s[h]=u[h])}return s},m.apply(null,arguments)}function f(s,a){var u=Object.keys(s);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(s);a&&(h=h.filter(function(w){return Object.getOwnPropertyDescriptor(s,w).enumerable})),u.push.apply(u,h)}return u}function y(s){for(var a=1;a<arguments.length;a++){var u=arguments[a]!=null?arguments[a]:{};a%2?f(Object(u),!0).forEach(function(h){v(s,h,u[h])}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(u)):f(Object(u)).forEach(function(h){Object.defineProperty(s,h,Object.getOwnPropertyDescriptor(u,h))})}return s}function v(s,a,u){return(a=g(a))in s?Object.defineProperty(s,a,{value:u,enumerable:!0,configurable:!0,writable:!0}):s[a]=u,s}function g(s){var a=S(s,"string");return typeof a=="symbol"?a:a+""}function S(s,a){if(typeof s!="object"||!s)return s;var u=s[Symbol.toPrimitive];if(u!==void 0){var h=u.call(s,a);if(typeof h!="object")return h;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(s)}function P(s,a){if(s==null)return{};var u,h,w=C(s,a);if(Object.getOwnPropertySymbols){var D=Object.getOwnPropertySymbols(s);for(h=0;h<D.length;h++)u=D[h],a.indexOf(u)===-1&&{}.propertyIsEnumerable.call(s,u)&&(w[u]=s[u])}return w}function C(s,a){if(s==null)return{};var u={};for(var h in s)if({}.hasOwnProperty.call(s,h)){if(a.indexOf(h)!==-1)continue;u[h]=s[h]}return u}let p=class extends e.Component{constructor(){super(...arguments),this.state={width:this.props.width,height:this.props.height,propsWidth:this.props.width,propsHeight:this.props.height},this.onResize=(a,u)=>{var w;const{size:h}=u;this.props.onResize?((w=a.persist)==null||w.call(a),this.setState(h,()=>this.props.onResize&&this.props.onResize(a,u))):this.setState(h)}}static getDerivedStateFromProps(a,u){return u.propsWidth!==a.width||u.propsHeight!==a.height?{width:a.width,height:a.height,propsWidth:a.width,propsHeight:a.height}:null}render(){const a=this.props,{handle:u,handleSize:h,onResize:w,onResizeStart:D,onResizeStop:b,draggableOpts:c,minConstraints:d,maxConstraints:R,lockAspectRatio:M,axis:E,width:T,height:z,resizeHandles:j,style:B,transformScale:L}=a,Y=P(a,o);return e.createElement(n.default,{axis:E,draggableOpts:c,handle:u,handleSize:h,height:this.state.height,lockAspectRatio:M,maxConstraints:R,minConstraints:d,onResizeStart:D,onResize:this.onResize,onResizeStop:b,resizeHandles:j,transformScale:L,width:this.state.width},e.createElement("div",m({},Y,{style:y(y({},B),{},{width:this.state.width+"px",height:this.state.height+"px"})})))}};return ft.default=p,p.propTypes=y(y({},r.resizableProps),{},{children:t.default.element}),ft}var Mn;function Kr(){return Mn||(Mn=1,lt.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")},lt.exports.Resizable=Jn().default,lt.exports.ResizableBox=Vr().default),lt.exports}var Jr=Kr();function Zn(e){return function(n,r,o,i,l,m,f){return e(n,r,f)}}function Ht(e){return function(n,r,o,i){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,o,i);var l=i.get(n),m=i.get(r);if(l&&m)return l===r&&m===n;i.set(n,r),i.set(r,n);var f=e(n,r,o,i);return i.delete(n),i.delete(r),f}}function Qn(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n}function _n(e){return e.constructor===Object||e.constructor==null}function jn(e){return typeof e.then=="function"}function Wt(e,t){return e===t||e!==e&&t!==t}var Zr="[object Arguments]",Qr="[object Boolean]",eo="[object Date]",to="[object RegExp]",no="[object Map]",ro="[object Number]",oo="[object Object]",so="[object Set]",ao="[object String]",kn=Object.prototype.toString;function qt(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areMapsEqual,o=e.areObjectsEqual,i=e.areRegExpsEqual,l=e.areSetsEqual,m=e.createIsNestedEqual,f=m(y);function y(v,g,S){if(v===g)return!0;if(!v||!g||typeof v!="object"||typeof g!="object")return v!==v&&g!==g;if(_n(v)&&_n(g))return o(v,g,f,S);var P=Array.isArray(v),C=Array.isArray(g);if(P||C)return P===C&&t(v,g,f,S);var p=kn.call(v);return p!==kn.call(g)?!1:p===eo?n(v,g,f,S):p===to?i(v,g,f,S):p===no?r(v,g,f,S):p===so?l(v,g,f,S):p===oo||p===Zr?jn(v)||jn(g)?!1:o(v,g,f,S):p===Qr||p===ro||p===ao?Wt(v.valueOf(),g.valueOf()):!1}return y}function er(e,t,n,r){var o=e.length;if(t.length!==o)return!1;for(;o-- >0;)if(!n(e[o],t[o],o,o,e,t,r))return!1;return!0}var io=Ht(er);function tr(e,t){return Wt(e.valueOf(),t.valueOf())}function nr(e,t,n,r){var o=e.size===t.size;if(!o)return!1;if(!e.size)return!0;var i={},l=0;return e.forEach(function(m,f){if(o){var y=!1,v=0;t.forEach(function(g,S){!y&&!i[v]&&(y=n(f,S,l,v,e,t,r)&&n(m,g,f,S,e,t,r))&&(i[v]=!0),v++}),l++,o=y}}),o}var lo=Ht(nr),uo="_owner",co=Object.prototype.hasOwnProperty;function rr(e,t,n,r){var o=Object.keys(e),i=o.length;if(Object.keys(t).length!==i)return!1;for(var l;i-- >0;){if(l=o[i],l===uo){var m=!!e.$$typeof,f=!!t.$$typeof;if((m||f)&&m!==f)return!1}if(!co.call(t,l)||!n(e[l],t[l],l,l,e,t,r))return!1}return!0}var fo=Ht(rr);function or(e,t){return e.source===t.source&&e.flags===t.flags}function sr(e,t,n,r){var o=e.size===t.size;if(!o)return!1;if(!e.size)return!0;var i={};return e.forEach(function(l,m){if(o){var f=!1,y=0;t.forEach(function(v,g){!f&&!i[y]&&(f=n(l,v,m,g,e,t,r))&&(i[y]=!0),y++}),o=f}}),o}var po=Ht(sr),ar=Object.freeze({areArraysEqual:er,areDatesEqual:tr,areMapsEqual:nr,areObjectsEqual:rr,areRegExpsEqual:or,areSetsEqual:sr,createIsNestedEqual:Zn}),ir=Object.freeze({areArraysEqual:io,areDatesEqual:tr,areMapsEqual:lo,areObjectsEqual:fo,areRegExpsEqual:or,areSetsEqual:po,createIsNestedEqual:Zn}),ho=qt(ar);function He(e,t){return ho(e,t,void 0)}qt(Qn(ar,{createIsNestedEqual:function(){return Wt}}));qt(ir);qt(Qn(ir,{createIsNestedEqual:function(){return Wt}}));function Tn(e){const{children:t,cols:n,containerWidth:r,margin:o,containerPadding:i,rowHeight:l,maxRows:m,isDraggable:f,isResizable:y,isBounded:v,static:g,useCSSTransforms:S=!0,usePercentages:P=!1,transformScale:C=1,positionStrategy:p,dragThreshold:s=0,droppingPosition:a,className:u="",style:h,handle:w="",cancel:D="",x:b,y:c,w:d,h:R,minW:M=1,maxW:E=1/0,minH:T=1,maxH:z=1/0,i:j,resizeHandles:B,resizeHandle:L,constraints:Y=_t,layoutItem:F,layout:ie=[],onDragStart:Q,onDrag:he,onDragStop:be,onResizeStart:Oe,onResize:Re,onResizeStop:we}=e,[U,te]=x.useState(!1),[le,W]=x.useState(!1),oe=x.useRef(null),N=x.useRef({left:0,top:0}),ue=x.useRef({top:0,left:0,width:0,height:0}),ce=x.useRef(void 0),We=x.useRef(ie);We.current=ie;const Se=x.useRef(null),re=x.useRef(null),ye=x.useRef(!1),Qe=x.useRef({x:0,y:0}),J=x.useRef(!1),$=x.useMemo(()=>({cols:n,containerPadding:i,containerWidth:r,margin:o,maxRows:m,rowHeight:l}),[n,i,r,o,m,l]),ve=x.useMemo(()=>({cols:n,maxRows:m,containerWidth:r,containerHeight:0,rowHeight:l,margin:o,layout:[]}),[n,m,r,l,o]),fe=x.useCallback(()=>({...ve,layout:We.current}),[ve]),ze=x.useMemo(()=>F??{i:j,x:b,y:c,w:d,h:R,minW:M,maxW:E,minH:T,maxH:z},[F,j,b,c,d,R,M,E,T,z]),ht=x.useCallback(I=>{if(p!=null&&p.calcStyle)return p.calcStyle(I);if(S)return Qt(I);const A=In(I);return P?{...A,left:fn(I.left/r),width:fn(I.width/r)}:A},[p,S,P,r]),Me=x.useCallback((I,{node:A})=>{if(!Q)return;const{offsetParent:ee}=A;if(!ee)return;const G=ee.getBoundingClientRect(),se=A.getBoundingClientRect(),de=se.left/C,ge=G.left/C,pe=se.top/C,De=G.top/C;let Pe;if(p!=null&&p.calcDragPosition){const k=I;Pe=p.calcDragPosition(k.clientX,k.clientY,k.clientX-se.left,k.clientY-se.top)}else Pe={left:de-ge+ee.scrollLeft,top:pe-De+ee.scrollTop};if(N.current=Pe,s>0){const k=I;Qe.current={x:k.clientX,y:k.clientY},ye.current=!0,J.current=!1,te(!0);return}te(!0);const Be=Dt($,Pe.top,Pe.left),{x:Ye,y:O}=Pt(Y,ze,Be.x,Be.y,fe());Q(j,Ye,O,{e:I,node:A,newPosition:Pe})},[Q,C,$,p,s,Y,ze,fe,j]),et=x.useCallback((I,{node:A,deltaX:ee,deltaY:G})=>{if(!he||!U)return;const se=I;if(ye.current&&!J.current){const Ye=se.clientX-Qe.current.x,O=se.clientY-Qe.current.y;if(Math.hypot(Ye,O)<s)return;if(J.current=!0,ye.current=!1,Q){const _=Dt($,N.current.top,N.current.left),{x:H,y:X}=Pt(Y,ze,_.x,_.y,fe());Q(j,H,X,{e:I,node:A,newPosition:N.current})}}let de=N.current.top+G,ge=N.current.left+ee;if(v){const{offsetParent:Ye}=A;if(Ye){const O=Ye.clientHeight-ke(R,l,o[1]);de=Mt(de,0,O);const k=Je($),_=r-ke(d,k,o[0]);ge=Mt(ge,0,_)}}const pe={top:de,left:ge};N.current=pe;const De=Dt($,de,ge),{x:Pe,y:Be}=Pt(Y,ze,De.x,De.y,fe());he(j,Pe,Be,{e:I,node:A,newPosition:pe})},[he,Q,U,s,v,R,l,o,$,r,d,j,Y,ze,fe]),qe=x.useCallback((I,{node:A})=>{if(!be||!U)return;const ee=ye.current;if(ye.current=!1,J.current=!1,Qe.current={x:0,y:0},ee){te(!1),N.current={left:0,top:0};return}const{left:G,top:se}=N.current,de={top:se,left:G};te(!1),N.current={left:0,top:0};const ge=Dt($,se,G),{x:pe,y:De}=Pt(Y,ze,ge.x,ge.y,fe());be(j,pe,De,{e:I,node:A,newPosition:de})},[be,U,$,Y,ze,fe,j]);Se.current=Me,re.current=et;const Ee=x.useCallback((I,{node:A,size:ee,handle:G},se,de)=>{const ge=de==="onResizeStart"?Oe:de==="onResize"?Re:we;if(!ge)return;let pe;A?pe=Mr(G,se,ee,r):pe={...ee,top:se.top,left:se.left},ue.current=pe;const De=gr($,pe.width,pe.height),{w:Pe,h:Be}=xr(Y,ze,De.w,De.h,G,fe());ge(j,Pe,Be,{e:I.nativeEvent,node:A,size:pe,handle:G})},[Oe,Re,we,r,$,j,Y,ze,fe]),tt=x.useCallback((I,A)=>{W(!0);const ee=Rt($,b,c,d,R),G={...A,handle:A.handle};Ee(I,G,ee,"onResizeStart")},[Ee,$,b,c,d,R]),nt=x.useCallback((I,A)=>{const ee=Rt($,b,c,d,R),G={...A,handle:A.handle};Ee(I,G,ee,"onResize")},[Ee,$,b,c,d,R]),Ie=x.useCallback((I,A)=>{W(!1),ue.current={top:0,left:0,width:0,height:0};const ee=Rt($,b,c,d,R),G={...A,handle:A.handle};Ee(I,G,ee,"onResizeStop")},[Ee,$,b,c,d,R]);x.useEffect(()=>{var G,se;if(!a)return;const I=oe.current;if(!I)return;const A=ce.current||{left:0,top:0},ee=U&&(a.left!==A.left||a.top!==A.top);if(U){if(ee){const de=a.left-N.current.left,ge=a.top-N.current.top,pe={node:I,deltaX:de,deltaY:ge,lastX:N.current.left,lastY:N.current.top,x:a.left,y:a.top};(se=re.current)==null||se.call(re,a.e,pe)}}else{const de={node:I,deltaX:a.left,deltaY:a.top,lastX:0,lastY:0,x:a.left,y:a.top};(G=Se.current)==null||G.call(Se,a.e,de)}ce.current=a},[a,U,j]);const _e=Rt($,b,c,d,R,U?N.current:null,le?ue.current:null),rt=Te.Children.only(t),ot=Je($),gt=[ke(M,ot,o[0]),ke(T,l,o[1])],mt=[ke(E,ot,o[0]),ke(z,l,o[1])],xe=rt.props,It=xe.className,yt=xe.style;let Ae=Te.cloneElement(rt,{ref:oe,className:Kt("react-grid-item",It,u,{static:g,resizing:le,"react-draggable":f,"react-draggable-dragging":U,dropping:!!a,cssTransforms:S}),style:{...h,...yt,...ht(_e)}});const vt=L;return Ae=Ce.jsx(Jr.Resizable,{draggableOpts:{disabled:!y},className:y?void 0:"react-resizable-hide",width:_e.width,height:_e.height,minConstraints:gt,maxConstraints:mt,onResizeStart:tt,onResize:nt,onResizeStop:Ie,transformScale:C,resizeHandles:B,handle:vt,children:Ae}),Ae=Ce.jsx($r.DraggableCore,{disabled:!f,onStart:Me,onDrag:et,onStop:qe,handle:w,cancel:".react-resizable-handle"+(D?","+D:""),scale:C,nodeRef:oe,children:Ae}),Ae}var Ne=()=>{},Ln="react-grid-layout",lr=!1;try{lr=/firefox/i.test(navigator.userAgent)}catch{}function go(e,t){const n=Te.Children.toArray(e),r=Te.Children.toArray(t);if(n.length!==r.length)return!1;for(let o=0;o<n.length;o++){const i=n[o],l=r[o];if((i==null?void 0:i.key)!==(l==null?void 0:l.key))return!1}return!0}function Nn(e,t,n,r){const o=[],i=new Set;Te.Children.forEach(t,m=>{if(!Te.isValidElement(m)||m.key===null)return;const f=String(m.key);i.add(f);const y=e.find(v=>v.i===f);if(y)o.push(Ze(y));else{const g=m.props["data-grid"];g?o.push({i:f,x:g.x??0,y:g.y??0,w:g.w??1,h:g.h??1,minW:g.minW,maxW:g.maxW,minH:g.minH,maxH:g.maxH,static:g.static,isDraggable:g.isDraggable,isResizable:g.isResizable,resizeHandles:g.resizeHandles,isBounded:g.isBounded}):o.push({i:f,x:0,y:kt(o),w:1,h:1})}});const l=Zt(o,{cols:n});return r.compact(l,n)}function ur(e){const{children:t,width:n,gridConfig:r,dragConfig:o,resizeConfig:i,dropConfig:l,positionStrategy:m=_r,compactor:f,constraints:y=_t,layout:v=[],droppingItem:g,autoSize:S=!0,className:P="",style:C={},innerRef:p,onLayoutChange:s=Ne,onDragStart:a=Ne,onDrag:u=Ne,onDragStop:h=Ne,onResizeStart:w=Ne,onResize:D=Ne,onResizeStop:b=Ne,onDrop:c=Ne,onDropDragOver:d=Ne}=e,R=x.useMemo(()=>({...jr,...r}),[r]),M=x.useMemo(()=>({...kr,...o}),[o]),E=x.useMemo(()=>({...Tr,...i}),[i]),T=x.useMemo(()=>({...Lr,...l}),[l]),{cols:z,rowHeight:j,maxRows:B,margin:L,containerPadding:Y}=R,{enabled:F,bounded:ie,handle:Q,cancel:he,threshold:be}=M,{enabled:Oe,handles:Re,handleComponent:we}=E,{enabled:U,defaultItem:te,onDragOver:le}=T,W=f??pt("vertical"),oe=W.type,N=W.allowOverlap,ue=W.preventCollision??!1,ce=x.useMemo(()=>g??{i:"__dropping-elem__",...te},[g,te]),We=m.type==="transform",Se=m.scale,re=Y??L,[ye,Qe]=x.useState(!1),[J,$]=x.useState(()=>Nn(v,t,z,W)),[ve,fe]=x.useState(null),[ze,ht]=x.useState(!1),[Me,et]=x.useState(null),[qe,Ee]=x.useState(),tt=x.useRef(null),nt=x.useRef(null),Ie=x.useRef(null),_e=x.useRef(0),rt=x.useRef(J),ot=x.useRef(v),gt=x.useRef(t),mt=x.useRef(oe),xe=x.useRef(J);xe.current=J,x.useEffect(()=>{Qe(!0),He(J,v)||s(J)},[]),x.useEffect(()=>{if(ve||Me)return;const O=!He(v,ot.current),k=!go(t,gt.current),_=oe!==mt.current;if(O||k||_){const X=Nn(O?v:J,t,z,W);He(X,J)||$(X)}ot.current=v,gt.current=t,mt.current=oe},[v,t,z,oe,W,ve,Me,J]),x.useEffect(()=>{if(!ve&&!He(J,rt.current)){rt.current=J;const O=J.filter(k=>k.i!==ce.i);s(O)}},[J,ve,s,ce.i]);const It=x.useMemo(()=>{if(!S)return;const O=kt(J),k=re[1];return O*j+(O-1)*L[1]+k*2+"px"},[S,J,j,L,re]),yt=x.useCallback((O,k,_,H)=>{const X=xe.current,q=Ue(X,O);if(!q)return;const V={w:q.w,h:q.h,x:q.x,y:q.y,i:O};tt.current=Ze(q),Ie.current=X,fe(V),a(X,q,q,null,H.e,H.node)},[a]),Ae=x.useCallback((O,k,_,H)=>{const X=xe.current,q=tt.current,V=Ue(X,O);if(!V)return;const ae={w:V.w,h:V.h,x:V.x,y:V.y,i:O},K=Ve(X,V,k,_,!0,ue,oe,z,N);u(K,q,V,ae,H.e,H.node),$(W.compact(K,z)),fe(ae)},[ue,oe,z,N,W,u]),vt=x.useCallback((O,k,_,H)=>{if(!ve)return;const X=xe.current,q=tt.current,V=Ue(X,O);if(!V)return;const ae=Ve(X,V,k,_,!0,ue,oe,z,N),K=W.compact(ae,z);h(K,q,V,null,H.e,H.node);const me=Ie.current;tt.current=null,Ie.current=null,fe(null),$(K),me&&!He(me,K)&&s(K)},[ve,ue,oe,z,N,W,h,s]),I=x.useCallback((O,k,_,H)=>{const X=xe.current,q=Ue(X,O);q&&(nt.current=Ze(q),Ie.current=X,ht(!0),w(X,q,q,null,H.e,H.node))},[w]),A=x.useCallback((O,k,_,H)=>{const X=xe.current,q=nt.current,{handle:V}=H;let ae=!1,K,me;const[bt,Le]=vr(X,O,Z=>(K=Z.x,me=Z.y,["sw","w","nw","n","ne"].includes(V)&&(["sw","nw","w"].includes(V)&&(K=Z.x+(Z.w-k),k=Z.x!==K&&K<0?Z.w:k,K=K<0?0:K),["ne","n","nw"].includes(V)&&(me=Z.y+(Z.h-_),_=Z.y!==me&&me<0?Z.h:_,me=me<0?0:me),ae=!0),ue&&!N&&Wn(X,{...Z,w:k,h:_,x:K??Z.x,y:me??Z.y}).filter(St=>St.i!==Z.i).length>0&&(me=Z.y,_=Z.h,K=Z.x,k=Z.w,ae=!1),Z.w=k,Z.h=_,Z));if(!Le)return;let st=bt;ae&&K!==void 0&&me!==void 0&&(st=Ve(bt,Le,K,me,!0,ue,oe,z,N));const wt={w:Le.w,h:Le.h,x:Le.x,y:Le.y,i:O,static:!0};D(st,q,Le,wt,H.e,H.node),$(W.compact(st,z)),fe(wt)},[ue,oe,z,N,W,D]),ee=x.useCallback((O,k,_,H)=>{const X=xe.current,q=nt.current,V=Ue(X,O),ae=W.compact(X,z);b(ae,q,V??null,null,H.e,H.node);const K=Ie.current;nt.current=null,Ie.current=null,fe(null),ht(!1),$(ae),K&&!He(K,ae)&&s(ae)},[z,W,b,s]),G=x.useCallback(()=>{const O=xe.current;if(!O.some(H=>H.i===ce.i)){et(null),fe(null),Ee(void 0);return}const _=W.compact(O.filter(H=>H.i!==ce.i),z);$(_),et(null),fe(null),Ee(void 0)},[ce.i,z,W]),se=x.useCallback(O=>{var un;if(O.preventDefault(),O.stopPropagation(),lr&&!((un=O.nativeEvent.target)!=null&&un.classList.contains(Ln)))return!1;const k=le?le(O.nativeEvent):d(O);if(k===!1)return Me&&G(),!1;const{dragOffsetX:_=0,dragOffsetY:H=0,...X}=k??{},q={...ce,...X},V=O.currentTarget.getBoundingClientRect(),ae={cols:z,margin:L,maxRows:B,rowHeight:j,containerWidth:n,containerPadding:re},K=Je(ae),me=ke(q.w,K,L[0]),bt=ke(q.h,j,L[1]),Le=me/2,st=bt/2,wt=O.clientX-V.left+_-Le,Z=O.clientY-V.top+H-st,At=Math.max(0,wt),St=Math.max(0,Z),xt={left:At/Se,top:St/Se,e:O.nativeEvent};if(Me)qe&&(qe.left!==xt.left||qe.top!==xt.top)&&Ee(xt);else{const Bt=hr(ae,St,At,q.w,q.h);et(Ce.jsx("div",{},q.i)),Ee(xt);const dr=xe.current.filter(pr=>pr.i!==q.i);$([...dr,{...q,x:Bt.x,y:Bt.y,static:!1,isDraggable:!0}])}},[Me,qe,ce,le,d,G,Se,z,L,B,j,n,re]),de=x.useCallback(O=>{O.preventDefault(),O.stopPropagation(),_e.current--,_e.current<0&&(_e.current=0),_e.current===0&&G()},[G]),ge=x.useCallback(O=>{O.preventDefault(),O.stopPropagation(),_e.current++},[]),pe=x.useCallback(O=>{O.preventDefault(),O.stopPropagation();const k=xe.current,_=k.find(H=>H.i===ce.i);_e.current=0,G(),c(k,_,O.nativeEvent)},[ce.i,G,c]),De=x.useCallback((O,k)=>{if(!O||!O.key)return null;const _=Ue(J,String(O.key));if(!_)return null;const H=typeof _.isDraggable=="boolean"?_.isDraggable:!_.static&&F,X=typeof _.isResizable=="boolean"?_.isResizable:!_.static&&Oe,q=_.resizeHandles||[...Re],V=H&&ie&&_.isBounded!==!1,ae=we;return Ce.jsx(Tn,{containerWidth:n,cols:z,margin:L,containerPadding:re,maxRows:B,rowHeight:j,cancel:he,handle:Q,onDragStart:yt,onDrag:Ae,onDragStop:vt,onResizeStart:I,onResize:A,onResizeStop:ee,isDraggable:H,isResizable:X,isBounded:V,useCSSTransforms:We&&ye,usePercentages:!ye,transformScale:Se,positionStrategy:m,dragThreshold:be,w:_.w,h:_.h,x:_.x,y:_.y,i:_.i,minH:_.minH,minW:_.minW,maxH:_.maxH,maxW:_.maxW,static:_.static,droppingPosition:k?qe:void 0,resizeHandles:q,resizeHandle:ae,constraints:y,layoutItem:_,layout:J,children:O},_.i)},[J,n,z,L,re,B,j,he,Q,yt,Ae,vt,I,A,ee,F,Oe,ie,We,ye,Se,m,be,qe,Re,we,y]),Pe=()=>ve?Ce.jsx(Tn,{w:ve.w,h:ve.h,x:ve.x,y:ve.y,i:ve.i,className:`react-grid-placeholder ${ze?"placeholder-resizing":""}`,containerWidth:n,cols:z,margin:L,containerPadding:re,maxRows:B,rowHeight:j,isDraggable:!1,isResizable:!1,isBounded:!1,useCSSTransforms:We,transformScale:Se,constraints:y,layout:J,children:Ce.jsx("div",{})}):null,Be=Kt(Ln,P),Ye={height:It,...C};return Ce.jsxs("div",{ref:p,className:Be,style:Ye,onDrop:U?pe:void 0,onDragLeave:U?de:void 0,onDragEnter:U?ge:void 0,onDragOver:U?se:void 0,children:[Te.Children.map(t,O=>Te.isValidElement(O)?De(O):null),U&&Me&&De(Me,!0),Pe()]})}var mo={lg:1200,md:996,sm:768,xs:480,xxs:0},yo={lg:12,md:10,sm:6,xs:4,xxs:2},Ut=()=>{};function vo(e,t,n,r){const o=[];Te.Children.forEach(t,l=>{if(!Te.isValidElement(l)||l.key===null)return;const m=String(l.key),f=e.find(y=>y.i===m);if(f)o.push({...f,i:m});else{const v=l.props["data-grid"];v?o.push({i:m,x:v.x??0,y:v.y??0,w:v.w??1,h:v.h??1,minW:v.minW,maxW:v.maxW,minH:v.minH,maxH:v.maxH,static:v.static,isDraggable:v.isDraggable,isResizable:v.isResizable,resizeHandles:v.resizeHandles,isBounded:v.isBounded}):o.push({i:m,x:0,y:kt(o),w:1,h:1})}});const i=Zt(o,{cols:n});return r.compact(i,n)}function bo(e){const{children:t,width:n,breakpoint:r,breakpoints:o=mo,cols:i=yo,layouts:l={},rowHeight:m=150,maxRows:f=1/0,margin:y=[10,10],containerPadding:v=null,compactor:g,onBreakpointChange:S=Ut,onLayoutChange:P=Ut,onWidthChange:C=Ut,...p}=e,s=g??pt("vertical"),a=s.type,u=s.allowOverlap,h=x.useMemo(()=>r??dn(o,n),[]),w=x.useMemo(()=>pn(h,i),[h,i]),D=x.useMemo(()=>Yt(l,o,h,h,w,a),[]),[b,c]=x.useState(h),[d,R]=x.useState(w),[M,E]=x.useState(D),[T,z]=x.useState(l),j=x.useRef(n),B=x.useRef(r),L=x.useRef(o),Y=x.useRef(i),F=x.useRef(l),ie=x.useRef(a),Q=x.useRef(T);x.useEffect(()=>{Q.current=T},[T]);const he=x.useMemo(()=>He(l,F.current)?null:Yt(l,o,b,b,d,s),[l,o,b,d,s]),be=he??M;x.useEffect(()=>{he!==null&&(E(he),z(l),Q.current=l,F.current=l)},[he,l]),x.useEffect(()=>{if(a!==ie.current){const te=s.compact($e(be),d),le={...Q.current,[b]:te};E(te),z(le),Q.current=le,P(te,le),ie.current=a}},[a,s,be,d,u,b,P]),x.useEffect(()=>{const te=n!==j.current,le=r!==B.current,W=!He(o,L.current),oe=!He(i,Y.current);if(te||le||W||oe){const N=r??dn(o,n),ue=pn(N,i),ce=b;if(ce!==N||W||oe){const re={...Q.current};re[ce]||(re[ce]=$e(M));let ye=Yt(re,o,N,ce,ue,s);ye=vo(ye,t,ue,s),re[N]=ye,c(N),R(ue),E(ye),z(re),Q.current=re,S(N,ue),P(ye,re)}const We=Ct(y,N),Se=v?Ct(v,N):null;C(n,We,ue,Se),j.current=n,B.current=r,L.current=o,Y.current=i}},[n,r,o,i,b,d,M,t,s,a,u,y,v,S,P,C]);const Oe=x.useCallback(te=>{const W={...Q.current,[b]:te};E(te),z(W),Q.current=W,P(te,W)},[b,P]),Re=x.useMemo(()=>Ct(y,b),[y,b]),we=x.useMemo(()=>v===null?null:Ct(v,b),[v,b]),U=x.useMemo(()=>({cols:d,rowHeight:m,maxRows:f,margin:Re,containerPadding:we}),[d,m,f,Re,we]);return Ce.jsx(ur,{...p,width:n,gridConfig:U,compactor:s,onLayoutChange:Oe,layout:be,children:t})}function cr(e){const{children:t,width:n,cols:r=12,rowHeight:o=150,maxRows:i=1/0,margin:l=[10,10],containerPadding:m=null,layout:f,droppingItem:y,compactType:v,preventCollision:g=!1,allowOverlap:S=!1,verticalCompact:P,isDraggable:C=!0,isBounded:p=!1,draggableHandle:s,draggableCancel:a,isResizable:u=!0,resizeHandles:h=["se"],resizeHandle:w,isDroppable:D=!1,useCSSTransforms:b=!0,transformScale:c=1,autoSize:d,className:R,style:M,innerRef:E,onLayoutChange:T,onDragStart:z,onDrag:j,onDragStop:B,onResizeStart:L,onResize:Y,onResizeStop:F,onDrop:ie,onDropDragOver:Q}=e;let he=v===void 0?"vertical":v;P===!1&&(he=null);const be={cols:r,rowHeight:o,maxRows:i,margin:l,containerPadding:m},Oe={enabled:C,bounded:p,handle:s,cancel:a,threshold:0},Re={enabled:u,handles:h,handleComponent:w},we={enabled:D};let U;b?c!==1?U=Yn(c):U=on:U=Bn;const te=pt(he,S,g),le=p?[..._t,Sr]:_t;return Ce.jsx(ur,{width:n,gridConfig:be,dragConfig:Oe,resizeConfig:Re,dropConfig:we,positionStrategy:U,compactor:te,constraints:le,layout:f,droppingItem:y,autoSize:d,className:R,style:M,innerRef:E,onLayoutChange:T,onDragStart:z,onDrag:j,onDragStop:B,onResizeStart:L,onResize:Y,onResizeStop:F,onDrop:ie,onDropDragOver:Q,children:t})}cr.displayName="ReactGridLayout";var Po=cr;function fr(e){const{children:t,width:n,breakpoint:r,breakpoints:o,cols:i,layouts:l,onBreakpointChange:m,onLayoutChange:f,onWidthChange:y,rowHeight:v,maxRows:g,margin:S,containerPadding:P,droppingItem:C,compactType:p,preventCollision:s=!1,allowOverlap:a=!1,verticalCompact:u,isDraggable:h=!0,isBounded:w=!1,draggableHandle:D,draggableCancel:b,isResizable:c=!0,resizeHandles:d=["se"],resizeHandle:R,isDroppable:M=!1,useCSSTransforms:E=!0,transformScale:T=1,autoSize:z,className:j,style:B,innerRef:L,onDragStart:Y,onDrag:F,onDragStop:ie,onResizeStart:Q,onResize:he,onResizeStop:be,onDrop:Oe,onDropDragOver:Re}=e;let we=p===void 0?"vertical":p;u===!1&&(we=null);const U={enabled:h,bounded:w,handle:D,cancel:b},te={enabled:c,handles:d,handleComponent:R},le={enabled:M};let W;E?T!==1?W=Yn(T):W=on:W=Bn;const oe=pt(we,a,s);return Ce.jsx(bo,{width:n,breakpoint:r,breakpoints:o,cols:i,layouts:l,rowHeight:v,maxRows:g,margin:S,containerPadding:P,compactor:oe,dragConfig:U,resizeConfig:te,dropConfig:le,positionStrategy:W,droppingItem:C,autoSize:z,className:j,style:B,innerRef:L,onBreakpointChange:m,onLayoutChange:f,onWidthChange:y,onDragStart:Y,onDrag:F,onDragStop:ie,onResizeStart:Q,onResize:he,onResizeStop:be,onDrop:Oe,onDropDragOver:Re,children:t})}fr.displayName="ResponsiveReactGridLayout";var Co=fr,wo="react-grid-layout";function Oo(e){function t(n){const{measureBeforeMount:r=!1,className:o,style:i,...l}=n,[m,f]=x.useState(1280),[y,v]=x.useState(!1),g=x.useRef(null),S=x.useRef(null);return x.useEffect(()=>{v(!0)},[]),x.useEffect(()=>{const P=g.current;if(!(P instanceof HTMLElement))return;let C=null;const p=new ResizeObserver(s=>{if(s[0]){const a=s[0].contentRect.width;C!==null&&cancelAnimationFrame(C),C=requestAnimationFrame(()=>{f(a),C=null})}});return p.observe(P),S.current=p,()=>{C!==null&&cancelAnimationFrame(C),p.unobserve(P),p.disconnect()}},[y]),r&&!y?Ce.jsx("div",{className:Kt(o,wo),style:i,ref:g}):Ce.jsx(e,{innerRef:g,className:o,style:i,...l,width:m})}return t.displayName=`WidthProvider(${e.displayName||e.name||"Component"})`,t}export{cr as ReactGridLayout,Co as Responsive,fr as ResponsiveReactGridLayout,Oo as WidthProvider,Po as default};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{c as e}from"./index-NatBSFxj.js";/**
|
|
2
|
+
* @license lucide-react v0.513.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const t=[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]],o=e("pause",t);export{o as P};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{r as T,j as et}from"./index-NatBSFxj.js";const qe=T.createContext({});function Ze(t){const e=T.useRef(null);return e.current===null&&(e.current=t()),e.current}const Lo=typeof window<"u",Gs=Lo?T.useLayoutEffect:T.useEffect,ae=T.createContext(null);function Je(t,e){t.indexOf(e)===-1&&t.push(e)}function Qt(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const J=(t,e,n)=>n>e?e:n<t?t:n;let Qe=()=>{};const nt={},Hs=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function _s(t){return typeof t=="object"&&t!==null}const Xs=t=>/^0[^.\s]+$/u.test(t);function Ys(t){let e;return()=>(e===void 0&&(e=t()),e)}const z=t=>t,ko=(t,e)=>n=>e(t(n)),Ot=(...t)=>t.reduce(ko),kt=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s};class tn{constructor(){this.subscriptions=[]}add(e){return Je(this.subscriptions,e),()=>Qt(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let r=0;r<i;r++){const o=this.subscriptions[r];o&&o(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const W=t=>t*1e3,$=t=>t/1e3;function qs(t,e){return e?t*(1e3/e):0}const Zs=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Fo=1e-7,Io=12;function Bo(t,e,n,s,i){let r,o,a=0;do o=e+(n-e)/2,r=Zs(o,s,i)-t,r>0?n=o:e=o;while(Math.abs(r)>Fo&&++a<Io);return o}function jt(t,e,n,s){if(t===e&&n===s)return z;const i=r=>Bo(r,0,1,t,n);return r=>r===0||r===1?r:Zs(i(r),e,s)}const Js=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Qs=t=>e=>1-t(1-e),ti=jt(.33,1.53,.69,.99),en=Qs(ti),ei=Js(en),ni=t=>(t*=2)<1?.5*en(t):.5*(2-Math.pow(2,-10*(t-1))),nn=t=>1-Math.sin(Math.acos(t)),si=Qs(nn),ii=Js(nn),Oo=jt(.42,0,1,1),jo=jt(0,0,.58,1),oi=jt(.42,0,.58,1),No=t=>Array.isArray(t)&&typeof t[0]!="number",ri=t=>Array.isArray(t)&&typeof t[0]=="number",Uo={linear:z,easeIn:Oo,easeInOut:oi,easeOut:jo,circIn:nn,circInOut:ii,circOut:si,backIn:en,backInOut:ei,backOut:ti,anticipate:ni},Wo=t=>typeof t=="string",Mn=t=>{if(ri(t)){Qe(t.length===4);const[e,n,s,i]=t;return jt(e,n,s,i)}else if(Wo(t))return Uo[t];return t},Wt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Ko(t,e){let n=new Set,s=new Set,i=!1,r=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(c){o.has(c)&&(u.schedule(c),t()),c(a)}const u={schedule:(c,h=!1,f=!1)=>{const p=f&&i?n:s;return h&&o.add(c),p.has(c)||p.add(c),c},cancel:c=>{s.delete(c),o.delete(c)},process:c=>{if(a=c,i){r=!0;return}i=!0,[n,s]=[s,n],n.forEach(l),n.clear(),i=!1,r&&(r=!1,u.process(c))}};return u}const $o=40;function ai(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=Wt.reduce((v,S)=>(v[S]=Ko(r),v),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:h,preRender:f,render:d,postRender:p}=o,m=()=>{const v=nt.useManualTiming?i.timestamp:performance.now();n=!1,nt.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(v-i.timestamp,$o),1)),i.timestamp=v,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),h.process(i),f.process(i),d.process(i),p.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(m))},g=()=>{n=!0,s=!0,i.isProcessing||t(m)};return{schedule:Wt.reduce((v,S)=>{const P=o[S];return v[S]=(C,L=!1,A=!1)=>(n||g(),P.schedule(C,L,A)),v},{}),cancel:v=>{for(let S=0;S<Wt.length;S++)o[Wt[S]].cancel(v)},state:i,steps:o}}const{schedule:M,cancel:rt,state:O,steps:he}=ai(typeof requestAnimationFrame<"u"?requestAnimationFrame:z,!0);let Ht;function zo(){Ht=void 0}const N={now:()=>(Ht===void 0&&N.set(O.isProcessing||nt.useManualTiming?O.timestamp:performance.now()),Ht),set:t=>{Ht=t,queueMicrotask(zo)}},li=t=>e=>typeof e=="string"&&e.startsWith(t),ci=li("--"),Go=li("var(--"),sn=t=>Go(t)?Ho.test(t.split("/*")[0].trim()):!1,Ho=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Dn(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const bt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Ft={...bt,transform:t=>J(0,1,t)},Kt={...bt,default:1},Dt=t=>Math.round(t*1e5)/1e5,on=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function _o(t){return t==null}const Xo=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,rn=(t,e)=>n=>!!(typeof n=="string"&&Xo.test(n)&&n.startsWith(t)||e&&!_o(n)&&Object.prototype.hasOwnProperty.call(n,e)),ui=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,r,o,a]=s.match(on);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},Yo=t=>J(0,255,t),fe={...bt,transform:t=>Math.round(Yo(t))},ht={test:rn("rgb","red"),parse:ui("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+fe.transform(t)+", "+fe.transform(e)+", "+fe.transform(n)+", "+Dt(Ft.transform(s))+")"};function qo(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const Ce={test:rn("#"),parse:qo,transform:ht.transform},Nt=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),st=Nt("deg"),Z=Nt("%"),w=Nt("px"),Zo=Nt("vh"),Jo=Nt("vw"),En={...Z,parse:t=>Z.parse(t)/100,transform:t=>Z.transform(t*100)},gt={test:rn("hsl","hue"),parse:ui("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+Z.transform(Dt(e))+", "+Z.transform(Dt(n))+", "+Dt(Ft.transform(s))+")"},k={test:t=>ht.test(t)||Ce.test(t)||gt.test(t),parse:t=>ht.test(t)?ht.parse(t):gt.test(t)?gt.parse(t):Ce.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?ht.transform(t):gt.transform(t),getAnimatableNone:t=>{const e=k.parse(t);return e.alpha=0,k.transform(e)}},Qo=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function tr(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(on))==null?void 0:e.length)||0)+(((n=t.match(Qo))==null?void 0:n.length)||0)>0}const hi="number",fi="color",er="var",nr="var(",Rn="${}",sr=/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 St(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const a=e.replace(sr,l=>(k.test(l)?(s.color.push(r),i.push(fi),n.push(k.parse(l))):l.startsWith(nr)?(s.var.push(r),i.push(er),n.push(l)):(s.number.push(r),i.push(hi),n.push(parseFloat(l))),++r,Rn)).split(Rn);return{values:n,split:a,indexes:s,types:i}}function ir(t){return St(t).values}function di({split:t,types:e}){const n=t.length;return s=>{let i="";for(let r=0;r<n;r++)if(i+=t[r],s[r]!==void 0){const o=e[r];o===hi?i+=Dt(s[r]):o===fi?i+=k.transform(s[r]):i+=s[r]}return i}}function or(t){return di(St(t))}const rr=t=>typeof t=="number"?0:k.test(t)?k.getAnimatableNone(t):t,ar=(t,e)=>typeof t=="number"?e!=null&&e.trim().endsWith("/")?t:0:rr(t);function lr(t){const e=St(t);return di(e)(e.values.map((s,i)=>ar(s,e.split[i])))}const _={test:tr,parse:ir,createTransformer:or,getAnimatableNone:lr};function de(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function cr({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,r=0,o=0;if(!e)i=r=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=de(l,a,t+1/3),r=de(l,a,t),o=de(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:s}}function te(t,e){return n=>n>0?e:t}const E=(t,e,n)=>t+(e-t)*n,pe=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},ur=[Ce,ht,gt],hr=t=>ur.find(e=>e.test(t));function Ln(t){const e=hr(t);if(!e)return!1;let n=e.parse(t);return e===gt&&(n=cr(n)),n}const kn=(t,e)=>{const n=Ln(t),s=Ln(e);if(!n||!s)return te(t,e);const i={...n};return r=>(i.red=pe(n.red,s.red,r),i.green=pe(n.green,s.green,r),i.blue=pe(n.blue,s.blue,r),i.alpha=E(n.alpha,s.alpha,r),ht.transform(i))},Me=new Set(["none","hidden"]);function fr(t,e){return Me.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function dr(t,e){return n=>E(t,e,n)}function an(t){return typeof t=="number"?dr:typeof t=="string"?sn(t)?te:k.test(t)?kn:gr:Array.isArray(t)?pi:typeof t=="object"?k.test(t)?kn:pr:te}function pi(t,e){const n=[...t],s=n.length,i=t.map((r,o)=>an(r)(r,e[o]));return r=>{for(let o=0;o<s;o++)n[o]=i[o](r);return n}}function pr(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=an(t[i])(t[i],e[i]));return i=>{for(const r in s)n[r]=s[r](i);return n}}function mr(t,e){const n=[],s={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const r=e.types[i],o=t.indexes[r][s[r]],a=t.values[o]??0;n[i]=a,s[r]++}return n}const gr=(t,e)=>{const n=_.createTransformer(e),s=St(t),i=St(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?Me.has(t)&&!i.values.length||Me.has(e)&&!s.values.length?fr(t,e):Ot(pi(mr(s,i),i.values),n):te(t,e)};function mi(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?E(t,e,n):an(t)(t,e)}const yr=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>M.update(e,n),stop:()=>rt(e),now:()=>O.isProcessing?O.timestamp:N.now()}},gi=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let r=0;r<i;r++)s+=Math.round(t(r/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},ee=2e4;function ln(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<ee;)e+=n,s=t.next(e);return e>=ee?1/0:e}function vr(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(ln(s),ee);return{type:"keyframes",ease:r=>s.next(i*r).value/e,duration:$(i)}}const R={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function De(t,e){return t*Math.sqrt(1-e*e)}const xr=12;function Tr(t,e,n){let s=n;for(let i=1;i<xr;i++)s=s-t(s)/e(s);return s}const me=.001;function wr({duration:t=R.duration,bounce:e=R.bounce,velocity:n=R.velocity,mass:s=R.mass}){let i,r,o=1-e;o=J(R.minDamping,R.maxDamping,o),t=J(R.minDuration,R.maxDuration,$(t)),o<1?(i=u=>{const c=u*o,h=c*t,f=c-n,d=De(u,o),p=Math.exp(-h);return me-f/d*p},r=u=>{const h=u*o*t,f=h*n+n,d=Math.pow(o,2)*Math.pow(u,2)*t,p=Math.exp(-h),m=De(Math.pow(u,2),o);return(-i(u)+me>0?-1:1)*((f-d)*p)/m}):(i=u=>{const c=Math.exp(-u*t),h=(u-n)*t+1;return-me+c*h},r=u=>{const c=Math.exp(-u*t),h=(n-u)*(t*t);return c*h});const a=5/t,l=Tr(i,r,a);if(t=W(t),isNaN(l))return{stiffness:R.stiffness,damping:R.damping,duration:t};{const u=Math.pow(l,2)*s;return{stiffness:u,damping:o*2*Math.sqrt(s*u),duration:t}}}const Sr=["duration","bounce"],Pr=["stiffness","damping","mass"];function Fn(t,e){return e.some(n=>t[n]!==void 0)}function br(t){let e={velocity:R.velocity,stiffness:R.stiffness,damping:R.damping,mass:R.mass,isResolvedFromDuration:!1,...t};if(!Fn(t,Pr)&&Fn(t,Sr))if(e.velocity=0,t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,r=2*J(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:R.mass,stiffness:i,damping:r}}else{const n=wr({...t,velocity:0});e={...e,...n,mass:R.mass},e.isResolvedFromDuration=!0}return e}function ne(t=R.visualDuration,e=R.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:i}=n;const r=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:l,damping:u,mass:c,duration:h,velocity:f,isResolvedFromDuration:d}=br({...n,velocity:-$(n.velocity||0)}),p=f||0,m=u/(2*Math.sqrt(l*c)),g=o-r,y=$(Math.sqrt(l/c)),x=Math.abs(g)<5;s||(s=x?R.restSpeed.granular:R.restSpeed.default),i||(i=x?R.restDelta.granular:R.restDelta.default);let v,S,P,C,L,A;if(m<1)P=De(y,m),C=(p+m*y*g)/P,v=b=>{const D=Math.exp(-m*y*b);return o-D*(C*Math.sin(P*b)+g*Math.cos(P*b))},L=m*y*C+g*P,A=m*y*g-C*P,S=b=>Math.exp(-m*y*b)*(L*Math.sin(P*b)+A*Math.cos(P*b));else if(m===1){v=D=>o-Math.exp(-y*D)*(g+(p+y*g)*D);const b=p+y*g;S=D=>Math.exp(-y*D)*(y*b*D-p)}else{const b=y*Math.sqrt(m*m-1);v=X=>{const tt=Math.exp(-m*y*X),Y=Math.min(b*X,300);return o-tt*((p+m*y*g)*Math.sinh(Y)+b*g*Math.cosh(Y))/b};const D=(p+m*y*g)/b,I=m*y*D-g*b,Q=m*y*g-D*b;S=X=>{const tt=Math.exp(-m*y*X),Y=Math.min(b*X,300);return tt*(I*Math.sinh(Y)+Q*Math.cosh(Y))}}const V={calculatedDuration:d&&h||null,velocity:b=>W(S(b)),next:b=>{if(!d&&m<1){const I=Math.exp(-m*y*b),Q=Math.sin(P*b),X=Math.cos(P*b),tt=o-I*(C*Q+g*X),Y=W(I*(L*Q+A*X));return a.done=Math.abs(Y)<=s&&Math.abs(o-tt)<=i,a.value=a.done?o:tt,a}const D=v(b);if(d)a.done=b>=h;else{const I=W(S(b));a.done=Math.abs(I)<=s&&Math.abs(o-D)<=i}return a.value=a.done?o:D,a},toString:()=>{const b=Math.min(ln(V),ee),D=gi(I=>V.next(b*I).value,b,30);return b+"ms "+D},toTransition:()=>{}};return V}ne.applyToOptions=t=>{const e=vr(t,100,ne);return t.ease=e.ease,t.duration=W(e.duration),t.type="keyframes",t};const Ar=5;function yi(t,e,n){const s=Math.max(e-Ar,0);return qs(n-t(s),e-s)}function Ee({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const h=t[0],f={done:!1,value:h},d=A=>a!==void 0&&A<a||l!==void 0&&A>l,p=A=>a===void 0?l:l===void 0||Math.abs(a-A)<Math.abs(l-A)?a:l;let m=n*e;const g=h+m,y=o===void 0?g:o(g);y!==g&&(m=y-h);const x=A=>-m*Math.exp(-A/s),v=A=>y+x(A),S=A=>{const V=x(A),b=v(A);f.done=Math.abs(V)<=u,f.value=f.done?y:b};let P,C;const L=A=>{d(f.value)&&(P=A,C=ne({keyframes:[f.value,p(f.value)],velocity:yi(v,A,f.value),damping:i,stiffness:r,restDelta:u,restSpeed:c}))};return L(0),{calculatedDuration:null,next:A=>{let V=!1;return!C&&P===void 0&&(V=!0,S(A),L(A)),P!==void 0&&A>=P?C.next(A-P):(!V&&S(A),f)}}}function Vr(t,e,n){const s=[],i=n||nt.mix||mi,r=t.length-1;for(let o=0;o<r;o++){let a=i(t[o],t[o+1]);if(e){const l=Array.isArray(e)?e[o]||z:e;a=Ot(l,a)}s.push(a)}return s}function Cr(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const r=t.length;if(Qe(r===e.length),r===1)return()=>e[0];if(r===2&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[r-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=Vr(e,s,i),l=a.length,u=c=>{if(o&&c<t[0])return e[0];let h=0;if(l>1)for(;h<t.length-2&&!(c<t[h+1]);h++);const f=kt(t[h],t[h+1],c);return a[h](f)};return n?c=>u(J(t[0],t[r-1],c)):u}function Mr(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=kt(0,e,s);t.push(E(n,1,i))}}function Dr(t){const e=[0];return Mr(e,t.length-1),e}function Er(t,e){return t.map(n=>n*e)}function Rr(t,e){return t.map(()=>e||oi).splice(0,t.length-1)}function Et({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=No(s)?s.map(Mn):Mn(s),r={done:!1,value:e[0]},o=Er(n&&n.length===e.length?n:Dr(e),t),a=Cr(o,e,{ease:Array.isArray(i)?i:Rr(e,i)});return{calculatedDuration:t,next:l=>(r.value=a(l),r.done=l>=t,r)}}const Lr=t=>t!==null;function cn(t,{repeat:e,repeatType:n="loop"},s,i=1){const r=t.filter(Lr),a=i<0||e&&n!=="loop"&&e%2===1?0:r.length-1;return!a||s===void 0?r[a]:s}const kr={decay:Ee,inertia:Ee,tween:Et,keyframes:Et,spring:ne};function vi(t){typeof t.type=="string"&&(t.type=kr[t.type])}class un{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const Fr=t=>t/100;class hn extends un{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var s,i;const{motionValue:n}=this.options;n&&n.updatedAt!==N.now()&&this.tick(N.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(s=this.options).onStop)==null||i.call(s))},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;vi(e);const{type:n=Et,repeat:s=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=e;let{keyframes:a}=e;const l=n||Et;l!==Et&&typeof a[0]!="number"&&(this.mixKeyframes=Ot(Fr,mi(a[0],a[1])),a=[0,100]);const u=l({...e,keyframes:a});r==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=ln(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=u}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:s,totalDuration:i,mixKeyframes:r,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return s.next(0);const{delay:u=0,keyframes:c,repeat:h,repeatType:f,repeatDelay:d,type:p,onUpdate:m,finalKeyframe:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const y=this.currentTime-u*(this.playbackSpeed>=0?1:-1),x=this.playbackSpeed>=0?y<0:y>i;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let v=this.currentTime,S=s;if(h){const A=Math.min(this.currentTime,i)/a;let V=Math.floor(A),b=A%1;!b&&A>=1&&(b=1),b===1&&V--,V=Math.min(V,h+1),!!(V%2)&&(f==="reverse"?(b=1-b,d&&(b-=d/a)):f==="mirror"&&(S=o)),v=J(0,1,b)*a}const P=x?{done:!1,value:c[0]}:S.next(v);r&&!x&&(P.value=r(P.value));let{done:C}=P;!x&&l!==null&&(C=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const L=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return L&&p!==Ee&&(P.value=cn(c,this.options,g,this.speed)),m&&m(P.value),L&&this.finish(),P}then(e,n){return this.finished.then(e,n)}get duration(){return $(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+$(e)}get time(){return $(this.currentTime)}set time(e){e=W(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){const e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);const n=this.generator.next(e).value;return yi(s=>this.generator.next(s).value,e,n)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;n&&this.driver&&this.updateTime(N.now()),this.playbackSpeed=e,n&&this.driver&&(this.time=$(this.currentTime))}play(){var i,r;if(this.isStopped)return;const{driver:e=yr,startTime:n}=this.options;this.driver||(this.driver=e(o=>this.tick(o))),(r=(i=this.options).onPlay)==null||r.call(i);const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(N.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(e=this.options).onComplete)==null||n.call(e)}cancel(){var e,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(e=this.options).onCancel)==null||n.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),e.observe(this)}}function Ir(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const ft=t=>t*180/Math.PI,Re=t=>{const e=ft(Math.atan2(t[1],t[0]));return Le(e)},Br={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Re,rotateZ:Re,skewX:t=>ft(Math.atan(t[1])),skewY:t=>ft(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Le=t=>(t=t%360,t<0&&(t+=360),t),In=Re,Bn=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),On=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Or={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Bn,scaleY:On,scale:t=>(Bn(t)+On(t))/2,rotateX:t=>Le(ft(Math.atan2(t[6],t[5]))),rotateY:t=>Le(ft(Math.atan2(-t[2],t[0]))),rotateZ:In,rotate:In,skewX:t=>ft(Math.atan(t[4])),skewY:t=>ft(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function ke(t){return t.includes("scale")?1:0}function Fe(t,e){if(!t||t==="none")return ke(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Or,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Br,i=a}if(!i)return ke(e);const r=s[e],o=i[1].split(",").map(Nr);return typeof r=="function"?r(o):o[r]}const jr=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Fe(n,e)};function Nr(t){return parseFloat(t.trim())}const At=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Vt=new Set(At),jn=t=>t===bt||t===w,Ur=new Set(["x","y","z"]),Wr=At.filter(t=>!Ur.has(t));function Kr(t){const e=[];return Wr.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const ot={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>Fe(e,"x"),y:(t,{transform:e})=>Fe(e,"y")};ot.translateX=ot.x;ot.translateY=ot.y;const dt=new Set;let Ie=!1,Be=!1,Oe=!1;function xi(){if(Be){const t=Array.from(dt).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=Kr(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([r,o])=>{var a;(a=s.getValue(r))==null||a.set(o)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Be=!1,Ie=!1,dt.forEach(t=>t.complete(Oe)),dt.clear()}function Ti(){dt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Be=!0)})}function $r(){Oe=!0,Ti(),xi(),Oe=!1}class fn{constructor(e,n,s,i,r,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=r,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(dt.add(this),Ie||(Ie=!0,M.read(Ti),M.resolveKeyframes(xi))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;if(e[0]===null){const r=i==null?void 0:i.get(),o=e[e.length-1];if(r!==void 0)e[0]=r;else if(s&&n){const a=s.readValue(n,o);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=o),i&&r===void 0&&i.set(e[0])}Ir(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),dt.delete(this)}cancel(){this.state==="scheduled"&&(dt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const zr=t=>t.startsWith("--");function wi(t,e,n){zr(e)?t.style.setProperty(e,n):t.style[e]=n}const Gr={};function Si(t,e){const n=Ys(t);return()=>Gr[e]??n()}const Hr=Si(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Pi=Si(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Mt=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Nn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Mt([0,.65,.55,1]),circOut:Mt([.55,0,1,.45]),backIn:Mt([.31,.01,.66,-.59]),backOut:Mt([.33,1.53,.69,.99])};function bi(t,e){if(t)return typeof t=="function"?Pi()?gi(t,e):"ease-out":ri(t)?Mt(t):Array.isArray(t)?t.map(n=>bi(n,e)||Nn.easeOut):Nn[t]}function _r(t,e,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[e]:n};l&&(c.offset=l);const h=bi(a,i);Array.isArray(h)&&(c.easing=h);const f={delay:s,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"};return u&&(f.pseudoElement=u),t.animate(c,f)}function Ai(t){return typeof t=="function"&&"applyToOptions"in t}function Xr({type:t,...e}){return Ai(t)&&Pi()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class Vi extends un{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:s,keyframes:i,pseudoElement:r,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!r,this.allowFlatten=o,this.options=e,Qe(typeof e.type!="string");const u=Xr(e);this.animation=_r(n,s,i,u,r),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const c=cn(i,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(c),wi(n,s,c),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,n;(n=(e=this.animation).finish)==null||n.call(e)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,s,i;const e=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(e!=null&&e.isConnected)&&((i=(s=this.animation).commitStyles)==null||i.call(s))}get duration(){var n,s;const e=((s=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:s.call(n).duration)||0;return $(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+$(e)}get time(){return $(Number(this.animation.currentTime)||0)}set time(e){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=W(e),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:n,rangeEnd:s,observe:i}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&Hr()?(this.animation.timeline=e,n&&(this.animation.rangeStart=n),s&&(this.animation.rangeEnd=s),z):i(this)}}const Ci={anticipate:ni,backInOut:ei,circInOut:ii};function Yr(t){return t in Ci}function qr(t){typeof t.ease=="string"&&Yr(t.ease)&&(t.ease=Ci[t.ease])}const ge=10;class Zr extends Vi{constructor(e){qr(e),vi(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:s,onComplete:i,element:r,...o}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new hn({...o,autoplay:!1}),l=Math.max(ge,N.now()-this.startTime),u=J(0,ge,l-ge),c=a.sample(l).value,{name:h}=this.options;r&&h&&wi(r,h,c),n.setWithVelocity(a.sample(Math.max(0,l-u)).value,c,u),a.stop()}}const Un=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(_.test(t)||t==="0")&&!t.startsWith("url("));function Jr(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function Qr(t,e,n,s){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const r=t[t.length-1],o=Un(i,e),a=Un(r,e);return!o||!a?!1:Jr(t)||(n==="spring"||Ai(n))&&s}function je(t){t.duration=0,t.type="keyframes"}const ta=new Set(["opacity","clipPath","filter","transform"]),ea=Ys(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function na(t){var c;const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:r,type:o}=t;if(!(((c=e==null?void 0:e.owner)==null?void 0:c.current)instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=e.owner.getProps();return ea()&&n&&ta.has(n)&&(n!=="transform"||!u)&&!l&&!s&&i!=="mirror"&&r!==0&&o!=="inertia"}const sa=40;class ia extends un{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",keyframes:a,name:l,motionValue:u,element:c,...h}){var p;super(),this.stop=()=>{var m,g;this._animation&&(this._animation.stop(),(m=this.stopTimeline)==null||m.call(this)),(g=this.keyframeResolver)==null||g.cancel()},this.createdAt=N.now();const f={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:r,repeatType:o,name:l,motionValue:u,element:c,...h},d=(c==null?void 0:c.KeyframeResolver)||fn;this.keyframeResolver=new d(a,(m,g,y)=>this.onKeyframesResolved(m,g,f,!y),l,u,c),(p=this.keyframeResolver)==null||p.scheduleResolve()}onKeyframesResolved(e,n,s,i){var g,y;this.keyframeResolver=void 0;const{name:r,type:o,velocity:a,delay:l,isHandoff:u,onUpdate:c}=s;this.resolvedAt=N.now(),Qr(e,r,o,a)||((nt.instantAnimations||!l)&&(c==null||c(cn(e,s,n))),e[0]=e[e.length-1],je(s),s.repeat=0);const f={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>sa?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},d=!u&&na(f),p=(y=(g=f.motionValue)==null?void 0:g.owner)==null?void 0:y.current,m=d?new Zr({...f,element:p}):new hn(f);m.finished.then(()=>{this.notifyFinished()}).catch(z),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||((e=this.keyframeResolver)==null||e.resume(),$r()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var e;this._animation&&this.animation.cancel(),(e=this.keyframeResolver)==null||e.cancel()}}function Mi(t,e,n,s=0,i=1){const r=Array.from(t).sort((u,c)=>u.sortNodePosition(c)).indexOf(e),o=t.size,a=(o-1)*s;return typeof n=="function"?n(r,o):i===1?r*s:a-r*s}const oa=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ra(t){const e=oa.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}function Di(t,e,n=1){const[s,i]=ra(t);if(!s)return;const r=window.getComputedStyle(e).getPropertyValue(s);if(r){const o=r.trim();return Hs(o)?parseFloat(o):o}return sn(i)?Di(i,e,n+1):i}const aa={type:"spring",stiffness:500,damping:25,restSpeed:10},la=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),ca={type:"keyframes",duration:.8},ua={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ha=(t,{keyframes:e})=>e.length>2?ca:Vt.has(t)?t.startsWith("scale")?la(e[1]):aa:ua,fa=t=>t!==null;function da(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(fa),r=e&&n!=="loop"&&e%2===1?0:i.length-1;return i[r]}function Ei(t,e){if(t!=null&&t.inherit&&e){const{inherit:n,...s}=t;return{...e,...s}}return t}function dn(t,e){const n=(t==null?void 0:t[e])??(t==null?void 0:t.default)??t;return n!==t?Ei(n,t):n}function pa({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:r,repeatType:o,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const pn=(t,e,n,s={},i,r)=>o=>{const a=dn(s,t)||{},l=a.delay||s.delay||0;let{elapsed:u=0}=s;u=u-W(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:i};pa(a)||Object.assign(c,ha(t,c)),c.duration&&(c.duration=W(c.duration)),c.repeatDelay&&(c.repeatDelay=W(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let h=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(je(c),c.delay===0&&(h=!0)),(nt.instantAnimations||nt.skipAnimations||i!=null&&i.shouldSkipAnimations)&&(h=!0,je(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,h&&!r&&e.get()!==void 0){const f=da(c.keyframes,a);if(f!==void 0){M.update(()=>{c.onUpdate(f),c.onComplete()});return}}return a.isSync?new hn(c):new ia(c)};function Wn(t){const e=[{},{}];return t==null||t.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function mn(t,e,n,s){if(typeof e=="function"){const[i,r]=Wn(s);e=e(n!==void 0?n:t.custom,i,r)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,r]=Wn(s);e=e(n!==void 0?n:t.custom,i,r)}return e}function wt(t,e,n){const s=t.getProps();return mn(s,e,n!==void 0?n:s.custom,t)}const Ri=new Set(["width","height","top","left","right","bottom",...At]),Kn=30,ma=t=>!isNaN(parseFloat(t));class ga{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{var r;const i=N.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&((r=this.events.change)==null||r.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=N.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=ma(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new tn);const s=this.events[e].add(n);return e==="change"?()=>{s(),M.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var e;(e=this.events.change)==null||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=N.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Kn)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Kn);return qs(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var e,n;(e=this.dependents)==null||e.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Pt(t,e){return new ga(t,e)}const Ne=t=>Array.isArray(t);function ya(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Pt(n))}function va(t){return Ne(t)?t[t.length-1]||0:t}function xa(t,e){const n=wt(t,e);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const o in r){const a=va(r[o]);ya(t,o,a)}}const j=t=>!!(t&&t.getVelocity);function Ta(t){return!!(j(t)&&t.add)}function Ue(t,e){const n=t.getValue("willChange");if(Ta(n))return n.add(e);if(!n&&nt.WillChange){const s=new nt.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function gn(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const wa="framerAppearId",Li="data-"+gn(wa);function ki(t){return t.props[Li]}function Sa({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function Fi(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:r,transitionEnd:o,...a}=e;const l=t.getDefaultTransition();r=r?Ei(r,l):l;const u=r==null?void 0:r.reduceMotion;s&&(r=s);const c=[],h=i&&t.animationState&&t.animationState.getState()[i];for(const f in a){const d=t.getValue(f,t.latestValues[f]??null),p=a[f];if(p===void 0||h&&Sa(h,f))continue;const m={delay:n,...dn(r||{},f)},g=d.get();if(g!==void 0&&!d.isAnimating&&!Array.isArray(p)&&p===g&&!m.velocity)continue;let y=!1;if(window.MotionHandoffAnimation){const S=ki(t);if(S){const P=window.MotionHandoffAnimation(S,f,M);P!==null&&(m.startTime=P,y=!0)}}Ue(t,f);const x=u??t.shouldReduceMotion;d.start(pn(f,d,p,x&&Ri.has(f)?{type:!1}:m,t,y));const v=d.animation;v&&c.push(v)}if(o){const f=()=>M.update(()=>{o&&xa(t,o)});c.length?Promise.all(c).then(f):f()}return c}function We(t,e,n={}){var l;const s=wt(t,e,n.type==="exit"?(l=t.presenceContext)==null?void 0:l.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const r=s?()=>Promise.all(Fi(t,s,n)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:h,staggerDirection:f}=i;return Pa(t,e,u,c,h,f,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[u,c]=a==="beforeChildren"?[r,o]:[o,r];return u().then(()=>c())}else return Promise.all([r(),o(n.delay)])}function Pa(t,e,n=0,s=0,i=0,r=1,o){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(We(l,e,{...o,delay:n+(typeof s=="function"?0:s)+Mi(t.variantChildren,l,s,i,r)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}function ba(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(r=>We(t,r,n));s=Promise.all(i)}else if(typeof e=="string")s=We(t,e,n);else{const i=typeof e=="function"?wt(t,e,n.custom):e;s=Promise.all(Fi(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}const Aa={test:t=>t==="auto",parse:t=>t},Ii=t=>e=>e.test(t),Bi=[bt,w,Z,st,Jo,Zo,Aa],$n=t=>Bi.find(Ii(t));function Va(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Xs(t):!0}const Ca=new Set(["brightness","contrast","saturate","opacity"]);function Ma(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(on)||[];if(!s)return t;const i=n.replace(s,"");let r=Ca.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const Da=/\b([a-z-]*)\(.*?\)/gu,Ke={..._,getAnimatableNone:t=>{const e=t.match(Da);return e?e.map(Ma).join(" "):t}},$e={..._,getAnimatableNone:t=>{const e=_.parse(t);return _.createTransformer(t)(e.map(s=>typeof s=="number"?0:typeof s=="object"?{...s,alpha:1}:s))}},zn={...bt,transform:Math.round},Ea={rotate:st,rotateX:st,rotateY:st,rotateZ:st,scale:Kt,scaleX:Kt,scaleY:Kt,scaleZ:Kt,skew:st,skewX:st,skewY:st,distance:w,translateX:w,translateY:w,translateZ:w,x:w,y:w,z:w,perspective:w,transformPerspective:w,opacity:Ft,originX:En,originY:En,originZ:w},yn={borderWidth:w,borderTopWidth:w,borderRightWidth:w,borderBottomWidth:w,borderLeftWidth:w,borderRadius:w,borderTopLeftRadius:w,borderTopRightRadius:w,borderBottomRightRadius:w,borderBottomLeftRadius:w,width:w,maxWidth:w,height:w,maxHeight:w,top:w,right:w,bottom:w,left:w,inset:w,insetBlock:w,insetBlockStart:w,insetBlockEnd:w,insetInline:w,insetInlineStart:w,insetInlineEnd:w,padding:w,paddingTop:w,paddingRight:w,paddingBottom:w,paddingLeft:w,paddingBlock:w,paddingBlockStart:w,paddingBlockEnd:w,paddingInline:w,paddingInlineStart:w,paddingInlineEnd:w,margin:w,marginTop:w,marginRight:w,marginBottom:w,marginLeft:w,marginBlock:w,marginBlockStart:w,marginBlockEnd:w,marginInline:w,marginInlineStart:w,marginInlineEnd:w,fontSize:w,backgroundPositionX:w,backgroundPositionY:w,...Ea,zIndex:zn,fillOpacity:Ft,strokeOpacity:Ft,numOctaves:zn},Ra={...yn,color:k,backgroundColor:k,outlineColor:k,fill:k,stroke:k,borderColor:k,borderTopColor:k,borderRightColor:k,borderBottomColor:k,borderLeftColor:k,filter:Ke,WebkitFilter:Ke,mask:$e,WebkitMask:$e},Oi=t=>Ra[t],La=new Set([Ke,$e]);function ji(t,e){let n=Oi(t);return La.has(n)||(n=_),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const ka=new Set(["auto","none","0"]);function Fa(t,e,n){let s=0,i;for(;s<t.length&&!i;){const r=t[s];typeof r=="string"&&!ka.has(r)&&St(r).values.length&&(i=t[s]),s++}if(i&&n)for(const r of e)t[r]=ji(n,i)}class Ia extends fn{constructor(e,n,s,i,r){super(e,n,s,i,r,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<e.length;c++){let h=e[c];if(typeof h=="string"&&(h=h.trim(),sn(h))){const f=Di(h,n.current);f!==void 0&&(e[c]=f),c===e.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!Ri.has(s)||e.length!==2)return;const[i,r]=e,o=$n(i),a=$n(r),l=Dn(i),u=Dn(r);if(l!==u&&ot[s]){this.needsMeasurement=!0;return}if(o!==a)if(jn(o)&&jn(a))for(let c=0;c<e.length;c++){const h=e[c];typeof h=="string"&&(e[c]=parseFloat(h))}else ot[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)(e[i]===null||Va(e[i]))&&s.push(i);s.length&&Fa(e,s,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:s}=this;if(!e||!e.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ot[s](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(s,i).jump(i,!1)}measureEndState(){var a;const{element:e,name:n,unresolvedKeyframes:s}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const r=s.length-1,o=s[r];s[r]=ot[n](e.measureViewportBox(),window.getComputedStyle(e.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,u])=>{e.getValue(l).set(u)}),this.resolveNoneKeyframes()}}const Ba=new Set(["opacity","clipPath","filter","transform"]);function Ni(t,e,n){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){let s=document;const i=(n==null?void 0:n[t])??s.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t).filter(s=>s!=null)}const Ui=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function _t(t){return _s(t)&&"offsetHeight"in t}const{schedule:vn}=ai(queueMicrotask,!1),H={x:!1,y:!1};function Wi(){return H.x||H.y}function Oa(t){return t==="x"||t==="y"?H[t]?null:(H[t]=!0,()=>{H[t]=!1}):H.x||H.y?null:(H.x=H.y=!0,()=>{H.x=H.y=!1})}function Ki(t,e){const n=Ni(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function ja(t){return!(t.pointerType==="touch"||Wi())}function Na(t,e,n={}){const[s,i,r]=Ki(t,n);return s.forEach(o=>{let a=!1,l=!1,u;const c=()=>{o.removeEventListener("pointerleave",p)},h=g=>{u&&(u(g),u=void 0),c()},f=g=>{a=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),l&&(l=!1,h(g))},d=()=>{a=!0,window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",f,i)},p=g=>{if(g.pointerType!=="touch"){if(a){l=!0;return}h(g)}},m=g=>{if(!ja(g))return;l=!1;const y=e(o,g);typeof y=="function"&&(u=y,o.addEventListener("pointerleave",p,i))};o.addEventListener("pointerenter",m,i),o.addEventListener("pointerdown",d,i)}),r}const $i=(t,e)=>e?t===e?!0:$i(t,e.parentElement):!1,xn=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,Ua=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Wa(t){return Ua.has(t.tagName)||t.isContentEditable===!0}const Ka=new Set(["INPUT","SELECT","TEXTAREA"]);function $a(t){return Ka.has(t.tagName)||t.isContentEditable===!0}const Xt=new WeakSet;function Gn(t){return e=>{e.key==="Enter"&&t(e)}}function ye(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const za=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=Gn(()=>{if(Xt.has(n))return;ye(n,"down");const i=Gn(()=>{ye(n,"up")}),r=()=>ye(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",r,e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)};function Hn(t){return xn(t)&&!Wi()}const _n=new WeakSet;function Ga(t,e,n={}){const[s,i,r]=Ki(t,n),o=a=>{const l=a.currentTarget;if(!Hn(a)||_n.has(a))return;Xt.add(l),n.stopPropagation&&_n.add(a);const u=e(l,a),c=(d,p)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",f),Xt.has(l)&&Xt.delete(l),Hn(d)&&typeof u=="function"&&u(d,{success:p})},h=d=>{c(d,l===window||l===document||n.useGlobalTarget||$i(l,d.target))},f=d=>{c(d,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",f,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),_t(a)&&(a.addEventListener("focus",u=>za(u,i)),!Wa(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),r}function Tn(t){return _s(t)&&"ownerSVGElement"in t}const Yt=new WeakMap;let it;const zi=(t,e,n)=>(s,i)=>i&&i[0]?i[0][t+"Size"]:Tn(s)&&"getBBox"in s?s.getBBox()[e]:s[n],Ha=zi("inline","width","offsetWidth"),_a=zi("block","height","offsetHeight");function Xa({target:t,borderBoxSize:e}){var n;(n=Yt.get(t))==null||n.forEach(s=>{s(t,{get width(){return Ha(t,e)},get height(){return _a(t,e)}})})}function Ya(t){t.forEach(Xa)}function qa(){typeof ResizeObserver>"u"||(it=new ResizeObserver(Ya))}function Za(t,e){it||qa();const n=Ni(t);return n.forEach(s=>{let i=Yt.get(s);i||(i=new Set,Yt.set(s,i)),i.add(e),it==null||it.observe(s)}),()=>{n.forEach(s=>{const i=Yt.get(s);i==null||i.delete(e),i!=null&&i.size||it==null||it.unobserve(s)})}}const qt=new Set;let yt;function Ja(){yt=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};qt.forEach(e=>e(t))},window.addEventListener("resize",yt)}function Qa(t){return qt.add(t),yt||Ja(),()=>{qt.delete(t),!qt.size&&typeof yt=="function"&&(window.removeEventListener("resize",yt),yt=void 0)}}function Xn(t,e){return typeof t=="function"?Qa(t):Za(t,e)}function tl(t){return Tn(t)&&t.tagName==="svg"}const el=[...Bi,k,_],nl=t=>el.find(Ii(t)),Yn=()=>({translate:0,scale:1,origin:0,originPoint:0}),vt=()=>({x:Yn(),y:Yn()}),qn=()=>({min:0,max:0}),F=()=>({x:qn(),y:qn()}),sl=new WeakMap;function le(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function It(t){return typeof t=="string"||Array.isArray(t)}const wn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Sn=["initial",...wn];function ce(t){return le(t.animate)||Sn.some(e=>It(t[e]))}function Gi(t){return!!(ce(t)||t.variants)}function il(t,e,n){for(const s in e){const i=e[s],r=n[s];if(j(i))t.addValue(s,i);else if(j(r))t.addValue(s,Pt(i,{owner:t}));else if(r!==i)if(t.hasValue(s)){const o=t.getValue(s);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=t.getStaticValue(s);t.addValue(s,Pt(o!==void 0?o:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const ze={current:null},Hi={current:!1},ol=typeof window<"u";function rl(){if(Hi.current=!0,!!ol)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>ze.current=t.matches;t.addEventListener("change",e),e()}else ze.current=!1}const Zn=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let se={};function _i(t){se=t}function al(){return se}class ll{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,skipAnimations:r,blockInitialAnimation:o,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=fn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const d=N.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,M.render(this.render,!1,!0))};const{latestValues:u,renderState:c}=a;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=c,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=r,this.options=l,this.blockInitialAnimation=!!o,this.isControllingVariants=ce(n),this.isVariantNode=Gi(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:h,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const p=f[d];u[d]!==void 0&&j(p)&&p.set(u[d])}}mount(e){var n,s;if(this.hasBeenMounted)for(const i in this.initialValues)(n=this.values.get(i))==null||n.jump(this.initialValues[i]),this.latestValues[i]=this.initialValues[i];this.current=e,sl.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((i,r)=>this.bindToMotionValue(r,i)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Hi.current||rl(),this.shouldReduceMotion=ze.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(s=this.parent)==null||s.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var e;this.projection&&this.projection.unmount(),rt(this.notifyUpdate),rt(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(e=this.parent)==null||e.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const s=this.features[n];s&&(s.unmount(),s.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),n.accelerate&&Ba.has(e)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:l,ease:u,duration:c}=n.accelerate,h=new Vi({element:this.current,name:e,keyframes:a,times:l,ease:u,duration:W(c)}),f=o(h);this.valueSubscriptions.set(e,()=>{f(),h.cancel()});return}const s=Vt.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&M.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;typeof window<"u"&&window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),r&&r(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in se){const n=se[e];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[e]&&i&&s(this.props)&&(this.features[e]=new i(this)),this.features[e]){const r=this.features[e];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):F()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<Zn.length;s++){const i=Zn[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const r="on"+i,o=e[r];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=il(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=Pt(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){let s=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return s!=null&&(typeof s=="string"&&(Hs(s)||Xs(s))?s=parseFloat(s):!nl(s)&&_.test(n)&&(s=ji(e,n)),this.setBaseTarget(e,j(s)?s.get():s)),j(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var r;const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const o=mn(this.props,n,(r=this.presenceContext)==null?void 0:r.custom);o&&(s=o[e])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!j(i)?i:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new tn),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){vn.render(this.render)}}class Xi extends ll{constructor(){super(...arguments),this.KeyframeResolver=Ia}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){const s=e.style;return s?s[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;j(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class at{constructor(e){this.isMounted=!1,this.node=e}update(){}}function Yi({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function cl({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function ul(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function ve(t){return t===void 0||t===1}function Ge({scale:t,scaleX:e,scaleY:n}){return!ve(t)||!ve(e)||!ve(n)}function ut(t){return Ge(t)||qi(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function qi(t){return Jn(t.x)||Jn(t.y)}function Jn(t){return t&&t!=="0%"}function ie(t,e,n){const s=t-n,i=e*s;return n+i}function Qn(t,e,n,s,i){return i!==void 0&&(t=ie(t,i,s)),ie(t,n,s)+e}function He(t,e=0,n=1,s,i){t.min=Qn(t.min,e,n,s,i),t.max=Qn(t.max,e,n,s,i)}function Zi(t,{x:e,y:n}){He(t.x,e.translate,e.scale,e.originPoint),He(t.y,n.translate,n.scale,n.originPoint)}const ts=.999999999999,es=1.0000000000001;function hl(t,e,n,s=!1){var a;const i=n.length;if(!i)return;e.x=e.y=1;let r,o;for(let l=0;l<i;l++){r=n[l],o=r.projectionDelta;const{visualElement:u}=r.options;u&&u.props.style&&u.props.style.display==="contents"||(s&&r.options.layoutScroll&&r.scroll&&r!==r.root&&Tt(t,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,Zi(t,o)),s&&ut(r.latestValues)&&Tt(t,r.latestValues,(a=r.layout)==null?void 0:a.layoutBox))}e.x<es&&e.x>ts&&(e.x=1),e.y<es&&e.y>ts&&(e.y=1)}function xt(t,e){t.min=t.min+e,t.max=t.max+e}function ns(t,e,n,s,i=.5){const r=E(t.min,t.max,i);He(t,e,n,r,s)}function ss(t,e){return typeof t=="string"?parseFloat(t)/100*(e.max-e.min):t}function Tt(t,e,n){const s=n??t;ns(t.x,ss(e.x,s.x),e.scaleX,e.scale,e.originX),ns(t.y,ss(e.y,s.y),e.scaleY,e.scale,e.originY)}function Ji(t,e){return Yi(ul(t.getBoundingClientRect(),e))}function fl(t,e,n){const s=Ji(t,n),{scroll:i}=e;return i&&(xt(s.x,i.offset.x),xt(s.y,i.offset.y)),s}const dl={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},pl=At.length;function ml(t,e,n){let s="",i=!0;for(let r=0;r<pl;r++){const o=At[r],a=t[o];if(a===void 0)continue;let l=!0;if(typeof a=="number")l=a===(o.startsWith("scale")?1:0);else{const u=parseFloat(a);l=o.startsWith("scale")?u===1:u===0}if(!l||n){const u=Ui(a,yn[o]);if(!l){i=!1;const c=dl[o]||o;s+=`${c}(${u}) `}n&&(e[o]=u)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function Pn(t,e,n){const{style:s,vars:i,transformOrigin:r}=t;let o=!1,a=!1;for(const l in e){const u=e[l];if(Vt.has(l)){o=!0;continue}else if(ci(l)){i[l]=u;continue}else{const c=Ui(u,yn[l]);l.startsWith("origin")?(a=!0,r[l]=c):s[l]=c}}if(e.transform||(o||n?s.transform=ml(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=r;s.transformOrigin=`${l} ${u} ${c}`}}function Qi(t,{style:e,vars:n},s,i){const r=t.style;let o;for(o in e)r[o]=e[o];i==null||i.applyProjectionStyles(r,s);for(o in n)r.setProperty(o,n[o])}function is(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Ct={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(w.test(t))t=parseFloat(t);else return t;const n=is(t,e.target.x),s=is(t,e.target.y);return`${n}% ${s}%`}},gl={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=_.parse(t);if(i.length>5)return s;const r=_.createTransformer(t),o=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+o]/=a,i[1+o]/=l;const u=E(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),r(i)}},_e={borderRadius:{...Ct,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ct,borderTopRightRadius:Ct,borderBottomLeftRadius:Ct,borderBottomRightRadius:Ct,boxShadow:gl};function to(t,{layout:e,layoutId:n}){return Vt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!_e[t]||t==="opacity")}function bn(t,e,n){var o;const s=t.style,i=e==null?void 0:e.style,r={};if(!s)return r;for(const a in s)(j(s[a])||i&&j(i[a])||to(a,t)||((o=n==null?void 0:n.getValue(a))==null?void 0:o.liveStyle)!==void 0)&&(r[a]=s[a]);return r}function yl(t){return window.getComputedStyle(t)}class vl extends Xi{constructor(){super(...arguments),this.type="html",this.renderInstance=Qi}readValueFromInstance(e,n){var s;if(Vt.has(n))return(s=this.projection)!=null&&s.isProjecting?ke(n):jr(e,n);{const i=yl(e),r=(ci(n)?i.getPropertyValue(n):i[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Ji(e,n)}build(e,n,s){Pn(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return bn(e,n,s)}}const xl={offset:"stroke-dashoffset",array:"stroke-dasharray"},Tl={offset:"strokeDashoffset",array:"strokeDasharray"};function wl(t,e,n=1,s=0,i=!0){t.pathLength=1;const r=i?xl:Tl;t[r.offset]=`${-s}`,t[r.array]=`${e} ${n}`}const Sl=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function eo(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:r=1,pathOffset:o=0,...a},l,u,c){if(Pn(t,a,u),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:f}=t;h.transform&&(f.transform=h.transform,delete h.transform),(f.transform||h.transformOrigin)&&(f.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),f.transform&&(f.transformBox=(c==null?void 0:c.transformBox)??"fill-box",delete h.transformBox);for(const d of Sl)h[d]!==void 0&&(f[d]=h[d],delete h[d]);e!==void 0&&(h.x=e),n!==void 0&&(h.y=n),s!==void 0&&(h.scale=s),i!==void 0&&wl(h,i,r,o,!1)}const no=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"]),so=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Pl(t,e,n,s){Qi(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(no.has(i)?i:gn(i),e.attrs[i])}function io(t,e,n){const s=bn(t,e,n);for(const i in t)if(j(t[i])||j(e[i])){const r=At.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[r]=t[i]}return s}class bl extends Xi{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=F}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Vt.has(n)){const s=Oi(n);return s&&s.default||0}return n=no.has(n)?n:gn(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return io(e,n,s)}build(e,n,s){eo(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){Pl(e,n,s,i)}mount(e){this.isSVGTag=so(e.tagName),super.mount(e)}}const Al=Sn.length;function oo(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?oo(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<Al;n++){const s=Sn[n],i=t.props[s];(It(i)||i===!1)&&(e[s]=i)}return e}function ro(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}const Vl=[...wn].reverse(),Cl=wn.length;function Ml(t){return e=>Promise.all(e.map(({animation:n,options:s})=>ba(t,n,s)))}function Dl(t){let e=Ml(t),n=os(),s=!0,i=!1;const r=u=>(c,h)=>{var d;const f=wt(t,h,u==="exit"?(d=t.presenceContext)==null?void 0:d.custom:void 0);if(f){const{transition:p,transitionEnd:m,...g}=f;c={...c,...g,...m}}return c};function o(u){e=u(t)}function a(u){const{props:c}=t,h=oo(t.parent)||{},f=[],d=new Set;let p={},m=1/0;for(let y=0;y<Cl;y++){const x=Vl[y],v=n[x],S=c[x]!==void 0?c[x]:h[x],P=It(S),C=x===u?v.isActive:null;C===!1&&(m=y);let L=S===h[x]&&S!==c[x]&&P;if(L&&(s||i)&&t.manuallyAnimateOnMount&&(L=!1),v.protectedKeys={...p},!v.isActive&&C===null||!S&&!v.prevProp||le(S)||typeof S=="boolean")continue;if(x==="exit"&&v.isActive&&C!==!0){v.prevResolvedValues&&(p={...p,...v.prevResolvedValues});continue}const A=El(v.prevProp,S);let V=A||x===u&&v.isActive&&!L&&P||y>m&&P,b=!1;const D=Array.isArray(S)?S:[S];let I=D.reduce(r(x),{});C===!1&&(I={});const{prevResolvedValues:Q={}}=v,X={...Q,...I},tt=B=>{V=!0,d.has(B)&&(b=!0,d.delete(B)),v.needsAnimating[B]=!0;const K=t.getValue(B);K&&(K.liveStyle=!1)};for(const B in X){const K=I[B],lt=Q[B];if(p.hasOwnProperty(B))continue;let pt=!1;Ne(K)&&Ne(lt)?pt=!ro(K,lt):pt=K!==lt,pt?K!=null?tt(B):d.add(B):K!==void 0&&d.has(B)?tt(B):v.protectedKeys[B]=!0}v.prevProp=S,v.prevResolvedValues=I,v.isActive&&(p={...p,...I}),(s||i)&&t.blockInitialAnimation&&(V=!1);const Y=L&&A;V&&(!Y||b)&&f.push(...D.map(B=>{const K={type:x};if(typeof B=="string"&&(s||i)&&!Y&&t.manuallyAnimateOnMount&&t.parent){const{parent:lt}=t,pt=wt(lt,B);if(lt.enteringChildren&&pt){const{delayChildren:Ro}=pt.transition||{};K.delay=Mi(lt.enteringChildren,t,Ro)}}return{animation:B,options:K}}))}if(d.size){const y={};if(typeof c.initial!="boolean"){const x=wt(t,Array.isArray(c.initial)?c.initial[0]:c.initial);x&&x.transition&&(y.transition=x.transition)}d.forEach(x=>{const v=t.getBaseTarget(x),S=t.getValue(x);S&&(S.liveStyle=!0),y[x]=v??null}),f.push({animation:y})}let g=!!f.length;return s&&(c.initial===!1||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(g=!1),s=!1,i=!1,g?e(f):Promise.resolve()}function l(u,c){var f;if(n[u].isActive===c)return Promise.resolve();(f=t.variantChildren)==null||f.forEach(d=>{var p;return(p=d.animationState)==null?void 0:p.setActive(u,c)}),n[u].isActive=c;const h=a(u);for(const d in n)n[d].protectedKeys={};return h}return{animateChanges:a,setActive:l,setAnimateFunction:o,getState:()=>n,reset:()=>{n=os(),i=!0}}}function El(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!ro(e,t):!1}function ct(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function os(){return{animate:ct(!0),whileInView:ct(),whileHover:ct(),whileTap:ct(),whileDrag:ct(),whileFocus:ct(),exit:ct()}}function rs(t,e){t.min=e.min,t.max=e.max}function G(t,e){rs(t.x,e.x),rs(t.y,e.y)}function as(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}const ao=1e-4,Rl=1-ao,Ll=1+ao,lo=.01,kl=0-lo,Fl=0+lo;function U(t){return t.max-t.min}function Il(t,e,n){return Math.abs(t-e)<=n}function ls(t,e,n,s=.5){t.origin=s,t.originPoint=E(e.min,e.max,t.origin),t.scale=U(n)/U(e),t.translate=E(n.min,n.max,t.origin)-t.originPoint,(t.scale>=Rl&&t.scale<=Ll||isNaN(t.scale))&&(t.scale=1),(t.translate>=kl&&t.translate<=Fl||isNaN(t.translate))&&(t.translate=0)}function Rt(t,e,n,s){ls(t.x,e.x,n.x,s?s.originX:void 0),ls(t.y,e.y,n.y,s?s.originY:void 0)}function cs(t,e,n){t.min=n.min+e.min,t.max=t.min+U(e)}function Bl(t,e,n){cs(t.x,e.x,n.x),cs(t.y,e.y,n.y)}function us(t,e,n){t.min=e.min-n.min,t.max=t.min+U(e)}function oe(t,e,n){us(t.x,e.x,n.x),us(t.y,e.y,n.y)}function hs(t,e,n,s,i){return t-=e,t=ie(t,1/n,s),i!==void 0&&(t=ie(t,1/i,s)),t}function Ol(t,e=0,n=1,s=.5,i,r=t,o=t){if(Z.test(e)&&(e=parseFloat(e),e=E(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=E(r.min,r.max,s);t===r&&(a-=e),t.min=hs(t.min,e,n,a,i),t.max=hs(t.max,e,n,a,i)}function fs(t,e,[n,s,i],r,o){Ol(t,e[n],e[s],e[i],e.scale,r,o)}const jl=["x","scaleX","originX"],Nl=["y","scaleY","originY"];function ds(t,e,n,s){fs(t.x,e,jl,n?n.x:void 0,s?s.x:void 0),fs(t.y,e,Nl,n?n.y:void 0,s?s.y:void 0)}function ps(t){return t.translate===0&&t.scale===1}function co(t){return ps(t.x)&&ps(t.y)}function ms(t,e){return t.min===e.min&&t.max===e.max}function Ul(t,e){return ms(t.x,e.x)&&ms(t.y,e.y)}function gs(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function uo(t,e){return gs(t.x,e.x)&&gs(t.y,e.y)}function ys(t){return U(t.x)/U(t.y)}function vs(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function q(t){return[t("x"),t("y")]}function Wl(t,e,n){let s="";const i=t.x.translate/e.x,r=t.y.translate/e.y,o=(n==null?void 0:n.z)||0;if((i||r||o)&&(s=`translate3d(${i}px, ${r}px, ${o}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:h,rotateY:f,skewX:d,skewY:p}=n;u&&(s=`perspective(${u}px) ${s}`),c&&(s+=`rotate(${c}deg) `),h&&(s+=`rotateX(${h}deg) `),f&&(s+=`rotateY(${f}deg) `),d&&(s+=`skewX(${d}deg) `),p&&(s+=`skewY(${p}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(s+=`scale(${a}, ${l})`),s||"none"}const ho=["TopLeft","TopRight","BottomLeft","BottomRight"],Kl=ho.length,xs=t=>typeof t=="string"?parseFloat(t):t,Ts=t=>typeof t=="number"||w.test(t);function $l(t,e,n,s,i,r){i?(t.opacity=E(0,n.opacity??1,zl(s)),t.opacityExit=E(e.opacity??1,0,Gl(s))):r&&(t.opacity=E(e.opacity??1,n.opacity??1,s));for(let o=0;o<Kl;o++){const a=`border${ho[o]}Radius`;let l=ws(e,a),u=ws(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||Ts(l)===Ts(u)?(t[a]=Math.max(E(xs(l),xs(u),s),0),(Z.test(u)||Z.test(l))&&(t[a]+="%")):t[a]=u}(e.rotate||n.rotate)&&(t.rotate=E(e.rotate||0,n.rotate||0,s))}function ws(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const zl=fo(0,.5,si),Gl=fo(.5,.95,z);function fo(t,e,n){return s=>s<t?0:s>e?1:n(kt(t,e,s))}function Hl(t,e,n){const s=j(t)?t:Pt(t);return s.start(pn("",s,e,n)),s.animation}function Bt(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}const _l=(t,e)=>t.depth-e.depth;class Xl{constructor(){this.children=[],this.isDirty=!1}add(e){Je(this.children,e),this.isDirty=!0}remove(e){Qt(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(_l),this.isDirty=!1,this.children.forEach(e)}}function Yl(t,e){const n=N.now(),s=({timestamp:i})=>{const r=i-n;r>=e&&(rt(s),t(r-e))};return M.setup(s,!0),()=>rt(s)}function Zt(t){return j(t)?t.get():t}class ql{constructor(){this.members=[]}add(e){Je(this.members,e);for(let n=this.members.length-1;n>=0;n--){const s=this.members[n];if(s===e||s===this.lead||s===this.prevLead)continue;const i=s.instance;(!i||i.isConnected===!1)&&!s.snapshot&&(Qt(this.members,s),s.unmount())}e.scheduleRender()}remove(e){if(Qt(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){var n;for(let s=this.members.indexOf(e)-1;s>=0;s--){const i=this.members[s];if(i.isPresent!==!1&&((n=i.instance)==null?void 0:n.isConnected)!==!1)return this.promote(i),!0}return!1}promote(e,n){var i;const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.updateSnapshot(),e.scheduleRender();const{layoutDependency:r}=s.options,{layoutDependency:o}=e.options;(r===void 0||r!==o)&&(e.resumeFrom=s,n&&(s.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),(i=e.root)!=null&&i.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{var n,s,i,r,o;(s=(n=e.options).onExitComplete)==null||s.call(n),(o=(i=e.resumingFrom)==null?void 0:(r=i.options).onExitComplete)==null||o.call(r)})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){var e;(e=this.lead)!=null&&e.snapshot&&(this.lead.snapshot=void 0)}}const Jt={hasAnimatedSinceResize:!0,hasEverUpdated:!1},xe=["","X","Y","Z"],Zl=1e3;let Jl=0;function Te(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function po(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=ki(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:r}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",M,!(i||r))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&po(s)}function mo({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(o={},a=e==null?void 0:e()){this.id=Jl++,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(ec),this.nodes.forEach(oc),this.nodes.forEach(rc),this.nodes.forEach(nc)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Xl)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new tn),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=Tn(o)&&!tl(o),this.instance=o;const{layoutId:a,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),t){let c,h=0;const f=()=>this.root.updateBlockedByResize=!1;M.read(()=>{h=window.innerWidth}),t(o,()=>{const d=window.innerWidth;d!==h&&(h=d,this.root.updateBlockedByResize=!0,c&&c(),c=Yl(f,250),Jt.hasAnimatedSinceResize&&(Jt.hasAnimatedSinceResize=!1,this.nodes.forEach(bs)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:h,hasRelativeLayoutChanged:f,layout:d})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||u.getDefaultTransition()||hc,{onLayoutAnimationStart:m,onLayoutAnimationComplete:g}=u.getProps(),y=!this.targetLayout||!uo(this.targetLayout,d),x=!h&&f;if(this.options.layoutRoot||this.resumeFrom||x||h&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...dn(p,"layout"),onPlay:m,onComplete:g};(u.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(c,x)}else h||bs(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=d})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),rt(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(ac),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&po(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const h=this.path[c];h.shouldResetTransform=!0,(typeof h.latestValues.x=="string"||typeof h.latestValues.y=="string")&&(h.isLayoutDirty=!0),h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Ss);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Ps);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(ic),this.nodes.forEach(Ql),this.nodes.forEach(tc)):this.nodes.forEach(Ps),this.clearAllSnapshots();const a=N.now();O.delta=J(0,1e3/60,a-O.timestamp),O.timestamp=a,O.isProcessing=!0,he.update.process(O),he.preRender.process(O),he.render.process(O),O.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,vn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(sc),this.sharedNodes.forEach(lc)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,M.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){M.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!U(this.snapshot.measuredBox.x)&&!U(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=F(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const l=s(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!co(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;o&&this.instance&&(a||ut(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),fc(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:o}=this.options;if(!o)return F();const a=o.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(dc))){const{scroll:c}=this.root;c&&(xt(a.x,c.offset.x),xt(a.y,c.offset.y))}return a}removeElementScroll(o){var l;const a=F();if(G(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;for(let u=0;u<this.path.length;u++){const c=this.path[u],{scroll:h,options:f}=c;c!==this.root&&h&&f.layoutScroll&&(h.wasRoot&&G(a,o),xt(a.x,h.offset.x),xt(a.y,h.offset.y))}return a}applyTransform(o,a=!1){var u,c;const l=F();G(l,o);for(let h=0;h<this.path.length;h++){const f=this.path[h];!a&&f.options.layoutScroll&&f.scroll&&f!==f.root&&Tt(l,{x:-f.scroll.offset.x,y:-f.scroll.offset.y}),ut(f.latestValues)&&Tt(l,f.latestValues,(u=f.layout)==null?void 0:u.layoutBox)}return ut(this.latestValues)&&Tt(l,this.latestValues,(c=this.layout)==null?void 0:c.layoutBox),l}removeTransform(o){var l;const a=F();G(a,o);for(let u=0;u<this.path.length;u++){const c=this.path[u];if(!ut(c.latestValues))continue;let h;c.instance&&(Ge(c.latestValues)&&c.updateSnapshot(),h=F(),G(h,c.measurePageBox())),ds(a,c.latestValues,(l=c.snapshot)==null?void 0:l.layoutBox,h)}return ut(this.latestValues)&&ds(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==O.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var d;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(d=this.parent)!=null&&d.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:h}=this.options;if(!this.layout||!(c||h))return;this.resolvedRelativeTargetAt=O.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=F(),this.targetWithTransforms=F()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Bl(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):G(this.target,this.layout.layoutBox),Zi(this.target,this.targetDelta)):G(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Ge(this.parent.latestValues)||qi(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,a,l){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=F(),this.relativeTargetOrigin=F(),oe(this.relativeTargetOrigin,a,l),G(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var p;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(p=this.parent)!=null&&p.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===O.timestamp&&(l=!1),l)return;const{layout:u,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||c))return;G(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;hl(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=F());const{target:d}=o;if(!d){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(as(this.prevProjectionDelta.x,this.projectionDelta.x),as(this.prevProjectionDelta.y,this.projectionDelta.y)),Rt(this.projectionDelta,this.layoutCorrected,d,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!vs(this.projectionDelta.x,this.prevProjectionDelta.x)||!vs(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",d))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=vt(),this.projectionDelta=vt(),this.projectionDeltaWithTransform=vt()}setAnimationOrigin(o,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},h=vt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=F(),d=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=d!==p,g=this.getStack(),y=!g||g.members.length<=1,x=!!(m&&!y&&this.options.crossfade===!0&&!this.path.some(uc));this.animationProgress=0;let v;this.mixTargetDelta=S=>{const P=S/1e3;As(h.x,o.x,P),As(h.y,o.y,P),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(oe(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),cc(this.relativeTarget,this.relativeTargetOrigin,f,P),v&&Ul(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=F()),G(v,this.relativeTarget)),m&&(this.animationValues=c,$l(c,u,this.latestValues,P,x,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=P},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l,u;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(u=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||u.stop(),this.pendingAnimation&&(rt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=M.update(()=>{Jt.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Pt(0)),this.motionValue.jump(0,!1),this.currentAnimation=Hl(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:c=>{this.mixTargetDelta(c),o.onUpdate&&o.onUpdate(c)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Zl),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&go(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||F();const h=U(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+h;const f=U(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+f}G(a,l),Tt(a,c),Rt(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new ql),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&Te("z",o,u,this.animationValues);for(let c=0;c<xe.length;c++)Te(`rotate${xe[c]}`,o,u,this.animationValues),Te(`skew${xe[c]}`,o,u,this.animationValues);o.render();for(const c in u)o.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=Zt(a==null?void 0:a.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=Zt(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!ut(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let h=Wl(this.projectionDeltaWithTransform,this.treeScale,c);l&&(h=l(c,h)),o.transform=h;const{x:f,y:d}=this.projectionDelta;o.transformOrigin=`${f.origin*100}% ${d.origin*100}% 0`,u.animationValues?o.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:o.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const p in _e){if(c[p]===void 0)continue;const{correct:m,applyTo:g,isCSSVariable:y}=_e[p],x=h==="none"?c[p]:m(c[p],u);if(g){const v=g.length;for(let S=0;S<v;S++)o[g[S]]=x}else y?this.options.visualElement.renderState.vars[p]=x:o[p]=x}this.options.layoutId&&(o.pointerEvents=u===this?Zt(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(Ss),this.root.sharedNodes.clear()}}}function Ql(t){t.updateLayout()}function tc(t){var n;const e=((n=t.resumeFrom)==null?void 0:n.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:i}=t.layout,{animationType:r}=t.options,o=e.source!==t.layout.source;r==="size"?q(h=>{const f=o?e.measuredBox[h]:e.layoutBox[h],d=U(f);f.min=s[h].min,f.max=f.min+d}):go(r,e.layoutBox,s)&&q(h=>{const f=o?e.measuredBox[h]:e.layoutBox[h],d=U(s[h]);f.max=f.min+d,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[h].max=t.relativeTarget[h].min+d)});const a=vt();Rt(a,s,e.layoutBox);const l=vt();o?Rt(l,t.applyTransform(i,!0),e.measuredBox):Rt(l,s,e.layoutBox);const u=!co(a);let c=!1;if(!t.resumeFrom){const h=t.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:f,layout:d}=h;if(f&&d){const p=F();oe(p,e.layoutBox,f.layoutBox);const m=F();oe(m,s,d.layoutBox),uo(p,m)||(c=!0),h.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=p,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:e,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function ec(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 nc(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function sc(t){t.clearSnapshot()}function Ss(t){t.clearMeasurements()}function Ps(t){t.isLayoutDirty=!1}function ic(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function bs(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function oc(t){t.resolveTargetDelta()}function rc(t){t.calcProjection()}function ac(t){t.resetSkewAndRotation()}function lc(t){t.removeLeadSnapshot()}function As(t,e,n){t.translate=E(e.translate,0,n),t.scale=E(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Vs(t,e,n,s){t.min=E(e.min,n.min,s),t.max=E(e.max,n.max,s)}function cc(t,e,n,s){Vs(t.x,e.x,n.x,s),Vs(t.y,e.y,n.y,s)}function uc(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const hc={duration:.45,ease:[.4,0,.1,1]},Cs=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Ms=Cs("applewebkit/")&&!Cs("chrome/")?Math.round:z;function Ds(t){t.min=Ms(t.min),t.max=Ms(t.max)}function fc(t){Ds(t.x),Ds(t.y)}function go(t,e,n){return t==="position"||t==="preserve-aspect"&&!Il(ys(e),ys(n),.2)}function dc(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}const pc=mo({attachResizeListener:(t,e)=>Bt(t,"resize",e),measureScroll:()=>{var t,e;return{x:document.documentElement.scrollLeft||((t=document.body)==null?void 0:t.scrollLeft)||0,y:document.documentElement.scrollTop||((e=document.body)==null?void 0:e.scrollTop)||0}},checkIsScrollRoot:()=>!0}),we={current:void 0},yo=mo({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!we.current){const t=new pc({});t.mount(window),t.setOptions({layoutScroll:!0}),we.current=t}return we.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),An=T.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function Es(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function mc(...t){return e=>{let n=!1;const s=t.map(i=>{const r=Es(i,e);return!n&&typeof r=="function"&&(n=!0),r});if(n)return()=>{for(let i=0;i<s.length;i++){const r=s[i];typeof r=="function"?r():Es(t[i],null)}}}}function gc(...t){return T.useCallback(mc(...t),t)}class yc extends T.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(_t(n)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const s=n.offsetParent,i=_t(s)&&s.offsetWidth||0,r=_t(s)&&s.offsetHeight||0,o=getComputedStyle(n),a=this.props.sizeRef.current;a.height=parseFloat(o.height),a.width=parseFloat(o.width),a.top=n.offsetTop,a.left=n.offsetLeft,a.right=i-a.width-a.left,a.bottom=r-a.height-a.top}return null}componentDidUpdate(){}render(){return this.props.children}}function vc({children:t,isPresent:e,anchorX:n,anchorY:s,root:i,pop:r}){var f;const o=T.useId(),a=T.useRef(null),l=T.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:u}=T.useContext(An),c=((f=t.props)==null?void 0:f.ref)??(t==null?void 0:t.ref),h=gc(a,c);return T.useInsertionEffect(()=>{const{width:d,height:p,top:m,left:g,right:y,bottom:x}=l.current;if(e||r===!1||!a.current||!d||!p)return;const v=n==="left"?`left: ${g}`:`right: ${y}`,S=s==="bottom"?`bottom: ${x}`:`top: ${m}`;a.current.dataset.motionPopId=o;const P=document.createElement("style");u&&(P.nonce=u);const C=i??document.head;return C.appendChild(P),P.sheet&&P.sheet.insertRule(`
|
|
2
|
+
[data-motion-pop-id="${o}"] {
|
|
3
|
+
position: absolute !important;
|
|
4
|
+
width: ${d}px !important;
|
|
5
|
+
height: ${p}px !important;
|
|
6
|
+
${v}px !important;
|
|
7
|
+
${S}px !important;
|
|
8
|
+
}
|
|
9
|
+
`),()=>{C.contains(P)&&C.removeChild(P)}},[e]),et.jsx(yc,{isPresent:e,childRef:a,sizeRef:l,pop:r,children:r===!1?t:T.cloneElement(t,{ref:h})})}const xc=({children:t,initial:e,isPresent:n,onExitComplete:s,custom:i,presenceAffectsLayout:r,mode:o,anchorX:a,anchorY:l,root:u})=>{const c=Ze(Tc),h=T.useId();let f=!0,d=T.useMemo(()=>(f=!1,{id:h,initial:e,isPresent:n,custom:i,onExitComplete:p=>{c.set(p,!0);for(const m of c.values())if(!m)return;s&&s()},register:p=>(c.set(p,!1),()=>c.delete(p))}),[n,c,s]);return r&&f&&(d={...d}),T.useMemo(()=>{c.forEach((p,m)=>c.set(m,!1))},[n]),T.useEffect(()=>{!n&&!c.size&&s&&s()},[n]),t=et.jsx(vc,{pop:o==="popLayout",isPresent:n,anchorX:a,anchorY:l,root:u,children:t}),et.jsx(ae.Provider,{value:d,children:t})};function Tc(){return new Map}function vo(t=!0){const e=T.useContext(ae);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=e,r=T.useId();T.useEffect(()=>{if(t)return i(r)},[t]);const o=T.useCallback(()=>t&&s&&s(r),[r,s,t]);return!n&&s?[!1,o]:[!0]}const $t=t=>t.key||"";function Rs(t){const e=[];return T.Children.forEach(t,n=>{T.isValidElement(n)&&e.push(n)}),e}const Ru=({children:t,custom:e,initial:n=!0,onExitComplete:s,presenceAffectsLayout:i=!0,mode:r="sync",propagate:o=!1,anchorX:a="left",anchorY:l="top",root:u})=>{const[c,h]=vo(o),f=T.useMemo(()=>Rs(t),[t]),d=o&&!c?[]:f.map($t),p=T.useRef(!0),m=T.useRef(f),g=Ze(()=>new Map),y=T.useRef(new Set),[x,v]=T.useState(f),[S,P]=T.useState(f);Gs(()=>{p.current=!1,m.current=f;for(let A=0;A<S.length;A++){const V=$t(S[A]);d.includes(V)?(g.delete(V),y.current.delete(V)):g.get(V)!==!0&&g.set(V,!1)}},[S,d.length,d.join("-")]);const C=[];if(f!==x){let A=[...f];for(let V=0;V<S.length;V++){const b=S[V],D=$t(b);d.includes(D)||(A.splice(V,0,b),C.push(b))}return r==="wait"&&C.length&&(A=C),P(Rs(A)),v(f),null}const{forceRender:L}=T.useContext(qe);return et.jsx(et.Fragment,{children:S.map(A=>{const V=$t(A),b=o&&!c?!1:f===S||d.includes(V),D=()=>{if(y.current.has(V))return;if(y.current.add(V),g.has(V))g.set(V,!0);else return;let I=!0;g.forEach(Q=>{Q||(I=!1)}),I&&(L==null||L(),P(m.current),o&&(h==null||h()),s&&s())};return et.jsx(xc,{isPresent:b,initial:!p.current||n?void 0:!1,custom:e,presenceAffectsLayout:i,mode:r,root:u,onExitComplete:b?void 0:D,anchorX:a,anchorY:l,children:A},V)})})},xo=T.createContext({strict:!1}),Ls={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let ks=!1;function wc(){if(ks)return;const t={};for(const e in Ls)t[e]={isEnabled:n=>Ls[e].some(s=>!!n[s])};_i(t),ks=!0}function To(){return wc(),al()}function Sc(t){const e=To();for(const n in t)e[n]={...e[n],...t[n]};_i(e)}const Pc=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 re(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Pc.has(t)}let wo=t=>!re(t);function bc(t){typeof t=="function"&&(wo=e=>e.startsWith("on")?!re(e):t(e))}try{bc(require("@emotion/is-prop-valid").default)}catch{}function Ac(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(wo(i)||n===!0&&re(i)||!e&&!re(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}const ue=T.createContext({});function Vc(t,e){if(ce(t)){const{initial:n,animate:s}=t;return{initial:n===!1||It(n)?n:void 0,animate:It(s)?s:void 0}}return t.inherit!==!1?e:{}}function Cc(t){const{initial:e,animate:n}=Vc(t,T.useContext(ue));return T.useMemo(()=>({initial:e,animate:n}),[Fs(e),Fs(n)])}function Fs(t){return Array.isArray(t)?t.join(" "):t}const Vn=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function So(t,e,n){for(const s in e)!j(e[s])&&!to(s,n)&&(t[s]=e[s])}function Mc({transformTemplate:t},e){return T.useMemo(()=>{const n=Vn();return Pn(n,e,t),Object.assign({},n.vars,n.style)},[e])}function Dc(t,e){const n=t.style||{},s={};return So(s,n,t),Object.assign(s,Mc(t,e)),s}function Ec(t,e){const n={},s=Dc(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=s,n}const Po=()=>({...Vn(),attrs:{}});function Rc(t,e,n,s){const i=T.useMemo(()=>{const r=Po();return eo(r,e,so(s),t.transformTemplate,t.style),{...r.attrs,style:{...r.style}}},[e]);if(t.style){const r={};So(r,t.style,t),i.style={...r,...i.style}}return i}const Lc=["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 Cn(t){return typeof t!="string"||t.includes("-")?!1:!!(Lc.indexOf(t)>-1||/[A-Z]/u.test(t))}function kc(t,e,n,{latestValues:s},i,r=!1,o){const l=(o??Cn(t)?Rc:Ec)(e,s,i,t),u=Ac(e,typeof t=="string",r),c=t!==T.Fragment?{...u,...l,ref:n}:{},{children:h}=e,f=T.useMemo(()=>j(h)?h.get():h,[h]);return T.createElement(t,{...c,children:f})}function Fc({scrapeMotionValuesFromProps:t,createRenderState:e},n,s,i){return{latestValues:Ic(n,s,i,t),renderState:e()}}function Ic(t,e,n,s){const i={},r=s(t,{});for(const f in r)i[f]=Zt(r[f]);let{initial:o,animate:a}=t;const l=ce(t),u=Gi(t);e&&u&&!l&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let c=n?n.initial===!1:!1;c=c||o===!1;const h=c?a:o;if(h&&typeof h!="boolean"&&!le(h)){const f=Array.isArray(h)?h:[h];for(let d=0;d<f.length;d++){const p=mn(t,f[d]);if(p){const{transitionEnd:m,transition:g,...y}=p;for(const x in y){let v=y[x];if(Array.isArray(v)){const S=c?v.length-1:0;v=v[S]}v!==null&&(i[x]=v)}for(const x in m)i[x]=m[x]}}}return i}const bo=t=>(e,n)=>{const s=T.useContext(ue),i=T.useContext(ae),r=()=>Fc(t,e,s,i);return n?r():Ze(r)},Bc=bo({scrapeMotionValuesFromProps:bn,createRenderState:Vn}),Oc=bo({scrapeMotionValuesFromProps:io,createRenderState:Po}),jc=Symbol.for("motionComponentSymbol");function Nc(t,e,n){const s=T.useRef(n);T.useInsertionEffect(()=>{s.current=n});const i=T.useRef(null);return T.useCallback(r=>{var a;r&&((a=t.onMount)==null||a.call(t,r));const o=s.current;if(typeof o=="function")if(r){const l=o(r);typeof l=="function"&&(i.current=l)}else i.current?(i.current(),i.current=null):o(r);else o&&(o.current=r);e&&(r?e.mount(r):e.unmount())},[e])}const Ao=T.createContext({});function mt(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Uc(t,e,n,s,i,r){var v,S;const{visualElement:o}=T.useContext(ue),a=T.useContext(xo),l=T.useContext(ae),u=T.useContext(An),c=u.reducedMotion,h=u.skipAnimations,f=T.useRef(null),d=T.useRef(!1);s=s||a.renderer,!f.current&&s&&(f.current=s(t,{visualState:e,parent:o,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c,skipAnimations:h,isSVG:r}),d.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));const p=f.current,m=T.useContext(Ao);p&&!p.projection&&i&&(p.type==="html"||p.type==="svg")&&Wc(f.current,n,i,m);const g=T.useRef(!1);T.useInsertionEffect(()=>{p&&g.current&&p.update(n,l)});const y=n[Li],x=T.useRef(!!y&&typeof window<"u"&&!((v=window.MotionHandoffIsComplete)!=null&&v.call(window,y))&&((S=window.MotionHasOptimisedAnimation)==null?void 0:S.call(window,y)));return Gs(()=>{d.current=!0,p&&(g.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),p.scheduleRenderMicrotask(),x.current&&p.animationState&&p.animationState.animateChanges())}),T.useEffect(()=>{p&&(!x.current&&p.animationState&&p.animationState.animateChanges(),x.current&&(queueMicrotask(()=>{var P;(P=window.MotionHandoffMarkAsComplete)==null||P.call(window,y)}),x.current=!1),p.enteringChildren=void 0)}),p}function Wc(t,e,n,s){const{layoutId:i,layout:r,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:Vo(t.parent)),t.projection.setOptions({layoutId:i,layout:r,alwaysMeasureLayout:!!o||a&&mt(a),visualElement:t,animationType:typeof r=="string"?r:"both",initialPromotionConfig:s,crossfade:c,layoutScroll:l,layoutRoot:u})}function Vo(t){if(t)return t.options.allowProjection!==!1?t.projection:Vo(t.parent)}function Se(t,{forwardMotionProps:e=!1,type:n}={},s,i){s&&Sc(s);const r=n?n==="svg":Cn(t),o=r?Oc:Bc;function a(u,c){let h;const f={...T.useContext(An),...u,layoutId:Kc(u)},{isStatic:d}=f,p=Cc(u),m=o(u,d);if(!d&&typeof window<"u"){$c();const g=zc(f);h=g.MeasureLayout,p.visualElement=Uc(t,m,f,i,g.ProjectionNode,r)}return et.jsxs(ue.Provider,{value:p,children:[h&&p.visualElement?et.jsx(h,{visualElement:p.visualElement,...f}):null,kc(t,u,Nc(m,p.visualElement,c),m,d,e,r)]})}a.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const l=T.forwardRef(a);return l[jc]=t,l}function Kc({layoutId:t}){const e=T.useContext(qe).id;return e&&t!==void 0?e+"-"+t:t}function $c(t,e){T.useContext(xo).strict}function zc(t){const e=To(),{drag:n,layout:s}=e;if(!n&&!s)return{};const i={...n,...s};return{MeasureLayout:n!=null&&n.isEnabled(t)||s!=null&&s.isEnabled(t)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function Gc(t,e){if(typeof Proxy>"u")return Se;const n=new Map,s=(r,o)=>Se(r,o,t,e),i=(r,o)=>s(r,o);return new Proxy(i,{get:(r,o)=>o==="create"?s:(n.has(o)||n.set(o,Se(o,void 0,t,e)),n.get(o))})}const Hc=(t,e)=>e.isSVG??Cn(t)?new bl(e):new vl(e,{allowProjection:t!==T.Fragment});class _c extends at{constructor(e){super(e),e.animationState||(e.animationState=Dl(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();le(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)==null||e.call(this)}}let Xc=0;class Yc extends at{constructor(){super(...arguments),this.id=Xc++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>{n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const qc={animation:{Feature:_c},exit:{Feature:Yc}};function Ut(t){return{point:{x:t.pageX,y:t.pageY}}}const Zc=t=>e=>xn(e)&&t(e,Ut(e));function Lt(t,e,n,s){return Bt(t,e,Zc(n),s)}const Co=({current:t})=>t?t.ownerDocument.defaultView:null,Is=(t,e)=>Math.abs(t-e);function Jc(t,e){const n=Is(t.x,e.x),s=Is(t.y,e.y);return Math.sqrt(n**2+s**2)}const Bs=new Set(["auto","scroll"]);class Mo{constructor(e,n,{transformPagePoint:s,contextWindow:i=window,dragSnapToOrigin:r=!1,distanceThreshold:o=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=d=>{this.handleScroll(d.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=zt(this.lastRawMoveEventInfo,this.transformPagePoint));const d=Pe(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,m=Jc(d.offset,{x:0,y:0})>=this.distanceThreshold;if(!p&&!m)return;const{point:g}=d,{timestamp:y}=O;this.history.push({...g,timestamp:y});const{onStart:x,onMove:v}=this.handlers;p||(x&&x(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,d)},this.handlePointerMove=(d,p)=>{this.lastMoveEvent=d,this.lastRawMoveEventInfo=p,this.lastMoveEventInfo=zt(p,this.transformPagePoint),M.update(this.updatePoint,!0)},this.handlePointerUp=(d,p)=>{this.end();const{onEnd:m,onSessionEnd:g,resumeAnimation:y}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=Pe(d.type==="pointercancel"?this.lastMoveEventInfo:zt(p,this.transformPagePoint),this.history);this.startEvent&&m&&m(d,x),g&&g(d,x)},!xn(e))return;this.dragSnapToOrigin=r,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=o,this.contextWindow=i||window;const l=Ut(e),u=zt(l,this.transformPagePoint),{point:c}=u,{timestamp:h}=O;this.history=[{...c,timestamp:h}];const{onSessionStart:f}=n;f&&f(e,Pe(u,this.history)),this.removeListeners=Ot(Lt(this.contextWindow,"pointermove",this.handlePointerMove),Lt(this.contextWindow,"pointerup",this.handlePointerUp),Lt(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(e){let n=e.parentElement;for(;n;){const s=getComputedStyle(n);(Bs.has(s.overflowX)||Bs.has(s.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){const n=this.scrollPositions.get(e);if(!n)return;const s=e===window,i=s?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},r={x:i.x-n.x,y:i.y-n.y};r.x===0&&r.y===0||(s?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=r.x,this.lastMoveEventInfo.point.y+=r.y):this.history.length>0&&(this.history[0].x-=r.x,this.history[0].y-=r.y),this.scrollPositions.set(e,i),M.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),rt(this.updatePoint)}}function zt(t,e){return e?{point:e(t.point)}:t}function Os(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Pe({point:t},e){return{point:t,delta:Os(t,Do(e)),offset:Os(t,Qc(e)),velocity:tu(e,.1)}}function Qc(t){return t[0]}function Do(t){return t[t.length-1]}function tu(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=Do(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>W(e)));)n--;if(!s)return{x:0,y:0};s===t[0]&&t.length>2&&i.timestamp-s.timestamp>W(e)*2&&(s=t[1]);const r=$(i.timestamp-s.timestamp);if(r===0)return{x:0,y:0};const o={x:(i.x-s.x)/r,y:(i.y-s.y)/r};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function eu(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?E(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?E(n,t,s.max):Math.min(t,n)),t}function js(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function nu(t,{top:e,left:n,bottom:s,right:i}){return{x:js(t.x,n,i),y:js(t.y,e,s)}}function Ns(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}function su(t,e){return{x:Ns(t.x,e.x),y:Ns(t.y,e.y)}}function iu(t,e){let n=.5;const s=U(t),i=U(e);return i>s?n=kt(e.min,e.max-s,t.min):s>i&&(n=kt(t.min,t.max-i,e.min)),J(0,1,n)}function ou(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const Xe=.35;function ru(t=Xe){return t===!1?t=0:t===!0&&(t=Xe),{x:Us(t,"left","right"),y:Us(t,"top","bottom")}}function Us(t,e,n){return{min:Ws(t,e),max:Ws(t,n)}}function Ws(t,e){return typeof t=="number"?t:t[e]||0}const au=new WeakMap;class lu{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=F(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:s}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const r=h=>{n&&this.snapToCursor(Ut(h).point),this.stopAnimation()},o=(h,f)=>{const{drag:d,dragPropagation:p,onDragStart:m}=this.getProps();if(d&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Oa(d),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),q(y=>{let x=this.getAxisMotionValue(y).get()||0;if(Z.test(x)){const{projection:v}=this.visualElement;if(v&&v.layout){const S=v.layout.layoutBox[y];S&&(x=U(S)*(parseFloat(x)/100))}}this.originPoint[y]=x}),m&&M.update(()=>m(h,f),!1,!0),Ue(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},a=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f;const{dragPropagation:d,dragDirectionLock:p,onDirectionLock:m,onDrag:g}=this.getProps();if(!d&&!this.openDragLock)return;const{offset:y}=f;if(p&&this.currentDirection===null){this.currentDirection=uu(y),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",f.point,y),this.updateAxis("y",f.point,y),this.visualElement.render(),g&&M.update(()=>g(h,f),!1,!0)},l=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f,this.stop(h,f),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>{const{dragSnapToOrigin:h}=this.getProps();(h||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:c}=this.getProps();this.panSession=new Mo(e,{onSessionStart:r,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:s,contextWindow:Co(this.visualElement),element:this.visualElement.current})}stop(e,n){const s=e||this.latestPointerEvent,i=n||this.latestPanInfo,r=this.isDragging;if(this.cancel(),!r||!i||!s)return;const{velocity:o}=i;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&M.postRender(()=>a(s,i))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!Gt(e,i,this.currentDirection))return;const r=this.getAxisMotionValue(e);let o=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(o=eu(o,this.constraints[e],this.elastic[e])),r.set(o)}resolveConstraints(){var r;const{dragConstraints:e,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(r=this.visualElement.projection)==null?void 0:r.layout,i=this.constraints;e&&mt(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=nu(s.layoutBox,e):this.constraints=!1,this.elastic=ru(n),i!==this.constraints&&!mt(e)&&s&&this.constraints&&!this.hasMutatedConstraints&&q(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=ou(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!mt(e))return!1;const s=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const r=fl(s,i.root,this.visualElement.getTransformPagePoint());let o=su(i.layout.layoutBox,r);if(n){const a=n(cl(o));this.hasMutatedConstraints=!!a,a&&(o=Yi(a))}return o}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=q(c=>{if(!Gt(c,n,this.currentDirection))return;let h=l&&l[c]||{};o&&(h={min:0,max:0});const f=i?200:1e6,d=i?40:1e7,p={type:"inertia",velocity:s?e[c]:0,bounceStiffness:f,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...r,...h};return this.startAxisValueAnimation(c,p)});return Promise.all(u).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return Ue(this.visualElement,e),s.start(pn(e,s,0,n,this.visualElement,!1))}stopAnimation(){q(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){q(n=>{const{drag:s}=this.getProps();if(!Gt(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,r=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n],l=r.get()||0;r.set(e[n]-E(o,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!mt(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};q(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=iu({min:l,max:l},this.constraints[o])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.constraints=!1,this.resolveConstraints(),q(o=>{if(!Gt(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(E(l,u,i[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;au.set(this.visualElement,this);const e=this.visualElement.current,n=Lt(e,"pointerdown",u=>{const{drag:c,dragListener:h=!0}=this.getProps(),f=u.target,d=f!==e&&$a(f);c&&h&&!d&&this.start(u)});let s;const i=()=>{const{dragConstraints:u}=this.getProps();mt(u)&&u.current&&(this.constraints=this.resolveRefConstraints(),s||(s=cu(e,u.current,()=>this.scalePositionWithinConstraints())))},{projection:r}=this.visualElement,o=r.addEventListener("measure",i);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),M.read(i);const a=Bt(window,"resize",()=>this.scalePositionWithinConstraints()),l=r.addEventListener("didUpdate",(({delta:u,hasLayoutChanged:c})=>{this.isDragging&&c&&(q(h=>{const f=this.getAxisMotionValue(h);f&&(this.originPoint[h]+=u[h].translate,f.set(f.get()+u[h].translate))}),this.visualElement.render())}));return()=>{a(),n(),o(),l&&l(),s&&s()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:r=!1,dragElastic:o=Xe,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:r,dragElastic:o,dragMomentum:a}}}function Ks(t){let e=!0;return()=>{if(e){e=!1;return}t()}}function cu(t,e,n){const s=Xn(t,Ks(n)),i=Xn(e,Ks(n));return()=>{s(),i()}}function Gt(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function uu(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class hu extends at{constructor(e){super(e),this.removeGroupControls=z,this.removeListeners=z,this.controls=new lu(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||z}update(){const{dragControls:e}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};e!==n&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const be=t=>(e,n)=>{t&&M.update(()=>t(e,n),!1,!0)};class fu extends at{constructor(){super(...arguments),this.removePointerDownListener=z}onPointerDown(e){this.session=new Mo(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Co(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:be(e),onStart:be(n),onMove:be(s),onEnd:(r,o)=>{delete this.session,i&&M.postRender(()=>i(r,o))}}}mount(){this.removePointerDownListener=Lt(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Ae=!1;class du extends T.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:r}=e;r&&(n.group&&n.group.add(r),s&&s.register&&i&&s.register(r),Ae&&r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Jt.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:r}=this.props,{projection:o}=s;return o&&(o.isPresent=r,e.layoutDependency!==n&&o.setOptions({...o.options,layoutDependency:n}),Ae=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==r?o.willUpdate():this.safeToRemove(),e.isPresent!==r&&(r?o.promote():o.relegate()||M.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),vn.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;Ae=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Eo(t){const[e,n]=vo(),s=T.useContext(qe);return et.jsx(du,{...t,layoutGroup:s,switchLayoutGroup:T.useContext(Ao),isPresent:e,safeToRemove:n})}const pu={pan:{Feature:fu},drag:{Feature:hu,ProjectionNode:yo,MeasureLayout:Eo}};function $s(t,e,n){const{props:s}=t;t.animationState&&s.whileHover&&t.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,r=s[i];r&&M.postRender(()=>r(e,Ut(e)))}class mu extends at{mount(){const{current:e}=this.node;e&&(this.unmount=Na(e,(n,s)=>($s(this.node,s,"Start"),i=>$s(this.node,i,"End"))))}unmount(){}}class gu extends at{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Ot(Bt(this.node.current,"focus",()=>this.onFocus()),Bt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function zs(t,e,n){const{props:s}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&s.whileTap&&t.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),r=s[i];r&&M.postRender(()=>r(e,Ut(e)))}class yu extends at{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:n,propagate:s}=this.node.props;this.unmount=Ga(e,(i,r)=>(zs(this.node,r,"Start"),(o,{success:a})=>zs(this.node,o,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(s==null?void 0:s.tap)===!1})}unmount(){}}const Ye=new WeakMap,Ve=new WeakMap,vu=t=>{const e=Ye.get(t.target);e&&e(t)},xu=t=>{t.forEach(vu)};function Tu({root:t,...e}){const n=t||document;Ve.has(n)||Ve.set(n,{});const s=Ve.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(xu,{root:t,...e})),s[i]}function wu(t,e,n){const s=Tu(e);return Ye.set(t,n),s.observe(t),()=>{Ye.delete(t),s.unobserve(t)}}const Su={some:0,all:1};class Pu extends at{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:r}=e,o={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:Su[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,r&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:h}=this.node.getProps(),f=u?c:h;f&&f(l)};return wu(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(bu(e,n))&&this.startObserver()}unmount(){}}function bu({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Au={inView:{Feature:Pu},tap:{Feature:yu},focus:{Feature:gu},hover:{Feature:mu}},Vu={layout:{ProjectionNode:yo,MeasureLayout:Eo}},Cu={...qc,...Au,...pu,...Vu},Lu=Gc(Cu,Hc);export{Ru as A,Lu as m};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{c as e}from"./index-NatBSFxj.js";/**
|
|
2
|
+
* @license lucide-react v0.513.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const t=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],o=e("square",t);export{o as S};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{c}from"./index-NatBSFxj.js";/**
|
|
2
|
+
* @license lucide-react v0.513.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],o=c("target",e);export{o as T};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{c as e}from"./index-NatBSFxj.js";/**
|
|
2
|
+
* @license lucide-react v0.513.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const c=[["circle",{cx:"9",cy:"12",r:"3",key:"u3jwor"}],["rect",{width:"20",height:"14",x:"2",y:"5",rx:"7",key:"g7kal2"}]],r=e("toggle-left",c);/**
|
|
7
|
+
* @license lucide-react v0.513.0 - ISC
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the ISC license.
|
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/const t=[["circle",{cx:"15",cy:"12",r:"3",key:"1afu0r"}],["rect",{width:"20",height:"14",x:"2",y:"5",rx:"7",key:"g7kal2"}]],g=e("toggle-right",t);export{g as T,r as a};
|