dotfiles/.config/spicetify/Extracted/Themed/xpui/xpui-routes-play-history-pa...

2 lines
8.1 KiB
JavaScript
Raw Normal View History

2024-07-11 00:01:49 +05:30
"use strict";(("undefined"!=typeof self?self:global).webpackChunkopen=("undefined"!=typeof self?self:global).webpackChunkopen||[]).push([[708],{6261:(e,i,t)=>{t.d(i,{n:()=>A});var s=t(59496),r=t(84875),n=t.n(r),a=t(89605),l=t(56162),c=t(16004),d=t(77675),o=t(3802),u=t(85830),m=t(21524),x=t(22345);var h=t(59200),p=t(1996),j=t(99308);const g="main-topBar-contentArea",v="queue-tabBar-headerIsCentered",y="queue-tabBar-headerItem",f="queue-tabBar-moreButton",b="queue-tabBar-moreButtonActive",k="yxf_6IsQEmHjijEBUMTP",w="queue-tabBar-active",C="queue-tabBar-headerItemLink",N="queue-tabBar-header",E="queue-tabBar-chevron";var I=t(4637);const R=({items:e,activeItemId:i})=>(0,I.jsx)(p.v,{children:e.map((e=>e.disabled?(0,I.jsx)(j.s,{disabled:!0,role:"menuitemradio",className:k,onClick:e.handleClick,children:e.title},e.uri):(0,I.jsx)(j.s,{role:"menuitemradio",to:e.to,end:!0,"aria-checked":e.itemId===i,className:({isActive:e})=>n()(k,{[w]:e}),onClick:e.handleClick,children:e.title},e.uri)))});var U=t(40495);const A=(0,s.memo)((function({isCentered:e,links:i,landmarkLabel:t,className:r}){const p=(0,s.useRef)(null),[j,k]=(0,s.useState)([]),[A,T]=(0,s.useState)(0),[S,B]=(0,s.useState)([]),D=function(){const[e,i]=(0,s.useState)(window.innerWidth),{scrollNodeChildRef:t}=(0,s.useContext)(m.VX),r=(0,u.y1)((e=>{e?.width&&i(e.width)}),250);return(0,x.y)({refOrElement:t,observeOnly:"width",onResize:r}),e}()??1/0,{pathname:O}=(0,a.TH)(),M=i.find((e=>e.to===O));return(0,s.useEffect)((()=>{p.current&&T(p.current.clientWidth)}),[D]),(0,s.useEffect)((()=>{if(!p.current)return;const e=Array.from(p.current.children).map((e=>e.clientWidth));k(e)}),[i]),(0,s.useEffect)((()=>{if(!p.current)return;if(j.slice(0,-1).reduce(((e,i)=>e+i),0)<=A)return void B([]);const e=j.reduce(((e,i)=>e>i?e:i),0),i=[];let t=e;j.forEach(((e,s)=>{A>=t+e?t+=e:i.push(s)})),B(i)}),[A,j]),(0,I.jsx)("nav",{className:n()(r,g),"aria-label":t,children:(0,I.jsxs)("ul",{className:e?v:N,ref:p,children:[i.filter(((e,i)=>!S.includes(i))).map((e=>{const i=e?.render??(e=>e);return(0,I.jsx)(s.Fragment,{children:i((0,I.jsx)("li",{className:y,children:e.disabled?(0,I.jsx)("div",{className:C,children:(0,I.jsx)(l.D,{variant:"mestoBold",children:e.title})}):(0,I.jsx)(U.O,{end:!0,className:({isActive:e})=>n()(C,{[w]:e}),to:e.to,onClick:e.handleClick,children:(0,I.jsx)(l.D,{variant:"mestoBold",children:e.title})})}))},e.to)})),S.length||0===j.length?(0,I.jsx)("li",{className:y,children:(0,I.jsx)(h.xV,{renderInline:!0,menu:(0,I.jsx)(R,{items:i.filter(((e,i)=>S.includes(i))),activeItemId:M?.itemId}),children:(e,i,t)=>(0,I.jsxs)("button",{className:n()(f,{[b]:M}),type:"button",onClick:i,ref:t,children:[(0,I.jsx)(l.D,{variant:"mestoBold",children:M?M.title:o.ag.get("more")}),e?(0,I.jsx)(c.U,{iconSize:16,className:E,"aria-hidden":"true"}):(0,I.jsx)(d.i,{iconSize:16,className:E,"aria-hidden":"true"})]})})}):null]})})}))},68827:(e,i,t)=>{t.d(i,{I:()=>x});var s=t(61922),r=t(59496),n=t(3802),a=t(6261),l=t(91577),c=t(20882),d=t(11611);const o="queue-tabBar-nav";var u=t(4637);const m=()=>{const e=(0,d.Y)(),i=(0,r.useCallback)((e=>(0,u.jsx)(c.v,{placement:"bottomEnd",arrow:"topStart",title:n.ag.get("pick-and-shuffle.upsell.title.queue"),children:e})),[]),t=(0,r.useMemo)((()=>[{title:n.ag.get("playback-control.queue"),itemId:"queue",to:"/queue",uri:"spotify:app:queue",render:i,disabled:e},{title:n.ag.get("view.recently-played"),itemId:"history",to:"/history",uri:"spotify:app:history"}]),[e,i]);return(0,u.jsx)(l.w,{children:(0,u.jsx)(a.n,{className:o,links:t})})},x=({children:e})=>{const i=(0,s.nF)();return(0,u.jsxs)("section",{className:"contentSpacing",children:[e,i&&(0,u.jsx)(m,{})]})}},34016:(e,i,t)=>{t.r(i),t.d(i,{default:()=>F});var s=t(61922),r=t(56162),n=t(3802),a=t(14242),l=t(35599),c=t(4637);const d=()=>(0,c.jsxs)("div",{className:l.Z.emptyContainer,children:[(0,c.jsx)(a.Y,{iconSize:64,"aria-hidden":"true"}),(0,c.jsx)(r.D,{as:"h1",variant:"alto",semanticColor:"textBase",className:l.Z.emptyContainerTitle,children:n.ag.get("history.empty-title")}),(0,c.jsx)("p",{children:n.ag.get("history.empty-descript
//# sourceMappingURL=xpui-routes-play-history-page.js.map