PageSourceSearch

https://pricelink.io/_next/static/chunks/2583-6578c633ce5042d7.js

js pricelink.io collected 2026-10-01 15:43:01 UTC 19,136 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2583],{44992:function(e,l,t){t.d(l,{R:function(){return n}});function n(e){return e&&"error"in e}},51196:function(e,l,t){t.r(l),t.d(l,{AdvancedFilters:function(){return ee}});var n=t(27573),s=t(7653);let a={"no-group":"Common",reviews:"Reviews",stock:"Stock",rank:"Rank",price:"Price",dimension:"Dimension",fee:"Fee",badge:"Badge"};function i(e){return e.reduce((e,l)=>{var t;let n=null!==(t=l.group)&&void 0!==t?t:"no-group";return e[n]||(e[n]=[]),e[n].push(l),e},{})}var r=t(71277);let o=(0,s.createContext)(void 0),d=()=>{let e=(0,s.useContext)(o);if(!e)throw Error("useAdvancedFilterContext must be used within AdvancedFilterProvider");return e},c=e=>{let{filters:l,filterStateContext:t,children:a}=e,[d,c]=(0,s.useState)([]),[u,m]=(0,s.useState)(!1);l.filter(e=>e.values instanceof Promise).forEach(e=>{l[l.findIndex(l=>l.displayName===e.displayName)].values=s.use(e.values)});let x=(0,r.mN)(),f=(0,r.jj)(),h=(0,s.useMemo)(()=>"list-products"===t?f:x,[t,x,f]),[v,p]=(0,s.useState)(!1),[j,g]=(0,s.useState)(null),[w,N]=(0,s.useState)("equals"),[b,y]=(0,s.useState)(""),[C,S]=(0,s.useState)("text"),[F,k]=(0,s.useState)([]),[M,D]=(0,s.useState)(),[Z,A]=(0,s.useState)(l.map(e=>e.displayName)),E=(0,s.useMemo)(()=>b.length?null==Z?void 0:Z.filter(e=>(null==e?void 0:e.includes("fixed"))||(null==e?void 0:e.toLowerCase().includes(b.toLowerCase()))):Z,[Z,b]),I=(0,s.useMemo)(()=>b.length?F.filter(e=>E.includes(e.label)):F,[F,E]),P=(0,s.useMemo)(()=>E?i(l.filter(e=>E.includes(e.displayName))):i(l),[l,E]);return(0,n.jsx)(o.Provider,{value:{filters:l,filterStateContext:t,filterGroups:P,navigation:d,setNavigation:c,isLoading:u,setIsLoading:m,filterState:h,open:v,setOpen:p,selectedField:j,setSelectedField:g,condition:w,setCondition:N,commandInput:b,setCommandInput:y,inputType:C,setInputType:S,rawItems:F,setRawItems:k,currentRawItem:M,setCurrentRawItem:D,items:Z,setItems:A,filteredItems:E,filteredRawItems:I},children:a})};var u=t(67968),m=t(95239),x=t(73957),f=t(75721),h=t(57124),v=t(5237);let p=e=>{let{item:l,onClick:t}=e;return(0,n.jsxs)(m.z,{onClick:()=>{t&&t()},className:"text-xs px-2 py-0 h-7 items-center",variant:"ghost",children:[l.label,(0,n.jsx)(v.Z,{className:"ml-2",size:14})]})},j=e=>{let{items:l,onBack:t}=e;return(0,n.jsx)("div",{className:"p-1 flex flex-col items-start",children:l.map((e,l)=>(0,n.jsx)(p,{item:e,onClick:()=>{e.callback&&e.callback(),t&&t(l)}},"adv-filter-nav-item-".concat(l)))})};var g=t(29986),w=t(87354),N=t(39416),b=t(31505);let y=(0,s.forwardRef)((e,l)=>{var t;let{filters:a,handleCommandClick:i,...r}=e,{filters:o,selectedField:c,condition:u,commandInput:m,filterState:f,setCommandInput:h,filteredItems:v,filteredRawItems:p}=d(),j=(0,s.useMemo)(()=>null!=a?a:o,[a,o]),y=(0,s.useRef)(null),C=(0,b.MG)({count:a?a.length:null!==(t=v.length)&&void 0!==t?t:1,getScrollElement:()=>y.current,estimateSize:()=>1e3}),S=C.getVirtualItems(),F=(0,s.useCallback)(e=>{if(a){var l;return null===(l=a.at(e))||void 0===l?void 0:l.displayName}return v.at(e)},[a,v]),k=(0,s.useCallback)(e=>a?a.at(e):p.at(e),[a,p]);return(0,n.jsxs)(x.CommandGroup,{ref:y,...r,children:[S.map((e,l)=>{var t;return(0,n.jsxs)(x.CommandItem,{onSelect:()=>i(F(e.index),k(e.index)),"data-index":e.index,ref:C.measureElement,children:[!c&&j.filter(l=>l.displayName===F(e.index)&&l.icon).map((l,t)=>(0,n.jsx)("div",{children:l.icon},"icon-".concat(e.key))),(0,n.jsx)(w.Z,{className:(0,g.cn)("mr-2 h-4 w-4",c&&f.filters.find(l=>l.value===F(e.index)&&u===l.condition)?"opacity-100":"opacity-0")}),null===(t=F(e.index))||void 0===t?void 0:t.replace('"',"“")]},e.key)}),c&&u&&!c.disableCustomValue&&(0===c.values.length||m.length>0)?(0,n.jsxs)(x.CommandItem,{value:"fixed",onSelect:()=>{i(m),h("")},children:[(0,n.jsx)(N.Z,{className:"mr-2 h-4 w-4"}),"Use Custom Value"]}):null]})});function C(){let{filters:e,navigation:l,setNavigation:t,isLoading:i,setIsLoading:o,filterGroups:c,filterState:v,open:p,setOpen:g,selectedField:w,setSelectedField:N,condition:b,setCondition:C,commandInput:S,setCommandInput:F,inputType:k,setInputType:M,setRawItems:D,currentRawItem:Z,setCurrentRawItem:A,setItems:E}=d(),I=(0,s.useRef)(null);(0,s.useEffect)(()=>{var l;w?b?(F(""),Z?(M("number"==typeof Z.value?"numeric":"text"),Z.children&&(D([...Z.children]),E(Z.children.map(e=>e.label)))):(M("number"==typeof w.value?"numeric":"text"),D([...w.values].filter(e=>null!==e)),E(w.values.map(e=>e?"object"==typeof e?e.label:e:null)))):(F(""),E(w.conditions.map(e=>r.vK[e]))):E(e.map(e=>e.displayName)),null===(l=I.current)||void 0===l||l.focus()},[w,e,b,Z]),(0,s.useEffect)(()=>{p?(o(!0),setTimeout(()=>{o(!1)},100)):(N(null),F(""),M("text"),A(void 0),D([]),t([]))},[p]),(0,s.useEffect)(()=>
1{if(!i){var e;null===(e=I.current)||void 0===e||e.focus()}},[i]);let P=(l,n)=>{if(!w){let n=e.find(e=>e.displayName===l)||null;n&&(n.conditions.length>1?C(null):C(n.conditions[0])),t(e=>[...e,{label:l,callback:()=>{N(null),C(null),D([]),A(void 0),F(""),M("text"),t([])}}]),N(n)}if(w){if(b){let a=e.find(e=>e.displayName===w.displayName);if(n){var s;(null==n?void 0:null===(s=n.children)||void 0===s?void 0:s.length)?(A(n),t(e=>e.length>2?[...e,{label:n.label,callback:()=>{F(""),A(n)}}]:[...e,{label:n.label,callback:()=>{F(""),A(void 0),D([]),E(w.values.map(e=>e?"object"==typeof e?e.label:e:null))}}])):(!a||a.values instanceof Promise||v.addFilter({...a,value:n,condition:b}),(null==a?void 0:a.quickFilter)?C(null):g(!1));return}if((null==a?void 0:a.quickFilter)?C(null):g(!1),a&&!(a.values instanceof Promise)){let e=a.values.filter(e=>"object"==typeof e&&null!==e).find(e=>e.label===l);v.addFilter({...a,value:e||l,condition:b})}}else{let e=Object.keys(r.vK).find(e=>r.vK[e]===l);e&&(t(e=>[...e,{label:l,callback:()=>{C(null),F(""),M("text"),A(void 0)}}]),C(e))}}},z=e=>"numeric"!==k?e:(null==w?void 0:w.allowDecimal)?e.replace(/[^0-9.]/g,"").replace(/(\..*)\./g,"$1"):e.replace(/[^0-9]/g,"");return(0,n.jsxs)("div",{className:"flex flex-row gap-x-2",children:[(0,n.jsxs)(u.Popover,{open:p,onOpenChange:g,children:[(0,n.jsx)(u.PopoverTrigger,{asChild:!0,children:(0,n.jsxs)(m.z,{variant:"outline",role:"combobox","aria-expanded":p,className:"w-[120px] justify-between",children:["Filter",i?(0,n.jsx)(f.Z,{className:"animate-spin ml-2 h-4 w-4 shrink-0 opacity-50"}):(0,n.jsx)(h.Z,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,n.jsx)(u.PopoverContent,{className:"w-full p-0",children:!i&&(0,n.jsxs)(x.Command,{shouldFilter:!1,children:[(0,n.jsx)(x.CommandInput,{value:S,onInput:e=>F(z(e.target.value)),ref:I,placeholder:w?b?"Enter value":"Search condition":"Search fields..."}),(0,n.jsxs)(x.CommandList,{children:[(0,n.jsx)(j,{items:l,onBack:e=>{t(l=>[...l.slice(0,e)])}}),w?(0,n.jsx)(y,{handleCommandClick:P}):Object.keys(c).map(e=>(0,n.jsx)(y,{filters:c[e],handleCommandClick:P,heading:e?a[e]:a["no-group"]},e)),(0,n.jsx)(x.CommandEmpty,{children:(0,n.jsx)(n.Fragment,{children:"No field found."})})]})]})})]}),v.filters.length>0&&(0,n.jsx)(m.z,{variant:"destructive",onClick:()=>v.clearFilters(),children:"Clear All"})]})}y.displayName="AdvancedFilterGroup";var S=t(75848),F=t(6991),k=t(85107),M=t(38983),D=t(10997),Z=t(95194),A=t(21521);t(43503);var E=t(99976),I=(0,E.$)("9368c10f2853dbfcefeb519c4f18cf1f2b03ee0e"),P=(0,E.$)("c370439c57f64f232226417b9d572e8aeeb69c0b"),z=(0,E.$)("6adcdd965a7d4aed6fc7bf0f41d090f2016f2697"),O=t(5068),T=t(44992);let L=(0,s.createContext)(void 0),R=e=>{let{children:l}=e,{data:t,error:s,isLoading:a,refetch:i}=(0,O.a)({queryKey:["saved-filters"],queryFn:async()=>P(),refetchOnMount:!0,refetchInterval:3e5,staleTime:3e5,refetchOnWindowFocus:!1,placeholderData:e=>(null==e?void 0:e.data)?e:{data:[]}}),r=[];return(0,T.R)(t)||(r=(null==t?void 0:t.data)||[]),(0,n.jsx)(L.Provider,{value:{refetch:i,data:r,error:(null==s?void 0:s.message)||(null==t?void 0:t.error),isLoading:a},children:l})},q=()=>{let e=(0,s.useContext)(L);if(!e)throw Error("useSavedFilters must be used within a SavedFiltersProvider");return e};function V(){return(0,n.jsxs)("div",{className:"flex items-center space-x-3 px-2 py-1.5",children:[(0,n.jsx)(k.O,{className:"h-4 w-4 rounded"}),(0,n.jsxs)("div",{className:"flex-1 space-y-1",children:[(0,n.jsx)(k.O,{className:"h-4 w-[120px]"}),(0,n.jsx)(k.O,{className:"h-3 w-[80px]"})]})]})}function K(e){let{filters:l,isLoading:t,onSelect:a,error:i,selectedFilterId:r,placeholder:o="Select saved filter..."}=e,[d,c]=(0,s.useState)(!1),f=l.find(e=>e.id===r),{ConfirmDeleteModal:v,setShowConfirmModal:p}=(0,Z.t)(),[j,g]=(0,s.useState)(),{refetch:w}=q();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(v,{onConfirm:async()=>{await (0,A.Z)(z(null==j?void 0:j.id)),await w()},description:"You are about to delete the saved filter ".concat(null==j?void 0:j.name)}),(0,n.jsxs)(u.Popover,{open:d,onOpenChange:c,children:[(0,n.jsx)(u.PopoverTrigger,{asChild:!0,children:(0,n.jsxs)(m.z,{variant:"outline",role:"combobox","aria-expanded":d,className:"w-[280px] justify-between",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(h.Z,{className:"h-4 w-4 text-muted-foreground"}),(0,n.jsx)("span",{className:"truncate",children:f?f.name:o})]}),(0,n.jsx)(M.Z,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,n.jsx)(u.PopoverContent,{className:"w-[280px] p-0",align:"start",children:(0,n.jsxs)(x.Command,{children:[(0,n.jsx)(x.CommandInput,{placeholder:"Search f
1ilters..."}),(0,n.jsx)(x.CommandList,{children:t?(0,n.jsx)("div",{className:"p-2 space-y-2",children:Array.from({length:3}).map((e,l)=>(0,n.jsx)(V,{},l))}):i?(0,n.jsx)("div",{className:"p-4 text-center text-sm text-muted-foreground",children:i}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(x.CommandEmpty,{children:"No filters found."}),(0,n.jsx)(x.CommandGroup,{children:l.map(e=>(0,n.jsxs)(x.CommandItem,{value:e.name,onSelect:()=>{null==a||a(e),c(!1)},className:"flex items-center justify-between py-2",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[(0,n.jsx)(m.z,{size:"icon",variant:"outline",className:"h-5 w-5",onClick:l=>{g(e),p(!0),l.stopPropagation()},children:(0,n.jsx)(D.Z,{className:"h-3 w-3 text-destructive"})}),(0,n.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,n.jsx)("div",{className:"font-medium truncate",children:e.name}),(0,n.jsx)("div",{className:"text-xs text-muted-foreground",children:function(e){let l=new Date,t=Math.floor((l.getTime()-e.getTime())/1e3);return t<60?"Just now":t<3600?"".concat(Math.floor(t/60),"m ago"):t<86400?"".concat(Math.floor(t/3600),"h ago"):t<604800?"".concat(Math.floor(t/86400),"d ago"):e.toLocaleDateString("en-US",{month:"short",day:"numeric",year:e.getFullYear()!==l.getFullYear()?"numeric":void 0})}(e.updatedAt||e.createdAt||new Date)})]})]}),(0,n.jsxs)("div",{className:"text-xs text-muted-foreground ml-2",children:[e.filters.length," filter",1!==e.filters.length?"s":""]})]},e.id))})]})})]})})]})]})}var G=t(84537),W=t(58489),Y=t(72659),$=t(60127),_=t(15574),U=t(93351),B=t(18113),H=t(41270);let J=H.z.object({name:H.z.string().max(100).min(1),filters:H.z.any()});function Q(e){let{show:l,setShow:t,savedFilters:a,defaultName:i}=e,{refetch:o}=q(),[d,c]=(0,s.useState)(""),u=async e=>{x.trigger(),await (0,A.Z)(I(e.filters.map(e=>({...e,icon:void 0})),e.name)).then(()=>o()),t(!1)},{filters:m}=(0,r.mN)(),x=(0,U.cI)({resolver:(0,B.F)(J),defaultValues:{name:i,filters:m}});return(0,n.jsx)(Y.u,{showModal:l,setShowModal:t,className:"gap-0 sm:max-w-[425px]",children:(0,n.jsxs)(G.Zb,{children:[(0,n.jsxs)(G.Ol,{children:[(0,n.jsx)(G.ll,{children:"Search save"}),(0,n.jsx)(G.SZ,{children:"Here you can save your filter collections"})]}),(0,n.jsx)(G.aY,{className:"w-full",children:(0,n.jsx)(W.Form,{...x,children:(0,n.jsxs)("form",{onSubmit:x.handleSubmit(u),children:[(0,n.jsx)("div",{className:"grid gap-y-4 py-4",children:(0,n.jsx)(W.FormField,{control:x.control,name:"name",render:e=>{let{field:l}=e;return(0,n.jsxs)(W.FormItem,{children:[(0,n.jsx)(W.FormLabel,{children:"Name "}),(0,n.jsx)($.I,{...l,value:l.value,className:"w-full"}),(0,n.jsx)(W.FormMessage,{})]})}})}),d&&(0,n.jsx)("p",{className:"text-sm text-red-500 mb-4",children:d}),(0,n.jsx)(G.eW,{className:"w-full px-0 pb-0 mb-0 flex-col gap-y-4",children:(0,n.jsx)(_.Z,{type:"submit",className:"w-full",loading:x.formState.isSubmitting,children:"Save filters"})})]})})})]})})}function X(){let{filters:e,navigation:l,setNavigation:t,isLoading:a,setIsLoading:i,filterGroups:r,filterState:o,open:c,setOpen:u,selectedField:m,setSelectedField:x,condition:f,setCondition:h,commandInput:v,setCommandInput:p,inputType:j,setInputType:g,setRawItems:w,currentRawItem:N,setCurrentRawItem:b,setItems:y}=d(),C=(0,s.useMemo)(()=>o.filters.length,[o]),{data:k,isLoading:M,error:D}=q(),{FilterSaveModal:Z,setShowFilterSaveModal:A}=function(){let[e,l]=(0,s.useState)(!1),t=(0,s.useCallback)(t=>(0,n.jsx)(Q,{defaultName:t.defaultName,savedFilters:t.savedFilters,show:e,setShow:l}),[e,l]);return(0,s.useMemo)(()=>({setShowFilterSaveModal:l,FilterSaveModal:t}),[l,t])}(),[E,I]=(0,s.useState)(void 0);return(0,s.useEffect)(()=>{0===o.filters.length&&I(void 0)},[o.filters]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(Z,{savedFilters:k,defaultName:null==E?void 0:E.name}),(0,n.jsx)(K,{selectedFilterId:null==E?void 0:E.id,filters:k,isLoading:M,error:D,onSelect:l=>{let t=l.filters.map(l=>({...e.find(e=>l.field===e.field),...l}));o.setFilters(t),I(l)}}),(0,n.jsxs)(S.Z,{disabled:C<1,className:"flex space-x-1",onClick:()=>A(!0),children:[(0,n.jsxs)("span",{children:["Save (",C,")"]}),(0,n.jsx)(F.Z,{className:"w-4 h-4"})]})]})}let ee=e=>{let{filters:l,filterStateContext:t}=e;return(0,n.jsx)(c,{filters:l,filterStateContext:t,children:(0,n.jsx)(R,{children:(0,n.jsxs)("div",{className:"flex w-full items-center pt-3 gap-x-2",children:[(0,n.jsx)(C,{}),(0,n.jsx)(X,{})]})})})}},13864:function(e,l,t){t.r(l),t.d(l,{FilterCard:function(){return x}});var n=t(27573),s=t(7653),a=t(73957),i=t(95239),r=t(71277),o=t(38983),d=t(39416),c=t(10269),u=t(81092),m=t(29986);function x(e){let{filterValues:l}=e;l&&l.filter(e=>
1e.values instanceof Promise).forEach(e=>{l[l.findIndex(l=>l.displayName===e.displayName)].values=s.use(e.values)});let t=(0,r.mN)(),[x,f]=(0,s.useState)({index:null,type:null}),[h,v]=(0,s.useState)(0),[p,j]=(0,s.useState)(0),g=(0,s.useRef)(null);(0,s.useEffect)(()=>{g.current&&(v(g.current.offsetWidth),j(g.current.clientWidth))},[]);let w=(e,l,n)=>{t.editFilter(e,l,n),f({index:null,type:null})},[N,b]=(0,s.useState)("");return(0,n.jsx)("div",{className:"grid grid-cols-1 xs:grid-cols-2 md:flex md:flex-row md:flex-wrap w-full gap-4 pt-2 relative",children:t.filters.map((e,s)=>{var v,p;return(0,n.jsxs)("div",{ref:g,className:"flex w-full xs:w-fit items-center border shadow-sm rounded-md text-sm max-w-[350px]",children:[(0,n.jsxs)("div",{className:"w-32 xs:w-fit px-3 text-xs sm:text-sm flex items-center gap-x-2 !leading-none",children:[e.icon,e.displayName]}),(0,n.jsxs)(u.DropdownMenu,{open:x.index===s&&"condition"===x.type,onOpenChange:e=>f(e?{index:s,type:"condition"}:{index:null,type:null}),children:[(0,n.jsx)(u.DropdownMenuTrigger,{asChild:!0,children:(0,n.jsx)("button",{className:"flex justify-center items-center px-1 border-l border-r text-center text-sm rounded-sm w-8 h-10 text-muted-foreground cursor-pointer",children:function(e){switch(e){case"equals":return"is";case"notEquals":return"not";case"gt":return">";case"lt":return"<";default:return""}}(e.condition)})}),(0,n.jsx)(u.DropdownMenuContent,{style:{width:"".concat(h,"px")},children:(0,n.jsxs)("div",{className:"p-2",children:[(0,n.jsx)("div",{className:"font-semibold mb-2",children:"Condition"}),null===(v=l.find(l=>l.field===e.field))||void 0===v?void 0:v.conditions.map(e=>(0,n.jsx)(u.DropdownMenuItem,{onSelect:()=>w(s,e),children:r.vK[e]},e))]})})]}),(0,n.jsxs)(u.DropdownMenu,{open:x.index===s&&"value"===x.type,onOpenChange:e=>f(e?{index:s,type:"value"}:{index:null,type:null}),children:[(0,n.jsx)(u.DropdownMenuTrigger,{asChild:!0,disabled:"Category"===e.displayName,children:(0,n.jsxs)("div",{className:"px-3 w-28 md:w-fit text-xs sm:text-sm flex items-center justify-between flex-grow cursor-pointer",children:[(0,n.jsx)("span",{children:"object"==typeof e.value?e.value.label:e.value}),(0,n.jsx)(o.Z,{className:(0,m.cn)("w-4 h-4 ml-2","Category"===e.displayName&&"hidden")})]})}),(0,n.jsx)(u.DropdownMenuContent,{className:"absolute left-0",style:{width:"200px"},children:(0,n.jsxs)(a.Command,{shouldFilter:!1,value:N,onChange:e=>b(e.target.value),children:[(0,n.jsx)(a.CommandInput,{placeholder:"Type a custom value..."}),(0,n.jsxs)(a.CommandList,{children:[(null==l?void 0:null===(p=l.find(l=>l.field===e.field))||void 0===p?void 0:p.values).filter(e=>null!=e&&e.toString().includes(N)).map(e=>(0,n.jsx)(a.CommandItem,{onSelect:()=>w(s,void 0,e),children:(null==e?void 0:e.label)?e.label:e},e)),!e.disableCustomValue&&(0,n.jsxs)(a.CommandItem,{value:"fixed",onSelect:()=>{w(s,void 0,N),b("")},children:[(0,n.jsx)(d.Z,{className:"mr-2 h-4 w-4"}),"Use Custom Value"]})]})]})})]}),(0,n.jsx)(i.z,{onClick:()=>t.removeFilter(e),variant:"ghost",className:"px-3 text-sm border-l rounded-none flex-shrink",children:(0,n.jsx)(c.Z,{className:"w-4 h-4 text-destructive"})})]},s)})})}},95194:function(e,l,t){t.d(l,{t:function(){return d}});var n=t(27573),s=t(7653),a=t(46929),i=t(15574),r=t(29986);function o(e){let{onConfirm:l,showConfirmModal:t,setShowConfirmModal:o,description:d,confirmText:c}=e,[u,m]=(0,s.useState)(!1);return(0,n.jsx)(a.AlertDialog,{open:t,onOpenChange:o,children:(0,n.jsxs)(a.AlertDialogContent,{className:(0,r.cn)("max-w-[650px]"),children:[(0,n.jsxs)(a.AlertDialogHeader,{children:[(0,n.jsx)(a.AlertDialogTitle,{children:"Are you absolutely sure?"}),(0,n.jsx)(a.AlertDialogDescription,{children:d})]}),(0,n.jsxs)(a.AlertDialogFooter,{children:[(0,n.jsx)(a.AlertDialogCancel,{children:"Cancel"}),(0,n.jsx)(i.Z,{className:"bg-red-500 hover:bg-red-600",loading:u,onClick:async()=>{m(!0),await l(),o(!1),m(!1)},children:c||"Delete"})]})]})})}function d(){let[e,l]=(0,s.useState)(!1),t=(0,s.useCallback)(t=>{let{onConfirm:s,description:a,confirmText:i}=t;return(0,n.jsx)(o,{confirmText:i,onConfirm:s,showConfirmModal:e,setShowConfirmModal:l,description:a})},[e,l]);return(0,s.useMemo)(()=>({setShowConfirmModal:l,ConfirmDeleteModal:t}),[l,t])}},15574:function(e,l,t){t.d(l,{Z:function(){return i}});var n=t(27573),s=t(95239),a=t(49877);function i(e){let{loading:l,disabled:t}=e;return(0,n.jsxs)(s.z,{...e,loading:void 0,disabled:t||l,children:[!l&&e.children,l&&(0,n.jsx)(a.P.spinner,{className:"animate-spin"})]})}t(7653)},21521:function(e,l,t){t.d(l,{Z:function(){return s}});var n=t(85569);async function s(e,l,t){try{let t=await e;if(t.error)throw t.error;return(0,n.Am)({title:l||"Success",description:t.success}),t}catch(e){(0,n.Am)({title:t||"Error",description:e.toString(),variant:"destructive"})}}},75848:function(e,l,t){t.d(l,{Z:function(){return i}});var n=t(27573),s=t(95239),a=t(49877);function i(e){let{loading:l,disabled:t}=e;return(0,n.jsxs)(s.z,{...e,loading:void 0,disabled:t||l,children:[!l&&e.children,l&&(0,n.jsx)(a.P.spinner,{className:"animate-spin"})]})}}}]);

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.