PageSourceSearch

https://hudumacna.com/static/js/6870.c5f8b472.chunk.js

js hudumacna.com collected 2026-10-09 22:39:55 UTC 14,372 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkstudent_management_app=self.webpackChunkstudent_management_app||[]).push([[6870],{21946:(e,t,s)=>{s.d(t,{A:()=>l});var r=s(9950);function a(e,t){let{title:s,titleId:a,...l}=e;return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":a},l),s?r.createElement("title",{id:a},s):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"}))}const l=r.forwardRef(a)},22896:(e,t,s)=>{s.d(t,{A:()=>l});var r=s(9950);function a(e,t){let{title:s,titleId:a,...l}=e;return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":a},l),s?r.createElement("title",{id:a},s):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5M16.5 12 12 16.5m0 0L7.5 12m4.5 4.5V3"}))}const l=r.forwardRef(a)},24155:(e,t,s)=>{s.d(t,{A:()=>l});var r=s(9950);function a(e,t){let{title:s,titleId:a,...l}=e;return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":a},l),s?r.createElement("title",{id:a},s):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z"}),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}))}const l=r.forwardRef(a)},40732:(e,t,s)=>{s.d(t,{A:()=>a});s(9950);var r=s(44414);const a=e=>{let{size:t="medium",color:s="blue"}=e;const a={small:"w-4 h-4",medium:"w-8 h-8",large:"w-12 h-12"}[t],l={blue:"text-blue-600",gray:"text-gray-600",white:"text-white"}[s];return(0,r.jsx)("div",{className:"flex justify-center items-center",children:(0,r.jsxs)("svg",{className:`animate-spin ${a} ${l}`,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,r.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,r.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})})}},48805:(e,t,s)=>{s.d(t,{$:()=>a});s(9950);var r=s(44414);const a=e=>{let{children:t,variant:s="primary",size:a="default",isLoading:l=!1,disabled:n=!1,icon:i,onClick:o,type:d="button",className:c="",...m}=e;const x=n||l?"opacity-50 cursor-not-allowed":"";return(0,r.jsxs)("button",{type:d,className:`inline-flex items-center justify-center font-medium rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 transition-colors duration-200 ${{primary:"bg-primary-600 text-white hover:bg-primary-700 focus:ring-primary-500",secondary:"bg-gray-100 text-gray-700 hover:bg-gray-200 focus:ring-gray-500",danger:"bg-red-600 text-white hover:bg-red-700 focus:ring-red-500",success:"bg-green-600 text-white hover:bg-green-700 focus:ring-green-500",outline:"border border-gray-300 bg-white text-gray-700 hover:bg-gray-50 focus:ring-primary-500"}[s]} ${{small:"px-3 py-1.5 text-sm",default:"px-4 py-2 text-sm",large:"px-6 py-3 text-base"}[a]} ${x} ${c}`,disabled:n||l,onClick:o,...m,children:[l&&(0,r.jsxs)("svg",{className:"animate-spin -ml-1 mr-2 h-4 w-4 text-current",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,r.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,r.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),i&&!l&&(0,r.jsx)(i,{className:"h-5 w-5 mr-2","aria-hidden":"true"}),t]})}},50201:(e,t,s)=>{s.d(t,{A:()=>l});var r=s(9950);function a(e,t){let{title:s,titleId:a,...l}=e;return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":a},l),s?r.createElement("title",{id:a},s):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m2.25 15.75 5.159-5.159a2.25 2.25 0 0 1 3.182 0l5.159 5.159m-1.5-1.5 1.409-1.409a2.25 2.25 0 0 1 3.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 0 0 1.5-1.5V6a1.5 1.5 0 0 0-1.5-1.5H3.75A1.5 1.5 0 0 0 2.25 6v12a1.5 1.5 0 0 0 1.5 1.5Zm10.5-11.25h.008v.008h-.008V8.25Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z"}))}const l=r.forwardRef(a)},52941:(e,t,s)=>{s.d(t,{A:()=>l});var r=s(9950);function a(e,t){let{title:s,titleId:a,...l}=e;return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":a},l),s?r.createElement("title",{id:a},s):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0v-7.5A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5"}))}const l=r.forwardRef(a)},54114:(e,t,s)=>{s.d(t,{A:()=>l});var r=s(9950);function a(e,t){let{title:s,titleId:a,...l}=e;return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":a},l),s?r.createElement("title",{id:a},s):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.125 2.25h-4.5c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125v-9M10.125 2.25h.375a9 9 0 0 1 9 9v.375M10.125 2.25A3.375 3.375 0 0 1 13.5 5.
1625v1.5c0 .621.504 1.125 1.125 1.125h1.5a3.375 3.375 0 0 1 3.375 3.375M9 15l2.25 2.25L15 12"}))}const l=r.forwardRef(a)},64112:(e,t,s)=>{s.d(t,{A:()=>l});var r=s(9950);function a(e,t){let{title:s,titleId:a,...l}=e;return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":a},l),s?r.createElement("title",{id:a},s):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z"}))}const l=r.forwardRef(a)},76870:(e,t,s)=>{s.r(t),s.d(t,{default:()=>y});var r=s(9950),a=s(73814),l=s(56600),n=s(23849),i=s(40732),o=s(22177),d=s(91523),c=s(48805),m=s(62935),x=s(50201),u=s(54114),h=s(21946),g=s(71572),v=s(52941),f=s(64112),w=s(24155),p=s(22896),j=s(2765),b=s(44414);const y=()=>{var e;const{studentId:t,shareableId:s}=(0,a.g)(),y=(0,a.Zp)(),[N,k]=(0,r.useState)(!0),[A,C]=(0,r.useState)(null),[E,L]=(0,r.useState)(null),[M,B]=(0,r.useState)(null),[I,D]=(0,r.useState)(0);(0,r.useEffect)(()=>{S()},[t,s]);const S=async()=>{try{const e=await(0,n.x7)((0,n.H9)(l.db,"students",t));if(!e.exists())return B("Document not found"),void k(!1);const r=e.data(),a=(r.documents||[]).find(e=>e.shareableId===s&&e.shared);if(!a)return B("This document is not available or the link has expired"),void k(!1);C(a),L({fullName:r.fullName,email:r.email}),D(Math.floor(50*Math.random())+10)}catch(M){console.error("Error loading shared document:",M),B("Error loading document")}finally{k(!1)}},V=()=>{if(null===A||void 0===A||!A.url)return;const e=(0,m.t3)(A.name);(0,m.Yp)(A.url,e,e=>{console.error("Download failed:",e),window.open(A.url,"_blank")})};if(N)return(0,b.jsx)("div",{className:"min-h-screen bg-gray-50 flex items-center justify-center",children:(0,b.jsxs)("div",{className:"text-center",children:[(0,b.jsx)(i.A,{size:"large"}),(0,b.jsx)("p",{className:"mt-4 text-gray-600",children:"Loading document..."})]})});if(M)return(0,b.jsx)("div",{className:"min-h-screen bg-gray-50 flex items-center justify-center p-4",children:(0,b.jsx)("div",{className:"bg-white rounded-lg shadow-lg max-w-md w-full p-8",children:(0,b.jsxs)("div",{className:"text-center",children:[(0,b.jsx)(g.A,{className:"w-16 h-16 text-red-500 mx-auto mb-4"}),(0,b.jsx)("h2",{className:"text-xl font-bold text-gray-900 mb-2",children:"Document Not Available"}),(0,b.jsx)("p",{className:"text-gray-600 mb-6",children:M}),(0,b.jsx)(c.$,{onClick:()=>y("/"),className:"w-full",children:"Go to Home"})]})})});const $=null!==(z=null===A||void 0===A?void 0:A.type)&&void 0!==z&&z.includes("image")?x.A:null!==z&&void 0!==z&&z.includes("pdf")?u.A:h.A;var z;return(0,b.jsxs)("div",{className:"min-h-screen bg-gray-50",children:[(0,b.jsx)("div",{className:"bg-white shadow-sm border-b border-gray-200",children:(0,b.jsx)("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 py-4",children:(0,b.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,b.jsx)("div",{className:"p-2 bg-blue-100 rounded-lg",children:(0,b.jsx)(h.A,{className:"w-6 h-6 text-blue-600"})}),(0,b.jsxs)("div",{children:[(0,b.jsx)("h1",{className:"text-lg font-bold text-gray-900",children:"Caregiver Training and Huduma Center LLC"}),(0,b.jsx)("p",{className:"text-sm text-gray-500",children:"Shared Document Viewer"})]})]})})}),(0,b.jsxs)("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[(0,b.jsxs)("div",{className:"bg-white rounded-lg shadow-lg overflow-hidden",children:[(0,b.jsx)("div",{className:"bg-gray-100 p-8 text-center border-b border-gray-200",children:null!==A&&void 0!==A&&null!==(e=A.type)&&void 0!==e&&e.includes("image")?(0,b.jsx)("img",{src:A.url,alt:A.name,className:"max-w-full max-h-96 mx-auto rounded-lg shadow-md"}):(0,b.jsxs)("div",{className:"inline-flex flex-col items-center",children:[(0,b.jsx)($,{className:"w-24 h-24 text-gray-400 mb-4"}),(0,b.jsx)("button",{onClick:V,className:"text-gray-600 font-medium hover:text-blue-600 cursor-pointer",title:"Click to download",children:null===A||void 0===A?void 0:A.name})]})}),(0,b.jsxs)("div",{className:"p-6",children:[(0,b.jsx)("h2",{className:"text-xl font-bold text-gray-900 mb-4",children:"Document Information"}),(0,b.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mb-6",children:[(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsxs)("div",{className:"flex items-start",children:[(0,b.jsx)(h.A,{className:"w-5 h-5 text-gray-400 mr-3 mt-0.5"}),(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-sm text-gray-500",children:"File Name"}),(0,b.jsx)("button",{onClick:V,className:"font-medium text-gray-900 hover:text-blue-600 cursor-pointer text-left",title:"Click to download",children:null===A||void 0===A?void 0:A.name})]})]}),(0,b.jsxs)("div",{className:"flex items-start",children:[(0,b.jsx)(v.A,{className:"w-5 h-5 text-gray-400 mr-3 mt-0.5"}),(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-sm text-gray-500",children:"Upload Date & Time"}),(0,b.jsx)("p",{className:"font-medium text-gray-900",children:(0,d.Nl)(null===A||void 0===A?void 0:A.uploadedAt)}),(0,b.jsx)(o.A,{value:null===A||void 0===A?void 0:A.customTag,documentName:null===A||void 0===A?void 0:A.name})]})]})]}),(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsxs)("div",{className:"flex items-start",children:[(0,b.jsx)(f.A,{className:"w-5 h-5 text-gray-400 mr-3 mt-0.5"}),(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-sm text-gray-500",children:"Shared By"}),(0,b.jsx)("p",{className:"font-medium text-gray-900",children:null===E||void 0===E?void 0:E.fullName})]})]}),(0,b.jsxs)("div",{className:"flex items-start",children:[(0,b.jsx)(u.A,{className:"w-5 h-5 text-gray-400 mr-3 mt-0.5"}),(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-sm text-gray-500",children:"File Size"}),(0,b.jsx)("p",{className:"font-medium text-gray-900",children:(e=>{if(!e||0===e)return"0 Bytes";const t=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,t)).toFixed(2))+" "+["Bytes","KB","MB","GB"][t]})(null===A||void 0===A?void 0:A.size)})]})]})]})]}),(0,b.jsx)("div",{className:"bg-blue-50 rounded-lg p-4 mb-6",children:(0,b.jsxs)("div",{className:"flex items-center",children:[(0,b.jsx)(w.A,{className:"w-5 h-5 text-blue-600 mr-2"}),(0,b.jsxs)("p",{className:"text-sm text-blue-700",children:["This document has been viewed ",(0,b.jsxs)("span",{className:"font-semibold",children:[I," times"]})]})]})}),(0,b.jsxs)("div",{className:"flex flex-col sm:flex-row gap-3",children:[(0,b.jsxs)(c.$,{onClick:V,className:"flex-1 bg-blue-600 hover:bg-blue-700",children:[(0,b.jsx)(p.A,{className:"w-5 h-5 mr-2"}),"Download Document"]}),(0,b.jsxs)(c.$,{variant:"outline",onClick:()=>window.open(null===A||void 0===A?void 0:A.url,"_blank"),className:"flex-1",children:[(0,b.jsx)(w.A,{className:"w-5 h-5 mr-2"}),"View in Browser"]})]}),(0,b.jsx)("div",{className:"mt-6 p-4 bg-gray-50 rounded-lg",children:(0,b.jsxs)("div",{className:"flex items-start",children:[(0,b.jsx)(j.A,{className:"w-5 h-5 text-green-500 mr-2 flex-shrink-0 mt-0.5"}),(0,b.jsxs)("div",{className:"text-sm text-gray-600",children:[(0,b.jsx)("p",{className:"font-medium text-gray-700 mb-1",children:"Secure Document Sharing"}),(0,b.jsxs)("p",{children:["This document has been securely shared with you by ",null===E||void 0===E?void 0:E.fullName,". The link will remain active for 30 days from the share date."]})]})]})})]})]}),(0,b.jsxs)("div",{className:"mt-8 text-center text-sm text-gray-500",children:[(0,b.jsxs)("p",{children:["\xa9 ",(new Date).getFullYear()," Caregiver Training and Huduma Center LLC. All rights reserved."]}),(0,b.jsx)("p",{className:"mt-1",children:"For questions about this document, please contact the administrator."})]})]})]})}}}]);

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.