PageSourceSearch

https://xyrus.ai/_next/static/chunks/6567.581a0c0c2b64ea1d.js

js xyrus.ai collected 2026-10-05 15:10:35 UTC 7,356 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6567],{51861:(e,t,s)=>{s.d(t,{A:()=>c});var i=s(95155),l=s(12115),a=s(67909),n=s(25016);let r=(0,a.default)(()=>Promise.all([s.e(499),s.e(3483),s.e(4104),s.e(7520),s.e(7150),s.e(5644),s.e(1531),s.e(9891),s.e(875),s.e(8739)]).then(s.bind(s,48739)),{loadableGenerated:{webpack:()=>[48739]},ssr:!1,loading:()=>(0,i.jsx)("div",{className:"editor-input min-h-[200px] p-4 border border-stroke-light rounded bg-bg-primary",children:(0,i.jsx)("div",{className:"text-text-secondary",children:"Loading editor..."})})}),o=(0,l.forwardRef)((e,t)=>{let{value:s,onChange:a,placeholder:o="Enter text...",readOnly:c=!1,disabled:d=!1,className:x,dataTestId:m,...u}=e,p=(0,l.useRef)(null),f=(0,l.useRef)(s),g=(0,l.useRef)(!1);(0,l.useImperativeHandle)(t,()=>p.current,[]),(0,l.useEffect)(()=>{!g.current&&s!==f.current&&p.current&&p.current.getMarkdown()!==s&&(p.current.setMarkdown(s||""),f.current=s)},[s]);let h=l.useCallback(e=>{if(g.current)return;let t=setTimeout(()=>{e!==f.current&&(f.current=e,g.current=!0,a(e),setTimeout(()=>{g.current=!1},50))},100);return()=>clearTimeout(t)},[a]);return(0,i.jsx)("div",{className:(0,n.cn)("w-full",x),"data-testid":m,children:(0,i.jsx)("div",{className:(0,n.cn)("editor-container",d&&"opacity-60 pointer-events-none",c&&"editor-readonly"),children:(0,i.jsx)(r,{editorRef:p,markdown:s||"",onChange:h,readOnly:c||d,placeholder:o,contentEditableClassName:"editor-input min-h-[200px] p-4 outline-none",...u})})})});o.displayName="RichTextEditor";let c=o},69048:(e,t,s)=>{s.d(t,{E5:()=>v,Gg:()=>g,YP:()=>f,nJ:()=>h});var i=s(38511);let l=1024*i.F.FILE_UPLOAD.MAX_SIZE_MB*1024,a=["application/pdf","application/x-pdf"],n=["application/msword"],r=["application/vnd.openxmlformats-officedocument.wordprocessingml.document"],o=["image/jpeg","image/jpg","image/pjpeg"],c=["image/png","image/x-png"],d=["application/vnd.ms-excel","application/msexcel","application/x-msexcel","application/x-ms-excel"],x=["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],m=["text/plain"],u={DOCUMENTS:{extensions:[".pdf",".doc",".docx"],mimeTypes:[...a,...n,...r],label:"PDF, DOC, DOCX"},IMAGES:{extensions:[".jpg",".jpeg",".png"],mimeTypes:[...o,...c],label:"JPG, JPEG, PNG"},EXCEL:{extensions:[".xlsx",".xls"],mimeTypes:[...x,...d],label:"XLSX, XLS"},TRANSCRIPTS:{extensions:[".pdf",".docx",".txt"],mimeTypes:[...a,...r,...m],label:"PDF, DOCX, TXT"}},p=function(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];return t.flat().join(",")},f={DOCUMENTS:p(a,n,r),IMAGES:p(o,c),EXCEL:p(x,d),TRANSCRIPTS:p(a,r,m)},g=e=>{if(!e)return{isValid:!1,errorMessage:"No file selected"};let t=e.size/1048576;return e.size>l?{isValid:!1,errorMessage:"File size exceeds the maximum limit of ".concat(i.F.FILE_UPLOAD.MAX_SIZE_MB,"MB. Current size: ").concat(t.toFixed(2),"MB"),fileSizeInMB:t}:{isValid:!0,fileSizeInMB:t}},h=(e,t)=>{if(!e)return{isValid:!1,errorMessage:"No file selected"};let s=((e,t)=>{if(!e)return{isValid:!1,errorMessage:"No file selected"};let s=[],i=[];return(t.forEach(e=>{let t=u[e];s.push(...t.mimeTypes),i.push(t.label)}),s.includes(e.type))?{isValid:!0}:{isValid:!1,errorMessage:"Invalid file format. Only ".concat(i.join(", ")," files are allowed. Selected file type: ").concat(e.type||"unknown")}})(e,t);if(!s.isValid)return s;let i=g(e);return!i.isValid,i},v=()=>"".concat(i.F.FILE_UPLOAD.MAX_SIZE_MB," MB")},96567:(e,t,s)=>{s.r(t),s.d(t,{default:()=>x});var i=s(95155),l=s(12115),a=s(97003),n=s(90235),r=s(28990),o=s(51861),c=s(69048),d=s(18720);let x=e=>{let{data:t}=e,[s,x]=(0,l.useState)(()=>"string"==typeof(null==t?void 0:t.existingRequirements)?t.existingRequirements:(null==t?void 0:t.initialDescription)||""),[m,u]=(0,l.useState)(null),[p,f]=(0,l.useState)(!1),[g,h]=(0,l.useState)(""),v=null==t?void 0:t.existingJdDocument,N=null==t?void 0:t.initialDocument,j=async()=>{if((null==t?void 0:t.onSave)&&"function"==typeof t.onSave){if(m){let e=(0,c.nJ)(m,["DOCUMENTS"]);if(!e.isValid)return void h(e.errorMessage||"Invalid file")}f(!0);try{var e;await t.onSave(s,m||void 0),x(""),u(null),h(""),null==(e=t.closeModal)||e.call(t)}catch(e){console.error("Error saving requirement:",e)}finally{f(!1)}}};return(0,i.jsxs)("div",{className:"h-full flex flex-col",children:[(0,i.jsxs)("div",{className:"flex-1 p-1 space-y-6 overflow-y-auto",children:[(0,i.jsxs)("div",{className:"space-y-2",children:[(0,i.jsx)(n.Label,{htmlFor:"description",className:"text-sm font-medium text-gray-700",children:"Add Description"}),(0,i.jsx)(o.A,{value:s,onChange:e=>{x(e)},placeholder:"\xb7 2-4 Yrs of experiences.\n\xb7 Must have Technical Knowledge.\n\xb7 Ready to Work From Office Location."})]}),(0,i.jsxs)("div",{className:"space-y-3",children:[(0,i.jsx)(n.Label,{className:"text-sm font-medium text-gray-700",children:"Upload file"}),(0,i.jsxs)("label",{className:"block w-full h-32 bg-text-stroke border-gray-300 rounded-lg cursor-pointer hover:border-gray-400 transition-colors",children:[(0,i.jsx)("input",{type:"file",accept:c.YP.DOCUMENTS,onChange:e=>{var t;let s=null==(t=e.target.files)?void 0:t[0];if(h(""),s){let t=(0,c.nJ)(s,["DOCUMENTS"]);if(!t.isValid){e.target&&(e.target.value=""),d.oR.error("Invalid File",{description:t.errorMessage}),h(t.errorMessage||"Invalid file");return}u(s)}},className:"hidden"}),(0,i.jsx)("div",{className:"h-full flex flex-col items-center justify-center",children:m?(0,i.jsxs)("div",{className:"text-center",children:[(0,i.jsx)(r.A,{icon:"/images/icons/document-icon.svg",width:24,height:24}),(0,i.jsx)("p",{className:"font-semibold text-gray-900 text-sm mt-2",children:m.name}),(0,i.jsxs)("p",{className:"text-gray-500 text-xs",children:[(m.size/1024/1024).toFixed(1)," MB"]})]}):v?(0,i.jsxs)("div",{className:"text-center",children:[(0,i.jsx)(r.A,{icon:"/images/icons/document-icon.svg",width:24,height:24}),(0,i.jsx)("p",{className:"font-semibold text-gray-900 text-sm mt-2",children:v.document_name}),(0,i.jsx)("p",{className:"text-gray-500 text-xs",children:v.file_size?"".concat((v.file_size/1024/1024).toFixed(1)," MB"):"Unknown size"}),(0,i.jsx)("p",{className:"text-blue-600 text-xs mt-1",children:"Click to replace"})]}):N?(0,i.jsxs)("div",{className:"text-center",children:[(0,i.jsx)(r.A,{icon:"/images/icons/document-icon.svg",width:24,height:24}),(0,i.jsx)("p",{className:"font-semibold text-gray-900 text-sm mt-2",children:N.name}),N.size?(0,i.jsx)("p",{className:"text-gray-500 text-xs",children:N.size}):null]}):(0,i.jsxs)("div",{className:"text-center",children:[(0,i.jsx)("span",{className:"text-gray-600 font-bold text-2xl",children:"+"}),(0,i.jsx)("p",{className:"font-semibold text-gray-900 text-sm",children:"Upload JD"}),(0,i.jsx)("p",{className:"text-gray-500 text-xs",children:"Add Job Description Document"})]})})]}),g&&(0,i.jsx)("p",{className:"text-xs text-error-solid mt-2","data-testid":"file-error",children:g})]}),(0,i.jsxs)("p",{className:"text-xs text-gray-400 mt-2",children:["Maximum file size: ",(0,c.E5)()]})]}),(0,i.jsxs)("div",{className:"flex gap-3 border-gray-200 bg-gray-50 pb-10",children:[(0,i.jsx)(a.Button,{onClick:j,disabled:p||!s.trim()&&!v,children:p?"Saving...":"Save"}),(0,i.jsx)(a.Button,{variant:"outline",onClick:()=>{var e;x(""),u(null),null==t||null==(e=t.closeModal)||e.call(t)},disabled:p,className:"px-6",children:"Cancel"})]})]})}}}]);

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.