PageSourceSearch

https://app.bcome.biz/assets/ComplianceOthers-B3uW08jv.js

js bcome.biz collected 2026-09-24 12:08:18 UTC 25,530 bytes, 60 lines download raw bytes

1import{j as e,T as P,X as H,N as U,h as ie,F as ae,u as le,aF as B,e as ce,S as de,ar as pe}from"./index-YLLr1XAm.js";import{b as h,R as W,h as me}from"./react-vendor-CQSaoxVD.js";import{E as fe}from"./index-qDJj6TVh.js";import{L as G,F as ue}from"./FavoritesDropdown-BpHdvclJ.js";import{u as Y}from"./i18n-vendor-BsN3p5AE.js";import"./maps-vendor-B8YB4c30.js";import"./ui-vendor-CD_cQu1g.js";import"./utils-vendor-Bvo994-W.js";import"./pdf-vendor-BsmFIeA1.js";import"./form-vendor-CnEaK5et.js";const xe=({type:r="info",text:u,linkText:R,linkUrl:L,onClose:y,onLinkClick:S,position:A="bottom-right"})=>{const C=b=>{S?(b.preventDefault(),S()):L||b.preventDefault()};return e.jsx("div",{className:`fixed-notification ${A}`,children:e.jsxs("div",{className:"fixed-notification-content border-radius-8",children:[e.jsx("div",{className:"d-flex align-items-center",children:e.jsxs("span",{className:"d-flex align-items-center font-sfpro-regular font-12px",children:[u,R&&L&&e.jsxs(e.Fragment,{children:[" ",e.jsx("a",{href:L,className:"fixed-notification-link ml-1",onClick:C,target:"_blank",rel:"noopener noreferrer",children:R})]})]})}),y&&e.jsx("button",{className:"fixed-notification-close",onClick:y,"aria-label":"Cerrar notificación",children:e.jsx("span",{className:"icon-icon-close font-8px"})})]})})},he=({data:r})=>{const{t:u}=Y(),[R,L]=h.useState({}),[y,S]=h.useState(r);W.useEffect(()=>{S(r)},[r]),W.useEffect(()=>{const o=({id:s,isFavorite:m})=>{console.log("[ComplianceTable] Received favorite_toggled event:",{id:s,isFavorite:m}),S(l=>l.map(n=>n.id===s?{...n,isFavorite:m}:n))};return P.on("favorite_toggled",o),()=>{P.off("favorite_toggled",o)}},[]);const A=o=>{window.open(o,"_blank")},C=async(o,s)=>{o.stopPropagation();const l=y.find(i=>i.id===s)?.isFavorite||!1,n=!l,d=new G;console.log("[ComplianceTable] handleFavoriteToggle called:",{id:s,currentFavorite:l,newStatus:n}),S(i=>i.map(g=>g.id===s?{...g,isFavorite:n}:g));try{const i=await d.toggleFavorite(s,n);console.log("[ComplianceTable] Toggle response:",i);const g=i.data?.isFavorite??i.isFavorite??n,w=i.message??u(l?"favorite-removed":"favorite-added");U.display("success",w),window.location.search.includes("filter=favorites")&&l&&P.emit("favorite_removed_in_view",{id:s}),P.emit("favorite_toggled",{id:s,isFavorite:g})}catch(i){console.error("Error toggling favorite:",i),U.display("error",u("compliance-error-updating-favorite")),S(g=>g.map(w=>w.id===s?{...w,isFavorite:l}:w))}},b=async(o,s,m)=>{o.stopPropagation();const l=F(s);L(n=>({...n,[l]:!0}));try{let n=s,d="";if(s.includes("drive.google.com"))if(d=s.match(/\/(?:file|d)\/([^/]+)/)?.[1]||s.match(/id=([^&]+)/)?.[1]||"",d)n=`https://drive.google.com/uc?export=download&id=${d}`;else throw new Error("Invalid Google Drive URL");else if(s.includes("docs.google.com")&&(s.includes("/document/d/")?(d=s.match(/\/document\/d\/([^/]+)/)?.[1]||"",n=`https://docs.google.com/document/d/${d}/export/docx`):s.includes("/spreadsheets/d/")?(d=s.match(/\/spreadsheets\/d\/([^/]+)/)?.[1]||"",n=`https://docs.google.com/spreadsheets/d/${d}/export/xlsx`):s.includes("/presentation/d/")&&(d=s.match(/\/presentation\/d\/([^/]+)/)?.[1]||"",n=`https://docs.google.com/presentation/d/${d}/export/pptx`),!d))throw new Error("Invalid Google Docs URL");if(n.includes("drive.google.com/uc?")||n.includes("docs.google.com")){const i=document.createElement("a");i.href=n,i.target="_self";const g=m?m.replace(/[^a-z0-9]/gi,"_").toLowerCase()+T(s):decodeURIComponent(s.split("/").pop()?.split("?")[0]||"download");i.download=g,document.body.appendChild(i),i.click(),document.body.removeChild(i)}else try{const i=await fetch(n);if(!i.ok)throw new Error("Error downloading file");const g=await i.blob(),w=window.URL.createObjectURL(g),v=document.createElement("a");v.href=w;const E=m?m.replace(/[^a-z0-9]/gi,"_").toLowerCase()+T(s):decodeURIComponent(s.split("/").pop()?.split("?")[0]||"download");v.download=E,document.body.appendChild(v),v.click(),document.body.removeChild(v),window.URL.revokeObjectURL(w)}catch(i){console.error("Error fetching file:",i),window.open(s,"_blank")}}catch(n){console.error("Error during download:",n),window.open(s,"_blank"),U.display("error",u("download-error"))}finally{setTimeout(()=>{L(n=>({...n,[l]:!1}))},500)}},T=o=>{const s={pdf:/\.pdf($|\?|#)/i,docx:/\.docx($|\?|#)/i,doc:/\.doc($|\?|#)/i,xlsx:/\.xlsx($|\?|#)/i,xls:/\.xls($|\?|#)/i,csv:/\.csv($|\?|#)/i,pptx:/\.pptx($|\?|#)/i,ppt:/\.ppt($|\?|#)/i};for(const[m,l]of Object.entries(s))if(l.test(o))return`.${m}`;if(o.includes("docs.google.com")){if(o.includes("/document/"))return".docx";if(o.includes("/spreadsheets/"))return".xlsx";if(o.includes("/presentation/"))return".pptx"}return".pdf"},F=o=>o.split("/").pop()?.split("?")[0]||"",x=o=>{const s=o.createdAt||o.date;if(!s)return"";try{const m=new Date(s),l={month:"short",day:"numeric",year:"numeric"};return m.toLocaleDateString("en-US",l)}catch(m){return console.error("Error formatting date:",m),s}},k=o=>
1{if(o.format)return o.format;const s=o.url.toLowerCase();try{const l=new URL(s),n=l.hostname.toLowerCase();if(n.includes("blog")||n.includes("substack.com")||n.startsWith("bcome.biz")||s.includes("/blog/"))return"Blog";if(n.includes("youtube.com")||n.includes("youtu.be"))return"Video";if(n.includes("spotify.com")||n.includes("soundcloud.com")||n.includes("anchor.fm"))return"Podcast";if(n.includes("vimeo.com"))return"Video";if(n==="docs.google.com"&&l.pathname.toLowerCase().includes("/spreadsheets/d/"))return"Excel";if(n.includes("drive.google.com")){if(l.pathname.toLowerCase().includes("/file/d/"))return"PDF";if(l.pathname.toLowerCase().includes("/drive/search")){const i=o.title?.toLowerCase()||"";return i.includes("pdf")?"PDF":i.includes("excel")||i.includes("xlsx")||i.includes("xls")||i.includes("csv")?"Excel":i.includes("word")||i.includes("doc")?"Word":i.includes("powerpoint")||i.includes("ppt")?"PowerPoint":i.includes("video")?"Video":i.includes("audio")||i.includes("podcast")?"Podcast":"Document"}const d=l.pathname.split("/")[3]?.toLowerCase();if(d==="document")return"Word";if(d==="presentation")return"PowerPoint";if(d==="spreadsheets")return"Excel"}}catch(l){console.error("[ComplianceTable] Error al analizar URL:",l)}const m={pdf:/\.pdf($|\?|#)/i,excel:/\.(xlsx|xls|csv)($|\?|#)/i,word:/\.(docx|doc)($|\?|#)/i,powerpoint:/\.(pptx|ppt)($|\?|#)/i,video:/\.(mp4|webm|mov|avi)($|\?|#)/i,audio:/\.(mp3|wav|ogg)($|\?|#)/i};for(const[l,n]of Object.entries(m))if(n.test(s))switch(l){case"pdf":return"PDF";case"excel":return"Excel";case"word":return"Word";case"powerpoint":return"PowerPoint";case"video":return"Video";
1case"audio":return"Podcast"}return"Document"},N=(o,s)=>{if(s.toLowerCase().includes("youtube.com")||s.toLowerCase().includes("youtu.be"))return"link";if(o||(o=k({url:s})),["PDF","Excel","Word","PowerPoint","Document"].includes(o))return"download";if(["Video","Article","Podcast","Web","Blog"].includes(o))return"link";try{const m=new URL(s);if(["youtube.com","youtu.be","vimeo.com","spotify.com","soundcloud.com","dailymotion.com","ted.com","twitch.tv"].some(n=>m.hostname.includes(n)))return"link"}catch{}return"download"};return e.jsxs("div",{className:"d-flex flex-column",style:{position:"relative",height:"calc(100vh - 200px)"},children:[e.jsx(xe,{type:"info",text:u("compliance-fixed-notification-text"),linkText:u("contact-us"),linkUrl:"mailto:[email protected]",position:"bottom-right",onLinkClick:()=>{window.location.href="mailto:[email protected]"}}),e.jsx("div",{className:"table-responsive",style:{overflowY:"auto",flex:"1 1 auto",paddingBottom:"48px"},children:e.jsxs("table",{className:"table table-striped",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"capitalize",children:[e.jsx("th",{className:"font-sfpro-regular text-dark-100 align-middle",style:{width:"40%",paddingLeft:"16px"},children:u("Title")}),e.jsx("th",{className:"font-sfpro-regular text-dark-100 align-middle",style:{width:"15%"},children:u("Category")}),e.jsx("th",{className:"font-sfpro-regular text-dark-100 align-middle",style:{width:"15%"},children:u("Format")}),e.jsx("th",{className:"font-sfpro-regular text-dark-100 align-middle",style:{width:"15%"},children:u("Date")}),e.jsx("th",{className:"font-sfpro-regular text-dark-100 align-middle",style:{width:"7.5%"},children:u("Action")}),e.jsx("th",{className:"font-sfpro-regular text-dark-100 align-middle",style:{width:"7.5%"},children:u("Favorites")})]})}),e.jsx("tbody",{children:y.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:6,className:"text-center py-4",children:e.jsx("span",{className:"text-dark-60 font-14px",children:u("no-results-found")})})}):y.map(o=>{const s=F(o.url),m=o.isFavorite||!1,l=R[s],n=k(o);return e.jsxs("tr",{className:"cursor-pointer table-item",onClick:()=>A(o.url),children:[e.jsx("td",{className:"font-sfpro-regular letter-spacing-normal font-14px align-middle",style:{width:"40%",paddingLeft:"16px"},children:o.title}),e.jsx("td",{className:"font-sfpro-regular letter-spacing-normal text-dark-100 font-14px align-middle",style:{width:"15%"},children:e.jsx("span",{style:{borderRadius:"24px",background:"#f0f0f2",padding:"4px 12px",display:"inline-block"},children:o.section==="Documents"||o.section==="My documents"?u("compliance-my-documents"):o.section==="Resources"?u("compliance-resources"):o.section})}),e.jsx("td",{className:"font-sfpro-regular letter-spacing-normal text-dark-100 font-14px align-middle",style:{width:"15%"},children:e.jsx("span",{style:{borderRadius:"24px",background:"#f0f0f2 ",padding:"4px 12px",display:"inline-block"},children:n==="Document"?u("compliance-article"):n})}),e.jsx("td",{className:"font-sfpro-regular letter-spacing-normal text-dark-100 font-14px align-middle",style:{width:"15%"},children:x(o)}),e.jsx("td",{className:"align-middle",style:{width:"7.5%"},children:l?e.jsx("div",{className:"d-flex justify-content-start",children:e.jsx("div",{style:{width:"24px",height:"24px",padding:"3px 5px 5px 3px",borderRadius:"2px",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:"transparent"},children:e.jsx("div",{className:"spinner"})})}):e.jsx("div",{className:"d-flex justify-content-start",children:N(n,o.url)==="download"?e.jsx("div",{style:{width:"24px",height:"24px",padding:"3px 5px 5px 3px",cursor:"pointer",borderRadius:"2px",transition:"background-color 0.2s ease",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:"transparent"},className:"download-icon",onClick:d=>{d.preventDefault(),d.stopPropagation(),b(d,o.url,o.title)},children:e.jsx("span",{className:"icon-icon-download font-20px",style:{width:"16px",height:"16px"}})}):e.jsx("div",{style:{width:"24px",height:"24px",padding:"0px 5px 5px 5px",cursor:"pointer",borderRadius:"2px",transition:"background-color 0.2s",backgroundColor:"transparent"},onClick:d=>{d.preventDefault(),d.stopPropagation(),window.open(o.url,"_blank")},children:e.jsx(fe,{href:o.url})})})}),e.jsx("td",{className:"align-middle",style:{width:"7.5%"},children:e.jsx("div",{className:"d-flex justify-content-start",children:e.jsx(H,{select:m,onClick:d=>C(d,o.id),uniqueId:o.id,disableFill:!1})})})]},o.id)})})]})}),e.jsx("div",{className:"d-flex flex-row align-items-center pl-3 pr-4 py-2",style:{borderTop:"1px solid #F0F0F2",width:"100%",background:"#FFFFFF",position:"absolute",bottom:0,left:0},children:e.jsxs("div",{className:"d-flex flex-row justify-content-between font-sfpro-regular letter-spacing-normal text-dark-100 font-14px",children:[y.length," ",u("items")]})})]})}
1,q="Compliance",De=()=>{const{t:r}=Y(),{projectSelected:u}=ie(),{callToAction:R}=ae("compliance"),[L,y]=h.useState(!0),[S,A]=h.useState(null),[C,b]=h.useState([]),[T,F]=h.useState([]),[x,k]=h.useState(r("All categories")),[N,o]=h.useState("newest"),[s,m]=h.useState(""),[l,n]=h.useState(!1),[d,i]=h.useState(!1),[g,w]=h.useState(!1),[v,E]=h.useState(null),[O,M]=h.useState(!1),X=h.useRef(null),I=me(),{user:_}=le(),[J,K]=h.useState(["All categories"]);h.useEffect(()=>{const t=new URLSearchParams(window.location.search),c=t.get("filter");w(c==="favorites");const a=t.get("category");a&&k(a)},[]),h.useEffect(()=>{const t=()=>{const c=new URLSearchParams(window.location.search),a=c.get("filter");w(a==="favorites");const p=c.get("category");p?k(p):!p&&x!==r("All categories")&&k(r("All categories"))};return window.addEventListener("popstate",t),()=>{window.removeEventListener("popstate",t)}},[x,r]),h.useEffect(()=>{y(!0),(async()=>{try{if(!u){b([]),F([]),y(!1);return}if(!u.accountId){b([]),F([]),y(!1);return}const f=await new G().getComplianceDocuments(u.accountId);let j=[];if(f&&f.data){if(f.data===""){b([]),F([]),y(!1);return}j=Array.isArray(f.data)?f.data:[f.data]}if(j.length>0){const $=["All categories"];$.push("My documents"),$.push("Resources"),K($)}const D=j.map($=>$.section?$:{...$,section:"Documents"});b(D),F(D),y(!1)}catch(p){console.error("[Compliance] Error loading compliance documents:",p),b([]),F([]),y(!1)}})();const c=({id:p,isFavorite:f})=>{b(j=>j.map(D=>D.id===p?{...D,isFavorite:f}:D))},a=({id:p})=>{b(f=>f.map(j=>j.id===p?{...j,isFavorite:!1}:j))};return P.on("favorite_toggled",c),P.on("favorite_removed_in_view",a),()=>{P.off("favorite_toggled",c),P.off("favorite_removed_in_view",a)}},[u]),h.useEffect(()=>{const t=c=>{if(v){const a=c.target;!a.closest(".dropdown-menu")&&!a.closest(".nav-link")&&E(null)}};return document.addEventListener("mousedown",t),()=>{document.removeEventListener("mousedown",t)}},[v]),h.useEffect(()=>{let t=[...C];if(x!==r("All categories")){const c=x==="My documents"?"Documents":x;t=t.filter(a=>a.section===c)}if(s){const c=s.toLowerCase();t=t.filter(a=>a.title&&a.title.toLowerCase().includes(c)||a.category&&a.category.toLowerCase().includes(c)||a.section&&a.section.toLowerCase().includes(c))}g&&(t=t.filter(c=>c.isFavorite)),t.sort((c,a)=>{const p=c.createdAt||c.date||"",f=a.createdAt||a.date||"",j=new Date(p).getTime(),D=new Date(f).getTime();return N==="newest"?D-j:j-D}),F(t)},[C,x,N,s,g,r]);const Q=t=>{k(t==="Documents"?"My documents":t)},z=t=>{o(t)},Z=t=>{m(t)},ee=t=>{if(!t)return"";try{const p=new URL(t),f=p.hostname.toLowerCase();if(f.includes("youtube.com")||f.includes("youtu.be"))return"Video";if(f.includes("spotify.com")||f.includes("anchor.fm")||f.includes("soundcloud.com")||f.includes("podcasts.apple.com"))return"Podcast";if(f.includes("substack.com")||f.includes("medium.com")||f.includes("bcome.biz/blog"))return"Blog";if(f==="docs.google.com"&&p.pathname.toLowerCase().includes("/spreadsheets/d/"))return"Excel";if(f.includes("drive.google.com")){if(p.pathname.toLowerCase().includes("/file/d/"))return"PDF";const j=p.pathname.split("/")[3]?.toLowerCase();if(j==="document")return"Word";if(j==="presentation")return"PowerPoint"}}catch(p){console.warn("[FileType] Error parsing URL:",p)}const c=t.toLowerCase(),a={pdf:/\.pdf($|\?|#)/,excel:/\.(xlsx?|csv|xls)($|\?|#)/,word:/\.(docx?|doc)($|\?|#)/,powerpoint:/\.(pptx?|ppt)($|\?|#)/,video:/\.(mp4|avi|mov|wmv|flv|webm)($|\?|#)/,audio:/\.(mp3|wav|ogg|m4a)($|\?|#)/};for(const[p,f]of Object.entries(a))if(f.test(c))switch(p){case"pdf":return"PDF";case"excel":return"Excel";case"word":return"Word";case"powerpoint":return"PowerPoint";case"video":return"Video";
1case"audio":return"Podcast"}return"Document"},te=t=>{t&&t.preventDefault();const c=!g;if(w(c),c){const a=new URLSearchParams;a.append("filter","favorites"),x!==r("All categories")&&a.append("category",x);const p=a.toString();I(`/compliance/others?${p}`)}else{const a=new URLSearchParams;x!==r("All categories")&&a.append("category",x);const p=a.toString();I(p?`/compliance/others?${p}`:"/compliance/others")}},oe=()=>{M(!O)},se=()=>{M(!1)},ne=()=>{n(!l),l&&s&&m("")},re=()=>{const t=_?.name||"",c=`User ${t} ask info of ${q}`,a=`Hola,
2Enviar email o activar demo a ${t} para el uso de ${q}.`;window.location.href=`mailto:${pe}?subject=${encodeURIComponent(c)}&body=${encodeURIComponent(a)}`},V=window.location.pathname.startsWith("/compliance");return e.jsxs("div",{className:"container-fluid p-0",children:[R?e.jsxs("div",{children:[e.jsxs("div",{className:"w-100 d-flex flex-column align-items-center justify-content-between",children:[e.jsx(B,{userName:_?.name}),e.jsx("h1",{className:"pb-0 mb-0 px-3 text-dark-100 font-sfpro-regular font-18px w-100 pt-4 mb-4 text-capitalize",style:{height:"42px"},children:r("compliance")})]}),e.jsx("div",{className:"row m-2 rounded-08 shadow-01 bg-white-100 position-relative",style:{marginBottom:"10px",minHeight:"calc(80vh - 100px)"},children:e.jsxs("div",{className:"m-auto d-flex flex-column justify-content-around align-items-center",style:{width:"60%",position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"},children:[e.jsx("h3",{className:"text-dark-100 font-sfpro-medium text-[16px] text-center leading-[25px] m-0",children:r("cta-demo-title")}),e.jsx("p",{className:"text-dark-40 font-sfpro-light text-[14px] text-center leading-[23px] mt-[10px] mb-0",children:r("cta-demo-subtitle")}),e.jsx("button",{className:"flex flex-col w-[200px] h-[42px] px-[24px] py-[8px] justify-center items-center gap-[10px] text-white rounded-[2px] border border-dark-100 bg-dark-100 mt-[20px]",onClick:re,children:r("cta-demo-button")})]})})]}):L?e.jsx("div",{className:"d-flex justify-content-center align-items-center",style:{height:"100vh"},children:e.jsx("div",{className:"m-auto",children:e.jsx(ce,{color:"#1C1C30",width:"60px",height:"60px"})})}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"w-100 d-flex flex-column align-items-center justify-content-between",children:[e.jsx(B,{userName:_?.name}),e.jsx("h1",{className:"pb-0 mb-0 px-3 text-dark-100 font-sfpro-regular font-18px w-100 pt-4 mb-4",style:{height:"42px"},children:r("sidebar-nav-compliance-others")})]}),e.jsxs("div",{className:V?"":"px-3",children:[e.jsxs("header",{className:`d-flex flex-row align-items-center justify-content-between w-100 pr-3 ${V?"pl-3":""}`,style:{position:"relative"},children:[e.jsxs("div",{className:"d-flex flex-row align-items-center gap-4",children:[e.jsx("div",{className:"d-flex flex-column align-items-start",children:e.jsx("div",{className:"d-flex flex-column align-items-start",style:{position:"relative",zIndex:1e3},children:e.jsxs("div",{className:"position-relative d-flex flex-row align-items-center nav-link cursor-pointer px-0 py-0 pr-1",onClick:()=>E(v==="filter"?null:"filter"),children:[e.jsx("span",{className:"text-dark-100 font-14px font-sfpro-regular text-overflow-ellipsis overflow-hidden",children:x==="Documents"||x==="My documents"?r("compliance-my-documents"):x==="Resources"?r("compliance-resources"):x==="All categories"?r("compliance-all-categories"):x}),e.jsx("div",{className:"d-flex align-items-center justify-content-center",style:{height:"32px",width:"32px"},children:e.jsx("span",{className:"icon-icon-chevron-down font-30px",style:{transition:"all 0.5s ease",transformOrigin:"50% 50%",transform:v==="filter"?"rotate(180deg)":"rotate(0deg)"}})}),v==="filter"&&e.jsx("div",{className:"dropdown-menu show position-absolute",style:{left:"auto",width:"280px",maxHeight:"320px",overflowY:"auto",zIndex:1001},children:J.map(t=>e.jsxs("button",{onClick:c=>{c.stopPropagation(),Q(t),E(null)},className:x===t?"selected-project font-sfpro-medium d-flex align-items-center dropdown-item":"dropdown-item",children:[x===t&&e.jsx("span",{className:"icon-icon-tick mr-2 text-dark-100 font-18px"}),e.jsx("div",{className:`${x===t?"font-sfpro-medium":"font-sfpro-regular"}
3                                text-overflow-ellipsis overflow-hidden`,children:t==="Documents"||t==="My documents"?r("compliance-my-documents"):t==="Resources"?r("compliance-resources"):t==="All categories"?r("compliance-all-categories"):t})]},`filter-${t}`))})]})})}),e.jsx("div",{className:"d-flex flex-column align-items-start",children:e.jsx("div",{className:"d-flex flex-column align-items-start",style:{position:"relative",zIndex:1e3},children:e.jsxs("div",{className:"position-relative d-flex flex-row align-items-center nav
3-link cursor-pointer px-0 py-0 pl-3 pr-1",onClick:()=>E(v==="sort"?null:"sort"),children:[e.jsxs("span",{className:"text-dark-100 font-14px font-sfpro-regular text-overflow-ellipsis overflow-hidden",children:[r("sort"),": ",r(N==="newest"?"newest":"oldest")]}),e.jsx("div",{className:"d-flex align-items-center justify-content-center",style:{height:"32px",width:"32px"},children:e.jsx("span",{className:"icon-icon-chevron-down font-30px",style:{transition:"all 0.5s ease",transformOrigin:"50% 50%",transform:v==="sort"?"rotate(180deg)":"rotate(0deg)"}})}),v==="sort"&&e.jsxs("div",{className:"dropdown-menu show position-absolute",style:{left:"auto",width:"280px",maxHeight:"320px",overflowY:"auto",zIndex:1001},children:[e.jsxs("button",{onClick:t=>{t.stopPropagation(),z("newest"),E(null)},className:N==="newest"?"selected-project font-sfpro-medium d-flex align-items-center dropdown-item":"dropdown-item",children:[N==="newest"&&e.jsx("span",{className:"icon-icon-tick mr-2 text-dark-100 font-18px"}),e.jsx("div",{className:`${N==="newest"?"font-sfpro-medium":"font-sfpro-regular"}
4                              text-overflow-ellipsis overflow-hidden`,children:r("newest")})]}),e.jsxs("button",{onClick:t=>{t.stopPropagation(),z("oldest"),E(null)},className:N==="oldest"?"selected-project font-sfpro-medium d-flex align-items-center dropdown-item":"dropdown-item",children:[N==="oldest"&&e.jsx("span",{className:"icon-icon-tick mr-2 text-dark-100 font-18px"}),e.jsx("div",{className:`${N==="oldest"?"font-sfpro-medium":"font-sfpro-regular"}
5                              text-overflow-ellipsis overflow-hidden`,children:r("oldest")})]})]})]})})})]}),e.jsxs("div",{className:"d-flex flex-row align-items-center",children:[e.jsx("h3",{className:"font-20px text-dark-100 m-0 pr-5 font-sfpro-regular"}),e.jsxs("div",{className:"d-flex align-items-center",children:[e.jsxs("div",{className:l?"search-bar-active d-flex flex-row-reverse align-items-center":"search-bar d-flex flex-row-reverse align-items-center",children:[e.jsx("div",{onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),onClick:ne,className:"d-flex align-items-center text-dark-60 text-dark-100-hover",children:e.jsx("span",{id:"search-bar-compliance",className:`icon-icon-${l?"close font-1px":"search font-20px"}`,style:{margin:"6px"}})}),l&&e.jsx("input",{className:"search-input font-sfpro-regular",type:"text",placeholder:r("search"),value:s,onChange:t=>Z(t.target.value),autoFocus:!0}),d&&e.jsx(de,{tooltipId:"search-bar-compliance",tooltipOpen:d,text:r("search")})]}),e.jsxs("div",{className:"position-relative",ref:X,style:{cursor:"pointer"},children:[e.jsx(H,{select:g,onClick:oe,badgeCount:C.filter(t=>t.isFavorite).length,disableFill:!0}),O&&e.jsx(ue,{favorites:C.filter(t=>t.isFavorite).slice(0,10).map(t=>{const c=ee(t.url),a=c==="Document"?r("compliance-article"):c,p=t.section==="Documents"?r("compliance-my-documents"):r("compliance-resources");return{id:t.id,name:t.title,reference:a,section:p,fileType:a,url:t.url}}),count:C.filter(t=>t.isFavorite).length,onClose:se,onNavigateToFavorites:te,scope:"articles"})]})]})]})]}),e.jsx("div",{className:"mt-4",children:T.length===0?g?e.jsx("div",{className:"grid-container p-2",children:e.jsxs("div",{className:"empty-favorites",children:[e.jsx("p",{children:r("compliance-no-favorites")}),e.jsx("button",{onClick:()=>{k(r("All categories")),m(""),o("newest"),I("/compliance/others"),w(!1)},children:r("compliance-back-to-all-items")})]})}):e.jsx("div",{style:{flexGrow:1},children:e.jsx("div",{className:"grid-container p-2",children:e.jsxs("div",{className:"empty-favorites",children:[e.jsx("p",{children:r("compliance-no-documents")}),e.jsx("button",{onClick:()=>{k(r("All categories")),m(""),o("newest"),I("/compliance/others")},children:r("compliance-reset-filters")})]})})}):e.jsx(he,{data:T})})]})]}),e.jsx("style",{children:`
6          .grid-container {
7            display: grid;
8            grid-template-columns: repeat(3, 1fr);
9            gap: 24px;
10            width: 100%;
11            justify-content: start;
12            position: relative;
13            min-height: ${g||x==="My documents"||!g&&x!=="My documents"&&T.length===0?"calc(100vh - 200px)":"auto"};
14          }
15          .empty-favorites {
16            width: 320px;
17            padding: 24px;
18            display: flex;
19            flex-direction: column;
20            align-items: center;
21            gap: 16px;
22            position: absolute;
23            top: 50%;
24            left: 50%;
25            transform: translate(-50%, -50%);
26          }
27          .empty-favorites p {
28            margin: 0;
29            color: var(--New-Palette-Dark-100, #1C1C30);
30            text-align: center;
31          }
32          .empty-favorites button {
33            display: flex;
34            padding: 12px 32px;
35            flex-direction: column;
36            justify-content: center;
37            align-items: center;
38            gap: 10px;
39            align-self: stretch;
40            border-radius: 4px;
41            background: var(--New-Palette-Dark-100, #1C1C30);
42            color: white;
43            border: none;
44            cursor: pointer;
45            transition: opacity 0.2s ease;
46          }
47          .search-input {
48            border: none;
49            width: 200px;
50            height: 35px;
51            background-color: transparent;
52            margin-left: 10px;
53            font-size: 14px;
54            color: #75747F;
55            outline: none;
56          }
57          .search-input::placeholder {
58            color: #75747F;
59          }
60        `})]})};export{De 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.