1try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="2a72ae30-c18b-4c5b-b1f5-0b2202386e56",e._sentryDebugIdIdentifier="sentry-dbid-2a72ae30-c18b-4c5b-b1f5-0b2202386e56")}()}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6240],{30046:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/hr/[tenant]/e-signatures/requests/[id]",function(){return n(61310)}])},61310:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return W}});var s=n(52322),r=n(77590),a=n(75588),l=n(84475),i=n(5632),o=n(13980),c=n.n(o),d=n(2784),u=n(1973),m=n(47023),g=n(79663),p=n(65405),f=n(51634),x=n(65232),h=n(17047),y=n(74618),b=n(76467),v=n(36728),j=n(2369),N=n(92942),w=n(12524),C=n.n(w),_=n(60315),k=n(16526);let Z={created:{icon:j.cwv,color:"text-blue-500",bgColor:"bg-blue-50",label:"Request Created"},sent:{icon:j.XCy,color:"text-green-500",bgColor:"bg-green-50",label:"Request Sent"},viewed:{icon:j.Mdf,color:"text-gray-500",bgColor:"bg-gray-50",label:"Document Viewed"},signed:{icon:j.LEp,color:"text-green-500",bgColor:"bg-green-50",label:"Document Signed"},declined:{icon:j.NBC,color:"text-red-500",bgColor:"bg-red-50",label:"Document Declined"},reminder_sent:{icon:j.FU$,color:"text-yellow-500",bgColor:"bg-yellow-50",label:"Reminder Sent"},completed:{icon:j.LEp,color:"text-green-500",bgColor:"bg-green-50",label:"Request Completed"},cancelled:{icon:j.NBC,color:"text-gray-500",bgColor:"bg-gray-50",label:"Request Cancelled"},expired:{icon:j.SZw,color:"text-orange-500",bgColor:"bg-orange-50",label:"Request Expired"},otp_verified:{icon:j.LEp,color:"text-green-500",bgColor:"bg-green-50",label:"OTP Verified"},downloaded:{icon:j.q7m,color:"text-green-500",bgColor:"bg-green-50",label:"Document Downloaded"}},q=e=>{var t,n;let{event:a,isLast:l}=e,i=a.action||a.type,o=Z[i]||{icon:j.ILF,color:"text-gray-500",bgColor:"bg-gray-50",label:i},c=o.label||a.action_label,d=(null===(t=a.user)||void 0===t?void 0:t.name)||a.actor_name,u=(null===(n=a.user)||void 0===n?void 0:n.uid)||a.actor_email,m=a.relative_time||(e=>{if(!e)return"";try{return(0,k.Z)(new Date(e),{addSuffix:!0})}catch(e){return""}})(a.timestamp);return(0,s.jsxs)("div",{className:"flex gap-4",children:[(0,s.jsxs)("div",{className:"flex flex-col items-center",children:[(0,s.jsx)("div",{className:C()("w-8 h-8 rounded-full flex items-center justify-center",o.bgColor),children:(0,s.jsx)(N.FontAwesomeIcon,{className:C()("text-sm",o.color),icon:o.icon})}),!l&&(0,s.jsx)("div",{className:"w-0.5 h-full min-h-[24px] bg-gray-200 my-1"})]}),(0,s.jsxs)("div",{className:"flex-1 pb-6",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("p",{className:"font-medium text-gray-900",children:c}),(0,s.jsx)("span",{className:"text-xs text-gray-400",title:(e=>{if(!e)return"Unknown time";try{return(0,_.default)(new Date(e),"MMM d, yyyy h:mm a")}catch(e){return"Unknown time"}})(a.timestamp),children:m})]}),!!(d||u)&&(0,s.jsx)("p",{className:"text-sm text-gray-600 mt-1",children:d||u}),!!a.details&&(0,s.jsx)("div",{className:"flex flex-col gap-1",children:"string"==typeof a.details?(0,s.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:a.details}):(0,s.jsxs)(s.Fragment,{children:[!!a.details.title&&(0,s.jsxs)("p",{className:"text-sm text-gray-500 mt-1",children:["Title: ",a.details.title]}),!!a.details.signers_count&&(0,s.jsxs)("p",{className:"text-sm text-gray-500",children:["Signers: ",a.details.signers_count]}),!!a.details.external_email&&(0,s.jsxs)("p",{className:"text-sm text-gray-500 mt-1",children:["Email: ",a.details.external_email]}),!!a.details.external_name&&(0,s.jsxs)("p",{className:"text-sm text-gray-500 mt-1",children:["Name:",a.details.external_name]}),!!a.details.signer_role&&(0,s.jsxs)("p",{className:"text-sm text-gray-500 mt-1",children:["Role: ",(0,r.bV)(a.details.signer_role)]})]})}),!!(a.ip_address||a.location||a.user_agent)&&(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3 text-xs text-gray-400 mt-2",children:[!!a.ip_address&&(0,s.jsxs)("span",{children:["IP: ",a.ip_address]}),!!a.location&&(0,s.jsx)("span",{children:a.location}),!!a.user_agent&&(0,s.jsx)("span",{className:"truncate max-w-[200px]",title:a.user_agent,children:a.user_agent})]})]})]})};q.propTypes={event:c().shape({id:c().oneOfType([c().string,c().number]),timestamp:c().string,ip_address:c().string,type:c().string,actor_name:c().string,actor_email:c().string,location:c().string,action:c().string,action_label:c().string,relative_time:c().string,user_agent:c().string,user:c().shape({uid:c().string,name:c().string}),details:c().oneOfType([c().string,c().shape({title:c().string,template_id:c().number,signers_count:c().number})])}).isRequired,isLast:c().bool};let E=e=>{let{events:t=[],showTimestamps:n=!0,className:r}=e;if(0===t.length)return(0,s.jsxs)("div",{className:"text-center py-8 text-gray-500",children:[(0,s.jsx)(N.FontAwesomeIcon,{className:"text-4xl text-gray-300 mb-3",icon:j.SZw}),(0,s.jsx)("p",{children:"No activity recorded yet"})]});let a=[...t].sort((e,t)=>
1e.timestamp&&t.timestamp?new Date(t.timestamp)-new Date(e.timestamp):0);return(0,s.jsxs)("div",{className:r,children:[(0,s.jsx)("h3",{className:"text-sm font-semibold text-gray-900 mb-4",children:"Activity Log"}),(0,s.jsx)("div",{className:"space-y-0",children:a.map((e,t)=>{let n=e.action||e.type;return(0,s.jsx)(q,{event:e,isLast:t===a.length-1},e.id||"".concat(n,"-").concat(e.timestamp,"-").concat(t))})})]})};E.propTypes={events:c().arrayOf(c().shape({id:c().oneOfType([c().string,c().number]),timestamp:c().string,ip_address:c().string,type:c().string,actor_name:c().string,actor_email:c().string,location:c().string,action:c().string,action_label:c().string,relative_time:c().string,user_agent:c().string,user:c().shape({uid:c().string,name:c().string}),details:c().oneOfType([c().string,c().shape({title:c().string,template_id:c().number,signers_count:c().number})])})),showTimestamps:c().bool,className:c().string};var O=n(54087),I=n(91824),T=n(71429),R=n(59417),S=n(99603),L=n(62202),D=n(71896),A=n(23825);let U={draft:"draft",pending:"pending",signed:"completed",declined:"declined",waiting:"draft"},F=e=>{let{signer:t,order:n,isSequential:r,canRemind:a,requestId:l}=e,[i,o]=(0,d.useState)(!1),c=t.signer,u=(0,v.$e)({onSuccess:()=>{L.default.success("Reminder sent successfully!"),o(!1)},onError:e=>{var t,n;let s=(null===(n=e.response)||void 0===n?void 0:null===(t=n.data)||void 0===t?void 0:t.message)||e.message||"Failed to send reminder";L.default.error(s),o(!1)}}),g=(0,d.useCallback)(()=>{o(!0),u.mutate({requestId:l,signerId:(null==c?void 0:c.uid)||t.srid||t.id})},[u,l,null==c?void 0:c.uid,t.srid,t.id]),p=t.status||"pending",f=e=>{if(!e)return null;try{return(0,_.default)(new Date(e),"MMM d, yyyy h:mm a")}catch(e){return null}};return(0,s.jsxs)("div",{className:"flex items-center gap-4 p-4 border-b border-gray-100 last:border-b-0",children:[!!r&&(0,s.jsx)(b.Z,{as:"span",className:"w-8 h-8 bg-gray-100 rounded-full flex items-center justify-center",size:"text-sm",weight:"font-medium",children:n}),(0,s.jsx)(D.Z,{name:(null==c?void 0:c.name)||t.external_name,size:"md",user:c}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsx)(b.Z,{className:"truncate",color:"text-gray-900",variant:"body",weight:"font-medium",children:(null==c?void 0:c.name)||t.external_name||"Unknown User"}),(0,s.jsx)(b.Z,{className:"truncate",variant:"bodySmall",children:(null==c?void 0:c.email)||t.external_email}),!!t.signed_at&&(0,s.jsxs)(b.Z,{className:"mt-1",color:"text-green-600",variant:"caption",children:["Signed on ",f(t.signed_at)]}),!!t.declined_at&&(0,s.jsxs)("div",{className:"mt-1",children:[(0,s.jsxs)(b.Z,{color:"text-red-600",variant:"caption",children:["Declined on ",f(t.declined_at)]}),!!t.decline_reason&&(0,s.jsxs)(b.Z,{className:"mt-0.5",variant:"caption",children:["Reason: ",t.decline_reason]})]}),!!t.last_reminded_at&&(0,s.jsxs)(b.Z,{className:"mt-1",color:"text-gray-400",variant:"caption",children:["Last reminded"," ",(0,k.Z)(new Date(t.last_reminded_at),{addSuffix:!0})]})]}),(0,s.jsx)(T.Z,{size:"sm",status:U[p]||"pending"}),!!(a&&("pending"===p||"waiting"===p))&&(0,s.jsx)(m.Z,{beforeIcon:(0,s.jsx)(S.G,{className:"mr-1",icon:R.FU$}),design:"secondary",disabled:i,loading:i,onClick:g,size:"sm",children:"Remind"})]})};F.propTypes={signer:c().shape({id:c().oneOfType([c().string,c().number]).isRequired,name:c().string,email:c().string,status:c().string,signed_at:c().string,declined_at:c().string,decline_reason:c().string,last_reminded_at:c().string}).isRequired,order:c().number,isSequential:c().bool,canRemind:c().bool,requestId:c().oneOfType([c().string,c().number])};let P=e=>{let{signers:t=[],requestId:n,signingOrder:r="parallel",canManage:a=!1,isFetching:l=!1}=e,i="sequential"===r;if(0===t.length)return(0,s.jsx)(u.Z,{description:"No signers have been added to this request.",design:"wrapped",icon:R.ILF,message:"No signers"});let o=t.filter(e=>"signed"===e.status).length,c=t.filter(e=>"pending"===e.status||!e.status).length,d=t.filter(e=>"declined"===e.status).length;return(0,s.jsxs)(A.Z,{isFetching:l,children:[(0,s.jsxs)("div",{className:"flex items-center gap-4 px-4 py-3 bg-gray-50 border-b border-gray-100",children:[(0,s.jsxs)(b.Z,{as:"span",color:"text-gray-600",variant:"bodySmall",children:[(0,s.jsx)("strong",{children:t.length})," signer",1!==t.length?"s":""]}),(0,s.jsxs)("div",{className:"flex items-center gap-3 text-xs",children:[(0,s.jsxs)(b.Z,{as:"span",className:"flex items-center gap-1",color:"text-green-600",variant:"caption",children:[(0,s.jsx)("span",{className:"w-2 h-2 rounded-full bg-green-500"}),o," signed"]}),(0,s.jsxs)(b.Z,{as:"span",className:"flex items-center gap-1",color:"text-yellow-600",variant:"caption",children:[(0,s.jsx)("span",{className:"w-2 h-2 rounded-full bg-yellow-500"}),c," pending"]}),d>0&&(0,s.jsxs)(b.Z,{as:"span",className:"flex items-center gap-1",color:"text-red-600",variant:"caption",children:[(0,s.jsx)("span",{className:"w-2 h-2 rounded-full bg-red-500"}),d," declined"]})]}),!!i&&(0,s.jsx)(b.Z,{as:"span",className:"ml-auto",color:"text-gray-400",variant:"caption",children:"Sequential signing order"})]}),(0,s.jsx)("div",{children:t.map((e,t)=>(0,s.jsx)(F,{canRemind:a,isSequential:i,order:t+1,requestId:n,signer:e},e.id))})]})};P.propTypes={signers:c().arrayOf(c().shape({id:c().oneOfType([c().string,c().number]).isRequired,name:c().string,email:c().string,
1status:c().string})),requestId:c().oneOfType([c().string,c().number]),signingOrder:c().oneOf(["parallel","sequential"]),canManage:c().bool,isFetching:c().bool};let B=e=>{var t;let{requestId:n,onBack:r}=e,{data:a,isLoading:l,isFetching:i,error:o}=(0,v.Zw)({requestId:n,enabled:!!n,includeDocumentUrl:!0}),{data:c=[]}=(0,v.zN)({requestId:n,enabled:!!n}),j=(0,v.PL)({onSuccess:()=>{L.default.success("Request cancelled successfully")},onError:e=>{L.default.error(e.message||"Failed to cancel request")}}),N=(0,v.nu)({onSuccess:e=>{let t=window.URL.createObjectURL(e),n=document.createElement("a");n.href=t,n.download="".concat((null==a?void 0:a.title)||"document","-signed.pdf"),document.body.appendChild(n),n.click(),document.body.removeChild(n),window.URL.revokeObjectURL(t),L.default.success("Document downloaded")},onError:e=>{L.default.error(e.message||"Failed to download document")}}),w=(0,v.Od)({onSuccess:()=>{L.default.success("Signature request sent successfully")},onError:e=>{L.default.error(e.message||"Failed to send request")}}),C=(0,d.useCallback)(()=>{(0,h.Z)({handler:async()=>{await j.mutateAsync({requestId:n,reason:"Cancelled by admin"})},title:"Cancel Signature Request",message:"Are you sure you want to cancel this signature request? All signers will be notified that the request has been cancelled.",confirmButtonText:"Cancel Request",cancelButtonText:"Keep Request"})},[j,n]),k=(0,d.useCallback)(()=>{N.mutate({requestId:n})},[N,n]),Z=(0,d.useCallback)(()=>{var e;(0,h.Z)({handler:async()=>{await w.mutateAsync({requestId:n})},title:"Send Signature Request",message:'Are you sure you want to send "'.concat((null==a?void 0:a.title)||"this request",'"? ').concat((null==a?void 0:null===(e=a.signers)||void 0===e?void 0:e.length)||0," signer(s) will be notified to sign the document."),confirmButtonText:"Send Request",cancelButtonText:"Cancel"})},[w,n,null==a?void 0:a.title,null==a?void 0:null===(t=a.signers)||void 0===t?void 0:t.length]);if(l||o||!a)return(0,s.jsx)(x.ZP,{children:(0,s.jsx)(x.eW,{children:(0,s.jsx)(u.Z,{action:o?(0,s.jsx)(m.Z,{onClick:r,children:"Go Back"}):void 0,description:o?"The request could not be found or you don't have permission to access it.":void 0,design:"wrapped",isError:!!o,isLoading:l,message:l?"Loading request details...":o?"Failed to load request":void 0})})});let q="draft"===a.status,D=["draft","pending","partially_signed"].includes(a.status),A="completed"===a.status;return(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsx)(x.ZP,{children:(0,s.jsxs)(x.eW,{children:[(0,s.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-start sm:justify-between gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 mb-2",children:[(0,s.jsx)(b.Z,{variant:"heading2",children:a.title||"Untitled Request"}),(0,s.jsx)(T.Z,{status:a.status})]}),!!a.template_name&&(0,s.jsxs)(b.Z,{variant:"bodySmall",children:["Template: ",a.template_name]}),(0,s.jsxs)("div",{className:"flex items-center gap-4 mt-3",children:[(0,s.jsxs)(b.Z,{as:"span",variant:"caption",children:["Created: ",(e=>{if(!e)return"N/A";try{return(0,_.default)(new Date(e),"MMM d, yyyy h:mm a")}catch(e){return"N/A"}})(a.created_at)]}),!!(a.priority&&"normal"!==a.priority)&&(0,s.jsx)(I.Z,{priority:a.priority,size:"sm"}),!!a.expires_at&&(0,s.jsx)(O.Z,{expiresAt:a.expires_at,size:"sm"})]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[!!A&&(0,s.jsx)(m.Z,{beforeIcon:(0,s.jsx)(S.G,{className:"mr-2",icon:R.q7m}),design:"primary",loading:N.isPending,onClick:k,children:"Download"}),!!q&&(0,s.jsx)(m.Z,{beforeIcon:(0,s.jsx)(S.G,{className:"mr-2",icon:R.XCy}),design:"primary",loading:w.isPending,onClick:Z,children:"Send Request"}),!!D&&(0,s.jsx)(m.Z,{beforeIcon:(0,s.jsx)(S.G,{className:"mr-2",icon:R.NBC}),design:"secondary",onClick:C,children:"Cancel Request"})]})]}),!!a.message&&(0,s.jsx)("div",{className:"mt-4 p-3 bg-gray-50 rounded-lg",children:(0,s.jsx)(b.Z,{variant:"bodySmall",children:a.message})})]})}),(0,s.jsx)(x.ZP,{className:"flex flex-col",children:(0,s.jsxs)(g.ZP,{syncWithUrl:!1,children:[(0,s.jsx)(p.Z,{label:"Signers"}),(0,s.jsx)(p.Z,{label:"Document"}),(0,s.jsx)(p.Z,{label:"Activity"}),(0,s.jsx)(f.Z,{children:(0,s.jsx)(P,{canManage:!0,isFetching:i,requestId:n,signers:a.signers||[],signingOrder:a.signing_order})}),(0,s.jsx)(f.Z,{children:(0,s.jsxs)(x.eW,{className:"flex flex-col h-full",children:[!!a.document_url&&(0,s.jsx)("iframe",{className:"w-full flex-1 border border-gray-200 rounded-lg min-h-[calc(100vh-360px)]",src:(0,y.Ld)(a.document_url),title:"Request Document"}),!a.document_url&&(0,s.jsx)(u.Z,{description:"The document preview is not available.",design:"wrapped",icon:R.cwv,message:"No document preview"})]})}),(0,s.jsx)(f.Z,{children:(0,s.jsxs)(x.eW,{children:[c.length>0&&(0,s.jsx)(E,{events:c}),0===c.length&&(0,s.jsx)(u.Z,{description:"No activity has been recorded for this request yet.",design:"wrapped",message:"No activity"})]})})]})})]})};B.propTypes={requestId:c().oneOfType([c().string,c().number]).isRequired,onBack:c().func.isRequired};var M=n(79337);let z=e=>{let{user:t,tenantName:n,requestId:l}=e,o=(0,i.useRouter)(),c=(0,d.useCallback)(()=>{o.push("/hr/".concat(n,"/e-signatures/requests"))},[o,n]),u=[{href:"/hr/".concat(n,"/e-signatures"),name:"E-Signatures",nodeType:"Link"},{href:"/hr/".concat(n,"/e-signatures/requests"),name:"Requests",nodeType:"Link"},{href:"/hr/".concat(n,"/e-signatures/requests/").concat(l),name:"Request Details",nodeType:"Link"}];return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(M.Z,{title:"".concat((0,r.kC)((0,r.parseUnderScore)(n))," - Signature Request")}),(0,s.jsxs)("main",{className:"container flex flex-col gap-4 mx-auto px-4 md:px-8 lg:px-12 pb-6",children:[(0,s.jsx)(a.Z,{breadcrumbs:u,description:"Check each signer's status, send reminders and download the signed document",tenantName:n,title:"Request Details"}),(0,s.jsx)(B,{onBack:c,requestId:l})]})]})};z.getInitialProps=async e=>{let t=e.query.tenant,n=e.query.id;return!t&&e.res?{notFound:!0}:{tenantName:t,requestId:n}}
1,z.propTypes={user:c().object,tenantName:c().string,requestId:c().string};var W=(0,l.withAuthSync)(z)},17047:function(e,t,n){"use strict";var s=n(52322),r=n(2784),a=n(94217);n(56486);var l=n(47023),i=n(59578),o=n(42369),c=n(76467);let d=e=>{let{onClose:t,handler:n,preOnCloseFn:a,title:d,message:u,details:m,confirmButtonText:g,cancelButtonText:p,initialIsLoading:f,suppressRecording:x}=e,[h,y]=(0,r.useState)(!1),b=f||h,v=(0,r.useCallback)(async()=>{y(!0);try{await n(),a(),t()}catch(e){y(!1),(0,i.N2)(e,"ConfirmDialogContent")}},[n,a,t]),j=(0,r.useCallback)(()=>{h||(a(),t())},[h,a,t]);return(0,s.jsxs)("div",{className:"confirm-dialog flex flex-col bg-white py-3 px-3 sm:py-4 sm:px-4 rounded shadow-sm relative".concat(x?" ".concat("fs-exclude"):""),"data-hj-suppress":x||void 0,"data-hs-do-not-collect":x?"true":void 0,children:[!!b&&(0,s.jsx)(o.J,{fixed:!1,size:"sm"}),(0,s.jsx)("div",{className:"w-full border-gray-200",children:(0,s.jsx)(c.Z,{className:"leading-none",variant:"heading5",children:d})}),(0,s.jsx)("hr",{className:"-mx-3 sm:-mx-4 my-2 sm:my-3"}),(0,s.jsxs)("div",{className:"w-full py-2",children:[(0,s.jsx)(c.Z,{variant:"body",children:u}),!!m&&(0,s.jsx)(c.Z,{className:"mt-2 break-all",color:"text-gray-600",variant:"caption",children:m})]}),(0,s.jsx)("hr",{className:"-mx-3 sm:-mx-4 my-2 sm:my-3"}),(0,s.jsxs)("div",{className:"w-full flex flex-col-reverse sm:flex-row sm:justify-between gap-2 border-gray-200",children:[(0,s.jsx)(l.Z,{className:"w-full sm:w-auto",design:"secondary",disabled:h,onClick:j,children:p}),(0,s.jsx)(l.Z,{className:"w-full sm:w-auto",design:"primary",disabled:h,isLoading:h,onClick:v,children:g})]})]})};t.Z=e=>{let{handler:t,preOnCloseFn:n=()=>{},title:r="Are you sure?",message:l="It may not be possible to undo this action. Are you sure you want to proceed?",details:i="",confirmButtonText:o="Yes, Proceed.",cancelButtonText:c="No, Let me check.",canExit:u=!0,isLoading:m=!1,suppressRecording:g=!1}=e;(0,a._1)({closeOnEscape:u,closeOnClickOutside:u,customUI:e=>{let{onClose:a}=e;return(0,s.jsx)(d,{cancelButtonText:c,confirmButtonText:o,details:i,handler:t,initialIsLoading:m,message:l,onClose:a,preOnCloseFn:n,suppressRecording:g,title:r})}})}},1973:function(e,t,n){"use strict";var s=n(52322),r=n(2369),a=n(92942),l=n(13980),i=n.n(l);n(2784);var o=n(42369);let c=e=>{let{items:t,message:n,description:l,icon:i,showIcon:o,action:c}=e;return(0,s.jsxs)("div",{className:"w-full h-full flex justify-center items-center flex-col p-8",children:[!!o&&(0,s.jsx)(a.FontAwesomeIcon,{className:"text-gray-400 mb-2 text-3xl",icon:i||r.wK3,size:"xl"}),!!t&&(0,s.jsxs)("p",{className:"text-gray-500 text-center font-medium",children:["We couldn't load any ",t,"."]}),!!n&&(0,s.jsx)("p",{className:"text-gray-500 text-center font-medium",children:n}),!!l&&(0,s.jsx)("p",{className:"text-gray-400 text-center text-sm mt-1",children:l}),!!c&&(0,s.jsx)("div",{className:"mt-4",children:c})]})};c.propTypes={showIcon:i().bool,items:i().string,message:i().string,description:i().string,icon:i().object,action:i().node};let d=e=>{let{className:t,isLoading:n,action:l,items:i,message:d,description:u,icon:m,showIcon:g,isError:p}=e;return(0,s.jsxs)("div",{className:"w-full bg-transparent text-center flex flex-col items-center ".concat(t),children:[!n&&!p&&(0,s.jsx)(c,{action:l,description:u,icon:m,items:i,message:d,showIcon:g}),!n&&!!p&&(0,s.jsxs)("div",{className:"w-full flex flex-col justify-center items-center text-red-500",children:[(0,s.jsx)(a.FontAwesomeIcon,{className:"mb-2",icon:r.eHv,size:"xl"}),(0,s.jsx)("p",{className:"text-center font-medium",children:d||"An error occurred loading ".concat(null!=i?i:"data","...")}),!!u&&(0,s.jsx)("p",{className:"text-red-400 text-center text-sm mt-1",children:u}),!!l&&(0,s.jsx)("div",{className:"mt-4",children:l})]}),!!n&&(0,s.jsx)("div",{className:"w-full flex justify-center items-center",children:(0,s.jsx)(o.Z,{size:"sm"})})]})};d.propTypes={items:i().string,message:i().string,description:i().string,icon:i().object,action:i().node,className:i().string,showIcon:i().bool,isLoading:i().bool,isError:i().bool};let u=e=>{let{items:t,message:n,description:r,icon:a,action:l,className:i,showIcon:o=!0,design:c,isLoading:u=!1,isError:m=!1}=e;return"wrapped"===c?(0,s.jsx)("div",{className:"w-full bg-blue-50 p-4 rounded border border-dashed",children:(0,s.jsx)(d,{action:l,className:i,description:r,icon:a,isError:m,isLoading:u,items:t,message:n,showIcon:o})}):(0,s.jsx)(d,{action:l,className:i,description:r,icon:a,isError:m,isLoading:u,items:t,message:n,showIcon:o})};u.propTypes={items:i().string,message:i().string,description:i().string,icon:i().object,action:i().node,className:i().string,
1showIcon:i().bool,design:i().oneOf(["wrapped","default"]),isLoading:i().bool,isError:i().bool},t.Z=u},51634:function(e,t,n){"use strict";var s=n(52322),r=n(13980),a=n.n(r);let l=(0,n(2784).memo)(function(e){let{children:t,padding:n=0,className:r=""}=e;return(0,s.jsx)("div",{className:"w-full ".concat(n?"p-".concat(n):""," ").concat(r).trim(),children:t})});l.displayName="TabPanel",l.propTypes={children:a().node,padding:a().oneOfType([a().number,a().string]),className:a().string},t.Z=l},56486:function(){},94217:function(e,t,n){"use strict";var s,r,a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var s=t[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}return function(t,n,s){return n&&e(t.prototype,n),s&&e(t,s),t}}();t._1=function(e){var t;document.body.classList.add("react-confirm-alert-body-element"),function(){if(!document.getElementById("react-confirm-alert-firm-svg")){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"feGaussianBlur");t.setAttribute("stdDeviation","0.3");var n=document.createElementNS(e,"filter");n.setAttribute("id","gaussian-blur"),n.appendChild(t);var s=document.createElementNS(e,"svg");s.setAttribute("id","react-confirm-alert-firm-svg"),s.setAttribute("class","react-confirm-alert-svg"),s.appendChild(n),document.body.appendChild(s)}}(),t=document.getElementById(e.targetId||f),e.targetId&&!t&&console.error("React Confirm Alert:","Can not get element id (#"+e.targetId+")"),t||(document.body.children[0].classList.add("react-confirm-alert-blur"),(t=document.createElement("div")).id=f,document.body.appendChild(t)),(p=(0,d.createRoot)(t)).render(o.default.createElement(g,e))};var i=n(2784),o=u(i),c=u(n(13980)),d=n(17029);function u(e){return e&&e.__esModule?e:{default:e}}function m(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}var g=(r=s=function(e){function t(){(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")})(this,t);for(var e,n,s,r=arguments.length,a=Array(r),l=0;l<r;l++)a[l]=arguments[l];return n=s=m(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(a))),s.handleClickButton=function(e){e.onClick&&e.onClick(),s.close()},s.handleClickOverlay=function(e){var t=s.props,n=t.closeOnClickOutside,r=t.onClickOutside,a=e.target===s.overlay;n&&a&&(r(),s.close()),e.stopPropagation()},s.close=function(){var e,t,n,r=s.props.afterClose;document.body.classList.remove("react-confirm-alert-body-element"),e=s.props,(t=document.getElementById(e.targetId||f))&&p.unmount(t),(n=document.getElementById("react-confirm-alert-firm-svg"))&&n.parentNode.removeChild(n),document.body.children[0].classList.remove("react-confirm-alert-blur"),r()},s.keyboard=function(e){var t=s.props,n=t.closeOnEscape,r=t.onKeypressEscape,a=t.onkeyPress,l=t.keyCodeForClose,i=e.keyCode,o=27===i;l.includes(i)&&s.close(),n&&o&&(r(e),s.close()),a&&a()},s.componentDidMount=function(){document.addEventListener("keydown",s.keyboard,!1)},s.componentWillUnmount=function(){document.removeEventListener("keydown",s.keyboard,!1),s.props.willUnmount()},s.renderCustomUI=function(){var e=s.props,t=e.title,n=e.message,r=e.buttons;return(0,e.customUI)({title:t,message:n,buttons:r,onClose:s.close})},m(s,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),l(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.title,s=t.message,r=t.buttons,l=t.childrenElement,i=t.customUI,c=t.overlayClassName;return o.default.createElement("div",{className:"react-confirm-alert-overlay "+c,ref:function(t){return e.overlay=t},onClick:this.handleClickOverlay},o.default.createElement("div",{className:"react-confirm-alert"},i?this.renderCustomUI():o.default.createElement("div",{className:"react-confirm-alert-body"},n&&o.default.createElement("h1",null,n),s,l(),o.default.createElement("div",{className:"react-confirm-alert-button-group"},r.map(function(t,n){return o.default.createElement("button",a({key:n,className:t.className},t,{onClick:function(n){return e.handleClickButton(t)}}),t.label)})))))}}]),t}(i.Component),s.propTypes={title:c.default.string,message:c.default.string,buttons:c.default.array.isRequired,childrenElement:c.default.func,customUI:c.default.func,closeOnClickOutside:c.default.bool,closeOnEscape:c.default.bool,keyCodeForClose:c.default.arrayOf(c.default.number),willUnmount:c.default.func,afterClose:c.default.func,onClickOutside:c.default.func,onKeypressEscape:c.default.func,onkeyPress:c.default.func,overlayClassName:c.default.string},s.defaultProps={buttons:[{label:"Cancel",onClick:function(){return null},className:null},{label:"Confirm",onClick:function(){return null},className:null}],childrenElement:function(){return null},closeOnClickOutside:!0,closeOnEscape:!0,keyCodeForClose:[],willUnmount:function(){return null},afterClose:function(){return null},onClickOutside:function(){return null},onKeypressEscape:function(){return null}},r),p=null,f="react-confirm-alert"}},function(e){e.O(0,[4976,5351,9603,1282,6728,7428,2888,9774,179],function(){return e(e.s=30046)}),_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.