PageSourceSearch

https://app.healthychurchestoolkit.com/assets/Managedocumentation-B6GU1kna.js

js healthychurchestoolkit.com collected 2026-10-04 06:28:53 UTC 20,920 bytes, 1 lines download raw bytes

1import{r as d,b as k,e as v,j as e,B as p}from"./index-uPuoBMhx.js";import{e as me}from"./tooltip-B-l-dOqs.js";import{C as T,a as E}from"./card-1lN1_Se8.js";import{I as b}from"./input-BmSpt0Eh.js";import{L as f}from"./label-BejpMhEw.js";import{B as D}from"./badge-CrRB5M6z.js";import{S as B,a as I,b as V,c as R,d as F}from"./select-D07I9jAC.js";import{S as J}from"./switch-BehuccBp.js";import{S as Q,a as X,b as Z,c as ee,e as se}from"./sheet-CRixps9Y.js";import{T as de,a as he,b as Y,c as $}from"./tabs-CJ62Nd3v.js";import{L as xe}from"./LoadErrorPanel-StWYWbPu.js";import{R as pe}from"./quill.snow-CfUTnqzn.js";import{T as K}from"./textarea-lM6uA-MR.js";import{L as O}from"./loader-circle-CClJTEjr.js";import{P}from"./plus-nao29ywL.js";import{$ as te,B as H}from"./pages.config-hgExbgEC.js";import{E as ae}from"./eye-CjABOWJP.js";import{E as re}from"./eye-off-BfPnIcK-.js";import{Y as le}from"./youtube-Cj0wDTKh.js";import{M as ue}from"./mouse-pointer-click-O3knMOxO.js";import{a as je}from"./clock-D9btEWFO.js";import{S as ie,a as fe}from"./square-pen-CBgOWTmU.js";import{T as U}from"./trash-2-CNhP3AqE.js";import{A as ge,a as ve}from"./arrow-up-AttvlR97.js";import{E as we}from"./external-link-DCG1godj.js";import{S as ne}from"./dropdown-menu-iCIlU9cC.js";import{S as Ne}from"./search-CqNdnPxG.js";import"./index-BaASz1SR.js";import"./index-CPcWs2mZ.js";import"./index-Wvdu2dI_.js";import"./index-BLbwat6W.js";import"./index-ovzA6VBT.js";import"./index-BIK2eHIR.js";import"./index-BdQq_4o_.js";import"./index-DoY6TkfM.js";import"./index-BmCJDWmK.js";import"./chevron-down-BNqv1YJ1.js";import"./index-Cu1sS3TT.js";import"./x-ChRmB3ff.js";import"./refresh-cw-rP6n8duA.js";import"./skeleton-DOGFCoEw.js";import"./dialog-DXhopuNX.js";import"./index-A7ElDbZk.js";import"./format-WoXbaKoi.js";import"./circle-alert-C0QDXt7F.js";import"./sparkles-BMLEjkPv.js";import"./users-U-Rdm9PF.js";import"./crown-Dka_-Nxk.js";import"./waypoints-DB6uEXAV.js";import"./graduation-cap-DFwKZhhE.js";import"./arrow-right-VpgmkQjv.js";import"./SupervisedGuidesRoster-DrArdAB4.js";import"./avatar-Bhxn90qL.js";import"./ChurchTag-FinbzF8x.js";import"./building-2-CH0TgYOF.js";import"./circle-check-BO0sHK-q.js";import"./clipboard-list-3xEa1kOf.js";import"./journeyApi-CQ6eKrk4.js";import"./trending-up-DI8OWV5v.js";import"./video-CYNXJfA8.js";import"./proxy-kYcqYoy3.js";import"./JourneyCard-6WViabqj.js";import"./info-D7uJ7LVm.js";import"./shield-check-Ds0sNnHc.js";import"./globe-CcruHzdM.js";import"./badge-check-D0W_elOA.js";import"./megaphone-CGb0rIfX.js";import"./user-plus-DYMIVDGV.js";import"./circle-check-big-DOAasZi7.js";import"./useQuery-BHFaz3Mh.js";import"./Loader-yhtKwwRu.js";import"./lock-BWkWm970.js";import"./index-Ck7DnIc4.js";import"./user-CtT-IPS_.js";import"./link-q-TY0bPt.js";import"./mail-Dn9HRcgA.js";const ye=[{value:"order_index",label:"Default order"},{value:"-view_count",label:"Most clicked"},{value:"-last_viewed_at",label:"Recently opened"}];function be(s){if(!s)return"Never opened";const g=new Date(s);if(Number.isNaN(g.getTime()))return"Never opened";const y=Date.now()-g.getTime(),x=Math.round(y/6e4);if(x<1)return"Just now";if(x<60)return`${x}m ago`;const t=Math.round(x/60);if(t<24)return`${t}h ago`;const n=Math.round(t/24);return n<30?`${n}d ago`:g.toLocaleDateString()}const W=()=>({title:"",description:""}),Se=({guide:s,onSave:g,onCancel:y,loading:x})=>{var _,C;const[t,n]=d.useState({title:(s==null?void 0:s.title)||"",intro:(s==null?void 0:s.intro)||"",video_url:(s==null?void 0:s.video_url)||"",page_names:((_=s==null?void 0:s.page_names)==null?void 0:_.join(", "))||"",steps:(C=s==null?void 0:s.steps)!=null&&C.length?s.steps.map(a=>({title:a.title||"",description:a.description||""})):[W()],order_index:(s==null?void 0:s.order_index)??0,published:(s==null?void 0:s.published)??!0}),S=(a,o,m)=>{n(c=>({...c,steps:c.steps.map((r,h)=>h===a?{...r,[o]:m}:r)}))},u=()=>n(a=>({...a,steps:[...a.steps,W()]})),l=a=>n(o=>({...o,steps:o.steps.filter((m,c)=>c!==a)})),w=(a,o)=>{n(m=>{const c=[...m.steps],r=a+o;return r<0||r>=c.length?m:([c[a],c[r]]=[c[r],c[a]],{...m,steps:c})})},j=a=>{a.preventDefault();const o=t.page_names.split(",").map(c=>
1c.trim()).filter(Boolean),m=t.steps.map(c=>({title:c.title.trim(),description:c.description.trim()})).filter(c=>c.title||c.description);if(o.length===0){v.error("Add at least one page name");return}g({title:t.title,intro:t.intro,video_url:t.video_url.trim(),page_names:o,steps:m,order_index:Number(t.order_index)||0,published:t.published})};return e.jsxs("form",{onSubmit:j,className:"space-y-5",children:[e.jsxs("div",{children:[e.jsx(f,{children:"Guide Title *"}),e.jsx(b,{value:t.title,onChange:a=>n({...t,title:a.target.value}),placeholder:"e.g., Using the Strategic Plan Dashboard",required:!0})]}),e.jsxs("div",{children:[e.jsx(f,{children:"Page Name(s) *"}),e.jsx(b,{value:t.page_names,onChange:a=>n({...t,page_names:a.target.value}),placeholder:"e.g., StrategicPlan  or  TrainingModule, Workshop",required:!0}),e.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Comma-separated page component names. List more than one to reuse the same guide across similar pages (e.g. all course pages)."})]}),e.jsxs("div",{children:[e.jsx(f,{children:"Intro (optional)"}),e.jsx(K,{value:t.intro,onChange:a=>n({...t,intro:a.target.value}),placeholder:"One or two sentences of context shown above the steps.",rows:2})]}),e.jsxs("div",{children:[e.jsxs(f,{className:"flex items-center gap-1.5",children:[e.jsx(le,{className:"w-3.5 h-3.5"}),"Video Walkthrough (optional)"]}),e.jsx(b,{value:t.video_url,onChange:a=>n({...t,video_url:a.target.value}),placeholder:"Paste a YouTube link, e.g. https://www.youtube.com/watch?v=..."}),e.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Shown at the top of the guide, above the steps, as a step 0 / intro video."})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx(f,{children:"Steps"}),e.jsxs(p,{type:"button",variant:"outline",size:"sm",onClick:u,children:[e.jsx(P,{className:"w-3.5 h-3.5 mr-1"}),"Add Step"]})]}),e.jsx("div",{className:"space-y-3",children:t.steps.map((a,o)=>e.jsx(T,{className:"p-3",children:e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsxs("div",{className:"flex flex-col items-center gap-1 pt-1.5",children:[e.jsx("span",{className:"text-xs font-semibold text-gray-400 w-5 text-center",children:o+1}),e.jsx("button",{type:"button",onClick:()=>w(o,-1),disabled:o===0,className:"text-gray-400 hover:text-gray-700 disabled:opacity-30",children:e.jsx(ge,{className:"w-3.5 h-3.5"})}),e.jsx("button",{type:"button",onClick:()=>w(o,1),disabled:o===t.steps.length-1,className:"text-gray-400 hover:text-gray-700 disabled:opacity-30",children:e.jsx(ve,{className:"w-3.5 h-3.5"})})]}),e.jsxs("div",{className:"flex-1 space-y-2 min-w-0",children:[e.jsx(b,{value:a.title,onChange:m=>S(o,"title",m.target.value),placeholder:"Step title"}),e.jsx(K,{value:a.description,onChange:m=>S(o,"description",m.target.value),placeholder:"Short description of this step",rows:2})]}),e.jsx(p,{type:"button",variant:"ghost",size:"icon",onClick:()=>l(o),className:"text-red-500 hover:text-red-700 flex-shrink-0",children:e.jsx(U,{className:"w-4 h-4"})})]})},o))})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(J,{checked:t.published,onCheckedChange:a=>n({...t,published:a})}),e.jsx(f,{children:"Published"})]}),e.jsxs("p",{className:"text-xs text-gray-500 flex items-center gap-1.5",children:[e.jsx(we,{className:"w-3 h-3 flex-shrink-0"}),'A "Contact Support" link to the support page is always shown at the bottom of every guide automatically — no need to add one yourself.']}),e.jsxs(se,{children:[e.jsx(p,{type:"button",variant:"outline",onClick:y,children:"Cancel"}),e.jsxs(p,{type:"submit",disabled:x,children:[x&&e.jsx(O,{className:"w-4 h-4 mr-2 animate-spin"}),e.jsx(ne,{className:"w-4 h-4 mr-2"}),"Save"]})]})]})};function Ce(){const[s,g]=d.useState([]),[y,x]=d.useState(!0),[t,n]=d.useState(!1),[S,u]=d.useState(!1),[l,w]=d.useState(null),[j,_]=d.useState("order_index");d.useEffect(()=>{C(j)},[j]);const C=async r=>{x(!0);try{const h=await k.entities.HowToGuide.filter({deleted_at:null},r||j);g(h)}catch(h){console.error("Failed to load how-to guides:",h),v.error("Couldn't load how-to guides. Please refresh the page.")}finally{x(!1)}},a=async r=>{n(!0);try{l?(await k.entities.HowToGuide.update(l.id,r),v.success("Guide updated")):(await k.entities.HowToGuide.create(r),v.success("Guide created")),u(!1),w(null),C(j)}catch(h){console.error("Failed to save guide:",h),v.error("Failed to save guide")}finally{n(!1)}},o=async r=>{if(confirm("Delete this how-to guide? Pages using it will fall back to the Contact Support state."))try{await k.entities.HowToGuide.delete(r),v.success("Guide deleted"),C(j)}catch(h){console.error("Failed to delete guide:",h),v.error("Failed to delete guide")}},m=r=>{w(r),u(!0)},c=()=>{w(null),u(!0)};return y?e.jsx("div",{className:"flex items-center justify-center p-8",children:e.jsx(O,{className:"w-8 h-8 animate-spin text-blue-600"})}):e.jsxs(e.Fragment,{children:[e.jsx(Q,{open:S,onOpenChange:u,children:e.jsxs(X,{side:"right",className:"w-full sm:max-w-xl overflow-y-auto",children:[e.jsx(Z,{children:e.jsx(ee,{children:l?"Edit How-To Guide":"Create How-To Guide"})}),e.jsx("div",{className:"mt-6",children:e.jsx(Se,{guide:l,onSave:a,onCancel:()=>{u(!1),w(null)},loading:t})})]})}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-start sm:items-center justify-between gap-4 flex-col sm:flex-row",children:[e.jsx("p",{className:"text-sm text-gray-600",children:'Guides power the "How to Use This Page" button in the header. Pages without a published guide automatically show a "Contact Support" prompt instead.'}),e.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[e.jsxs(B,{value:j,onValueChange:_,children:[e.jsx(I,{className:"w-[170px]",children:e.jsx(V,{})}),e.jsx(R,{children:ye.map(r=>e.jsx(F,{value:r.value,children:r.label},r.value))})]}),e.jsxs(p,{onClick:c,className:"flex-shrink-0",children:[e.jsx(P,{className:"w-4 h-4 mr-2"}),"Add Guide"]})]})]}),s.length===0?e.jsx(T,{children:e.jsxs(E,{className:"text-center py-12",children:[e.jsx(te,{className:"w-12 h-12 text-gray-300 mx-auto mb-4"}),e.jsx("h3",{className:"font-medium text-gray-800",children:"No how-to guides yet"}),e.jsx("p",{className:"text-gray-500 text-sm mt-1",children:'Pages will show a "Contact Support" prompt until you add one.'}),e.jsxs(p,{onClick:c,className:"mt-4",children:[e.jsx(P,{className:"w-4 h-4 mr-2"}),"Add Guide"]})]})}):e.jsx("div",{className:"space-y-3",children:s.map(r=>{var h,G;return e.jsx(T,{className:"hover:shadow-md transition-shadow",children:e.jsx(E,{className:"p-4",children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1 flex-wrap",children:[e.jsx("h3",{className:"font-medium truncate",children:r.title}),r.published?e.jsxs(D,{variant:"outline",className:"text-green-600 border-green-200 bg-green-50",children:[e.jsx(ae,{className:"w-3 h-3 mr-1"}),"Published"]}):e.jsxs(D,{variant:"outline",className:"text-gray-500",children:[e.jsx(re,{className:"w-3 h-3 mr-1"}),"Draft"]})]}),e.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-500 flex-wrap",children:[e.jsxs("span",{children:[((h=r.steps)==null?void 0:h.length)||0," step",((G=r.steps)==null?void 0:G.length)===1?"":"s"]}),r.video_url&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsxs("span",{className:"flex items-center gap-1 text-red-500",children:[e.jsx(le,{className:"w-3.5 h-3.5"}),"Video"]})]}),e.jsx("span",{children:"·"}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(ue,{className:"w-3.5 h-3.5"}),r.view_count||0," click",r.view_count===1?"":"s"]}),e.jsx("span",{children:"·"}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(je,{className:"w-3.5 h-3.5"}),be(r.last_viewed_at)]}),e.jsx("span",{children:"·"}),e.jsx("div",{className:"flex gap-1 flex-wrap",children:(r.page_names||[]).map(L=>e.jsx(D,{variant:"secondary",className:"text-xs",children:L},L))})]})]}),e.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[e.jsx(p,{variant:"ghost",size:"icon",onClick:()=>m(r),children:e.jsx(ie,{className:"w-4 h-4"})}),e.jsx(p,{variant:"ghost",size:"icon",onClick:()=>o(r.id),className:"text-red-600 hover:text-red-700",children:e.jsx(U,{className:"w-4 h-4"})})]})]})})},r.id)})})]})]})}const M=[{value:"getting-started",label:"Getting Started"},{value:"account",label:"Account & Billing"},{value:"training",label:"Training & Courses"},{value:"strategic-plan",label:"Strategic Planning"},{value:"leadership-pipeline",label:"Leadership Pipeline"},{value:"communication",label:"Communication Tools"},{value:"troubleshooting",label:"Troubleshooting"}],ke=({doc:s,onSave:g,onCancel:y,loading:x})=>{var u;
1const[t,n]=d.useState({title:(s==null?void 0:s.title)||"",content:(s==null?void 0:s.content)||"",youtube_url:(s==null?void 0:s.youtube_url)||"",category:(s==null?void 0:s.category)||"getting-started",order_index:(s==null?void 0:s.order_index)||0,keywords:((u=s==null?void 0:s.keywords)==null?void 0:u.join(", "))||"",published:(s==null?void 0:s.published)??!0}),S=l=>{l.preventDefault(),g({...t,keywords:t.keywords.split(",").map(w=>w.trim()).filter(Boolean)})};return e.jsxs("form",{onSubmit:S,className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"col-span-2",children:[e.jsx(f,{children:"Title *"}),e.jsx(b,{value:t.title,onChange:l=>n({...t,title:l.target.value}),placeholder:"e.g., How to set up your account",required:!0})]}),e.jsxs("div",{children:[e.jsx(f,{children:"Category *"}),e.jsxs(B,{value:t.category,onValueChange:l=>n({...t,category:l}),children:[e.jsx(I,{children:e.jsx(V,{})}),e.jsx(R,{children:M.map(l=>e.jsx(F,{value:l.value,children:l.label},l.value))})]})]}),e.jsxs("div",{children:[e.jsx(f,{children:"Order Index"}),e.jsx(b,{type:"number",value:t.order_index,onChange:l=>n({...t,order_index:parseInt(l.target.value)||0})})]}),e.jsxs("div",{className:"col-span-2",children:[e.jsx(f,{children:"Keywords (comma separated)"}),e.jsx(b,{value:t.keywords,onChange:l=>n({...t,keywords:l.target.value}),placeholder:"e.g., login, password, reset"})]}),e.jsxs("div",{className:"col-span-2",children:[e.jsx(f,{children:"YouTube Video URL (optional)"}),e.jsx(b,{value:t.youtube_url,onChange:l=>n({...t,youtube_url:l.target.value}),placeholder:"https://www.youtube.com/watch?v=..."}),e.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Video will display above the written content"})]}),e.jsxs("div",{className:"col-span-2",children:[e.jsx(f,{children:"Content *"}),e.jsx(pe,{value:t.content,onChange:l=>n({...t,content:l}),className:"bg-white",theme:"snow"})]}),e.jsxs("div",{className:"col-span-2 flex items-center gap-2",children:[e.jsx(J,{checked:t.published,onCheckedChange:l=>n({...t,published:l})}),e.jsx(f,{children:"Published"})]})]}),e.jsxs(se,{children:[e.jsx(p,{type:"button",variant:"outline",onClick:y,children:"Cancel"}),e.jsxs(p,{type:"submit",disabled:x,children:[x&&e.jsx(O,{className:"w-4 h-4 mr-2 animate-spin"}),e.jsx(ne,{className:"w-4 h-4 mr-2"}),"Save"]})]})]})};function Ws(){const[s,g]=d.useState(null),[y,x]=d.useState([]),[t,n]=d.useState(!0),[S,u]=d.useState(!1),[l,w]=d.useState(""),[j,_]=d.useState("all"),[C,a]=d.useState(!1),[o,m]=d.useState(null),[c,r]=d.useState(!1);d.useEffect(()=>{h()},[]);const h=async()=>{n(!0),r(!1);try{const i=await me.User.me();if(i.role!=="admin"){g(null),n(!1);return}g(i);const N=await k.entities.Documentation.list("order_index");x(N)}catch(i){console.error("Failed to load documentation:",i),r(!0)}finally{n(!1)}},G=async i=>{u(!0);try{o?(await k.entities.Documentation.update(o.id,i),v.success("Documentation updated")):(await k.entities.Documentation.create(i),v.success("Documentation created")),a(!1),m(null),h()}catch(N){console.error("Failed to save:",N),v.error("Failed to save documentation")}finally{u(!1)}},L=async i=>{if(confirm("Are you sure you want to delete this documentation article?"))try{await k.entities.Documentation.delete(i),v.success("Documentation deleted"),h()}catch(N){console.error("Failed to delete:",N),v.error("Failed to delete documentation")}},oe=i=>{m(i),a(!0)},z=()=>{m(null),a(!0)},q=y.filter(i=>{const N=!l||i.title.toLowerCase().includes(l.toLowerCase())||i.content.toLowerCase().includes(l.toLowerCase()),A=j==="all"||i.category===j;return N&&A});return!t&&c?e.jsx(xe,{what:"documentation",onRetry:h}):t?e.jsx("div",{className:"flex items-center justify-center p-8",children:e.jsx(O,{className:"w-8 h-8 animate-spin text-blue-600"})}):!s||s.role!=="admin"?e.jsxs("div",{className:"text-center py-16",children:[e.jsx(fe,{className:"w-16 h-16 text-gray-300 mx-auto mb-4"}),e.jsx("h2",{className:"text-2xl font-bold text-gray-800",children:"Access Denied"}),e.jsx("p",{className:"text-gray-600 mt-2",children:"This area is restricted to administrators only."})]}):e.jsxs(e.Fragment,{children:[e.jsx(Q,{open:C,onOpenChange:a,children:e.jsxs(X,{side:"right",className:"w-full sm:max-w-2xl overflow-y-auto",children:[e.jsx(Z,{children:e.jsx(ee,{children:o?"Edit Documentation":"Create Documentation"})}),e.jsx("div",{className:"mt-6",children:e.jsx(ke,{doc:o,onSave:G,onCancel:()=>{a(!1),m(null)},loading:S})})]})}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"text-2xl font-bold flex items-center gap-2",children:[e.jsx(H,{className:"w-7 h-7 text-blue-600"}),"Documentation"]}),e.jsx("p",{className:"text-gray-600 mt-1",children:'Manage support articles and the "How to Use This Page" guides shown throughout the app.'})]}),e.jsxs(de,{defaultValue:"articles",children:[e.jsxs(he,{children:[e.jsxs(Y,{value:"articles",children:[e.jsx(H,{className:"w-4 h-4 mr-2"}),"Support Articles"]}),e.jsxs(Y,{value:"how-to",children:[e.jsx(te,{className:"w-4 h-4 mr-2"}),"How-To Guides"]})]}),e.jsxs($,{value:"articles",className:"space-y-6 mt-6",children:[e.jsx("div",{className:"flex justify-end",children:e.jsxs(p,{onClick:z,children:[e.jsx(P,{className:"w-4 h-4 mr-2"}),"Add Article"]})}),e.jsx(T,{children:e.jsx(E,{className:"p-4",children:e.jsxs("div",{className:"flex flex-col sm:flex-row gap-4",children:[e.jsxs("div",{className:"relative flex-1",children:[e.jsx(Ne,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 text-gray-400"}
1),e.jsx(b,{placeholder:"Search articles...",value:l,onChange:i=>w(i.target.value),className:"pl-10"})]}),e.jsxs(B,{value:j,onValueChange:_,children:[e.jsx(I,{className:"w-48",children:e.jsx(V,{placeholder:"All Categories"})}),e.jsxs(R,{children:[e.jsx(F,{value:"all",children:"All Categories"}),M.map(i=>e.jsx(F,{value:i.value,children:i.label},i.value))]})]})]})})}),e.jsx("div",{className:"space-y-3",children:q.length===0?e.jsx(T,{children:e.jsxs(E,{className:"text-center py-12",children:[e.jsx(H,{className:"w-12 h-12 text-gray-300 mx-auto mb-4"}),e.jsx("h3",{className:"font-medium text-gray-800",children:"No articles found"}),e.jsx("p",{className:"text-gray-500 text-sm mt-1",children:l||j!=="all"?"Try adjusting your filters":"Create your first documentation article"}),e.jsxs(p,{onClick:z,className:"mt-4",children:[e.jsx(P,{className:"w-4 h-4 mr-2"}),"Add Article"]})]})}):q.map(i=>{var N,A;return e.jsx(T,{className:"hover:shadow-md transition-shadow",children:e.jsx(E,{className:"p-4",children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("h3",{className:"font-medium truncate",children:i.title}),i.published?e.jsxs(D,{variant:"outline",className:"text-green-600 border-green-200 bg-green-50",children:[e.jsx(ae,{className:"w-3 h-3 mr-1"}),"Published"]}):e.jsxs(D,{variant:"outline",className:"text-gray-500",children:[e.jsx(re,{className:"w-3 h-3 mr-1"}),"Draft"]})]}),e.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-500",children:[e.jsx(D,{variant:"secondary",className:"text-xs",children:(N=M.find(ce=>ce.value===i.category))==null?void 0:N.label}),e.jsxs("span",{children:["Order: ",i.order_index]}),((A=i.keywords)==null?void 0:A.length)>0&&e.jsxs("span",{className:"truncate",children:["Keywords: ",i.keywords.join(", ")]})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(p,{variant:"ghost",size:"icon",onClick:()=>oe(i),children:e.jsx(ie,{className:"w-4 h-4"})}),e.jsx(p,{variant:"ghost",size:"icon",onClick:()=>L(i.id),className:"text-red-600 hover:text-red-700",children:e.jsx(U,{className:"w-4 h-4"})})]})]})})},i.id)})})]}),e.jsx($,{value:"how-to",className:"mt-6",children:e.jsx(Ce,{})})]})]})]})}export{Ws 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.