2 lines
30 KiB
JavaScript
2 lines
30 KiB
JavaScript
|
"use strict";(("undefined"!=typeof self?self:global).webpackChunkopen=("undefined"!=typeof self?self:global).webpackChunkopen||[]).push([[6309],{6261:(e,t,a)=>{a.d(t,{n:()=>R});var r=a(59496),s=a(84875),n=a.n(s),i=a(89605),l=a(56162),o=a(16004),c=a(77675),u=a(3802),d=a(85830),m=a(21524),g=a(22345);var p=a(59200),A=a(1996),h=a(99308);const f="main-topBar-contentArea",x="queue-tabBar-headerIsCentered",E="queue-tabBar-headerItem",C="queue-tabBar-moreButton",y="queue-tabBar-moreButtonActive",b="yxf_6IsQEmHjijEBUMTP",L="queue-tabBar-active",j="queue-tabBar-headerItemLink",T="queue-tabBar-header",S="queue-tabBar-chevron";var D=a(4637);const I=({items:e,activeItemId:t})=>(0,D.jsx)(A.v,{children:e.map((e=>e.disabled?(0,D.jsx)(h.s,{disabled:!0,role:"menuitemradio",className:b,onClick:e.handleClick,children:e.title},e.uri):(0,D.jsx)(h.s,{role:"menuitemradio",to:e.to,end:!0,"aria-checked":e.itemId===t,className:({isActive:e})=>n()(b,{[L]:e}),onClick:e.handleClick,children:e.title},e.uri)))});var _=a(40495);const R=(0,r.memo)((function({isCentered:e,links:t,landmarkLabel:a,className:s}){const A=(0,r.useRef)(null),[h,b]=(0,r.useState)([]),[R,k]=(0,r.useState)(0),[v,O]=(0,r.useState)([]),P=function(){const[e,t]=(0,r.useState)(window.innerWidth),{scrollNodeChildRef:a}=(0,r.useContext)(m.VX),s=(0,d.y1)((e=>{e?.width&&t(e.width)}),250);return(0,g.y)({refOrElement:a,observeOnly:"width",onResize:s}),e}()??1/0,{pathname:B}=(0,i.TH)(),N=t.find((e=>e.to===B));return(0,r.useEffect)((()=>{A.current&&k(A.current.clientWidth)}),[P]),(0,r.useEffect)((()=>{if(!A.current)return;const e=Array.from(A.current.children).map((e=>e.clientWidth));b(e)}),[t]),(0,r.useEffect)((()=>{if(!A.current)return;if(h.slice(0,-1).reduce(((e,t)=>e+t),0)<=R)return void O([]);const e=h.reduce(((e,t)=>e>t?e:t),0),t=[];let a=e;h.forEach(((e,r)=>{R>=a+e?a+=e:t.push(r)})),O(t)}),[R,h]),(0,D.jsx)("nav",{className:n()(s,f),"aria-label":a,children:(0,D.jsxs)("ul",{className:e?x:T,ref:A,children:[t.filter(((e,t)=>!v.includes(t))).map((e=>{const t=e?.render??(e=>e);return(0,D.jsx)(r.Fragment,{children:t((0,D.jsx)("li",{className:E,children:e.disabled?(0,D.jsx)("div",{className:j,children:(0,D.jsx)(l.D,{variant:"mestoBold",children:e.title})}):(0,D.jsx)(_.O,{end:!0,className:({isActive:e})=>n()(j,{[L]:e}),to:e.to,onClick:e.handleClick,children:(0,D.jsx)(l.D,{variant:"mestoBold",children:e.title})})}))},e.to)})),v.length||0===h.length?(0,D.jsx)("li",{className:E,children:(0,D.jsx)(p.xV,{renderInline:!0,menu:(0,D.jsx)(I,{items:t.filter(((e,t)=>v.includes(t))),activeItemId:N?.itemId}),children:(e,t,a)=>(0,D.jsxs)("button",{className:n()(C,{[y]:N}),type:"button",onClick:t,ref:a,children:[(0,D.jsx)(l.D,{variant:"mestoBold",children:N?N.title:u.ag.get("more")}),e?(0,D.jsx)(o.U,{iconSize:16,className:S,"aria-hidden":"true"}):(0,D.jsx)(c.i,{iconSize:16,className:S,"aria-hidden":"true"})]})})}):null]})})}))},19541:(e,t,a)=>{a.d(t,{$:()=>o,Q:()=>l});var r=a(59496),s=a(92141),n=a(4332),i=a(4637);const l=(0,r.createContext)({setSortState:()=>{throw new Error("setSortState must be used within a LibrarySortProvider")},sortState:n.oT.ADDED_AT}),o=r.memo((function({uri:e,children:t,defaultSortOption:a}){return(0,i.jsx)(s.r,{uri:e,defaultState:a,sortContext:l,children:t})}))},4332:(e,t,a)=>{a.d(t,{Aq:()=>d,Bf:()=>D,EY:()=>f,G5:()=>C,JV:()=>I,MY:()=>o,Ru:()=>c,ZP:()=>x,a6:()=>A,aY:()=>j,e3:()=>p,ei:()=>l,o$:()=>m,oT:()=>i,pT:()=>L,rJ:()=>S,u3:()=>T,w0:()=>y});var r=a(3802),s=a(87843),n=a(54455);let i=function(e){return e.SHOW_ALPHABETICAL="SHOW_ALPHABETICAL",e.BOOK_ALPHABETICAL="BOOK_ALPHABETICAL",e.EPISODE_ALPHABETICAL="EPISODE_ALPHABETICAL",e.PLAYLIST_ALPHABETICAL="PLAYLIST_ALPHABETICAL",e.ALBUM_ALPHABETICAL="ALBUM_ALPHABETICAL",e.ADDED_AT="ADDED_AT",e.CREATOR_NAME="CREATOR_NAME",e.CREATOR_NAME_ALPHABETICAL="CREATOR_NAME_ALPHABETICAL",e.ALBUM_CREATOR_NAME="ALBUM_CREATOR_NAME",e.RECENTLY_PLAYED="RECENTLY_PLAYED",e.MOST_RELEVANT="MOST_RELEVANT",e.CUSTOM_ORDER="CUSTOM_ORDER",e}({});const l={"show-alphabetical":i.SHOW_ALPHABETICAL,"book-alphabetical":i.BOOK_ALPHABETICAL,"episode-alphabetical":i.EPISO
|
||
|
//# sourceMappingURL=xpui-routes-collection.js.map
|