1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[949],{74460:function(e,t,n){var o=n(85893),s=n(67294),r=n(58060),l=n(77722),i=n(81037);t.Z=function(e){var t,n,a=e.data,c=e.onDataChange,d=e.onComplete,u=(0,s.useState)({lat:0,lon:0}),p=u[0],m=u[1],x=(0,s.useState)(null),f=x[0],v=x[1];(0,i.a)().userProfile;if((0,s.useEffect)((function(){var t,n;if((null===e||void 0===e||null===(t=e.allData)||void 0===t||null===(n=t.school)||void 0===n?void 0:n.info)&&!f){var o,s=null===e||void 0===e||null===(o=e.allData)||void 0===o?void 0:o.school;m({lat:s.info.lat,lon:s.info.lon}),v(s),d(!0)}}),[null===e||void 0===e||null===(t=e.allData)||void 0===t||null===(n=t.school)||void 0===n?void 0:n.info]),(null===a||void 0===a?void 0:a.nces_id)&&!p.lat){var h="school/nces/".concat(null===a||void 0===a?void 0:a.nces_id);(0,l.Xo)(h,"GET").then((function(e){e&&(console.log("Screen goes blank regardless of the code"),m({lat:e.lat,lon:e.lon}),v(e),d(!0))}),(function(e){console.warn("Error getting school data:",e)}))}return(0,o.jsx)("div",{className:"h-full flex flex-col overflow-auto",children:(0,o.jsx)("div",{className:"flex-1 min-h-0 h-full",children:(0,o.jsx)(r.Z,{zoom:12,center:p,defaultMarker:function(e){return(null===e||void 0===e?void 0:e.NCESSCH)===(null===f||void 0===f?void 0:f.nces_id)},renderSelectedMarkerButtons:function(e,t){return(0,o.jsxs)("div",{className:"flex items-center hover:text-blue-700 text-blue-500 font-bold py-1 px-2 rounded",onClick:function(n){if(n.stopPropagation(),e.NCESSCH){t.lat&&t.lon||(t.lat=e.LAT,t.lon=e.LON);var o={nces_id:e.NCESSCH,school:e.NAME,city:e.CITY,state:e.STATE,info:t};c(o),d(!0)}},children:[(0,o.jsx)("span",{className:"material-symbols-rounded",children:"where_to_vote"}),(0,o.jsx)("span",{className:"uppercase text-xs",children:"Select"})]})}})})})}},54803:function(e,t,n){n.d(t,{Z:function(){return F}});var o=n(47568),s=n(26042),r=n(69396),l=n(29815),i=n(97582),a=n(85893),c=n(67294),d=n(77722),u=n(8545),p=n(57126),m=n(8852),x=(n(3672),n(10108)),f=n(11355),v=n(19747),h=function(e){var t=e.project,n=e.defaultTopic,o=void 0===n?"":n,s=e.onSuccess,r=(0,c.useState)(!1),l=r[0],i=r[1],d=(0,c.useState)(o),u=d[0],p=d[1],m=(0,c.useState)(null),x=m[0],h=m[1],g=(0,c.useState)(!1),b=g[0],j=g[1];(0,c.useEffect)((function(){console.log("Checking project sources:",null===t||void 0===t?void 0:t.item_count),(null===t||void 0===t?void 0:t.item_count)>0?(j(!0),console.log("Has Sources:",t.sources)):j(!1)}),[t]);var y=function(){i(!1),p(o),h(null)};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(v.Z,{label:"Create Report",icon:"description",onClick:function(){i(!0),h(null)},disabled:!b}),l&&(0,a.jsx)("div",{id:"createReportDialog",children:(0,a.jsxs)(f.Z,{title:"Create Report",onClose:y,children:[(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsx)("label",{className:"block text-gray-700 font-semibold mb-2",children:"Report Topic"}),(0,a.jsx)("input",{type:"text",name:"topic",value:u,onChange:function(e){var t=e.target.value;h(null),p(t)},placeholder:"Enter report topic",className:"block w-full border border-gray-300 rounded p-2",required:!0})]}),(0,a.jsxs)("div",{className:"flex justify-end",children:[x&&(0,a.jsx)("p",{className:"text-red-500 text-sm mx-auto",children:x}),(0,a.jsx)(v.Z,{label:"Create Report",icon:"send",endpoint:"create_report",method:"POST",body:{topic:u,research_id:null===t||void 0===t?void 0:t.id,citation_style:"APA",word_count_target:1e3,user_id:t.permissions.permitUser.uid},onError:function(e){h((null===e||void 0===e?void 0:e.detail)||"An error occurred")},onSuccess:function(e){h(null),s&&s(e),y()}})]})]})})]})},g=(n(78542),n(74460),n(81037)),b=(n(10048),n(50036),n(24712)),j=(function(){var e=(0,o.Z)((function(e,t,n,o){var s,r,l;return(0,i.__generator)(this,(function(i){return console.log("Asking Question:",e,t,n,o),t="ss",(s=d.td.getResearchId(e,t))?(r=d.td.getItemIds(e,t,n),l={subject:t,topic:n,grade_level:o,research_id:s,research_items:r},"common-core"!==e&&(l.state=e),console.log("Payload:",l),[2,(0,d.Xo)("extract_standards","POST",l)]):(console.error("Research ID not found for:",e,t),[2])}))}))}(),function(e){var t=e.project,n=e.userId,o=e.onSuccess,s=e.label,r=void 0===s?"Make a Copy":s,l=e.modalTitle,i=void 0===l?"Confirm Project Clone":l,d=e.cloneLabel,u=void 0===d?"Confirm Clone":d,p=(0,c.useState)(!1),m=p[0],x=p[1],h=(0,c.useState)(null),g=h[0],b=h[1],j=function(){b(null),x(!1)},y="research/clone?research_id=".concat(t.id,"&user_id=").concat(n);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(v.Z,{label:r,icon:"content_copy",onClick:function(){x(!0),b(null)}}),m&&(0,a.jsx)("div",{id:"cloneProjectDialog",children:(0,a.jsxs)(f.Z,{title:i,onClose:j,footer:(0,a.jsx)(v.Z,{label:u,icon:"check_circle",endpoint:y,method:"POST",onError:function(e){return b((null===e||void 0===e?void 0:e.detail)||"An error occurred")},onSuccess:function(e){b(null),o&&o(e);try{j()}catch(t){console.error("Error closing modal:",t)}}}),children:[(0,a.jsx)("div",{className:"mb-4 text-lg",children:"Are you sure you want to clone this project?"}),g&&(0,a.jsx)("p",{className:"text-red-500 text-sm mt-1",children:g})]})})]})}),y=n(14924),_=n(41664),N=n.n(_),w=(n(60280),n(45697)),C=n.n(w),S=function(e){var t=e.title,n=e.expandable,o=e.expanded,s=e.children,r=(0,c.useState)(o||!0),l=r[0],i=r[1];return(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between cursor-pointer",onClick:function(){n&&i(!l)},children:[(0,a.jsx)("h3",{className:"text-sm uppercase text-gray-500",children:t}),n&&(0,a.jsx)("span",{className:"material-symbols-rounded text-gray-500 hover:text-gray-700",children:l?"expand_less":"expand_more"})]}),l&&(0,a.jsx)("div",{className:"mt-2",children:s})]})};S.propTypes={title:C().string.isRequired,expandable:C().bool,expanded:C().bool,children:C().node.isRequired};var k=S,Z=n(23382),E=n(88767),P=function(e){var t,n,l,u,p,m,x=e.project,f=(e.notes,e.reports,e.onSuccess),h=x.type,b=x.title,j=x.description,_=x.goals,N=(x.item_count,x.collaborators,x.visibility),w=x.permissions,C=x.default_tab,S=((0,E.useQueryClient)(),(0,g.a)()),P=S.user,T=(S.userProfile,(0,c.useState)(!1)),R=T[0],L=T[1],D=(0,c.useState)(x),I=D[0],A=D[1],F=(0,c.useState)({type:"",id:""}),B=(F[0],F[1],(0,c.useState)(null)),q=B[0],Q=B[1],O=(0,c.useState)({dis
1playName:(null===x||void 0===x||null===(t=x.sponsor_info)||void 0===t?void 0:t.displayName)||"",visibility:N||"private",description:j||"",type:h||"research",goals:_||"",default_tab:C||"",sponsor_info:{sponsor_id:(null===x||void 0===x||null===(n=x.sponsor_info)||void 0===n?void 0:n.sponsor_id)||"",displayName:(null===x||void 0===x||null===(l=x.sponsor_info)||void 0===l?void 0:l.displayName)||"",sponsorLink:(null===x||void 0===x||null===(u=x.sponsor_info)||void 0===u?void 0:u.sponsorLink)||"",accentColor:(null===x||void 0===x||null===(p=x.sponsor_info)||void 0===p?void 0:p.accentColor)||"#ffffff",backgroundImage:(null===x||void 0===x||null===(m=x.sponsor_info)||void 0===m?void 0:m.backgroundImage)||""}}),X=O[0],U=O[1];(0,c.useEffect)((function(){var e=(0,r.Z)((0,s.Z)({},x),{visibility:X.visibility,description:X.description,type:X.type,goals:X.goals,sponsor_info:X.sponsor_info,default_tab:X.default_tab});A(e)}),[X,x]);var W=function(e,t){U((function(n){return(0,r.Z)((0,s.Z)({},n),(0,y.Z)({},e,t))}))},G=(0,E.useQuery)("sponsors",(0,o.Z)((function(){return(0,i.__generator)(this,(function(e){switch(e.label){case 0:return[4,(0,d.Xo)("sponsors").catch((function(e){console.error("Error fetching sponsors:",e)}))];case 1:return[2,e.sent()]}}))}))).data,z=void 0===G?[]:G;return(0,a.jsxs)("div",{className:"w-full mx-auto p-6 bg-white",children:[(null===w||void 0===w?void 0:w.can_edit())&&(0,a.jsx)("div",{className:"flex justify-start space-x-4 sticky top-0 bg-white border",children:R?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(v.Z,{onClick:function(){return L(!1)},label:"Cancel",icon:"close"}),(0,a.jsx)(v.Z,{endpoint:"research",method:"POST",body:I,label:"Save",icon:"save",onSuccess:function(){return f&&f(I),void L(!1)}})]}):(0,a.jsxs)("div",{className:"flex text-blue-700 cursor-pointer mb-1 text-sm",onClick:function(){return L(!0)},children:[(0,a.jsx)("span",{className:"material-symbols-rounded text-gray-500 mr-1",children:"edit"}),(0,a.jsx)("span",{children:"Edit"})]})}),(0,a.jsx)("div",{className:"flex justify-between items-center",children:(0,a.jsx)("h2",{className:"text-2xl font-bold text-gray-800",children:b})}),(0,a.jsxs)("div",{className:"mt-4 space-y-4",children:[(0,a.jsx)(k,{title:"Type",children:R?(0,a.jsxs)("select",{value:X.type,onChange:function(e){return W("type",e.target.value)},className:"w-full p-2 border border-gray-300 rounded-lg",children:[(0,a.jsx)("option",{value:"research",children:"Research"}),"admin"===(null===P||void 0===P?void 0:P.role)&&(0,a.jsx)("option",{value:"lesson",children:"Lesson"}),x.permissions.is_admin()&&(0,a.jsx)("option",{value:"library",children:"Library"})]}):(0,a.jsx)("p",{className:"text-gray-600",children:X.type})}),(0,a.jsx)(k,{title:"Description",children:R?(0,a.jsx)("textarea",{value:X.description,onChange:function(e){return W("description",e.target.value)},className:"w-full p-2 border border-gray-300 rounded-lg",rows:"4",placeholder:"Enter Project Description"}):(0,a.jsx)("p",{className:"text-gray-600",children:X.description||"No Description Set"})}),(0,a.jsx)(k,{title:"Goals",children:R?(0,a.jsx)("textarea",{value:X.goals,onChange:function(e){return W("goals",e.target.value)},className:"w-full p-2 border border-gray-300 rounded-lg",rows:"4",placeholder:"Enter Project Goals"}):(0,a.jsx)("p",{className:"text-gray-600",children:X.goals||"No Goals Set"})}),(0,a.jsx)(k,{title:"Default Tab",children:(0,a.jsxs)("div",{className:"flex space-x-4",children:[(0,a.jsx)("button",{onClick:function(){R&&W("default_tab","cover_page")},className:"px-4 py-2 rounded-lg text-sm font-medium transition ".concat("cover_page"===X.default_tab?"bg-blue-600 text-white":"bg-gray-200 text-gray-600 hover:bg-gray-300"),children:"Cover Page"}),(0,a.jsx)("button",{onClick:function(){R&&W("default_tab","sources")},className:"px-4 py-2 rounded-lg text-sm font-medium transition ".concat("sources"===X.default_tab?"bg-blue-600 text-white":"bg-gray-200 text-gray-600 hover:bg-gray-300"),children:"Sources"}),(0,a.jsx)("button",{onClick:function(){R&&W("default_tab","q_and_a")},className:"px-4 py-2 rounded-lg text-sm font-medium transition ".concat("q_and_a"===X.default_tab?"bg-blue-600 text-white":"bg-gray-200 text-gray-600 hover:bg-gray-300"),children:"Q & A"}),(0,a.jsx)("button",{onClick:function(){R&&W("default_tab","reports")},className:"px-4 py-2 rounded-lg text-sm font-medium transition ".concat("reports"===X.default_tab?"bg-blue-600 text-white":"bg-gray-200 text-gray-600 hover:bg-gray-300"),children:"Reports"}),(0,a.jsx)("button",{onClick:function(){R&&W("default_tab","lesson_plan")},className:"px-4 py-2 rounded-lg text-sm font-medium transition ".concat("lesson_plan"===X.default_tab?"bg-blue-600 text-white":"bg-gray-200 text-gray-600 hover:bg-gray-300"),children:"Lesson Plan"}),(0,a.jsx)("button",{onClick:function(){R&&W("default_tab","notes")},className:"px-4 py-2 rounded-lg text-sm font-medium transition ".concat("notes"===X.default_tab?"bg-blue-600 text-white":"bg-gray-200 text-gray-600 hover:bg-gray-300"),children:"Notes"}),(0,a.jsx)("button",{onClick:function(){R&&W("default_tab","details")},className:"px-4 py-2 rounded-lg text-sm font-medium transition ".concat("details"===X.default_tab?"bg-blue-600 text-white":"bg-gray-200 text-gray-600 hover:bg-gray-300"),children:"Details"})]})}),(0,a.jsx)(k,{title:"Visibility",children:R&&x.permissions.is_admin()?(0,a.jsxs)("div",{className:"flex space-x-4",children:[(0,a.jsx)("button",{onClick:function(){return W("visibility","private")},className:"px-4 py-2 rounded-lg text-sm font-medium transition ".concat("private"===X.visibility?"bg-blue-600 text-white":"bg-gray-200 text-gray-600 hover:bg-gray-300"),children:"Private"}),(0,a.jsx)("button",{onClick:function(){return W("visibility","public")},className:"px-4 py-2 rounded-lg text-sm font-medium transition ".concat("public"===X.visibility?"bg-blue-600 text-white":"bg-gray-200 text-gray-600 hover:bg-gray-300"),children:"Public"})]}):(0,a.jsx)("div",{className:"bg-gray-100 p-2 rounded-lg",children:(0,a.jsx)("p",{className:"text-gray-600",children:"public"===X.visibility?"This research project is visible to anyone. However, only notes explicitly marked 'public' will be visible to others except collaborators.":"This research project is visible only to you and your collaborators."})})}),(0,a.jsx)(k,{title:"Sponsorship",children:R&&x.permissions.is_admin()?(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("ul",{children:z.map((function(e){return(0,a.jsx)("li",{className:(null===q||void 0===q?void 0:q.id)===e.id?"border border-blue-500 p-2 rounded-lg w-[200px]":"p-2 w-[200px]",onClick:function(){var t,n;t="sponsor_id",n=e.id,U((function(e){return(0,r.Z)((0,s.Z)({},e),{sponsor_info:(0,r.Z)((0,s.Z)({},e.sponsor_info),(0,y.Z)({},t,n))})})),Q(e)},children:(0,a.jsx)(Z.Z,{sponsor:e,layout:"textBelow",disable:!0})},e.id)}))})}):(0,a.jsx)("div",{className:"flex flex-col items-start bg-gray-100 p-2 rounded-lg",children:(0,a.jsx)(Z.Z,{sponsor:null===X||void 0===X?void 0:X.sponsor_info,layout:"textBelow",disable:!0})})})]})]})},T=function(e){var t=e.project,n=e.researchId,s=e.onSuccess,r=(0,c.useState)(!1),l=r[0],u=r[1],p=(0,c.useState)(null),m=p[0],x=p[1],h=(0,c.useState)(null),g=h[0],b=h[1],j=(0,c.useState)(!1),y=j[0],_=j[1],N=(0,c.useState)(null),w=N[0],C=N[1],S=(0,E.useQuery)(["research_items",n],(function(){return(0,d.Xo)("research_items/".concat(n))}),{enabled:!!n&&l}),k=S.data,Z=S.error,P=S.isLoading,T=function(){u(!1),x(null),b(null)},R=(0,c.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;x(e),b(t)}),[]),L=function(){var e=(0,o.Z)((function(){var e,n;return(0,i.__generator)(this,(function(o){switch(o.label){case 0:if(!m)return[2];
1_(!0),e={id:t.id,title:t.title,description:t.description,visibility:t.visibility,goals:t.goals,sponsor_info:t.sponsor_info,default_tab:t.default_tab,cover_item_id:m.id,cover_item_data:g||null},o.label=1;case 1:return o.trys.push([1,3,4,5]),[4,(0,d.Xo)("research","POST",e)];case 2:return o.sent(),console.log("Cover page updated:",m),s&&s(m,g),T(),[3,5];case 3:return n=o.sent(),console.error("Error updating cover page:",n),[3,5];case 4:return _(!1),[7];case 5:return[2]}}))}));return function(){return e.apply(this,arguments)}}(),D=(0,c.useCallback)((function(e){return(null===k||void 0===k?void 0:k.filter((function(t){return t.item_type===e})))||[]}),[k]),I=function(e){return e.map((function(e){var t;return(0,a.jsxs)("li",{className:"cursor-pointer hover:bg-gray-100 p-2 rounded ".concat((null===m||void 0===m?void 0:m.id)===e.id?"bg-blue-100":""),onClick:function(){return R(e)},ariaSelected:(null===m||void 0===m?void 0:m.id)===e.id,children:[(0,a.jsxs)("div",{className:"flex items-center",children:[(null===m||void 0===m?void 0:m.id)===e.id&&(0,a.jsx)("span",{className:"material-symbols-rounded mr-2 text-blue-500",children:"check"}),(0,a.jsx)("span",{className:"material-symbols-rounded mr-2 text-gray-500",children:"description"}),(0,a.jsx)("span",{children:(null===(t=e.item_data)||void 0===t?void 0:t.title)||"No title available"})]}),e.notes&&(0,a.jsx)("ul",{className:"pl-4 mt-2 w-full",children:e.notes.map((function(t,n){return(0,a.jsxs)("li",{className:"flex items-center cursor-pointer hover:bg-gray-100 p-2 rounded ".concat(g===t?"bg-green-100":""),onClick:function(n){n.stopPropagation(),R(e,t)},children:[g===t&&(0,a.jsx)("span",{className:"material-symbols-rounded mr-2 text-green-500",children:"check"}),(0,a.jsx)("span",{className:"material-symbols-rounded mr-2 text-gray-500",children:"sticky_note_2"}),(0,a.jsx)("span",{className:"truncate",children:t.note})]},n)}))})]},e.id)}))};return Z?(0,a.jsx)("div",{children:"Error loading research items"}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(v.Z,{label:"Set Cover Page",icon:"image",onClick:function(){return u(!0)}}),l&&(0,a.jsx)(f.Z,{title:"Set Cover Page",onClose:T,footer:(0,a.jsx)(v.Z,{label:"Confirm",onClick:L,disabled:!m||y,isLoading:y,className:"ml-auto bg-white ".concat(m?"":"opacity-50 cursor-not-allowed")}),height:"h-3/4",children:P?(0,a.jsx)("div",{children:"Loading items..."}):(0,a.jsxs)("div",{children:[(0,a.jsxs)("p",{className:"text-sm text-gray-600 py-2",children:["The default cover page for this project is the project description.",(0,a.jsx)("br",{}),"Select a research note, report, or lesson plan to use as the cover page for this project."]}),(0,a.jsxs)("div",{className:"mt-4",children:[(0,a.jsxs)("h4",{className:"flex text-md font-bold text-gray-700 cursor-pointer",onClick:function(){return C("reports"===w?null:"reports")},children:[(0,a.jsx)("span",{className:"material-symbols-rounded mr-2 text-gray-500",children:"reports"===w?"arrow_drop_down":"arrow_right"}),(0,a.jsx)("span",{children:"Reports"})]}),"reports"===w&&(0,a.jsx)("ul",{className:"space-y-2 mt-2 pb-8",children:I(D("report"))})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("h4",{className:"flex text-md font-bold text-gray-700 mt-2 cursor-pointer",onClick:function(){return C("notes"===w?null:"notes")},children:[(0,a.jsx)("span",{className:"material-symbols-rounded mr-2 text-gray-500",children:"notes"===w?"arrow_drop_down":"arrow_right"}),(0,a.jsx)("span",{children:"Research Notes"})]}),"notes"===w&&(0,a.jsx)("ul",{className:"space-y-2 mt-2",children:I(D("note"))})]}),(0,a.jsxs)("div",{className:"mt-4",children:[(0,a.jsxs)("h4",{className:"flex text-md font-bold text-gray-700 cursor-pointer",onClick:function(){return C("lesson_plan"===w?null:"lesson_plan")},children:[(0,a.jsx)("span",{className:"material-symbols-rounded mr-2 text-gray-500",children:"lesson_plan"===w?"arrow_drop_down":"arrow_right"}),(0,a.jsx)("span",{children:"Lesson Plans"})]}),"lesson_plan"===w&&(0,a.jsx)("ul",{className:"space-y-2 mt-2 pb-8",children:I(D("lesson_plan"))})]})]})})]})},R=n(11163),L=n(84952),D=n(92681);
1function I(e){var t=e.project,n=e.defaultRole,o=void 0===n?"Viewer":n,s=(e.urlToCopy,(0,c.useState)(!1)),r=s[0],l=s[1],i=(0,g.a)().user,u=(0,E.useQueryClient)(),p="research_collaborator",m=(0,E.useQuery)(["collaborators",t.id],(function(){return(0,d.Xo)("".concat(p,"s/").concat(t.id))}),{enabled:!!t.id,staleTime:1/0,cacheTime:1/0,refetchOnMount:!1,refetchOnWindowFocus:!1,refetchOnReconnect:!1}),x=m.data,h=(m.error,m.isLoading,["Viewer","User","Collaborator","-- remove access"]),b=(0,c.useState)(""),j=b[0],y=b[1],_=(0,c.useState)(o),N=_[0],w=_[1],C=(0,c.useState)(""),S=C[0],k=C[1],Z=(0,c.useState)("Restricted"),P=(Z[0],Z[1],(0,c.useState)("Viewer")),T=(P[0],P[1],function(){console.log("Invalidating collaborators query"),u.invalidateQueries(["collaborators",t.id]),y(""),w(o),k("")});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(v.Z,{label:"Share",icon:"group_add",className:"font-bold",onClick:function(){l(!0),k(null)}}),r&&(0,a.jsx)("div",{id:"inviteCollaboratorDialog",children:(0,a.jsxs)(f.Z,{title:'Share "'.concat(t.title,'"'),onClose:function(){l(!1),k(null)},children:[(0,a.jsxs)("div",{className:"flex items-center mb-6 space-x-4",children:[(0,a.jsx)("input",{type:"email",value:j,onChange:function(e){return y(e.target.value)},placeholder:"Add Email...",className:"flex-1 border border-gray-300 p-2 rounded-lg shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500"}),(0,a.jsx)("select",{value:N,onChange:function(e){return w(e.target.value)},className:"border border-gray-300 p-2 rounded-lg shadow-sm",children:h.filter((function(e){return"-- remove access"!==e})).map((function(e){return(0,a.jsx)("option",{value:e,selected:e.toLowerCase()===o.toLowerCase(),children:e},e)}))}),(0,a.jsx)(v.Z,{label:"Invite",icon:"send",endpoint:p,method:"PUT",check:function(){return function(e){var t=/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)&&e.length>0&&e!=(null===i||void 0===i?void 0:i.email);return k(t?"":"Please enter a valid email address"),t}(j)},body:{email:j,research_id:null===t||void 0===t?void 0:t.id,owner_id:null===t||void 0===t?void 0:t.user_id,role:N.toLowerCase()},onError:function(e){console.log(e),k((null===e||void 0===e?void 0:e.detail)||"An error occurred")},onSuccess:function(){T()}})]}),S&&(0,a.jsx)("p",{className:"text-red-500 mb-4",children:S}),(0,a.jsx)("h3",{className:"text-md font-semibold mb-3",children:"People with access"}),(0,a.jsx)("ul",{children:null===x||void 0===x?void 0:x.map((function(e,n){return(0,a.jsxs)("li",{className:"grid grid-cols-[2fr,1fr] gap-4 items-center mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)("span",{className:"bg-gray-200 rounded-full flex items-center justify-center p-1 w-10 h-10",children:e.profile_image&&""!==e.profile_image?(0,a.jsx)("img",{src:e.profile_image,alt:"Profile",className:"rounded-full w-full h-full object-cover"}):(0,a.jsx)("span",{className:"material-symbols-rounded text-gray-500 text-2xl",children:"account_circle"})}),(0,a.jsxs)("div",{className:"ml-3",children:[(0,a.jsx)("span",{className:"text-gray-600",children:e.display_name||e.email}),(0,a.jsx)("p",{className:"text-gray-500 text-xs",children:e.status})]})]}),(0,a.jsx)("select",{value:e.role,onChange:function(e){return function(e,n){"-- remove access"===n?(0,d.Xo)("".concat(p),"DELETE",{id:x[e].id,research_id:t.id}).then((function(){console.log("Invalidating collaborators query"),u.invalidateQueries(["collaborators",t.id])})).catch((function(e){k((null===e||void 0===e?void 0:e.detail)||"An error occurred")})):(0,d.Xo)("".concat(p),"POST",{id:x[e].id,research_id:t.id,role:n.toLowerCase()}).then((function(){console.log("Invalidating collaborators query"),u.invalidateQueries(["collaborators",t.id])})).catch((function(e){k((null===e||void 0===e?void 0:e.detail)||"An error occurred")}))}(n,e.target.value)},className:"p-1 rounded-lg shadow-sm text-gray-600",children:h.map((function(t){var n;return(0,a.jsx)("option",{value:t,selected:t.toLowerCase()===(null===e||void 0===e||null===(n=e.collab_role)||void 0===n?void 0:n.toLowerCase()),children:t},t)}))})]},n)}))})]})})]})}var A={cover_page:{actionButtons:[]},collaborators:{actionButtons:[]},sources:{actionButtons:[]},notes:{actionButtons:[]},reports:{actionButtons:[]},details:{actionButtons:[]},Q_and_A:{actionButtons:[]},lesson_plan:{actionButtons:[]}},F=function(e){var t,n=e.project,f=e.researchId,v=e.fullpage,y=e.embedded,_=e.onData,w=(0,g.a)(),C=w.user,S=w.logAppEvent,k=w.isSignedIn,F=(0,c.useState)("gray"),B=F[0],q=F[1],Q=(0,c.useState)(!1),O
1=Q[0],X=Q[1],U=(0,c.useState)(!1),W=U[0],G=U[1],z=(0,c.useState)(null),V=z[0],H=z[1],M=(0,c.useState)(null),$=(M[0],M[1],(0,c.useState)([])),Y=$[0],J=($[1],(0,c.useState)(!1)),K=J[0],ee=J[1],te=(0,c.useState)(["cover_page","sources","q_and_a","reports","lesson_plan","notes","details"]),ne=te[0],oe=te[1],se=(0,L.qD)().setProject,re=(0,c.useState)(n),le=re[0],ie=re[1],ae=(0,c.useState)(!0),ce=ae[0],de=ae[1],ue=(0,c.useState)(!1),pe=ue[0],me=ue[1],xe=(0,c.useState)(!1),fe=xe[0],ve=xe[1],he=(0,c.useState)(!1),ge=he[0],be=he[1],je=(0,c.useState)(!1),ye=je[0],_e=je[1],Ne=(0,c.useState)(!0),we=(Ne[0],Ne[1]),Ce=(0,c.useState)(null),Se=Ce[0],ke=Ce[1],Ze=(0,c.useState)(null),Ee=(Ze[0],Ze[1]),Pe=(0,c.useState)(!1),Te=Pe[0],Re=Pe[1],Le=(0,c.useRef)(null),De=(0,E.useQueryClient)(),Ie=(0,R.useRouter)(),Ae=(0,c.useState)(!1),Fe=Ae[0],Be=Ae[1],qe=(0,c.useState)([]),Qe=qe[0],Oe=qe[1],Xe=(0,c.useState)(null),Ue=(Xe[0],Xe[1]),We=(0,E.useQuery)(["research_items",null===le||void 0===le?void 0:le.id],(function(){return(0,d.Xo)("research_items/".concat(null===le||void 0===le?void 0:le.id))}),{enabled:!!(null===le||void 0===le?void 0:le.id)&&!y,staleTime:3e5,cacheTime:6e5,refetchOnWindowFocus:!1,onSuccess:function(e){var t=e.filter((function(e){return"article"===e.item_type||"source"===e.item_type})),n=e.filter((function(e){return"note"===e.item_type})),o=e.filter((function(e){return"report"===e.item_type})),l=e.filter((function(e){return"lesson_plan"===e.item_type})),i=e.filter((function(e){return"qna"===e.item_type})),a=e.filter((function(e){return"search_results"===e.item_type}));ie((0,r.Z)((0,s.Z)({},le),{sources:t,notes:n,reports:o,lesson_plans:l,qna:i,searches:a}))},onError:function(e){Ue("Failed to fetch research items.")}}),Ge=We.data,ze=(We.isLoading,We.refetch);(0,c.useEffect)((function(){v&&(X(!0),G(!0))}),[v]);var Ve=function(){var e=(0,o.Z)((function(e,t){var n,o,s,r,l,a,c;return(0,i.__generator)(this,(function(i){switch(i.label){case 0:return l=[null===e||void 0===e?void 0:e.user_id],(null===e||void 0===e||null===(n=e.collaborators)||void 0===n?void 0:n.length)>0&&(l=l.concat(null===e||void 0===e?void 0:e.collaborators)),l.includes(null===t||void 0===t?void 0:t.uid),a={type:"project",id:null===e||void 0===e?void 0:e.id,creator:null===e||void 0===e?void 0:e.user_id,visibility:"private"===(null===e||void 0===e?void 0:e.visibility)&&(null===e||void 0===e||null===(o=e.collaborators)||void 0===o?void 0:o.length)>0?"restricted":(null===e||void 0===e?void 0:e.visibility)||"restricted",allowed:l,currentUser:null===t||void 0===t?void 0:t.uid,sponsor_id:(null===e||void 0===e||null===(s=e.sponsor_info)||void 0===s?void 0:s.sponsor_id)||(null===e||void 0===e||null===(r=e.sponsor_info)||void 0===r?void 0:r.id)},[4,(0,d.sf)(t,a)];case 1:return c=i.sent(),console.log("Getting permissions for project:",a,c,null===t||void 0===t?void 0:t.uid),e.permissions=c,[2,e]}}))}));return function(t,n){return e.apply(this,arguments)}}();(0,c.useEffect)((function(){var e,t;(console.log("Project Data fullpage:",v),v&&le&&(console.log("Setting project in app context:",le),se(le)),!Fe&&le&&(v&&le.permissions||!v))&&(we(!1),Be(!0),console.log("Project permissions:",le.permissions),(null===le||void 0===le||null===(e=le.sponsor_info)||void 0===e?void 0:e.accentColor)&&(null===le||void 0===le||null===(t=le.sponsor_info)||void 0===t?void 0:t.accentColor.length)>0?(console.log("Setting accent color from sponsor info:",le.sponsor_info.accentColor),q(le.sponsor_info.accent_color)):"lesson"===le.type?q("#f59e0b"):q("blue"),"lesson"===le.type&&"admin"===(null===C||void 0===C?void 0:C.role)?oe(["cover_page","sources","q_and_a","reports","lesson_plan","notes","details"]):oe(["cover_page","sources","q_and_a","reports","notes","details"]),V||(le.default_tab?H(le.default_tab):H("sources")),le.sponsor_info&&(le.sponsor_info.backgroundImage&&Ee(le.sponsor_info.backgroundImage),(le.sponsor_info.backgroundImage||le.sponsor_info.displayName)&&Re(!0)),Se&&0!==Se.length||$e(le),_&&_(le))}),[le]);var He=function(){v||(y?Ie.push("/projects/".concat(le.id,"/")):X(!O))},Me=(0,E.useQuery)(["research",f],(function(){return(0,d.Xo)("research/".concat(f))}),{refetchOnWindowFocus:!1,enabled:!!f&&W,onSuccess:function(){var e=(0,o.Z)((function(e){return(0,i.__generator)(this,(function(t){switch(t.label){case 0:return e.tabs=A,[4,Ve(e,C)];case 1:return e=t.sent(),ie(e),[2]}}))}));return function(t){return e.apply(this,arguments)}}(),onError:function(e){console.error("Error fetching project data:",e.message)}}),$e=(Me.data,Me.error,function(e){if(null===e||void 0===e?void 0:e.cover_item_data)console.log("Cover Item Data:",e.cover_item_data),ke(unescape(e.cover_item_data.content||e.cover_item_data.escaped_content||e.cover_item_data.note));else if((null===e||void 0===e?void 0:e.cover_item_id)&&Ge){var t=null===Ge||void 0===Ge?void 0:Ge.find((function(t){return t.id===e.cover_item_id}));t&&(console.log("Cover Item ID:",t),ke(unescape(t.item_data.content||t.item_data.escaped_content)))}});(0,c.useEffect)((function(){var e,t;if(le){var n=(null===le||void 0===le||null===(e=le.sponsor_info)||void 0===e?void 0:e.sponsor_id)||(null===le||void 0===le||null===(t=le.sponsor_info)||void 0===t?void 0:t.id),o="view_research_project",s={event:o,project:null===le||void 0===le?void 0:le.id,tab:V,type:null===le||void 0===le?void 0:le.type,visibility:null===le||void 0===le?void 0:le.visibility,sponsor:n||null};le&&!Qe.includes(s)&&(S(o,s),Oe((0,l.Z)(Qe).concat([s])))}}),[V,le]);return(0,a.jsx)("div",{className:"\n ".concat(W?"fixed relative py-4 left-200 w-full h-full text-black flex flex-col":"relative cursor-pointer","\n rounded-lg ").concat(v?"":"shadow-xl border border-gray-300 p-4"," transition-all\n "),style:{borderLeft:W?"":"solid 4px ".concat(B)},children:(0,a.jsx)("div",{className:"",children:Fe?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex justify-between items-center w-full",children:[(0,a.jsxs)("div",{className:"flex items-center cursor-pointer w-full",onClick:He,children:[v&&(0,a.jsx)("a",{onClick:function(){Ie.back()},className:"material-symbols-rounded text-4xl mr-2",children:"arrow_back"}),(0,a.jsx)("span",{className:"material-symbols-rounded text-4xl mr-2",children:Te?"folder_special":"lesson"===le.type?"school":O?"folder_open":"folder"}),(0,a.jsxs)("h3",{className:"".concat(v?"text-2xl font-semibold flex w-full":"text-xl font-semibold"),children:[(0,a.jsx)("span",{children:(null===le||void 0===le?void 0:le.title)||(null===le||void 0===le?void 0:le.name)}
1),O&&le.permissions&&le.permissions.can_edit()&&(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{className:"ml-auto text-sm font-normal",children:(0,a.jsx)(I,{project:le,defaultRole:"Collaborator"})})})]})]}),!v&&!y&&(0,a.jsx)("span",{className:"material-symbols-rounded text-4xl cursor-pointer",onClick:function(){X(!W),G(!W)},children:W?"fullscreen_exit":"fullscreen"})]}),!W&&(0,a.jsxs)("div",{className:"flex space-x-4 items-center text-gray-500 mt-1 bg-white",onClick:He,children:[(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)("span",{className:"material-symbols-rounded mr-1",children:"group"}),(0,a.jsxs)("span",{children:[(null===le||void 0===le?void 0:le.collaborator_count)||(null===le||void 0===le||null===(t=le.collaborators)||void 0===t?void 0:t.length)||0," Collaborators"]})]}),(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)("span",{className:"material-symbols-rounded mr-1",children:"description"}),(0,a.jsxs)("span",{children:[(null===le||void 0===le?void 0:le.item_count)||0," Sources"]})]})]}),!O&&(0,a.jsxs)("div",{onClick:He,children:[(0,a.jsx)("div",{className:"".concat("lesson"===le.type?"line-clamp-6 text-gray-600":"line-clamp-3 text-gray-600"),children:Se&&Se.length>0?(0,a.jsx)(p.Z,{children:Se}):(0,a.jsx)("span",{className:"p-4",children:le.description})}),(0,a.jsx)(Z.Z,{sponsor:le.sponsor_info,disable:!0,onData:function(e){e.accent_color&&e.accent_color.length>0&&q(e.accent_color)}})]}),O&&(0,a.jsxs)("div",{className:"flex flex-col h-full",children:[W&&(0,a.jsx)("div",{className:"py-1",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-4 text-sm text-gray-700 mt-1",children:[k&&"workflow"!==(null===le||void 0===le?void 0:le.type)&&le.permissions.can_use()&&(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(j,{project:le,userId:null===C||void 0===C?void 0:C.uid,onSuccess:function(e){console.log("Project Cloned:",e),Ie.push("/projects/".concat(e.id))}})}),"workflow"===le.type&&le.permissions&&le.permissions.can_edit()&&(0,a.jsxs)("div",{className:"text-blue-500 cursor-pointer text-blue-800 hover:font-semibold flex items-center",onClick:function(){Ie.push("/workflow/".concat(le.id))},children:[(0,a.jsx)("span",{className:"material-symbols-rounded text-4xl ml-2",children:"account_tree"}),(0,a.jsx)("span",{className:"ml-2",children:"Enter Workflow"})]}),le.permissions&&le.permissions.can_edit()&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(T,{project:le,researchId:le.id,onSuccess:function(e,t){window.location.reload()}}),(0,a.jsx)("span",{className:"text-gray-500 px-4",children:"|"})]}),le.permissions&&le.permissions.can_create("sources")&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(N(),{href:{pathname:"/search",query:{project:le.id}},children:(0,a.jsxs)("div",{className:"flex items-center space-x-1 cursor-pointer text-blue-800 hover:font-semibold",children:[(0,a.jsx)("span",{className:"material-symbols-rounded",children:"search"}),(0,a.jsx)("span",{children:"Find Sources"})]})}),(0,a.jsx)(N(),{href:"/projects/".concat(f,"/add-source/"),children:(0,a.jsxs)("div",{className:"flex items-center space-x-1 cursor-pointer text-blue-800 hover:font-semibold",children:[(0,a.jsx)("span",{className:"material-symbols-rounded",children:"add"}),(0,a.jsx)("span",{children:"Add Source"})]})})]}),le.permissions&&le.permissions.can_create("notes")&&(0,a.jsx)(m.Z,{project:le,onSuccess:function(e){ze(),De.invalidateQueries(["research_items",le.id]),H("notes"),me(!0)}}),le.permissions&&le.permissions.can_create("reports")&&(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(h,{project:le,topic:null===le||void 0===le?void 0:le.description,existingReports:null===le||void 0===le?void 0:le.reports,onSuccess:function(e){ze(),De.invalidateQueries(["research_items",le.id]),H("reports"),ve(!0)}})})]})}),(0,a.jsxs)("div",{className:"relative flex items-center mt-4 bg-white",children:[(0,a.jsxs)("div",{ref:Le,className:"flex overflow-hidden justify-between w-full",children:[(0,a.jsx)("div",{className:"flex",children:ne.filter((function(e){return"details"!==e&&"notes"!==e})).map((function(e){return(0,a.jsx)("button",{className:"rounded-t-lg px-2 py-1 uppercase text-sm ".concat(V===e?"bg-gray-800 text-white font-semibold":"bg-gray-100"),onClick:function(){return H(e)},children:"cover_page"!==e||Se&&0!==Se.length?(e.charAt(0).toUpperCase()+e.slice(1)).replace("_"," "):"Description"},e)}))}),le.permissions.can_collaborate()&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("button",{className:"flex items-center rounded-t-lg px-2 py-1 uppercase text-sm ".concat("notes"===V?"bg-gray-800 text-white font-semibold":"bg-gray-100"," ml-auto"),onClick:function(){return H("notes")},children:[(0,a.jsx)("span",{className:"material-symbols-rounded mr-2",children:"groups"}),(0,a.jsx)("span",{children:"Notes"})]},"notes"),(0,a.jsxs)("button",{className:"flex items-center rounded-t-lg px-2 py-1 uppercase text-sm ".concat("details"===V?"bg-gray-800 text-white font-semibold":"bg-gray-100"),onClick:function(){return H("details")},children:[(0,a.jsx)("span",{className:"material-symbols-rounded mr-2",children:"admin_panel_settings"}),(0,a.jsx)("span",{children:"Details"})]},"details")]})]}),Y.length>0&&(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("button",{className:"px-3 py-1 rounded text-gray-800 font-semibold text-sm ml-2 hover:underline",onClick:function(){return ee(!K)},children:">>"}),K&&(0,a.jsx)("div",{className:"absolute right-0 mt-2 w-48 bg-white border rounded shadow-lg z-10",children:Y.map((function(e){return(0,a.jsx)("button",{"data-tab":e,className:"block px-4 py-2 text-left w-full hover:bg-blue-100",onClick:function(){H(e),ee(!1)},children:"cover_page"!==e||Se&&0!==Se.length?e.charAt(0).toUpperCase()+e.slice(1):"Description"},e)}))})]})]}),(0,a.jsx)("div",{className:"overflow-y-auto border-t-8 pt-0 border-gray-800 pb-8 mb-8 relative",style:{height:"calc(100vh - 180px)",paddingBottom:"4rem"},children:le.permissions&&le.permissions.can_view()?(0,a.jsxs)(a.Fragment,{children:["cover_page"===V&&(0,a.jsx)("div",{className:"p-4 prose",children:Se&&Se.length>0?(0,a.jsx)(p.Z,{children:Se}):(0,a.jsx)(a.Fragment,{children:le.description})}),"sources"===V&&(0,a.jsx)(x.Z,{project:le,forceReload:ce,onload:function(e){console.log("Sources Loaded - resetting flag:",e),de(!1)}}),"notes"===V&&(0,a.jsx)("div",{className:"p-4",children:(0,a.jsx)(u.Z,{typeLabel:"",itemType:"note",forceReload:pe,onload:function(e){return me(!1)},project:le})}),"reports"===V&&(0,a.jsx)("div",{className:"p-4",children:(0,a.jsx)(u.Z,{typeLabel:"",itemType:"report",forceReload:fe,onload:function(e){return ve(!1)},project:le,showNotes:!0})}),"details"===V&&(0,a.jsx)(P,{forceReload:fe,onload:function(e){return ve(!1)},onSuccess:function(e){console.log("Project Details Updated:",e),ie(e)},project:le,notes:(null===le||void 0===le?void 0:le.notes)||[],reports:(null===le||void 0===le?void 0:le.reports)||[]}),"q_and_a"===V&&(0,a.jsx)(D.Z,{itemType:"qna",forceReload:ye,onload:function(e){return _e(!1)},project:le,showNotes:!0}),"lesson_plan"===V&&(0,a.jsx)(u.Z,{typeLabel:"",itemType:"lesson_plan",forceReload:ge,onload:function(e){return be(!1)},project:le,showNotes:!0,allowGenerate:!0,displayItem:function(e){if(e.item_data){var t=unescape(e.item_data.content||e.item_data.escaped_content||e.item_data.markdown);return console.log("Displaying saved lesson_plan:",e.item_data),t}return null},updateItem:function(e,t){return e&&t&&(e.item_data.escaped_content=encodeURIComponent(t),console.log("Updated lesson plan:",e.item_data)),e}})]}):(0,a.jsxs)("div",{className:"text-center bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded relative",role:"alert",children:[(0,a.jsx)("strong",{className:"font-semibold",children:"Access Denied"}),(0,a.jsx)("span",{className:"block sm:inline",children:" You do not have permission to view this project."})]})})]})]}):(0,a.jsx)(b.Z,{})})})}},23382:function(e,t,n){var o=n(47568),s=n(97582),r=n(85893),l=n(67294),i=n(88767),a=n(77722);t.Z=function(e){var t=e.sponsor,n=e.layout,c=void 0===n?"overlay":n,d=e.disable,u=void 0!==d&&d,p=e.onData,m=(null===t||void 0===t?void 0:t.sponsor_id)||(null===t||void 0===t?void 0:t.id),x=(null===t||void 0===t?void 0:t.accent_color)||"#eee",f=(0,i.useQuery)(["sponsor",m],(0,o.Z)((function(){return(0,s.__generator)(this,(function(e){switch(e.label){case 0:return[4,(0,a.Xo)("sponsor/".concat(m)).then((function(e){return p&&p(e),e})).catch((function(e){console.error("Error fetching sponsor:",e)}))];case 1:return[2,e.sent()]}}))})),{enabled:!!m}).data,v=void 0===f?{}:f,h=function(){var e=(0,o.Z)((function(){var e;return(0,s.__generator)(this,(function(t){switch(t.label){case 0:if(!m)return[2];t.label=1;case 1:return t.trys.push([1,3,,4]),[4,(0,a.Xo)("increment_metric/".concat(m,"/view"),"POST")];case 2:return t.sent(),[3,4];case 3:return e=t.sent(),console.error("Error incrementing view:",e),[3,4];case 4:return[2]}}
1))}));return function(){return e.apply(this,arguments)}}();if((0,l.useEffect)((function(){u||h()}),[u,m]),!m)return null;var g=v.feature_image?{backgroundImage:"url(".concat(v.feature_image,")"),backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center"}:{},b="relative w-full rounded-lg shadow-md",j="h-32 ".concat(b),y="".concat(b," ").concat("textBelow"===c&&x?"border-l-4":""),_="textBelow"===c&&x?{borderColor:x}:{},N=function(){return(0,r.jsxs)("div",{className:"absolute bottom-2 right-2 bg-white bg-opacity-70 px-3 py-1 rounded text-left w-auto",children:[v.display_name&&(0,r.jsx)("p",{className:"text-xs text-gray-700 font-semibold",children:"Sponsored By:"}),(0,r.jsx)("p",{className:"font-medium text-sm text-gray-800",children:v.display_name||"Sponsored Content"})]})},w=function(){return(0,r.jsxs)("div",{className:"text-center bg-white rounded-b-lg p-3 w-full",children:[v.display_name&&(0,r.jsx)("p",{className:"text-xs text-gray-500 font-semibold",children:"Sponsored By:"}),(0,r.jsx)("p",{className:"font-medium text-normal text-wrap break-all text-gray-800",children:v.display_name||"Sponsored Content"})]})};return v.link?(0,r.jsx)("a",{href:u?"#":v.link,target:"_blank",rel:"noopener noreferrer",onClick:function(e){if(u)return e.preventDefault(),!1},"aria-label":"Visit ".concat(v.display_name),children:"overlay"===c?(0,r.jsx)("div",{className:j,style:g,children:(0,r.jsx)(N,{})}):(0,r.jsxs)("div",{className:y,style:_,children:[(0,r.jsx)("div",{className:"h-32",style:g}),(0,r.jsx)(w,{})]})}):(0,r.jsx)("div",{children:"overlay"===c?(0,r.jsx)("div",{className:j,style:g,children:(0,r.jsx)(N,{})}):(0,r.jsxs)("div",{className:y,style:_,children:[(0,r.jsx)("div",{className:"h-32",style:g}),(0,r.jsx)(w,{})]})})}},84102:function(e,t,n){n.d(t,{Z:function(){return i}});var o=n(67294);const s=(...e)=>e.filter(((e,t,n)=>Boolean(e)&&""!==e.trim()&&n.indexOf(e)===t)).join(" ").trim();var r={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const l=(0,o.forwardRef)((({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:l,className:i="",children:a,iconNode:c,...d},u)=>(0,o.createElement)("svg",{ref:u,...r,width:t,height:t,stroke:e,strokeWidth:l?24*Number(n)/Number(t):n,className:s("lucide",i),...d},[...c.map((([e,t])=>(0,o.createElement)(e,t))),...Array.isArray(a)?a:[a]]))),i=(e,t)=>{const n=(0,o.forwardRef)((({className:n,...r},i)=>{return(0,o.createElement)(l,{ref:i,iconNode:t,className:s(`lucide-${a=e,a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,n),...r});var a}));return n.displayName=`${e}`,n}},10217:function(e,t,n){n.d(t,{Z:function(){return o}});const o=(0,n(84102).Z)("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]])}}]);
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.