1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[283],{77107:function(e,a,l){var t=l(57437),r=l(84772),s=l.n(r),o=l(20828),n=l(34630);a.Z=e=>{let{active:a,onChange:l,buttons:r,disabled:i=!1,label:d,dark:c=!1}=e,u=r.map((e,a)=>(0,t.jsx)(o.Y8,{className:e=>{let{checked:a}=e;return s()("cursor-pointer rounded-md px-4 py-2 text-center text-xs font-semibold uppercase leading-none transition-colors ",{"cursor-pointer bg-white text-black border-2 border-black":!i&&a},{"text-gray-800":!i&&!a&&!c},{"text-gray-200":!i&&!a&&c},{"cursor-not-allowed text-gray-400":i})},value:e.value.toString(),disabled:i,children:e.label},a));return(0,t.jsxs)(o.Ee,{className:"flex rounded-lg bg-black/10 p-0.5",onChange:l,value:a,children:[(0,t.jsx)(n.__,{className:"sr-only",children:d}),u]})}},72554:function(e,a,l){var t=l(19008);l(29192),l(21378),l(53800),l(81669),l(16602),l(54269),t.P.install(t.P.dash.DashComponent),t.P.log.setLogLevel(2),a.Z=t.P},79614:function(e,a,l){l.d(a,{Xo:function(){return o},hF:function(){return s}});var t=l(11057),r=l(72554);let s=(e,a,l)=>{let s=new r.Z.drm.DrmEnvironment("HOOPLA"),o="".concat(t.Z.patronApiGateway,"/license/fps/ksm/patron/").concat(e,"/{VERSION}/").concat(a);s.setDrmSystem(r.Z.drm.KeySystem.FAIRPLAY,{licenseUrl:o,certificateUrl:"".concat(t.Z.patronApiGateway,"/license/fps/ksm/certificate.der"),modifiers:{extractContentId:function(e,a){let l=new TextDecoder().decode(a),t=l.lastIndexOf("/"),r=l.substring(t+1);return o=o.replace("{VERSION}",r),r},certificateRequest:function(e,a){a.headers.Authorization="Bearer ".concat(l)},licenseRequest:function(e,a){a.headers.Authorization="Bearer ".concat(l),a.uris[0]=o,a.headers["Content-Type"]="application/octet-stream"}}}),r.Z.drm.registerDrmEnvironment(s)},o=(e,a)=>{let l=new r.Z.drm.DrmEnvironment("HOOPLA"),s="".concat(t.Z.patronApiGateway,"/license/fps/ksm/demo/").concat(e,"/{VERSION}");l.setDrmSystem(r.Z.drm.KeySystem.FAIRPLAY,{licenseUrl:s,certificateUrl:"".concat(t.Z.patronApiGateway,"/license/fps/ksm/certificate.der"),modifiers:{certificateRequest:function(l,t){t.headers.Authorization="TEST_APP ".concat(a),t.headers["media-key"]=e,t.headers["Cache-Control"]="max-age=0",t.headers.Pragma="Cache-Control: no-cache"},extractContentId:function(e,a){let l=new TextDecoder().decode(a),t=l.lastIndexOf("/"),r=l.substring(t+1);return s=s.replace("{VERSION}",r),r},licenseRequest:function(l,t){t.uris[0]=s,t.headers.Authorization="TEST_APP ".concat(a),t.headers["media-key"]=e,t.headers["Content-Type"]="application/octet-stream"},licenseResponse:function(e,a){let l=null==a?void 0:a.status,t=null==a?void 0:a.data,r="string"==typeof t?t:t?new TextDecoder().decode(t):"";if(void 0!==l&&(l<200||l>=300)){var s;console.error("FairPlay license request failed","status:",l,"url:",null!==(s=null==a?void 0:a.originalUri)&&void 0!==s?s:null==a?void 0:a.uri,"body:",r)}return a}}}),r.Z.drm.registerDrmEnvironment(l)}},24385:function(e,a,l){l.r(a),l.d(a,{default:function(){return eU}});var t=l(57437),r=l(18551),s=l(84772),o=l.n(s),n=l(38706),i=l(10158),d=l(95905),c=l(40718),u=l.n(c),m=l(36732),x=l(25566);let b=["audio.froze","audio.skipping","position","play","plugin","isnt.listed","controls.working","description"],h=e=>{let{handleClose:a,title:l,open:r}=e,s=(0,n.T_)("audiobook.player.feedbackSubmitter"),o=b.map(e=>({label:s(e),value:s(e)}));return(0,t.jsx)(m.Z,{title:l,options:o,onSuccess:a,handleClose:a,showBandwidthCheck:!x.env.STORYBOOK,showHelpFirst:!1,open:r,submitting:!1})};h.propTypes={handleClose:u().func.isRequired,title:u().object.isRequired};var p=l(2265),f=l(98092),g=l(65972),v=l(52345),y=l(59950),k=l(72371),j=l(96997),N=l(85073),w=l(88972),C=l(92748),S=l(16908),T=l(94578),E=l(83334),_=l(79614),P=l(37065),A=l.n(P),O=l(72554),D=l(70764),I=l.n(D),Z=l(9701),L=l.n(Z),z=l(89148),B=l(80141),R=l.n(B),M=l(34198);let F=(e,a)=>({position:0,addPlayCount:async e=>{let a=(0,y._)({source:"S"},e);(0,M.V)({url:"/plays/record",method:"post",data:a})},deleteSession:async(e,a)=>{R().leaveBreadcrumb("Delete playback session",{contentId:e,seconds:a},"process");try{await (0,M.V)({url:"/sessions/invalidate/".concat(e),method:"post",data:{seconds:isFinite(a)?Math.floor(a):void 0}})}catch(l){return R().leaveBreadcrumb(l.message,{contentId:e,seconds:a},"error"),Promise.reject(l)}},getPosition:async l=>{R().leaveBreadcrumb("Get previous playback position",{contentId:l},"process");try{let t=await (0,M.V)({url:"/playback-positions/".concat(l),method:"get"});return e({position:t.data.seconds}),a().position}catch(e){return R().leaveBreadcrumb(e.message,{contentId:l},"error"),Promise.reject(e)}},savePosition:async(a,l)=>{R().leaveBreadcrumb("Save playback position",{contentId:a,seconds:l},"process");try{let t=await (0,M.V)({url:"/playback-positions/".concat(a),method:"PUT",data:{seconds:isFinite(l)?Math.floor(l):void 0}});return e({position:t.data.seconds})}catch(e){return R().leaveBreadcrumb(e.message,{contentId:a,seconds:l},"error"),Promise.reject(e)}},saveSession:async(l,t,r,s)=>{let o={deviceId:t,takeOverSession:r,seconds:isFinite(s)?s:void 0};R().leaveBreadcrumb("Save playback session",{contentId:l,takeOverSession:r,seconds:s},"process");try{let t=await (0,M.V)({url:"/sessions/".concat(l),method:"POST",data:o});return e({position:t.data.seconds}),a().position}catch(e){throw R().leaveBreadcrumb(e.message,{contentId:l,takeOverSession:r,seconds:s},"error"),e}}}),U=(0,z.Z)((e,a)=>(0,y._)({},F(e,a)));var G=l(93524),q=l(63916),K=l(51720),H=l(22134),V=l(4350),Y=l(41986),$=l(72788),J=l(11057),Q=l(22484),W=l(26032);let X=(0,j.G6)(),ee="AUDIO_PLAYER_STATE",ea={muted:!1,playbackSpeed:1,volume:1,bookmarkSort:"RECENT"},el=(0,p.createContext)(void 0),et=!1;function er(e){if(e){let a=e.getPosition(),l=e.getSeekRange();if(l.end&&a>0)return l.end-a<60?{seconds:0,percentComplete:0}:{seconds:Math.floor(a),percentComplete:Math.floor(a/l.end*100)}}}let es=e=>{switch(e){case 0:default:return"IDLE";
1case 3:return"PLAYING";case 4:return"PAUSED"}},eo=(0,N.Zw)(),en=e=>{var a,l;let{children:r,title:s}=e,o=(0,n.T_)("audio"),{setShowMDW:i}=(0,G.$)(),{setupPostPlay:d}=(0,E.Y)(),{clearCurrentlyPlayingTitle:c}=(0,q.h)(),{checkTermsStatus:u}=(0,V.U)(),{promptRequired:m,isOpen:x,openModal:b}=(0,Q.k)(e=>({promptRequired:e.promptRequired,isOpen:e.isOpen,openModal:e.openModal})),h=(0,W.s4)(),f=null!==(l=null==h?void 0:h.user)&&void 0!==l?l:null,g=null==f?void 0:null===(a=f.patrons)||void 0===a?void 0:a[0],v=U(e=>e.addPlayCount),j=U(e=>e.deleteSession),N=U(e=>e.saveSession),P=U(e=>e.getPosition),D=localStorage.getItem(ee),Z=D?JSON.parse(D):null,{circulation:z,mediaKey:B,chapters:R}=s,M=!I()(R),F=(0,p.useRef)(null),en=(0,p.useRef)(null),[ei,ed]=(0,p.useState)(0),[ec,eu]=(0,p.useState)(null),[em,ex]=(0,p.useState)(null),[eb,eh]=(0,p.useState)((null==Z?void 0:Z.volume)?Z.volume:ea.volume),[ep,ef]=(0,p.useState)((null==Z?void 0:Z.muted)?Z.muted:ea.muted),[eg,ev]=(0,p.useState)(!1),[ey,ek]=(0,p.useState)(!1),[ej,eN]=(0,p.useState)("OFF"),[ew,eC]=(0,p.useState)(1),[eS,eT]=(0,p.useState)(0),eE=(0,K.UN)();(0,p.useEffect)(()=>{let e=e=>{"Escape"===e.key&&ey&&ek(!1)};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[ey]),(0,p.useEffect)(()=>(s.kind.name===Y.L_t.Audiobook&&eK(),()=>{en.current&&(en.current.release(),en.current.off("timeupdate"),en.current.off("play"),en.current.off("pause"),en.current.off("ended"),en.current.off(O.Z.events.STATE_CHANGED),en.current.off(O.Z.events.LOADEDMETADATA))}),[B,null==g?void 0:g.id,null==z?void 0:z.id]);let[e_,eP]=(0,p.useState)((null==Z?void 0:Z.playbackSpeed)?Z.playbackSpeed:ea.playbackSpeed),[eA,eO]=(0,p.useState)(Z&&"showByChapter"in Z?Z.showByChapter:M),[eD,eI]=(0,p.useState)(!1),[eZ,eL]=(0,p.useState)((null==Z?void 0:Z.bookmarkSort)?Z.bookmarkSort:ea.bookmarkSort),[ez]=(0,w.D)(Y.wN1,{update(e,a){let{data:l}=a,t=null==l?void 0:l.createBookmark;if(!t)return;let r=e.readQuery({query:$.zk,variables:{contentId:s.id}}),o=(null==r?void 0:r.bookmarks)||[];e.writeQuery({query:$.zk,data:{bookmarks:o.concat([t])},variables:{contentId:s.id}})}}),[eB]=(0,w.D)(Y.qr0),[eR]=(0,w.D)(Y.O4j,{update(e,a){let{data:l}=a,t=null==l?void 0:l.deleteBookmark;if(!t)return;let r=e.readQuery({query:$.zk,variables:{contentId:s.id}}),o=(null==r?void 0:r.bookmarks)||[];"Bookmark"===t.__typename&&e.writeQuery({query:$.zk,data:{bookmarks:o.filter(a=>e.identify(a)!==e.identify(t))},variables:{contentId:s.id}})}}),{loading:eM,data:eF,refetch:eU}=(0,C.a)($.zk,{variables:{contentId:s.id},fetchPolicy:"cache-and-network"}),eG=async()=>{document.body.classList.toggle("overflow-hidden",!1),e3(),en.current&&en.current.off("pause",eW);try{await eW()}finally{c()}},eq=function(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;!en.current&&F.current&&(en.current=new O.Z.Player(F.current,{license:J.Z.prestoPlayLicenseKey}),eH(e,a),en.current.on(O.Z.events.ERROR,e0),en.current.on("timeupdate",e1),en.current.on("play",e$),en.current.on("pause",eW),en.current.on("ended",eX),en.current.on(O.Z.events.STATE_CHANGED,e=>ex(es(e.detail.currentState))),en.current.on(O.Z.events.LOADEDMETADATA,eQ))},eK=(0,p.useCallback)(async()=>{if((null==g?void 0:g.id)&&(null==z?void 0:z.id)&&B)try{let e=await P(s.id);await N(s.id,eo,!0,0);let a=await S.Z.fetchUpFrontAuthToken(B,g.id,z.id);(null==a?void 0:a.data)||console.warn("No upfront auth token received"),await eq(null==a?void 0:a.data,e),await v({circId:z.id,contentId:s.id})}catch(e){console.error("Error starting audiobook player:",e)}},[z,g,B]),eH=(e,a)=>{if(!f)return;(0,_.hF)(B,null==z?void 0:z.id,f.authToken);let l={source:eV(B),startTime:a,autoplay:!0,muted:ep,volume:eb,drm:X?{env:"HOOPLA"}:{env:"DRMtoday",customData:eY(e)}};en.current.load(l)},eV=e=>X?(en.current.use(O.Z.hls.HlsComponent),"".concat(J.Z.fairplayUrl,"/").concat(e,"/master.m3u8")):(en.current.use(O.Z.dash.DashComponent),"".concat(J.Z.dashUrl,"/").concat(e,"/Manifest.mpd")),eY=e=>({userId:(null==g?void 0:g.id)||"",sessionId:(null==z?void 0:z.id)||"",merchant:"hoopla",authToken:e}),e$=async()=>{await N(s.id,eo,!0,0)},eJ=e=>
1N(s.id,eo,!1,e).catch(e=>{var a,l;null===(a=en.current)||void 0===a||a.pause(),(null==e?void 0:null===(l=e.response)||void 0===l?void 0:l.status)===412&&i(!0)});(0,H.Y)(()=>{let e=er(en.current);e&&eJ(e.seconds)},"PLAYING"===em?25e3:null);let eQ=()=>{s.kind.name===Y.L_t.Audiobook&&en.current.setPlaybackRate(e_),en.current.setVolume(eb);let e=en.current.getSeekRange();eu({start:e.start,end:e.end})},eW=(0,p.useCallback)(async()=>{let e=er(en.current);e&&(await eJ(e.seconds),await j(s.id,e.seconds))},[s]),eX=async()=>{await j(s.id,0),eG()},e0=e=>{var a,l,t;e.details&&T.h.reportPlayerError("Error in Castlabs Audiobook Player: ".concat(JSON.stringify(e.details,null,2)),s.id),e.detail&&T.h.reportPlayerError("Error in Castlabs Audiobook Player: ".concat(e.detail.message),s.id),console.warn("Error in Castlabs Audiobook Player",null==e?void 0:null===(a=e.detail)||void 0===a?void 0:a.message,null==e?void 0:null===(t=e.detail)||void 0===t?void 0:null===(l=t.data)||void 0===l?void 0:l.response)},e1=A()(()=>{en.current&&ed(en.current.getPosition())},750),e2=(0,p.useCallback)((e,a)=>{a.some(function(a,l){return!!e5(e,a)&&(ev((0,k._)((0,y._)({},a),{index:l})),!0)})},[]);(0,p.useEffect)(()=>{if(s.kind.name===Y.L_t.Audiobook&&M){if(eg){if(!e5(ei,eg)){"END"===ej&&(en.current.pause(),eN("OFF"));let e=R[eg.index+1];e&&e5(ei,e)?ev((0,k._)((0,y._)({},e),{index:eg.index+1})):e2(ei,R)}}else e2(ei,R)}},[ei,M,R,eg,ej,s,e2]),(0,p.useEffect)(()=>{eg&&"PLAYING"===em&&u(()=>{}).then(()=>{if(m){var e;null===(e=en.current)||void 0===e||e.pause(),x||b(eE?"kidsMode":"review")}}).catch(e=>{console.error("Error checking terms status:",e)})},[eg,m]);let e5=(e,a)=>L()(e,a.start,a.start+a.duration),e4=async e=>{var a;null===(a=en.current)||void 0===a||a.seek(e),"END"===ej&&eg&&!L()(e,eg.start,eg.start+eg.duration)&&(console.warn("OUT OF CHAPTER",{seek:e,currentChapter:eg}),eN("OFF"));let l=er(en.current);l?await eJ(l.seconds):await eJ(0)},e3=()=>{let e=er(en.current),a=s.circulation.id;if(!(null==ec?void 0:ec.end)){void 0===e||(null==e?void 0:e.seconds)||(null==e?void 0:e.percentComplete)||d(a);return}let l=ec.end-ei;ec.end<=300?l<=60&&l>0&&d(a):l<=300&&l>0?d(a):void 0===e||(null==e?void 0:e.seconds)||(null==e?void 0:e.percentComplete)||d(a)},e7=A()(e=>{ez({variables:{bookmark:e}})},1e3),e8=e=>{if(et&&clearTimeout(et),et=!1,eT(e),e>0)et=setTimeout(()=>e8(e-1),1e3);else{var a;null===(a=en.current)||void 0===a||a.pause()}},e9=(e,a)=>{let l=localStorage.getItem(ee),t=l?JSON.parse(l):{},r=(0,k._)((0,y._)({},t),{[e]:a});localStorage.setItem(ee,JSON.stringify(r))};return(0,t.jsxs)(el.Provider,{value:{onSeek:e4,seekRange:ec,playerState:em,position:ei,togglePlay:()=>{var e,a;"PLAYING"===em?null===(e=en.current)||void 0===e||e.pause():(null===(a=en.current)||void 0===a||a.play(),eQ())},playingTitle:s,volume:eb,changeVolume:e=>{var a;eh(e),null===(a=en.current)||void 0===a||a.setVolume(e),e9("volume",e)},expanded:ey,togglePlayerExpanded:ek,muted:ep,toggleMute:()=>{var e;null===(e=en.current)||void 0===e||e.setMuted(!ep),ef(!ep),e9("muted",!ep)},checkPostPlay:e3,currentChapter:eg,addBookmark:e7,chapters:R,hasChapters:M,sleepTime:eS,onSleepTimeChange:e=>{eT(e),0===e?et&&clearTimeout(et):e8(e)},playbackSpeed:e_,onPlaybackSpeedChange:e=>{var a;null===(a=en.current)||void 0===a||a.setPlaybackRate(e),eP(e),e9("playbackSpeed",e)},showByChapter:eA,setShowByChapter:e=>{eO(e),e9("showByChapter",e)},menuOpen:eD,setMenuOpen:eI,sleepTimeSelection:ej,setSleepTimeSelection:eN,sleepTimeCustom:ew,setSleepTimeCustom:eC,loadingBookmarks:eM,bookmarksData:eF,refetchBookmarks:eU,bookmarkSort:eZ,onBookmarkSortChange:e=>{eL(e),e9("bookmarkSort",e)},updateBookmark:e=>{eB({variables:{bookmark:e}})},deleteBookmark:e=>{eR({variables:{id:e}})},setCurrentChapter:ev,onClose:eG},children:[r,(0,t.jsx)("div",{className:"absolute left-0 bottom-0 z-0 h-0.5 w-0.5 overflow-hidden",children:(0,t.jsx)("video",{ref:F,tabIndex:-1,width:"1",height:"1",crossOrigin:"anonymous",children:o("no.html5")})})]})};function ei(){let e=(0,p.useContext)(el);if(!e)throw Error("useAudioContext must be used within AudiobookProvider");return e}var ed=l(14400),ec=l(54071);function eu(e){let{onClose:a,bookmark:l}=e,r=(0,n.T_)("audiobook.bookmark"),s=(0,n.Gb)(),{deleteBookmark:o,updateBookmark:i}=ei(),[c,u]=(0,p.useState)(l.note||"");return(0,t.jsx)(v.Z,{onClose:a,open:!0,header:l.chapter.title,children:(0,t.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,t.jsxs)("div",{className:"flex flex-row items-center",children:[(0,t.jsx)("div",{className:"flex flex-auto flex-col",children:(0,t.jsxs)("p",{className:"flex flex-row space-x-2",children:[s.dateTime(new Date(l.createdDate),{year:"numeric",month:"long",day:"2-digit"})," ",s.dateTime(new Date(l.createdDate),{hour:"numeric",minute:"numeric"})]})}),(0,t.jsx)("div",{className:"flex-none",children:(0,t.jsx)(ed.Z,{seconds:l.chapter?l.seconds-l.chapter.start:l.seconds,hideLeadingZero:!1})})]}),(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsx)("label",{htmlFor:"note",children:r("edit.add.note")}),(0,t.jsx)("textarea",{id:"note",name:"note",value:c,onChange:e=>{u(e.target.value)},maxLength:500,className:"h-40 w-full border border-solid border-gray-200 py-1 px-2"})]}),(0,t.jsxs)("div",{className:"flex flex-row items-center justify-end space-x-2",children:[(0,t.jsx)(d.kq,{onClick:()=>{o(l.id),a()},children:r("delete.button")}),(0,t.jsx)(ec.KM,{onClick:()=>{let e=(0,k._)((0,y._)({},l),{note:c});delete e.__typename,delete e.chapter,i(e),a()},children:r("save.button")})]})]})})}let em=(e,a)=>new Date(a.createdDate).getTime()-new Date(e.createdDate).getTime(),ex=(e,a)=>parseInt(e.cfi||"0",10)-parseInt(a.cfi||"0",10);function eb(e){var a,l;let{onClose:r,open:s}=e,i=(0,n.T_)("audiobook.modal"),{bookmarksData:d,bookmarkSort:c,onBookmarkSortChange:u}=ei(),[m,x]=(0,p.useState)(null),b=o()("relative",{block:(null==d?void 0:null===(a=d.bookmarks)||void 0===a?void 0:a.length)>0,hidden:!(null==d?void 0:null===(l=d.bookmarks)||void 0===l?void 0:l.length)});return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(v.Z,{onClose:r,open:s,header:i("bookmarks.heading"),children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"flex flex-row items-center justify-end",children:(0,t.jsxs)(f.Menu,{as:"div",className:b,children:[(0,t.jsxs)(f.MenuButton,{className:"flex hover:text-hoopla-blue-dark focus:text-hoopla-blue-dark",children:[(0,t.jsx)("span",{className:"m-auto mr-1",children:i("bookmarks.sort._")}),(0,t.jsx)(g.nz,{className:"fill-current",size:24})]}),(0,t.jsxs)(f.MenuItems,{className:"absolute top-full right-0 z-10 mt-2 w-56 origin-top-right divide-y divide-gray-100 rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none",children:[(0,t.jsx)(f.MenuItem,{children:e=>{let{focus:a}=e;return(0,t.jsx)("button",{onClick:()=>u("RECENT"),className:o()("mb-0 flex w-full items-center justify-center border-none px-2 py-4 hover:bg-gray-100",{"bg-gray-100":a,"text-hoopla-blue hover:text-hoopla-blue-dark":"RECENT"===c}),children:i("bookmarks.sort.recent")}
1)}}),(0,t.jsx)(f.MenuItem,{children:e=>{let{focus:a}=e;return(0,t.jsx)("button",{onClick:()=>u("POSITION"),className:o()("mb-0 flex w-full items-center justify-center border-none px-2 py-4 hover:bg-gray-100",{"bg-gray-100":a,"text-hoopla-blue hover:text-hoopla-blue-dark":"POSITION"===c}),children:i("bookmarks.sort.position")})}})]})]})}),I()(null==d?void 0:d.bookmarks)?(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"mb-2",children:i("bookmarks.empty.1")}),(0,t.jsx)("p",{className:"mb-2",children:i("bookmarks.empty.2")})]}):(0,t.jsx)("ul",{className:"flex flex-col divide-y divide-solid divide-gray-200",children:(()=>{let e=[...d.bookmarks],a=e=>{x(e)};return("RECENT"===c?e.sort(em):e.sort(ex)).map(e=>(0,t.jsx)(eh,{bookmark:e,onEditClick:a,onClose:r},e.id))})()})]})}),!!m&&(0,t.jsx)(eu,{bookmark:m,onClose:()=>x(null)})]})}let eh=e=>{let{bookmark:a,onEditClick:l,onClose:r}=e,s=(0,n.T_)("audiobook"),o=(0,n.Gb)(),{onSeek:i}=ei();return(0,t.jsxs)("li",{className:"group relative cursor-pointer odd:bg-gray-100 hover:bg-gray-200 focus:bg-gray-200",children:[(0,t.jsx)("button",{className:"w-full px-2 py-4 text-left",onClick:()=>{i(a.seconds||0),r()},children:(0,t.jsxs)("span",{className:"flex flex-auto flex-col",children:[(0,t.jsxs)("span",{className:"flex w-full flex-row items-start space-x-2",children:[(0,t.jsx)(g.EO,{className:"ml-1 flex-none fill-gray-700",size:24}),(0,t.jsxs)("span",{className:"flex flex-1 flex-col",children:[a.chapter&&(0,t.jsx)("span",{className:"text-lg font-bold leading-tight",children:a.chapter.title}),(0,t.jsxs)("span",{className:"mb-1",id:"bookmark_date_".concat(a.id),children:[o.dateTime(new Date(a.createdDate),{year:"numeric",month:"long",day:"2-digit"})," ",o.dateTime(new Date(a.createdDate),{hour:"numeric",minute:"numeric"})]})]}
1),(0,t.jsx)("span",{children:(0,t.jsx)(ed.Z,{seconds:a.chapter?(a.seconds||0)-a.chapter.start:a.seconds||0,hideLeadingZero:!1})})]}),a.note&&(0,t.jsxs)("span",{className:"mt-2 flex flex-col pl-10",children:[(0,t.jsxs)("span",{className:"flex flex-row items-center justify-start font-semibold uppercase",children:[(0,t.jsx)(g.TO,{className:"mr-2 flex-none fill-gray-700",size:16}),s("bookmark.note.label")]}),(0,t.jsx)("span",{children:(0,t.jsx)("em",{className:"italic",children:a.note})})]})]})}),(0,t.jsx)("div",{className:"absolute right-2 bottom-0.5 flex flex-none flex-col items-end",children:(0,t.jsx)("button",{onClick:e=>{e.stopPropagation(),l(a)},onKeyDown:e=>e.stopPropagation(),"aria-label":s("modal.bookmarks.edit"),"aria-describedby":"bookmark_date_".concat(a.id),children:(0,t.jsx)(g.z,{size:20,className:"fill-gray-700 group-hover:fill-gray-800"})})})]})};function ep(e){let{onClose:a,open:l}=e,r=(0,n.T_)("audiobook.modal"),{chapters:s,onSeek:o,setCurrentChapter:i}=ei(),d=(0,p.useCallback)(e=>{i((0,k._)((0,y._)({},e),{index:e.ordinal})),o(e.start),a()},[o,i,a]);return(0,t.jsx)(v.Z,{onClose:a,open:l,header:r("chapters.heading"),children:(0,t.jsx)("ul",{className:"flex flex-col divide-y divide-solid divide-gray-200 text-gray-900",children:s.map(e=>(0,t.jsx)("li",{className:"flex cursor-pointer flex-row justify-between odd:bg-gray-100 hover:bg-gray-200 focus:bg-gray-200",children:(0,t.jsxs)("button",{onClick:()=>d(e),className:"flex h-full w-full flex-row justify-between py-2 px-3",title:r("chapters.goTo",{chapterName:e.title}),children:[(0,t.jsx)("span",{children:e.title}),(0,t.jsx)(ed.Z,{seconds:e.duration,hideLeadingZero:!1})]})},e.ordinal))})})}var ef=l(19634),eg=function(){let{playingTitle:e,currentChapter:a,sleepTime:l,addBookmark:r,position:s,sleepTimeSelection:o}=ei(),{setNotification:i}=(0,ef.l)(),d=(0,n.T_)();return(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsx)("button",{onClick:()=>{r({contentId:e.id,seconds:Math.floor(s)}),i({messageBody:d("audiobook.bookmark.added"),messageLevel:ef.P.success})},className:"group","aria-label":d("ebookHeader.addBookmark"),children:(0,t.jsx)(g.EO,{className:"mr-1 mb-1.5 fill-gray-100 hover:fill-gray-400 group-focus:fill-gray-400",size:30})})}),(0,t.jsx)("h2",{className:"mb-2 flex-auto text-center text-2xl font-medium",children:a&&a.title}),(0,t.jsxs)("div",{className:"relative mb-2 overflow-hidden rounded-lg",children:[(l>0||"END"===o)&&(0,t.jsxs)("div",{className:"absolute top-0 left-0 z-10 flex w-full flex-row items-center justify-center bg-black bg-opacity-90 py-3",children:[(0,t.jsx)(g.JG,{className:"mr-6",size:40}),(0,t.jsx)("span",{className:"text-4xl",children:"END"===o?d("audiobook.sleep.end.chapter"):(0,t.jsx)(ed.Z,{seconds:l,hideLeadingZero:!1})})]}),(0,t.jsx)("img",{className:"w-full rounded-lg shadow-lg",src:"".concat(J.Z.titleArtUrl,"/").concat(e.artKey,"_540.jpeg"),alt:e.title,"aria-hidden":!0,tabIndex:-1})]})]})},ev=l(79861),ey=l(71215),ek=l(88380),ej=l(95390),eN=e=>{let{playerState:a,ariaHidden:l,large:r}=e,{togglePlay:s}=ei(),o=(0,n.T_)("audio.player"),{checkTermsStatus:i}=(0,V.U)(),d="text-gray-100 hover:text-gray-300 active:text-gray-300";return"PLAYING"===a?(0,t.jsx)("button",{className:"group",onClick:s,"aria-label":o("pause.aria.label"),"aria-hidden":l,tabIndex:l?-1:0,children:(0,t.jsx)(g.oS,{className:d,size:r?80:48})}):"PAUSED"===a?(0,t.jsx)("button",{className:"group",onClick:()=>i(s),"aria-label":o("play.aria.label"),"aria-hidden":l,tabIndex:l?-1:0,children:(0,t.jsx)(g.qX,{className:d,size:r?80:48})}):(0,t.jsx)("div",{style:{width:40,margin:"0 10px"},children:(0,t.jsx)(ej.gb,{height:40,width:40,delay:0})})},ew=e=>{let{dark:a,expanded:l,togglePlayerExpanded:r}=e,s=(0,n.T_)(),i=e=>{r(e),document.body.classList.toggle("overflow-hidden",e)},d=o()("transition transform duration-300 hover:text-hoopla-blue-dark focus:text-hoopla-blue-dark",{"text-gray-100":!a,"-rotate-180":l});return(0,t.jsx)("button",{onClick:function(){i(!l)},id:"expand-button","aria-label":s(l?"collapse.button.aria.label":"expand.button.aria.label"),children:(0,t.jsx)(g.Kh,{className:d,size:24})})},eC=l(82513),eS=l(52795),eT=l(6868);function eE(){var e;let{playerState:a,playingTitle:l,volume:r,changeVolume:s,muted:i,toggleMute:d,onClose:c,expanded:u,togglePlayerExpanded:m}=ei(),x=(0,n.T_)("modal"),b=o()("h-4 w-4 border rounded-full bg-gray-100",{"bg-gray-400":i,"cursor-default":i,"cursor-pointer":!i}),h=o()("!h-5 !w-5 border rounded-full bg-white",{"bg-gray-400":i});return(0,t.jsxs)("div",{className:"z-10 flex flex-col sm:flex-row sm:justify-between py-2",children:[(0,t.jsx)(eS.pJ,{name:eT.w.AUDIOBOOK_PLAYER,id:l.id}),(0,t.jsxs)("div",{className:"flex flex-row items-center min-w-0",children:[(0,t.jsx)(ew,{expanded:u,togglePlayerExpanded:m}),(0,t.jsx)("img",{className:"ml-2 h-16 w-16 rounded shadow-md shrink-0",src:"".concat(J.Z.titleArtUrl,"/").concat(l.artKey,"_270.jpeg"),alt:l.title}),(0,t.jsxs)("div",{className:"flex items-center min-w-0 pl-2",children:[a&&(0,t.jsx)(eN,{playerState:a}),(0,t.jsxs)(ek.Z,{className:"ml-2 flex flex-col justify-start min-w-0",href:(0,e
1C.kE)(l.id,l.kind.name,l.title,null===(e=l.primaryArtist)||void 0===e?void 0:e.name),children:[(0,t.jsx)("h1",{className:"mb-0 text-xs font-bold text-white sm:text-base md:text-xl",children:l.title}),l.primaryArtist&&(0,t.jsx)("h2",{className:"mb-0 text-xxs text-white sm:text-sm md:text-lg",children:l.primaryArtist.name})]})]}),(0,t.jsx)("button",{className:"ml-auto px-2 sm:hidden",onClick:c,"aria-label":x("close.aria.label"),children:(0,t.jsx)(g.x8,{className:"fill-gray-100 hover:fill-red-700",size:24})})]}),(0,t.jsxs)("div",{className:"flex flex-row items-center justify-center pl-2 pt-1 sm:justify-start sm:pt-0 sm:pl-4",children:[(0,t.jsx)("button",{onClick:d,"aria-label":x(i?"unmute":"mute"),children:(0,t.jsx)(g.ff,{className:"mr-2 fill-gray-100 hover:fill-gray-300",size:32,muted:i,volume:r})}),(0,t.jsx)(ey.Z,{ariaLabel:x("volumeSlider"),className:"flex w-28 items-center",min:0,max:100,disabled:i,value:100*r,thumbClassName:b,thumbActiveClassName:h,renderTrack:(e,a)=>e_({props:e,state:a,muted:i}),onChange:e=>s(e/100)}),(0,t.jsx)("button",{className:"p-1 hidden sm:block",onClick:c,"aria-label":x("close.aria.label"),children:(0,t.jsx)(g.x8,{className:"ml-1 fill-gray-100 hover:fill-red-700",size:30})})]})]})}let e_=e=>{let{props:a,state:l,muted:r}=e,s=o()("h-1 bg-white",{"bg-gray-500":r}),n=o()("h-1 bg-gray-400",{"bg-gray-500":r}),{key:i}=a,d=(0,ev._)(a,["key"]);return(0,t.jsx)("div",(0,k._)((0,y._)({},d),{className:0===l.index?s:n}),"track-".concat(l.index))};var eP=l(20828);let eA=e=>{let{value:a,label:l}=e;return(0,t.jsx)(eP.Ee.Option,{value:a,children:e=>{let{checked:a}=e;return(0,t.jsx)("div",{className:o()("mb-3 flex w-60 cursor-pointer items-center justify-center rounded-lg border-none py-3 font-semibold active:bg-hoopla-blue/90 active:text-gray-200",a?"bg-hoopla-blue text-gray-100 hover:bg-hoopla-blue-dark":"bg-gray-200 text-gray-900 hover:bg-gray-300"),children:(0,t.jsx)(eP.Ee.Label,{as:"span",children:l})})}})},eO=(e,a,l)=>{let r=o()("h-1",{"bg-gray-500":!l,"bg-hoopla-blue-light":l}),s=o()("h-1",{"bg-gray-500":!l,"bg-gray-400":l}),{key:n}=e,i=(0,ev._)(e,["key"]);return(0,t.jsx)("div",(0,k._)((0,y._)({},i),{className:0===a.index?r:s}),n)};function eD(e){let{onClose:a,open:l}=e,r=(0,n.T_)(),{playbackSpeed:s,onPlaybackSpeedChange:i}=ei(),d=[.5,.75,1,1.25,1.5,1.75,2].indexOf(s)>-1?s:"CUSTOM",[c,u]=(0,p.useState)(d),[m,x]=(0,p.useState)("CUSTOM"===d),[b,h]=(0,p.useState)("CUSTOM"===d?s:.5),f=e=>{u(e),"CUSTOM"===e?(x(!0),y(b)):(m&&(x(!1),h(.5)),i(e))},y=e=>{h(e),i(e)},k=o()("h-5 w-5 border rounded-full",{"bg-gray-400 cursor-default":!m,"cursor-pointer bg-hoopla-blue":m}),j=o()("h-7 w-7 border rounded-full bg-hoopla-blue-dark",{"bg-gray-400":!m});return(0,t.jsx)(v.Z,{onClose:a,modalStyle:{maxWidth:400},open:l,header:r("audiobook.modal.speed.heading"),children:(0,t.jsxs)("div",{className:"flex flex-col items-center",children:[(0,t.jsxs)("div",{className:"mb-6 flex flex-row items-center","aria-label":r("audiobook.player.currentPlaybackSpeed",{playbackSpeed:s}),children:[(0,t.jsx)(g.fD,{className:"fill-black",size:32}),(0,t.jsx)("p",{className:"ml-2 text-xl font-bold",children:r("audiobook.player.playbackSpeed._",{playbackSpeed:s})})]}),(0,t.jsxs)(eP.Ee,{value:c,onChange:f,children:[(0,t.jsx)(eA,{value:.5,label:"0.5x"}),(0,t.jsx)(eA,{value:.75,label:"0.75x"}),(0,t.jsx)(eA,{value:1,label:"1.0x (normal)"}),(0,t.jsx)(eA,{value:1.25,label:"1.25x"}),(0,t.jsx)(eA,{value:1.5,label:"1.5x"}),(0,t.jsx)(eA,{value:1.75,label:"1.75x"}),(0,t.jsx)(eA,{value:2,label:"2.0x"}),(0,t.jsx)(eA,{value:"CUSTOM",label:r("playback.speed.label.custom")})]}),(0,t.jsxs)("div",{className:"mt-4 box-border flex w-full flex-col",onClick:()=>f("CUSTOM"),children:[(0,t.jsx)(ey.Z,{ariaLabel:r("audiobook.player.playbackSpeed.slider._"),className:"mb-4 flex w-full items-center",min:.5,max:4,disabled:!m,value:b,thumbClassName:k,thumbActiveClassName:j,renderTrack:(e,a)=>eO(e,a,m),onChange:y,step:.05}),(0,t.jsxs)("div",{className:"flex flex-row items-center justify-between",children:[(0,t.jsx)("div",{className:"text-lg",children:r("audiobook.player.playbackSpeed.slider.minimum")}),(0,t.jsx)("div",{className:"text-lg",children:r("audiobook.player.playbackSpeed.slider.maximum")})]})]})]})})}function eI(){let e=(0,n.T_)("audiobook.player.controls"),{currentChapter:a,playerState:l,position:r,chapters:s,hasChapters:i,onSeek:d,seekRange:c}=ei(),{checkTermsStatus:u}=(0,V.U)(),m=i&&a&&0===a.index,x=i&&a&&a.index===s.length-1,b=()=>{if(a&&0!==a.index&&s[a.index-1]){let e=s[a.index-1];r-a.start>3?d(a.start):d(e.start)}},h=()=>{a&&a.index!==s.length-1&&s[a.index+1]&&d(s[a.index+1].start)},f=(0,p.useCallback)(()=>
1{if(!c)return!1;c.end-r>30?d(r+30):d(c.end)},[c,r,d]);return(0,t.jsxs)("div",{className:"flex flex-row items-center justify-center space-x-4",children:[(0,t.jsx)("button",{onClick:()=>{r>30?d(r-30):d(0)},className:"group","aria-label":e("replay.aria.label"),children:(0,t.jsx)(g.Nb,{className:"fill-gray-100 hover:fill-gray-300 group-focus:fill-gray-300",size:50})}),i&&(0,t.jsx)("button",{disabled:m,className:"group",onClick:()=>u(b),"aria-label":e("chapter.previous.aria.label"),children:(0,t.jsx)(g.RU,{className:o()("fill-gray-100 hover:fill-gray-300 group-focus:fill-gray-300",{"fill-gray-500 hover:fill-gray-500 group-focus:fill-gray-500":m}),size:50})}),l&&(0,t.jsx)(eN,{playerState:l,large:!0}),i&&(0,t.jsx)("button",{disabled:x,className:"group",onClick:()=>u(h),"aria-label":e("chapter.next.aria.label"),children:(0,t.jsx)(g.uP,{className:o()("fill-gray-100 hover:fill-gray-300 group-focus:fill-gray-300",{"fill-gray-500 hover:fill-gray-500 group-focus:fill-gray-500":x}),size:50})}),(0,t.jsx)("button",{className:"group",onClick:f,"aria-label":e("forward.aria.label"),children:(0,t.jsx)(g.RG,{className:"fill-gray-100 hover:fill-gray-300 group-focus:fill-gray-300",size:50})})]})}function eZ(){let e=(0,n.T_)("audiobook.menu"),{playbackSpeed:a,refetchBookmarks:l,setMenuOpen:r,hasChapters:s}=ei(),o="w-36 px-2 py-1 min-h-full flex flex-col items-center justify-end mx-2 hover:bg-black hover:bg-opacity-30 focus:bg-black focus:bg-opacity-30";return(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{className:"flex flex-row items-stretch justify-between",children:[(0,t.jsxs)("button",{className:o,onClick:()=>{r("SLEEP")},"aria-label":e("sleep.aria.label"),children:[(0,t.jsx)(g.JG,{className:"fill-gray-100",size:44}),(0,t.jsx)("span",{className:"mb-0 text-gray-100",children:e("sleep._")})]}),s&&(0,t.jsxs)("button",{className:o,onClick:()=>{r("CHAPTERS")},"aria-label":e("chapters.aria.label"),children:[(0,t.jsx)(g.Cj,{className:"text-gray-100",size:44}),(0,t.jsx)("span",{className:"mb-0 text-gray-100",children:e("chapters._")})]}),(0,t.jsxs)("button",{className:o,onClick:()=>{l(),r("BOOKMARKS")},"aria-label":e("bookmarks.aria.label"),children:[(0,t.jsx)(g.EO,{className:"mb-1 fill-gray-100",size:36}),(0,t.jsx)("span",{className:"mb-0 text-gray-100",children:e("bookmarks._")})]}),(0,t.jsxs)("button",{className:o,onClick:()=>{r("SPEED")},"aria-label":e("speed.aria.label"),children:[(0,t.jsxs)("span",{className:"mb-2 text-4xl font-bold text-gray-100",children:[a,e("speed.times")]}),(0,t.jsx)("span",{className:"mb-0 text-gray-100",children:e("speed._")})]})]})})}var eL=l(77107),ez=l(6499);let eB=(e,a)=>{let l=o()("h-1 bg-white"),r=o()("h-1 bg-gray-400"),{key:s}=e,n=(0,ev._)(e,["key"]);return(0,t.jsx)("div",(0,k._)((0,y._)({},n),{className:0===a.index?l:r}),s)};var eR=function(){let e=(0,n.T_)(),{position:a,seekRange:l,currentChapter:r,onSeek:s,showByChapter:o,setShowByChapter:i,hasChapters:d}=ei(),[c,u]=(0,p.useState)(null);if(!l)return null;let m=()=>null!==c?o&&r?c-r.start:c:o&&r?a-r.start:a,x=()=>o&&r?r.duration-(a-r.start):l.end-a,b=()=>{let a=(0,ez.h)(m()),l=e(a.hours?"audiobook.player.progress.time._":"audiobook.player.progress.time.no.hours",a),t=(0,ez.h)(x()),r=e(t.hours?"audiobook.player.progress.time._":"audiobook.player.progress.time.no.hours",t);return e("audiobook-player-progress-",{position:l,duration:r,inBookOrChapter:o?e("audiobook.player.progress.toggle.chapter"):e("audiobook.player.progress.toggle.book")})};return(0,t.jsxs)("div",{className:"flex flex-col items-center",children:[d&&(0,t.jsx)(eL.Z,{dark:!0,onChange:e=>i("true"===e),active:o.toString(),buttons:[{label:e("audiobook.player.progress.toggle.book"),value:"false"},{label:e("audiobook.player.progress.toggle.chapter"),value:"true"}]}),(0,t.jsxs)("div",{className:"flex w-full flex-row justify-between","aria-label":b(),children:[(0,t.jsx)(ed.Z,{seconds:m(),hideLeadingZero:!1}),(0,t.jsx)(ed.Z,{seconds:x(),hideLeadingZero:!1})]}),(0,t.jsx)(ey.Z,{className:"my-3 flex w-full items-center",min:o&&r?r.start:0,max:o&&r?r.start+r.duration:l.end,value:a,ariaValuetext:b(),ariaLabel:e("audiobook.player.progress.seekbarSlider"),thumbClassName:"h-5 w-5 border rounded-full bg-gray-100",thumbActiveClassName:"h-7 w-7 border rounded-full bg-white",renderTrack:eB,onChange:u,onAfterChange:e=>{s(e),u(null)}}),(0,t.jsx)("p",{className:"mb-0 mt-1 font-light text-gray-200",children:(null==l?void 0:l.end)&&(0,t.jsx)("span",{children:e("audiobook.progress.percent.complete",{percent:Math.floor(a/l.end*100)})})})]})},eM=function(e){let{onClose:a,open:l}=e,r=(0,n.T_)(),{onSleepTimeChange:s,currentChapter:i,sleepTimeSelection:d,setSleepTimeSelection:c,sleepTimeCustom:u,setSleepTimeCustom:m}=ei(),[x,b]=(0,p.useState)("CUSTOM"===d),h=e=>{c(e),"CUSTOM"===e?(f(u),b(!0)):(x&&(m(1),b(!1)),"END"===e||("OFF"===e?s(0):s(60*e)))},f=e=>{m(e),s(60*e)},y=o()("h-5 w-5 border rounded-full",{"bg-gray-400 cursor-default":!x,"curs
1or-pointer bg-hoopla-blue":x}),k=()=>"OFF"===d?r("audiobook.modal.sleep.off"):"END"===d?r("audiobook.modal.sleep.end"):"CUSTOM"===d?r("audiobook.modal.sleep.minutes",{minutes:"".concat(u)}):r("audiobook.modal.sleep.minutes",{minutes:"".concat(d)}),j=o()("h-7 w-7 border rounded-full bg-hoopla-blue-dark",{"bg-gray-400":!x});return(0,t.jsx)(v.Z,{onClose:a,modalStyle:{maxWidth:400},open:l,header:r("audiobook.modal.sleep.heading"),children:(0,t.jsxs)("div",{className:"flex flex-col items-center text-gray-900",children:[(0,t.jsxs)("div",{className:"mb-6 flex flex-row items-center","aria-label":r("audiobook.modal.currentSleepTime",{sleepTime:k()}),children:[(0,t.jsx)(g.JG,{size:34}),(0,t.jsx)("div",{className:"ml-2 text-xl font-bold",children:k()})]}),(0,t.jsxs)(eP.Ee,{value:d,onChange:h,children:[(0,t.jsx)(eA,{value:"OFF",label:r("audiobook.modal.sleep.off")}),i&&(0,t.jsx)(eA,{value:"END",label:r("audiobook.modal.sleep.end")}),(0,t.jsx)(eA,{value:5,label:r("sleep.timer.label.5")}),(0,t.jsx)(eA,{value:15,label:r("sleep.timer.label.15")}),(0,t.jsx)(eA,{value:30,label:r("sleep.timer.label.30")}),(0,t.jsx)(eA,{value:45,label:r("sleep.timer.label.45")}),(0,t.jsx)(eA,{value:60,label:r("sleep.timer.label.60")}),(0,t.jsx)(eA,{value:90,label:r("sleep.timer.label.90")}),(0,t.jsx)(eA,{value:120,label:r("sleep.timer.label.120")}),(0,t.jsx)(eA,{value:"CUSTOM",label:r("sleep.timer.label.custom")})]}),(0,t.jsxs)("div",{className:"mt-4 box-border flex w-full flex-col",onClick:()=>h("CUSTOM"),children:[(0,t.jsx)(ey.Z,{ariaLabel:r("audiobook.modal.sleepTimer.slider._"),className:"mb-4 flex w-full items-center",min:1,max:120,disabled:!x,value:u,thumbClassName:y,thumbActiveClassName:j,renderTrack:(e,a)=>eO(e,a,x),onChange:f}),(0,t.jsxs)("div",{className:"flex flex-row items-center justify-between",children:[(0,t.jsx)("div",{children:r("audiobook.modal.sleepTimer.slider.minimum")}),(0,t.jsx)("div",{children:r("audiobook.modal.sleepTimer.slider.maximum")})]})]})]})})};function eF(){let{playingTitle:e,expanded:a,menuOpen:l,setMenuOpen:r}=ei(),s=(0,n.T_)("audiobook.controls"),c=()=>{r(!1)};return(0,t.jsxs)("div",{className:o()("fixed z-50 h-full w-full overflow-hidden shadow-top transition-audio duration-700",{"top-full -mt-28 sm:-mt-24":!a,"top-0 mt-0":a}),children:[(0,t.jsx)("img",{className:"absolute inset-0 -z-10 h-full w-full brightness-50 filter",src:"".concat(J.Z.titleArtUrl,"/").concat(e.artKey,"_270.jpeg"),alt:s("background.alt"),tabIndex:-1}),(0,t.jsx)("div",{className:o()("h-full backdrop-blur-2xl backdrop-filter",{"overflow-y-auto":!l,"overflow-y-hidden":l}),children:(0,t.jsxs)(i.ZP,{disabled:!!(!a||l),children:[(0,t.jsx)(eE,{}),a&&(0,t.jsxs)("div",{className:"mx-auto mt-10 mb-10 flex w-full flex-col space-y-4 px-2 text-gray-100 ",style:{maxWidth:450},children:[(0,t.jsx)(eg,{}),(0,t.jsx)(eR,{}),(0,t.jsx)(eI,{}),(0,t.jsx)(eZ,{}),(0,t.jsx)("div",{className:"mt-8 flex flex-row items-center justify-center",children:(0,t.jsx)(d.kq,{onClick:()=>r("FEEDBACK"),className:"bg-black/30 text-white hover:text-white",children:s("report.problem")})})]})]})}),(0,t.jsx)(eM,{onClose:c,open:"SLEEP"===l}),(0,t.jsx)(ep,{onClose:c,open:"CHAPTERS"===l}),(0,t.jsx)(eb,{onClose:c,open:"BOOKMARKS"===l}),(0,t.jsx)(eD,{onClose:c,open:"SPEED"===l}),(0,t.jsx)(h,{handleClose:c,title:e,open:"FEEDBACK"===l})]})}var eU=e=>{let{currentlyPlayingTitle:a}=e,{title:l}=(0,r.kf)(a);return l?(0,t.jsx)(en,{title:l,children:(0,t.jsx)(eF,{})}):null}},1297:function(e,a,l){l.d(a,{f:function(){return t}});let t=(0,l(15228).BX)("\n query GetTrendingTitlesQuery($criteria: TrendingTitlesInput!) {\n trendingTitles(criteria: $criteria) {\n found\n hits {\n ...TitleListItemFragment\n }\n algorithm\n }\n }\n")},72788:function(e,a,l){l.d(a,{zk:function(){return r},LI:function(){return s},xK:function(){return o},fF:function(){return n.f}});var t=l(15228);let r=(0,t.BX)("\n query GetBookmarksListQuery($contentId: ID!) {\n bookmarks(contentId: $contentId) {\n ...BookmarkFragment\n }\n }\n"),s=(0,t.BX)("\n query GetHighlightsListQuery($contentId: ID!) {\n highlights(contentId: $contentId) {\n ...HighlightFragment\n }\n }\n"),o=(0,t.BX)("\n query GetIncludedTitlesQuery($criteria: CuratedBingePassContentInput!) {\n curatedBingePassContent(criteria: $criteria) {\n results {\n ...Bun
1dledContentFragment\n }\n totalCount\n pagination {\n hasPrevious\n hasNext\n }\n }\n }\n");var n=l(1297)},93524:function(e,a,l){l.d(a,{$:function(){return t}});let t=(0,l(89148).Z)(e=>({showMDW:!1,setShowMDW:a=>e({showMDW:a})}))}}]);
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.