PageSourceSearch

https://leanpub.com/assets/announcement_bar-Dnj2hEua.js

js leanpub.com collected 2026-09-24 08:26:32 UTC 1,966 bytes, 5 lines download raw bytes

1
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="3cc4f168-5a4f-557b-a105-3e58b2cff9de")}catch(e){}}();
3import{r as c,j as o}from"./vendor-react-qLnyzkeB.js";import{d as u}from"./index-DVnHJy9S.js";import{F as l}from"./index.es-mnCibYNf.js";import{u as m}from"./use_root_loader_data-Bg9_YVFE.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t.SENTRY_RELEASE={id:"13978386027a4a2683cfa43e79422df47742043f"}}catch{}})();function h(t){let e=0;for(let s=0;s<t.length;s++){const i=t.charCodeAt(s);e=(e<<5)-e+i,e|=0}return e.toString(36)}function f(t,e){return`announcement_${t}_dismissed_${h(e)}`}function x(t,e){if(typeof window>"u")return!1;try{return sessionStorage.getItem(f(t,e))==="1"}catch{return!1}}function p(t){var d;const e=m(),s=(d=e==null?void 0:e.announcements)==null?void 0:d[t],i=(s==null?void 0:s.flag)??!1,n=(s==null?void 0:s.text)??"",[a,r]=c.useState(!1);return c.useEffect(()=>{i&&n&&x(t,n)&&r(!0)},[t,n,i]),{enabled:i,text:n,dismissed:a,dismiss:()=>{if(n)try{sessionStorage.setItem(f(t,n),"1")}catch{}r(!0)},loaded:!0}}function S({slug:t,className:e}){const{enabled:s,text:i,dismissed:n,dismiss:a}=p(t);return!s||n?null:o.jsxs("div",{className:`flex items-center justify-center gap-x-4 bg-slate-950 px-4 py-2.5 text-sm text-slate-200 ${e??""}`,children:[o.jsx("div",{className:"text-center [&_a]:underline [&_a]:underline-offset-2 [&_p]:m-0",dangerouslySetInnerHTML:{__html:i}}),o.jsx("button",{type:"button",onClick:a,className:"shrink-0 rounded p-1 text-slate-400 hover:bg-slate-800 hover:text-slate-100","aria-label":"Dismiss announcement",children:o.jsx(l,{icon:u,className:"h-5 w-5"})})]})}export{S as A};
4
5//# debugId=3cc4f168-5a4f-557b-a105-3e58b2cff9de

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.