1import{b as W,u as M,c as z,j as e}from"./vendor-query-D6w8_4YY.js";import{r as x}from"./vendor-react-CQIO8BZL.js";import{c as B,a as $,b as X,s as g,B as j,g as K,D as I,r as A,v as Q,w as H,I as ee,h as se,i as te,k as ae,x as re,n as ge,S as pe}from"./index-DyC8pbVh.js";import{L as G,N as fe}from"./vendor-router-CVEBbtK0.js";import{B as q}from"./badge-BsDHtVnQ.js";import{T as je,a as ve,b as D,c as E}from"./tabs-BkjByaK0.js";import{P as Ne}from"./progress-BfJ68vRd.js";import{I as R}from"./input-Dhy0KnoE.js";import{P as ie}from"./plus-Bwzmgncu.js";import{L as O}from"./loader-circle-ClVIlt-q.js";import{P as ne}from"./pencil-6izSXQcI.js";import{T as le}from"./trash-2-DJoHFsU3.js";import{T as ye}from"./textarea-DET7-Jq0.js";import{S as we,a as be,b as Ce,c as _e,d as F}from"./select-YVB7-1s_.js";import{f as J}from"./formatUploadError-95uAeaf3.js";import{E as Se}from"./eye-DQsNZ5Ft.js";import{U as Me}from"./upload-DIiW_MkV.js";import{G as U}from"./graduation-cap-ZXIjdV8G.js";import{L as oe}from"./list-checks-KgeD3-z6.js";import{C as Oe}from"./circle-check-BheQxrO2.js";import"./vendor-supabase-BhlwQIoi.js";import"./vendor-ui-tooltip-Bpm2cZhw.js";import"./vendor-ui-dialog-dFuLu-uG.js";import"./vendor-ui-dropdown-D8-Koaje.js";import"./vendor-charts-DZw3pgZj.js";import"./vendor-ui-tabs-ynEw1xsU.js";import"./index-BdQq_4o_.js";import"./index-Cegu2tio.js";import"./chevron-down-M_k5HTch.js";import"./chevron-up-cv7c5k2F.js";/** 2 * @license lucide-react v0.462.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const V=B("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/** 7 * @license lucide-react v0.462.0 - ISC 8 * 9 * This source code is licensed under the ISC license. 10 * See the LICENSE file in the root directory of this source tree. 11 */const ke=B("CirclePlay",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polygon",{points:"10 8 16 12 10 16 10 8",key:"1cimsy"}]]);/** 12 * @license lucide-react v0.462.0 - ISC 13 * 14 * This source code is licensed under the ISC license. 15 * See the LICENSE file in the root directory of this source tree. 16 */const ce=B("FileArchive",[["path",{d:"M10 12v-1",key:"v7bkov"}],["path",{d:"M10 18v-2",key:"1cjy8d"}],["path",{d:"M10 7V6",key:"dljcrl"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v16a2 2 0 0 0 .274 1.01",key:"gkbcor"}],["circle",{cx:"10",cy:"20",r:"2",key:"1xzdoj"}]]),Te=()=>{const{user:i}=$(),{toast:d}=X(),N=W(),[n,p]=x.useState(!1),[c,r]=x.useState(""),{data:h=[],isLoading:C}=M({queryKey:["training-manage-courses"],queryFn:async()=>{const{data:a,error:t}=await g.from("training_courses").select("*, training_course_roles(role)").order("sort_order",{ascending:!0});if(t)throw t;return a||[]}}),b=z({mutationFn:async()=>{const a=c.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")+"-"+Date.now().toString(36),{data:t,error:l}=await g.from("training_courses").insert({title:c,slug:a,status:"draft",created_by:i.id}).select().single();if(l)throw l;return t},onSuccess:a=>{N.invalidateQueries({queryKey:["training-manage-courses"]}),d({title:"Course created"}),p(!1),r(""),window.location.href=`/training/manage/course/${a.id}`},onError:a=>d({title:"Error",description:a.message,variant:"destructive"})}),f=z({mutationFn:async a=>{const{error:t}=await g.from("training_courses").delete().eq("id",a);if(t)throw t},onSuccess:()=>{N.invalidateQueries({queryKey:["training-manage-courses"]}),d({title:"Course deleted"})}});return e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Author native lessons, embed SCORM packages, and configure role-based access."}),e.jsxs(j,{onClick:()=>p(!0),children:[e.jsx(ie,{className:"h-4 w-4 mr-1"})," New Course"]})]}),C?e.jsx("div",{className:"flex justify-center py-12",children:e.jsx(O,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):h.length===0?e.jsxs("div",{className:"rounded-lg border bg-card p-12 text-center text-muted-foreground",children:[e.jsx(V,{className:"h-16 w-16 mx-auto mb-4 opacity-30"}),e.jsx("p",{children:"No courses yet. Create your first course."})]}):e.jsx("div",{className:"space-y-2",children:h.map(a=>e.jsxs(K,{className:"p-4 flex items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-medium text-foreground",children:a.title}),e.jsx(q,{variant:a.status==="published"?"default":"outline",className:"capitalize",children:a.status}),a.category&&e.jsx(q,{variant:"secondary",children:a.category}),(a.training_course_roles||[]).map(t=>e.jsx(q,{variant:"outline",className:"text-xs",children:t.role},t.role))]}),a.description&&e.jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-1",children:a.description})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(j,{size:"sm",variant:"outline",asChild:!0,children:e.jsxs(G,{to:`/training/manage/course/${a.id}`,children:[e.jsx(ne,{className:"h-3.5 w-3.5 mr-1"})," Edit"]})}),e.jsx(j,{size:"sm",variant:"ghost",className:"text-destructive",onClick:()=>{confirm("Delete this course and all its content?")&&f.mutate(a.id)},children:e.jsx(le,{className:"h-3.5 w-3.5"})})]})]},a.id))}),e.jsx(I,{open:n,onOpenChange:p,children:e.jsxs(A,{children:[e.jsx(Q,{children:e.jsx(H,{children:"New Course"})}),e.jsx(R,{placeholder:"Course title",value:c,onChange:a=>r(a.target.value),autoFocus:!0}),e.jsxs(ee,{children:[e.jsx(j,{variant:"outline",onClick:()=>p(!1),children:"Cancel"}),e.jsx(j,{disabled:!c||b.isPending,onClick:()=>b.mutate(),children:"Create"})]})]})})]})},qe=()=>{const{user:i}=$(),{toast:d}
16=X(),N=W(),n=x.useRef(null),[p,c]=x.useState(!1),[r,h]=x.useState(null),[C,b]=x.useState(null),[f,a]=x.useState(""),[t,l]=x.useState(""),[m,y]=x.useState("1.0"),[w,_]=x.useState("draft"),[k,v]=x.useState(!1),[u,S]=x.useState(null),{data:Y=[],isLoading:de}=M({queryKey:["training-scorm-packages"],queryFn:async()=>{const{data:s,error:o}=await g.from("training_scorm_packages").select("*").order("created_at",{ascending:!1});if(o)throw o;return s||[]}}),L=z({mutationFn:async()=>{let s=(r==null?void 0:r.file_path)||"";if(u){v(!0);const o=u.name.split(".").pop(),T=`scorm/${Date.now()}-${Math.random().toString(36).slice(2,8)}.${o}`,{error:Z}=await g.storage.from("training-packages").upload(T,u,{upsert:!0});if(Z)throw Z;s=T}if(!s)throw new Error("Please select a SCORM package file");if(r){const{error:o}=await g.from("training_scorm_packages").update({title:f,description:t||null,version:m,status:w,file_path:s}).eq("id",r.id);if(o)throw o}else{const{error:o}=await g.from("training_scorm_packages").insert({title:f,description:t||null,version:m,status:w,file_path:s,file_size:(u==null?void 0:u.size)||null,uploaded_by:i.id});if(o)throw o}},onSuccess:()=>{N.invalidateQueries({queryKey:["training-scorm-packages"]}),d({title:r?"Package updated":"Package uploaded"}),P()},onError:s=>d({title:"Error",description:J(s,"SCORM"),variant:"destructive"}),onSettled:()=>v(!1)}),me=z({mutationFn:async s=>{await g.storage.from("training-packages").remove([s.file_path]);const{error:o}=await g.from("training_scorm_packages").delete().eq("id",s.id);if(o)throw o},onSuccess:()=>{N.invalidateQueries({queryKey:["training-scorm-packages"]}),d({title:"Package deleted"})},onError:s=>d({title:"Delete failed",description:J(s),variant:"destructive"})}),P=()=>{c(!1),h(null),a(""),l(""),y("1.0"),_("draft"),S(null)},ue=s=>{h(s),a(s.title),l(s.description||""),y(s.version||"1.0"),_(s.status),S(null),c(!0)},xe=async s=>{const{data:o,error:T}=await g.storage.from("training-packages").createSignedUrl(s,3600);if(T)throw T;return o.signedUrl},he=s=>s?s<1024*1024?`${(s/1024).toFixed(0)} KB`:`${(s/(1024*1024)).toFixed(1)} MB`:"â";return e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"SCORM packages can be embedded inside native courses as lessons."}),e.jsxs(j,{onClick:()=>{P(),c(!0)},children:[e.jsx(ie,{className:"h-4 w-4 mr-1"})," Upload SCORM Package"]})]}),de?e.jsx("div",{className:"flex justify-center py-12",children:e.jsx(O,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):Y.length===0?e.jsxs("div",{className:"rounded-lg border bg-card p-12 text-center text-muted-foreground",children:[e.jsx(ce,{className:"h-16 w-16 mx-auto mb-4 opacity-30"}),e.jsx("p",{children:"No SCORM packages yet."})]}):e.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:Y.map(s=>e.jsxs(K,{className:"flex flex-col",children:[e.jsx(se,{className:"pb-3",children:e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsx(te,{className:"text-base leading-snug",children:s.title}),e.jsx(q,{variant:s.status==="published"?"default":s.status==="archived"?"secondary":"outline",className:"shrink-0 capitalize",children:s.status})]})}),e.jsxs(ae,{className:"flex-1 flex flex-col gap-3",children:[s.description&&e.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:s.description}),e.jsxs("div",{className:"flex items-center gap-4 text-xs text-muted-foreground mt-auto",children:[e.jsxs("span",{children:["v",s.version]}),e.jsx("span",{children:he(s.file_size)}),e.jsx("span",{children:new Date(s.created_at).toLocaleDateString()})]}),e.jsxs("div",{className:"flex gap-2 pt-1",children:[e.jsxs(j,{size:"sm",variant:"outline",onClick:()=>b(s),children:[e.jsx(Se,{className:"h-3.5 w-3.5 mr-1"})," View"]}),e.jsxs(j,{size:"sm",variant:"outline",onClick:()=>ue(s),children:[e.jsx(ne,{className:"h-3.5 w-3.5 mr-1"})," Edit"]}),e.jsx(j,{size:"sm",variant:"ghost",className:"text-destructive hover:text-destructive",onClick:()=>{confirm("Delete this SCORM package?")&&me.mutate(s)},children:e.jsx(le,{className:"h-3.5 w-3.5"})})]})]})]},s.id))}),e.jsx(I,{open:p,onOpenChange:s=>!s&&P(),children:e.jsxs(A,{className:"sm:max-w-lg",children:[e.jsxs(Q,{children:[e.jsx(H,{children:r?"Edit SCORM Package":"Upload SCORM Package"}),e.jsx(re,{children:r?"Update metadata or replace the file.":"Upload a SCORM-compliant ZIP."})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-medium",children:"Title *"}),e.jsx(R,{value:f,onChange:s=>a(s.target.value)})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-medium",children:"Description"}),e.jsx(ye,{value:t,onChange:s=>l(s.target.value),rows:3})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-medium",children:"Version"}),e.jsx(R,{value:m,onChange:s=>y(s.target.value)})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-medium",children:"Status"}),e.jsxs(we,{value:w,onValueChange:_,children:[e.jsx(be,{children:e.jsx(Ce,{})}),e.jsxs(_e,{children:[e.jsx(F,{value:"draft",children:"Draft"}),e.jsx(F,{value:"published",children:"Published"}),e.jsx(F,{value:"archived",children:"Archived"})]})]})]})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"text-sm font-medium",children:["SCORM Package (.zip) ",!r&&"*"]}),e.jsxs("div",{className:"flex gap-2 mt-1",children:[e.jsx(R,{readOnly:!0,value:(u==null?void 0:u.name)||r&&r.file_path.split("/").pop()||"",placeholder:"No file selected",className:"flex-1"}),e.jsxs(j,{type:"button",variant:"outline",onClick:()=>{var s;return(s=n.current)==null?void 0:s.click()},children:[e.jsx(Me,{className:"h-4 w-4 mr-1"})," Browse"]})]}),e.jsx("input",{ref:n,type:"file",accept:".zip",className:"hidden",onChange:s=>{var o;return S(((o=s.target.files)==null?void 0:o[0])||null)}})]})]}),e.jsxs(ee,{children:[e.jsx(j,{variant:"outline",onClick:P,children:"Cancel"}),e.jsx(j,{disabled:!f||!u&&!r||k||L.isPending,onClick:()=>L.mutate(),children:k||L.isPending?e.jsxs(e.Fragment,{children:[e.jsx(O,{className:"h-4 w-4 animate-spin mr-1"})," Savingâ¦"]}):r?"Update":"Upload"})]})]})}),e.jsx(Pe,{pkg:C,onClose:()=>b(null),getSignedUrl:xe})]})};function Pe({pkg:i,onClose:d,getSignedUrl:N}
16){const[n,p]=x.useState(null),[c,r]=x.useState(!1),[h,C]=x.useState(null);i&&!n&&!c&&!h&&(r(!0),N(i.file_path).then(f=>{p(f),r(!1)}).catch(f=>{C(f.message),r(!1)}));const b=()=>{p(null),C(null),d()};return e.jsx(I,{open:!!i,onOpenChange:f=>!f&&b(),children:e.jsxs(A,{className:"sm:max-w-5xl h-[80vh] flex flex-col",children:[e.jsxs(Q,{children:[e.jsxs(H,{className:"flex items-center gap-2",children:[e.jsx(U,{className:"h-5 w-5"}),(i==null?void 0:i.title)||"SCORM Viewer"]}),e.jsx(re,{children:(i==null?void 0:i.description)||"Viewing SCORM package content"})]}),e.jsxs("div",{className:"flex-1 min-h-0 rounded-md border bg-muted/30 overflow-hidden",children:[c&&e.jsx("div",{className:"flex items-center justify-center h-full",children:e.jsx(O,{className:"h-8 w-8 animate-spin text-muted-foreground"})}),h&&e.jsx("div",{className:"flex items-center justify-center h-full text-destructive text-sm",children:h}),n&&!c&&e.jsx("iframe",{src:n,className:"w-full h-full border-0",title:(i==null?void 0:i.title)||"SCORM",sandbox:"allow-scripts allow-same-origin allow-forms allow-popups"})]})]})})}const ds=()=>{const{user:i,isTraining:d,isAdmin:N,loading:n}=$(),[p,c]=x.useState("browse");if(n)return null;if(!i)return e.jsx(fe,{to:"/auth",replace:!0});const r=N||d,{data:h=[],isLoading:C}=M({queryKey:["training-courses-browse"],queryFn:async()=>{const{data:t,error:l}=await g.from("training_courses").select("*").eq("status","published").order("sort_order",{ascending:!0});if(l)throw l;return t||[]}}),{data:b=[]}=M({queryKey:["training-enrollments",i.id],queryFn:async()=>{const{data:t,error:l}=await g.from("training_enrollments").select("course_id,status,completed_at,started_at").eq("user_id",i.id);if(l)throw l;return t||[]}}),{data:f={}}=M({queryKey:["training-progress-counts",i.id,h.map(t=>t.id).join(",")],enabled:h.length>0,queryFn:async()=>{const t=h.map(v=>v.id),{data:l}=await g.from("training_lessons").select("id,module_id,training_modules!inner(course_id)").in("training_modules.course_id",t),m={},y={};(l||[]).forEach(v=>{const u=v.training_modules.course_id;m[v.id]=u,y[u]=(y[u]||0)+1});const w=Object.keys(m),_={};if(w.length>0){const{data:v}=await g.from("training_lesson_progress").select("lesson_id").eq("user_id",i.id).in("lesson_id",w);(v||[]).forEach(u=>{const S=m[u.lesson_id];S&&(_[S]=(_[S]||0)+1)})}const k={};return Object.keys(y).forEach(v=>{k[v]={total:y[v],completed:_[v]||0}}),k}}),a=Object.fromEntries(b.map(t=>[t.course_id,t]));return e.jsxs("div",{className:"container mx-auto px-4 py-8",children:[e.jsx(ge,{title:"Training | Seifert Systems",description:"Training courses for Seifert Systems products and tools.",path:"/training"}),e.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[e.jsx(U,{className:"h-8 w-8 text-primary"}),e.jsx("h1",{className:"text-3xl font-bold text-foreground",children:"Training"})]}),e.jsxs(je,{value:p,onValueChange:c,children:[e.jsxs(ve,{children:[e.jsxs(D,{value:"browse",children:[e.jsx(V,{className:"h-4 w-4 mr-1"})," Browse"]}),e.jsxs(D,{value:"progress",children:[e.jsx(oe,{className:"h-4 w-4 mr-1"})," My Progress"]}),r&&e.jsxs(D,{value:"manage",children:[e.jsx(pe,{className:"h-4 w-4 mr-1"})," Manage"]}),r&&e.jsxs(D,{value:"scorm",children:[e.jsx(ce,{className:"h-4 w-4 mr-1"})," SCORM"]})]}),e.jsx(E,{value:"browse",className:"mt-6",children:C?e.jsx("div",{className:"flex justify-center py-12",children:e.jsx(O,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):h.length===0?e.jsxs("div",{className:"rounded-lg border bg-card p-12 text-center text-muted-foreground",children:[e.jsx(V,{className:"h-16 w-16 mx-auto mb-4 opacity-30"}),e.jsx("p",{className:"text-lg",children:"No training courses available yet."})]}):e.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:h.map(t=>{const l=a[t.id],m=f[t.id],y=m&&m.total?Math.round(m.completed/m.total*100):0,w=(l==null?void 0:l.status)||"not_started";return e.jsxs(K,{className:"flex flex-col",children:[t.cover_image_url?e.jsx("div",{className:"h-32 bg-muted rounded-t-lg overflow-hidden",children:e.jsx("img",{src:t.cover_image_url,alt:t.title,className:"w-full h-full object-cover"})}):e.jsx("div",{className:"h-32 bg-gradient-to-br from-primary/20 to-primary/5 rounded-t-lg flex items-center justify-center",children:e.jsx(U,{className:"h-12 w-12 text-primary/40"})}),e.jsxs(se,{className:"pb-2",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsx(te,{className:"text-base leading-snug",children:t.title}),w==="completed"&&e.jsxs(q,{variant:"default",className:"shrink-0 gap-1",children:[e.jsx(Oe,{className:"h-3 w-3"})," Done"]})]}),t.category&&e.jsx("p",{className:"text-xs text-muted-foreground",children:t.category})]}),e.jsxs(ae,{className:"flex-1 flex flex-col gap-3",children:[t.description&&e.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:t.description}),m&&m.total>0&&e.jsxs("div",{children:[e.jsx(Ne,{value:y,className:"h-1.5"}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:[m.completed,"/",m.total," lessons · ",y,"%"]})]}),e.jsxs("div",{className:"flex items-center justify-between mt-auto pt-2",children:[e.jsx("span",{className:"text-xs text-muted-foreground",children:t.estimated_minutes?`~${t.estimated_minutes} min`:""}),e.jsx(j,{size:"sm",asChild:!0,children:e.jsxs(G,{to:`/training/course/${t.slug}`,children:[e.jsx(ke,{className:"h-4 w-4 mr-1"}),w==="completed"?"Review":w==="in_progress"?"Resume":"Start"]})})]})]})]},t.id)})})}),e.jsx(E,{value:"progress",className:"mt-6",children:e.jsx(De,{userId:i.id})}),r&&e.jsx(E,{value:"manage",className:"mt-6",children:e.jsx(Te,{})}),r&&e.jsx(E,{value:"scorm",className:"mt-6",children:e.jsx(qe,{})})]})]})};function De({userId:i}){const{data:d,isLoading:N}=M({queryKey:["training-my-progress",i],queryFn:async()=>{const{data:n}=await g.from("training_enrollments").select("*, training_courses(id,title,slug,category)").eq("user_id",i).order("updated_at",{ascending:!1});return n||[]}});return N?e.jsx(O,{className:"h-8 w-8 animate-spin text-muted-foreground mx-auto my-12"}):!d||d.length===0?e.jsxs("div",{className:"rounded-lg border bg-card p-12 text-center text-muted-foreground",children:[e.jsx(oe,{className:"h-16 w-16 mx-auto mb-4 opacity-30"}),e.jsx("p",{children:"You haven't started any courses yet."})]}):e.jsx("div",{className:"space-y-2",children:d.map(n=>{var p,c,r;return e.jsxs("div",{className:"flex items-center justify-between border rounded-lg p-4 bg-card",children:[e.jsxs("div",{children:[e.jsx("div",{className:"font-medium text-foreground",children:(p=n.training_courses)==null?void 0:p.title}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:[(c=n.training_courses)==null?void 0:c.category," · Status: ",e.jsx("span",{className:"capitalize",children:n.status.replace("_"," ")}),n.completed_at&&` · Completed ${new Date(n.completed_at).toLocaleDateString()}`]})]}),e.jsx(j,{size:"sm",variant:"outline",asChild:!0,children:e.jsx(G,{to:`/training/course/${(r=n.training_courses)==null?void 0:r.slug}`,children:n.status==="completed"?"Review":"Continue"})})]},n.id)})})}export{ds 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.