1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="7b80b124-349c-4d79-8b82-9ecb745ab316",e._sentryDebugIdIdentifier="sentry-dbid-7b80b124-349c-4d79-8b82-9ecb745ab316")}catch(e){}}();import"./_sentry-release-injection-file-SYOkQ1Km.js";import{a as e}from"./rolldown-runtime-BBzOAo5_.js";import{t}from"./react-DuV36FPs.js";import{t as s}from"./useDateDisplay-CpNnMNz1.js";import{K as r,at as a,c as i,i as l,ut as n,z as o}from"./index-CRc22cjs.js";t();var d=a(),c=r(),m=(0,d.withTranslators)((e=>{const t=n(e.data,(e=>""!==e)),s=t=>{switch(t){case"author":return e.t("Author");case"title":return e.t("Title");case"all_text":return e.t("Keywords");default:return""}};return Object.keys(t).map(((e,r)=>(0,c.jsxs)("span",{children:[r?",":null," ",(0,c.jsxs)("strong",{children:[s(e),":"]})," ",t[e]]},r)))})),y=({entries:e,deleteHistoryEntry:t,clearHistory:r})=>{const{formatDate:a}=s();return(0,c.jsxs)("div",{className:"box",children:[!!e.length&&(0,c.jsx)("div",{className:"history__clear",children:(0,c.jsx)("a",{className:"button button--grey button--outline button--small",onClick:r,children:(0,c.jsx)(d.T,{message:"Clear all"})})}),(0,c.jsx)("div",{className:"history",children:e.length?e.map((e=>(0,c.jsxs)("div",{className:"history__item",children:[(0,c.jsx)("div",{className:"history__item-time",children:a(e.created_at)}),(0,c.jsxs)("div",{className:"history__item-info",children:[(0,c.jsxs)("div",{children:[(0,c.jsx)(d.T,{message:"Library"}),": ",e.library_name]}),(0,c.jsx)("div",{className:"history__item-data",children:(0,c.jsx)(m,{data:{author:e.author,title:e.title,all_text:e.all_text}})})]}),(0,c.jsxs)("div",{className:"history__item-link",children:[(0,c.jsx)("button",{type:"button",className:"button",onClick:()=>{const{author:t,title:s,all_text:r}=e;o({id:e.library_id,values:{author:t,title:s,all_text:r},fromHistory:!0})},children:(0,c.jsx)(d.T,{message:"Search again"})}),(0,c.jsx)("a",{className:"small colour--grey",onClick:()=>t(e.id),children:(0,c.jsx)(d.T,{message:"Remove"})})]})]},e.id))):(0,c.jsx)("div",{children:(0,c.jsx)(d.T,{message:"No history yet."})})})]})};y.propTypes={};var h=l((e=>({entries:e.librarySearchHistory})),(e=>({deleteHistoryEntry:t=>e(i(t)),clearHistory:()=>e(i())})))(y);export{h as default}; 2//# sourceMappingURL=LibrarySearchHistory-2P3CD8fr.js.map
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.