PageSourceSearch

https://portal.savingprivatemoney.com/_next/static/chunks/2223.4ebdb1fd5adbbe2c.js

js savingprivatemoney.com collected 2026-10-06 02:27:55 UTC 14,062 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2223],{53121:function(e,t,n){n.d(t,{Z:function(){return a}});let a=(0,n(79205).Z)("FilePenLine",[["path",{d:"m18 5-2.414-2.414A2 2 0 0 0 14.172 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2",key:"142zxg"}],["path",{d:"M21.378 12.626a1 1 0 0 0-3.004-3.004l-4.01 4.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"2t3380"}],["path",{d:"M8 18h1",key:"13wk12"}]])},84286:function(e,t,n){n.d(t,{Z:function(){return a}});let a=(0,n(79205).Z)("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},58861:function(e,t,n){n.d(t,{Z:function(){return l}});var a=n(57437),i=n(2265),r=n(14438),s=n(5526);function l(e){let{documentId:t,docTitle:n,docBody:l,userEmail:o,userId:c,initialExecuted:d=null,onExecuted:u,onDownloadCertifiedPdf:x}=e,h=(0,i.useRef)(null),[m,g]=(0,i.useState)(!1),[f,p]=(0,i.useState)(d),[b,v]=(0,i.useState)(!1),y=null!==f,w=(0,i.useCallback)(async()=>{let{data:{session:e}}=await s.supabase.auth.getSession(),t={"Content-Type":"application/json"};return(null==e?void 0:e.access_token)&&(t.Authorization="Bearer ".concat(e.access_token)),t},[]);(0,i.useEffect)(()=>{let e=h.current;if(!e||y)return;let t=e.getContext("2d");t&&(t.fillStyle="#0a0f18",t.fillRect(0,0,e.width,e.height))},[y,t]);let _=e=>{let t=h.current;if(!t)return{x:0,y:0};let n=t.getBoundingClientRect(),a=t.width/n.width,i=t.height/n.height;if("touches"in e){var r;let t=null!==(r=e.touches[0])&&void 0!==r?r:e.changedTouches[0];return{x:(t.clientX-n.left)*a,y:(t.clientY-n.top)*i}}return{x:(e.clientX-n.left)*a,y:(e.clientY-n.top)*i}},j=e=>{if(y)return;e.preventDefault();let t=h.current,n=null==t?void 0:t.getContext("2d");if(!n)return;n.strokeStyle="#60a5fa",n.lineWidth=3,n.lineCap="round";let{x:a,y:i}=_(e);n.beginPath(),n.moveTo(a,i),g(!0)},N=e=>{if(!m||y)return;e.preventDefault();let t=h.current,n=null==t?void 0:t.getContext("2d");if(!n)return;let{x:a,y:i}=_(e);n.lineTo(a,i),n.stroke()},S=()=>g(!1),k=async()=>{let e=h.current;if(!e)return;let n=e.toDataURL("image/png");if(!n||n.length<100){r.A.error("Please draw your signature before executing");return}v(!0);try{var a,i,s,l;let e=await w(),d=await fetch("/api/enterprise-hub/document-signing/".concat(t),{method:"POST",credentials:"include",headers:e,body:JSON.stringify({signature_base64:n,signer_email:o,signer_user_id:c})}),x=await d.json().catch(()=>({}));if(!d.ok){r.A.error(null!==(i=x.error)&&void 0!==i?i:"Execution failed");return}let h={documentId:t,signatureBase64:n,sealHash:null!==(s=x.seal)&&void 0!==s?s:"",signerEmail:o,signedAt:null!==(l=null===(a=x.document)||void 0===a?void 0:a.signed_at)&&void 0!==l?l:new Date().toISOString()};p(h),null==u||u(h),r.A.success("Document cryptographically executed — seal certificate shown below")}catch(e){r.A.error("Execution processing error")}finally{v(!1)}};return(0,a.jsxs)("div",{className:"rounded-xl border border-[#192f46] bg-[#101d2c] p-4 sm:p-6 text-white shadow-2xl",children:[(0,a.jsxs)("div",{className:"mb-4 border-b border-[#192f46] pb-3",children:[(0,a.jsx)("span",{className:"rounded border border-emerald-800 bg-emerald-950 px-2 py-0.5 font-mono text-[10px] font-bold uppercase tracking-wider text-emerald-400",children:"Enterprise Hub Secure Signatory Room"}),(0,a.jsx)("h2",{className:"mt-2 text-xl font-bold text-slate-100",children:n})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2",children:[(0,a.jsx)("div",{className:"max-h-96 overflow-y-auto rounded-lg border border-[#192f46] bg-[#0d1520] p-4 font-serif text-sm leading-relaxed text-slate-300",children:l.split("\n\n").map((e,t)=>(0,a.jsx)("p",{className:"mb-3 whitespace-pre-wrap",children:e},t))}),(0,a.jsxs)("div",{className:"flex flex-col justify-between rounded-lg border border-[#192f46] bg-black/20 p-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"mb-2 block text-xs font-bold uppercase tracking-wider text-zinc-400",children:"Draw legal signature below"}),y?(0,a.jsxs)("div",{className:"space-y-3 rounded-lg border border-emerald-900 bg-emerald-950/20 p-6 text-center",children:[(0,a.jsx)("div",{className:"text-sm font-bold text-emerald-400",children:"Document cryptographically certified"}),(null==f?void 0:f.signatureBase64)&&(0,a.jsx)("img",{src:f.signatureBase64,alt:"Captured signature",className:"mx-auto h-16 object-contain"}),(0,a.jsxs)("div",{className:"break-all rounded border border-[#192f46] bg-[#0a0f18] p-2 font-mono text-[11px] text-emerald-400/90",children:["SEAL HASH: ",null==f?void 0:f.sealHash]}),(0,a.jsxs)("div",{className:"text-[10px] text-zinc-500",children:["Signed by ",null==f?void 0:f.signerEmail," — this certificate stays on this page (not only a toast)."]}),x&&f&&(0,a.jsx)("button",{type:"button",onClick:()=>x(f),className:"rounded bg-emerald-800 px-3 py-1.5 text-[10px] font-bold uppercase text-white hover:bg-emerald-700",children:"Download certified PDF"})]}):(0,a.jsxs)("div",{className:"relative overflow-hidden rounded-lg border-2 border-dashed border-[#192f46] bg-[#0a0f18]",children:[(0,a.jsx)("canvas",{ref:h,width:440,height:200,className:"h-[200px] w-full cursor-crosshair touch-none",onMouseDown:j,onMouseMove:N,onMouseUp:S,onMouseLeave:S,onTouchStart:j,onTouchMove:N,onTouchEnd:S}),(0,a.jsx)("button",{type:"button",onClick:()=>{let e=h.current,t=null==e?void 0:e.getContext("2d");e&&t&&(t.fillStyle="#0a0f18",t.fillRect(0,0,e.width,e.height))}
1,className:"absolute bottom-2 right-2 rounded bg-[#192f46] px-2 py-1 text-[10px] font-bold uppercase text-zinc-400 transition hover:bg-[#243a52]",children:"Reset pad"})]})]}),!y&&(0,a.jsxs)("div",{className:"mt-4 space-y-2",children:[(0,a.jsxs)("div",{className:"text-[11px] leading-normal text-zinc-400",children:["By sealing this canvas, you verify that this electronic signature is a legally binding execution matching your account profile"," ",(0,a.jsx)("span",{className:"font-mono text-[#6bb5ff]",children:o}),"."]}),(0,a.jsx)("button",{onClick:k,type:"button",disabled:b,className:"w-full rounded bg-[#3b82f6] py-2.5 text-xs font-bold uppercase tracking-wide text-white shadow-lg transition hover:bg-[#2563eb] disabled:opacity-50",children:b?"Executing…":"Affix digital seal & execute contract"})]})]})]})]})}},82223:function(e,t,n){n.r(t),n.d(t,{default:function(){return f}});var a=n(57437),i=n(2265),r=n(99376),s=n(53121),l=n(99397),o=n(84286),c=n(14438),d=n(5526),u=n(58861),x=n(95046),h=n(59587),m=n(48944);let g="w-full rounded-lg border border-[#192f46] bg-[#0d1520] px-3 py-2 text-sm text-white outline-none focus:border-[#3b82f6]";function f(){var e;let t=(0,x.k)(),{isSandbox:n}=(0,m.of)(),f=(0,r.useSearchParams)().get("documentId"),[p,b]=(0,i.useState)([]),[v,y]=(0,i.useState)(f),[w,_]=(0,i.useState)(""),[j,N]=(0,i.useState)(""),[S,k]=(0,i.useState)(""),[C,z]=(0,i.useState)(""),[A,T]=(0,i.useState)(!0),E=(0,i.useCallback)(async()=>{let{data:{session:e}}=await d.supabase.auth.getSession(),t={"Content-Type":"application/json"};return(null==e?void 0:e.access_token)&&(t.Authorization="Bearer ".concat(e.access_token)),t},[]),F=(0,i.useCallback)(async()=>{T(!0);try{var e,t;let n=await E(),a=await fetch("/api/enterprise-hub/document-signing",{credentials:"include",headers:n}),i=await a.json().catch(()=>({}));if(!a.ok){c.A.error(null!==(e=i.error)&&void 0!==e?e:"Failed to load documents");return}b(null!==(t=i.documents)&&void 0!==t?t:[])}finally{T(!1)}},[E]);(0,i.useEffect)(()=>{(async()=>{let{data:{user:e}}=await d.supabase.auth.getUser();if(e){var t;_(null!==(t=e.email)&&void 0!==t?t:""),N(e.id)}await F()})()},[F]),(0,i.useEffect)(()=>{f&&y(f)},[f]);let D=async()=>{var e,n;if(!S.trim()||!C.trim()){c.A.error("Title and document body are required");return}let a=await E(),i=await fetch("/api/enterprise-hub/document-signing",{method:"POST",credentials:"include",headers:a,body:JSON.stringify({documentTitle:S.trim(),documentBody:C.trim(),sourceTool:"document-signing",subsidiaryId:null!==(e=null==t?void 0:t.subsidiaryId)&&void 0!==e?e:null})}),r=await i.json().catch(()=>({}));if(!i.ok){c.A.error(null!==(n=r.error)&&void 0!==n?n:"Failed to create document");return}c.A.success("Document workspace provisioned"),k(""),z(""),y(r.documentId),await F()},I=null!==(e=p.find(e=>e.id===v))&&void 0!==e?e:null,P=async e=>{var t,n,a,i;let r=await E(),s=await fetch("/api/enterprise-hub/document-signing/".concat(e),{credentials:"include",headers:r}),l=await s.json().catch(()=>({}));if(!s.ok){c.A.error(null!==(n=l.error)&&void 0!==n?n:"Verification failed");return}(null===(t=l.verification)||void 0===t?void 0:t.valid)?c.A.success(l.verification.status):c.A.error(null!==(i=null===(a=l.verification)||void 0===a?void 0:a.status)&&void 0!==i?i:"Verification failed")};return(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{className:"rounded-xl border border-[#3b82f6]/40 bg-[#101d2c] px-4 py-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(s.Z,{className:"h-5 w-5 text-[#6bb5ff]"}),(0,a.jsx)("h2",{className:"text-lg font-bold text-white",children:"Native Document Signing"})]}),(0,a.jsx)("p",{className:"mt-1 text-xs text-zinc-400",children:"Cryptographic SHA-256 sealing with canvas signature, account binding, and IP/timestamp audit trail — no third-party e-sign API fees."})]}),(0,a.jsxs)("div",{className:"grid gap-4 lg:grid-cols-2",children:[(0,a.jsxs)("div",{className:"space-y-3 rounded-xl border border-[#192f46] bg-black/20 p-4",children:[(0,a.jsx)("h3",{className:"text-sm font-bold text-white",children:"Provision unsigned document"}),(0,a.jsxs)("label",{className:"block text-xs text-zinc-400",children:["Document title",(0,a.jsx)("input",{className:"".concat(g," mt-1"),value:S,onChange:e=>k(e.target.value),placeholder:"e.g. Master Services Agreement — Q3 2026"})]}),(0,a.jsxs)("label",{className:"block text-xs text-zinc-400",children:["Binding terms (plain text)",(0,a.jsx)("textarea",{className:"".concat(g," mt-1 min-h-[12rem] font-mono text-xs"),value:C,onChange:e=>z(e.target.value),placeholder:"Paste contract or form text here…"})]}),(0,a.jsxs)("button",{type:"button",onClick:D,className:"inline-flex items-center gap-2 rounded-lg bg-[#3b82f6] px-4 py-2 text-xs font-bold uppercase tracking-wide text-white hover:bg-[#2563eb]",children:[(0,a.jsx)(l.Z,{className:"h-4 w-4"}),"Create signing workspace"]})]}),(0,a.jsxs)("div",{className:"rounded-xl border border-[#192f46] bg-black/20 p-4",children:[(0,a.jsx)("h3",{className:"mb-3 text-sm font-bold text-white",children:"Your documents"}),A?(0,a.jsx)("p",{className:"text-xs text-zinc-500",children:"Loading…"}):0===p.length?(0,a.jsx)("p",{className:"text-xs text-zinc-500",children:"No documents yet. Create one to begin signing."}):(0,a.jsx)("ul",{className:"space-y-2",children:p.map(e=>(0,a.jsxs)("li",{className:"flex flex-wrap items-center justify-between gap-2 rounded-lg border border-[#192f46] bg-[#0d1520] px-3 py-2",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium text-white",children:e.document_title}),(0,a.jsx)("p",{className:"text-[10px] font-mono uppercase text-zinc-500",children:e.status})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:["pending"===e.status&&(0,a.jsx)("button",{type:"button",onClick:()=>y(e.id),className:"rounded bg-[#3b82f6]/20 px-2 py-1 text-[10px] font-bold uppercase text-[#6bb5ff]",children:"Sign"}),"executed"===e.status&&(0,a.jsxs)("button",{type:"button",onClick:()=>P(e.id),className:"inline-flex items-center gap-1 rounded bg-emerald-950 px-2 py-1 text-[10px] font-bold uppercase text-emerald-400",children:[(0,a.jsx)(o.Z,{className:"h-3 w-3"}),"Verify"]})]})]},e.id))})]})]}),I&&"pending"===I.status&&w&&j&&(0,a.jsx)(u.Z,{documentId:I.id,docTitle:I.document_title,docBody:I.document_body,userEmail:w,userId:j,onExecuted:()=>{F()},onDownloadCertifiedPdf:e=>{if(n){c.A.error(m.ty);return}(0,h.EN)(I.document_title,I.document_body,e),c.A.success("Signed PDF downloaded")}})]})}},59587:function(e,t,n){n.d(t,{EN:function(){return s},H4:function(){return r}});var a=n(11933);function i(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:14;return t>270?(e.addPage(),n):t}function r(e,t,n,a){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:n+95;if(null==a?void 0:a.signatureBase64){try{e.addImage(a.signatureBase64,"PNG",i,t,52,20)}catch(n){e.setFont("helvetica","normal"),e.setFontSize(8),e.text("Authorized Signature (image)",i,t+12)}return e.setFont("helvetica","normal"),e.setFontSize(7.5),e.text("Signed by: ".concat(a.signerEmail),i,t+22),e.text("Date: ".concat(new Date(a.signedAt).toLocaleStr
1ing("en-GB")),i,t+27),e.setFontSize(6),e.text("Integrity seal: ".concat(a.sealHash),i,t+32,{maxWidth:80}),t+38}return e.setFont("helvetica","normal"),e.setFontSize(8),e.text("Authorized Signature: _______________________",i,t+12),t+20}function s(e,t,n){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"signed-document",{doc:l,brandingOffset:o}=(0,a.TE)({orientation:"portrait",unit:"mm",format:"a4"}),c=16+o;l.setFont("helvetica","bold"),l.setFontSize(14),l.setTextColor(0,0,0),l.text(e,14,c),c+=10,c=function(e,t,n,a,r){for(let n of(e.setFont("helvetica","normal"),e.setFontSize(9),e.setTextColor(0,0,0),e.splitTextToSize(t,180)))a=i(e,a),e.text(n,14,a),a+=4.2;return a}(l,t,0,c,0)+8,c=i(l,c,14),l.setFont("helvetica","bold"),l.setFontSize(10),l.text("AUTHORIZATION & DIGITAL EXECUTION",14,c),c+=8,l.setFont("helvetica","normal"),l.setFontSize(8),l.text("For and on behalf of the Client:",14,c),l.text("Authorized Signature: _______________________",14,c+12),c=r(l,c,14,n),l.setFontSize(7),l.setTextColor(100,100,100),l.text("Enterprise Hub — Cryptographically sealed document",14,285);let d=e.replace(/[^a-z0-9]+/gi,"-").replace(/^-|-$/g,"")||s;l.save("".concat(d,"-").concat(new Date().toISOString().slice(0,10),".pdf"))}}}]);

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.