1import{_ as S}from"./Bsr9gsXp.js";import{_ as V}from"./V1CGmUic.js";import{_ as I}from"./D38dgDGl.js";import{_ as q}from"./Dgs6hFTu.js";import{s as A,d as C,b as T,e as a,A as o,B as y,z as s,o as d,g as k,C as O,Z as E,W as L,$ as U,v as R,x as W,c as x,y as M,f as D,t as H,N as Q,ae as Y,bb as J,a9 as K,Q as Z}from"./Bcc8-a-q.js";import{_ as G}from"./CkZIPPbP.js";import{_ as X}from"./PZOoVSBw.js";import{_ as ee}from"./0TAyzOoh.js";import{_ as te}from"./BOVYd6wN.js";import oe from"./9pjYCGkJ.js";import{_ as ae}from"./C7ekgcrX.js";import{_ as ne}from"./lG5wCdur.js";import{_ as ie}from"./Dl1_4wy8.js";import{u as P}from"./_bZiThFm.js";import"./ClL-Wh03.js";import"./C8HfZjon.js";import"./osqaVy29.js";import"./CfUektVg.js";import"./CdE3OqS9.js";import"./D3ZPBIcn.js";import"./GXeVycEb.js";import"./BclhCOHB.js";import"./BcP8u4_i.js";import"./C1Wiwm26.js";import"./BYb-KmIu.js";import"./zzNotYg1.js";import"./DwdgSWLY.js";import"./Bl7E7JBY.js";import"./5UZX8MeU.js";import"./CUHCQ4-k.js";import"./BESgyjMO.js";import"./B8rpExb1.js";import"./oaYCrmSY.js";import"./BbcwGbeQ.js";import"./DhvmxAeg.js";import"./BZqjWkfA.js";import"./D0A7qCQ_.js";import"./Cw8iTAvs.js";import"./DKu5Ecgv.js";import"./DWG-3fiB.js";const j=A(!1);function se(){return{showSidebar:j,toggleSidebar:()=>{j.value=!j.value}}}const re={class:"w-full space-y-4 md:flex md:items-center md:space-x-6 md:space-y-0"},le={class:"flex items-center bg-gray-800 rounded-lg md:justify-between md:flex-1"},ce={class:"px-4 py-3"},me={class:"flex items-center justify-end flex-shrink-0 p-2 space-x-2"},pe={class:"hidden gap-2 md:flex"},_e=C({__name:"Header",props:{title:{},organization:{}},setup(w){const{toggleSidebar:r}=se();return(t,e)=>{const u=S,n=V,m=I,f=q;return d(),T("header",re,[a("div",le,[a("div",ce,[o(u,{class:"h-6 text-white"})]),o(n,{size:"xs",content:`Proposal for ${t.organization}`,class:"text-white"},null,8,["content"]),a("div",me,[o(m,{class:"hidden text-gray-200 md:block hover:text-gray-400"})])]),a("div",pe,[o(f,{color:"primary",size:"lg",onClick:e[0]||(e[0]=g=>("navigateTo"in t?t.navigateTo:s(O))("#accept"))},{default:y(()=>e[1]||(e[1]=[k("Accept Proposal")])),_:1,__:[1]}),o(f,{variant:"outline",class:"uppercase",icon:"i-heroicons-chat-bubble-bottom-center-text",onClick:s(r)},null,8,["onClick"])])])}}}),de={class:"relative flex items-center justify-center w-full h-screen border-b-2 border-primary"},ue={class:"relative flex flex-col justify-center"},fe={class:"mt-12 space-y-6 text-center"},ge={class:"flex flex-col items-center justify-center space-y-2"},be={class:"flex flex-col items-center justify-center space-y-2"},he=C({__name:"Hero",props:{name:{},organization:{},owner:{}},setup(w){return(r,t)=>{const e=S,u=V,n=G,m=X,f=q,g=ee;return d(),T("div",de,[t[2]||(t[2]=a("div",{class:"absolute inset-0 bg-gradient-to-br from-white via-gray-300 to-primary/70 dark:from-gray-800 dark:via-gray-900 dark:to-gray-600"},null,-1)),t[3]||(t[3]=a("div",{class:"absolute inset-0 opacity-50 grain-bg dark:opacity-10"},null,-1)),a("div",ue,[o(e,{class:"h-6 mx-auto dark:text-white text-gray"}),a("div",fe,[o(u,{content:r.name,size:"title"},null,8,["content"]),a("div",ge,[o(n,null,{default:y(()=>t[0]||(t[0]=[k("For:")])),_:1,__:[0]}),o(u,{content:r.organization},null,8,["content"])]),o(m),a("div",be,[o(n,null,{default:y(()=>t[1]||(t[1]=[k("Prepared by:")])),_:1,__:[1]})])]),o(g,{to:"#content",class:"mx-auto"},{default:y(()=>[o(f,{icon:"material-symbols:arrow-downward-rounded",class:"mt-12 animate-bounce",size:"xl"})]),_:1})])])}}}),ye={class:"relative max-w-3xl p-8 mx-auto overflow-hidden text-gray-900 bg-transparent bg-gray-100 border-2 dark:bg-gray-800 border-primary rounded-xl"},ve={class:"space-y-2 text-center"},xe={class:"px-3 py-4 rounded-lg bg-primary"},ke={class:"mt-8"},we={class:"mb-4"},$e=C({__name:"Acceptance",async setup(w){let r,t;const{query:e,params:u}=E();if(e&&e.approver){const l=([r,t]=L(()=>P(U("contacts",e.approver,{fields:["first_name","last_name","email"]}))),r=await r,t(),r);e.first_name=l.first_name,e.last_name=l.last_name,e.email=l.email}function n(l){const i={};return Object.keys(l).forEach(c=>{if(c.startsWith("prefill_")){const _=c.replace("prefill_","");i[_]=l[c]}}),i}const m=R({...n(e)}),f=A(null),g=A(!1),$={submit_label:"Accept Proposal",success_message:"Success! Your form has been submitted.",size:"lg",schema:[{name:"first_name",type:"text",label:"First Name",placeholder:"John",description:null,validation:"required",width:"50"},{name:"last_name",type:"text",label:"Last Name",validation:"required",width:"50"},{name:"email",type:"text",label:"Email",placeholder:"[email protected]",validation:"required",width:"100"},{name:"organization",type:"text",label:"Company",description:"What's the name of your company / organization?",width:"100"},{name:"signature",type:"signature",label:"Signature",description:"Please sign your name.",width:"100",validation:"required",options:["type","draw","upload"]},{name:"esignature_agreement",type:"checkbox",label:"I agree that my electronic signature is as valid and legally binding as a handwritten signature.",validation:"required",width:"100"}]};function B(l){const i=new FormData;return l.forEach((c,_)=>{i.append("file",c)}),P(J(i))}async function N(){var l,i,c;try{const{signature:_,...b}=m;let p={};const h=(l=m.signature)==null?void 0:l.image;if(h){const v=await B([h]);p.signature_image=v.id}p.signature_type=(i=m.signature)==null?void 0:i.type,p.signature_text=(c=m.signature)==null?void 0:c.text,p={...p,...b,contact:(e==null?void 0:e.approver)??void 0,proposal:u.id??void 0},await P(Y("os_proposal_approvals",p)),g.value=!0}catch{}}return(l,i)=>{const c=oe,_=V,b=ae,p=ne,h=ie,v=W("auto-animate");return d(),x(h,null,{default:y(()=>[a("div",ye,[a("div",ve,[a("span",xe,[o(c,{name:"solar:check-read-outline",class:"w-12 h-12 text-white"})]),o(_,{content:"Accept Proposal"}),i[1]||(i[1]=a("p",{class:"dark:text-gray-200"},"To accept this document, fill out the form and click the button below.",-1))]),a("div",ke,[M((d(),T("div",null,[a("div",we,[s(f)?(d(),x(b,{key:0,t
1ype:"error"},{default:y(()=>[k("Oops! "+H(s(f)),1)]),_:1})):D("",!0),s(g)?(d(),x(b,{key:1,type:"success"},{default:y(()=>[k(H($.success_message||"Success! Your form has been submitted."),1)]),_:1})):D("",!0)]),s(g)?D("",!0):(d(),x(p,{key:0,modelValue:s(m),"onUpdate:modelValue":i[0]||(i[0]=z=>Q(m)?m.value=z:null),form:{schema:$.schema},type:"form","on-submit":N,"submit-label":$.submit_label},null,8,["modelValue","form","submit-label"]))])),[[v]])])])]),_:1})}}}),ze={class:""},De={class:"overflow-y-auto"},dt=C({__name:"[id]",async setup(w){let r,t;const{params:e,path:u}=E(),{data:n,pending:m,error:f}=([r,t]=L(()=>Z(u,()=>P(U("os_proposals",e.id,{fields:["name",{organization:["name","logo","brand_color"],owner:["first_name","last_name","avatar","title"],blocks:["collection",{item:{block_hero:["id","title","headline","content","image","buttons","image_position"],block_faqs:["id","title","faqs","headline","alignment"],block_richtext:["id","title","headline","content","alignment"],block_testimonials:["id","title","headline",{testimonials:[{testimonials_id:["id","title","subtitle","content","company","company_logo",{image:["id","title","description"]}]}]}],block_quote:["id","title","subtitle","content"],block_cta:["id","title","headline","content","buttons"],block_form:["id","title","headline",{form:["*"]}],block_logocloud:["id","title","headline",{logos:["*"]}],block_gallery:["id","title","headline",{gallery_items:[{directus_files_id:["id","title","description"]}]}],block_steps:["id","title","headline","show_step_numbers","alternate_image_position",{steps:["id","title","content","image"]}],block_columns:["id","title","headline",{rows:["title","headline","content","image_position",{image:["id","title","description"]}]}],block_divider:["id","title"],block_team:["*"],block_html:["*"],block_video:["*"],block_cardgroup:["*"]}}]}]})),"$rcOg_KHiCQ")),r=await r,t(),r);if(!n.value)throw K({statusCode:404,statusMessage:"Page Not Found"});return(g,$)=>{var c,_,b,p,h,v,z,F;const B=_e,N=he,l=te,i=$e;return d(),T("div",ze,[o(B,{title:(c=s(n))==null?void 0:c.name,class:"fixed top-0 z-20 flex justify-center w-full p-2",name:(_=s(n))==null?void 0:_.name,organization:(p=(b=s(n))==null?void 0:b.organization)==null?void 0:p.name},null,8,["title","name","organization"]),a("div",De,[o(N,{class:"pt-36",name:(h=s(n))==null?void 0:h.name,owner:(v=s(n))==null?void 0:v.owner,organization:(F=(z=s(n))==null?void 0:z.organization)==null?void 0:F.name},null,8,["name","owner","organization"]),s(n)?(d(),x(l,{key:0,id:"content",page:s(n)},null,8,["page"])):D("",!0),o(i,{id:"accept",class:"max-w-3xl mx-auto"})])])}}});export{dt 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.