vendor: 8,967 bytes, line 1
1import{j as n}from"./editor-BhGk7_S1.js";import{b}from"./leaflet-DcfcX7a_.js";import{M as rt,d as ot,b as E,t as N,L as B}from"./index-BjIHAQhU.js";import{B as x}from"./button-CK76V7Lo.js";import{C as Q}from"./card-CaSmhJ1l.js";import{D as it,a as lt,b as dt,c as ut}from"./dialog-DDbhAKMR.js";import{I as L}from"./input-BtSXPsMX.js";import{L as k}from"./label-DwWfObJM.js";import{S as mt,a as ft,b as gt,c as xt,d as q}from"./select-C0Q9juWM.js";import{R as ht}from"./RichTextEditor-CU8s82Az.js";import{E as pt}from"./EcosystemContactForm-CXmPcDBq.js";import{g as yt}from"./countryUtils-Dpgj6xvN.js";import{A as Dt}from"./arrow-left-DCV3pRgt.js";import{S as A}from"./square-pen-syxzeoxO.js";import{M as Et}from"./map-pin-Cg1SEPDo.js";import{G as Ct}from"./globe-rpSIUeg6.js";import{g as P,t as p,f as w,n as wt,h as R,j as jt,k as J,e as bt}from"./en-US-DGPccpSd.js";import{P as Nt}from"./plus-cTouNM34.js";import{T as vt}from"./trash-2-D_KuvKG4.js";import{C as Ot}from"./circle-BnkF3ps0.js";import{C as kt}from"./clock-Cd1A4l_3.js";import{C as Mt}from"./check-DFqoFjW9.js";import"./mapbox-BPFQ-Sfv.js";import"./trpc-DqtxhgQo.js";import"./index-CmmlU_cv.js";import"./x-rm1_-8OE.js";import"./index-CHxMfpQB.js";import"./index-C23KnXi3.js";import"./chevron-down-BC8hO1vL.js";import"./chevron-up-DhLuLA_x.js";import"./palette-DTyCI4bH.js";import"./CountryCombobox-D-DmjyR9.js";import"./countryTranslations--xXtAg9U.js";import"./search-DBs4wGfH.js";import"./chevrons-up-down-nO4j0qv-.js";import"./upload-B4mJ3u4C.js";import"./user-DC4ZvlJI.js";import"./building-2-B6GsHRhA.js";function v(s,e){const t=P(),a=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??t.weekStartsOn??t.locale?.options?.weekStartsOn??0,c=p(s,e?.in),r=c.getDay(),d=(r<a?7:0)+r-a;return c.setDate(c.getDate()-d),c.setHours(0,0,0,0),c}function S(s,e){return v(s,{...e,weekStartsOn:1})}function K(s,e){const t=p(s,e?.in),a=t.getFullYear(),c=w(t,0);c.setFullYear(a+1,0,4),c.setHours(0,0,0,0);const r=S(c),d=w(t,0);d.setFullYear(a,0,4),d.setHours(0,0,0,0);const m=S(d);return t.getTime()>=r.getTime()?a+1:t.getTime()>=m.getTime()?a:a-1}function X(s,e){const t=p(s,e?.in);return t.setHours(0,0,0,0),t}function St(s,e,t){const[a,c]=wt(t?.in,s,e),r=X(a),d=X(c),m=+r-R(r),g=+d-R(d);return Math.round((m-g)/jt)}function Pt(s,e){const t=K(s,e),a=w(s,0);return a.setFullYear(t,0,4),a.setHours(0,0,0,0),S(a)}function Yt(s){return s instanceof Date||typeof s=="object"&&Object.prototype.toString.call(s)==="[object Date]"}function Tt(s){return!(!Yt(s)&&typeof s!="number"||isNaN(+p(s)))}function Ft(s,e){const t=p(s,e?.in);return t.setFullYear(t.getFullYear(),0,1),t.setHours(0,0,0,0),t}function Wt(s,e){const t=p(s,e?.in);return St(t,Ft(t))+1}function Lt(s,e){const t=p(s,e?.in),a=+S(t)-+Pt(t);return Math.round(a/J)+1}function Z(s,e){const t=p(s,e?.in),a=t.getFullYear(),c=P(),r=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??c.firstWeekContainsDate??c.locale?.options?.firstWeekContainsDate??1,d=w(e?.in||s,0);d.setFullYear(a+1,0,r),d.setHours(0,0,0,0);const m=v(d,e),g=w(e?.in||s,0);g.setFullYear(a,0,r),g.setHours(0,0,0,0);const h=v(g,e);return+t>=+m?a+1:+t>=+h?a:a-1}function qt(s,e){const t=P(),a=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??t.firstWeekContainsDate??t.locale?.options?.firstWeekContainsDate??1,c=Z(s,e),r=w(e?.in||s,0);return r.setFullYear(c,0,a),r.setHours(0,0,0,0),v(r,e)}function At(s,e){const t=p(s,e?.in),a=+v(t,e)-+qt(t,e);return Math.round(a/J)+1}function o(s,e){const t=s<0?"-":"",a=Math.abs(s).toString().padStart(e,"0");return t+a}const y={y(s,e){const t=s.getFullYear(),a=t>0?t:1-t;return o(e==="yy"?a%100:a,e.length)},M(s,e){const t=s.getMonth();return e==="M"?String(t+1):o(t+1,2)},d(s,e){return o(s.getDate(),e.length)},a(s,e){const t=s.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.toUpperCase();case"aaa":return t;case"aaaaa":return t[0];case"aaaa":default:return t==="am"?"a.m.":"p.m."}},h(s,e){return o(s.getHours()%12||12,e.length)},H(s,e){return o(s.getHours(),e.length)},m(s,e){return o(s.getMinutes(),e.length)},s(s,e){return o(s.getSeconds(),e.length)},S(s,e){const t=e.length,a=s.getMilliseconds(),c=Math.trunc(a*Math.pow(10,t-3));return o(c,e.length)}},C={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},$={G:function(s,e,t){const a=s.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return t.era(a,{width:"abbreviated"});case"GGGGG":return t.era(a,{width:"narrow"});case"GGGG":default:return t.era(a,{width:"wide"})}},y:function(s,e,t){if(e==="yo"){const a=s.getFullYear(),c=a>0?a:1-a;return t.ordinalNumber(c,{unit:"year"})}return y.y(s,e)},Y:function(s,e,t,a){const c=Z(s,a),r=c>0?c:1-c;if(e==="YY"){const d=r%100;return o(d,2)}return e==="Yo"?t.ordinalNumber(r,{unit:"year"}):o(r,e.length)},R:function(s,e){const t=K(s);return o(t,e.length)},u:function(s,e){const t=s.getFullYear();return o(t,e.length)},Q:function(s,e,t){const a=Math.ceil((s.getMonth()+1)/3);switch(e){case"Q":return String(a);case"QQ":return o(a,2);case"Qo":return t.ordinalNumber(a,{unit:"quarter"});case"QQQ":return t.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return t.quarter(a,{width:"wide",context:"formatting"})}},q:function(s,e,t){const a=Math.ceil((s.getMonth()+1)/3);switch(e){case"q":return String(a);case"qq":return o(a,2);case"qo":return t.ordinalNumber(a,{unit:"quarter"});case"qqq":return t.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return t.quarter(a,{width:"wide",context:"standalone"})}},M:function(s,e,t){const a=s.getMonth();switch(e){case"M":case"MM":return y.M(s,e);case"Mo":return t.ordinalNumber(a+1,{unit:"month"});case"MMM":return t.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return t.month(a,{width:"wide",context:"formatting"})}},L:function(s,e,t){const a=s.getMonth();switch(e){case"L":return String(a+1);case"LL":return o(a+1,2);case"Lo":return t.ordinalNumber(a+1,{unit:"month"});case"LLL":return t.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return t.month(a,{width:"wide",context:"standalone"})}},w:function(s,e,t,a){const c=At(s,a);return e==="wo"?t.ordinalNumber(c,{unit:"week"}):o(c,e.length)},I:function(s,e,t){const a=Lt(s);return e==="Io"?t.ordinalNumber(a,{unit:"week"}):o(a,e.length)},d:function(s,e,t){return e==="do"?t.ordinalNumber(s.getDate(),{unit:"date"}):y.d(s,e)},D:function(s,e,t){const a=Wt(s);return e==="Do"?t.ordinalNumber(a,{unit:"dayOfYear"}):o(a,e.length)},E:function(s,e,t){const a=s.getDay();switch(e){case"E":case"EE":case"EEE":return t.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(a,{width:"short",context:"formatting"});case"EEEE":default:return t.day(a,{width:"wide",context:"formatting"})}},e:function(s,e,t,a){const c=s.getDay(),r=(c-a.weekStartsOn+8)%7||7;switch(e){case"e":return String(r);case"ee":return o(r,2);case"eo":return t.ordinalNumber(r,{unit:"day"});case"eee":return t.day(c,{width:"abbreviated",context:"formatting"});case"eeeee":return t.day(c,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(c,{width:"short",context:"formatting"});case"eeee":default:return t.day(c,{width:"wide",context:"formatting"})}},c:function(s,e,t,a){const c=s.getDay(),r=(c-a.weekStartsOn+8)%7||7;switch(e){case"c":return String(r);case"cc":return o(r,e.length);case"co":return t.ordinalNumber(r,{unit:"day"});case"ccc":return t.day(c,{width:"abbreviated",context:"standalone"});case"ccccc":return t.day(c,{width:"narrow",context:"standalone"});case"cccccc":return t.day(c,{width:"short",context:"standalone"});case"cccc":default:return t.day(c,{width:"wide",context:"standalone"})}},i:function(s,e,t){const a=s.getDay(),c=a===0?7:a;switch(e){case"i":return String(c);case"ii":return o(c,e.length);case"io":return t.ordinalNumber(c,{unit:"day"});case"iii":return t.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(a,{width:"short",context:"formatting"});case"iiii":default:return t.day(a,{width:"wide",context:"formatting"})}},a:function(s,e,t){const c=s.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.dayPeriod(c,{width:"abbreviated",context:"formatting"});case"aaa":return t.dayPeriod(c,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return t.dayPeriod(c,{width:"narrow",context:"formatting"});case"aaaa":default:return t.dayPeriod(c,{width:"wide",context:"formatting"})}},b:function(s,e,t){const a=s.getHours();let c;switch(a===12?c=C.noon:a===0?c=C.midnight:c=a/12>
vendor: 4,254 bytes, line 1
1=1?"pm":"am",e){case"b":case"bb":return t.dayPeriod(c,{width:"abbreviated",context:"formatting"});case"bbb":return t.dayPeriod(c,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return t.dayPeriod(c,{width:"narrow",context:"formatting"});case"bbbb":default:return t.dayPeriod(c,{width:"wide",context:"formatting"})}},B:function(s,e,t){const a=s.getHours();let c;switch(a>=17?c=C.evening:a>=12?c=C.afternoon:a>=4?c=C.morning:c=C.night,e){case"B":case"BB":case"BBB":return t.dayPeriod(c,{width:"abbreviated",context:"formatting"});case"BBBBB":return t.dayPeriod(c,{width:"narrow",context:"formatting"});case"BBBB":default:return t.dayPeriod(c,{width:"wide",context:"formatting"})}},h:function(s,e,t){if(e==="ho"){let a=s.getHours()%12;return a===0&&(a=12),t.ordinalNumber(a,{unit:"hour"})}return y.h(s,e)},H:function(s,e,t){return e==="Ho"?t.ordinalNumber(s.getHours(),{unit:"hour"}):y.H(s,e)},K:function(s,e,t){const a=s.getHours()%12;return e==="Ko"?t.ordinalNumber(a,{unit:"hour"}):o(a,e.length)},k:function(s,e,t){let a=s.getHours();return a===0&&(a=24),e==="ko"?t.ordinalNumber(a,{unit:"hour"}):o(a,e.length)},m:function(s,e,t){return e==="mo"?t.ordinalNumber(s.getMinutes(),{unit:"minute"}):y.m(s,e)},s:function(s,e,t){return e==="so"?t.ordinalNumber(s.getSeconds(),{unit:"second"}):y.s(s,e)},S:function(s,e){return y.S(s,e)},X:function(s,e,t){const a=s.getTimezoneOffset();if(a===0)return"Z";switch(e){case"X":return U(a);case"XXXX":case"XX":return D(a);case"XXXXX":case"XXX":default:return D(a,":")}},x:function(s,e,t){const a=s.getTimezoneOffset();switch(e){case"x":return U(a);case"xxxx":case"xx":return D(a);case"xxxxx":case"xxx":default:return D(a,":")}},O:function(s,e,t){const a=s.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+V(a,":");case"OOOO":default:return"GMT"+D(a,":")}},z:function(s,e,t){const a=s.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+V(a,":");case"zzzz":default:return"GMT"+D(a,":")}},t:function(s,e,t){const a=Math.trunc(+s/1e3);return o(a,e.length)},T:function(s,e,t){return o(+s,e.length)}};function V(s,e=""){const t=s>0?"-":"+",a=Math.abs(s),c=Math.trunc(a/60),r=a%60;return r===0?t+String(c):t+String(c)+e+o(r,2)}function U(s,e){return s%60===0?(s>0?"-":"+")+o(Math.abs(s)/60,2):D(s,e)}function D(s,e=""){const t=s>0?"-":"+",a=Math.abs(s),c=o(Math.trunc(a/60),2),r=o(a%60,2);return t+c+e+r}const z=(s,e)=>{switch(s){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},tt=(s,e)=>{switch(s){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},It=(s,e)=>{const t=s.match(/(P+)(p+)?/)||[],a=t[1],c=t[2];if(!c)return z(s,e);let r;switch(a){case"P":r=e.dateTime({width:"short"});break;case"PP":r=e.dateTime({width:"medium"});break;case"PPP":r=e.dateTime({width:"long"});break;case"PPPP":default:r=e.dateTime({width:"full"});break}return r.replace("{{date}}",z(a,e)).replace("{{time}}",tt(c,e))},_t={p:tt,P:It},Ht=/^D+$/,Gt=/^Y+$/,Bt=["D","DD","YY","YYYY"];function Qt(s){return Ht.test(s)}function Rt(s){return Gt.test(s)}function Xt(s,e,t){const a=$t(s,e,t);if(console.warn(a),Bt.includes(s))throw new RangeError(a)}function $t(s,e,t){const a=s[0]==="Y"?"years":"days of the month";return`Use \`${s.toLowerCase()}\` instead of \`${s}\` (in \`${e}\`) for formatting ${a} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Vt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ut=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,zt=/^'([^]*?)'?$/,Jt=/''/g,Kt=/[a-zA-Z]/;function M(s,e,t){const a=P(),c=a.locale??bt,r=a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,d=a.weekStartsOn??a.locale?.options?.weekStartsOn??0,m=p(s,t?.in);if(!Tt(m))throw new RangeError("Invalid time value");let g=e.match(Ut).map(l=>{const u=l[0];if(u==="p"||u==="P"){const j=_t[u];return j(l,c.formatLong)}return l}).join("").match(Vt).map(l=>{if(l==="''")return{isToken:!1,value:"'"};const u=l[0];if(u==="'")return{isToken:!1,value:Zt(l)};if($[u])return{isToken:!0,value:l};
1if(u.match(Kt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+u+"`");return{isToken:!1,value:l}});c.localize.preprocessor&&(g=c.localize.preprocessor(m,g));const h={firstWeekContainsDate:r,weekStartsOn:d,locale:c};return g.map(l=>{if(!l.isToken)return l.value;const u=l.value;(Rt(u)||Qt(u))&&Xt(u,e,String(s));const j=$[u[0]];return j(m,u,c.localize,h)}).join("")}function Zt(s){const e=s.match(zt);return e?e[1].replace(Jt,"'"):s}function Ae(){const[,s]=rt("/ecosystem-contact/:id");ot();const e=s?.id?parseInt(s.id):null,{data:t,isLoading:a,refetch:c}=E.ecosystem.getById.useQuery({id:e},{enabled:!!e}),{data:r}=E.countries.list.useQuery(),[d,m]=b.useState(!1),[g,h]=b.useState(!1),[l,u]=b.useState(null),[j,Y]=b.useState(!1),T=b.useRef(null),I=E.ecosystem.update.useMutation({onSuccess:()=>{N.success("Contact updated successfully"),c(),m(!1)},onError:i=>{N.error(i.message)}}),_=E.ecosystem.createAction.useMutation({onSuccess:()=>{N.success("Action created successfully"),c(),h(!1),u(null)}}),H=E.ecosystem.updateAction.useMutation({onSuccess:()=>{N.success("Action updated successfully"),c(),h(!1),u(null)}}),et=E.ecosystem.deleteAction.useMutation({onSuccess:()=>{N.success("Action deleted successfully"),c()}}),st=()=>{if(!t||!T.current)return;const i=T.current.getContent();I.mutate({id:t.id,type:t.type,scope:t.scope,countryId:t.countryId||void 0,countries:t.countries||void 0,name:t.name,firstName:t.firstName||void 0,email:t.email||void 0,phone:t.phone||void 0,contactFirstName:t.contactFirstName||void 0,contactLastName:t.contactLastName||void 0,contactEmail:t.contactEmail||void 0,contactPhone:t.contactPhone||void 0,imageUrl:t.imageUrl||void 0,detailedNotes:i})},at=i=>{i.preventDefault();const f=new FormData(i.currentTarget),O={title:f.get("title"),description:f.get("description"),targetDate:f.get("targetDate")||void 0,status:f.get("status")};l?H.mutate({id:l.id,...O}):_.mutate({contactId:t.id,...O})};if(a)return n.jsxs("div",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:116",className:"min-h-screen bg-background text-foreground flex items-center justify-center",children:[n.jsx("div",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:117",className:"starfield"}),n.jsx("div",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:118",className:"text-muted-foreground",children:"Loading contact..."})]});if(!t)return n.jsxs("div",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:125",className:"min-h-screen bg-background text-foreground flex items-center justify-center",children:[n.jsx("div",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:126",className:"starfield"}),n.jsxs("div",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:127",className:"text-center",children:[n.jsx("h2",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:128",className:"text-2xl font-bold mb-4",children:"Contact not found"}),n.jsx(B,{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:129",href:"/all-contact-ecosystem",children:n.jsx(x,{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:130",children:"Back to list"})})]})]});const F=t.type==="person"?`${t.firstName||""} ${t.name}`.trim():t.name,nt=i=>{switch(i){case"completed":return n.jsx(Mt,{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:144",className:"w-4 h-4 text-[oklch(0.50_0.15_259)]"});case"in_progress":return n.jsx(kt,{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:14
16",className:"w-4 h-4 text-orange-500"});default:return n.jsx(Ot,{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:148",className:"w-4 h-4 text-gray-500"})}},ct=i=>{switch(i){case"completed":return"Completed";case"in_progress":return"In Progress";default:return"Not Started"}};return n.jsxs("div",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:164",className:"min-h-screen bg-background text-foreground",children:[n.jsx("div",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:165",className:"starfield"}),n.jsxs("div",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:167",className:"relative z-10",children:[n.jsx("header",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:169",className:"border-b border-border bg-card/50 backdrop-blur-sm",children:n.jsxs("div",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:170",className:"container py-6",children:[n.jsx("div",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:171",className:"flex items-center gap-4 mb-4",children:n.jsx(B,{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:172",href:"/all-contact-ecosystem",children:n.jsxs(x,{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:173",variant:"ghost",size:"sm",children:[n.jsx(Dt,{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:174",className:"w-4 h-4 mr-2"}),"Back"]})})}),n.jsxs("div",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:180",className:"flex items-start gap-6",children:[n.jsx("div",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:182",className:"w-24 h-24 rounded-full bg-blue-600 flex items-center justify-center overflow-hidden flex-shrink-0",children:t.imageUrl?n.jsx("img",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:184",src:t.imageUrl,alt:F,className:"w-full h-full object-cover"}):n.jsx("span",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:190",className:"text-white text-4xl font-bold",children:F.charAt(0).toUpperCase()})}),n.jsxs("div",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:197",className:"flex-1",children:[n.jsxs("div",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:198",className:"flex items-center justify-between mb-2",children:[n.jsx("h1",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:199",className:"text-4xl font-bold",children:F}),n.jsxs(x,{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:200",onClick:()=>Y(!0),variant:"outline",size:"sm",children:[n.jsx(A,{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:205",className:"w-4 h-4 mr-2"}),"Edit Contact"]})]}),n.jsxs("div",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:209",className:"flex items-center gap-4 text-muted-foreground",children:[n.jsx("span",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:210",className:"capitalize",children:t.type}),n.jsx("span",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:211",children:"â¢"}),t.scope==="national"&&t.countryId?n.jsxs("div",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:213",className:"flex items-center gap-2",children:[n.jsx(Et,{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:214",className:"w-4 h-4"}),n.jsxs("span",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:215",children:["National - ",r&&r.find(f=>f.id===t.countryId)?.name||t.countryId]})]}):n.jsxs("div",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:222",className:"flex items-center gap-2 flex-wrap",children:[n.jsx(Ct,{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:223",className:"w-4 h-4"}),n.jsx("span",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:224",children:"International"}),t.countries&&(()=>{try{const i=JSON.parse(t.countries);if(Array.isArray(i)&&i.length>0&&r)return n.jsx("span",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:230",className:"flex items-center gap-2 flex-wrap",children:i.map(f=>{const O=r.find(W=>W.id===f),G=yt(f);return n.jsxs("span",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:235",className:"flex items-center gap-1",children:[G&&n.jsx("img",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:237",src:`https://flagcdn.com/20x15/${G}.png`,alt:f,width:20,height:15,className:"object-contain",onError:W=>{W.target.style.display="none"}}),n.jsx("span",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:246",className:"text-sm",children:O?.name||f})]},f)})})}catch{return null}return null})()]})]}),t.type!=="person"&&(t.contactFirstName||t.contactLastName)&&n.jsxs("div",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:264",className:"mt-3 text-sm",children:[n.jsx("span",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:265",className:"text-muted-foreground",children:"Contact: "}),n.jsxs("span",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:266",children:[t.contactFirstName," ",t.contactLastName]}),t.contactEmail&&n.jsxs("span",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:267",className:"ml-2 text-muted-foreground",children:["⢠",t.contactEmail]}),t.contactPhone&&n.jsxs("span",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:268",className:"ml-2 text-muted-foreground",children:["⢠",t.contactPhone]})]}),t.type==="person"&&n.jsxs("div",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:273",className:"mt-3 text-sm",children:[t.email&&n.jsx("div",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:274",className:"text-muted-foreground",children:t.email}),t.phone&&n.jsx("div",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:275",className:"text-muted-foreground",children:t.phone})]}),n.jsxs("div",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:279",className:"mt-3 text-xs text-muted-foreground",children:["Created by ",t.creatorFirstName," ",t.creatorLastName," ⢠Last updated ",M(new Date(t.updatedAt),"MMM d, yyyy")]})]})]})]})}),n.jsxs("main",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:289",className:"container py-8 space-y-8",children:[n.jsx("section",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:291",children:n.jsxs(Q,{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:292",className:"p-6",children:[n.jsxs("div",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:293",className:"flex justify-between items-center mb-4",children:[n.jsx("h2",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:294",className:"text-2xl font-bold",children:"Detailed Notes"}),d?n.jsxs("div",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:301",className:"flex gap-2",children:[n.jsx(x,{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:302",onClick:st,size:"sm",disabled:I.isPending,children:"Save"}),n.jsx(x,{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:305",onClick:()=>m(!1),variant:"outline",size:"sm",children:"Cancel"})]}):n.jsxs(x,{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:296",onClick:()=>m(!0),size:"sm",children:[n.jsx(A,{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:297",className:"w-4 h-4 mr-2"}),"Edit"]})]}),d?n.jsx(ht,{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:313",ref:T,initialContent:t.detailedNotes||"",placeholder:"Add detailed notes about this contact..."}):n.jsx("div",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:319",className:"prose prose-sm max-w-none",dangerouslySetInnerHTML:{__html:t.detailedNotes||"<p class='text-muted-foreground'>No notes yet.</p>"}})]})}),n.jsx("section",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:328",children:n.jsxs(Q,{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:329",className:"p-6",children:[n.jsxs("div",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:330",className:"flex justify-between items-center mb-6",children:[n.jsx("h2",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:331",className:"text-2xl font-bold",children:"Actions"}),n.jsxs(x,{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:332",onClick:()=>{u(null),h(!0)},size:"sm",children:[n.jsx(Nt,{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:333",className:"w-4 h-4 mr-2"}),"Add Action"]})]}),t.actions&&t.actions.length>0?n.jsx("div",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:339",className:"space-y-4",children:t.actions.map(i=>n.jsxs("div",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:341",className:"flex items-start gap-4 p-4 border border-border rounded-lg hover:bg-accent/50 transition-colors",children:[n.jsx("div",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:342",className:"mt-1",children:nt(i.status)}),n.jsxs("div",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:343",className:"flex-1",children:[n.jsx("h3",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:344",className:"font-semibold",children:i.title}),i.description&&n.jsx("p",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:346",className:"text-sm text-muted-foreground mt-1",children:i.description}),n.jsxs("div",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:348",className:"flex items-center gap-4 mt-2 text-xs text-muted-foreground",children:[n.jsx("span",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:349",children:ct(i.status)}),i.targetDate&&n.jsxs(n.Fragment,{children:[n.jsx("span",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:352",children:"â¢"}),n.jsxs("span",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:353",children:["Target: ",M(new Date(i.targetDate),"MMM d, yyyy")]})]}),n.jsx("span",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:356",children:"â¢"}),n.jsxs("span",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:357",children:["Created ",M(new Date(i.createdAt),"MMM d, yyyy")]})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:360",className:"flex gap-2",children:[n.jsx(x,{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:361",variant:"ghost",size:"sm",onClick:()=>{u(i),h(!0)},children:n.jsx(A,{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:366",className:"w-4 h-4"})}),n.jsx(x,{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:368",variant:"ghost",size:"sm",onClick:()=>{confirm("Delete this action?")&&et.mutate({id:i.id})},children:n.jsx(vt,{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:377",className:"w-4 h-4"})})]})]},i.id))}):n.jsx("p",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:384",className:"text-muted-foreground",children:"No actions yet."})]})})]})]}),n.jsx(it,{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:392",open:g,onOpenChange:h,children:n.jsxs(lt,{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:393",children:[n.jsx(dt,{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:394",children:n.jsx(ut,{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:395",children:l?"Edit Action":"Add Action"})}),n.jsxs("form",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:397",onSubmit:at,className:"space-y-4",children:[n.jsxs("div",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:398",children:[n.jsx(k,{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:399",htmlFor:"title",children:"Title *"}),n.jsx(L,{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:400",id:"title",name:"title",required:!0,defaultValue:l?.title||""})]}),n.jsxs("div",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:408",children:[n.jsx(k,{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:409",htmlFor:"description",children:"Description"}),n.jsx(L,{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:410",id:"description",name:"description",defaultValue:l?.description||""})]}),n.jsxs("div",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:417",children:[n.jsx(k,{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:418",htmlFor:"targetDate",children:"Target Date"}),n.jsx(L,{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:419",id:"targetDate",name:"targetDate",type:"date",defaultValue:l?.targetDate?M(new Date(l.targetDate),"yyyy-MM-dd"):""})]}),n.jsxs("div",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:427",children:[n.jsx(k,{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:428",htmlFor:"status",children:"Status"}),n.jsxs(mt,{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:429",name:"status",defaultValue:l?.status||"not_started",children:[n.jsx(ft,{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:430",children:n.jsx(gt,{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:431"})}),n.jsxs(xt,{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:433",children:[n.jsx(q,{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:434",value:"not_started",children:"Not Started"}),n.jsx(q,{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:435",value:"in_progress",children:"In Progress"}),n.jsx(q,{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:436",value:"completed",children:"Completed"})]})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:441",className:"flex justify-end gap-2",children:[n.jsx(x,{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:442",type:"button",variant:"outline",onClick:()=>h(!1),children:"Cancel"}),n.jsx(x,{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:445",type:"submit",disabled:_.isPending||H.isPending,children:l?"Update":"Create"})]})]})]})}),n.jsx(pt,{"data-loc":"client/src/pages/EcosystemContactDetail.tsx:454",open:j,onOpenChange:Y,contactId:e||void 0,onSuccess:()=>{Y(!1),c()}})]})}export{Ae 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.