PageSourceSearch

https://fernish.com/_next/static/chunks/pages/eames/areas-4faa9ca18f490808.js

js fernish.com collected 2026-09-28 07:40:33 UTC 43,014 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8372],{9552:(e,a,t)=>{"use strict";t.d(a,{A:()=>l});let l=(0,t(17963).A)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]])},29053:(e,a,t)=>{"use strict";t.d(a,{A:()=>l});let l=(0,t(17963).A)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},30358:(e,a,t)=>{"use strict";t.d(a,{Cf:()=>j,Es:()=>N,HM:()=>b,IF:()=>y,L3:()=>k,c7:()=>w,lG:()=>x,rr:()=>A,zM:()=>p});var l,s,n,r,i=t(37876),o=t(14232),c=t(28249),d=t(26303),u=t(2173),m=t(15338),h=t(3173);function x(e){let{...a}=e;return(0,i.jsx)(d.bL,{"data-slot":"dialog",...a})}function p(e){let{...a}=e;return(0,i.jsx)(d.l9,{"data-slot":"dialog-trigger",...a})}function f(e){let{...a}=e;return(0,i.jsx)(d.ZL,{"data-slot":"dialog-portal",...a})}function b(e){let{...a}=e;return(0,i.jsx)(d.bm,{"data-slot":"dialog-close",...a})}let g=o.forwardRef(function(e,a){let{className:t,...l}=e;return(0,i.jsx)(d.hJ,{ref:a,"data-slot":"dialog-overlay",className:(0,u.cn)("fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",t),...l})});function v(e){!e.defaultPrevented&&document.querySelector('[data-slot="combobox-content"][data-open]')&&e.preventDefault()}g.displayName=null!=(l=d.hJ.displayName)?l:"DialogOverlay";let j=o.forwardRef(function(e,a){let{className:t,children:l,showCloseButton:s=!0,onEscapeKeyDown:n,...r}=e;return(0,i.jsxs)(f,{"data-slot":"dialog-portal",children:[(0,i.jsx)(g,{}),(0,i.jsxs)(d.UC,{ref:a,"data-slot":"dialog-content",className:(0,u.cn)("fixed top-[50%] left-[50%] z-50 translate-x-[-50%] translate-y-[-50%]  border bg-background shadow-lg duration-200 outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-lg flex w-full max-w-lg flex-col gap-6 overflow-x-hidden overflow-y-auto rounded-2xl p-6.5 md:p-13 font-lato max-sm:max-h-[calc(100vh-3rem)] max-sm:w-[calc(100%-2rem)] md:max-h-[90vh]",t),onEscapeKeyDown:e=>{null==n||n(e),v(e)},...r,children:[l,s&&(0,i.jsxs)(d.bm,{"data-slot":"dialog-close",className:"absolute top-1 right-1 sm:top-3 sm:right-3 z-10 inline-flex size-8 items-center justify-center rounded-xs opacity-70 outline-none ring-offset-background transition-opacity hover:opacity-100 focus:ring-0 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground md:top-4 md:right-4 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:size-6 md:[&_svg]:size-8",children:[(0,i.jsx)(c.A,{}),(0,i.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});j.displayName=null!=(s=d.UC.displayName)?s:"DialogContent";let y=o.forwardRef(function(e,a){let{className:t,children:l,showCloseButton:s=!0,onEscapeKeyDown:n,...r}=e,o=(0,h.P8)(!0),m=o?{position:"fixed",top:o.top,left:o.left,width:o.width,height:o.height,zIndex:50,WebkitOverflowScrolling:"touch"}:{position:"fixed",top:0,left:0,right:0,bottom:0,zIndex:50};return(0,i.jsxs)(f,{"data-slot":"dialog-portal",children:[(0,i.jsx)(g,{}),(0,i.jsx)("div",{className:"box-border flex min-h-0 w-full min-w-0 items-center justify-center overflow-x-hidden overflow-y-hidden p-4 sm:p-6","data-dialog-vv-positioner":!0,style:m,children:(0,i.jsxs)(d.UC,{ref:a,"data-slot":"dialog-content-vv",className:(0,u.cn)("relative z-50 grid min-h-0 w-full max-h-full min-w-0 max-w-[calc(100%-2rem)] translate-x-0 translate-y-0 gap-4 overflow-y-auto overflow-x-hidden rounded-lg border bg-background p-6 shadow-lg duration-200 outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-lg",t),onEscapeKeyDown:e=>{null==n||n(e),v(e)},...r,children:[l,s&&(0,i.jsxs)(d.bm,{"data-slot":"dialog-close",className:"absolute top-2 right-2 sm:top-4 sm:right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[(0,i.jsx)(c.A,{}),(0,i.jsx)("span",{className:"sr-only",children:"Close"})]})]})})]})});function w(e){let{className:a,...t}=e;return(0,i.jsx)("div",{"data-slot":"dialog-header",className:(0,u.cn)("flex flex-col gap-2 text-center sm:text-left space-y-0",a),...t})}function N(e){let{className:a,showCloseButton:t=!1,children:l,...s}=e;return(0,i.jsxs)("div",{"data-slot":"dialog-footer",className:(0,u.cn)("flex flex-col-reverse gap-2 max-sm:items-stretch sm:flex-row sm:justify-stretch sm:gap-2.5",a),...s,children:[l,t&&(0,i.jsx)(d.bm,{asChild:!0,children:(0,i.jsx)(m.$,{variant:"outline",children:"Close"})})]})}y.displayName="DialogContentVisualViewport";let k=o.forwardRef(function(e,a){let{className:t,...l}=e;return(0,i.jsx)(d.hE,{ref:a,"data-slot":"dialog-title",className:(0,u.cn)("font-lato text-lg xl:text-2xl font-bold text-primary-text leading-tight m-0",t),...l})});k.displayName=null!=(n=d.hE.displayName)?n:"DialogTitle";let A=o.forwardRef(function(e,a){let{className:t,...l}=e;return(0,i.jsx)(d.VY,{ref:a,"data-slot":"dialog-description",className:(0,u.cn)("text-base text-muted-foreground mb-0",t),...l})});A.displayName=null!=(r=d.VY.displayName)?r:"DialogDescription"},32649:(e,a,t)=>{"use strict";t.r(a),t.d(a,{__N_SSP:()=>ej,default:()=>ey});
1var l=t(37876);let s=["storage","quarantine","refurbishing"];var n=function(e){return e.AREA="Zone",e.BIN="Bin",e}({});let r=[{value:"bin",label:"Bin"},{value:"download",label:"Download"},{value:"tbd",label:"TBD"},{value:"repairs",label:"Repairs"},{value:"accessories",label:"Accessories"},{value:"cleaning",label:"Cleaning"},{value:"touch",label:"Touch"},{value:"sanding",label:"Sanding"},{value:"damaged",label:"Damaged"},{value:"cycle_count",label:"Cycle Count"},{value:"office",label:"Office"},{value:"non_tagged",label:"Non-Tagged"},{value:"container",label:"Container"},{value:"investigate",label:"Investigate"},{value:"transfer_transit",label:"Transfer-Transit"},{value:"receiving",label:"Receiving"},{value:"backwall",label:"Backwall"},{value:"returns_from_projects",label:"Returns From Projects"},{value:"other",label:"Other"},{value:"buffer",label:"Buffer"},{value:"trailer_truck",label:"Trailer-Truck"},{value:"unpicking",label:"Unpicking"},{value:"floor_stack",label:"Floor Stack"},{value:"quarantine",label:"Quarantine"},{value:"liquidation",label:"Liquidation"},{value:"endcap",label:"Endcap"},{value:"repair",label:"Repair"},{value:"missing_items",label:"Missing Items"},{value:"off_site_storage",label:"Off Site Storage"},{value:"procurement",label:"Procurement"},{value:"overflow",label:"Overflow"},{value:"dock",label:"Dock"},{value:"incomplete",label:"Incomplete"},{value:"person",label:"Person"}],i=[{value:"general",label:"General"},{value:"accessories",label:"Accessories"},{value:"null",label:"null (Show Zones)"}],o=s.map(e=>({value:e,label:e}));function c(e){return e.map(e=>({value:e,label:e.split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}))}let d=c(s),u=c(["general","accessories"]);var m=t(93293),h=t(1992);let x="get_areas",p="get_area";var f=t(94257);let b=e=>{let{signal:a,queryKey:t}=e;return function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{params:{}};return f.L.get("/api/v1/eames/areas",e).then(e=>e.data)}({signal:a,params:t[1]})};async function g(e){await e.invalidateQueries(x)}let v=e=>{let{signal:a,queryKey:t}=e;return function(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return f.L.get("/api/v1/eames/areas/".concat(e),a).then(e=>e.data)}(t[1],{signal:a})};function j(e){var a;let{id:t,options:l}=e;return(0,h.useQuery)([p,t],v,{...l,enabled:t>0&&(null==(a=null==l?void 0:l.enabled)||a)})}async function y(e,a){if(null!=a)return void await e.invalidateQueries([p,a]);await e.invalidateQueries(p)}let w=e=>{let{signal:a}=e;return function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return f.L.get("/api/v1/eames/warehouses",e).then(e=>e.data)}({signal:a})};function N(e){return(0,h.useQuery)(["get_warehouses"],w,e)}function k(e){let a=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e.map(e=>({label:a?"".concat(e.name," [").concat(e.id,"]"):e.name,value:String(e.id)}))}let A=e=>f.L.post("/api/v1/eames/areas",e).then(e=>e.data),C=e=>(function(e){let{id:a,body:t}=e;return f.L.put("/api/v1/eames/areas/".concat(a),t).then(e=>e.data)})(e),z=e=>f.L.delete("/api/v1/eames/areas/".concat(e)).then(e=>e.data);var S=t(15338),T=t(30358),_=t(41354),F=t(90964),I=t(35739),M=t(14232),B=t(59688);let D={name:null,warehouseId:"",status:"",binType:"",aisle:"",facing:"",row:"",shelf:"",serialNumber:"",subType:""};function Y(e){let{htmlFor:a,children:t}=e;return(0,l.jsxs)(F.J,{htmlFor:a,children:[t," ",(0,l.jsx)("span",{className:"text-destructive",children:"*"})]})}function E(e){var a,t;let{open:s,entityType:i,areaId:o,onOpenChange:c,onViewZone:x}=e,p=null!=o,f=i===n.BIN,b=j({id:null!=o?o:0,options:{enabled:s&&p}}),v=b.data,w=p&&b.isLoading,z=(null==v?void 0:v.isEmpty)!==!0,E=p?"Update":"Create",[L,P]=(0,M.useState)(D),[R,q]=(0,M.useState)(null),V=N({enabled:s}),Z=(0,M.useMemo)(()=>{var e;return k(null!=(e=V.data)?e:[],!0)},[V.data]),O=function(){let e=(0,h.useQueryClient)();return(0,h.useMutation)(A,{onSuccess:async()=>{await g(e)}})}(),$=function(){let e=(0,h.useQueryClient)();return(0,h.useMutation)(C,{onSuccess:async(a,t)=>{await g(e),await y(e,t.id)}})}(),H=O.isLoading||$.isLoading,U=p&&z;(0,M.useEffect)(()=>
1{if(s){var e,a,t,l;if(q(null),!p)return void P({...D,subType:f?"bin":""});v&&P({name:v.name,warehouseId:String(v.warehouseId),status:v.status,binType:null!=(e=v.binType)?e:"",aisle:null!=v.aisle?String(v.aisle):"",facing:null!=(a=v.facing)?a:"",row:null!=v.row?String(v.row):"",shelf:null!=v.shelf?String(v.shelf):"",serialNumber:null!=(t=v.serialNumber)?t:"",subType:null!=(l=v.subType)?l:""})}},[s,v,p,f]);let Q=(0,M.useMemo)(()=>{var e;if(H||R||w||p&&!v)return!0;let a=!L.warehouseId||!L.status||!L.serialNumber||!L.subType||![6,8].includes(L.serialNumber.length);return f?a||!L.binType||!L.row||!L.facing||!L.shelf:a||!(null==(e=L.name)?void 0:e.trim())},[R,v,L,f,p,w,H]),G=e=>a=>{let{value:t}=a.target;if("aisle"===e){if(t.length>4||!/^\d*$/.test(t))return;q("0"===t?"Aisle cannot be 0":null),P(e=>({...e,aisle:t}));return}!(t.length>4)&&/^\d*$/.test(t)&&P(a=>({...a,[e]:t}))},W=async()=>{var e;let a=L.warehouseId&&L.status?{warehouseId:Number(L.warehouseId),status:L.status,name:(null==(e=L.name)?void 0:e.trim())||null,binType:L.binType?L.binType:null,aisle:L.aisle?Number(L.aisle):null,facing:L.facing||null,row:L.row?Number(L.row):null,shelf:L.shelf?Number(L.shelf):null,serialNumber:L.serialNumber||null,subType:L.subType||null}:null;if(a)try{if(p&&v){await $.mutateAsync({id:v.id,body:a}),B.oR.success("Successfully updated ".concat(L.name||v.name||""," ").concat(i)),c(!1),x(v.id);return}await O.mutateAsync(a),B.oR.success("Successfully created ".concat(L.name||""," ").concat(i).trim()),c(!1)}catch(e){B.oR.error("Failed to ".concat(p?"update":"create"," ").concat(i))}},J=p?"Update ".concat(i,": ").concat(null!=(a=null==v?void 0:v.name)?a:""):"Create new ".concat(i);return(0,l.jsx)(T.lG,{open:s,onOpenChange:c,children:(0,l.jsxs)(T.Cf,{children:[(0,l.jsxs)(T.c7,{children:[(0,l.jsx)(T.L3,{children:J}),(0,l.jsx)(T.rr,{className:"sr-only",children:p?"Form to update the selected ".concat(i,"."):"Form to create a new ".concat(i,".")})]}),w?(0,l.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,l.jsx)(I.A,{className:"size-8 animate-spin text-muted-foreground"})}):p&&!v?(0,l.jsx)("p",{className:"py-8 text-center text-muted-foreground",children:"Area not found"}):(0,l.jsxs)("form",{className:"space-y-4",onSubmit:e=>{e.preventDefault(),Q||W()},children:[f?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"space-y-2",children:[(0,l.jsx)(Y,{htmlFor:"binType",children:"Bin Type"}),(0,l.jsx)(m.A,{value:L.binType,onValueChange:e=>P(a=>({...a,binType:e})),options:u,placeholder:"Select bin type...",disabled:U})]}),(0,l.jsxs)("div",{className:"grid grid-cols-2 gap-4 sm:grid-cols-4",children:[(0,l.jsxs)("div",{className:"space-y-2",children:[(0,l.jsx)(Y,{htmlFor:"row",children:"Row"}),(0,l.jsx)(_.p,{id:"row",value:L.row,onChange:G("row"),placeholder:"#",required:!0})]}),(0,l.jsxs)("div",{className:"space-y-2",children:[(0,l.jsx)(Y,{htmlFor:"facing",children:"Facing"}),(0,l.jsx)(_.p,{id:"facing",value:L.facing,onChange:e=>{let{value:a}=e.target;a.length>4||P(e=>({...e,facing:a}))},placeholder:"#",required:!0})]}),(0,l.jsxs)("div",{className:"space-y-2",children:[(0,l.jsx)(Y,{htmlFor:"shelf",children:"Shelf"}),(0,l.jsx)(_.p,{id:"shelf",value:L.shelf,onChange:G("shelf"),placeholder:"#",required:!0})]}),(0,l.jsxs)("div",{className:"space-y-2",children:[(0,l.jsx)(F.J,{htmlFor:"aisle",children:"Aisle"}),(0,l.jsx)(_.p,{id:"aisle",value:L.aisle,onChange:G("aisle"),placeholder:"#","aria-invalid":!!R}),R?(0,l.jsx)("p",{className:"text-sm text-destructive",children:R}):null]})]})]}):(0,l.jsxs)("div",{className:"space-y-2",children:[(0,l.jsx)(Y,{htmlFor:"name",children:"Name"}),(0,l.jsx)(_.p,{id:"name",value:null!=(t=L.name)?t:"",onChange:e=>P(a=>({...a,name:e.target.value||null})),placeholder:"Enter name",required:!0})]}),(0,l.jsxs)("div",{className:"space-y-2",children:[(0,l.jsxs)(Y,{htmlFor:"subType",children:[i," Sub Type"]}),(0,l.jsx)(m.A,{value:L.subType,onValueChange:e=>P(a=>({...a,subType:e})),options:r,placeholder:"Select sub type..."})]}),(0,l.jsxs)("div",{className:"space-y-2",children:[(0,l.jsx)(Y,{htmlFor:"warehouseId",children:"Warehouse"}),(0,l.jsx)(m.A,{value:L.warehouseId,onValueChange:e=>P(a=>({...a,warehouseId:e})),options:Z,placeholder:"Select warehouse...",disabled:V.isLoading||U})]}),(0,l.jsxs)("div",{className:"space-y-2",children:[(0,l.jsx)(Y,{htmlFor:"serialNumber",children:"Serial Number"}),(0,l.jsx)(_.p,{id:"serialNumber",value:L.serialNumber,onChange:e=>{let{value:a}=e.target;!(a.length>8)&&/^\d*$/.test(a)&&P(e=>({...e,serialNumber:a}))}
1,placeholder:"Enter serial number",required:!0,maxLength:8})]}),(0,l.jsxs)("div",{className:"space-y-2",children:[(0,l.jsx)(Y,{htmlFor:"status",children:"Status"}),(0,l.jsx)(m.A,{value:L.status,onValueChange:e=>P(a=>({...a,status:e})),options:d,placeholder:"Select status...",disabled:U})]}),U?(0,l.jsx)("p",{className:"text-sm text-muted-foreground",children:f?"You cannot update the warehouse, status or bin type of a Bin with assigned instances. Please contact dev team if needed.":"You cannot update the warehouse or status of an Area with assigned instances. Please contact dev team if needed."}):null,(0,l.jsxs)(T.Es,{children:[(0,l.jsx)(S.$,{type:"button",variant:"outline",size:"lg",className:"flex-1",onClick:()=>c(!1),disabled:H,children:"Cancel"}),(0,l.jsx)(S.$,{type:"submit",className:"flex-1",size:"lg",disabled:Q,children:H?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(I.A,{className:"size-4 animate-spin"}),E]}):E})]})]})]})})}var L=t(50546),P=t(37409),R=t(36414);let q="h-12! w-full rounded-lg border-muted bg-white";function V(e){let{filters:a,warehouseOptions:t,showWarehouseFilter:s,hasActiveFilters:n,selectResetKey:r,canManage:c,onSearchChange:d,onFilterSelectChange:u,onResetFilters:h,onCreateZone:x,onCreateBin:p}=e;return(0,l.jsxs)("div",{className:"flex w-full flex-col gap-3 xl:flex-row xl:items-center xl:gap-4",children:[(0,l.jsxs)("div",{className:"grid min-w-0 flex-1 grid-cols-1 gap-3 sm:grid-cols-2 xl:grid-cols-4 2xl:grid-cols-5",children:[(0,l.jsx)(L.A,{value:a.search,onChange:d,placeholder:"Search by Name, Barcode"}),s?(0,l.jsx)(m.A,{value:a.warehouseId||void 0,onValueChange:u("warehouseId"),options:t,placeholder:"Filter by Warehouse",triggerClassName:q,contentProps:P.j},"warehouse-".concat(r)):null,(0,l.jsx)(m.A,{value:a.binType||void 0,onValueChange:u("binType"),options:i,placeholder:"Filter by Bin Type",triggerClassName:q,contentProps:P.j},"binType-".concat(r)),(0,l.jsx)(m.A,{value:a.status||void 0,onValueChange:u("status"),options:o,placeholder:"Filter by Status",triggerClassName:q,contentProps:P.j},"status-".concat(r)),n?(0,l.jsx)("div",{className:"flex sm:col-span-2 xl:col-span-1 2xl:col-span-1",children:(0,l.jsx)(S.$,{type:"button",variant:"outline",size:"icon",className:"size-12 shrink-0","aria-label":"Reset filters",onClick:h,children:(0,l.jsx)(R.A,{className:"size-4"})})}):null]}),c?(0,l.jsxs)("div",{className:"flex w-full shrink-0 gap-2 flex-row justify-end xl:w-auto",children:[(0,l.jsx)(S.$,{type:"button",className:"h-12 px-4 w-auto flex-1 md:flex-none",onClick:x,children:"Create Zone"}),(0,l.jsx)(S.$,{type:"button",className:"h-12 px-4 w-auto flex-1 md:flex-none",onClick:p,children:"Create Bin"})]}):null]})}let Z={search:"",warehouseId:"",binType:"",status:""},O={header:"h-4 w-20",cell:"h-4 w-24"},$=[{key:"id",label:"Id",sortable:!0,sortField:"id",className:"w-16",skeleton:{header:"h-4 w-8",cell:"h-4 w-10"}},{key:"name",label:"Name",sortable:!0,sortField:"name",className:"min-w-40",skeleton:{header:"h-4 w-16",cell:"h-4 w-32 max-w-full"}},{key:"binType",label:"Bin Type",sortable:!0,sortField:"bin_type",className:"w-28",skeleton:{header:"h-4 w-20",cell:"h-4 w-20"}},{key:"warehouse",label:"Warehouse",className:"min-w-44",skeleton:{header:"h-4 w-24",cell:"h-4 w-40 max-w-full"}},{key:"status",label:"Status",sortable:!0,sortField:"status",className:"w-28",skeleton:{header:"h-4 w-16",cell:"h-4 w-20"}},{key:"barcode",label:"Barcode",className:"w-28",skeleton:{header:"h-4 w-20",cell:"h-4 w-20"}},{key:"createdAt",label:"Created At",sortable:!0,sortField:"created_at",className:"w-28",skeleton:{header:"h-4 w-20",cell:"h-4 w-24"}},{key:"updatedAt",label:"Updated At (UTC)",sortable:!0,sortField:"updated_at",className:"w-40",skeleton:{header:"h-4 w-28",cell:"h-4 w-36"}},{key:"lastCountedBy",label:"Last Counted By",className:"min-w-48 whitespace-nowrap",skeleton:{header:"h-4 w-28",cell:"h-4 w-36 max-w-full"}},{key:"lastCountedAt",label:"Last Counted At",sortable:!0,sortField:"last_cycle_count_at",className:"w-36 whitespace-nowrap",skeleton:{header:"h-4 w-24",cell:"h-4 w-24"}},{key:"actions",label:"",className:"w-12",skeleton:{headerHidden:!0,cell:"size-8 rounded-md"}}];var H=t(2173),U=t(48698),Q=t(79758),G=t(10841),W=t.n(G);function J(e){var a,t,s,r;let{area:i,canManage:o,onViewZone:c,onEditZone:d}=e,u=i.isBin?n.BIN:n.AREA;return(0,l.jsxs)(U.Hj,{className:"hover:bg-accent/30",children:[(0,l.jsx)(U.nA,{className:"whitespace-nowrap",children:(0,l.jsx)(S.$,{type:"button",variant:"link",className:"h-auto p-0 font-medium underline hover:font-semibold",onClick:()=>c(i.id),children:i.id})}),(0,l.jsx)(U.nA,{children:null!=(a=i.name)?a:"—"}),(0,l.jsx)(U.nA,{children:null!=(t=i.binType)?t:"—"}),(0,l.jsxs)(U.nA,{children:[i.warehouse.name," [",i.warehouse.id,"]"]}),(0,l.jsx)(U.nA,{children:i.status}),(0,l.jsx)(U.nA,{children:null!=(s=i.serialNumber)?s:"—"}),(0,l.jsx)(U.nA,{children:(0,H.Yq)(i.createdAt,"YYYY-MM-DD")}),(0,l.jsx)(U.nA,{children:W().utc(i.updatedAt).format("YYYY-MM-DD HH:mm:ss")}),(0,l.jsx)(U.nA,{className:"min-w-48 whitespace-nowrap",children:null!=(r=i.lastCycleCountedByEmail)?r:"—"}),(0,l.jsx)(U.nA,{className:"whitespace-nowrap",children:i.lastCycleCountAt?(0,H.Yq)(i.lastCycleCountAt,"YYYY-MM-DD"):"—"}),(0,l.jsx)(U.nA,{className:"w-12",children:o?(0,l.jsx)("div",{className:"flex items-center justify-end",children:(0,l.jsx)(S.$,{type:"button",variant:"ghost",size:"icon-sm","aria-label":"Edit ".concat(u.toLowerCase()),onClick:e=>{e.stopPropagation(),d(u,i.id)},children:(0,l.jsx)(Q.A,{className:"size-4"})})}):null})]})}var X=t(35971);function K(e){let{variant:a}=e,t="header"===a;return(0,l.jsx)("div",{className:(0,H.cn)("flex w-full min-w-max items-center gap-4 px-4",t?"h-10 border-b bg-background":"border-b py-4 last:border-b-0"),children:$.map(e=>{var s,n,r,i,o,c;let d=function(e){let a=null==e?void 0:e.replace(/\s*whitespace-nowrap/g,"").trim();return a?a.includes("min-w-")?"".concat(a," flex-1"):"".concat(a," shrink-0"):"shrink-0"}(e.className),u={header:null!=(i=null==(s=e.skeleton)?void 0:s.header)?i:O.header,cell:null!=(o=null==(n=e.skeleton)?void 0:n.cell)?o:O.cell,headerHidden:null!=(c=null==(r=e.skeleton)?void 0:r.headerHidden)&&c};return(0,l.jsx)("div",{className:(0,H.cn)("flex items-center",t&&"h-10",d),children:t?u.headerHidden?null:(0,l.jsx)(X.E,{className:u.header}):(0,l.jsx)(X.E,{className:u.cell})},"".concat(a,"-").concat(e.key))})})}function ee(e){return(0,l.jsxs)("div",{className:"flex w-full min-w-0 flex-col md:absolute md:inset-0",children:[(0,l.jsx)(K,{variant:"header"}),(0,l.jsx)("div",{className:"flex w-full flex-1 flex-col overflow-x-auto",children:Array.from({length:10},(e,a)=>(0,l.jsx)(K,{variant:"body"}
1,"zones-row-".concat(a)))})]})}var ea=t(52010),et=t(57117),el=t(32756),es=t(86654);let en={sortBy:"id",sortOrder:"desc"};function er(e){var a,t,s,r;let{canManage:i,onCreateZone:o,onViewZone:c,onEditZone:d}=e,[u,m]=(0,M.useState)(1),[p,f]=(0,M.useState)(25),[g,v]=(0,M.useState)(Z),[j,y]=(0,M.useState)(en.sortBy),[w,A]=(0,M.useState)(en.sortOrder),[C,z]=(0,M.useState)(0),S=(0,el.o)(g.search,1e3),T=N(),_=(0,M.useMemo)(()=>{var e;return k(null!=(e=T.data)?e:[],!0)},[T.data]),F=_.length>1,I=function(e){let{params:a,options:t}=e;return(0,h.useQuery)([x,a],b,t)}({params:{page:u,perPage:p,sortBy:j,sortOrder:w,q:S.trim()||void 0,warehouseId:g.warehouseId?Number(g.warehouseId):void 0,binType:g.binType||void 0,status:g.status||void 0},options:{keepPreviousData:!0}}),B=null!=(s=null==(a=I.data)?void 0:a.data)?s:[],D=Math.max(1,null!=(r=null==(t=I.data)?void 0:t.totalPages)?r:1),Y=I.isLoading||I.isFetching&&I.isPreviousData,E=g.search.trim().length>0||g.warehouseId.length>0||g.binType.length>0||g.status.length>0,L=(0,M.useCallback)(e=>{v(e),m(1)},[]),P=(0,M.useCallback)(e=>{y(a=>a===e?(A(e=>"desc"===e?"asc":"desc"),a):(A("asc"),e)),m(1)},[]),R=(0,M.useCallback)(()=>{L(e=>({...e,warehouseId:"",binType:"",status:""})),z(e=>e+1)},[L]),q=(0,M.useCallback)(e=>a=>{L(t=>({...t,[e]:a}))},[L]),O=(0,M.useCallback)(e=>{m(e),window.scrollTo(0,0)},[]),Q=(0,M.useCallback)(e=>{f(e),m(1),window.scrollTo(0,0)},[]),G=(0,M.useCallback)(e=>{L(a=>({...a,search:e}))},[L]);return(0,l.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col gap-4",children:[(0,l.jsx)(V,{filters:g,warehouseOptions:_,showWarehouseFilter:F,hasActiveFilters:g.warehouseId.length>0||g.binType.length>0||g.status.length>0,selectResetKey:C,canManage:i,onSearchChange:G,onFilterSelectChange:q,onResetFilters:R,onCreateZone:()=>o(n.AREA),onCreateBin:()=>o(n.BIN)}),(0,l.jsx)("div",{className:"overflow-hidden rounded-xl border border-border bg-white shadow-sm md:relative md:flex md:min-
1h-0 md:flex-1",children:Y?(0,l.jsx)(ee,{}):I.isError?(0,l.jsx)("div",{className:"px-6 py-12 text-center text-muted-foreground md:flex md:min-h-0 md:flex-1 md:items-center md:justify-center",children:"Zones/Bins failed to load. Refresh the page or try again."}):0===B.length?(0,l.jsxs)("div",{className:"flex flex-col items-center justify-center gap-3 px-6 py-12 text-center text-muted-foreground md:min-h-0 md:flex-1",children:[(0,l.jsx)(es.A,{className:"size-8 text-muted-foreground/70"}),(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"text-base font-medium text-foreground",children:"No zones/bins found"}),(0,l.jsx)("p",{className:"text-sm",children:E?"Try adjusting your filters or search.":i?"Create a zone or bin to get started.":"No zones or bins match your access."})]})]}):(0,l.jsx)("div",{className:"overflow-x-auto md:absolute md:inset-0 md:overflow-auto [&_[data-slot=table-container]]:overflow-visible md:[&_[data-slot=table-container]]:h-full",children:(0,l.jsxs)(U.XI,{children:[(0,l.jsx)(U.A0,{className:"bg-background",children:(0,l.jsx)(U.Hj,{className:"hover:bg-transparent",children:$.map(e=>(0,l.jsx)(U.nd,{className:(0,H.cn)("sticky top-0 z-10 bg-background",e.sortable?"p-0":"text-muted-foreground",e.className),children:e.sortable&&e.sortField?(0,l.jsx)(et.A,{label:e.label,field:e.sortField,sortBy:j,sortOrder:w,onSort:P}):e.label},e.key))})}),(0,l.jsx)(U.BF,{children:B.map(e=>(0,l.jsx)(J,{area:e,canManage:i,onViewZone:c,onEditZone:d},e.id))})]})})}),(0,l.jsx)(ea.A,{currentPage:u,totalPages:D,perPage:p,onPageChange:O,onPerPageChange:Q})]})}var ei=t(16509),eo=t(86418);function ec(e){let{label:a,value:t}=e;return(0,l.jsxs)("div",{className:"space-y-1",children:[(0,l.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:a}),(0,l.jsx)("p",{className:"text-sm text-foreground",children:t})]})}function ed(e){let{disabled:a,disabledTooltip:t,onDelete:s}=e,n=(0,ei.a)(),[r,i]=(0,M.useState)(!1);return((0,M.useEffect)(()=>{a||i(!1)},[a]),a)?(0,l.jsxs)(eo.m_,{open:n?r:void 0,onOpenChange:n?i:void 0,children:[(0,l.jsx)(eo.k$,{asChild:!0,children:(0,l.jsx)("span",{className:"inline-flex w-full cursor-not-allowed",onClick:n?e=>{e.stopPropagation(),i(e=>!e)}:void 0,children:(0,l.jsx)(S.$,{type:"button",size:"lg",className:"pointer-events-none flex-1",variant:"destructive",disabled:!0,"aria-label":"Delete (unavailable)",children:"Delete"})})}),(0,l.jsx)(eo.ZI,{side:"top",className:"max-w-64 text-wrap",children:t})]}):(0,l.jsx)(S.$,{type:"button",size:"lg",className:"w-full flex-1",variant:"destructive",onClick:s,children:"Delete"})}function eu(e){var a,t,s,r,i,o,c,d;let{open:u,areaId:m,canManage:x,onOpenChange:p,onEditZone:f}=e,[b,v]=(0,M.useState)(!1),y=j({id:null!=m?m:0,options:{enabled:u&&null!=m&&m>0}}),w=function(){let e=(0,h.useQueryClient)();return(0,h.useMutation)(z,{onSuccess:async()=>{await g(e)}})}(),N=y.data,k=(null==N?void 0:N.isBin)?n.BIN:n.AREA,A=(null!=(a=null==N?void 0:N.itemPartInstancesCount)?a:1)>0,C=w.isLoading,_=async()=>{if(m)try{var e;await w.mutateAsync(m),B.oR.success("Successfully deleted ".concat(k,": ").concat(null!=(e=null==N?void 0:N.name)?e:m)),v(!1),p(!1)}catch(e){B.oR.error("Failed to delete ".concat(k))}};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(T.lG,{open:u,onOpenChange:p,children:(0,l.jsxs)(T.Cf,{className:"sm:max-w-3xl",children:[(0,l.jsxs)(T.c7,{children:[(0,l.jsx)(T.L3,{children:N?"".concat(k,": ").concat(null!=(t=N.name)?t:N.id):"Zone/Bin details"}),(0,l.jsx)(T.rr,{className:"sr-only",children:N?"".concat(k,": ").concat(null!=(s=N.name)?s:N.id):"Zone/Bin details"})]}),y.isLoading||C?(0,l.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,l.jsx)(I.A,{className:"size-8 animate-spin text-muted-foreground"})}):N?(0,l.jsxs)("div",{className:"grid gap-6 sm:grid-cols-2",children:[(0,l.jsx)(ec,{label:"".concat(k," Id"),value:String(N.id)}),(0,l.jsx)(ec,{label:"Warehouse Id",value:String(N.warehouse.id)}),(0,l.jsx)(ec,{label:"".concat(k," Name"),value:null!=(r=N.name)?r:"—"}),(0,l.jsx)(ec,{label:"Warehouse Name",value:N.warehouse.name}),(0,l.jsx)(ec,{label:"Bin Type",value:null!=(i=N.binType)?i:"—"}),(0,l.jsx)(ec,{label:"Created At",value:(0,H.Yq)(N.createdAt,"YYYY-MM-DD HH:mm:ss")}),(0,l.jsx)(ec,{label:"Status",value:N.status}),(0,l.jsx)(ec,{label:"Updated At",value:(0,H.Yq)(N.updatedAt,"YYYY-MM-DD HH:mm:ss")}),(0,l.jsx)(ec,{label:"Barcode",value:null!=(o=N.serialNumber)?o:"—"}),(0,l.jsx)(ec,{label:"Last Cycle Counted At",value:N.lastCycleCountAt?(0,H.Yq)(N.lastCycleCountAt,"YYYY-MM-DD HH:mm:ss"):"—"}),(0,l.jsx)(ec,{label:"Item Part Instances Count",value:String(null!=(c=N.itemPartInstancesCount)?c:"—")}),(0,l.jsx)(ec,{label:"Last Cycle Counted By",value:null!=(d=N.lastCycleCountedByEmail)?d:"—"})]}):(0,l.jsx)("p",{className:"py-8 text-center text-muted-foreground",children:"Area not found"}),N&&x?(0,l.jsxs)(T.Es,{children:[(0,l.jsx)("div",{className:"flex-1",children:(0,l.jsx)(ed,{disabled:A,disabledTooltip:"This area cannot be deleted because it has assigned items.",onDelete:()=>v(!0)})}),(0,l.jsx)(S.$,{type:"button",size:"lg",className:"flex-1",onClick:()=>{p(!1),f(k,N.id)},children:"Update"})]}):null]})}),(0,l.jsx)(T.lG,{open:b,onOpenChange:v,children:(0,l.jsxs)(T.Cf,{children:[(0,l.jsxs)(T.c7,{children:[(0,l.jsxs)(T.L3,{children:["Are you sure you want to delete this ",k,"?"]}),(0,l.jsx)(T.rr,{children:"This action cannot be undone."})]}),(0,l.jsxs)(T.Es,{children:[(0,l.jsx)(S.$,{type:"button",variant:"outline",size:"lg",className:"flex-1",onClick:()=>v(!1),disabled:C,children:"Cancel"}),(0,l.jsx)(S.$,{type:"button",variant:"destructive",size:"lg",className:"flex-1",disabled:C,onClick:_,children:"Confirm"})]})]})})]})}var em=t(93583),eh=t(62235),ex=t(37875),ep=t(3173),ef=t(77328),eb=t.n(ef);let eg={open:!1,entityType:n.AREA};function ev(e){let{canAccessRoute:a,hasPermission:t,isPermissionsPending:s}=(0,ep.n8)(),n=a("/eames/areas"),r=t(ex.Bj),[i,o]=(0,M.useState)(null),[c,d]=(0,M.useState)(!1),[u,m]=(0,M.useState)(eg),h=e=>{m(eg),o(e),d(!0)},x=(e,a)=>{r&&(d(!1),m({open:!0,entityType:e,areaId:a}))},p=(0,M.useCallback)(e=>{m(a=>e?{...a,open:!0}:eg)},[]);return s?null:n?(0,l.jsxs)("article",{className:"flex w-full flex-col bg-background md:min-
1h-screen",children:[(0,l.jsx)(eb(),{children:(0,l.jsx)("title",{children:"Vesta - Zones/Bins List"})}),(0,l.jsxs)("div",{className:"mx-auto w-full pb-16 md:flex md:min-h-0 md:flex-1 md:flex-col md:pb-6",children:[(0,l.jsx)(eh.A,{title:"Zones/Bins List"}),(0,l.jsx)("div",{className:"p-4 md:flex md:min-h-0 md:flex-1 md:flex-col md:p-6",children:(0,l.jsx)(er,{canManage:r,onCreateZone:e=>{r&&(d(!1),m({open:!0,entityType:e}))},onViewZone:h,onEditZone:x})})]}),r?(0,l.jsx)(E,{open:u.open,entityType:u.entityType,areaId:u.areaId,onOpenChange:p,onViewZone:h}):null,(0,l.jsx)(eu,{open:c,areaId:i,canManage:r,onOpenChange:d,onEditZone:x})]}):(0,l.jsxs)("article",{className:"flex w-full flex-col bg-background md:min-h-screen",children:[(0,l.jsx)(eb(),{children:(0,l.jsx)("title",{children:"Vesta - Zones/Bins List"})}),(0,l.jsxs)("div",{className:"mx-auto w-full pb-16 md:flex md:min-h-0 md:flex-1 md:flex-col md:pb-6",children:[(0,l.jsx)(eh.A,{title:"Zones/Bins List"}),(0,l.jsx)(em.A,{})]})]})}var ej=!0;function ey(){return(0,l.jsx)(ev,{})}},36414:(e,a,t)=>{"use strict";t.d(a,{A:()=>l});let l=(0,t(17963).A)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]])},37409:(e,a,t)=>{"use strict";t.d(a,{j:()=>l});let l={position:"popper",side:"bottom",align:"start",sideOffset:4}},38724:(e,a,t)=>{"use strict";t.d(a,{A:()=>l});let l=(0,t(17963).A)("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]])},48698:(e,a,t)=>{"use strict";t.d(a,{A0:()=>r,BF:()=>i,Hj:()=>o,XI:()=>n,nA:()=>d,nd:()=>c});
1var l=t(37876);t(14232);var s=t(2173);function n(e){let{className:a,...t}=e;return(0,l.jsx)("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:(0,l.jsx)("table",{"data-slot":"table",className:(0,s.cn)("w-full caption-bottom text-sm",a),...t})})}function r(e){let{className:a,...t}=e;return(0,l.jsx)("thead",{"data-slot":"table-header",className:(0,s.cn)("[&_tr]:border-b",a),...t})}function i(e){let{className:a,...t}=e;return(0,l.jsx)("tbody",{"data-slot":"table-body",className:(0,s.cn)("[&_tr:last-child]:border-0",a),...t})}function o(e){let{className:a,...t}=e;return(0,l.jsx)("tr",{"data-slot":"table-row",className:(0,s.cn)("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",a),...t})}function c(e){let{className:a,...t}=e;return(0,l.jsx)("th",{"data-slot":"table-head",className:(0,s.cn)("h-10 px-4 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",a),...t})}function d(e){let{className:a,...t}=e;return(0,l.jsx)("td",{"data-slot":"table-cell",className:(0,s.cn)("p-4 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",a),...t})}},48995:(e,a,t)=>{"use strict";t.d(a,{A:()=>l});let l=(0,t(17963).A)("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]])},50546:(e,a,t)=>{"use strict";t.d(a,{A:()=>o});var l=t(37876),s=t(59435),n=t(28249),r=t(41354),i=t(2173);let o=e=>{let{value:a,onChange:t,placeholder:o="Search...",className:c,autoFocus:d}=e;return(0,l.jsxs)("div",{className:"relative flex-1",children:[(0,l.jsx)(s.A,{className:"pointer-events-none absolute top-1/2 left-3 size-5 -translate-y-1/2 text-primary-text",strokeWidth:1.5}),(0,l.jsx)(r.p,{value:a,onChange:e=>t(e.target.value),placeholder:o,autoFocus:d,className:(0,i.cn)("h-12 rounded-lg border-muted bg-white px-10 placeholder:text-secondary-text",c)}),a&&(0,l.jsx)("button",{onClick:()=>t(""),"aria-label":"Clear search",className:"absolute right-4 inset-y-0 pt-1 text-primary-text transition-opacity hover:opacity-70",children:(0,l.jsx)(n.A,{className:"size-4"})})]})}},52010:(e,a,t)=>{"use strict";t.d(a,{A:()=>y});var l=t(37876),s=t(93293),n=t(2173),r=t(3173);t(14232);var i=t(9552),o=t(29053),c=t(38724),d=t(15338),u=t(48230),m=t.n(u);function h(e){let{className:a,...t}=e;return(0,l.jsx)("nav",{role:"navigation","aria-label":"pagination","data-slot":"pagination",className:(0,n.cn)("mx-auto flex w-full justify-center",a),...t})}function x(e){let{className:a,...t}=e;return(0,l.jsx)("ul",{"data-slot":"pagination-content",className:(0,n.cn)("flex flex-row items-center gap-1",a),...t})}function p(e){let{...a}=e;return(0,l.jsx)("li",{"data-slot":"pagination-item",...a})}function f(e){let{className:a,isActive:t,size:s="icon",...r}=e;return(0,l.jsx)(m(),{"aria-current":t?"page":void 0,"data-slot":"pagination-link","data-active":t,className:(0,n.cn)((0,d.r)({variant:t?"outline":"ghost",size:s}),"text-primary-text",a),...r})}function b(e){let{className:a,...t}=e;return(0,l.jsx)(f,{"aria-label":"Go to previous page",size:"icon",className:(0,n.cn)(a),...t,children:(0,l.jsx)(i.A,{className:"size-4"})})}function g(e){let{className:a,...t}=e;return(0,l.jsx)(f,{"aria-label":"Go to next page",size:"icon",className:(0,n.cn)(a),...t,children:(0,l.jsx)(o.A,{className:"size-4"})})}function v(e){let{className:a,...t}=e;return(0,l.jsxs)("span",{"aria-hidden":!0,"data-slot":"pagination-ellipsis",className:(0,n.cn)("flex size-9 items-center justify-center",a),...t,children:[(0,l.jsx)(c.A,{className:"size-4"}),(0,l.jsx)("span",{className:"sr-only",children:"More pages"})]})}let j=[10,25,50,100].map(e=>({value:String(e),label:String(e)}));function y(e){let{currentPage:a,totalPages:t,perPage:i,onPageChange:o,onPerPageChange:c,variant:d="default"}=e,u=(0,r.al)(),m=!u&&t<=5||u&&t<=3?Array.from({length:t},(e,a)=>a+1):a<=2?[1,2,"ellipsis",t]:a>=t-1?[1,"ellipsis",t-1,t]:[1,"ellipsis",a,"ellipsis",t],y="embedded"===d;return(0,l.jsxs)("div",{className:(0,n.cn)("flex flex-wrap items-center justify-end gap-3",y?"px-0 py-1":"mt-auto px-4 md:px-6",!y&&u&&"f
1ixed inset-x-0 bottom-0 z-20 justify-between bg-white py-2 shadow-2xl"),children:[(0,l.jsx)(s.A,{value:String(i),label:u?void 0:"Rows per page",onValueChange:e=>c(Number(e)),options:j,triggerClassName:"h-10 rounded-md border-border bg-background text-sm font-medium shadow-none"}),(0,l.jsx)(h,{className:"mx-0 w-auto",children:(0,l.jsxs)(x,{className:"h-10 flex-wrap justify-end gap-1",children:[(0,l.jsx)(p,{children:(0,l.jsx)(b,{href:"#","aria-disabled":a<=1,className:(0,n.cn)("size-9 cursor-pointer rounded-md border-0 shadow-none",a<=1&&"pointer-events-none opacity-50"),onClick:e=>{e.preventDefault(),a>1&&o(a-1)}})}),m.map((e,t)=>"ellipsis"===e?(0,l.jsx)(p,{children:(0,l.jsx)(v,{className:(0,n.cn)(u?"size-7":"size-9","text-muted-foreground")})},"ellipsis-".concat(t)):(0,l.jsx)(p,{children:(0,l.jsx)(f,{href:"#",isActive:e===a,size:"icon",className:(0,n.cn)(u?"size-7":"size-9 rounded-md",e===a&&"border-primary bg-primary! text-primary-foreground hover:bg-primary/90!"),onClick:a=>{a.preventDefault(),o(e)},children:e})},e)),(0,l.jsx)(p,{children:(0,l.jsx)(g,{href:"#","aria-disabled":a>=t,className:(0,n.cn)("size-9 cursor-pointer rounded-md border-0 shadow-none",a>=t&&"pointer-events-none opacity-50"),onClick:e=>{e.preventDefault(),a<t&&o(a+1)}})})]})})]})}},57117:(e,a,t)=>{"use strict";t.d(a,{A:()=>c});
1var l=t(37876),s=t(79622),n=t(48995),r=t(78353),i=t(15338),o=t(2173);function c(e){let{label:a,field:t,sortBy:c,sortOrder:d,onSort:u,align:m="left"}=e,h=c===t;return(0,l.jsxs)(i.$,{type:"button",variant:"ghost",className:(0,o.cn)("h-10 w-full max-w-none gap-1 rounded-none px-4! font-medium text-muted-foreground has-[>svg]:px-4!","right"===m?"justify-end":"justify-start"),onClick:()=>u(t),children:[a,h?"asc"===d?(0,l.jsx)(s.A,{className:"opacity-100"}):(0,l.jsx)(n.A,{className:"opacity-100"}):(0,l.jsx)(r.A,{className:"opacity-50"}),(0,l.jsx)("span",{className:"sr-only",children:h?"sorted ".concat(d):"sortable"})]})}},59435:(e,a,t)=>{"use strict";t.d(a,{A:()=>l});let l=(0,t(17963).A)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]])},59773:(e,a,t)=>{"use strict";t.d(a,{b:()=>i});var l=t(14232),s=t(66326),n=t(37876),r=l.forwardRef((e,a)=>(0,n.jsx)(s.sG.label,{...e,ref:a,onMouseDown:a=>{a.target.closest("button, input, select, textarea")||(e.onMouseDown?.(a),!a.defaultPrevented&&a.detail>1&&a.preventDefault())}}));r.displayName="Label";var i=r},62235:(e,a,t)=>{"use strict";t.d(a,{A:()=>i});var l=t(37876),s=t(64217),n=t(3173),r=t(2173);function i(e){let{title:a,description:t,searchSlot:i,actionSlot:o}=e,c=(0,n.al)();return(0,l.jsxs)("div",{className:(0,r.cn)("flex flex-col gap-4 border-b border-border bg-white p-4 md:flex-row md:items-center md:justify-between md:px-6 md:py-5",c&&"sticky top-24 z-10"),children:[(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsx)(s.A,{children:a}),t?(0,l.jsx)("p",{className:"m-0 mt-1 text-sm font-normal text-secondary-text",children:t}):null]}),c&&o]}),i||o?(0,l.jsxs)(l.Fragment,{children:[i,!c&&o]}):null]})}},64217:(e,a,t)=>{"use strict";t.d(a,{A:()=>i});var l=t(37876),s=t(49898),n=t(2173),r=t(9552);let i=e=>{let{children:a,title:t,withContainer:i=!1,containerClassName:o,className:c,backHref:d,backAs:u,backAriaLabel:m="Go back",onBackClick:h,BackIcon:x=r.A,rightContent:p}=e,f=null!=t?t:a,b=!!(d||h);return i?(0,l.jsx)("div",{className:(0,n.cn)("border-b border-border/60 p-4 md:p-6 bg-white",o),children:(0,l.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,l.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[b&&d?(0,l.jsx)(s.A,{href:d,as:u,className:"inline-flex size-8 items-center justify-center rounded-md text-muted-foreground hover:bg-secondary/80 hover:text-secondary-foreground","aria-label":m,children:(0,l.jsx)(x,{className:"size-5"})}):null,b&&!d&&h?(0,l.jsx)("button",{type:"button",onClick:h,"aria-label":m,className:"inline-flex size-8 items-center justify-center rounded-md text-muted-foreground hover:bg-secondary/80 hover:text-secondary-foreground",children:(0,l.jsx)(x,{className:"size-5"})}):null,(0,l.jsx)("h1",{className:(0,n.cn)("text-xl! xl:text-2xl! font-medium m-0! text-primary-text md:text-boho-black text-nowrap",c),children:f})]}),p?(0,l.jsx)("div",{className:"shrink-0",children:p}):null]})}):(0,l.jsx)("h2",{className:(0,n.cn)("text-xl! xl:text-2xl! font-medium m-0! text-primary-text md:text-boho-black text-nowrap",c),children:f})}},78353:(e,a,t)=>{"use strict";t.d(a,{A:()=>l});let l=(0,t(17963).A)("arrow-up-down",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]])},79622:(e,a,t)=>{"use strict";t.d(a,{A:()=>l});let l=(0,t(17963).A)("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]])},79758:(e,a,t)=>{"use strict";t.d(a,{A:()=>l});let l=(0,t(17963).A)("square-pen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]])},82622:(e,a,t)=>{"use strict";t.d(a,{A:()=>l});let l=(0,t(17963).A)("shield-off",[["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71",key:"1jlk70"}],["path",{d:"M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264",key:"18rp1v"}]])},86654:(e,a,t)=>{"use strict";t.d(a,{A:()=>l});let l=(0,t(17963).A)("grid-2x2",[["path",{d:"M12 3v18",key:"108xh3"}],["path",{d:"M3 12h18",key:"1i2n21"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}]])},87065:(e,a,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/eames/areas",function(){return t(32649)}])},90964:(e,a,t)=>{"use strict";t.d(a,{J:()=>c});
1var l=t(37876),s=t(14232),n=t(59773),r=t(47137),i=t(2173);let o=(0,r.F)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),c=s.forwardRef(function(e,a){let{className:t,...s}=e;return(0,l.jsx)(n.b,{ref:a,className:(0,i.cn)(o(),t),...s})});c.displayName=n.b.displayName},93293:(e,a,t)=>{"use strict";t.d(a,{A:()=>r});var l=t(37876),s=t(31383),n=t(2173);function r(e){let{value:a,onValueChange:t,options:r=[],placeholder:i="Select",disabled:o=!1,allowEmptyOption:c=!1,emptyOptionLabel:d="None",triggerClassName:u="h-11! w-full min-w-0",label:m,selectedLabelPrefix:h,contentProps:x,triggerId:p,triggerInvalid:f,triggerAriaDescribedBy:b,"aria-invalid":g}=e,v=a?r.find(e=>e.value===a):void 0,j=v&&h?"".concat(h," \xb7 ").concat(v.label):null==v?void 0:v.label;return(0,l.jsxs)(s.l6,{value:a,onValueChange:t,disabled:o,children:[m&&m,(0,l.jsx)(s.bq,{id:p,"aria-invalid":g,"aria-describedby":b,className:u,children:h?(0,l.jsx)("span",{"data-slot":"select-value",className:(0,n.cn)("flex min-w-0 flex-1 items-center justify-start overflow-hidden text-ellipsis whitespace-nowrap text-left",!a&&"text-secondary-text"),children:a?j:i}):(0,l.jsx)(s.yv,{placeholder:i})}),(0,l.jsxs)(s.gC,{...x,children:[c?(0,l.jsx)(s.eb,{value:"__empty__",children:d}):null,r.map(e=>(0,l.jsx)(s.eb,{value:e.value,children:e.label},e.value))]})]})}},93583:(e,a,t)=>{"use strict";t.d(a,{A:()=>n});var l=t(37876),s=t(82622);function n(e){let{message:a="Your user does not have permissions for this page"}=e;return(0,l.jsxs)("div",{className:"flex min-h-80 flex-col items-center justify-center gap-3 px-6 py-12 text-center text-muted-foreground",children:[(0,l.jsx)(s.A,{className:"size-10 text-muted-foreground/70","aria-hidden":!0}),(0,l.jsx)("p",{className:"text-base font-medium text-foreground",children:a})]})}}},e=>{e.O(0,[9143,3173,636,6593,8792],()=>e(e.s=87065)),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.