(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[152],{38808:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/jobs/pools/[pool]",function(){return s(84821)}])},88507:function(e,t,s){"use strict";s.d(t,{Z:function(){return r}});/**
 * @license lucide-react v0.407.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let r=(0,s(60998).Z)("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]])},28586:function(e,t,s){"use strict";s.d(t,{Z:function(){return r}});/**
 * @license lucide-react v0.407.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let r=(0,s(60998).Z)("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]])},1125:function(e,t,s){"use strict";s.d(t,{C:function(){return o}});var r=s(85893),n=s(67294),a=s(34209),l=s(84283);let i=e=>{if(!e||"string"!=typeof e)return e;let t=e.split("\n"),s=[];for(let e=0;e<t.length;e++){let r=t[e];if(""===r.trim()){let n=!1,a=0;for(let s=e-1;s>=0;s--){let e=t[s],r=e.trim();if(r&&e.match(/:\s*[|>]\s*$/)){n=!0;for(let e=s+1;e<t.length;e++){let s=t[e];if(s.trim()){a=s.search(/\S/);break}}break}if(r&&0===e.search(/\S/))break}if(n)for(let n=e+1;n<t.length;n++){let e=t[n];if(e.trim()){e.search(/\S/)>=a?s.push("  #YAML_BLANK_LINE_MARKER#"):s.push(r);break}}else s.push(r)}else s.push(r)}return s.join("\n")};function o(e){let{children:t,className:s=""}=e,o=(0,n.useRef)(null),c=i(t);(0,n.useEffect)(()=>{if(o.current){let e=o.current;setTimeout(()=>{let t;let s=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null);for(;t=s.nextNode();)t.textContent&&t.textContent.includes("#YAML_BLANK_LINE_MARKER#")&&(t.textContent=t.textContent.replace(/#YAML_BLANK_LINE_MARKER#/g,""))},0)}},[c]);let d={...l.mQ,'code[class*="language-"]':{...l.mQ['code[class*="language-"]'],whiteSpace:"pre !important"},'pre[class*="language-"]':{...l.mQ['pre[class*="language-"]'],whiteSpace:"pre !important"}};return(0,r.jsx)("div",{ref:o,className:s,children:(0,r.jsx)(a.Z,{language:"yaml",style:d,customStyle:{margin:0,padding:0,background:"transparent",fontSize:"0.875rem",fontFamily:'ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace'},wrapLines:!0,wrapLongLines:!0,showLineNumbers:!1,useInlineStyles:!0,children:c})})}},30803:function(e,t,s){"use strict";s.d(t,{z:function(){return c}});var r=s(85893),n=s(67294),a=s(88426),l=s(12003),i=s(46990);let o=(0,l.j)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),c=n.forwardRef((e,t)=>{let{className:s,variant:n,size:l,asChild:c=!1,...d}=e,h=c?a.g7:"button";return(0,r.jsx)(h,{className:(0,i.cn)(o({variant:n,size:l,className:s})),ref:t,...d})});c.displayName="Button"},84303:function(e,t,s){"use strict";s.d(t,{_q:function(){return a},pJ:function(){return o}});var r=s(1272);let n={lineWidth:-1,quotingType:"'",forceQuotes:!1,noRefs:!0,sortKeys:!1,condenseFlow:!1,indent:2},a=e=>{if(!e)return"No YAML available";try{let t=r.ZP.load(e),s=r.ZP.dump(t,n).split("\n"),a=[],l=-1;for(let e=0;e<s.length;e++){let t=s[e],r=t.search(/\S/);0===r&&l>=0&&e>0&&a.push(""),a.push(t),l=r}return a.join("\n").trim()}catch(t){return console.error("YAML formatting error:",t),e}},l=e=>"string"==typeof e?e.substring(0,50)+"...":e&&e.name?"name: ".concat(e.name):e&&e.resources?"Task configuration":"YAML document",i=(e,t)=>{try{let s=r.ZP.load(e),a=r.ZP.dump(s,n).split("\n"),i=[],o=-1;for(let e=0;e<a.length;e++){let t=a[e],s=t.search(/\S/);0===s&&o>=0&&e>0&&i.push(""),i.push(t),o=s}return{index:t,content:i.join("\n").trim(),preview:l(s)}}catch(s){return console.error("YAML formatting error for document ".concat(t,":"),s),{index:t,content:e,preview:"Invalid YAML"}}},o=e=>{if(!e)return[];try{let t=[],s=e.split(/^---$/m);for(let e=0;e<s.length;e++){let r=s[e].trim();r&&""!==r&&t.push(r)}return(t.length>1?t.slice(1):t).map((e,t)=>i(e,t))}catch(t){return console.error("YAML formatting error:",t),[{index:0,content:e,preview:"Invalid YAML"}]}}},84821:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return S}});var r=s(85893),n=s(67294),a=s(11163),l=s(9008),i=s.n(l),o=s(41664),c=s.n(o),d=s(65168),h=s(55739);/**
 * @license lucide-react v0.407.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let u=(0,s(60998).Z)("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);var x=s(70282),m=s(27325),p=s(45895),f=s(6639),g=s(68969),j=s(6378),v=s(470),b=s(51214),y=s(99307),N=s(84303),w=s(1125),k=s(68764),_=s(30803),C=s(10546);function M(e){let{usedBy:t}=e,[s,a]=(0,n.useState)(null),l=Array.isArray(t)?t.filter(e=>null!=e):[];if(0===l.length)return"-";let i=l.slice(0,2),o=l.slice(2);return(0,r.jsxs)(r.Fragment,{children:[i.map((e,t)=>(0,r.jsxs)("span",{children:[(0,r.jsx)(c(),{href:"/jobs/".concat(e),className:"text-blue-600 hover:text-blue-800 hover:underline",children:e}),t<i.length-1?", ":""]},e)),o.length>0&&(0,r.jsxs)(r.Fragment,{children:[","," ",(0,r.jsxs)("span",{className:"text-blue-600 cursor-pointer underline",onClick:e=>{a(e.currentTarget)},style:{userSelect:"none"},children:["+",o.length," more"]}),(0,r.jsx)(d.ZP,{open:!!s,anchorEl:s,onClose:()=>{a(null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},children:(0,r.jsx)("div",{style:{padding:12,maxWidth:300},children:o.map(e=>(0,r.jsx)("div",{style:{marginBottom:4},children:(0,r.jsx)(c(),{href:"/jobs/".concat(e),className:"text-blue-600 hover:text-blue-800 hover:underline",children:e})},e))})})]})]})}function S(){let e=(0,a.useRouter)(),{pool:t}=e.query,[s,l]=(0,n.useState)(null),[o,d]=(0,n.useState)(!1),[S,L]=(0,n.useState)(!0),[P,A]=(0,n.useState)(null),[E,Z]=(0,n.useState)(1),[R,W]=(0,n.useState)(10),[T,Y]=(0,n.useState)(!1),[z,F]=(0,n.useState)({key:null,direction:"ascending"}),[I,B]=(0,n.useState)(!1),[D,q]=(0,n.useState)(!1),[K,O]=(0,n.useState)(!1),H=n.useCallback(async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(t){e?d(!0):L(!0),A(null);try{let{pools:e=[]}=await j.ZP.get(g.vs,[{}])||{},s=e.find(e=>e.name===t);s?l(s):(A("Pool ".concat(t," not found")),l(null))}catch(e){console.error("Error fetching pool data:",e),A("Failed to fetch pool data: ".concat(e.message)),l(null)}finally{e?d(!1):L(!1)}}},[t,d,L,A,l]);(0,n.useEffect)(()=>{H()},[t,H]);let Q=e=>{let t="ascending";z.key===e&&"ascending"===z.direction&&(t="descending"),F({key:e,direction:t})},U=e=>z.key===e?"ascending"===z.direction?" ↑":" ↓":"",V=async()=>{try{if(s&&s.pool_yaml){let e=(0,N._q)(s.pool_yaml);await navigator.clipboard.writeText(e),q(!0),setTimeout(()=>q(!1),2e3)}}catch(e){console.error("Failed to copy Pool YAML to clipboard:",e)}},X=async()=>{try{s&&s.entrypoint&&(await navigator.clipboard.writeText(s.entrypoint),O(!0),setTimeout(()=>O(!1),2e3))}catch(e){console.error("Failed to copy entrypoint to clipboard:",e)}},{filteredWorkers:J,totalPages:$,paginatedWorkers:G}=(0,n.useMemo)(()=>{if(!s||!s.replica_info)return{filteredWorkers:[],totalPages:0,paginatedWorkers:[]};let e=T?s.replica_info:s.replica_info.filter(e=>!e.status||!e.status.includes("FAILED"));z.key&&(e=[...e].sort((e,t)=>{let s=e[z.key],r=t[z.key];return("launched_at"===z.key&&(s=s||0,r=r||0),"string"==typeof s&&(s=s.toLowerCase()),"string"==typeof r&&(r=r.toLowerCase()),s<r)?"ascending"===z.direction?-1:1:s>r?"ascending"===z.direction?1:-1:0}));let t=Math.ceil(e.length/R),r=(E-1)*R,n=r+R,a=e.slice(r,n);return{filteredWorkers:e,totalPages:t,paginatedWorkers:a}},[s,T,E,R,z]);return((0,n.useEffect)(()=>{Z(1)},[T,z]),!e.isReady||S)?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i(),{children:(0,r.jsxs)("title",{children:["Pool ",t," | SkyPilot Dashboard"]})}),(0,r.jsx)("div",{className:"min-h-screen flex items-center justify-center",children:(0,r.jsxs)("div",{className:"flex flex-col items-center",children:[(0,r.jsx)(h.Z,{size:32,className:"mb-3"}),(0,r.jsx)("span",{className:"text-gray-600",children:"Loading pool details..."})]})})]}):P||!s?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i(),{children:(0,r.jsxs)("title",{children:["Pool ",t," | SkyPilot Dashboard"]})}),(0,r.jsx)("div",{className:"bg-white shadow rounded-lg p-6",children:(0,r.jsxs)("div",{className:"text-center text-red-600",children:[(0,r.jsx)("h2",{className:"text-xl font-semibold mb-2",children:"Error"}),(0,r.jsx)("p",{children:P||"Pool ".concat(t," not found")}),(0,r.jsx)("button",{onClick:()=>{j.ZP.invalidate(g.vs,[{}]),H(!0)},className:"mt-4 bg-blue-500 text-white px-4 py-2 rounded hover:bg-blue-600",children:"Retry"})]})})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i(),{children:(0,r.jsxs)("title",{children:["Pool ",t," | SkyPilot Dashboard"]})}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-4 h-5",children:[(0,r.jsxs)("div",{className:"text-base flex items-center",children:[(0,r.jsx)(c(),{href:"/jobs",className:"text-sky-blue hover:underline",children:"Pools"}),(0,r.jsx)("span",{className:"mx-2 text-gray-500",children:"›"}),(0,r.jsx)(c(),{href:"/jobs/pools/".concat(t),className:"text-sky-blue hover:underline",children:t})]}),(0,r.jsxs)("div",{className:"text-sm flex items-center",children:[o&&(0,r.jsxs)("div",{className:"flex items-center mr-4",children:[(0,r.jsx)(h.Z,{size:15,className:"mt-0"}),(0,r.jsx)("span",{className:"ml-2 text-gray-500",children:"Loading..."})]}),(0,r.jsxs)("button",{onClick:()=>{j.ZP.invalidate(g.vs,[{}]),H(!0)},disabled:o,className:"text-sky-blue hover:text-sky-blue-bright font-medium inline-flex items-center",children:[(0,r.jsx)(u,{className:"w-4 h-4 mr-1.5 ".concat(o?"animate-spin":"")}),(0,r.jsx)("span",{children:"Refresh"})]})]})]}),(0,r.jsxs)("div",{className:"w-full flex flex-col space-y-6",children:[(0,r.jsx)("div",{className:"mb-6",children:(0,r.jsxs)("div",{className:"rounded-lg border bg-card text-card-foreground shadow-sm",children:[(0,r.jsx)("div",{className:"flex items-center justify-between px-4 pt-4",children:(0,r.jsx)("h3",{className:"text-lg font-semibold",children:"Details"})}),(0,r.jsxs)("div",{className:"p-4",children:[(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-6",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Jobs"}),(0,r.jsx)("div",{className:"text-base mt-1",children:(0,r.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,r.jsx)(v.x9,{jobCounts:(0,v.sY)(s),getStatusStyle:y.Cl}),(0,r.jsx)(c(),{href:(0,C.P2)("/jobs","pool",":",t),className:"text-blue-600 hover:text-blue-800 text-xs",children:"See all jobs"})]})})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Workers"}),(0,r.jsx)("div",{className:"text-base mt-1",children:(e=>{if(!e||!e.replica_info||0===e.replica_info.length)return"0 (target: 0)";let t=e.replica_info.filter(e=>"READY"===e.status).length,s=e.target_num_replicas||0;return"".concat(t," (target: ").concat(s,")")})(s)})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Worker Details"}),(0,r.jsx)("div",{className:"text-base mt-1",children:(0,r.jsx)(v.Kl,{replicaInfo:s.replica_info})})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Worker Resources"}),(0,r.jsx)("div",{className:"text-base mt-1",children:s.requested_resources_str||"-"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Policy"}),(0,r.jsx)("div",{className:"text-base mt-1",children:s.policy||"-"})]})]}),s.entrypoint&&(0,r.jsxs)("div",{className:"pt-4 mt-4",children:[(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Entrypoint"}),(0,r.jsx)(v.WH,{content:K?"Copied!":"Copy command",className:"text-muted-foreground",children:(0,r.jsx)("button",{onClick:X,className:"flex items-center text-gray-500 hover:text-gray-700 transition-colors duration-200 p-1 ml-2",children:K?(0,r.jsx)(x.Z,{className:"w-4 h-4 text-green-600"}):(0,r.jsx)(m.Z,{className:"w-4 h-4"})})})]}),(0,r.jsx)("div",{className:"mt-3",children:(0,r.jsx)("div",{className:"bg-gray-50 border border-gray-200 rounded-md p-3",children:(0,r.jsx)("code",{className:"text-sm text-gray-800 font-mono break-all",children:s.entrypoint})})})]}),s.pool_yaml&&s.pool_yaml.trim()&&(0,r.jsxs)("div",{className:"pt-4 mt-4",children:[(0,r.jsxs)("div",{className:"flex items-center mb-2",children:[(0,r.jsxs)("button",{onClick:()=>{B(!I)},className:"flex items-center text-left focus:outline-none text-gray-700 hover:text-gray-900 transition-colors duration-200",children:[I?(0,r.jsx)(p.Z,{className:"w-4 h-4 mr-1"}):(0,r.jsx)(f.Z,{className:"w-4 h-4 mr-1"}),(0,r.jsx)("span",{className:"text-base",children:"Show Pool YAML"})]}),(0,r.jsx)(v.WH,{content:D?"Copied!":"Copy YAML",className:"text-muted-foreground",children:(0,r.jsx)("button",{onClick:V,className:"flex items-center text-gray-500 hover:text-gray-700 transition-colors duration-200 p-1 ml-2",children:D?(0,r.jsx)(x.Z,{className:"w-4 h-4 text-green-600"}):(0,r.jsx)(m.Z,{className:"w-4 h-4"})})})]}),I&&(0,r.jsx)("div",{className:"bg-gray-50 border border-gray-200 rounded-md p-3 max-h-96 overflow-y-auto",children:(0,r.jsx)(w.C,{className:"whitespace-pre-wrap",children:(0,N._q)(s.pool_yaml)})})]})]})]})}),(0,r.jsxs)("div",{className:"mb-8",children:[(0,r.jsxs)("div",{className:"rounded-lg border bg-card text-card-foreground shadow-sm",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between p-4",children:[(0,r.jsx)("h3",{className:"text-lg font-semibold",children:"Pool Workers"}),(0,r.jsx)("div",{className:"flex items-center space-x-2",children:(0,r.jsxs)("label",{className:"flex items-center space-x-3 text-sm cursor-pointer",children:[(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("input",{type:"checkbox",checked:T,onChange:e=>Y(e.target.checked),className:"sr-only"}),(0,r.jsx)("div",{className:"w-11 h-6 rounded-full transition-colors duration-200 ease-in-out ".concat(T?"bg-blue-600":"bg-gray-300"),children:(0,r.jsx)("div",{className:"w-5 h-5 bg-white rounded-full shadow transform transition-transform duration-200 ease-in-out translate-y-0.5 ".concat(T?"translate-x-5":"translate-x-0.5")})})]}),(0,r.jsx)("span",{className:"text-gray-700",children:"Show history"})]})})]}),(0,r.jsxs)(k.iA,{children:[(0,r.jsx)(k.xD,{children:(0,r.jsxs)(k.SC,{children:[(0,r.jsxs)(k.ss,{className:"sortable whitespace-nowrap",onClick:()=>Q("replica_id"),children:["ID",U("replica_id")]}),(0,r.jsxs)(k.ss,{className:"sortable whitespace-nowrap",onClick:()=>Q("launched_at"),children:["Launched",U("launched_at")]}),(0,r.jsxs)(k.ss,{className:"sortable whitespace-nowrap",onClick:()=>Q("cloud"),children:["Infra",U("cloud")]}),(0,r.jsxs)(k.ss,{className:"sortable whitespace-nowrap",onClick:()=>Q("resources_str"),children:["Resources",U("resources_str")]}),(0,r.jsxs)(k.ss,{className:"sortable whitespace-nowrap",onClick:()=>Q("status"),children:["Status",U("status")]}),(0,r.jsxs)(k.ss,{className:"sortable whitespace-nowrap",onClick:()=>Q("version"),children:["Pool Version",U("version")]}),(0,r.jsxs)(k.ss,{className:"sortable whitespace-nowrap",onClick:()=>Q("used_by"),children:["Used By",U("used_by")]})]})}),(0,r.jsx)(k.RM,{children:G.length>0?G.map((e,t)=>(0,r.jsxs)(k.SC,{children:[(0,r.jsx)(k.pj,{children:e.replica_id}),(0,r.jsx)(k.pj,{children:e.launched_at&&e.launched_at>0?(0,r.jsx)(v.Zg,{date:new Date(1e3*e.launched_at)}):"-"}),(0,r.jsx)(k.pj,{children:(()=>{try{let t=e.cloud&&""!==e.cloud.trim()&&"undefined"!==e.cloud,s=e.region&&"undefined"!==e.region&&null!==e.region&&""!==e.region.trim();if(!t&&!s)return"-";let n=t?e.cloud:"Unknown",a=s?e.region:null;if(!a)return(0,r.jsx)(c(),{href:"/infra",className:"text-blue-600 hover:underline",children:n});let l="".concat(n," (").concat(a,")"),i=b.MO.NAME_TRUNCATE_LENGTH,o=l.indexOf("(");if(-1===o)return(0,r.jsx)(c(),{href:"/infra",className:"text-blue-600 hover:underline",children:n});if(a.length<=i)return(0,r.jsxs)("span",{children:[(0,r.jsx)(c(),{href:"/infra",className:"text-blue-600 hover:underline",children:n}),(0,r.jsxs)("span",{children:[" (",a,")"]})]});let d="".concat(a.substring(0,Math.floor((i-3)/2)),"...").concat(a.substring(a.length-Math.ceil((i-3)/2)));return(0,r.jsx)(v.Md,{content:l,className:"text-sm text-muted-foreground",children:(0,r.jsxs)("span",{children:[(0,r.jsx)(c(),{href:"/infra",className:"text-blue-600 hover:underline",children:n}),(0,r.jsxs)("span",{children:[" (",d,")"]})]})})}catch(e){return"-"}})()}),(0,r.jsx)(k.pj,{children:(()=>{try{return e.resources_str}catch(e){return"Error: ".concat(e.message)}})()}),(0,r.jsx)(k.pj,{children:(0,r.jsx)(y.OE,{status:e.status})}),(0,r.jsx)(k.pj,{children:e.version||"-"}),(0,r.jsx)(k.pj,{children:(0,r.jsx)(M,{usedBy:e.used_by})})]},e.replica_id)):(0,r.jsx)(k.SC,{children:(0,r.jsx)(k.pj,{colSpan:7,className:"text-center py-8 text-gray-500",children:T?"No workers found in this pool":"No non-failed workers found in this pool"})})})]})]}),J.length>0&&(0,r.jsx)("div",{className:"flex justify-end items-center py-2 px-4 text-sm text-gray-700",children:(0,r.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("span",{className:"mr-2",children:"Rows per page:"}),(0,r.jsxs)("div",{className:"relative inline-block",children:[(0,r.jsxs)("select",{value:R,onChange:e=>{W(parseInt(e.target.value,10)),Z(1)},className:"py-1 pl-2 pr-6 appearance-none outline-none cursor-pointer border-none bg-transparent",style:{minWidth:"40px"},children:[(0,r.jsx)("option",{value:5,children:"5"}),(0,r.jsx)("option",{value:10,children:"10"}),(0,r.jsx)("option",{value:20,children:"20"}),(0,r.jsx)("option",{value:50,children:"50"})]}),(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 text-gray-500 absolute right-0 top-1/2 transform -translate-y-1/2 pointer-events-none",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})]}),(0,r.jsxs)("div",{children:[(E-1)*R+1," –"," ",Math.min(E*R,J.length)," ","of ",J.length]}),(0,r.jsx)(_.z,{variant:"ghost",size:"icon",onClick:()=>{Z(e=>Math.max(e-1,1))},disabled:1===E,className:"text-gray-500 h-8 w-8 p-0",children:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"chevron-left",children:(0,r.jsx)("path",{d:"M15 18l-6-6 6-6"})})}),(0,r.jsx)(_.z,{variant:"ghost",size:"icon",onClick:()=>{Z(e=>Math.min(e+1,$))},disabled:E===$,className:"text-gray-500 h-8 w-8 p-0",children:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"chevron-right",children:(0,r.jsx)("path",{d:"M9 18l6-6-6-6"})})})]})})]})]})]})]})}}},function(e){e.O(0,[739,798,754,821,850,969,248,888,774,179],function(){return e(e.s=38808)}),_N_E=e.O()}]);