@usine/server 0.4.0 → 0.4.1-next.241.gf648872

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.
Files changed (138) hide show
  1. package/dist/web/assets/CompositeItem-DL5QWzlf.js +1 -0
  2. package/dist/web/assets/ToolbarRootContext-aq6udDVh.js +1 -0
  3. package/dist/web/assets/X.es-ClvLjC9g.js +1 -0
  4. package/dist/web/assets/_agent-DtbWtI4O.js +1 -0
  5. package/dist/web/assets/_loop-CPLcEe-u.js +1 -0
  6. package/dist/web/assets/_name-B-JwwOOx.js +1 -0
  7. package/dist/web/assets/_name-BHymV4y2.js +1 -0
  8. package/dist/web/assets/_name-DHT3Z3pi.js +1 -0
  9. package/dist/web/assets/_name-DOdPCzeN.js +1 -0
  10. package/dist/web/assets/_name-LDfdPJ04.js +6 -0
  11. package/dist/web/assets/_number-CXWY3_sQ.js +1 -0
  12. package/dist/web/assets/_number-DHT3Z3pi.js +1 -0
  13. package/dist/web/assets/_number-DdcjkCP5.js +1 -0
  14. package/dist/web/assets/_run-ChuAgP8W.js +8 -0
  15. package/dist/web/assets/_run-DHT3Z3pi.js +1 -0
  16. package/dist/web/assets/_worker-ve1pwBJ6.js +1 -0
  17. package/dist/web/assets/action-Bma79eWY.js +1 -0
  18. package/dist/web/assets/agents-BXym4S3E.js +1 -0
  19. package/dist/web/assets/agents-WFIojkKz.js +1 -0
  20. package/dist/web/assets/boot-screen-Su4MyrBh.js +1 -0
  21. package/dist/web/assets/button-4rhhIcK8.js +1 -0
  22. package/dist/web/assets/collapsible-CTA-Hwrn.js +1 -0
  23. package/dist/web/assets/{core-wi-Hu_JV.js → core-S_rVxu-b.js} +1 -1
  24. package/dist/web/assets/drawer-Dw6v2BLr.js +1 -0
  25. package/dist/web/assets/dropdown-menu-B5_S4hH-.js +1 -0
  26. package/dist/web/assets/edit-and-retry-CzObi4mf.js +1 -0
  27. package/dist/web/assets/empty-B9bymfss.js +1 -0
  28. package/dist/web/assets/error-alert-NXb1Z8Xz.js +1 -0
  29. package/dist/web/assets/{file-error-SjG2jLJ9.js → file-error-C2s0qbxi.js} +1 -1
  30. package/dist/web/assets/fill-cell-CjksmixH.js +1 -0
  31. package/dist/web/assets/heading-Bp50m3v1.js +1 -0
  32. package/dist/web/assets/index-CPkHl5O3.js +10 -0
  33. package/dist/web/assets/index-jplYOAsa.css +2 -0
  34. package/dist/web/assets/label-badge-DIiohsEI.js +1 -0
  35. package/dist/web/assets/link-C7GfYrMt.js +1 -0
  36. package/dist/web/assets/list-wEAoFt_l.js +1 -0
  37. package/dist/web/assets/loops-xOfOUTbc.js +1 -0
  38. package/dist/web/assets/{markdown-BnyfnuCL.js → markdown-BNebzGGH.js} +3 -3
  39. package/dist/web/assets/matchContext-D_B3XAQH.js +2 -0
  40. package/dist/web/assets/model-DXxFqTtA.js +1 -0
  41. package/dist/web/assets/moves-D_bvNew_.js +1 -0
  42. package/dist/web/assets/not-found-CTNKT4RI.js +1 -0
  43. package/dist/web/assets/outcome-o7LagK-q.js +5 -0
  44. package/dist/web/assets/overview-BdUgx_pE.js +1 -0
  45. package/dist/web/assets/page-BuzrT_cg.js +1 -0
  46. package/dist/web/assets/project-not-found-CutZoVCI.js +1 -0
  47. package/dist/web/assets/pull-request-marks-BLxcb-0V.js +1 -0
  48. package/dist/web/assets/queries-BnlycW8v.js +1 -0
  49. package/dist/web/assets/queries-BwtMk72-.js +1 -0
  50. package/dist/web/assets/reload-yp-6_O8x.js +1 -0
  51. package/dist/web/assets/repositories-MlGwURyP.js +1 -0
  52. package/dist/web/assets/route-Boaf6qM7.js +1 -0
  53. package/dist/web/assets/route-BxsfSGun.js +1 -0
  54. package/dist/web/assets/{routes-BLy5TGH_.js → routes-D25foI3P.js} +19 -19
  55. package/dist/web/assets/routes-DHT3Z3pi.js +1 -0
  56. package/dist/web/assets/run-again-BwF1g66X.js +1 -0
  57. package/dist/web/assets/section-B0ipDPYr.js +1 -0
  58. package/dist/web/assets/section-BhUxD7-H.js +1 -0
  59. package/dist/web/assets/section-BwxXJ9H0.js +1 -0
  60. package/dist/web/assets/settings-DQka4c7B.js +1 -0
  61. package/dist/web/assets/slots-n0NbUO7Z.js +1 -0
  62. package/dist/web/assets/status-badge-CLPsMXtK.js +1 -0
  63. package/dist/web/assets/strings-C9Xdiz_K.js +1 -0
  64. package/dist/web/assets/strings-qxNeGv33.js +301 -0
  65. package/dist/web/assets/table-hbKjhjeL.js +1 -0
  66. package/dist/web/assets/tasks-B51Y5ks_.js +1 -0
  67. package/dist/web/assets/tasks-DHT3Z3pi.js +1 -0
  68. package/dist/web/assets/usage-Bu-ewmBl.js +1 -0
  69. package/dist/web/assets/use-now-vNgLntlV.js +1 -0
  70. package/dist/web/assets/useAnchoredPopupScrollLock-CeE46geY.js +1 -0
  71. package/dist/web/assets/useNavigate-AT5VkfZa.js +1 -0
  72. package/dist/web/assets/usePositioner-B7VCT5LN.js +1 -0
  73. package/dist/web/assets/useRouter-Hur3RN7j.js +1 -0
  74. package/dist/web/assets/useTimeout-BC05Ghyu.js +1 -0
  75. package/dist/web/assets/with-selector-Dwf291_Q.js +1 -0
  76. package/dist/web/assets/workers-BeOqCiLJ.js +1 -0
  77. package/dist/web/index.html +20 -15
  78. package/package.json +9 -9
  79. package/dist/web/assets/CompositeItem-DU6IyNMY.js +0 -1
  80. package/dist/web/assets/ToolbarRootContext-Cytu6o2e.js +0 -1
  81. package/dist/web/assets/X.es-B7iqdxa_.js +0 -1
  82. package/dist/web/assets/_agent-BVKD5odk.js +0 -1
  83. package/dist/web/assets/_loop-BFLzamuo.js +0 -1
  84. package/dist/web/assets/_name-Bh4AQ9sR.js +0 -6
  85. package/dist/web/assets/_name-CMVsmWzq.js +0 -1
  86. package/dist/web/assets/_name-DCkgEma_.js +0 -1
  87. package/dist/web/assets/_name-Ds_pWi15.js +0 -1
  88. package/dist/web/assets/_number-B9aYwvcQ.js +0 -1
  89. package/dist/web/assets/_run-BZWt47QS.js +0 -8
  90. package/dist/web/assets/_worker-Dgfufm5p.js +0 -1
  91. package/dist/web/assets/action-rCd1FeAz.js +0 -1
  92. package/dist/web/assets/agents-Drbg6qpH.js +0 -1
  93. package/dist/web/assets/agents-_6-dEjrY.js +0 -1
  94. package/dist/web/assets/button-DVWXde__.js +0 -1
  95. package/dist/web/assets/collapsible-IOhZV1qg.js +0 -1
  96. package/dist/web/assets/drawer-BiqnR_8i.js +0 -1
  97. package/dist/web/assets/dropdown-menu-C9D1kRkO.js +0 -1
  98. package/dist/web/assets/edit-and-retry-BgOR6mvP.js +0 -1
  99. package/dist/web/assets/error-alert-9tKpTE3v.js +0 -1
  100. package/dist/web/assets/fill-cell-ClM88KFD.js +0 -1
  101. package/dist/web/assets/heading-lX1a1LNN.js +0 -1
  102. package/dist/web/assets/index-BymNZU1Q.js +0 -10
  103. package/dist/web/assets/index-Dyjfp3ET.css +0 -2
  104. package/dist/web/assets/label-badge-aIGT1Bry.js +0 -1
  105. package/dist/web/assets/list-v8WJp2Eq.js +0 -1
  106. package/dist/web/assets/loops-BFoFf_og.js +0 -1
  107. package/dist/web/assets/mark-CC3RwMy_.js +0 -1
  108. package/dist/web/assets/matchContext-BquevSJS.js +0 -2
  109. package/dist/web/assets/model-BerBT6R0.js +0 -1
  110. package/dist/web/assets/moves-Dg9sshX5.js +0 -1
  111. package/dist/web/assets/overview-C_tFKGZ8.js +0 -1
  112. package/dist/web/assets/page-DWnGi6wA.js +0 -301
  113. package/dist/web/assets/project-not-found-CodaBVdu.js +0 -1
  114. package/dist/web/assets/pull-request-marks-DE00nqGW.js +0 -1
  115. package/dist/web/assets/queries-B1SHA_r4.js +0 -1
  116. package/dist/web/assets/reload-Dsl0zjJ7.js +0 -1
  117. package/dist/web/assets/repositories-BdxmD192.js +0 -1
  118. package/dist/web/assets/route-B_gphTYG.js +0 -1
  119. package/dist/web/assets/route-Cc7dKnn5.js +0 -1
  120. package/dist/web/assets/run-again-BTKagSXR.js +0 -1
  121. package/dist/web/assets/section-B3pWIIBa.js +0 -1
  122. package/dist/web/assets/section-CD-MB5r3.js +0 -1
  123. package/dist/web/assets/section-Id99HktI.js +0 -1
  124. package/dist/web/assets/settings-YrDysQXW.js +0 -1
  125. package/dist/web/assets/slots-BraHmbNr.js +0 -1
  126. package/dist/web/assets/status-badge-DnvNo1tG.js +0 -1
  127. package/dist/web/assets/strings-CW2XaR5f.js +0 -1
  128. package/dist/web/assets/table-BjyI4fVI.js +0 -1
  129. package/dist/web/assets/tasks-DCL8kLmD.js +0 -1
  130. package/dist/web/assets/transcript-sxRJzx6t.js +0 -5
  131. package/dist/web/assets/usage-CLQJdX9-.js +0 -1
  132. package/dist/web/assets/use-now-0P8TUXeg.js +0 -1
  133. package/dist/web/assets/useAnchoredPopupScrollLock-CQ83Wy-r.js +0 -1
  134. package/dist/web/assets/useNavigate-BW1WdocJ.js +0 -1
  135. package/dist/web/assets/usePositioner-rNCxnHO-.js +0 -1
  136. package/dist/web/assets/useTimeout-_TcdZXP6.js +0 -1
  137. package/dist/web/assets/with-selector-DoElmmtd.js +0 -1
  138. package/dist/web/assets/workers-BH5CBOR3.js +0 -1
@@ -1 +0,0 @@
1
- import{A as e,D as t,E as n}from"./matchContext-BquevSJS.js";import{g as r}from"./page-DWnGi6wA.js";import{t as i}from"./error-alert-9tKpTE3v.js";import{n as a}from"./useNavigate-BW1WdocJ.js";import{G as o,W as s,t as c}from"./button-DVWXde__.js";import{b as l,h as u}from"./index-BymNZU1Q.js";import{r as d}from"./status-badge-DnvNo1tG.js";import{a as f,i as p,n as m,o as h,r as g,t as _}from"./table-BjyI4fVI.js";import{t as v}from"./fill-cell-ClM88KFD.js";import{c as y,d as b,l as x,s as S,t as C}from"./section-Id99HktI.js";var w=e(t(),1),T=new Map([[`bold`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M200,28H160a20,20,0,0,0-20,20V208a20,20,0,0,0,20,20h40a20,20,0,0,0,20-20V48A20,20,0,0,0,200,28Zm-4,176H164V52h32ZM96,28H56A20,20,0,0,0,36,48V208a20,20,0,0,0,20,20H96a20,20,0,0,0,20-20V48A20,20,0,0,0,96,28ZM92,204H60V52H92Z`}))],[`duotone`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M208,48V208a8,8,0,0,1-8,8H160a8,8,0,0,1-8-8V48a8,8,0,0,1,8-8h40A8,8,0,0,1,208,48ZM96,40H56a8,8,0,0,0-8,8V208a8,8,0,0,0,8,8H96a8,8,0,0,0,8-8V48A8,8,0,0,0,96,40Z`,opacity:`0.2`}),w.createElement(`path`,{d:`M200,32H160a16,16,0,0,0-16,16V208a16,16,0,0,0,16,16h40a16,16,0,0,0,16-16V48A16,16,0,0,0,200,32Zm0,176H160V48h40ZM96,32H56A16,16,0,0,0,40,48V208a16,16,0,0,0,16,16H96a16,16,0,0,0,16-16V48A16,16,0,0,0,96,32Zm0,176H56V48H96Z`}))],[`fill`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M216,48V208a16,16,0,0,1-16,16H160a16,16,0,0,1-16-16V48a16,16,0,0,1,16-16h40A16,16,0,0,1,216,48ZM96,32H56A16,16,0,0,0,40,48V208a16,16,0,0,0,16,16H96a16,16,0,0,0,16-16V48A16,16,0,0,0,96,32Z`}))],[`light`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M200,34H160a14,14,0,0,0-14,14V208a14,14,0,0,0,14,14h40a14,14,0,0,0,14-14V48A14,14,0,0,0,200,34Zm2,174a2,2,0,0,1-2,2H160a2,2,0,0,1-2-2V48a2,2,0,0,1,2-2h40a2,2,0,0,1,2,2ZM96,34H56A14,14,0,0,0,42,48V208a14,14,0,0,0,14,14H96a14,14,0,0,0,14-14V48A14,14,0,0,0,96,34Zm2,174a2,2,0,0,1-2,2H56a2,2,0,0,1-2-2V48a2,2,0,0,1,2-2H96a2,2,0,0,1,2,2Z`}))],[`regular`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M200,32H160a16,16,0,0,0-16,16V208a16,16,0,0,0,16,16h40a16,16,0,0,0,16-16V48A16,16,0,0,0,200,32Zm0,176H160V48h40ZM96,32H56A16,16,0,0,0,40,48V208a16,16,0,0,0,16,16H96a16,16,0,0,0,16-16V48A16,16,0,0,0,96,32Zm0,176H56V48H96Z`}))],[`thin`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M200,36H160a12,12,0,0,0-12,12V208a12,12,0,0,0,12,12h40a12,12,0,0,0,12-12V48A12,12,0,0,0,200,36Zm4,172a4,4,0,0,1-4,4H160a4,4,0,0,1-4-4V48a4,4,0,0,1,4-4h40a4,4,0,0,1,4,4ZM96,36H56A12,12,0,0,0,44,48V208a12,12,0,0,0,12,12H96a12,12,0,0,0,12-12V48A12,12,0,0,0,96,36Zm4,172a4,4,0,0,1-4,4H56a4,4,0,0,1-4-4V48a4,4,0,0,1,4-4H96a4,4,0,0,1,4,4Z`}))]]),E=new Map([[`bold`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M234.49,111.07,90.41,22.94A20,20,0,0,0,60,39.87V216.13a20,20,0,0,0,30.41,16.93l144.08-88.13a19.82,19.82,0,0,0,0-33.86ZM84,208.85V47.15L216.16,128Z`}))],[`duotone`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M228.23,134.69,84.15,222.81A8,8,0,0,1,72,216.12V39.88a8,8,0,0,1,12.15-6.69l144.08,88.12A7.82,7.82,0,0,1,228.23,134.69Z`,opacity:`0.2`}),w.createElement(`path`,{d:`M232.4,114.49,88.32,26.35a16,16,0,0,0-16.2-.3A15.86,15.86,0,0,0,64,39.87V216.13A15.94,15.94,0,0,0,80,232a16.07,16.07,0,0,0,8.36-2.35L232.4,141.51a15.81,15.81,0,0,0,0-27ZM80,215.94V40l143.83,88Z`}))],[`fill`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M240,128a15.74,15.74,0,0,1-7.6,13.51L88.32,229.65a16,16,0,0,1-16.2.3A15.86,15.86,0,0,1,64,216.13V39.87a15.86,15.86,0,0,1,8.12-13.82,16,16,0,0,1,16.2.3L232.4,114.49A15.74,15.74,0,0,1,240,128Z`}))],[`light`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M231.36,116.19,87.28,28.06a14,14,0,0,0-14.18-.27A13.69,13.69,0,0,0,66,39.87V216.13a13.69,13.69,0,0,0,7.1,12.08,14,14,0,0,0,14.18-.27l144.08-88.13a13.82,13.82,0,0,0,0-23.62Zm-6.26,13.38L81,217.7a2,2,0,0,1-2.06,0,1.78,1.78,0,0,1-1-1.61V39.87a1.78,1.78,0,0,1,1-1.61A2.06,2.06,0,0,1,80,38a2,2,0,0,1,1,.31L225.1,126.43a1.82,1.82,0,0,1,0,3.14Z`}))],[`regular`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M232.4,114.49,88.32,26.35a16,16,0,0,0-16.2-.3A15.86,15.86,0,0,0,64,39.87V216.13A15.94,15.94,0,0,0,80,232a16.07,16.07,0,0,0,8.36-2.35L232.4,141.51a15.81,15.81,0,0,0,0-27ZM80,215.94V40l143.83,88Z`}))],[`thin`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M230.32,117.9,86.24,29.79a11.91,11.91,0,0,0-12.17-.23A11.71,11.71,0,0,0,68,39.89V216.11a11.71,11.71,0,0,0,6.07,10.33,11.91,11.91,0,0,0,12.17-.23L230.32,138.1a11.82,11.82,0,0,0,0-20.2Zm-4.18,13.37L82.06,219.39a4,4,0,0,1-4.07.07,3.77,3.77,0,0,1-2-3.35V39.89a3.77,3.77,0,0,1,2-3.35,4,4,0,0,1,4.07.07l144.08,88.12a3.8,3.8,0,0,1,0,6.54Z`}))]]),D=w.forwardRef((e,t)=>w.createElement(s,{ref:t,...e,weights:T}));D.displayName=`PauseIcon`;var O=w.forwardRef((e,t)=>w.createElement(s,{ref:t,...e,weights:E}));O.displayName=`PlayIcon`;var k=n(),A=({paused:e})=>(0,k.jsx)(d,{state:e?`paused`:`live`,label:e?`Paused`:`Active`}),j=({loop:e,pause:t,variant:n})=>{let r=t.isPending&&t.variables.loop===e.name;return(0,k.jsxs)(c,{variant:n,disabled:t.isPending,className:n===`ghost`?`text-muted-foreground`:void 0,onClick:n=>{n.stopPropagation(),t.mutate({loop:e.name,paused:e.paused})},children:[e.paused?(0,k.jsx)(O,{"data-icon":`inline-start`,"aria-hidden":`true`}):(0,k.jsx)(D,{"data-icon":`inline-start`,"aria-hidden":`true`}),(0,k.jsx)(`span`,{className:n===`ghost`?`max-sm:sr-only`:void 0,children:r?e.paused?`Resuming…`:`Pausing…`:e.paused?`Resume`:`Pause`}),n===`ghost`&&(0,k.jsxs)(`span`,{className:`sr-only`,children:[` `,e.name]})]})},M=({loop:e,pause:t})=>{let n=a(),i={loop:e.name};return(0,k.jsxs)(x,{open:()=>void n({to:`/configuration/loops/$loop`,params:i}),children:[(0,k.jsx)(g,{className:`py-3`,children:(0,k.jsx)(o,{to:`/configuration/loops/$loop`,params:i,onClick:e=>e.stopPropagation(),className:b,children:e.name})}),(0,k.jsx)(g,{children:r(e.stream)}),(0,k.jsx)(v,{className:`hidden lg:table-cell`,children:(0,k.jsx)(`code`,{className:`block truncate font-mono text-xs text-muted-foreground [font-variant-ligatures:none]`,title:e.condition,children:e.condition})}),(0,k.jsx)(g,{className:`hidden sm:table-cell`,children:e.agent}),(0,k.jsx)(g,{className:`hidden md:table-cell`,children:u[e.approval]}),(0,k.jsx)(g,{children:(0,k.jsx)(A,{paused:e.paused})}),(0,k.jsx)(g,{className:`text-right`,children:t!==null&&(0,k.jsx)(j,{loop:e,pause:t,variant:`ghost`})})]})},N=({loop:e})=>{let t=a(),n={loop:e.name};return(0,k.jsxs)(x,{open:()=>void t({to:`/configuration/loops/$loop`,params:n}),children:[(0,k.jsx)(g,{className:`py-3`,children:(0,k.jsx)(o,{to:`/configuration/loops/$loop`,params:n,onClick:e=>e.stopPropagation(),className:b,children:e.name})}),(0,k.jsx)(g,{colSpan:4,className:`max-w-0`,children:(0,k.jsx)(`p`,{className:`truncate text-destructive`,title:e.error.message,children:e.error.message})}),(0,k.jsx)(g,{children:(0,k.jsx)(y,{})}),(0,k.jsx)(g,{})]})},P=({configuration:e,pause:t})=>(0,k.jsxs)(C,{title:`Loops`,counts:l(e),children:[t?.isError===!0&&(0,k.jsx)(i,{message:t.error.message}),e.loops.length===0&&e.quarantinedLoops.length===0?(0,k.jsxs)(S,{title:`No loops`,children:[`Add a Markdown file under `,(0,k.jsx)(`code`,{children:`loops/`}),` in the instance folder, then reload the configuration.`]}):(0,k.jsx)(`div`,{className:`-mx-2`,children:(0,k.jsxs)(_,{children:[(0,k.jsx)(f,{children:(0,k.jsxs)(h,{className:`hover:bg-transparent`,children:[(0,k.jsx)(p,{className:`lg:w-56`,children:`Loop`}),(0,k.jsx)(p,{children:`Trigger`}),(0,k.jsx)(p,{className:`hidden lg:table-cell`,children:`Condition`}),(0,k.jsx)(p,{className:`hidden sm:table-cell`,children:`Agent`}),(0,k.jsx)(p,{className:`hidden md:table-cell`,children:`Approval`}),(0,k.jsx)(p,{children:`State`}),(0,k.jsx)(p,{children:(0,k.jsx)(`span`,{className:`sr-only`,children:`Action`})})]})}),(0,k.jsxs)(m,{children:[e.quarantinedLoops.map(e=>(0,k.jsx)(N,{loop:e},e.file)),e.loops.map(e=>(0,k.jsx)(M,{loop:e,pause:t},e.name))]})]})})]});export{j as n,A as r,P as t};
@@ -1 +0,0 @@
1
- import{E as e}from"./matchContext-BquevSJS.js";import{Xt as t}from"./page-DWnGi6wA.js";import{t as n}from"./list-v8WJp2Eq.js";import{d as r,f as i}from"./index-BymNZU1Q.js";var a=e(),o=()=>{let{data:e}=t(i());return(0,a.jsx)(n,{configuration:e,pause:r()})};export{o as component};
@@ -1 +0,0 @@
1
- import{A as e,D as t,E as n}from"./matchContext-BquevSJS.js";import{Gt as r,Nt as i,Qt as a,Rt as o,Wt as s,Zt as c}from"./page-DWnGi6wA.js";import{A as l,B as u,D as d,H as f,P as p,R as m,S as h,V as g,_,b as v,d as y,h as b,j as x,k as S,m as ee,s as C,v as w,x as T,y as te,z as E}from"./button-DVWXde__.js";import{n as D,t as O}from"./with-selector-DoElmmtd.js";import{a as k,c as A,d as j,i as ne,l as M,n as re,p as N,r as P,s as F,t as I,u as L}from"./useTimeout-_TcdZXP6.js";import{n as ie}from"./overview-C_tFKGZ8.js";function R(e,t){return c(e,a,t)}var z=e(t(),1);function B(e){return e?.ownerDocument||document}function V(){let[,e]=z.useState({});return z.useCallback(()=>{e({})},[])}var H=0;function U(e,t=`mui`){let n=z.useRef(void 0),r=V(),i=e??n.current;return z.useEffect(()=>{n.current??(H+=1,n.current=`${t}-${H}`,e??r())},[e,t,r]),i}var ae=x.useId;function W(e,t){if(ae!==void 0){let n=ae();return e??(t?`${t}-${n}`:n)}return U(e,t)}function oe(e){return W(e,`base-ui`)}function se(){return typeof navigator>`u`?{userAgent:``,platform:``,maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??0}}var{userAgent:ce,platform:le,maxTouchPoints:G}=se(),K=ce.toLowerCase(),q=le.toLowerCase(),J=/^i(os$|p)/.test(q)||q===`macintel`&&G>1,ue=`android`,de=q===ue||K.includes(ue),fe=!J&&q.startsWith(`mac`);q.startsWith(`win`),!de&&/^(linux|chrome os)/.test(q);var pe=fe||J,me=typeof CSS<`u`&&!!CSS.supports?.(`-webkit-backdrop-filter:none`);!me&&K.includes(`firefox`),!me&&K.includes(`chrom`);var he=pe,ge=/jsdom|happydom/.test(K),Y=n();function X(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Z(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&h(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function _e(e,t){let n=e;for(;n;){if(_(n)&&n.matches(t))return n;n=n.assignedSlot??n.parentNode??(h(n)?n.host:null)}return null}function Q(e){return`composedPath`in e?e.composedPath()[0]??e.target:e.target}var ve=`data-base-ui-focusable`,ye=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`,be=`ArrowLeft`,xe=`ArrowRight`,Se=`ArrowUp`,Ce=`ArrowDown`,we=`data-open`,Te=`data-closed`,Ee=A,De=F,Oe=`data-anchor-hidden`,ke=`data-popup-open`,Ae=`data-pressed`,je={[ke]:``},Me={[ke]:``,[Ae]:``},Ne={[we]:``},Pe={[Te]:``},Fe={[Oe]:``},Ie={open(e){return e?je:null}},Le={open(e){return e?Me:null}},Re={open(e){return e?Ne:Pe},anchorHidden(e){return e?Fe:null}},ze={...Re,...ne},Be=`data-trigger-disabled`;function Ve(e,t){if(!_(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(Be);for(let[,e]of t.entries())if(Z(e,n))return!e.hasAttribute(Be);return!1}function He(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function Ue(e){return e.matches(`html,body`)}function We(e){return w(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function Ge(e){return _e(e,`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${ye}`)!=null}function Ke(e){return e?e.getAttribute(`role`)===`combobox`&&We(e):!1}function qe(e){if(!e||ge)return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function Je(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}function Ye(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...Ye(e,t.id,n)])}function Xe(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function Ze(e){e.preventDefault(),e.stopPropagation()}function Qe(e){return`nativeEvent`in e}function $e(e){return e.pointerType===``&&e.isTrusted?!0:de&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function et(e){return ge?!1:!de&&e.width===0&&e.height===0||e.type===`pointerdown`&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`&&(de||e.buttons===0)||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function tt(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function nt(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}function rt(e,t){return t<0||t>=e.length}function it(e,t){return st(e.current,{disabledIndices:t})}function at(e,t){return st(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function ot(e,t,n){let{decrement:r,loopFocus:i,allowEscape:a,disabledIndices:o,minIndex:s,maxIndex:c}=n,l=()=>st(e,{startingIndex:t,decrement:r,disabledIndices:o}),u,d=!1;if(!i)u=r?Math.max(s,l()):Math.min(c,l());else if(r?t<=s:t>=c){let n=r?-1:e.length;a&&t!==n?u=-1:(u=r?c:s,d=!0)}else u=l();return{index:rt(e,u)?-1:u,wrapped:d}}function st(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let a=t;do a+=n?-i:i;while(a>=0&&a<=e.length-1&&ct(e,a,r));return a}function ct(e,t,n){if(typeof n==`function`?n(t):n?.includes(t)??!1)return!0;let r=e[t];return r?!ut(r)||r.matches(`:disabled`)?!0:!n&&(r.hasAttribute(`disabled`)||r.getAttribute(`aria-disabled`)===`true`):!1}function lt(e){return e.visibility===`hidden`||e.visibility===`collapse`}function ut(e,t=e?C(e):null){return!e||!e.isConnected||!t||lt(t)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():t.display!==`none`&&t.display!==`contents`}var dt=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`;function ft(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return h(n)?n.host:null}function pt(e){for(let t of Array.from(e.children))if(y(t)===`summary`)return t;return null}function mt(e,t){let n=pt(t);return!!n&&(e===n||Z(n,e))}function ht(e){let t=e?y(e):``;return e!=null&&e.matches(dt)&&(t!==`summary`||e.parentElement!=null&&y(e.parentElement)===`details`&&pt(e.parentElement)===e)&&(t!==`details`||pt(e)==null)&&(t!==`input`||e.type!==`hidden`)}function gt(e){if(!ht(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let t=e;t;t=ft(t)){let n=t!==e,r=y(t)===`slot`;if(t.hasAttribute(`inert`)||n&&y(t)===`details`&&!t.open&&!mt(e,t)||t.hasAttribute(`hidden`)||!r&&!_t(t,n))return!1}return!0}function _t(e,t){let n=C(e);return t?n.display!==`none`:ut(e,n)}function vt(e){let t=e.tabIndex;if(t<0){let t=y(e);if(t===`details`||t===`audio`||t===`video`||w(e)&&e.isContentEditable)return 0}return t}function yt(e){if(y(e)!==`input`)return null;let t=e;return t.type===`radio`&&t.name!==``?t:null}function bt(e,t){let n=yt(e);if(!n)return!0;let r=t.find(e=>{let t=yt(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=yt(e);return t?.name===n.name&&t.form===n.form})===n}function xt(e){if(w(e)&&y(e)===`slot`){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return w(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function St(e,t){xt(e).forEach(e=>{ht(e)&&t.push(e),St(e,t)})}function Ct(e,t,n){xt(e).forEach(e=>{w(e)&&e.matches(t)&&n.push(e),Ct(e,t,n)})}function wt(e){return gt(e)&&vt(e)>=0}function Tt(e){let t=[];return St(e,t),t.filter(gt)}function Et(e){let t=Tt(e);return t.filter(e=>vt(e)>=0&&bt(e,t))}function Dt(e,t){let n=Et(e),r=n.length;if(r===0)return;let i=X(B(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function Ot(e){return Dt(B(e).body,1)||e}function kt(e){return Dt(B(e).body,-1)||e}function At(e,t,n){if(!e)return null;let r=[];St(B(e).body,r);let i=r.indexOf(e);if(i===-1)return null;let a=r.filter(gt);for(let e=1;e<r.length;e+=1){let o=r[(i+t*e+r.length)%r.length];if(!Z(n,o)&&wt(o)&&bt(o,a))return o}return r[i]}function jt(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!Z(n,r)}function Mt(e){Et(e).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function Nt(e){let t=[];Ct(e,`[data-tabindex]`,t),t.forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}function Pt(e,t,n,r){let i=!1,a=!1,o=r??m;return{reason:e,event:t??new Event(`base-ui`),cancel(){i=!0},allowPropagation(){a=!0},get isCanceled(){return i},get isPropagationAllowed(){return a},trigger:n,...o}}function Ft(e,t,n){let r=n??m;return{reason:e,event:t??new Event(`base-ui`),...r}}var It=`none`,Lt=`trigger-press`,Rt=`trigger-hover`,zt=`trigger-focus`,Bt=`outside-press`,Vt=`item-press`,Ht=`close-press`,Ut=`focus-out`,Wt=`escape-key`,Gt=`list-navigation`,Kt=`keyboard`,qt=`pointer`,Jt=`cancel-open`,Yt=`sibling-open`,Xt=`disabled`,Zt=`imperative-action`;function $(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Qt(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}function $t(e){let t=f(en,e).current;return t.next=e,S(t.effect),t}function en(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var tn={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},nn={...tn,position:`fixed`,margin:0,top:0,left:0};({...tn});var rn=z.forwardRef(function(e,t){let[n,r]=z.useState();S(()=>{he&&me&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,Y.jsx)(`span`,{...e,ref:t,style:nn,"aria-hidden":!n||void 0,...i,"data-base-ui-focus-guard":``})});function an(e){return`data-base-ui-${e}`}var on=0;function sn(e,t={}){let{preventScroll:n=!1,sync:r=!1,shouldFocus:i}=t;cancelAnimationFrame(on);function a(){(!i||i())&&e?.focus({preventScroll:n})}if(r)return a(),E;let o=requestAnimationFrame(a);return on=o,()=>{on===o&&(cancelAnimationFrame(o),on=0)}}var cn=`data-base-ui-inert`,ln=new WeakMap,un=new WeakSet,dn=new WeakMap,fn=0;function pn(e){return e?h(e)?e.host:pn(e.parentNode):null}var mn=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=pn(t);return e.contains(n)?n:null}).filter(e=>e!=null),hn=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},gn=(e,t,n)=>{let r=[],i=e=>{e&&!n.has(e)&&Array.from(e.children).forEach(e=>{y(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function _n(e,t,n,{mark:r=!0}){let i=mn(t,e),a=r?gn(t,hn(i),new Set(i)):[],o=[],s=[];if(n){let e=mn(t,Array.from(t.querySelectorAll(`[aria-live]`))),n=i.concat(e);gn(t,hn(n),new Set(n)).forEach(e=>{let t=e.getAttribute(`aria-hidden`),n=t!==null&&t!==`false`,r=(ln.get(e)||0)+1;ln.set(e,r),o.push(e),r===1&&n&&un.add(e),n||e.setAttribute(`aria-hidden`,`true`)})}return r&&a.forEach(e=>{let t=(dn.get(e)||0)+1;dn.set(e,t),s.push(e),t===1&&e.setAttribute(cn,``)}),fn+=1,()=>{o.forEach(e=>{let t=(ln.get(e)||0)-1;ln.set(e,t),t||(un.has(e)||e.removeAttribute(`aria-hidden`),un.delete(e))}),r&&s.forEach(e=>{let t=(dn.get(e)||0)-1;dn.set(e,t),t||e.removeAttribute(cn)}),--fn,fn||(ln=new WeakMap,un=new WeakSet,dn=new WeakMap)}}function vn(e,t={}){let{ariaHidden:n=!1,mark:r=!0}=t,i=B(e[0]).body;return _n(e,i,n,{mark:r})}var yn=e(N(),1),bn={style:{transition:`none`}},xn=`data-base-ui-click-trigger`,Sn={fallbackAxisSide:`none`},Cn={fallbackAxisSide:`end`},wn={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},Tn=z.createContext(null),En=()=>z.useContext(Tn),Dn=an(`portal`);function On(e={}){let{ref:t,container:n,componentProps:r=m,elementProps:i}=e,a=W(),o=En()?.portalNode,[s,c]=z.useState(null),[u,d]=z.useState(null),f=l(e=>{e!==null&&d(e)}),h=z.useRef(null);S(()=>{if(n===null){h.current&&(h.current=null,d(null),c(null));return}let e=(n&&(v(n)?n:n.current))??o??document.body;e==null?h.current&&(h.current=null,d(null),c(null)):h.current!==e&&(h.current=e,d(null),c(e))},[n,o]);let g=p(`div`,r,{ref:[t,f],props:[{id:a,[Dn]:``},i]}),_=s&&g?yn.createPortal(g,s):null;return{node:u,nodeId:z.isValidElement(g)?g.props.id:void 0,subtree:_}}var kn=z.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,container:o,portalOwnerRole:s,...c}=e,{node:l,nodeId:u,subtree:d}=On({container:o,ref:t,componentProps:e,elementProps:c}),f=z.useRef(null),p=z.useRef(null),m=z.useRef(null),h=z.useRef(null),[g,_]=z.useState(null),v=z.useRef(!1),y=g?.modal,b=g?.open,x=!!g&&!g.modal&&g.open&&!!l;z.useEffect(()=>{if(!l||y)return;function e(e){l&&e.relatedTarget&&jt(e)&&(e.type===`focusin`?v.current&&=(Nt(l),!1):(Mt(l),v.current=!0))}return Qt($(l,`focusin`,e,!0),$(l,`focusout`,e,!0))},[l,y]),S(()=>{l&&b===!0&&v.current&&(Nt(l),v.current=!1)},[b,l]);let ee=z.useMemo(()=>({beforeOutsideRef:f,afterOutsideRef:p,beforeInsideRef:m,afterInsideRef:h,portalNode:l,setFocusManagerState:_}),[l]);return(0,Y.jsxs)(z.Fragment,{children:[d,(0,Y.jsxs)(Tn.Provider,{value:ee,children:[x&&l&&(0,Y.jsx)(rn,{"data-type":`outside`,ref:f,onFocus:e=>{jt(e,l)?m.current?.focus():kt(g?g.domReference:null)?.focus()}}),x&&l&&(0,Y.jsx)(`span`,{role:s,"aria-owns":u,style:wn}),l&&yn.createPortal(a,l),x&&l&&(0,Y.jsx)(rn,{"data-type":`outside`,ref:p,onFocus:e=>{jt(e,l)?h.current?.focus():(Ot(g?g.domReference:null)?.focus(),g?.closeOnFocusOut&&g?.onOpenChange(!1,Pt(`focus-out`,e.nativeEvent)))}})]})]})});function An(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}var jn=class{nodesRef={current:[]};events=An();addNode(e){this.nodesRef.current.push(e)}removeNode(e){let t=this.nodesRef.current.findIndex(t=>t===e);t!==-1&&this.nodesRef.current.splice(t,1)}},Mn=z.createContext(null),Nn=z.createContext(null),Pn=()=>z.useContext(Mn)?.id||null,Fn=e=>{let t=z.useContext(Nn);return e??t};function In(e){let t=W(),n=Fn(e),r=Pn();return S(()=>{if(!t)return;let e={id:t,parentId:r};return n?.addNode(e),()=>{n?.removeNode(e)}},[n,t,r]),t}function Ln(e){let{children:t,id:n}=e,r=Pn();return(0,Y.jsx)(Mn.Provider,{value:z.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function Rn(e){let{children:t,externalTree:n}=e,r=f(()=>n??new jn).current;return(0,Y.jsx)(Nn.Provider,{value:r,children:t})}function zn(e,t){let n=b(Q(e));return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||($e(e)?`keyboard`:t||`mouse`):`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var Bn=20,Vn=[];function Hn(){Vn=Vn.filter(e=>e.deref()?.isConnected)}function Un(e){Hn(),e&&y(e)!==`body`&&(Vn.push(new WeakRef(e)),Vn.length>Bn&&(Vn=Vn.slice(-20)))}function Wn(){return Hn(),Vn[Vn.length-1]?.deref()}function Gn(e){return e?wt(e)?e:Et(e)[0]||e:null}function Kn(e){if(e.hasAttribute(`tabindex`)&&!e.hasAttribute(`data-tabindex`)||!e.getAttribute(`role`)?.includes(`dialog`))return;let t=Tt(e).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return wt(e)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),n=e.getAttribute(`tabindex`);t.length===0?n!==`0`&&(e.setAttribute(`tabindex`,`0`),e.setAttribute(`data-tabindex`,`0`)):(n!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}function qn(e){let{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:a=!0,explicitReturnFocus:o,restoreFocus:s=!1,modal:c=!0,closeOnFocusOut:u=!0,openInteractionType:d=``,nextFocusableElement:f,previousFocusableElement:p,beforeContentFocusGuardRef:m,externalTree:h,getInsideElements:_}=e,v=t.useState(`open`),b=t.useState(`domReferenceElement`),x=t.useState(`floatingElement`),{events:ee,dataRef:C}=t.context,T=l(()=>C.current.floatingContext?.nodeId),te=i===!1,E=Ke(b)&&te,D=$t(i),O=$t(a),k=$t(o),A=$t(d),ne=$t(v),N=Fn(h),P=En(),F=z.useRef(!1),I=z.useRef(!1),L=z.useRef(!1),ie=z.useRef(null),R=z.useRef(``),V=z.useRef(``),H=z.useRef(null),U=z.useRef(null),ae=g(H,m,P?.beforeInsideRef),W=g(U,P?.afterInsideRef),oe=re(),se=re(),ce=j(),le=P!=null,G=Je(x),K=l((e=G)=>e?Et(e):[]),q=l(()=>_?.().filter(e=>e!=null)??[]);z.useEffect(()=>{if(r||!c)return;function e(e){e.key===`Tab`&&Z(G,X(B(G)))&&K().length===0&&!E&&Ze(e)}return $(B(G),`keydown`,e)},[r,G,c,E,K]),z.useEffect(()=>{if(r||!v)return;let e=B(G);function t(){L.current=!1}function n(e){let t=Q(e),n=q(),r=Z(x,t)||Z(b,t)||Z(P?.portalNode,t)||n.some(e=>e===t||Z(e,t));L.current=!r,V.current=e.pointerType||`keyboard`,_e(t,`[data-base-ui-click-trigger]`)&&(I.current=!0,se.start(0,()=>{I.current=!1}))}function i(){V.current=`keyboard`}return Qt($(e,`pointerdown`,n,!0),$(e,`pointerup`,t,!0),$(e,`pointercancel`,t,!0),$(e,`keydown`,i,!0),t)},[r,x,b,G,v,P,se,q]),z.useEffect(()=>{if(r||!u)return;let e=B(G);function n(){I.current=!0,se.start(0,()=>{I.current=!1})}function i(e){let t=Q(e);wt(t)&&(ie.current=t)}function a(n){let r=n.relatedTarget,i=n.currentTarget,a=Q(n);c&&r==null&&a!=null&&Z(x,a)&&Un(a),queueMicrotask(()=>{let o=T(),l=t.context.triggerElements,u=q(),d=r?.hasAttribute(an(`focus-guard`))&&[H.current,U.current,P?.beforeInsideRef.current,P?.afterInsideRef.current,P?.beforeOutsideRef.current,P?.afterOutsideRef.current,M(p),M(f)].includes(r),m=!(Z(b,r)||Z(x,r)||Z(r,x)||Z(P?.portalNode,r)||u.some(e=>e===r||Z(e,r))||l.hasMatchingElement(e=>Z(e,r))||d||N&&(Ye(N.nodesRef.current,o).find(e=>Z(e.context?.elements.floating,r)||Z(e.context?.elements.domReference,r))||Xe(N.nodesRef.current,o).find(e=>[e.context?.elements.floating,Je(e.context?.elements.floating)].includes(r)||e.context?.elements.domReference===r)));if(i===b&&G&&Kn(G),s&&i!==b&&!ut(a)&&X(e)===e.body){if(w(G)&&(G.focus(),s===`popup`)){ce.request(()=>{G.focus()});return}let e=K(),t=ie.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||G;w(n)&&n.focus()}C.current.insideReactTree?C.current.insideReactTree=!1:(E||!c)&&r&&m&&!I.current&&(E||r!==Wn())&&(F.current=!0,t.setOpen(!1,Pt(Ut,n)))})}function o(){L.current||(C.current.insideReactTree=!0,oe.start(0,()=>{C.current.insideReactTree=!1}))}let l=w(b)?b:null;if(x||l)return Qt(l&&$(l,`focusout`,a),l&&$(l,`pointerdown`,n),x&&$(x,`focusin`,i),x&&$(x,`focusout`,a),x&&P&&$(x,`focusout`,o,!0))},[r,b,x,G,c,N,P,t,u,s,K,E,T,C,oe,se,ce,f,p,q]),z.useEffect(()=>{if(r||!x||!v)return;let e=Array.from(P?.portalNode?.querySelectorAll(`[${an(`portal`)}]`)||[]),t=(N?Xe(N.nodesRef.current,T()):[]).find(e=>Ke(e.context?.elements.domReference||null))?.context?.elements.domReference,n=vn([x,...e,H.current,U.current,P?.beforeOutsideRef.current,P?.afterOutsideRef.current,...q(),t,M(p),M(f),E?b:null].filter(e=>e!=null),{ariaHidden:c||E,mark:!1}),i=vn([x,...e].filter(e=>e!=null));return()=>{i(),n()}},[v,r,b,x,c,P,E,N,T,f,p,q]),S(()=>{if(!v||r||!w(G))return;R.current=``,V.current=``;let e=B(G),t=X(e);queueMicrotask(()=>{let n=D.current,r=typeof n==`function`?n(A.current||``):n;if(r===void 0||r===!1||Z(G,t))return;let i=null,a=()=>(i??=K(G),i[0]||G),o;o=r===!0||r===null?a():M(r),o||=a();let s=Z(G,X(e)),c=C.current.openEvent,l=c?.type===`mousedown`&&$e(c);sn(o,{sync:l,preventScroll:o===G,shouldFocus(){if(!ne.current)return!1;if(s)return!0;let t=X(e);return!(t!==o&&Z(G,t))}})})},[r,v,G,K,D,A,ne,C]);let J=z.useRef(null);S(()=>{if(r||!G){J.current=null;return}J.current&&=(J.current.cancelled=!0,null);let e=B(G),t=X(e),n=A.current==null;Un(t);function i(e){if(e.open||(R.current=zn(e.nativeEvent,V.current)),(e.reason===`focus-out`&&e.triggerElement?.hasAttribute(an(`focus-guard`))||e.reason===`trigger-hover`&&e.nativeEvent.type===`mouseleave`)&&(F.current=!0),e.reason===`outside-press`){if(e.nested)F.current=!1;else if($e(e.nativeEvent)||et(e.nativeEvent))F.current=!1;else{let e=!1;B(G).createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?F.current=!1:F.current=!0}}}ee.on(`openchange`,i);function a(e){let r=O.current,i=typeof r==`function`?r(e):r;if(i===void 0||i===!1)return null;i===null&&(i=!0);let a=b?.isConnected?b:null,o=t?.isConnected&&y(t)!==`body`?t:null,s=n?o||a:a||o;return s||=Wn()||null,typeof i==`boolean`?s:M(i)||s||null}return()=>{ee.off(`openchange`,i);let t=X(e),n=q(),r=Z(x,t)||n.some(e=>e===t||Z(e,t))||N&&Ye(N.nodesRef.current,T(),!1).some(e=>Z(e.context?.elements.floating,t)),o=O.current,s=R.current,c=a(s),l={cancelled:!1};J.current=l,queueMicrotask(()=>{J.current===l&&(J.current=null);let n=Gn(c),i=k.current??typeof o!=`boolean`;if(!l.cancelled&&o&&!F.current&&w(n)&&(i||n===t||t===e.body||r)){let e={preventScroll:!0};s===`keyboard`&&(e.focusVisible=!0),n.focus(e)}F.current=!1})}},[r,x,G,O,k,A,ee,N,b,T,q]),S(()=>{if(!me||v||!x)return;let e=X(B(x));w(e)&&We(e)&&Z(x,e)&&e.blur()},[v,x]),S(()=>{if(!r&&P)return P.setFocusManagerState({modal:c,closeOnFocusOut:u,open:v,onOpenChange:t.setOpen,domReference:b}),()=>{P.setFocusManagerState(null)}},[r,P,c,v,t,u,b]),S(()=>{if(!r&&G)return Kn(G),()=>{queueMicrotask(Hn)}},[r,G]);let ue=!r&&(!c||!E)&&(le||c);return(0,Y.jsxs)(z.Fragment,{children:[ue&&(0,Y.jsx)(rn,{"data-type":`inside`,ref:ae,onFocus:e=>{if(c){let e=K();sn(e[e.length-1])}else P?.portalNode&&(F.current=!1,jt(e,P.portalNode)?Ot(b)?.focus():M(p??P.beforeOutsideRef)?.focus())}}),n,ue&&(0,Y.jsx)(rn,{"data-type":`inside`,ref:W,onFocus:e=>{c?sn(K()[0]):P?.portalNode&&(u&&(F.current=!0),jt(e,P.portalNode)?kt(b)?.focus():M(f??P.afterOutsideRef)?.focus())}})]})}function Jn(){return!1}function Yn(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function Xn(e,t={}){let{enabled:n=!0,escapeKey:r=!0,outsidePress:i=!0,outsidePressEvent:a=`sloppy`,referencePress:o=Jn,bubbles:s,externalTree:c}=t,u=e.useState(`open`),d=e.useState(`floatingElement`),{dataRef:f,events:p}=e.context,m=Fn(c),g=l(typeof i==`function`?i:()=>!1),v=typeof i==`function`?g:i,y=v!==!1,b=l(()=>a),{escapeKey:x,outsidePress:S}=Yn(s),T=z.useRef(!1),E=z.useRef(!1),D=z.useRef(!1),O=z.useRef(!1),k=z.useRef(!1),A=z.useRef(``),j=z.useRef(null),ne=re(),M=re(),N=re(),P=l(()=>{M.clear(),f.current.insideReactTree=!1}),F=l(e=>{let t=f.current.floatingContext?.nodeId;return(m?Ye(m.nodesRef.current,t):[]).some(t=>t.context?.open&&!t.context.dataRef.current[e])}),L=l(t=>He(t,e.select(`floatingElement`))||He(t,e.select(`domReferenceElement`))),ie=l(t=>{o()&&e.setOpen(!1,Pt(Lt,t.nativeEvent))}),R=l(t=>{if(!u||!n||!r||t.key!==`Escape`)return;let i=Qe(t)?t.nativeEvent:t;if(k.current||i.isComposing||!x&&F(`__escapeKeyBubbles`))return;let a=Pt(Wt,i);e.setOpen(!1,a),a.isCanceled||t.preventDefault(),!x&&!a.isPropagationAllowed&&t.stopPropagation()}),V=l(()=>{f.current.insideReactTree=!0,M.start(0,P)}),H=l(t=>{if(!u||!n||t.button!==0)return;let r=Q(t.nativeEvent);Z(e.select(`floatingElement`),r)&&(T.current||(T.current=!0,E.current=!1))}),U=l(e=>{u&&n&&(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&T.current&&(E.current=!0)});z.useEffect(()=>{function e(e){e.open||(O.current=!1)}return p.on(`openchange`,e),()=>{p.off(`openchange`,e)}},[p]),z.useEffect(()=>P,[P]),z.useEffect(()=>{if(!u||!n)return u||(O.current=!1,k.current=!1,A.current=``,j.current=null),P;f.current.__escapeKeyBubbles=x,f.current.__outsidePressBubbles=S;let t=new I,i=B(d);function a(){N.clear(),k.current=!0}function o(){k.current=!0,N.start(me?5:0,()=>{k.current=!1})}function s(){D.current=!0,t.start(0,()=>{D.current=!1})}function c(){T.current=!1,E.current=!1}function l(){let e=A.current,t=e===`pen`||!e?`mouse`:e,n=b(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function p(e){let t=l();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function g(e){let t=f.current.floatingContext?.nodeId,n=m&&Ye(m.nodesRef.current,t).some(t=>He(e,t.context?.elements.floating));return L(e)||n}function M(n){if(p(n)){n.type!==`click`&&!L(n)&&(t.clear(),D.current=!1),P();return}if(f.current.insideReactTree){P();return}let r=Q(n),i=`[${an(`inert`)}]`,a=_(r)?r.getRootNode():null,o=Array.from((h(a)?a:B(e.select(`floatingElement`))).querySelectorAll(i)),s=e.context.triggerElements;if(r&&(s.hasElement(r)||s.hasMatchingElement(e=>Z(e,r))))return;let c=_(r)?r:null;for(;c&&!te(c);){let e=ee(c);if(te(e)||!_(e))break;c=e}if(!(o.length&&_(r)&&!Ue(r)&&!Z(r,e.select(`floatingElement`))&&o.every(e=>!Z(c,e)))){if(w(r)&&!(`touches`in n)){let e=te(r),t=C(r),i=/auto|scroll/,a=e||i.test(t.overflowX),o=e||i.test(t.overflowY),s=a&&r.clientWidth>0&&r.scrollWidth>r.clientWidth,c=o&&r.clientHeight>0&&r.scrollHeight>r.clientHeight,l=t.direction===`rtl`,u=c&&(l?n.offsetX<=r.offsetWidth-r.clientWidth:n.offsetX>r.clientWidth),d=s&&n.offsetY>r.clientHeight;if(u||d)return}if(!g(n)){if(l()===`intentional`){if(n.detail!==0&&!$e(n)&&!O.current)return;if(D.current){t.clear(),D.current=!1;return}}(typeof v!=`function`||v(n))&&(F(`__outsidePressBubbles`)||(e.setOpen(!1,Pt(Bt,n)),P()))}}}function re(t){l()===`sloppy`&&t.pointerType!==`touch`&&e.select(`open`)&&n&&!L(t)&&M(t)}function ie(t){if(l()!==`sloppy`||!e.select(`open`)||!n||L(t))return;let r=t.touches[0];r&&(j.current={startTime:Date.now(),startX:r.clientX,startY:r.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},ne.start(1e3,()=>{j.current&&(j.current.dismissOnTouchEnd=!1,j.current.dismissOnMouseDown=!1)}))}function z(e,t){let n=Q(e);if(!n)return;let r=$(n,e.type,()=>{t(e),r()})}function V(e){A.current=`touch`,z(e,ie)}function H(e){ne.clear(),e.type===`pointerdown`&&(e.button===0&&(O.current=!0),A.current=e.pointerType),(e.type!==`mousedown`||!j.current||j.current.dismissOnMouseDown)&&z(e,e=>{e.type===`pointerdown`?re(e):M(e)})}function U(e){if(e.type===`pointercancel`&&(O.current=!1),!T.current)return;let n=E.current;c(),l()===`intentional`&&(e.type===`pointercancel`?n&&s():g(e)||(n?s():(typeof v!=`function`||v(e))&&(t.clear(),D.current=!0,P())))}function ae(e){if(l()!==`sloppy`||!j.current||L(e))return;let t=e.touches[0];if(!t)return;let n=Math.abs(t.clientX-j.current.startX),r=Math.abs(t.clientY-j.current.startY),i=Math.sqrt(n*n+r*r);i>5&&(j.current.dismissOnTouchEnd=!0),i>10&&(M(e),ne.clear(),j.current=null)}function W(e){z(e,ae)}function oe(e){l()===`sloppy`&&j.current&&!L(e)&&(j.current.dismissOnTouchEnd&&M(e),ne.clear(),j.current=null)}function se(e){z(e,oe)}let ce=Qt(r&&Qt($(i,`keydown`,R),$(i,`compositionstart`,a),$(i,`compositionend`,o)),y&&Qt($(i,`click`,H,!0),$(i,`pointerdown`,H,!0),$(i,`pointerup`,U,!0),$(i,`pointercancel`,U,!0),$(i,`mousedown`,H,!0),$(i,`mouseup`,U,!0),$(i,`touchstart`,V,{capture:!0,passive:!0}),$(i,`touchmove`,W,{capture:!0,passive:!0}),$(i,`touchend`,se,{capture:!0,passive:!0})));return()=>{ce(),t.clear(),c(),D.current=!1}},[f,d,r,y,v,u,n,x,S,R,P,b,F,L,m,e,ne,N]);let ae=z.useMemo(()=>({onKeyDown:R,onPointerDown:ie,onClick:ie}),[R,ie]),W=z.useMemo(()=>({onKeyDown:R,onPointerDown:U,onMouseDown:U,onClickCapture:V,onMouseDownCapture(e){V(),H(e)},onPointerDownCapture(e){V(),H(e)},onMouseUpCapture:V,onTouchEndCapture:V,onTouchMoveCapture:V}),[R,V,H,U]);return z.useMemo(()=>n?{reference:ae,floating:W,trigger:ae}:{},[n,ae,W])}function Zn(e){let{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:i,nested:a,onOpenChange:o}=e,s=t.useState(`open`),c=t.useState(`activeTriggerElement`),l=t.useState(n?`popupElement`:`positionerElement`),u=o;return t.useSyncedValue(`floatingId`,i),S(()=>{let e={open:s,floatingId:i,referenceElement:c,floatingElement:l};_(c)&&(e.domReferenceElement=c),r.state.positionReference===r.state.referenceElement&&(e.positionReference=c),r.update(e)},[s,i,c,l,r]),r.context.onOpenChange=u,r.context.nested=a,r}function Qn(e){let{open:t,ref:n,preventUnmountOnClose:r,setPreventUnmountOnClose:i,onUnmount:a,animateInitialOpen:o}=e,s=l(i),{mounted:c,setMounted:u,transitionStatus:d}=P(t,!1,!1,o),f=!t&&r;S(()=>{t&&s(!1)},[t,s]);let p=z.useRef(c),m=z.useRef(!1),h=V(),g=()=>{p.current=!1,u(!1),a()};S(()=>{p.current=c,m.current&&(m.current=!1,!t&&c&&g())});let _=l(()=>{p.current&&(t?(m.current=!0,h()):g())});return k({enabled:c&&!t&&!f,open:t,ref:n,onComplete(){t||_()}}),{mounted:c,transitionStatus:d,preventUnmountingOnClose:f,forceUnmount:_}}var $n={tabIndex:-1,[ve]:``};function er(e){return t=>t!==`touch`||e.current}function tr(e,t=!1){let n=W(),r=Pn()!=null,i=f(()=>e(n,r)).current;return Zn({popupStore:i,treatPopupAsFloatingElement:t,floatingRootContext:i.state.floatingRootContext,floatingId:n,nested:r,onOpenChange:i.setOpen}),i}function nr({handle:e,store:t}){return S(()=>e.attachStore(t),[e,t]),null}function rr(e){let t=e.context.triggerElements.size;e.select(`open`)&&e.state.triggerCount!==t&&e.set(`triggerCount`,t)}function ir(e,t){let n=z.useRef(null);return l(r=>{let i=n.current;if(i!==null){if(i.element===r&&i.store===t&&i.id===e)return;n.current=null;let a=i.store;a.context.triggerElements.getById(i.id)===i.element&&(a.context.triggerElements.delete(i.id),rr(a))}r!==null&&e!==void 0&&(n.current={store:t,id:e,element:r},t.context.triggerElements.add(e,r),rr(t))})}function ar(e,t,n,r=!1){let i=e.preventUnmountingOnClose;t?i=!1:r&&(i=!0);let a=n?.id??null,o=e.activeTriggerId,s=e.activeTriggerElement;return(a||t)&&(o=a,s=n??null),{open:t,preventUnmountingOnClose:i,activeTriggerId:o,activeTriggerElement:s,openedWithoutTrigger:t?n==null:e.openedWithoutTrigger}}function or(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function sr(e,t,n,r={}){let i=n.reason,a=i===Rt,o=t&&i===`trigger-focus`,s=!t&&(i===`trigger-press`||i===`escape-key`),c=or(n);if(e.context.onOpenChange?.(t,n),n.isCanceled)return;r.onBeforeDispatch?.(),e.state.floatingRootContext.dispatchOpenChange(t,n);let l=()=>{let i=ar(e.state,t,n.trigger,c()),l={...r.extraState,...i};o?l.instantType=`focus`:s?l.instantType=`dismiss`:a&&(l.instantType=void 0),e.update(l)};a?yn.flushSync(l):l()}function cr(e,t,n,r){let i=n.useState(`isMountedByTrigger`,e),a=ir(e,n),o=l(t=>{let i=n.select(`open`),a=n.select(`activeTriggerId`);if(a===e){let e={activeTriggerElement:t,...i?r:null};n.update(e)}else if(a==null&&i&&!n.state.openedWithoutTrigger){let i={activeTriggerId:e??null,activeTriggerElement:t,...r};n.update(i)}}),s=l(e=>{a(e),e&&o(e)});return S(()=>(s(t.current),()=>s(null)),[s,t,n,e]),S(()=>{if(i){let e={activeTriggerElement:t.current,...r};n.update(e)}},[i,n,t,...Object.values(r)]),{registerTrigger:s,isMountedByThisTrigger:i}}function lr(e,t={}){let{closeOnActiveTriggerUnmount:n=!1}=t,r=z.useRef(null),i=e.useState(`open`),a=e.useState(`triggerCount`),o=e.useState(`activeTriggerId`),s=e.useState(`activeTriggerElement`);S(()=>{if(!i){r.current=null,e.state.triggerCount!==0&&e.set(`triggerCount`,0),e.state.openedWithoutTrigger&&e.set(`openedWithoutTrigger`,!1);return}let t=e.context.triggerElements.size,a={};e.state.triggerCount!==t&&(a.triggerCount=t);let o=e.select(`activeTriggerId`),s=null;if(o){let t=e.context.triggerElements.getById(o);if(t)r.current=o,t!==e.state.activeTriggerElement&&(a.activeTriggerElement=t);else{for(let[t,n]of e.context.triggerElements.entries())if(n===e.state.activeTriggerElement){a.activeTriggerId=t,a.activeTriggerElement=n,r.current=t;break}a.activeTriggerId===void 0&&(r.current===o?s=o:r.current=null)}}else r.current=null;if(!s&&!o&&!e.state.openedWithoutTrigger&&t===1){let t=e.context.triggerElements.entries().next();if(!t.done){let[e,n]=t.value;a.activeTriggerId=e,a.activeTriggerElement=n,r.current=e}}(a.triggerCount!==void 0||a.activeTriggerId!==void 0||a.activeTriggerElement!==void 0)&&e.update(a),s&&n&&queueMicrotask(()=>{if(e.select(`open`)&&e.select(`activeTriggerId`)===s&&!e.context.triggerElements.getById(s)){let t=Pt(It);e.setOpen(!1,t),t.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[i,e,a,o,s,n])}function ur(e,t,n,r){let{mounted:i,transitionStatus:a,forceUnmount:o}=Qn({open:e,ref:t.context.popupRef,preventUnmountOnClose:t.useState(`preventUnmountingOnClose`),setPreventUnmountOnClose:e=>t.set(`preventUnmountingOnClose`,e),animateInitialOpen:r,onUnmount(){t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)}});return f(()=>(t.set(`mounted`,i),null)),t.useSyncedValues({mounted:i,transitionStatus:a}),{forceUnmount:o,transitionStatus:a}}function dr(e,t){e.useSyncedValues(t),S(()=>()=>{e.update({activeTriggerProps:m,inactiveTriggerProps:m,popupProps:m})},[e])}function fr(e,t){S(()=>{!t&&e.state.openMethod!==null&&e.set(`openMethod`,null)},[t,e]),S(()=>()=>{e.state.openMethod!==null&&e.set(`openMethod`,null)},[e])}var pr=class{idMap=new Map;add(e,t){this.idMap.set(e,t)}delete(e){this.idMap.delete(e)}hasElement(e){for(let t of this.idMap.values())if(t===e)return!0;return!1}hasMatchingElement(e){for(let t of this.idMap.values())if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}},mr=D(),hr=O(),gr=[],_r=void 0;function vr(){return _r}function yr(e){gr.push(e)}function br(e){let t=(t,n)=>{let r=f(Sr).current,i;try{_r=r;for(let e of gr)e.before(r);i=e(t,n);for(let e of gr)e.after(r);r.didInitialize=!0}finally{_r=void 0}return i};return t.displayName=e.displayName||e.name,t}function xr(e){return z.forwardRef(br(e))}function Sr(){return{didInitialize:!1}}var Cr=u(19)?Er:Dr;function wr(e,t,n,r,i){return Cr(e,t,n,r,i)}function Tr(e,t,n,r,i){let a=z.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,mr.useSyncExternalStore)(e.subscribe,a,a)}yr({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,i)||(t=!0,r.value=i)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,mr.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function Er(e,t,n,r,i){let a=vr();if(!a)return Tr(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],(s.store!==e||s.selector!==t||!Object.is(s.a1,n)||!Object.is(s.a2,r)||!Object.is(s.a3,i))&&(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.value=t(e.getSnapshot(),n,r,i))):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i)},a.syncHooks.push(s)),s.value}function Dr(e,t,n,r,i){return(0,hr.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var Or=class{static create(e){return new this(e)}constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return wr(this,e,t,n,r)}},kr=class extends Or{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){z.useDebugValue(e);let n=this;S(()=>{n.state[e]!==t&&n.set(e,t)},[n,e,t])}useSyncedValueWithCleanup(e,t){let n=this;S(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this,n=Object.values(e);S(()=>{t.update(e)},[t,...n])}useControlledProp(e,t){z.useDebugValue(e);let n=this,r=t!==void 0;S(()=>{r&&!Object.is(n.state[e],t)&&n.setState({...n.state,[e]:t})},[n,e,t,r])}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return z.useDebugValue(e),wr(this,this.selectors[e],t,n,r)}useContextCallback(e,t){z.useDebugValue(e);let n=l(t??E);this.context[e]=n}useStateSetter(e){let t=z.useRef(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}},Ar={open:e=>e.open,transitionStatus:e=>e.transitionStatus,domReferenceElement:e=>e.domReferenceElement,referenceElement:e=>e.positionReference??e.referenceElement,floatingElement:e=>e.floatingElement,floatingId:e=>e.floatingId},jr=class extends kr{constructor(e){let{syncOnly:t,nested:n,onOpenChange:r,triggerElements:i,...a}=e;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:An(),nested:n,triggerElements:i},Ar),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||t!=null&&nt(t))&&(this.context.dataRef.current.openEvent=e?t:void 0)};dispatchOpenChange=(e,t)=>{this.syncOpenEvent(e,t.event);let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit(`openchange`,n)};setOpen=(e,t)=>{this.syncOnly||this.dispatchOpenChange(e,t),this.context.onOpenChange?.(e,t)}};function Mr(e,t,n=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new jr({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0}),floatingId:t,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,openedWithoutTrigger:!1,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:m,inactiveTriggerProps:m,popupProps:m}}var Nr=e=>e.triggerIdProp??e.activeTriggerId,Pr=e=>e.openProp??e.open,Fr=e=>(e.popupElement?.id??e.floatingId)||void 0;function Ir(e,t){return t!==void 0&&Pr(e)&&Nr(e)===t}function Lr(e,t){return Ir(e,t)?!0:t!==void 0&&Pr(e)&&Nr(e)==null&&!e.openedWithoutTrigger&&e.triggerCount===1}var Rr={open:Pr,mounted:e=>e.mounted,transitionStatus:e=>Pr(e)&&!e.mounted?`starting`:e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:Nr,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:Fr,isTriggerActive:(e,t)=>t!==void 0&&Nr(e)===t,isOpenedByTrigger:(e,t)=>Ir(e,t),isMountedByTrigger:(e,t)=>t!==void 0&&Nr(e)===t&&e.mounted,triggerProps:(e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,t)=>Lr(e,t)?Fr(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement},zr=`ArrowUp`,Br=`ArrowDown`,Vr=`ArrowLeft`,Hr=`ArrowRight`,Ur=`Home`,Wr=new Set([zr,Br,Vr,Hr,Ur,`End`]),Gr=[`Shift`,`Control`,`Alt`,`Meta`];function Kr(e){return w(e)&&e.tagName===`INPUT`}function qr(e){return!!(Kr(e)&&e.selectionStart!=null||w(e)&&e.tagName===`TEXTAREA`)}function Jr(e,t,n,r){if(!e||!t||!t.scrollTo)return;let i=e.scrollLeft,a=e.scrollTop,o=e.clientWidth<e.scrollWidth,s=e.clientHeight<e.scrollHeight;if(o&&r!==`vertical`){let r=Yr(e,t,`left`),a=Xr(e),o=Xr(t);n===`ltr`&&(r+t.offsetWidth+o.scrollMarginRight>e.scrollLeft+e.clientWidth-a.scrollPaddingRight?i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight:r-o.scrollMarginLeft<e.scrollLeft+a.scrollPaddingLeft&&(i=r-o.scrollMarginLeft-a.scrollPaddingLeft)),n===`rtl`&&(r-o.scrollMarginLeft<e.scrollLeft+a.scrollPaddingLeft?i=r-o.scrollMarginLeft-a.scrollPaddingLeft:r+t.offsetWidth+o.scrollMarginRight>e.scrollLeft+e.clientWidth-a.scrollPaddingRight&&(i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight))}if(s&&r!==`horizontal`){let n=Yr(e,t,`top`),r=Xr(e),i=Xr(t);n-i.scrollMarginTop<e.scrollTop+r.scrollPaddingTop?a=n-i.scrollMarginTop-r.scrollPaddingTop:n+t.offsetHeight+i.scrollMarginBottom>e.scrollTop+e.clientHeight-r.scrollPaddingBottom&&(a=n+t.offsetHeight+i.scrollMarginBottom-e.clientHeight+r.scrollPaddingBottom)}e.scrollTo({left:i,top:a,behavior:`auto`})}function Yr(e,t,n){let r=n===`left`?`offsetLeft`:`offsetTop`,i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);)t=t.offsetParent;return i}function Xr(e){let t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}function Zr(e){return u(19)?e:e?`true`:void 0}var Qr=z.forwardRef(function(e,t){let{cutout:n,...r}=e,i;if(n){let e=n.getBoundingClientRect();i=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`}return(0,Y.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})}),$r={},ei={},ti=``;function ni(e,t){return T(e)?e:t}function ri(e,t,n){return/hidden|clip/.test(e.getComputedStyle(ni(t,n)).overflowY)}function ii(e){if(typeof document>`u`)return!1;let t=B(e);return b(t).innerWidth-t.documentElement.clientWidth>0}function ai(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=B(e),n=t.documentElement,r=t.body,i=ni(n,r),a=i.style.overflowY,o=n.style.scrollbarGutter;n.style.scrollbarGutter=`stable`,i.style.overflowY=`scroll`;let s=i.offsetWidth;i.style.overflowY=`hidden`;let c=i.offsetWidth;return i.style.overflowY=a,n.style.scrollbarGutter=o,s===c}function oi(e){let t=B(e),n=t.documentElement,r=t.body,i=ni(n,r),a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:`hidden`,overflowX:`hidden`}),()=>{Object.assign(i.style,a)}}function si(e){let t=B(e),n=t.documentElement,r=t.body,i=b(n),a=0,o=0,s=!1,c=L.create();if(me&&(i.visualViewport?.scale??1)!==1)return()=>{};function l(){let t=i.getComputedStyle(n),c=i.getComputedStyle(r),l=(t.scrollbarGutter||``).includes(`both-edges`)?`stable both-edges`:`stable`;a=n.scrollTop,o=n.scrollLeft,$r={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},ti=n.style.scrollBehavior,ei={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};let u=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f=t.overflowY===`scroll`||c.overflowY===`scroll`,p=t.overflowX===`scroll`||c.overflowX===`scroll`,m=Math.max(0,i.innerWidth-r.clientWidth),h=Math.max(0,i.innerHeight-r.clientHeight),g=parseFloat(c.marginTop)+parseFloat(c.marginBottom),_=parseFloat(c.marginLeft)+parseFloat(c.marginRight),v=ni(n,r);s=ai(e),s?(n.style.scrollbarGutter=l,v.style.overflowY=`hidden`,v.style.overflowX=`hidden`):(Object.assign(n.style,{scrollbarGutter:l,overflowY:`hidden`,overflowX:`hidden`}),(u||f)&&(n.style.overflowY=`scroll`),(d||p)&&(n.style.overflowX=`scroll`),Object.assign(r.style,{position:`relative`,height:g||h?`calc(100dvh - ${g+h}px)`:`100dvh`,width:_||m?`calc(100vw - ${_+m}px)`:`100vw`,boxSizing:`border-box`,overflowY:`hidden`,overflowX:`hidden`,scrollBehavior:`unset`}),r.scrollTop=a,r.scrollLeft=o,n.setAttribute(`data-base-ui-scroll-locked`,``),n.style.scrollBehavior=`unset`)}function u(){Object.assign(n.style,$r),Object.assign(r.style,ei),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=ti)}function d(){u(),c.request(l)}l();let f=$(i,`resize`,d);return()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&f()}}var ci=new class{lockCount=0;restore=null;timeoutLock=I.create();timeoutUnlock=I.create();acquire(e){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{--this.lockCount,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(this.lockCount===0||this.restore!==null)return;let t=B(e),n=t.documentElement,r=t.body,i=b(n);if(ri(i,n,r)){let t=new i.MutationObserver(()=>{ri(i,n,r)||(t.disconnect(),this.restore=null,this.lock(e))}),a={attributes:!0};t.observe(n,a),t.observe(r,a),this.restore=()=>t.disconnect();return}let a=J||!ii(e);this.restore=a?oi(e):si(e)}};function li(e=!0,t=null){S(()=>{if(e)return ci.acquire(t)},[e,t])}var ui=z.createContext(void 0);function di(){return z.useContext(ui)?.direction??`ltr`}var fi=(e,t)=>e.number-t.number,pi=e=>{let t=[...e].sort(fi),n=t.find(({kind:e})=>e===`issue`)??t[0]??e[0];return{origin:n,pullRequests:t.filter(({kind:e,number:t})=>e===`pr`&&t!==n.number)}},mi=e=>pi(i(e.items)?e.items:[e]),hi=(e,t)=>o(e?.projects.flatMap(({board:e})=>e.lanes).flatMap(({items:e})=>e).find(e=>e.items.some(e=>e.itemKey===t))),gi=(e,t)=>r(hi(e,t.itemKey),{onNone:()=>pi([t]),onSome:mi}),_i=()=>R(ie()).data,vi=e=>s(o(/\/pull\/(\d+)/u.exec(e)?.[1]),Number),yi=(e,t)=>s(vi(e),n=>t.find(e=>e.number===n)??{kind:`pr`,number:n,url:e,state:null});function bi(e){"@babel/helpers - typeof";return bi=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},bi(e)}var xi=[`aria-hidden`,`aria-label`,`aria-labelledby`,`tabIndex`,`className`,`fill`,`size`,`verticalAlign`,`id`,`title`,`style`];function Si(){return Si=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Si.apply(null,arguments)}function Ci(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function wi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Ci(Object(n),!0).forEach(function(t){Ti(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ci(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ti(e,t,n){return(t=Ei(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ei(e){var t=Di(e,`string`);return bi(t)==`symbol`?t:t+``}function Di(e,t){if(bi(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(bi(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Oi(e,t){if(e==null)return{};var n,r,i=ki(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function ki(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Ai={small:16,medium:32,large:64};function ji(e,t,n,r,i){var a=e[`aria-hidden`],o=e[`aria-label`],s=e[`aria-labelledby`],c=e.tabIndex,l=e.className,u=l===void 0?``:l,d=e.fill,f=d===void 0?`currentColor`:d,p=e.size,m=p===void 0?16:p,h=e.verticalAlign,g=h===void 0?`text-bottom`:h,_=e.id,v=e.title,y=e.style,b=Oi(e,xi),x=Ai[m]||m,S=Mi(i,x),ee=r[S].width,C=ee/S*x,w=r[S].path,T=o||s,te=a===void 0?T?void 0:`true`:a,E=T&&te!==`true`?`img`:void 0;return z.createElement(`svg`,Si({ref:t,"data-component":`Octicon`},b,{"aria-hidden":te,tabIndex:c,focusable:c>=0?`true`:`false`,"aria-label":o,"aria-labelledby":s,className:`${n} ${u}`.trim(),role:E,viewBox:`0 0 ${ee} ${S}`,width:C,height:x,fill:f,id:_,display:`inline-block`,overflow:`visible`,style:wi({verticalAlign:g},y)}),v?z.createElement(`title`,null,v):null,w)}function Mi(e,t){return e.map(function(e){return parseInt(e,10)}).reduce(function(e,n){return n<=t?n:e},e[0])}var Ni=[`16`,`24`],Pi={16:{width:16,path:z.createElement(`path`,{d:`M5.45 5.154A4.25 4.25 0 0 0 9.25 7.5h1.378a2.251 2.251 0 1 1 0 1.5H9.25A5.734 5.734 0 0 1 5 7.123v3.505a2.25 2.25 0 1 1-1.5 0V5.372a2.25 2.25 0 1 1 1.95-.218ZM4.25 13.5a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Zm8.5-4.5a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5ZM5 3.25a.75.75 0 1 0 0 .005V3.25Z`})},24:{width:24,path:z.createElement(z.Fragment,null,z.createElement(`path`,{d:`M15 13.25a3.25 3.25 0 1 1 6.5 0 3.25 3.25 0 0 1-6.5 0Zm-12.5 6a3.25 3.25 0 1 1 6.5 0 3.25 3.25 0 0 1-6.5 0Zm0-14.5a3.25 3.25 0 1 1 6.5 0 3.25 3.25 0 0 1-6.5 0ZM5.75 6.5a1.75 1.75 0 1 0-.001-3.501A1.75 1.75 0 0 0 5.75 6.5Zm0 14.5a1.75 1.75 0 1 0-.001-3.501A1.75 1.75 0 0 0 5.75 21Zm12.5-6a1.75 1.75 0 1 0-.001-3.501A1.75 1.75 0 0 0 18.25 15Z`}),z.createElement(`path`,{d:`M6.5 7.25c0 2.9 2.35 5.25 5.25 5.25h4.5V14h-4.5A6.75 6.75 0 0 1 5 7.25Z`}),z.createElement(`path`,{d:`M5.75 16.75A.75.75 0 0 1 5 16V8a.75.75 0 0 1 1.5 0v8a.75.75 0 0 1-.75.75Z`}))}},Fi=z.forwardRef(function(e,t){return ji(e,t,`octicon octicon-git-merge`,Pi,Ni)});Fi.displayName=`GitMergeIcon`;var Ii=[`16`,`24`],Li={16:{width:16,path:z.createElement(`path`,{d:`M1.5 3.25a2.25 2.25 0 1 1 3 2.122v5.256a2.251 2.251 0 1 1-1.5 0V5.372A2.25 2.25 0 0 1 1.5 3.25Zm5.677-.177L9.573.677A.25.25 0 0 1 10 .854V2.5h1A2.5 2.5 0 0 1 13.5 5v5.628a2.251 2.251 0 1 1-1.5 0V5a1 1 0 0 0-1-1h-1v1.646a.25.25 0 0 1-.427.177L7.177 3.427a.25.25 0 0 1 0-.354ZM3.75 2.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm0 9.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm8.25.75a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Z`})},24:{width:24,path:z.createElement(z.Fragment,null,z.createElement(`path`,{d:`M16 19.25a3.25 3.25 0 1 1 6.5 0 3.25 3.25 0 0 1-6.5 0Zm-14.5 0a3.25 3.25 0 1 1 6.5 0 3.25 3.25 0 0 1-6.5 0Zm0-14.5a3.25 3.25 0 1 1 6.5 0 3.25 3.25 0 0 1-6.5 0ZM4.75 3a1.75 1.75 0 1 0 .001 3.501A1.75 1.75 0 0 0 4.75 3Zm0 14.5a1.75 1.75 0 1 0 .001 3.501A1.75 1.75 0 0 0 4.75 17.5Zm14.5 0a1.75 1.75 0 1 0 .001 3.501 1.75 1.75 0 0 0-.001-3.501Z`}),z.createElement(`path`,{d:`M13.405 1.72a.75.75 0 0 1 0 1.06L12.185 4h4.065A3.75 3.75 0 0 1 20 7.75v8.75a.75.75 0 0 1-1.5 0V7.75a2.25 2.25 0 0 0-2.25-2.25h-4.064l1.22 1.22a.75.75 0 0 1-1.061 1.06l-2.5-2.5a.75.75 0 0 1 0-1.06l2.5-2.5a.75.75 0 0 1 1.06 0ZM4.75 7.25A.75.75 0 0 1 5.5 8v8A.75.75 0 0 1 4 16V8a.75.75 0 0 1 .75-.75Z`}))}},Ri=z.forwardRef(function(e,t){return ji(e,t,`octicon octicon-git-pull-request`,Li,Ii)});Ri.displayName=`GitPullRequestIcon`;var zi=[`16`,`24`],Bi={16:{width:16,path:z.createElement(`path`,{d:`M3.25 1A2.25 2.25 0 0 1 4 5.372v5.256a2.251 2.251 0 1 1-1.5 0V5.372A2.251 2.251 0 0 1 3.25 1Zm9.5 5.5a.75.75 0 0 1 .75.75v3.378a2.251 2.251 0 1 1-1.5 0V7.25a.75.75 0 0 1 .75-.75Zm-2.03-5.273a.75.75 0 0 1 1.06 0l.97.97.97-.97a.748.748 0 0 1 1.265.332.75.75 0 0 1-.205.729l-.97.97.97.97a.751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018l-.97-.97-.97.97a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734l.97-.97-.97-.97a.75.75 0 0 1 0-1.06ZM2.5 3.25a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0ZM3.25 12a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm9.5 0a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Z`})},24:{width:24,path:z.createElement(`path`,{d:`M22.266 2.711a.75.75 0 1 0-1.061-1.06l-1.983 1.983-1.984-1.983a.75.75 0 1 0-1.06 1.06l1.983 1.983-1.983 1.984a.75.75 0 0 0 1.06 1.06l1.984-1.983 1.983 1.983a.75.75 0 0 0 1.06-1.06l-1.983-1.984 1.984-1.983ZM4.75 1.5a3.25 3.25 0 0 1 .745 6.414A.827.827 0 0 1 5.5 8v8a.827.827 0 0 1-.005.086A3.25 3.25 0 0 1 4.75 22.5a3.25 3.25 0 0 1-.745-6.414A.827.827 0 0 1 4 16V8c0-.029.002-.057.005-.086A3.25 3.25 0 0 1 4.75 1.5ZM16 19.25a3.252 3.252 0 0 1 2.5-3.163V9.625a.75.75 0 0 1 1.5 0v6.462a3.252 3.252 0 0 1-.75 6.413A3.25 3.25 0 0 1 16 19.25ZM3 4.75a1.75 1.75 0 1 0 3.501-.001A1.75 1.75 0 0 0 3 4.75Zm0 14.5a1.75 1.75 0 1 0 3.501-.001A1.75 1.75 0 0 0 3 19.25Zm16.25-1.75a1.75 1.75 0 1 0 .001 3.501 1.75 1.75 0 0 0-.001-3.501Z`})}},Vi=z.forwardRef(function(e,t){return ji(e,t,`octicon octicon-git-pull-request-closed`,Bi,zi)});Vi.displayName=`GitPullRequestClosedIcon`;var Hi=[`16`,`24`],Ui={16:{width:16,path:z.createElement(z.Fragment,null,z.createElement(`path`,{d:`M11.28 6.78a.75.75 0 0 0-1.06-1.06L7.25 8.69 5.78 7.22a.75.75 0 0 0-1.06 1.06l2 2a.75.75 0 0 0 1.06 0l3.5-3.5Z`}),z.createElement(`path`,{d:`M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0Zm-1.5 0a6.5 6.5 0 1 0-13 0 6.5 6.5 0 0 0 13 0Z`}))},24:{width:24,path:z.createElement(z.Fragment,null,z.createElement(`path`,{d:`M17.28 9.28a.75.75 0 0 0-1.06-1.06l-5.97 5.97-2.47-2.47a.75.75 0 0 0-1.06 1.06l3 3a.75.75 0 0 0 1.06 0l6.5-6.5Z`}),z.createElement(`path`,{d:`M12 1c6.075 0 11 4.925 11 11s-4.925 11-11 11S1 18.075 1 12 5.925 1 12 1ZM2.5 12a9.5 9.5 0 0 0 9.5 9.5 9.5 9.5 0 0 0 9.5-9.5A9.5 9.5 0 0 0 12 2.5 9.5 9.5 0 0 0 2.5 12Z`}))}},Wi=z.forwardRef(function(e,t){return ji(e,t,`octicon octicon-issue-closed`,Ui,Hi)});Wi.displayName=`IssueClosedIcon`;var Gi=[`16`,`24`],Ki={16:{width:16,path:z.createElement(z.Fragment,null,z.createElement(`path`,{d:`M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z`}),z.createElement(`path`,{d:`M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Z`}))},24:{width:24,path:z.createElement(`path`,{d:`M12 1c6.075 0 11 4.925 11 11s-4.925 11-11 11S1 18.075 1 12 5.925 1 12 1ZM2.5 12a9.5 9.5 0 0 0 9.5 9.5 9.5 9.5 0 0 0 9.5-9.5A9.5 9.5 0 0 0 12 2.5 9.5 9.5 0 0 0 2.5 12Zm9.5 2a2 2 0 1 1-.001-3.999A2 2 0 0 1 12 14Z`})}},qi=z.forwardRef(function(e,t){return ji(e,t,`octicon octicon-issue-opened`,Ki,Gi)});qi.displayName=`IssueOpenedIcon`;var Ji={"issue-open":{icon:qi,tone:`text-run-succeeded`,word:`open`},"issue-closed":{icon:Wi,tone:`text-primary`,word:`closed`},"issue-unknown":{icon:qi,tone:`text-muted-foreground`,word:null},"pr-open":{icon:Ri,tone:`text-run-succeeded`,word:`open`},"pr-merged":{icon:Fi,tone:`text-primary`,word:`merged`},"pr-closed":{icon:Vi,tone:`text-run-failed`,word:`closed`},"pr-unknown":{icon:Ri,tone:`text-muted-foreground`,word:null}},Yi=({kind:e,state:t})=>Ji[t??`${e}-unknown`],Xi=e=>e===`pr`?`Pull request`:`Issue`,Zi=({kind:e,number:t})=>`${Xi(e).toLowerCase()} #${t}`,Qi=e=>{let{word:t}=Yi(e);return`${Xi(e.kind)} #${e.number}${t===null?``:`, ${t}`}`},$i=({item:e,size:t=`inline`,linked:n=!0,numbered:r=!0,className:i})=>{let{icon:a,tone:o}=Yi(e),s=Qi(e),c=d(`inline-flex items-baseline gap-1 whitespace-nowrap`,t===`title`&&`gap-1.5`,o,i),l=(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(a,{size:t===`title`?16:14,className:`shrink-0 self-center`}),r&&(0,Y.jsxs)(`span`,{className:d(`font-mono tabular-nums`,t===`title`?`text-md`:`text-xs`),children:[`#`,e.number]})]});return n?(0,Y.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noreferrer`,draggable:!1,title:s,"aria-label":s,className:d(c,`rounded-sm underline-offset-4 outline-none hover:underline focus-visible:ring-2 focus-visible:ring-ring/70`),children:l}):(0,Y.jsx)(`span`,{role:`img`,title:s,"aria-label":s,className:c,children:l})};export{xn as $,De as $t,nr as A,at as At,cr as B,Ye as Bt,Mr as C,Rt as Ct,xr as D,At as Dt,br as E,Ft as Et,lr as F,ct as Ft,Ln as G,We as Gt,Zn as H,Ge as Ht,ur as I,tt as It,Pn as J,Re as Jt,Rn as K,qe as Kt,dr as L,$e as Lt,or as M,ot as Mt,er as N,ut as Nt,pr as O,jt as Ot,ar as P,rt as Pt,On as Q,Te as Qt,tr as R,et as Rt,Jr as S,zt as St,kr as T,Pt as Tt,Xn as U,Ve as Ut,ir as V,Je as Vt,qn as W,Ke as Wt,jn as X,Le as Xt,Fn as Y,ze as Yt,kn as Z,Ie as Zt,zr as _,R as _n,Gt as _t,gi as a,Se as an,rn as at,Gr as b,qt as bt,pi as c,Z as cn,$ as ct,li as d,he as dn,Xt as dt,we as en,bn as et,Qr as f,me as fn,Wt as ft,Hr as g,B as gn,Kt as gt,Vr as h,oe as hn,Vt as ht,mi as i,xe as in,an as it,sr as j,it as jt,$n as k,st as kt,_i as l,Q as ln,Jt as lt,Br as m,fe as mn,Zt as mt,Qi as n,Ce as nn,Cn as nt,yi as o,X as on,$t as ot,Zr as p,J as pn,Ut as pt,In as q,Be as qt,Zi as r,be as rn,sn as rt,hi as s,_e as sn,Qt as st,$i as t,Ee as tn,Sn as tt,di as u,ge as un,Ht as ut,Wr as v,It as vt,Rr as w,Lt as wt,qr as x,Yt as xt,Ur as y,Bt as yt,fr as z,Ze as zt};
@@ -1,2 +0,0 @@
1
- var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n)),u=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function D(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function O(e,t){return D(e.type,t,e.props)}function k(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function ee(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function te(e,t){return typeof e==`object`&&e&&e.key!=null?ee(``+e.key):t.toString(36)}function ne(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function j(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,j(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+te(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),j(o,r,i,``,function(e){return e})):o!=null&&(k(o)&&(o=O(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u<e.length;u++)a=e[u],s=l+te(a,u),c+=j(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+te(a,u++),c+=j(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return j(ne(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function M(e,t,n){if(e==null)return e;var r=[],i=0;return j(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function re(e){if(e._status===-1){var t=e._result,n=t();n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t,n.status===void 0&&(n.status=`fulfilled`,n.value=t))},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t,n.status===void 0&&(n.status=`rejected`,n.reason=t))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var N=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)};function ie(e){var t=T.T,n={};n.types=t===null?null:t.types,T.T=n;try{var r=e(),i=T.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(w,N)}catch(e){N(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function ae(e){var t=T.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else ie(ae.bind(null,e))}var oe={map:M,forEach:function(e,t,n){M(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return M(e,function(){t++}),t},toArray:function(e){return M(e,function(e){return e})||[]},only:function(e){if(!k(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=oe,e.Component=y,e.Fragment=r,e.Profiler=a,e.PureComponent=x,e.StrictMode=i,e.Suspense=l,e.ViewTransition=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return T.H.useMemoCache(e)}},e.addTransitionType=ae,e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=_({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!E.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return D(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)E.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return D(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=k,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:re}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=ie,e.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},e.use=function(e){return T.H.use(e)},e.useActionState=function(e,t,n){return T.H.useActionState(e,t,n)},e.useCallback=function(e,t){return T.H.useCallback(e,t)},e.useContext=function(e){return T.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return T.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return T.H.useEffect(e,t)},e.useEffectEvent=function(e){return T.H.useEffectEvent(e)},e.useId=function(){return T.H.useId()},e.useImperativeHandle=function(e,t,n){return T.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return T.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return T.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return T.H.useMemo(e,t)},e.useOptimistic=function(e,t){return T.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return T.H.useReducer(e,t,n)},e.useRef=function(e){return T.H.useRef(e)},e.useState=function(e){return T.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return T.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return T.H.useTransition()},e.version=`19.3.1`})),d=o(((e,t)=>{t.exports=u()})),f=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),p=o(((e,t)=>{t.exports=f()}));function m(e){return e[e.length-1]}function h(e,t){return typeof e==`function`?e(t):e}var g=Object.prototype.hasOwnProperty;function _(e){for(let t in e)if(g.call(e,t))return!0;return!1}var v=()=>Object.create(null),y=(e,t)=>b(e,t,!0);function b(e,t,n,r=0){if(e===t)return e;if(r++>500)return t;let i=Array.isArray(e)&&Array.isArray(t);if(!i&&!(x(e)&&x(t)))return t;let a=Object.keys(e),o=a.length,s=Object.keys(t),c=s.length;if(i?o!==e.length||c!==t.length||o&&m(a)!==`${o-1}`||c&&m(s)!==`${c-1}`:o!==Object.getOwnPropertyNames(e).length||c!==Object.getOwnPropertyNames(t).length||Object.getOwnPropertySymbols(t).length)return t;let l=0,u,d,f;if(i){for(;l<c&&(f=l,d=e[f],u=t[f],u=d===u?d:typeof d==`object`?b(d,u,n,r):u,u===d);l++);if(l===c&&o===c)return e}else{let i=o===c,p=!0;for(;l<c;l++){f=s[l],d=e[f];let o=t[f];u=d===o?d:typeof d==`object`?b(d,o,n,r):o,i&&=u===d&&(a[l]===f||g.call(e,f)),p&&=Object.is(u,o),a[l]=u}if(i)return Object.getOwnPropertySymbols(e).length?t:e;if(p)return t}let p=i?s.fill(0):n?v():{};for(let o=0;o<c;o++)f=i?o:s[o],i?(d=e[f],o>l&&(u=t[f],u=d===u?d:typeof d==`object`?b(d,u,n,r):u),p[f]=o<l?d:u):p[f]=a[o];return p}function x(e){return!e||typeof e!=`object`?!1:(Object.getPrototypeOf(e)?.constructor??Object)===Object}function S(e,t,n,r){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let i=0,a=e.length;i<a;i++){let a=e[i],o=t[i];if(a!==o&&!S(a,o,n,r))return!1}return!0}if(x(e)&&x(t)){if(n){for(let i in t)if((r||t[i]!==void 0)&&!S(e[i],t[i],n,r))return!1;return!0}let i=0;if(r)i=Object.keys(e).length;else for(let t in e)e[t]!==void 0&&i++;for(let a in t)if((r||t[a]!==void 0)&&(i--===0||!S(e[a],t[a],n,r)))return!1;return i===0}return!1}function C(e){return typeof e?.message==`string`?e.message.startsWith(`Failed to fetch dynamically imported module`)||e.message.startsWith(`error loading dynamically imported module`)||e.message.startsWith(`Importing a module script failed`):!1}var w=/[\x00-\x1f\x7f"<>`{}]/g;function T(e){return e.replace(w,e=>`%`+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,`0`))}function E(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,e=>{try{return decodeURI(e)}catch{return e}})}return T(t)}var D=[`http:`,`https:`,`mailto:`,`tel:`];function O(e){if(e[0]!==`/`&&e.includes(`:`))return/^[\x00-\x20]*([a-z][a-z\d+.\t\n\r-]*:)/i.exec(e)?.[1]?.replace(/[\t\n\r]/g,``).toLowerCase()}var k=/^[\x00-\x20]*[\\/][\t\n\r]*[\\/]/;function ee(e,t){if(!e)return!1;if(k.test(e))return!0;let n=O(e);return n?!t.has(n):!1}function A(e){if(!e)return e;let t=e;if(/[%\\\x00-\x1f\x7f]/.test(e)){let n=/%25|%5C/gi,r=0,i;for(t=``;(i=n.exec(e))!==null;)t+=E(e.slice(r,i.index))+i[0],r=n.lastIndex;t+=E(r?e.slice(r):e)}return t}function te(e){return/[\s\u0080-\uFFFF]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function ne(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function j(){throw Error(`Invariant failed`)}function M(e){return e.replace(/\/{2,}/g,`/`)}function re(e){return e===`/`?e:e.replace(/^\/+/,``)}function N(e){let t=e.length;return t>1&&e[t-1]===`/`?e.replace(/\/+$/,``):e}function ie(e){return N(re(e))}function ae(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function oe(e,t,n=`never`,r){if(t.includes(`//`)&&(t=M(t)),t.startsWith(`/`))return t.length===1||n===`preserve`?t:n===`always`?t.endsWith(`/`)?t:`${t}/`:t.endsWith(`/`)?t.slice(0,-1):t;let i=t===`.`,a;if(r){a=i?e:e+`\0`+t;let n=r.get(a);if(n)return n}let o;if(i)o=e.split(`/`);else{for(e.includes(`//`)&&(e=M(e)),o=e.split(`/`);o.length>1&&m(o)===``;)o.pop();let n=t.split(`/`);for(let e=0,t=n.length;e<t;e++){let r=n[e];r===``?e?e===t-1&&o.push(r):o=[r]:r===`..`?o.length>1?o.pop():o=[``]:r===`.`||o.push(r)}}o.length>1&&(m(o)===``?n===`never`&&o.pop():n===`always`&&o.push(``));let s=o.join(`/`),c=(i?M(s):s)||`/`;return a&&r&&r.set(a,c),c}function se(e){let t=new Map(e.map(e=>[encodeURIComponent(e),e])),n=new RegExp([...t.keys()].join(`|`).replace(/[.*()]/g,`\\$&`),`g`);return e=>e.replace(n,e=>t.get(e)??e)}function ce(e){return e==null||e===``}function le(e,t,n){if(typeof t!=`string`)return``+(t??void 0);let r=e===`_splat`;if(r&&(!t||/^[a-zA-Z0-9\-._~!/]*$/.test(t)))return t;let i=encodeURIComponent(t);return r&&(i=i.replaceAll(`%2F`,`/`)),n?n(i):i}function ue(e,t,n,r,i){let a=e.endsWith(`/`)?`/`:``,o=``;for(let e of t){if(typeof e==`string`){o+=e;continue}let[t,s,c,l]=e,u=t===2,d=u&&l!==void 0?l+a:l,f=n[s];if(t!==3||f!=null){if(i&&(i[s]=f,u&&(i[`*`]=f)),u&&ce(f)){if(c===`/`&&!d)continue;f=``}o+=c+le(s,f,r)+(d||``)}}return o+a||`/`}function de(e={}){if(e.isNotFound=!0,e.throw)throw e;return e}function fe(e){return e?.isNotFound===!0}function pe(){try{return sessionStorage}catch{return}}var me=`tsr-scroll-restoration-v1_3`,he=pe();function ge(){try{return JSON.parse(he?.getItem(`tsr-scroll-restoration-v1_3`)||`{}`)}catch{return{}}}var P=ge(),_e=`data-scroll-restoration-id`,ve=e=>e.state.__TSR_key||e.href;function ye(e){let t=e.getAttribute(_e);if(t)return`[${_e}="${t}"]`;let n=``,r=e,i;for(;i=r.parentNode;){let e=1,t=r;for(;t=t.previousElementSibling;)e++;let a=`${r.localName}:nth-child(${e})`;n=n?`${a} > ${n}`:a,r=i}return n}var be=!1,xe=`window`;function Se(e){try{return typeof e==`function`?e():document.querySelector(e)}catch{}}function Ce(e){let t=new Set;for(let n of e){if(n===xe)continue;let e=Se(n);e&&t.add(e)}return t}function we(e,t){let n=t??e.options.scrollRestoration,r=e._scroll;n&&(r.e=!0);let i=e.options.getScrollRestorationKey||ve,a=new Set,o=e=>{let t=P[e]||={};for(let e of a)e===document?t[xe]={scrollX,scrollY}:e.isConnected&&(t[ye(e)]={scrollX:e.scrollLeft,scrollY:e.scrollTop})};n&&!r.s&&(r.s=!0,be=!1,history.scrollRestoration=`manual`,document.addEventListener(`scroll`,e=>{be||a.add(e.target)},!0),e.subscribe(`onBeforeLoad`,e=>{e.fromLocation&&o(i(e.fromLocation)),a.clear()}),addEventListener(`pagehide`,()=>{history.scrollRestoration=`auto`,o(i(e.stores.resolvedLocation.get()??e.stores.location.get()));try{he?.setItem(me,JSON.stringify(P))}catch{}}),addEventListener(`pageshow`,e=>{e.persisted&&(history.scrollRestoration=`manual`)})),!r.r&&(r.r=!0,e.subscribe(`onRendered`,t=>{let n=e.options.scrollRestorationBehavior,o=e.options.scrollToTopSelectors,s=r.n,c=r.h,l;if(a.clear(),r.n=!0,r.h=!1,typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation}))return;let u=i(t.toLocation),d=t.fromLocation&&i(t.fromLocation);if(r.e&&d&&d!==u){let e=P[d];if(e){let t=P[u];for(let n in e){if(n===xe){if(s)continue}else{let e=Se(n);if(!e||s&&o&&(l??=Ce(o),l.has(e)))continue}t||=P[u]={},t[n]??=e[n]}}}be=!0;try{let e=t.toLocation.hash,i=t.toLocation.state.__hashScrollIntoViewOptions??!0,a=!1;if(s){!e&&o&&(l??=Ce(o));let t=e&&i&&c,s=r.e?P[u]:void 0;if(s)for(let e in s){let{scrollX:r,scrollY:i}=s[e];if(e===xe){if(t)continue;scrollTo({top:i,left:r,behavior:n}),a=!0}else{let t=Se(e);t&&(t.scrollLeft=r,t.scrollTop=i,l?.delete(t))}}if(!e){let e={top:0,left:0,behavior:n};if(a||scrollTo(e),l)for(let t of l)t.scrollTo(e)}}!a&&e&&i&&document.getElementById(e)?.scrollIntoView(i)}finally{be=!1}}))}function Te(e,t=String){let n;for(let r in e){let i=e[r];i!==void 0&&(n||=new URLSearchParams).set(r,t(i))}return n?n.toString():``}function Ee(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function De(e){let t=new URLSearchParams(e),n=Object.create(null);for(let[e,r]of t.entries()){let t=n[e];t==null?n[e]=Ee(r):Array.isArray(t)?t.push(Ee(r)):n[e]=[t,Ee(r)]}return n}var Oe=/^(?:\s|["[{\d-]|fa|nu|tr)/,ke=je(JSON.parse),Ae=Me(JSON.stringify,JSON.parse);function je(e){let t=e===JSON.parse;return n=>{n[0]===`?`&&(n=n.slice(1));let r=De(n);for(let n in r){let i=r[n];if(typeof i==`string`){if(t&&!Oe.test(i))continue;try{r[n]=e(i)}catch{}}}return r}}function Me(e,t){let n=t===JSON.parse;function r(r){if(r&&typeof r==`object`)try{return e(r)}catch{}else if(t&&typeof r==`string`){if(n&&!Oe.test(r))return r;try{return t(r),e(r)}catch{}}return r}return e=>{let t=Te(e,r);return t?`?${t}`:``}}var Ne=`__root__`;function Pe(e){e.statusCode=e.statusCode||e.code||307;let t=new Headers(e.headers);e.href&&t.get(`Location`)===null&&t.set(`Location`,e.href);let n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function Fe(e){return e instanceof Response&&!!e.options}function Ie(e){let t=new Map,n,r;return{get(e){let n=t.get(e);if(n)return n.visited=!0,n.value},set(i,a){let o=t.get(i);if(o){o.value=a;return}if(t.size>=e){let e=n?.next().value;for(;!e||e.visited;)e?e.visited=!1:n=t.values(),e=n.next().value;e===r&&(n=void 0),t.delete(e.key)}let s={key:i,value:a,visited:!1};r=s,t.set(i,s)},clear(){t.clear(),n=void 0,r=void 0}}}var F=4,Le=5;function Re(e){let t=e.names;if(t)return t;let n=[];for(let t of e)typeof t!=`string`&&n.push(t[1]);return e.names=n}function ze(e,t,n){let r=e.slice(t,n);if(r.charCodeAt(0)===36)return r.length===1?[2,`_splat`,``,void 0]:[1,r.slice(1),``,``];let i=r.indexOf(`{`);if(i>=0){let a=r.indexOf(`}`,i),o=r.charCodeAt(i+1)===45,s=i+(o?3:2);if(a>=0&&r.charCodeAt(s-1)===36&&(!o||s<a)){let c=r.slice(s,a);return[o?3:c?1:2,c||`_splat`,r.slice(0,i),e.slice(t+a+1,c?n:e.length)]}}return r}function I(e,t,n,r,i,a){let o=n,s=t.fullPath??t.from,c=t.options,l=s.length,u=s.endsWith(`/`)?l-1:l,d=c?.caseSensitive??e,f=c?.params?.parse??c?.parseParams,p,h=a?n-1:0;if(!r||s.includes(`$`)){p=a?.slice()??[];let e=m(p);e&&typeof e!=`string`&&e[0]===2&&(p[p.length-1]=[e[0],e[1],e[2],e[3]===void 0?void 0:e[3]+s.substring(n-(s[n-2]===`/`?2:1),u)],h=l)}for(;o<l;){let e=o,t=s.indexOf(`/`,e),n=t===-1?l:t,a=ze(s,e,n);o=n+1;let c;if(typeof a==`string`){if(!r)continue;let e=a,t;d?t=r.static??=new Map:(e=a.toLowerCase(),t=r.staticInsensitive??=new Map);let n=t.get(e);if(n)c=n;else{let n=L(r);c=n,t.set(e,n)}}else{let t=a[0],m=a[2],g=a[3]??``;if(t===2&&(n=l,o=n+1),p&&h<n&&(h<e-1&&p.push(s.slice(h,e-1)),a[2]=`/`+m,t===2&&a[3]!==void 0&&u<l&&(a[3]=g.slice(0,-1)),p.push(a),h=n),!r)continue;let _=d&&!!(m||g);d||(m=m.toLowerCase(),g=g.toLowerCase());let v=t===1?r.dynamic??=[]:t===3?r.optional??=[]:r.wildcard??=[],y=t!==2&&!f&&v.find(e=>!e.parse&&e.caseSensitive===_&&e.prefix===m&&e.suffix===g);if(y)c=y;else{let e=L(r,t,_,m,g);c=e,v.push(e),v.length===2&&i?.push(v)}}r=c}p&&h<u&&p.push(s.slice(h,u));let g=p?.slice();if(!r)return g;if(f&&t.children&&!t.isRoot&&t.id&&t.id.charCodeAt(t.id.lastIndexOf(`/`)+1)===95){let e=L(r,Le);(r.pathless??=[]).push(e),r=e}let _=(t.path||!t.children)&&!t.isRoot;if(_&&u<l){let e=L(r,F);r.index=e,r=e}return r.parse=f??null,r.priority=c?.params?.priority??0,r.route||(r.data=g,_&&(r.route=t)),[r,o,g]}function Be(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;if(e.parse&&t.parse&&(e.priority||t.priority))return t.priority-e.priority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function L(e,t=0,n,r,i){return{kind:t,depth:e?e.depth+1:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,data:void 0,parent:e,parse:null,priority:0,caseSensitive:n,prefix:r,suffix:i}}function Ve(e,t){let n=L(),r=[];function i(e,t,n,a){let[o,s,c]=I(!1,e,t,n,r,a);if(e.children)for(let t of e.children)i(t,s,o,c)}for(let t of e)i(t,1,n);for(let e of r)e.sort(Be);t.masksTree=n,t.flatCache=Ie(1e3)}function He(e,t){e||=`/`;let n=t.flatCache.get(e);if(n!==void 0)return n;let r=Ke(e,t.masksTree);return t.flatCache.set(e,r),r}function Ue(e,t,n,r,i){e||=`/`,r||=`/`;let a=t?`case\0${e}`:e,o=i.singleCache.get(a);return o||(o=L(),I(t,{from:e},1,o),i.singleCache.set(a,o)),Ke(r,o,n)}function We(e,t,n=!1){let r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||=`/`;let a;try{a=Ke(e,t.segmentTree,n)}catch(e){if(e instanceof URIError)a=null;else throw e}return a&&(a.branch=Je(a.route)),t.matchCache.set(r,a),a}function Ge(e,t=!1){let n=L(),r=[],i={},a={},o=0;function s(e,n,c,l){if(e.init(o),e.id in i&&j(),i[e.id]=e,o!==0&&e.path){let t=N(e.fullPath);(!a[t]||e.fullPath.endsWith(`/`))&&(a[t]=e)}o++;let[u,d,f]=I(t,e,n,c,r,l);if(e._interpolation=f,e.children)for(let t of e.children)s(t,d,u,f)}s(e,1,n);for(let e of r)e.sort(Be);return{processedTree:{segmentTree:n,singleCache:Ie(1e3),matchCache:Ie(1e3),flatCache:null,masksTree:null},routesById:i,routesByPath:a}}function Ke(e,t,n=!1){let r=e.split(`/`),i=Xe(e,r,t,n);if(!i)return null;let[a]=qe(e,r,i);return{route:i.node.route,rawParams:a}}function qe(e,t,n){let r=Ye(n.node),i=n.node.data&&Re(n.node.data),a=Object.create(null),o=n.extract?.part??0,s=n.extract?.node??0,c=n.extract?.path??0,l=n.extract?.param??0;for(;s<r.length;o++,s++,c++){let u=r[s];if(u.kind===F)break;if(u.kind===Le){o--,c--;continue}let d=t[o],f=c;if(d&&(c+=d.length),u.kind===1||u.kind===3){let e=i[l++];if(u.kind===3&&n.skipped&1<<s){o--,c=f-1;continue}let t=u.suffix||u.prefix?d.substring(u.prefix.length,d.length-u.suffix.length):d;(t||u.kind===1)&&(a[e]=decodeURIComponent(t))}else if(u.kind===2){let t=u,n=e.substring(f+t.prefix.length,e.length-t.suffix.length),r=decodeURIComponent(n);a[`*`]=r,a._splat=r;break}}return n.rawParams&&Object.assign(a,n.rawParams),[a,{part:o,node:s,path:c,param:l}]}function Je(e){let t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function Ye(e){let t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function Xe(e,t,n,r){if(e===`/`&&n.index)return{node:n.index,skipped:0};let i=!m(t),a=i&&e!==`/`,o=t.length-+!!i,s=[{node:n,index:1,skipped:0,statics:0,dynamics:0,optionals:0}],c=null,l=null;for(;s.length;){let n=s.pop(),{node:i,index:u,skipped:d,statics:f,dynamics:p,optionals:m}=n,{extract:h,rawParams:g}=n;if(i.kind===2&&i.route&&!et(l,n))continue;if(i.parse){if(!$e(e,t,n))continue;g=n.rawParams,h=n.extract}r&&i.route&&i.kind!==F&&et(c,n)&&(c=n);let _=u===o;if(_&&(i.route&&(!a||i.kind===F||i.kind===2)&&et(l,n)&&(l=n),!i.optional&&!i.wildcard&&!i.index&&!i.pathless))continue;let v=_?void 0:t[u],y;if(_&&i.index){let n={node:i.index,index:u,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g},r=!0;if(i.index.parse&&($e(e,t,n)||(r=!1)),r){if(!p&&!m&&!d&&Qe(f,o))return n;et(l,n)&&(l=n)}}if(i.wildcard)for(let e=i.wildcard.length-1;e>=0;e--){let n=i.wildcard[e],{prefix:r,suffix:a}=n;if(!r||!_&&(n.caseSensitive?v:y??=v.toLowerCase()).startsWith(r)){if(a){if(_)continue;let e=t.slice(u).join(`/`),i=e.slice(-a.length);if((n.caseSensitive?i:i.toLowerCase())!==a||e.length-a.length<r.length)continue}s.push({node:n,index:o,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(i.optional){let e=d|1<<i.depth+1;for(let t=i.optional.length-1;t>=0;t--){let n=i.optional[t];s.push({node:n,index:u,skipped:e,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_)for(let e=i.optional.length-1;e>=0;e--){let t=i.optional[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)<n.length)continue}s.push({node:t,index:u+1,skipped:d,statics:f,dynamics:p,optionals:m+Ze(o,u),extract:h,rawParams:g})}}if(!_&&i.dynamic&&v)for(let e=i.dynamic.length-1;e>=0;e--){let t=i.dynamic[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)<n.length)continue}s.push({node:t,index:u+1,skipped:d,statics:f,dynamics:p+Ze(o,u),optionals:m,extract:h,rawParams:g})}if(!_&&i.staticInsensitive){let e=i.staticInsensitive.get(y??=v.toLowerCase());e&&s.push({node:e,index:u+1,skipped:d,statics:f+Ze(o,u),dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_&&i.static){let e=i.static.get(v);e&&s.push({node:e,index:u+1,skipped:d,statics:f+Ze(o,u),dynamics:p,optionals:m,extract:h,rawParams:g})}if(i.pathless)for(let e=i.pathless.length-1;e>=0;e--){let t=i.pathless[e];s.push({node:t,index:u,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(l)return l;if(r&&c){let n=c.index;for(let e=0;e<c.index;e++)n+=t[e].length;let r=n===e.length?`/`:e.slice(n);return c.rawParams??=Object.create(null),c.rawParams[`**`]=decodeURIComponent(r),c}return null}function Ze(e,t){return 2**(e-t-1)}function Qe(e,t){return e===2**(t-1)-1}function $e(e,t,n){let r,i;try{[r,i]=qe(e,t,n)}catch{return null}if(n.rawParams=r,n.extract=i,!n.node.parse)return!0;try{if(n.node.parse(r)===!1)return null}catch{}return!0}function et(e,t){return!e||t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===F)>(e.node.kind===F)||t.node.kind===F==(e.node.kind===F)&&t.node.depth>e.node.depth)))}function tt(e,t,n){let r=ie(e),i=`/${r}`,a=t?i:i.toLowerCase(),o=`${a}/`,s={input:({url:e})=>{let n=t?e.pathname:e.pathname.toLowerCase();return n===a?e.pathname=`/`:n.startsWith(o)&&(e.pathname=e.pathname.slice(i.length)),e},output:({url:e})=>(e.pathname=M(`/${r}${e.pathname}`),e)};return n?{input:({url:e})=>nt(n,s.input({url:e})),output:({url:e})=>s.output({url:rt(n,e)})}:s}function nt(e,t){let n=e?.input?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function rt(e,t){let n=e?.output?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function it(e){let t=e;return{get(){return t},set(e){t=h(e,t)}}}function at(e){return{get(){return e()}}}function ot(e,t){let{createMutableStore:n,createReadonlyStore:r,batch:i}=t,a=new Map,o=n(`idle`),s=n(e),c=n(void 0),l=n([]),u=r(()=>l.get().map(e=>a.get(e).get())),d=r(()=>({status:o.get(),isLoading:o.get()===`pending`,matches:u.get(),location:s.get(),resolvedLocation:c.get()}));function f(e){let t=a.get(e);return t||(t=n(void 0),a.set(e,t)),t}let p={status:o,location:s,resolvedLocation:c,ids:l,matches:u,byRoute:a,__store:d,getMatchStore:f,setMatches:m};function m(e){let t=l.get(),n=e.map(e=>e.routeId);i(()=>{ne(t,n)||l.set(n);for(let e of t)n.includes(e)||a.get(e).set(()=>void 0);for(let t of e){let e=f(t.routeId);e.get()!==t&&e.set(t)}})}return p}var R=`__TSR_index`,st=`popstate`,ct=`beforeunload`,lt=/^[\x00-\x20]*(?:[\\/][\t\n\r]*){2,}/;function ut(e){let t=lt.exec(e);return t?`/`+e.slice(t[0].length):e}function dt(e){return/[\x00-\x1f\x7f]/.test(e)&&(e=e.replace(/[\x00-\x1f\x7f]/g,e=>`
2
- \r`.includes(e)?``:encodeURIComponent(e))),ut(e)}function ft(e){let t=e.getLocation(),n=new Set,r=r=>{t=e.getLocation(),n.forEach(e=>e({location:t,action:r}))},i=n=>{e.notifyOnIndexChange??!0?r(n):t=e.getLocation()},a=async n=>{let r=n.navigateOpts?.ignoreBlocker?void 0:e.getBlockers?.();if(typeof document<`u`&&r?.length&&(n.type===`PUSH`||n.type===`REPLACE`))for(let i of r){let r=ht(n.path,n.state);if(await i.blockerFn({currentLocation:t,nextLocation:r,action:n.type})){e.onBlocked?.();return}}n.task()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:e=>(n.add(e),()=>{n.delete(e)}),push:(n,i,o)=>{let s=t.state[R];i=pt(s+1,i),a({task:()=>{e.pushState(n,i),r({type:`PUSH`})},navigateOpts:o,type:`PUSH`,path:n,state:i})},replace:(n,i,o)=>{let s=t.state[R];i=pt(s,i),a({task:()=>{e.replaceState(n,i),r({type:`REPLACE`})},navigateOpts:o,type:`REPLACE`,path:n,state:i})},go:(t,n)=>{a({task:()=>{e.go(t,n?.ignoreBlocker??!1),i({type:`GO`,index:t})},navigateOpts:n,type:`GO`})},back:t=>{a({task:()=>{e.back(t?.ignoreBlocker??!1),i({type:`BACK`})},navigateOpts:t,type:`BACK`})},forward:t=>{a({task:()=>{e.forward(t?.ignoreBlocker??!1),i({type:`FORWARD`})},navigateOpts:t,type:`FORWARD`})},canGoBack:()=>t.state[R]!==0,createHref:t=>e.createHref(t),block:t=>{if(!e.setBlockers)return()=>{};let n=e.getBlockers?.()??[];return e.setBlockers([...n,t]),()=>{let n=e.getBlockers?.()??[];e.setBlockers?.(n.filter(e=>e!==t))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r,_getBlockers:()=>e.getBlockers?.()??[]}}function pt(e,t){let n=gt();return{...t,key:n,__TSR_key:n,[R]:e}}function mt(e){let t=e?.window??(typeof document<`u`?window:void 0),n=t.history.pushState,r=t.history.replaceState,i=[],a=()=>i,o=e=>i=e,s=t=>dt(e?.createHref?e.createHref(t):t),c=e?.parseLocation??(()=>ht(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=gt();t.history.replaceState({[R]:0,key:e,__TSR_key:e},``)}let l=c(),u,d=!1,f=!1,p=!1,m=!1,h=()=>l,g,_=()=>{g&&(S._ignoreSubscribers=!0,(g[2]?t.history.pushState:t.history.replaceState)(g[1],``,g[0]),S._ignoreSubscribers=!1,g=void 0,u=void 0)},v=(t,n,r)=>{let i=e?.createHref?s(n):void 0,a=!!g;a||(u=l),l=ht(n,r),g=[i??l.href,r,g?.[2]||t],a||queueMicrotask(()=>_())},y=e=>{l=c(),S.notify({type:e})},b=async()=>{if(m=!1,f){f=!1;return}let e=c(),n=e.state[R]-l.state[R],r=n===1,i=n===-1,o=!r&&!i||d;d=!1;let s=o?`GO`:i?`BACK`:`FORWARD`,u=o?{type:`GO`,index:n}:{type:i?`BACK`:`FORWARD`};if(p)p=!1;else{let r=a();if(typeof document<`u`&&r.length){for(let i of r)if(await i.blockerFn({currentLocation:l,nextLocation:e,action:s})){f=!0,t.history.go(-n),S.notify(u);return}}}l=c(),S.notify(u)},x=e=>{if(m){m=!1;return}let t=!1,n=a();if(typeof document<`u`&&n.length)for(let e of n){let n=e.enableBeforeUnload??!0;if(n===!0||typeof n==`function`&&n()===!0){t=!0;break}}if(t)return e.preventDefault(),e.returnValue=``},S=ft({getLocation:h,getLength:()=>t.history.length,pushState:(e,t)=>v(!0,e,t),replaceState:(e,t)=>v(!1,e,t),back:e=>(e&&(p=!0,m=!0),t.history.back()),forward:e=>{e&&(p=!0,m=!0),t.history.forward()},go:(e,n)=>{d=!0,n&&(p=!0,m=!0),t.history.go(e)},createHref:s,flush:_,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(ct,x,{capture:!0}),t.removeEventListener(st,b)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return S._ignoreNextBeforeUnload=e=>{m=!1;try{e=new URL(e,t.document.baseURI).href,m=/^https?:/.test(e)&&(!e.includes(`#`)||e.split(`#`)[0]!==t.location.href.split(`#`)[0])}catch{}},t.addEventListener(ct,x,{capture:!0}),t.addEventListener(st,b),t.history.pushState=function(...e){let r=n.apply(t.history,e);return S._ignoreSubscribers||y(`PUSH`),r},t.history.replaceState=function(...e){let n=r.apply(t.history,e);return S._ignoreSubscribers||y(`REPLACE`),n},S}function ht(e,t){let n=dt(e),r=n.indexOf(`#`),i=n.indexOf(`?`);if(!t){let e=gt();t={[R]:0,key:e,__TSR_key:e}}return{href:n,pathname:n.slice(0,r>-1?i>-1?Math.min(r,i):r:i>-1?i:n.length),hash:r>-1?n.slice(r):``,search:i>-1?n.slice(i,r===-1?void 0:r):``,state:t}}function gt(){return(Math.random()+1).toString(36).slice(7)}function _t(e,t){return e.protocol!==`http:`&&e.protocol!==`https:`||e.origin!==t||!!e.username||!!e.password}function vt(e){return e.pathname+e.search+e.hash}function yt(e){return e.options.loader||e.options.beforeLoad||e.lazyFn||e.options.component?.preload||e.options.pendingComponent?.preload}function bt(e,t){return{fromLocation:t,toLocation:e,pathChanged:t?.pathname!==e.pathname,hrefChanged:t?.href!==e.href,hashChanged:t?.hash!==e.hash}}function xt({key:e,__TSR_key:t,__TSR_index:n,__hashScrollIntoViewOptions:r,...i}){return i}function St(e){return e.findIndex(e=>e.status===`error`||e.status===`notFound`||e._notFound)+1}function Ct(e,t,n,r,i,a){r&&(t=t.slice(0,r)),i&&(n=n.slice(0,i));for(let r of t){if(a&&e._tx!==a)return;n.some(e=>e.routeId===r.routeId)||e.routesById[r.routeId].options.onLeave?.(r)}for(let r of n){if(a&&e._tx!==a)return;e.routesById[r.routeId].options[t.some(e=>e.routeId===r.routeId)?`onStay`:`onEnter`]?.(r)}}var wt=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={n:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.startTransition=async e=>(e(),!1),this.update=e=>{let t=this.options;this.options={...t,...e},this.isServer=this.options.isServer??!1??typeof document>`u`,this.staticLocations=new WeakMap,this.protocolAllowlist=new Set(this.options.protocolAllowlist),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.history=this.options.history?this.options.history:mt()),this.origin=this.options.origin,this.origin||=window?.origin&&window.origin!==`null`?window.origin:`http://localhost`;let n=this.options.basepath??`/`,r=this.options.rewrite,i=this.basepath!==n||t?.rewrite!==r||t?.caseSensitive!==this.options.caseSensitive;if(i&&(this.basepath=n,this.rewrite=n!==`/`&&ie(n)?tt(n,this.options.caseSensitive,r):r),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let e;e=this.buildRouteTree(),this.setRoutes(e)}if(this.stores)i&&this.stores.location.set(this.latestLocation);else if(this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=ot(this.latestLocation,e),we(this)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=Ge(this.routeTree,this.options.caseSensitive);return this.options.routeMasks&&Ve(this.options.routeMasks,e.processedTree),{...e,resolvePathCache:Ie(1e3)}},this.subscribe=(e,t)=>{let n={eventType:e,fn:t};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=e=>{for(let t of this.subscribers)if(t.eventType===e.type)try{t.fn(e)}catch(e){console.error(e)}},this.parseLocation=(e,t)=>{let n=({pathname:e,search:n,hash:r,href:i},a)=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(e)){let i=this.options.parseSearch(n),o=this.options.stringifySearch(i);return{href:e+o+r,publicHref:e+o+r,pathname:A(e),external:!1,searchStr:o,search:y(t?.search,i),hash:A(r.slice(1)),state:b(t?.state,a)}}let o=nt(this.rewrite,new URL(i,this.origin)),s=this.options.parseSearch(o.search),c=this.options.stringifySearch(s);return o.search=c,{href:o.href.replace(o.origin,``),publicHref:i,pathname:A(ut(o.pathname)),external:!!this.rewrite&&_t(o,this.origin),searchStr:c,search:y(t?.search,s),hash:A(o.hash.slice(1)),state:b(t?.state,a)}},r=n(e,e.state),{__tempLocation:i,__tempKey:a}=r.state;if(i&&(!a||a===this.tempLocationKey)){let e=n(i,{...i.state,__tempLocation:void 0,key:r.state.key,__TSR_key:r.state.__TSR_key});return e.maskedLocation=r,e}return r},this.matchRoutes=(e,t,n)=>typeof e==`string`?this.matchRoutesInternal({pathname:e,search:t},n):this.matchRoutesInternal(e,t),this.getMatchedRoutes=e=>{let t=Object.create(null),n=We(N(e),this.processedTree,!0);return n&&Object.assign(t,n.rawParams),[n?.branch||[this.routesById.__root__],t,n?.route]},this.buildLocation=e=>{{let t=this.staticLocations.get(e);if(t)return t}let t=!1,n=(n={})=>{if(n.href){let e=ht(n.href,{});n={...n,to:nt(this.rewrite,new URL(e.pathname,this.origin)).pathname,search:this.options.parseSearch(e.search),hash:e.hash.slice(1)}}let r=e._fromLocation||this._pendingLocation||this.latestLocation,i,a=()=>(t=!0,r),o=()=>i??=this.matchRoutesLightweight(a()),s=n.to?`${n.to}`:`.`,c=oe(s[0]===`/`?``:n.unsafeRelative===`path`?a().pathname:n.from??o()[1],s,this.options.trailingSlash,this.resolvePathCache),l=this.routesByPath[N(c)],u=c.includes(`$`),d;if(l)d=l._branch??=Je(l);else if(u)d=[];else{let[e,t,n]=this.getMatchedRoutes(c);d=e,this.options.notFoundRoute&&(!n||n.path!==`/`&&t[`**`])&&(d=[...d,this.options.notFoundRoute])}let f=u?l?._interpolation??I(!1,{fullPath:c},0):void 0,p;for(let e of d){let t=e.options.params?.stringify??e.options.stringifyParams;if(t){let e=o()[3];if(p??=kt(n.params,e),!_(p))break;p===e&&(p=Object.assign(v(),p));try{Object.assign(p,t(p))}catch{}}}p??=kt(n.params,At(n.params,f)?o()[3]:jt);let m=e.leaveParams?c:ut(A(f?ue(c,f,p,this.pathParamsDecoder):c)),h=Mt(d,e._includeValidateSearch),g=()=>{let t=o()[2];if(e._includeValidateSearch&&this.options.search?.strict){let e={};d.forEach(n=>{if(n.options.validateSearch)try{Object.assign(e,Ot(n.options.validateSearch,{...e,...t}))}catch{}}),t=e}return t},y=h.length?Nt(h,g(),n):n.search===!0?g():typeof n.search==`function`?n.search(g()):n.search||jt,b=this.options.stringifySearch(y),x=n.hash===!0?a().hash:typeof n.hash==`function`?n.hash(a().hash):n.hash||void 0,S=x?`#${x}`:``,C=n.state?n.state===!0?a().state:typeof n.state==`function`?n.state(a().state):n.state:jt,w=`${m}${b}${S}`,T,E,D=!1;if(this.rewrite){let e=new URL(w,this.origin),t=e.origin,n=rt(this.rewrite,e);T=vt(e),_t(n,t)?(E=n.href,D=!0):E=ut(vt(n))}else T=te(w),E=T;return{publicHref:E,href:T,pathname:m,search:y,searchStr:b,state:C,hash:x??``,external:D,unmaskOnReload:n.unmaskOnReload}},r=n(e);if(e.mask)r.maskedLocation=n({from:e.from,...e.mask});else if(this.options.routeMasks){let t=He(r.pathname,this.processedTree);if(t){let i=Object.assign(v(),t.rawParams),{from:a,params:o,...s}=t.route,c=kt(o,i);r.maskedLocation=n({from:e.from,...s,params:c})}}return!t&&e._fromLocation&&this.staticLocations.set(e,r),r},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{let r=n.maskedLocation??n;if(r.external)return Tt(this,r.publicHref,{replace:n.replace,ignoreBlocker:t});let i,a=N(this.latestLocation.href)===N(n.href)&&S(xt(n.state),xt(this.latestLocation.state)),o=this._commitPromise,s,c=new Promise(e=>{s=e});if(c.resolve=()=>{s(),o?.resolve()},this._commitPromise=c,a)this.load();else{let{maskedLocation:r,hashScrollIntoView:a,...o}=n;r&&(o={...r,state:{...r.state,__tempKey:void 0,__tempLocation:{...o,search:o.searchStr,state:{...o.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(o.unmaskOnReload??this.options.unmaskOnReload??!1)&&(o.state.__tempKey=this.tempLocationKey)),o.state={...o.state,__hashScrollIntoViewOptions:a??this.options.defaultHashScrollIntoView??!0},this.shouldViewTransition=e,i=n.replace?`REPLACE`:`PUSH`,this.history[i===`REPLACE`?`replace`:`push`](o.publicHref,o.state,{ignoreBlocker:t}),this.history.subscribers.size||this.load({action:{type:i}})}return this._scroll.n=n.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:e,resetScroll:t,hashScrollIntoView:n,viewTransition:r,ignoreBlocker:i,...a}={})=>{let o=this.buildLocation({...a,_includeValidateSearch:!0});this._pendingLocation=o;let s=this.commitLocation({...o,viewTransition:r,replace:e,resetScroll:t,hashScrollIntoView:n,ignoreBlocker:i});return queueMicrotask(()=>{this._pendingLocation===o&&(this._pendingLocation=void 0)}),s},this.navigate=async({to:e,reloadDocument:t,href:n,publicHref:r,...i})=>{let a=n?O(n):void 0;if(a||t){if(e!==void 0||!n){let t=this.buildLocation({to:e,...i}),a=t.maskedLocation??t;n??=a.publicHref,r??=a.publicHref}let t=!a&&r?r:n;return Tt(this,t,i)}return this.buildAndCommitLocation({...i,href:n,to:e,_isNavigate:!0})},this.load=async e=>{this.updateLatestLocation(),e?.action&&(this._scroll.h=e.action.type===`PUSH`||e.action.type===`REPLACE`),await fn(this,e)},this.startViewTransition=e=>{let t=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,t&&typeof document.startViewTransition==`function`){let n;if(typeof t==`object`&&window.CSS?.supports?.(`selector(:active-view-transition-type(a))`)){let r=this.latestLocation,i=this.stores.resolvedLocation.get(),a=typeof t.types==`function`?t.types(bt(r,i)):t.types;if(a===!1)return e();n={update:e,types:a}}else n=e;return document.startViewTransition(n).updateCallbackDone}return e()},this.invalidate=e=>{let t=this._committed,n=e?.filter,r=this._preloads,i=new Set,a=e=>{(!n||n(e))&&i.add(e.id)};t.forEach(a),this._cache.forEach(a),r?.forEach(e=>e.forEach(a)),this._tx?.[3].forEach(a);let o=[];for(let[e,t]of r??[])t.some(e=>i.has(e.id))&&(r.delete(e),o.push(e));let s=t=>{if(i.has(t.id)){let n=this.routesById[t.routeId],r={...t,invalid:!0,...(e?.forcePending||t.status===`error`||t.status===`notFound`)&&yt(n)?{status:`pending`,error:void 0}:void 0};return t._flight=void 0,r}return t};this._committed=t.map(s);for(let[t,n]of this._cache)i.has(t)&&(n.invalid=!0,e?.forcePending&&(n.status=`pending`));for(let e of i){let t=this._flights?.get(e);this._flights?.delete(e),t&&!t[2]&&o.push(t[1])}for(let e of o)e.abort();return this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.resolveRedirect=e=>{let t=e.options,n=e.headers.get(`Location`)||t.href;if(!n){let e=this.buildLocation(t);n=(e.maskedLocation??e).publicHref||`/`}let r;if(k.test(n)||(r=O(n))&&!this.protocolAllowlist.has(r))throw Error(`Redirect blocked: unsafe protocol`);if(r===`http:`||r===`https:`){let e=new URL(n);e.pathname.startsWith(`//`)?n=e.href:_t(e,this.origin)||(n=vt(e),r=void 0)}return r&&(t.reloadDocument=!0),t.href=n,e.headers.set(`Location`,n),e},this.clearCache=e=>{let t=this._cache,n=this._preloads,r=e?.filter,i=[],a=[];for(let[e,n]of t)(!r||r(n))&&(a.push(e),i.push(n));let o=[];for(let[e,t]of n??[])(!r||t.some(r))&&(o.push(e),i.push(...t));for(let e of a)t.delete(e);for(let e of o)n.delete(e);for(let e of i){let t=e._flight;e._flight=void 0,t&&!--t[2]&&(this._flights?.get(e.id)===t&&this._flights.delete(e.id),o.push(t[1]))}for(let e of o)e.abort()},this.loadRouteChunk=z,this.preloadRoute=e=>pn(this,e),this.matchRoute=(e,t)=>{let n={...e,to:e.to?oe(e.from||``,e.to,this.options.trailingSlash,this.resolvePathCache):void 0,params:e.params||{},leaveParams:!0},r=this.buildLocation(n),i=this.stores.status.get()===`pending`;if(t?.pending&&!i)return!1;let a=t?.pending??!i?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),o=Ue(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,a.pathname,this.processedTree);return!o||e.params&&!S(o.rawParams,e.params,!0)?!1:t?.includeSearch??!0?S(a.search,r.search,!0)?o.rawParams:!1:o.rawParams},this.getStoreConfig=t,e.pathParamsAllowedCharacters?.length&&(this.pathParamsDecoder=se(e.pathParamsAllowedCharacters)),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??`fuzzy`,stringifySearch:e.stringifySearch??Ae,parseSearch:e.parseSearch??ke,protocolAllowlist:e.protocolAllowlist??D}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes(e){Object.assign(this,e),this.lightweightCache=new WeakMap,this.staticLocations=new WeakMap;let t=this.options.notFoundRoute;t&&(t.init(99999999999),this.routesById[t.id]!==t&&(t._interpolation=I(!1,t,0)),this.routesById[t.id]=t)}matchRoutesInternal(e,t){let[n,r,i]=this.getMatchedRoutes(e.pathname),a=n,o=!1;(i?i.path!==`/`&&r[`**`]:N(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:o=!0);let s=o?Pt(this.options.notFoundMode,a):void 0,c=Array(a.length),l=this._committed,u=(e,t)=>{let n=l[t];return n?.routeId===e.id?n:e===this.options.notFoundRoute?l.find(t=>t.routeId===e.id):void 0},d;for(let n=0;n<a.length;n++){let i=a[n],o=c[n-1],l,f,p;{let n=o?.search??e.search,r=o?._strictSearch??void 0;try{let e=Ot(i.options.validateSearch,{...n})??void 0;l={...n,...e},f={...r,...e}}catch(e){let r=e;if(e instanceof Et||(r=new Et(e.message,{cause:e})),t?.throwOnError)throw r;l=n,f={},p=r}}let m=``,h=``;try{m=i.options.loaderDeps?.({search:l})??``,h=m&&JSON.stringify(m)||``}catch(e){if(t?.throwOnError)throw e;p??=e}let g=v(),_=i._interpolation?ue(i.fullPath,i._interpolation,r,this.pathParamsDecoder,g):i.fullPath,x=i.id+_+h,S=u(i,n),C=this._cache.get(x)??(S?.id===x?S:void 0);d=C?._strictParams??Object.assign(g,d);let w;if(!C)try{Ft(i,d)}catch(e){if(w=fe(e)||Fe(e)?e:new Dt(e.message,{cause:e}),t?.throwOnError)throw w}let T=S?`stay`:`enter`,E;if(C)E={...C,cause:T,search:y(S?S.search:C.search,l),_strictSearch:f,searchError:p};else{let e=yt(i)?`pending`:`success`;E={id:x,ssr:i.options.ssr,index:n,routeId:i.id,params:S?.params??d,_strictParams:d,pathname:_,updatedAt:Date.now(),search:S?y(S.search,l):l,_strictSearch:f,searchError:p,status:e,isFetching:!1,error:void 0,paramsError:w,context:{},abortController:t?._controller??new AbortController,cause:T,loaderDeps:S?b(S.loaderDeps,m):m,invalid:!1,preload:!1,staticData:i.options.staticData||{},fullPath:i.fullPath}}let D=s===i.id;E._notFound&&!D&&(E.error=void 0),E._notFound=D,c[n]=E}for(let e=0;e<c.length;e++){let n=c[e];n.params=n.cause===`stay`?y(n.params,d):d,t?._controller&&(n.context={})}return c}matchRoutesLightweight(e){let t=m(this.stores.ids.get()),n=t?this.stores.byRoute.get(t).get():void 0,r=n?.id,i=this.lightweightCache.get(e);if(i&&i[0]===r)return i[1];let[a,o]=this.getMatchedRoutes(e.pathname),s=m(a),c={...e.search};for(let e of a)try{Object.assign(c,Ot(e.options.validateSearch,c))}catch{}let l=n&&n.routeId===s.id&&n.pathname===e.pathname,u;if(l)u=n.params;else{let e=o;for(let t of a)try{Ft(t,e)}catch{}u=e}let d=[a,s.fullPath,c,u];return this.lightweightCache.set(e,[r,d]),d}};async function Tt(e,t,{replace:n,ignoreBlocker:r}){if(!ee(t,e.protocolAllowlist)){if(!r){let t=e.history._getBlockers();for(let r of t)if(r?.blockerFn&&await r.blockerFn({currentLocation:e.history.location,nextLocation:e.history.location,action:n?`REPLACE`:`PUSH`}))return}e.history._ignoreNextBeforeUnload?.(t),n?window.location.replace(t):window.location.href=t}}var Et=class extends Error{},Dt=class extends Error{};function Ot(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new Et(`Async validation not supported`);if(n.issues)throw new Et(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return`parse`in e?e.parse(t):typeof e==`function`?e(t):{}}function kt(e,t){if(e===void 0||e===!0)return t;let n=Object.create(null);return e===!1||e===null?n:typeof e==`function`?(Object.assign(n,t),Object.assign(n,e(n))):Object.assign(n,t,e)}function At(e,t){return typeof e==`function`?!0:!t||e===!1||e===null?!1:e===void 0||e===!0||t.some(t=>typeof t!=`string`&&!g.call(e,t[1]))}var jt=Object.freeze({});function Mt(e,t){let n=[];for(let r=0;r<e.length;r++){let i=e[r].options;`search`in i?i.search?.middlewares&&n.push(...i.search.middlewares):(i.preSearchFilters||i.postSearchFilters)&&n.push(({search:e,next:t})=>{let n=t(i.preSearchFilters?i.preSearchFilters.reduce((e,t)=>t(e),e):e);return i.postSearchFilters?i.postSearchFilters.reduce((e,t)=>t(e),n):n});let a=i.validateSearch;t&&a&&n.push(({search:e,next:t,meta:n})=>{let r=t(e);try{let e=Ot(a,r);if(n&&e)for(let t in e)t in r||(n.defaulted||=new Map).set(t,e[t]);return{...r,...e}}catch{}return r})}return n}function Nt(e,t,n){let r=(t,i,a)=>{if(t>=e.length){if(!n.search)return{};if(n.search===!0)return i;let e=h(n.search,i);return a&&(a.explicit=e),e}return e[t]({search:i,next:(e,n)=>{if(n){let n=a||{};return{search:r(t+1,e,n),meta:n}}return r(t+1,e,a)},meta:a})};return r(0,t)}function Pt(e,t){if(e!==`root`){let e;for(let n=t.length-1;n>=0;n--){let r=t[n];if(r.options.notFoundComponent)return r.id;e||=r.children&&r.id}if(e)return e}return Ne}function Ft(e,t){let n=e.options.params?.parse??e.options.parseParams;n&&Object.assign(t,n(t))}function It(e,t){return e.options[t]?.preload?.()}function Lt(e,t){let n=It(e,`component`),r=It(e,`pendingComponent`);return t&&(r?r=r.then(t):t()),n&&r?Promise.all([n,r]).then(()=>{}):n??r}function z(e,t,n){let r=()=>t===!1?void 0:t?It(e,t):Lt(e,n),i=e._lazy;if(i)return i===!0?r():i.then(r);if(!e.lazyFn)return r();let a=e.lazyFn().then(t=>{{let{id:n,...r}=t.options;Object.assign(e.options,r),e._lazy=!0}},t=>{throw e._lazy=void 0,t});return e._lazy=a,a.then(r)}function Rt(e){let t=e.findIndex(e=>e.status!==`success`||e._notFound)+1;return t&&t<e.length?e.slice(0,t):e}function zt(e,t,n){let r=e._tx;return t&&r?.[2]===n&&!r[3].some(e=>e.routeId===t)}var B=0,V=1,Bt=2,H=3,U=[4];function W(e){return typeof e[0]==`number`}function G(e,t){return t.aborted?Promise.race([Promise.reject(t),e]):new Promise((n,r)=>{let i=()=>r(t);t.addEventListener(`abort`,i,{once:!0}),Promise.resolve(e).then(n,r).then(()=>t.removeEventListener(`abort`,i))})}function K(e,t){return e.routesById[t.routeId]}function q(e,t,n){return Fe(e)?[H,e]:fe(e)?(e.routeId||=n,[Bt,e]):t?(typeof e?.then==`function`&&(e=Error(`A Promise was thrown`,{cause:e})),[V,e]):[B,e]}function Vt(e,t){let n=q(t,!0,e.id);if(n[0]!==V)return n;try{e.options.onError?.(n[1])}catch(t){n=q(t,!0,e.id)}return n}function J(e,t,n,r,i){return i[0].signal.aborted?U:$t(e,t,n,Vt(n,r),i)}async function Ht(e,t,n,r,i,a){let[o,s]=t,c=n[0].signal,l=!!n[3];for(let i=n[6]??0;i<r;i++){let r=s[i],u=K(e,r);r.abortController=n[0];let d=s[i-1]?.context??e.options.context??{},f={params:r.params,location:o,navigate:t=>e.navigate({...t,_fromLocation:o}),buildLocation:e.buildLocation,cause:l?`preload`:r.cause,abortController:n[0],preload:l,matches:s,routeId:u.id};try{let e=r._ctx||=u.options.context?u.options.context({...f,deps:r.loaderDeps,context:d})||{}:void 0;r.context={...d,...e}}catch(a){return Y(e,r),[i,J(e,t,u,a,n)]}if(c.aborted)return[i,U];let p=r.paramsError??r.searchError;if(p!==void 0)return Y(e,r),[i,J(e,t,u,p,n)];let m=u.options.beforeLoad;if(!m)continue;let h=r.status;i>=a&&(r.status=`pending`,n[7]?.());try{Z(e,r,`beforeLoad`,n[0]);let a=m({...f,search:r.search,context:r.context,...e.options.additionalContext}),o=await(typeof a?.then==`function`?G(a,c):a);if(c.aborted)return[i,U];let s=$t(e,t,u,q(o,!1,u.id),n);if(s[0]!==B)return Y(e,r),[i,s];r.context={...r.context,...o}}catch(a){return Y(e,r),[i,J(e,t,u,a,n)]}finally{r.status=h,Z(e,r,!1,n[0])}}i()}function Ut(e,t,n){if(!(!n||--n[2])){if(e._flights?.get(t.id)===n){let n=e._tx;if(n&&!n[0].signal.aborted&&!n[3].includes(t)&&n[3].some(e=>e.id===t.id)&&n[3].some(e=>e.isFetching===`beforeLoad`))return;e._flights.delete(t.id)}return n[1]}}function Y(e,t){let n=t._flight;t._flight=void 0,Ut(e,t,n)?.abort()}function X(e,t,n,r){let i=[];for(let a of t)if(!n?.includes(a)){let t=a._flight;if(a._flight=void 0,r&&t?.[2]===1&&e._flights?.get(a.id)===t&&n?.some(e=>e.id===a.id))t[2]=0;else{let n=Ut(e,a,t);n&&i.push(n)}}for(let e of i)e.abort()}function Wt(e){for(let t of e){let e=t._flight;e&&e[2]++}}function Z(e,t,n,r){if(t.isFetching=n,r&&e._tx?.[0]!==r)return;let i=e.stores.byRoute.get(t.routeId),a=i?.get();a?.id===t.id&&i.set({...a,isFetching:n})}function Gt(e,t,n,r,i,a,o){let s=t[0];return{params:n.params,location:s,navigate:t=>e.navigate({...t,_fromLocation:s}),cause:o?`preload`:n.cause,abortController:i,preload:o,deps:n.loaderDeps,parentMatchPromise:a,context:n.context,route:r,...e.options.additionalContext}}async function Kt(e,t,n,r,i,a,o){let s=o[0],c=s.signal;if(c.aborted)return U;if(!i)return[B,void 0];let l=n._flight;Z(e,n,`loader`,s);try{if(!l){let s=new AbortController;l=[Promise.resolve().then(()=>i(Gt(e,t,n,r,s,a,!!o[3]))).then(e=>q(e,!1,r.id),e=>q(e,!0,r.id)).then(t=>(t[0]!==B&&e._flights?.get(n.id)===l&&(e._flights.delete(n.id),l[2]||s.abort()),t[0]===V&&l[2]?Vt(r,t[1]):t)),s,1],(e._flights??=new Map).set(n.id,l)}return n._flight=l,n.abortController=l[1],$t(e,t,r,await G(l[0],c),o)}catch(t){if(t!==c||!c.aborted)throw t;return Y(e,n),U}finally{Z(e,n,!1,s)}}function qt(e,t,n){t[0]!==H&&(e.status=`success`,e.error=void 0,t[0]===B?(e.loaderData=t[1],e.invalid=!1,e.updatedAt=Date.now(),e.preload=n):e.invalid=!0)}function Jt(e,t,n){let r=e._cache.get(t.id);if(r!==n||e._committed.some(e=>e.id===t.id&&e._flight===t._flight))return;let i={...t,_notFound:void 0,context:{}};i._flight&&i._flight[2]++,e._cache.set(t.id,i),r&&Y(e,r)}function Yt(e,t){return t[0]===V||t[0]===Bt?{...e,status:t[0]===V?`error`:`notFound`,error:t[1],_flight:void 0}:e}function Xt(e,t,n,r,i,a,o){let s=t[1][n],c=K(e,s),l=!!a[3],u=e._cache.get(s.id),d,f=!1,p;try{if(s.status===`success`&&(d=c.options.shouldReload,typeof d==`function`&&(d=d(Gt(e,t,s,c,a[0],i,l))),a[0].signal.aborted&&(p=U)),!p){if(s.status!==`success`)f=!0;else{let t=l||s.preload?c.options.preloadStaleTime??e.options.defaultPreloadStaleTime??3e4:c.options.staleTime??e.options.defaultStaleTime??0;f=!!(s.invalid||d||d===void 0&&Date.now()-s.updatedAt>=t&&(a[5]||s.cause===`enter`||a[2].some(e=>e.routeId===s.routeId&&e.id!==s.id)))}}}catch(n){s.invalid=!0,Y(e,s),p=J(e,t,c,n,a)}let m=c.options.loader,h=typeof m==`function`,g=h?m:m?.handler,_=!l||c.options.preload!==!1,v=_&&m?e._flights?.get(s.id):void 0;v===s._flight||p?v=void 0:v&&!f&&!l&&d===void 0?f=!0:f||(v=void 0);let y=!(!m||!f||s.status!==`success`||l||a[4]||((h?void 0:m.staleReloadMode)??e.options.defaultStaleReloadMode)===`blocking`),b=f&&_,x=b&&!y&&(s.status!==`success`||!!m),S=n>=o?a[7]:void 0,C=c.lazyFn&&c._lazy!==!0?S:void 0;if(b&&!m&&(s.invalid=!1,s.updatedAt=Date.now()),v&&v[2]++,x){let t=s._flight;s._flight=v,Ut(e,s,t)?.abort(),n>=o&&(s.status=`pending`),S?.()}b||(s.isFetching=!1);let w=!p&&x?Kt(e,t,s,c,g,i,a).then(t=>(qt(s,t,l),t[0]===B&&(m&&!a[0].signal.aborted&&Jt(e,s,u),n>=o&&(s.status=`pending`)),t)):Promise.resolve(p??[B,s.loaderData]),T=(async()=>{try{let e=z(c,void 0,C);e&&await G(e,a[0].signal)}catch(r){if(!t[1].some((e,t)=>t<=n&&(e.status===`error`||e.status===`notFound`||e._notFound)))return[n,J(e,t,c,r,a)]}let r=await w;x&&r[0]===B&&s.status===`pending`&&!a[0].signal.aborted&&(s.status=`success`,S?.())})();if(r.push([n,w,T]),!y)return w.then(e=>Yt(s,e));let E={...s,status:`pending`,preload:!1,_flight:v};s.invalid=!1,s.isFetching=`loader`;let D=Kt(e,t,E,c,g,i,a).then(e=>(s.isFetching=!1,qt(E,e,!1),e));return(t[2]??=[]).push([n,D,T,E]),D.then(e=>Yt(E,e))}async function Zt(e,t,n,r,i=0){let a=n?.[1][1],o=a?.routeId?t.findIndex(e=>e.routeId===a.routeId):n?.[0]??t.length-1;o<0&&(o=0);for(let n=o;n>=0;n--){let i=K(e,t[n]);try{let e=z(i,!1);e&&await G(e,r)}catch(e){if(e===r&&r.aborted)throw e}if(i.options.notFoundComponent)return n}return a?.routeId?o:i}function Q(e,t){t[2]&&=(X(e,t[2].map(e=>e[3])),void 0)}async function Qt(e,t,n,r){let i;try{await Promise.all(e.map(e=>e[1].then(async t=>{let a=e[0];if(!(r&&a>=await r)){if(t[0]>=H)throw[a,t];!i&&t[0]!==B&&(i=[a,t],await Promise.all((n??[]).map(e=>{if(!(e[0]<=a))return e[1].then(t=>{if(t[0]===H)throw[e[0],t]})})))}})))}catch(e){return e}return t??i}function $t(e,t,n,r,i,a){for(;r[0]===H;){let o=r[1],s=o.options;try{if((s.href||o.headers.has(`Location`))&&(e.resolveRedirect(o),s.reloadDocument)||(s.reloadDocument?i[3]:i[1]>=20))return r;let n=e.buildLocation({...s,_fromLocation:t[0],_includeValidateSearch:!0}),a=n.maskedLocation??n;if(a.external){let t=o.clone();return t.options={...s},t.headers.set(`Location`,a.publicHref),e.resolveRedirect(t),i[3]?[H,t]:[H,t,a]}return[H,o,n]}catch(e){r=a?[V,e]:Vt(n,e),a=!0}}return r}async function en(e,t,n,r,i,a){let o=t[1],s=await i,c=!1,l=o.findIndex(e=>e._notFound),u=t=>t[1][0]===Bt?Zt(e,o,t,r.signal):t[0],d=l<0?o.length:l;if((s?.[1][0]??0)>=H)d=0;else if(s){d=s[2]??=await u(s);for(let e of n){if(e[0]>=d)break;let t=await e[1];if(t[0]!==B&&t[0]<H&&!(`loaderData`in o[e[0]])){s=[e[0],t],d=s[2]=await u(s);break}}}for(let e of n){if(e[0]>=d)break;let t=await e[2];if(t){s=t;break}}if((s?.[1][0]??0)>=H){let n=s[1];if(n[0]!==H||n[1].options.reloadDocument||n[2])return Q(e,t),n;c=!0,s=[0,[V,Error(`Too many redirects`)]]}let f=s?s[2]??await u(s):l;if(f>=0){let i=s?.[1],l=i?.[0],u=o[f],d=i?.[1],p=()=>{i&&(u._notFound=void 0,l===V?u.status=`error`:(d.routeId=u.routeId,u.routeId===e.routeTree.id?(u.status=`success`,u._notFound=!0):u.status=`notFound`),u.error=d,u.isFetching=!1)};p(),i||a?.();let m=K(e,u);try{await G(i?Promise.resolve().then(()=>z(m,l===V?`errorComponent`:`notFoundComponent`)):Promise.all([z(m),z(m,`notFoundComponent`)]),r.signal)}catch(n){if(n===r.signal&&r.signal.aborted)return Q(e,t),U}i?c&&(r.abort(),await Promise.all([...n.map(e=>e[1]),...n.map(e=>e[2]),...(t[2]??[]).map(e=>e[1])]),Q(e,t),X(e,o),p()):u.status=`success`}return t}async function tn(e,t,n,r=0,i=t[1].length){let a=t[1];for(let t=r;t<i;t++){let r=a[t],i=K(e,r).options;if(i.head||i.scripts)try{let t={ssr:e.options.ssr,matches:a,match:r,params:r.params,loaderData:r.loaderData},[o,s]=await G(Promise.all([i.head?.(t),i.scripts?.(t)]),n);r.meta=o?.meta,r.links=o?.links,r.headScripts=o?.scripts,r.styles=o?.styles,r.scripts=s}catch(e){if(e===n&&n.aborted)break;console.error(e)}if(r.status!==`success`||r._notFound)break}return t}async function nn(e,t,n,r){let i=[t,n],a=r[0].signal,o;try{let t=e.stores.matches.get(),s=n.findIndex(e=>e._notFound);if(e.options.notFoundMode!==`root`&&s>=0){let t=await Zt(e,n,void 0,a,s);n[s]._notFound=void 0,n[t]._notFound=!0,s=t}let c=s<0?n.length:s+1,l=0;for(;l<c&&l!==s;){let e=n[l],i=r[2][l],a=t[l];if(i?.id!==e.id||i.status!==`success`||e.preload||a?.id!==e.id||a.status!==`success`||(l++,i._notFound||a._notFound))break}let u=[],d=r[6]??0,f=d?Promise.resolve(n[d-1]):void 0,p=()=>{for(let t=d;t<c&&!a.aborted;t++)f=Xt(e,i,t,u,f,r,l)},m=await Ht(e,i,r,c,p,l);if(m){if(r[4]=!0,c=m[0],m[1][0]===Bt){let t=await Zt(e,n,m,a);m[2]=t,c=Math.min(c,t+1)}else m[1][0]>=H&&(c=0);p()}if(!a.aborted&&!r[3]){let t=[];for(let[n,r]of e._flights??[])r[2]||(e._flights.delete(n),t.push(r[1]));for(let e of t)e.abort()}let h=en(e,i,u,r[0],Qt(u,m,i[2]),r[7]);i[2]?.length&&(i[3]=Qt(i[2],void 0,void 0,h.then(e=>W(e)?0:Rt(n).length,()=>0))),o=await h}catch(t){if(Q(e,i),t===a&&a.aborted)return U;throw t}return W(o)?o:tn(e,o,a,r[6]===n.length?r[6]:0)}function rn(e,t){if(e._tx!==t)return;let n=t[3],r=e.stores.matches.get(),i=e._pending;for(let a=0;a<n.length;a++){let o=n[a],s=o.status===`success`&&!o._notFound,c=r[a]?.id===o.id&&r[a]?.status===`pending`;if(s&&!c)continue;let l=K(e,o),u=s||o.invalid?0:l.options.pendingMs??e.options.defaultPendingMs,d=l.options.pendingComponent??e.options.defaultPendingComponent;if(!d||typeof u!=`number`||u===1/0){i&&(i[0]=t,i[2]=0,i[4]=!0);return}let f=l.options.pendingMinMs??e.options.defaultPendingMinMs??0,p=!1;if(i?.[1]===o.id?(p=i[0]!==t,i[0]=t):(clearTimeout(i?.[3]),e._pending=i=void 0),i||(e._pending=i=[t,o.id,c?Date.now()+f:t[4]+u,void 0,c||void 0,d]),i[4]&&!p&&i[5]===d)return;if(i[5]=d,!i[4]){clearTimeout(i[3]);let n=i[2]-Date.now();if(n>0){i[3]=setTimeout(()=>rn(e,t),n);return}i[2]=0}let m=n.map(e=>({...e,_flight:void 0}));m[a].status=`pending`;let h=i[4]=e.startTransition(()=>e.stores.setMatches(m),m).then(t=>(t&&e._pending===i&&i[4]===h&&!i[2]&&(i[2]=Date.now()+f),t));return}}function $(e,t){let n=e._pending;(e._tx===t||!e._tx?.[3].some(e=>e.id===n?.[1]))&&(clearTimeout(n?.[3]),e._pending=void 0)}async function an(e,t){let n=e._pending;if(!n)return;clearTimeout(n[3]);let r=n[2]-Date.now();if(!n[4]||r<=0||!Rt(t[3]).some(e=>e.id===n[1]))return;let i;try{await G(new Promise(e=>{i=setTimeout(e,r)}),t[0].signal)}catch{}clearTimeout(i)}function on(e,t){e._committed=t,e.stores.setMatches(t)}function sn(e,t,n,r){let i=e._committed,a=e._lifecycleEnd,o=e._cache;for(let e of n)e.preload=!1,r&&(e._assetEnd=void 0);let s=Rt(n).length,c=new Map;{let t=Date.now(),r=new Set;for(let e=0;e<n.length;e++){let t=n[e];(e<s||t.status===`success`)&&r.add(t.id)}for(let n of[...i,...o.values()]){if(n.status!==`success`||r.has(n.id))continue;let i=K(e,n);!i.options.loader||t-n.updatedAt>=(n.preload?i.options.preloadGcTime??e.options.defaultPreloadGcTime??3e5:i.options.gcTime??e.options.defaultGcTime??3e5)||c.set(n.id,o.get(n.id)===n?n:{...n,_flight:void 0,isFetching:!1,context:{}})}}t[3]=[],e._cache=c;let l=e._lifecycleEnd=St(n);on(e,n),X(e,[...o.values(),...i].filter(e=>e._flight&&c.get(e.id)!==e),n),Ct(e,i,n,a,l,t)}async function cn(e,t){let n=e._tx;for(;n&&n!==t;)t=n,await n[5],n=e._tx}function ln(e,t,n){let r=n[1].options,i=n[2];if(!i)return e.navigate({...r,replace:!0,ignoreBlocker:!0});if(r.reloadDocument)return e.navigate({href:(i.maskedLocation??i).publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});i._redirects=t[1]+1,e._pendingLocation=i;let a=e.commitLocation({...i,viewTransition:r.viewTransition,replace:!0,resetScroll:r.resetScroll,hashScrollIntoView:r.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{e._pendingLocation===i&&(e._pendingLocation=void 0)}),a}async function un(e,t,n,r,i){let a=n.map(e=>({...e}));Wt(a);for(let t of r)Y(e,a[t[0]]),a[t[0]]=t[3];let o=[t[2],a],s;try{s=await en(e,o,r,t[0],i)}catch(t){throw X(e,a),t}if(W(s))X(e,a),s[0]===H&&e._tx===t&&e._committed===n&&await ln(e,t,s);else if(await tn(e,s,t[0].signal),e._tx!==t||e._committed!==n)X(e,a);else{for(let t of a){let n=e._cache.get(t.id);n?._flight&&n._flight===t._flight&&(e._cache.delete(t.id),Y(e,n))}on(e,a),X(e,n,a)}}async function dn(e,t,n,r,i,a){let o=await nn(e,t[2],t[3],[t[0],t[1],e._committed,void 0,i,n,a,r]);if(W(o)){let n=o[0]===H&&e._tx===t;if((!n||o[1].options.reloadDocument)&&$(e,t),X(e,t[3]),t[3]=[],!n)return;if(e._tx!==t){$(e,t);return}await ln(e,t,o);return}let s=o[1];if(e._tx===t&&await an(e,t),e._tx!==t){$(e,t),X(e,s),Q(e,o);return}let c=t[2],l=bt(c,e.stores.resolvedLocation.get()),u=o[2];await e.startViewTransition(async()=>{if(e._tx===t&&await an(e,t),e._tx!==t){$(e,t),X(e,s),Q(e,o);return}let n=await e.startTransition(()=>{$(e,t),sn(e,t,s,a),e._tx===t&&(e.emit({type:`onLoad`,...l}),e._tx===t&&e.emit({type:`onBeforeRouteMount`,...l}))},s);e._tx===t?(u?.length&&un(e,t,s,u,o[3]).catch(console.error),e.batch(()=>{e.stores.resolvedLocation.set(c),e.stores.status.set(`idle`),e._tx===t&&e.emit({type:`onResolved`,...l}),n&&e._tx===t&&e.emit({type:`onRendered`,...l})}),e._tx===t&&(e._commitPromise?.resolve(),e._commitPromise=void 0)):Q(e,o)})}async function fn(e,t){let n=e._tx,r=e.stores.resolvedLocation.get(),i=r??e.stores.location.get(),a=e.latestLocation,o=e._pendingLocation,s=o?.href===a.href?o._redirects??0:0,c=e._handoff,l=c?.[0](),u=new AbortController,d=e._preflight;if(e._preflight=u,l||c?.[1](),d?.abort(),!u.signal.aborted){let t=bt(a,r);e.emit({type:`onBeforeNavigate`,...t}),u.signal.aborted||e.emit({type:`onBeforeLoad`,...t})}if(u.signal.aborted){await cn(e,n);return}let f=i.href===a.href,p=u,m=e.matchRoutes(a,{_controller:u});Wt(m);let h=l?c[1](m):void 0;if(h?p=l:l?.abort(),u.signal.aborted){X(e,m),await cn(e,n);return}e._preflight=void 0;let g,_=()=>dn(e,y,f,()=>rn(e,y),t?.sync,h),v=t?.sync?new Promise(e=>g=e):Promise.resolve().then(_),y=[p,s,a,m,Date.now(),v.then(()=>cn(e,y))];if(e._tx=y,n){for(let t of e.stores.matches.get()){if(e._tx!==y)break;t.isFetching&&Z(e,t,!1)}n[0].abort(),X(e,n[3],y[3],!0)}e._tx===y?(e.batch(()=>{e.stores.status.set(`pending`),e.stores.location.set(a)}),(h||!e._committed.length&&m[0]?.status!==`success`&&!m.some(e=>e._notFound))&&rn(e,y),g?.(_()),await y[5]):(X(e,y[3]),y[3]=[],g?.(),await cn(e,y))}async function pn(e,t){let n=e.buildLocation(t);for(let t=0;;t++){let r=e._committed,i=new AbortController,a,o,s;try{try{a=e.matchRoutes(n,{_controller:i}),Wt(a),o=(e._preloads??=new Map).set(i,a),s=await nn(e,n,a,[i,t,r,!0])}finally{o&&(o=o.delete(i),X(e,a)),i.abort()}if(!W(s))return s[1];if(!o||s.length<3)return;n=s[2]}catch(e){fe(e)||console.error(e);return}}}var mn=l(d(),1),hn=mn.createContext(null);function gn(e){return mn.useContext(hn)}function _n(e,t){let n=e.stores.location,r=new Set,i,a,o=n=>{zt(e,t,n)||(i=n,r.forEach(e=>e()))};return[()=>i??n.get(),e=>(r.size||(i=n.get(),a=n.subscribe(o).unsubscribe),r.add(e),()=>{r.delete(e),r.size||(a(),i=void 0)})]}var vn=mn.createContext(void 0),yn=mn.createContext(void 0);export{l as A,ee as C,d as D,p as E,o as O,_ as S,b as T,N as _,hn as a,h as b,it as c,Ne as d,fe as f,re as g,ae as h,gn as i,s as k,at as l,M as m,yn as n,wt as o,de as p,vn as r,bt as s,_n as t,Pe as u,j as v,C as w,O as x,S as y};
@@ -1 +0,0 @@
1
- import{Jt as e,Kt as t,P as n,Y as r,_ as i,h as a,u as o}from"./page-DWnGi6wA.js";import{i as s}from"./mark-CC3RwMy_.js";var c=(n,r)=>{if(n.attempts.length===0)return t();let i=0;for(let e of n.attempts){let n=e.outcome===null?r:e.endedAt===null?NaN:Date.parse(e.endedAt);if(Number.isNaN(n))return t();i+=Math.max(0,n-Date.parse(e.startedAt))}return e(i)},l=n=>{let r=n.attempts.at(-1)?.outcome;return n.state===`Failed`&&r?._tag===`Failed`?e(r.failure):t()},u=e=>{let t=e.attempts.at(-1);return e.closedAt??t?.endedAt??t?.startedAt??e.openedAt},d=(e,t)=>{let n=new Set(t.items.map(({itemKey:e})=>e));return e.filter(({item:e})=>n.has(e.itemKey))},f=(e,t)=>d(e,t)[0]??null,p=({reason:e})=>`run`in e?e.run:null,m=e=>String(s(e).origin.number),h=({reason:e})=>r(e,{AwaitingApproval:()=>!0,WaitingForStop:()=>!0,QueuedForWorker:()=>!0,SuppressedForOperator:()=>!0,CycleBudgetUsedUp:()=>!0,RunFailed:({run:e})=>e.canResolveFailure,ClosedUnchanged:()=>!1,LoopPaused:()=>!1,AwaitingPoll:()=>!1}),g=(e,...t)=>[...e].reverse().find(({state:e})=>t.includes(e)),_=(e,t,r)=>{let i=g(e.runs,`Running`);if(i!==void 0)return{_tag:`Running`,run:i};let a=g(e.runs,`Waiting`);if(a!==void 0)return{_tag:`AwaitingApproval`,run:a};let o=g(e.runs,`Pending`,`Queued`);if(o!==void 0){let e=r.find(e=>p(e)?.id===o.id);return e===void 0?{_tag:`Queued`,run:o}:{_tag:`Stalled`,stall:e,run:o}}if(n(e.state))return{_tag:`Done`};let s=d(r,e),c=s.find(h);if(c!==void 0)return{_tag:`Stalled`,stall:c,run:p(c)??t};let[l]=s;return l===void 0?e.needsYou?{_tag:`NeedsAttention`}:{_tag:`Ended`,run:t}:{_tag:`Idle`,stall:l}},v=({status:e,last:t})=>{switch(e._tag){case`Running`:return[0,Date.parse(e.run.openedAt)];case`AwaitingApproval`:return[1,Date.parse(e.run.openedAt)];case`Queued`:case`Stalled`:return[2,Date.parse(e.run.openedAt)];case`Idle`:case`NeedsAttention`:case`Done`:case`Ended`:return[3,Date.parse(u(t))]}},y=(e,t)=>e.flatMap(({items:e})=>e).flatMap(e=>{let n=e.runs.at(-1);return n===void 0?[]:[{task:e,last:n,status:_(e,n,t)}]}).map(e=>({row:e,place:v(e)})).sort(({row:e,place:[t,n]},{row:r,place:[i,a]})=>t-i||a-n||r.task.number-e.task.number).map(({row:e})=>e),b=[`in flight`,`needs attention`,`done`],x=({task:e,status:t})=>{switch(t._tag){case`Running`:case`AwaitingApproval`:case`Queued`:case`Stalled`:return`in flight`;case`Idle`:return e.needsYou?`needs attention`:null;case`NeedsAttention`:return`needs attention`;case`Done`:return`done`;case`Ended`:return null}},S=e=>{let t=b.flatMap(t=>{let n=e.filter(e=>x(e)===t).length;return n===0?[]:[`${n} ${t}`]});return t.length===0?void 0:t.join(`, `)},C=(e,t)=>e.runningSince.reduce((e,n)=>e+Math.max(0,t-Date.parse(n)),e.durationMillis),w=e=>e.pools.some(({unpriced:e})=>e),T=(e,t)=>{let n=e.flatMap(({task:e})=>e.usage.cost===null?[]:[e.usage.cost]);return{runs:e.reduce((e,{task:t})=>e+t.runs.length,0),durationMillis:e.reduce((e,{task:n})=>e+C(n.usage,t),0),unmeasured:e.reduce((e,{task:t})=>e+t.usage.unmeasured,0),tokens:e.reduce((e,{task:t})=>e+t.usage.tokens,0),unpriced:e.some(({task:e})=>w(e.usage)),usd:n.length===0?null:n.reduce((e,{usd:t})=>e+t,0)}},E=`Some attempts have no recorded timing; the real figure is higher`,D=`Some sessions have no price yet; the real figure is higher`,O=e=>[{figure:String(e.runs),words:e.runs===1?`run`:`runs`,lowerBound:null},{figure:o(e.durationMillis),words:`elapsed`,lowerBound:e.unmeasured>0?E:null},{figure:a(e.tokens),words:`tokens`,lowerBound:null},...e.usd===null?[]:[{figure:i(e.usd),words:`estimated`,lowerBound:e.unpriced?D:null}]],k=e=>{let t=new Map;for(let{loop:n,state:r}of e.runs)t.set(n,r);return[...t].map(([e,t])=>({loop:e,state:t}))},A=e=>{switch(e){case`issue-comment`:return`Comment`;case`review`:return`Review`;case`review-comment`:return`Review comment`}};export{l as a,C as c,y as d,f,E as g,D as h,u as i,k as l,O as m,A as n,p as o,T as p,w as r,S as s,c as t,m as u};
@@ -1 +0,0 @@
1
- import{A as e,D as t}from"./matchContext-BquevSJS.js";import{J as n,K as r,P as i,bn as a,vn as o,y as s}from"./page-DWnGi6wA.js";import{o as c}from"./error-alert-9tKpTE3v.js";import{_n as l}from"./mark-CC3RwMy_.js";import{W as u}from"./button-DVWXde__.js";import{l as d,n as f}from"./overview-C_tFKGZ8.js";var p=e(t(),1),m=new Map([[`bold`,p.createElement(p.Fragment,null,p.createElement(`path`,{d:`M228,104a12,12,0,0,1-24,0V69l-59.51,59.51a12,12,0,0,1-17-17L187,52H152a12,12,0,0,1,0-24h64a12,12,0,0,1,12,12Zm-44,24a12,12,0,0,0-12,12v64H52V84h64a12,12,0,0,0,0-24H48A20,20,0,0,0,28,80V208a20,20,0,0,0,20,20H176a20,20,0,0,0,20-20V140A12,12,0,0,0,184,128Z`}))],[`duotone`,p.createElement(p.Fragment,null,p.createElement(`path`,{d:`M184,80V208a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V80a8,8,0,0,1,8-8H176A8,8,0,0,1,184,80Z`,opacity:`0.2`}),p.createElement(`path`,{d:`M224,104a8,8,0,0,1-16,0V59.32l-66.33,66.34a8,8,0,0,1-11.32-11.32L196.68,48H152a8,8,0,0,1,0-16h64a8,8,0,0,1,8,8Zm-40,24a8,8,0,0,0-8,8v72H48V80h72a8,8,0,0,0,0-16H48A16,16,0,0,0,32,80V208a16,16,0,0,0,16,16H176a16,16,0,0,0,16-16V136A8,8,0,0,0,184,128Z`}))],[`fill`,p.createElement(p.Fragment,null,p.createElement(`path`,{d:`M192,136v72a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V80A16,16,0,0,1,48,64h72a8,8,0,0,1,0,16H48V208H176V136a8,8,0,0,1,16,0Zm32-96a8,8,0,0,0-8-8H152a8,8,0,0,0-5.66,13.66L172.69,72l-42.35,42.34a8,8,0,0,0,11.32,11.32L184,83.31l26.34,26.35A8,8,0,0,0,224,104Z`}))],[`light`,p.createElement(p.Fragment,null,p.createElement(`path`,{d:`M222,104a6,6,0,0,1-12,0V54.49l-69.75,69.75a6,6,0,0,1-8.48-8.48L201.51,46H152a6,6,0,0,1,0-12h64a6,6,0,0,1,6,6Zm-38,26a6,6,0,0,0-6,6v72a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V80a2,2,0,0,1,2-2h72a6,6,0,0,0,0-12H48A14,14,0,0,0,34,80V208a14,14,0,0,0,14,14H176a14,14,0,0,0,14-14V136A6,6,0,0,0,184,130Z`}))],[`regular`,p.createElement(p.Fragment,null,p.createElement(`path`,{d:`M224,104a8,8,0,0,1-16,0V59.32l-66.33,66.34a8,8,0,0,1-11.32-11.32L196.68,48H152a8,8,0,0,1,0-16h64a8,8,0,0,1,8,8Zm-40,24a8,8,0,0,0-8,8v72H48V80h72a8,8,0,0,0,0-16H48A16,16,0,0,0,32,80V208a16,16,0,0,0,16,16H176a16,16,0,0,0,16-16V136A8,8,0,0,0,184,128Z`}))],[`thin`,p.createElement(p.Fragment,null,p.createElement(`path`,{d:`M220,104a4,4,0,0,1-8,0V49.66l-73.16,73.17a4,4,0,0,1-5.66-5.66L206.34,44H152a4,4,0,0,1,0-8h64a4,4,0,0,1,4,4Zm-36,28a4,4,0,0,0-4,4v72a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V80a4,4,0,0,1,4-4h72a4,4,0,0,0,0-8H48A12,12,0,0,0,36,80V208a12,12,0,0,0,12,12H176a12,12,0,0,0,12-12V136A4,4,0,0,0,184,132Z`}))]]),h=p.forwardRef((e,t)=>p.createElement(u,{ref:t,...e,weights:m}));h.displayName=`ArrowSquareOutIcon`;var g=(e,t)=>t.canResolveFailure&&!e.items.some(({itemKey:e,state:n})=>e===t.itemKey&&i(n)),_=e=>{let t=[...e.runs].reverse().find(t=>g(e,t));if(t===void 0)return null;let n=t.attempts;for(let e=n.length-1;e>=0;--e){let r=n[e]?.outcome;if(r?._tag===`Failed`)return{run:t,message:d(r.failure)}}return null},v=new Set(r),y=e=>{let t=e.run;return t!==null&&(v.has(t.state)||g(e,t))?t:null},b=e=>{let t=e.attempts.at(-1);switch(e.state){case`Pending`:case`Waiting`:case`Queued`:return e.openedAt;case`Running`:return t!==void 0&&t.outcome===null?t.startedAt:null;case`Failed`:return t?.endedAt??null;case`Succeeded`:case`Canceled`:return null}},x=(e,t)=>{let n=new Set(t._tag===`WritableBoardLane`?t.labels:[]);for(let e of t.sources)`label`in e&&n.add(e.label);return e.labels.filter(e=>!n.has(e))},S=e=>e===`saving`?`Moving…`:`Saved on GitHub · syncing…`,C=e=>[`board-moves`,e],w=(e,t)=>{if(e.phase===`saving`)return!0;let n=t.flatMap(({items:e})=>e).find(({itemKey:t})=>t===e.itemKey);if(n===void 0||n.state!==e.source.state)return!1;let r=n.labels.filter(t=>e.laneLabels.includes(t));return r.length===e.source.labels.length&&r.every(t=>e.source.labels.includes(t))},T=e=>{let t=a(),{data:r=[]}=l({queryKey:C(e.repository),queryFn:o,initialData:[],gcTime:1/0}),i=(e,n)=>t.setQueryData(C(e),(e=[])=>n(e)),u=r.filter(t=>w(t,e.board.lanes));l({...f(),enabled:u.length>0,refetchInterval:1e3}),(0,p.useEffect)(()=>{t.setQueryData(C(e.repository),t=>{let n=t?.filter(t=>w(t,e.board.lanes));return n?.length===t?.length?t:n})},[t,e.repository,e.board.lanes,r]);let d=c({mutationFn:({repository:e,item:t,toLane:r})=>{let{owner:i,name:a}=n(e);return s(e=>e.moveBoardItem({params:{owner:i,repository:a,item:t},payload:{toLane:r}}))},onSuccess:(e,{repository:n,itemKey:r})=>(i(n,e=>e.map(e=>e.itemKey===r?{...e,phase:`syncing`}:e)),t.invalidateQueries({queryKey:[`overview`]})),onError:(e,{repository:n,itemKey:r})=>(i(n,e=>e.filter(e=>e.itemKey!==r)),t.invalidateQueries({queryKey:[`overview`]}))}),m=(t,n)=>{let r=e.board.lanes.find(({items:e})=>e.some(({itemKey:e})=>e===t.itemKey)),a=r?.items.find(({itemKey:e})=>e===t.itemKey);if(n._tag!==`WritableBoardLane`||a===void 0||r?.id===n.id||u.some(({itemKey:e})=>e===t.itemKey))return;let o=e.board.lanes.flatMap(e=>e._tag===`WritableBoardLane`?e.labels:[]);i(e.repository,e=>[...e,{itemKey:t.itemKey,toLane:n.id,source:{state:a.state,labels:a.labels.filter(e=>o.includes(e))},laneLabels:o,phase:`saving`}]),d.mutate({repository:e.repository,itemKey:t.itemKey,item:t.number,toLane:n.id})},h=d.variables?.repository===e.repository;return{moves:u,moveItem:m,isPending:h&&d.isPending,error:h?d.error:null}};export{b as a,y as i,S as n,_ as o,x as r,h as s,T as t};
@@ -1 +0,0 @@
1
- import{Gt as e,J as t,Y as n,m as r,y as i}from"./page-DWnGi6wA.js";import{a}from"./strings-CW2XaR5f.js";var o={approve:`Approve`,retry:`Retry`,runAgain:`Run again`,cancel:`Cancel run`,confirmCancel:`Confirm cancel`,keepRunning:`Keep running`},s=`Opening a run…`,c=`No run opened: cycle budget used up. Reset it in Needs attention`,l=t=>n(t,{Event:()=>`From the event`,OperatorRetry:({operator:t})=>e(t,{onNone:()=>`Retried`,onSome:e=>`Retried by ${e}`}),EditAndRetry:({operator:t})=>e(t,{onNone:()=>`Edited and retried`,onSome:e=>`Edited and retried by ${e}`}),InfraRetry:()=>`Retried after an infrastructure failure`,AfterRestart:()=>`Started again after a restart`}),u=(e,{runId:t,attemptNumber:n,worker:r})=>t===e?`Waiting for attempt ${n} to stop on ${r}`:`Waiting for attempt ${n} of an earlier run to stop on ${r}`,d=(e,t=null,n=null)=>{if(t!==null)return u(e.id,t);if(e.state===`Queued`&&n?.state===`creating`)return`Queued, creating a ${a[n.provider]} machine`;let r=e.attempts.length,i=r===0?``:` after ${r} ${r===1?`attempt`:`attempts`}`;switch(e.state){case`Pending`:return`Pending`;case`Waiting`:return`Waiting for approval`;case`Queued`:return`Queued, no free worker`;case`Running`:return`Running, attempt ${e.attempts.at(-1)?.number??1}`;case`Succeeded`:return r>1?`Succeeded${i}`:`Succeeded`;case`Failed`:return`Failed${i}`;case`Canceled`:return`Canceled${i}`}},f=e=>n(e,{InfraFailure:()=>`Infrastructure failure`,DefectFailure:()=>`Executor defect`,AgentFailure:()=>`Agent failure`,BlockedFailure:()=>`Agent blocked`,QuestionFailure:()=>`Question from the agent`,RunawayFailure:()=>`Runaway guard`,ChildSessionBudgetFailure:()=>`Child session budget exhausted`}),p=e=>`Opened ${r(e)}`,m={ui:`from the UI`,"github-ask":`from GitHub`},h={approve:`Approving…`,retry:`Retrying…`,cancel:`Canceling…`,resolveFailure:`Marking resolved…`},g=e=>n(e,{InfraFailure:({message:e})=>e,DefectFailure:({message:e})=>e,AgentFailure:({message:e})=>e,BlockedFailure:({message:e})=>e,QuestionFailure:({question:e})=>e,RunawayFailure:({ceiling:e})=>e===`wall-clock`?`Time limit reached: settings.max_attempt_minutes`:`Token limit reached: settings.max_attempt_tokens`,ChildSessionBudgetFailure:({attemptedChildren:e,maxChildren:t})=>`Child session budget of ${t} used; child ${e} did not start`}),_=e=>e===`parent`?`Queued until the delegated task ends`:`Queued until the current child step ends`,v=({ref:e,commit:t})=>`Not applied: the previous attempt's work on ${e} at ${t.slice(0,7)} conflicts with the current revision. It is still on ${e}`,y=({kills:e,memoryMib:t})=>`The kernel killed ${e} ${e===1?`process`:`processes`} for memory across containers in this attempt. The last container with recorded kills had a ${t} MiB memory limit`,b=e=>`Retry uses ${e.harness} · ${e.model} from the saved agent definition.`,x={loading:`Loading…`,loadEarlier:`Load earlier`,empty:`No activity recorded`},S=t=>e(t,{onNone:()=>`Attempt`,onSome:({number:e})=>`Attempt ${e}`}),C=e=>`${e.completedCycles} completed rounds. ${e.counts.map(({loop:e,admitted:t})=>`${e}: ${t} ${t===1?`run`:`runs`}`).join(`; `)}`,w=e=>n(e,{CycleBudgetNeed:({ask:e,itemLabel:t})=>({title:`Cycle budget exhausted`,detail:`${t}: ${C(e)}`,repository:e.repository,runId:null}),ApprovalNeed:({loop:e,repository:t,runId:n,item:r})=>({title:`${e}: approval needed`,detail:r===null?`Open the run for the task text`:r.title,repository:t,runId:n}),RunFailureNeed:({failure:e,loop:t,repository:n,runId:r})=>({title:e._tag===`QuestionFailure`?`Question from ${t}`:e._tag===`BlockedFailure`?`${t}: blocked`:`${t}: ${f(e).toLowerCase()}`,detail:g(e),repository:n,runId:r}),BoardProjectionNeed:({failure:e})=>({title:`Item not shown on the board`,detail:e.message,repository:e.repository,runId:null}),PollFailureNeed:({failure:e})=>({title:e.errorTag,detail:e.message,repository:e.repository,runId:null}),PreflightFindingNeed:({finding:e})=>({title:`Label preflight failed`,detail:`${e.label}: ${e.message}`,repository:e.repository,runId:null}),ScheduleFailureNeed:({failure:e})=>({title:n(e,{ScheduleTickFailure:({errorTag:e})=>e,ScheduleAgentFailure:({loop:e})=>`${e}: agent not loaded`,ScheduleCronFailure:({loop:e})=>`${e}: schedule not computed`}),detail:e.message,repository:e._tag===`ScheduleTickFailure`?e.repository:null,runId:null}),ConfigFileNeed:({kind:e,error:t})=>({title:e===`loop`?`Loop file not loaded`:`Agent file not loaded`,detail:`${t.file}: ${t.message.replace(/\.$/u,``)}. Fix the file, then reload the configuration from Configuration > Loops`,repository:null,runId:null}),UnconfiguredWorkerNeed:({worker:e,attempts:t,running:n})=>({title:`Worker not configured`,detail:n>0?`${e} is not in usine.yaml. ${n} ${n===1?`attempt`:`attempts`} still running on it. Discard the leftovers after they end`:`${e} is not in usine.yaml. Startup does not reconcile the ${t} recorded ${t===1?`attempt`:`attempts`} on it. Add the worker back and restart usine up, or discard the leftovers`,repository:null,runId:null}),UnconfirmedStopNeed:({loop:e,repository:t,runId:n,attemptNumber:r,worker:i})=>({title:`${e}: parent task not stopped`,detail:`Attempt ${r} still ending on ${i}, using one slot. No new attempt on this item until it stops. Stop retried every few minutes`,repository:t,runId:n})}),T=e=>({...t(e),repository:e}),E=e=>{let t=new Map;for(let n of e){let e=w(n).repository;e!==null&&t.set(e,(t.get(e)??0)+1)}return t},D=2e3,O=15e3,k=()=>({queryKey:[`overview`],queryFn:()=>i(e=>e.overview()),refetchInterval:e=>{let t=e.state.data;return t?._tag===`NeedsSetup`?!1:t?.projects.some(e=>e.runs.some(({canCancel:e})=>e))===!0?D:O}});export{x as S,c as _,w as a,u as b,v as c,p as d,y as f,h as g,o as h,C as i,g as l,b as m,k as n,m as o,_ as p,T as r,l as s,E as t,f as u,s as v,S as x,d as y};