PageSourceSearch

https://cyparta.com/assets/PublicProposalView-B38i1TvU.js

js cyparta.com collected 2026-10-02 01:27:40 UTC 37,554 bytes, 1 lines download raw bytes

1import{j as e,e as t,f as a,a as r,u as s,r as i}from"./vendor-DdjWeKhn.js";import{a as o,H as l,L as n,i as d}from"./index-DVNfcHhn.js";import{E as c}from"./ErrorMessage-8o7LmtjO.js";import{m}from"./animations-BiTprZVg.js";import{F as x,K as h,z as p,Q as g,ar as b,a0 as y,a1 as f,E as u}from"./icons-BCa0xwjb.js";const j=e=>`https://ai-cyparta-back.cyparta.com${e}`,N=async(e,t="",a="")=>{const r=new URLSearchParams;t&&r.set("viewer",t),a&&r.set("src",a);const s=r.toString()?`?${r.toString()}`:"",i=await fetch(j(`/api/marketing/proposals/public/${e}/${s}`),{method:"GET",headers:{"Content-Type":"application/json"}});if(!i.ok){const e=await i.json().catch(()=>({error:"Failed to load proposal"}));throw new Error(e.error||e.message||"Failed to load proposal")}return await i.json()},w=async(e,t)=>{const a=new URLSearchParams;t&&a.append("language",t);const r=j(`/api/marketing/proposals/public/${encodeURIComponent(e)}/pdf/${a.toString()?`?${a}`:""}`),s=await fetch(r,{method:"GET"});if(!s.ok)throw new Error("Could not download the proposal");return await s.blob()};const v=({html:t})=>{const a=function(e){return String(e||"").replace(/<\/(p|div|li|h[1-6]|tr)>/gi,"\n").replace(/<br\s*\/?>/gi,"\n").replace(/<[^>]+>/g,"").replace(/&nbsp;/gi," ").replace(/&amp;/gi,"&").split("\n").map(e=>e.replace(/\s+/g," ").trim()).filter(Boolean)}(t);return 0===a.length?null:e.jsx("div",{className:"space-y-3",children:a.map((t,a)=>{const r=t.match(/^\s*(\d{1,3})\s*%\s*[-–—:.)]?\s*(.*)$/),s=r?`${r[1]}%`:String(a+1),i=r&&r[2]?r[2]:t;
1return e.jsxs("div",{className:"flex items-start gap-4 rounded-2xl border border-gray-800/60 bg-gradient-to-br from-[#1F1F1F] to-[#151515] p-4",children:[e.jsx("span",{className:"flex-shrink-0 flex items-center justify-center min-w-12 h-12 px-3 rounded-xl bg-gradient-to-br from-[#D80027] to-[#A0001F] text-white font-bold text-sm shadow-lg",children:s}),e.jsx("span",{className:"text-gray-300 leading-relaxed pt-1.5",children:i})]},a)})})};function A(e){const t=`cyparta.proposal.reader.${e}`;try{const e=localStorage.getItem(t);if(e)return e;const a=(crypto.randomUUID?.()||String(Math.random()).slice(2)).replace(/-/g,"");return localStorage.setItem(t,a),a}catch{return(crypto.randomUUID?.()||String(Math.random()).slice(2)).replace(/-/g,"")}}const _=["https://allinone-ai.cyparta.com","http://localhost:5173","http://localhost:3000"],F=({preview:j=!1})=>{const{token:F}=t(),[D]=a(),S=D.get("src")||"",k=r(),{pathname:B}=s(),L=B.startsWith("/ar/"),[$,P]=i.useState(null),[C,E]=i.useState(!j),[T,U]=i.useState(null),[I,R]=o({threshold:.1,triggerOnce:!0});i.useEffect(()=>{!j&&F&&q()},[F,j]),i.useEffect(()=>{if(!j)return;const e=e=>{if(!_.includes(e.origin))return;const t=e.data;t&&"cyparta:proposal-preview"===t.type&&(P(t.proposal||null),U(null),E(!1))};window.addEventListener("message",e);try{window.parent?.postMessage({type:"cyparta:proposal-preview-ready"},"*")}catch{}return()=>window.removeEventListener("message",e)},[j]);const q=async()=>{try{E(!0),U(null);const e=await N(F,A(F),S);console.log("Proposal data received:",e),console.log("Proposal content:",e?.content),console.log("Financial proposals:",e?.financial_proposals),P(e)}catch(e){console.error("Error fetching proposal:",e);const t=e.response?.data?.error||e.message||"Failed to load proposal";U(t)}finally{E(!1)}},[M,O]=i.useState(!1);i.useEffect(()=>{if(!j&&F&&$)return function({token:e,sections:t}){const a=A(e),r=`https://ai-cyparta-back.cyparta.com/api/marketing/proposals/public/${encodeURIComponent(e)}/ping/`;let s="visible"===document.visibilityState?Date.now():0,i="",o=!1;const l=()=>{if(!s)return 0;const e=Math.round((Date.now()-s)/1e3);return s=Date.now(),e},n=()=>{if(!t)return"";const e=window.scrollY+.6*window.innerHeight;let a=i;for(const r of t())r.top<=e&&(a=r.id);return i=a,a},d=(e,t=!1)=>{const s=JSON.stringify({viewer:a,seconds:e,section:n()});try{if(t&&navigator.sendBeacon)return void navigator.sendBeacon(r,new Blob([s],{type:"application/json"}));fetch(r,{method:"POST",body:s,keepalive:t,headers:{"Content-Type":"application/json"}}).catch(()=>{})}catch{}};d(0);const c=window.setInterval(()=>{o||d(l())},2e4),m=()=>{"visible"===document.visibilityState?s=Date.now():(d(l()),s=0)},x=()=>d(l(),!0);return document.addEventListener("visibilitychange",m),window.addEventListener("pagehide",x),()=>{o=!0,window.clearInterval(c),document.removeEventListener("visibilitychange",m),window.removeEventListener("pagehide",x),d(l(),!0)}}({token:F,sections:()=>Array.from(document.querySelectorAll("[data-section]")).map(e=>({id:e.dataset.section||"",top:e.getBoundingClientRect().top+window.scrollY})).filter(e=>e.id)})},[j,F,$]),i.useEffect(()=>{if(j||!F||!$||L)return;const e=Array.isArray($.language)?$.language[0]:$.language;if("ar"!==String(e||"").toLowerCase())return;const t=`proposal-lang:${F}`;try{if(sessionStorage.getItem(t))return;sessionStorage.setItem(t,"sent")}catch{}k(`/ar${B}`,{replace:!0})},[j,F,$,L,B,k]);const H=e=>e?new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"}):"Not set",G=t=>{if(!t)return null;const a=K?"[&_ul]:mr-6 [&_ol]:mr-6":"[&_ul]:ml-6 [&_ol]:ml-6",r=K?"[&_blockquote]:border-r-4 [&_blockquote]:pr-4":"[&_blockquote]:border-l-4 [&_blockquote]:pl-4";return e.jsx("div",{dir:z,dangerouslySetInnerHTML:{__html:t},className:`text-gray-300 leading-relaxed [&_h1]:text-3xl [&_h1]:font-bold [&_h1]:text-white [&_h1]:mb-4\n          [&_h2]:text-2xl [&_h2]:font-bold [&_h2]:text-white [&_h2]:mb-3\n          [&_h3]:text-xl [&_h3]:font-bold [&_h3]:text-white [&_h3]:mb-2\n          [&_p]:text-gray-300 [&_p]:mb-4 [&_p]:leading-7\n          [&_strong]:text-white [&_strong]:font-bold\n          [&_em]:text-gray-200 [&_em]:italic\n          [&_ul]:text-gray-300 [&_ul]:list-disc ${a}
1 [&_ul]:space-y-2\n          [&_ol]:text-gray-300 [&_ol]:list-decimal [&_ol]:space-y-2\n          [&_li]:mb-2 [&_li]:leading-7\n          [&_a]:text-[#D80027] [&_a]:no-underline hover:[&_a]:underline [&_a]:font-semibold\n          [&_code]:text-[#D80027] [&_code]:bg-white/10 [&_code]:px-2 [&_code]:py-1 [&_code]:rounded [&_code]:text-sm\n          ${r} [&_blockquote]:border-[#D80027] [&_blockquote]:italic [&_blockquote]:text-gray-400`})};if(C)return e.jsxs(e.Fragment,{children:[e.jsx(l,{children:e.jsx("title",{children:"Loading Proposal - Cyparta"})}),e.jsx("div",{className:"min-h-screen bg-[#0B0B0B] flex items-center justify-center pt-20",children:e.jsx(n,{})})]});if(j&&!$)return e.jsx("div",{className:"min-h-screen bg-[#0B0B0B] flex items-center justify-center p-8",children:e.jsx("p",{className:"text-gray-500 text-sm",children:"Waiting for the draft…"})});if(T||!$)return e.jsxs(e.Fragment,{children:[e.jsx(l,{children:e.jsx("title",{children:"Proposal Not Found - Cyparta"})}),e.jsx("div",{className:"min-h-screen bg-[#0B0B0B] flex items-center justify-center p-4 pt-20",children:e.jsx(m.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"max-w-md w-full",children:e.jsx(c,{message:T||"Proposal not found",onRetry:q})})})]});const V=$.content||{},W="technical"===$.proposal_type,K=L,Q=K?"ar":"en",z=K?"rtl":"ltr",J=(e,t)=>K?d(t):e,Y=String(V.currency||$.currency||"").toUpperCase(),X=Y?` ${K&&{EGP:"ج.م",USD:"دولار",EUR:"يورو",GBP:"جنيه إسترليني",SAR:"ر.س",AED:"د.إ",KWD:"د.ك",QAR:"ر.ق"}[Y]||Y}`:"",Z=e=>{if(!K||!e)return e;return{hour:"ساعة",hours:"ساعات",day:"يوم",days:"أيام",week:"أسبوع",weeks:"أسابيع",month:"شهر",months:"أشهر",year:"سنة",years:"سنوات"}[e.toLowerCase()]||e};return console.log("Rendering proposal:",{hasProposal:!!$,isTechnical:W,contentKeys:Object.keys(V),hasDescription:!!$.description,scopeLength:Array.isArray(V.scope)?V.scope.length:0,overviewLength:Array.isArray(V.overview)?V.overview.length:0,technologiesLength:Array.isArray(V.technologies)?V.te
1chnologies.length:0,featuresLength:Array.isArray(V.features)?V.features.length:0,timelineLength:Array.isArray(V.timeline)?V.timeline.length:0,thirdPartiesLength:Array.isArray(V.third_parties)?V.third_parties.length:0,outOfScopeLength:Array.isArray(V.out_of_scope)?V.out_of_scope.length:0,hasNotes:!!V.notes,hasMethodology:!!V.methodology,deliverablesLength:Array.isArray(V.deliverables)?V.deliverables.length:0,financialProposals:$.financial_proposals,financialProposalsLength:Array.isArray($.financial_proposals)?$.financial_proposals.length:0,shouldShowFinancialButton:W&&$.financial_proposals&&Array.isArray($.financial_proposals)&&$.financial_proposals.length>0}),e.jsxs(e.Fragment,{children:[e.jsxs(l,{children:[e.jsxs("title",{children:[$.title," - Cyparta Proposal"]}),e.jsx("meta",{name:"description",content:$.description||"View proposal details"}),e.jsx("html",{lang:Q}),K&&e.jsx("link",{href:"https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700&display=swap",rel:"stylesheet"})]}),e.jsxs("div",{className:"min-h-screen bg-[#0B0B0B] text-white pt-20",dir:z,style:K?{fontFamily:"'Cairo', 'Tajawal', 'Segoe UI', sans-serif"}:void 0,children:[e.jsxs("section",{ref:I,className:"py-20 relative overflow-hidden",children:[e.jsx("div",{className:"absolute inset-0",children:V.banner_image?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"absolute inset-0 bg-cover bg-center",style:{backgroundImage:`url(${V.banner_image})`}}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-[#0B0B0B] via-[#0B0B0B]/80 to-[#0B0B0B]/40"}),e.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(circle_at_30%_20%,rgba(216,0,39,0.15),transparent_50%)] mix-blend-overlay"})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-[#D80027]/20 via-[#0B0B0B] to-[#0B0B0B]"}),e.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(circle_at_30%_20%,rgba(216,0,39,0.15),transparent_50%)]"})]})}),e.jsx("div",{className:"container mx-auto px-6 relative z-10",children:e.jsx(m.div,{initial:{opacity:0,y:50},animate:R?{opacity:1,y:0}:{},transition:{duration:.8},children:e.jsx("div",{className:"max-w-6xl mx-auto",children:e.jsxs("div",{className:"flex flex-col md:flex-row md:items-center md:justify-between gap-8 mb-8",children:[e.jsxs("div",{className:"flex items-start gap-6",children:[e.jsx(m.div,{initial:{scale:0,rotate:-180},animate:{scale:1,rotate:0},transition:{delay:.2,type:"spring",stiffness:200},className:"w-24 h-24 bg-gradient-to-br from-[#D80027] to-[#A0001F] rounded-3xl flex items-center justify-center shadow-2xl border-2 border-white/10 flex-shrink-0",children:W?e.jsx(x,{className:"w-12 h-12 text-white"}):e.jsx(h,{className:"w-12 h-12 text-white"})}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4 flex-wrap",children:[e.jsx("span",{className:"px-4 py-1.5 bg-[#D80027] text-white text-sm font-semibold rounded-full",children:W?J("Technical Proposal","عرض فني"):J("Financial Proposal","عرض مالي")}),$.status&&e.jsx("span",{className:"px-4 py-1.5 text-sm font-semibold rounded-full "+("accepted"===$.status?"bg-green-500/20 text-green-400 border border-green-500/30":"sent"===$.status?"bg-blue-500/20 text-blue-400 border border-blue-500/30":"negotiating"===$.status?"bg-yellow-500/20 text-yellow-400 border border-yellow-500/30":"bg-gray-500/20 text-gray-400 border border-gray-500/30"),children:(e=>{if(!e)return e;if(!K)return e.charAt(0).toUpperCase()+e.slice(1);return{draft:"مسودة",sent:"مُرسل",viewed:"تمت المشاهدة",accepted:"مقبول",rejected:"مرفوض",negotiating:"قيد التفاوض",expired:"منتهي"}[e.toLowerCase()]||e})($.status)})]}),e.jsx("h1",{className:"text-4xl md:text-5xl lg:text-6xl font-bold mb-4 text-white leading-tight",children:$.title}),$.description&&e.jsxs("p",{className:"text-lg text-gray-300 leading-relaxed line-clamp-2",children:[$.description.replace(/<[^>]*>/g,"").substring(0,150),"..."]})]})]}),e.jsxs("div",{className:"flex items-center gap-3 flex-shrink-0",children:[e.jsxs(m.button,{initial:{opacity:0,x:20}
1,animate:{opacity:1,x:0},transition:{delay:.4},whileHover:{scale:1.05},whileTap:{scale:.95},onClick:async()=>{if($&&F&&!j){O(!0);try{const e=await w(F,Q),t=window.URL.createObjectURL(e),a=document.createElement("a");a.href=t;const r=$.language?.[0]?`_${$.language[0]}`:"",s=`proposal_${$.id}${r}_${(new Date).toISOString().split("T")[0]}.pdf`;a.download=s,document.body.appendChild(a),a.click(),document.body.removeChild(a),window.URL.revokeObjectURL(t)}catch(e){console.error("Error downloading PDF:",e)}finally{O(!1)}}},disabled:M||j,className:"px-8 py-4 bg-white/10 hover:bg-white/20 text-white rounded-xl font-semibold transition-all flex items-center gap-3 shadow-2xl border border-white/20 disabled:opacity-50 disabled:cursor-not-allowed",children:[e.jsx(p,{className:"w-5 h-5"}),e.jsx("span",{children:M?J("Preparing…","جارٍ التجهيز…"):J("Download PDF","تحميل PDF")})]}),W&&$.financial_proposals&&Array.isArray($.financial_proposals)&&$.financial_proposals.length>0&&e.jsxs(m.button,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{delay:.5},whileHover:{scale:1.05},whileTap:{scale:.95},onClick:()=>{const e=$.financial_proposals[0];console.log("Financial proposal clicked:",e),e&&e.public_token?k(`/proposals/public/${e.public_token}`):(console.error("Financial proposal missing public_token:",e),alert("Financial proposal does not have a public link. Please generate one first."))},className:"px-8 py-4 bg-gradient-to-r from-green-600 to-green-700 text-white rounded-xl font-semibold hover:from-green-700 hover:to-green-800 transition-all flex items-center gap-3 shadow-2xl border border-white/10",children:[e.jsx(g,{className:"w-5 h-5"}),e.jsx("span",{children:J("View Financial Proposal","عرض العرض المالي")})]})]})]})})})})]}),e.jsx("section",{className:"py-20",children:e.jsx("div",{className:"container mx-auto px-6",children:e.jsxs("div",{className:"max-w-5xl mx-auto space-y-10",children:[$.description&&e.jsxs(m.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.6,delay:.2},className:"bg-gradient-to-br from-[#1A1A1A] to-[#0F0F0F] rounded-3xl p-10 border border-gray-800/50 shadow-2xl backdrop-blur-sm",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[e.jsx("div",{className:"w-1 h-8 bg-gradient-to-b from-[#D80027] to-[#A0001F] rounded-full"}),e.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-white",children:J("Description","الوصف")})]}),e.jsx("div",{children:G($.description)})]}),e.jsxs(e.Fragment,{children:[V.overview&&Array.isArray(V.overview)&&V.overview.length>0&&e.jsxs(m.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.6,delay:.3},"data-section":"overview",className:"bg-gradient-to-br from-[#1A1A1A] to-[#0F0F0F] rounded-3xl p-10 border border-gray-800/50 shadow-2xl",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[e.jsx("div",{className:"w-1 h-8 bg-gradient-to-b from-[#D80027] to-[#A0001F] rounded-full"}),e.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-white",children:J("Overview","نظرة عامة")})]}),e.jsx("div",{className:"space-y-8",children:V.overview.map((t,a)=>e.jsxs(m.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:.4+.1*a},className:"border-l-4 border-[#D80027] pl-6 py-2 bg-gradient-to-r from-[#D80027]/5 to-transparent rounded-r-lg",children:[e.jsx("h3",{className:"font-bold text-xl text-white mb-4",children:t.name}),t.description&&G(t.description)]},a))})]}),V.scope&&Array.isArray(V.scope)&&V.scope.length>0&&e.jsxs(m.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.6,delay:.4},"data-section":"scope",className:"bg-gradient-to-br from-[#1A1A1A] to-[#0F0F0F] rounded-3xl p-10 border border-gray-800/50 shadow-2xl",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[e.jsx("div",{className:"w-1 h-8 bg-gradient-to-b from-[#D80027] to-[#A0001F] rounded-full"}),e.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-white",children:J("Scope of Work","نطاق العمل")})]}),e.jsx("div",{className:"space-y-8",children:V.scope.map((t,a)=>e.jsxs(m.div,{initial:{opacity:0,x:-20}
1,animate:{opacity:1,x:0},transition:{delay:.5+.1*a},className:"border-l-4 border-[#D80027] pl-6 py-3 bg-gradient-to-r from-[#D80027]/5 to-transparent rounded-r-lg",children:[e.jsxs("div",{className:"flex items-start gap-4 mb-3",children:[e.jsx("span",{className:"flex-shrink-0 w-8 h-8 bg-gradient-to-br from-[#D80027] to-[#A0001F] rounded-full flex items-center justify-center text-white font-bold text-sm",children:a+1}),e.jsx("h3",{className:"font-bold text-xl text-white pt-1",children:t.name})]}),t.description&&e.jsx("div",{className:"ml-12",children:G(t.description)})]},a))})]}),V.technologies&&Array.isArray(V.technologies)&&V.technologies.length>0&&e.jsxs(m.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.6,delay:.5},className:"bg-gradient-to-br from-[#1A1A1A] to-[#0F0F0F] rounded-3xl p-10 border border-gray-800/50 shadow-2xl",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[e.jsx("div",{className:"w-1 h-8 bg-gradient-to-b from-[#D80027] to-[#A0001F] rounded-full"}),e.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-white",children:J("Technologies","التقنيات")})]}),e.jsx("div",{className:"flex flex-wrap gap-4",children:V.technologies.map((t,a)=>e.jsx(m.span,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},transition:{delay:.6+.05*a},className:"px-5 py-3 bg-gradient-to-br from-[#D80027]/20 to-[#A0001F]/20 text-[#D80027] rounded-xl font-semibold border border-[#D80027]/30 hover:border-[#D80027]/60 hover:bg-gradient-to-br hover:from-[#D80027]/30 hover:to-[#A0001F]/30 transition-all cursor-default",children:t},a))})]}),V.methodology&&e.jsxs(m.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.6,delay:.65},className:"bg-gradient-to-br from-[#1A1A1A] to-[#0F0F0F] rounded-3xl p-10 border border-gray-800/50 shadow-2xl",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[e.jsx("div",{className:"w-1 h-8 bg-gradient-to-b from-[#D80027] to-[#A0001F] rounded-full"}),e.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-white",children:J("Methodology","المنهجية")})]}),e.jsx("div",{children:Array.isArray(V.methodology)?e.jsx("div",{className:"space-y-8",children:V.methodology.map((t,a)=>e.jsxs(m.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:.66+.1*a},className:"border-l-4 border-[#D80027] pl-6 py-3 bg-gradient-to-r from-[#D80027]/5 to-transparent rounded-r-lg",children:[t.name&&e.jsx("h3",{className:"font-bold text-xl text-white mb-4",children:t.name}),t.description&&G(t.description)]},a))}):"string"==typeof V.methodology?G(V.methodology):e.jsx("div",{className:"text-gray-300",children:JSON.stringify(V.methodology)})})]}),V.features&&Array.isArray(V.features)&&V.features.length>0&&e.jsxs(m.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.6,delay:.7},className:"bg-gradient-to-br from-[#1A1A1A] to-[#0F0F0F] rounded-3xl p-10 border border-gray-800/50 shadow-2xl",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[e.jsx("div",{className:"w-1 h-8 bg-gradient-to-b from-[#D80027] to-[#A0001F] rounded-full"}),e.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-white",children:J("Project Features","مميزات المشروع")})]}),e.jsx("div",{className:"space-y-8",children:V.features.map((t,a)=>e.jsxs(m.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.75+.1*a},className:"bg-gradient-to-br from-[#1F1F1F] to-[#151515] rounded-2xl p-8 border border-gray-800/50",children:[e.jsx("h3",{className:"text-2xl font-bold text-white mb-4",children:t.title}),t.description&&e.jsx("div",{className:"text-gray-300 mb-6",children:G(t.description)}),t.screens&&Array.isArray(t.screens)&&t.screens.length>0&&e.jsx("div",{className:"space-y-4 mt-6",children:t.screens.map((t,a)=>e.jsxs("div",{className:"bg-[#0F0F0F] rounded-xl p-6 border border-gray-800/30",children:[e.jsx("h4",{className:"font-semibold text-lg text-white mb-3",children:t.title}),t.description&&G(t.description)]},a))})]},a))})]}),V.deliverables&&Array.isArray(V.deliverables)&&V.deliverables.length>0&&e.jsxs(m.div,{initial:{opacity:0,y:30}
1,animate:{opacity:1,y:0},transition:{duration:.6,delay:.8},className:"bg-gradient-to-br from-[#1A1A1A] to-[#0F0F0F] rounded-3xl p-10 border border-gray-800/50 shadow-2xl",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[e.jsx("div",{className:"w-1 h-8 bg-gradient-to-b from-[#D80027] to-[#A0001F] rounded-full"}),e.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-white",children:J("Deliverables","المخرجات")})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:V.deliverables.map((t,a)=>e.jsxs(m.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:.85+.05*a},className:"flex items-center gap-3 p-4 bg-gradient-to-br from-[#1F1F1F] to-[#151515] rounded-xl border border-gray-800/50",children:[e.jsx("div",{className:"w-2 h-2 bg-[#D80027] rounded-full"}),e.jsx("span",{className:"text-gray-300 font-medium",children:t})]},a))})]}),V.third_parties&&Array.isArray(V.third_parties)&&V.third_parties.length>0&&e.jsxs(m.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.6,delay:.9},className:"bg-gradient-to-br from-[#1A1A1A] to-[#0F0F0F] rounded-3xl p-10 border border-gray-800/50 shadow-2xl",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[e.jsx("div",{className:"w-1 h-8 bg-gradient-to-b from-[#D80027] to-[#A0001F] rounded-full"}),e.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-white",children:J("Third Parties","أطراف خارجية")})]}),e.jsx("div",{className:"space-y-6",children:V.third_parties.map((t,a)=>e.jsxs(m.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:.95+.1*a},className:"border-l-4 border-[#D80027] pl-6 py-3 bg-gradient-to-r from-[#D80027]/5 to-transparent rounded-r-lg",children:[e.jsx("h3",{className:"font-bold text-xl text-white mb-3",children:t.name}),t.description&&G(t.description)]},a))})]}),V.out_of_scope&&Array.isArray(V.out_of_scope)&&V.out_of_scope.length>0&&e.jsxs(m.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.6,delay:1},"data-section":"out_of_scope",className:"bg-gradient-to-br from-[#1A1A1A] to-[#0F0F0F] rounded-3xl p-10 border border-red-500/30 shadow-2xl",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[e.jsx("div",{className:"w-1 h-8 bg-gradient-to-b from-red-500 to-red-700 rounded-full"}),e.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-white",children:J("Out of Scope","خارج النطاق")})]}),e.jsx("div",{className:"space-y-6",children:V.out_of_scope.map((t,a)=>e.jsxs(m.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:1.05+.1*a},className:"border-l-4 border-red-500 pl-6 py-3 bg-gradient-to-r from-red-500/5 to-transparent rounded-r-lg",children:[e.jsx("h3",{className:"font-bold text-xl text-white mb-3",children:t.name}),t.description&&G(t.description)]},a))})]}),V.assumptions&&Array.isArray(V.assumptions)&&V.assumptions.length>0&&e.jsxs("div",{"data-section":"assumptions",className:"bg-gradient-to-br from-[#1A1A1A] to-[#0F0F0F] rounded-3xl p-10 border border-amber-500/30 shadow-2xl",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[e.jsx("div",{className:"w-1 h-8 bg-gradient-to-b from-amber-400 to-amber-600 rounded-full"}),e.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-white",children:J("Assumptions","الافتراضات")})]}),e.jsx("div",{className:"space-y-6",children:V.assumptions.map((t,a)=>e.jsxs("div",{className:"border-s-4 border-amber-500 ps-6 py-3 bg-gradient-to-r from-amber-500/5 to-transparent rounded-e-lg",children:[e.jsx("h3",{className:"font-bold text-xl text-white mb-3",children:t.name}),t.description&&G(t.description)]},a))})]}),V.terms&&e.jsxs("div",{"data-section":"terms",className:"bg-gradient-to-br from-[#1A1A1A] to-[#0F0F0F] rounded-3xl p-10 border border-gray-800/50 shadow-2xl",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[e.jsx("div",{className:"w-1 h-8 bg-gradient-to-b from-[#D80027] to-[#A0001F] rounded-full"}),e.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-white",children:J("Terms & Conditions","الشروط والأحكام")})]}),e.jsx("div",{children:G(V.terms)})]}),V.notes&&e.jsxs(m.div,{initial:{opacity:0,y:30}
1,animate:{opacity:1,y:0},transition:{duration:.6,delay:1.1},className:"bg-gradient-to-br from-[#1A1A1A] to-[#0F0F0F] rounded-3xl p-10 border border-gray-800/50 shadow-2xl",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[e.jsx("div",{className:"w-1 h-8 bg-gradient-to-b from-[#D80027] to-[#A0001F] rounded-full"}),e.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-white",children:J("Notes","ملاحظات")})]}),e.jsx("div",{children:G(V.notes)})]}),V.timeline&&Array.isArray(V.timeline)&&V.timeline.length>0&&e.jsxs(m.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.6,delay:.6},className:"bg-gradient-to-br from-[#1A1A1A] to-[#0F0F0F] rounded-3xl p-10 border border-gray-800/50 shadow-2xl",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[e.jsx("div",{className:"w-1 h-8 bg-gradient-to-b from-[#D80027] to-[#A0001F] rounded-full"}),e.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-white",children:J("Timeline","الجدول الزمني")})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:`absolute ${K?"right-6":"left-6"} top-0 bottom-0 w-0.5 bg-gradient-to-b from-[#D80027] via-[#D80027]/50 to-transparent`}),e.jsx("div",{className:"space-y-8",children:V.timeline.map((t,a)=>e.jsxs(m.div,{initial:{opacity:0,x:K?20:-20},animate:{opacity:1,x:0},transition:{delay:.7+.1*a}
1,className:"relative "+(K?"pr-16":"pl-16"),children:[e.jsx("div",{className:`absolute ${K?"right-0":"left-0"} top-2 w-12 h-12 bg-gradient-to-br from-[#D80027] to-[#A0001F] rounded-full flex items-center justify-center border-4 border-[#0B0B0B] shadow-lg`,children:e.jsx("span",{className:"text-white font-bold text-sm",children:a+1})}),e.jsxs("div",{className:"bg-gradient-to-br from-[#1F1F1F] to-[#151515] rounded-2xl p-6 border border-gray-800/50",children:[e.jsxs("div",{className:"flex items-center gap-4 mb-4 flex-wrap",children:[e.jsx("h3",{className:"font-bold text-xl text-white",children:t.phase}),t.duration_value&&t.duration_unit&&e.jsxs("span",{className:"px-4 py-2 bg-gradient-to-br from-[#D80027]/30 to-[#A0001F]/30 text-[#D80027] rounded-lg text-sm font-semibold border border-[#D80027]/30",children:[t.duration_value," ",Z(t.duration_unit)]})]}),t.description&&G(t.description)]})]},a))})]})]})]}),e.jsxs(e.Fragment,{children:[V.pricing&&Array.isArray(V.pricing)&&V.pricing.length>0&&e.jsxs(m.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.6,delay:.3},"data-section":"pricing",className:"bg-gradient-to-br from-[#1A1A1A] to-[#0F0F0F] rounded-3xl p-10 border border-gray-800/50 shadow-2xl overflow-x-auto",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[e.jsx("div",{className:"w-1 h-8 bg-gradient-to-b from-[#D80027] to-[#A0001F] rounded-full"}),e.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-white",children:J("Pricing Details","تفاصيل التسعير")})]}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full border-collapse",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"bg-gradient-to-r from-[#D80027]/20 to-[#A0001F]/20",children:[e.jsx("th",{className:"border border-gray-700/50 p-4 text-start font-bold text-white",children:J("Item","البند")}),e.jsx("th",{className:"border border-gray-700/50 p-4 text-center font-bold text-white",children:J("Quantity","الكمية")}),e.jsx("th",{className:"border border-gray-700/50 p-4 text-center font-bold text-white",children:J("Unit Price","سعر الوحدة")}),e.jsx("th",{className:"border border-gray-700/50 p-4 text-center font-bold text-white",children:J("Total","الإجمالي")})]})}),e.jsx("tbody",{children:V.pricing.map((t,a)=>{const r=(Number(t.quantity)||0)*(Number(t.unit_price)||0),s=r<0,i=e=>(e<0?"−":"")+Math.abs(e).toLocaleString();return e.jsxs("tr",{className:s?"bg-emerald-500/10 border-b border-emerald-500/30":"hover:bg-gradient-to-r hover:from-[#D80027]/10 hover:to-transparent transition-colors border-b border-gray-800/50",children:[e.jsxs("td",{className:"border border-gray-700/50 p-4 font-medium "+(s?"text-emerald-300":"text-gray-300"),children:[t.item,s&&e.jsx("span",{className:"ms-2 inline-block align-middle rounded-full bg-emerald-500 px-2 py-0.5 text-[11px] font-bold uppercase tracking-wide text-black",children:J("Discount","خصم")})]}),e.jsx("td",{className:"border border-gray-700/50 p-4 text-center "+(s?"text-emerald-300":"text-gray-300"),children:t.quantity||0}),e.jsxs("td",{className:"border border-gray-700/50 p-4 text-center "+(s?"text-emerald-300":"text-gray-300"),children:[i(Number(t.unit_price)||0),X]}),e.jsxs("td",{className:"border border-gray-700/50 p-4 text-center font-bold "+(s?"text-emerald-400":"text-[#D80027]"),children:[i(r),X]})]},a)})}),(V.total_cost||V.pricing&&V.pricing.length>0)&&(()=>{const t=V.pricing.map(e=>(Number(e.quantity)||0)*(Number(e.unit_price)||0)),a=t.filter(e=>e>0).reduce((e,t)=>e+t,0),r=t.filter(e=>e<0).reduce((e,t)=>e-t,0),s=a-r,i=Math.max(0,Number(String(V.tax_rate??"").replace("%",""))||0),o=i?Math.round(s*i)/100:0,l=V.total_cost?`${Number(V.total_cost).toLocaleString()}${X}`:`${(s+o).toLocaleString()}${X}`;return e.jsxs("tfoot",{children:[r>0&&e.jsxs(e.Fragment,{children:[e.jsxs("tr",{className:"bg-white/5",children:[e.jsx("td",{colSpan:3,className:"border border-gray-700/50 p-3 text-end font-semibold text-gray-300",children:J("Subtotal:","المجموع قبل الخصم:")}),e.jsxs("td",{className:"border border-gray-700/50 p-3 text-center font-semibold text-gray-200",children:[a.toLocaleStr
1ing(),X]})]}),e.jsxs("tr",{className:"bg-emerald-500/10",children:[e.jsx("td",{colSpan:3,className:"border border-emerald-500/30 p-3 text-end font-bold text-emerald-300",children:J("Discount:","الخصم:")}),e.jsxs("td",{className:"border border-emerald-500/30 p-3 text-center font-bold text-emerald-400",children:["−",r.toLocaleString(),X]})]})]}),o>0&&e.jsxs(e.Fragment,{children:[r>0&&e.jsxs("tr",{className:"bg-white/5",children:[e.jsx("td",{colSpan:3,className:"border border-gray-700/50 p-3 text-end font-semibold text-gray-300",children:J("Net before tax:","الصافي قبل الضريبة:")}),e.jsxs("td",{className:"border border-gray-700/50 p-3 text-center font-semibold text-gray-200",children:[s.toLocaleString(),X]})]}),e.jsxs("tr",{className:"bg-white/5",children:[e.jsxs("td",{colSpan:3,className:"border border-gray-700/50 p-3 text-end font-semibold text-gray-300",children:[V.tax_label||`${J("VAT","ضريبة القيمة المضافة")} (${i}%)`,":"]}),e.jsxs("td",{className:"border border-gray-700/50 p-3 text-center font-semibold text-gray-200",children:[o.toLocaleString(),X]})]})]}),e.jsxs("tr",{className:"bg-gradient-to-r from-[#D80027]/30 to-[#A0001F]/30",children:[e.jsx("td",{colSpan:3,className:"border border-gray-700/50 p-4 text-end font-bold text-white",children:J("Total:","الإجمالي:")}),e.jsx("td",{className:"border border-gray-700/50 p-4 text-center font-bold text-[#D80027] text-xl",children:l})]})]})})()]})}),V.total_cost&&!X&&e.jsx("div",{className:"mt-6 text-right",children:e.jsxs("p",{className:"text-gray-300 text-lg",children:[e.jsx("span",{className:"font-semibold text-white",children:J("Total: ","الإجمالي: ")}),e.jsx("span",{className:"text-[#D80027] font-bold text-xl",children:V.total_cost.toLocaleString()})]})})]}),V.payment_terms&&e.jsxs(m.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.6,delay:.4},"data-section":"payment_terms",className:"bg-gradient-to-br from-[#1A1A1A] to-[#0F0F0F] rounded-3xl p-10 border border-gray-800/50 shadow-2xl",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[e.jsx("div",{className:"w-1 h-8 bg-gradient-to-b from-[#D80027] to-[#A0001F] rounded-full"}),e.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-white",children:J("Payment Terms","شروط الدفع")})]}),e.jsx(v,{html:V.payment_terms})]}),V.validity&&e.jsxs(m.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.6,delay:.5},className:"bg-gradient-to-br from-[#1A1A1A] to-[#0F0F0F] rounded-3xl p-10 border border-gray-800/50 shadow-2xl",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[e.jsx("div",{className:"w-1 h-8 bg-gradient-to-b from-[#D80027] to-[#A0001F] rounded-full"}),e.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-white",children:J("Validity","الصلاحية")})]}),e.jsx("p",{className:"text-xl text-gray-300 font-medium",children:V.validity})]}),V.notes&&e.jsxs(m.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.6,delay:.6},className:"bg-gradient-to-br from-[#1A1A1A] to-[#0F0F0F] rounded-3xl p-10 border border-gray-800/50 shadow-2xl",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[e.jsx("div",{className:"w-1 h-8 bg-gradient-to-b from-[#D80027] to-[#A0001F] rounded-full"}),e.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-white",children:J("Notes","ملاحظات")})]}),e.jsx("div",{children:G(V.notes)})]})]}),W&&e.jsxs("div",{className:"bg-gradient-to-br from-[#1A1A1A] to-[#0F0F0F] rounded-3xl p-10 border border-gray-800/50 shadow-2xl",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[e.jsx("div",{className:"w-1 h-8 bg-gradient-to-b from-[#D80027] to-[#A0001F] rounded-full"}),e.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-white",children:J("Contact Information","معلومات التواصل")})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-8",children:[$.lead_details&&e.jsxs(m.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:.9},className:"bg-gradient-to-br from-[#1F1F1F] to-[#151515] rounded-2xl p-6 border border-gray-800/50",children:[e.jsxs("h3",{className:"font-bold text-xl text-white mb-5 flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 bg-gradient-to-br from-[#D80027] to-[#A0001F] rounded-lg flex items-center justify-center",children:e.jsx(b,{className:"w-5 h-5 text-white"})}),J("Lead Details","بيانات العميل المحتمل")]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("p",{className:"text-white font-semibold text-lg",children:[$.lead_details.first_name," ",$.lead_details.last_name]}),$.lead_details.company&&e.jsx("p",{className:"text-gray-300",children:$.lead_details.company}),$.lead_details.email&&e.jsxs("p",{className:"text-gray-400 flex items-center gap-2",children:[e.jsx(y,{className:"w-4 h-4 text-[#D80027]"}),$.lead_details.email]}),$.lead_details.phone&&e.jsxs("p",{className:"text-gray-400 flex items-center gap-2",children:[e.jsx(f,{className:"w-4 h-4 text-[#D80027]"}),$.lead_details.phone]})]})]}),$.client_details&&e.jsxs(m.div,{initial:{opacity:0,scale:.95}
1,animate:{opacity:1,scale:1},transition:{delay:1},className:"bg-gradient-to-br from-[#1F1F1F] to-[#151515] rounded-2xl p-6 border border-gray-800/50",children:[e.jsxs("h3",{className:"font-bold text-xl text-white mb-5 flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 bg-gradient-to-br from-[#D80027] to-[#A0001F] rounded-lg flex items-center justify-center",children:e.jsx(b,{className:"w-5 h-5 text-white"})}),J("Client Details","بيانات العميل")]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{className:"text-white font-semibold text-lg",children:$.client_details.name}),$.client_details.company_name&&e.jsx("p",{className:"text-gray-300",children:$.client_details.company_name}),$.client_details.email&&e.jsxs("p",{className:"text-gray-400 flex items-center gap-2",children:[e.jsx(y,{className:"w-4 h-4 text-[#D80027]"}),$.client_details.email]}),$.client_details.phone&&e.jsxs("p",{className:"text-gray-400 flex items-center gap-2",children:[e.jsx(f,{className:"w-4 h-4 text-[#D80027]"}),$.client_details.phone]})]})]}),e.jsxs(m.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:1.1},className:"bg-gradient-to-br from-[#1F1F1F] to-[#151515] rounded-2xl p-6 border border-gray-800/50",children:[e.jsxs("h3",{className:"font-bold text-xl text-white mb-5 flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 bg-gradient-to-br from-[#D80027] to-[#A0001F] rounded-lg flex items-center justify-center",children:e.jsx(u,{className:"w-5 h-5 text-white"})}),J("Important Dates","تواريخ مهمة")]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-gray-400 text-sm mb-1",children:J("Created At","تاريخ الإنشاء")}),e.jsx("p",{className:"text-white font-semibold",children:H($.created_at)})]}),$.expires_at&&e.jsxs("div",{children:[e.jsx("p",{className:"text-gray-400 text-sm mb-1",children:J("Expires At","تاريخ الانتهاء")}),e.jsx("p",{className:"text-white font-semibold",children:H($.expires_at)})]})]})]})]})]})]})})})]})]})};export{F as default};

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.