dotfiles/.config/spicetify/Extracted/Themed/xpui/xpui-debug-window-contents.js

2 lines
21 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([[5320],{83279:(e,n,s)=>{s.d(n,{DebugWindowContents:()=>Jn});var t=s(59496),l=s(36028),a=s(32333),i=s(14722),r=s(98252),o=s(1634),c=s(73229),d=s(44007),u=s(10427);const h=(0,d.v)();window.abba={get:async function(e,n){const s=new c.ProductStateClient((0,u.G)()),t=(await s.getValues(c.GetValuesRequest.fromPartial({}))).pairs;let l={},a="";if(t.abbaOverrides?a=t.abbaOverrides:t.abbaoverrides&&(a=t.abbaoverrides),a)try{l=JSON.parse(a)}catch(e){console.error(`error parsing value=${a}, error=${e}`)}if(Object.prototype.hasOwnProperty.call(l,e))return console.warn(`Abba: Override for ${e} : ${l[e]}`),void setTimeout((()=>n(null,l[e])),0);h.post("sp://abba/v1/flags",{flags:[e]}).then((s=>{const{flags:t=[]}=s,l=t[0]&&t[0].featureName===e&&t[0].cell;n(null,l||null)})).catch((e=>{n(e)}))},getAll:function(e){console.warn("Abba:getAll should only be used by TA tests for logging purposes."),h.get("sp://abba/v1/all_flags").then((n=>{const{flags:s=[]}=n,t=s.reduce(((e,n)=>(e[n.featureName]=n.cell,e)),{});e(null,JSON.stringify(t,null,2))})).catch((n=>{e(n)}))},getRequestedFlagNames:function(e){h.get("sp://abba/v1/requested_flag_names").then((n=>{e(null,JSON.stringify(n.sort(),null,2))})).catch((n=>{e(n)}))}};var x=s(50538);const j="rh7v8PDNC0ke2OkkyRhk",m="L6pjHHt_x4tfksfQ4Pem",v="H0jIvFjLqNoS1jwvMR82",p="UZcGKrwobJ2tS5Ka06pD";var g=s(4637);const f=()=>{const[e,n]=(0,t.useState)(60),[s,l]=(0,t.useState)("stream"),[a,i]=(0,t.useState)("");return(0,g.jsxs)("div",{className:j,children:[(0,g.jsxs)("div",{className:m,children:[(0,g.jsx)("p",{children:"Stream time (in seconds)"}),(0,g.jsx)("input",{className:v,type:"text",value:e,onChange:e=>{const s=e.target.value;n(parseInt(s,10))}}),(0,g.jsx)("button",{className:p,onClick:()=>{x.N.increaseStreamTime(e)},children:"Add time"}),(0,g.jsx)("button",{className:p,onClick:()=>{x.N.increaseStreamTime(1200)},children:"Add 20 minutes"})]}),(0,g.jsxs)("div",{className:m,children:[(0,g.jsx)("p",{children:"Override Country"}),(0,g.jsxs)("select",{value:a,onBlur:()=>{},onChange:e=>{i(e.target.value)},children:[(0,g.jsx)("option",{value:"US",children:"USA"}),(0,g.jsx)("option",{value:"UK",children:"United Kingdom"}),(0,g.jsx)("option",{value:"JP",children:"Japan"}),(0,g.jsx)("option",{value:"BR",children:"Brasil"}),(0,g.jsx)("option",{value:"AU",children:"Australia"}),(0,g.jsx)("option",{value:"SE",children:"Sweden"}),(0,g.jsx)("option",{value:"",children:"Clear Override"})]}),(0,g.jsx)("button",{className:p,onClick:()=>{x.N.overrideCountry(a)},children:"Override"})]}),(0,g.jsxs)("div",{className:m,children:[(0,g.jsx)("p",{children:"Clear ad in slot"}),(0,g.jsxs)("select",{value:s,onBlur:()=>{},onChange:e=>{l(e.target.value)},children:[(0,g.jsx)("option",{value:"stream",children:"STREAM"}),(0,g.jsx)("option",{value:"billboard",children:"BILLBOARD OVERLAY"}),(0,g.jsx)("option",{value:"promotedsong",children:"PROMOTED SONG"}),(0,g.jsx)("option",{value:"hpto",children:"HPTO"}),(0,g.jsx)("option",{value:"leaderboard",children:"LEADERBOARD"})]}),(0,g.jsx)("button",{className:p,onClick:()=>{x.N.clearSlot(s)},children:"Clear slot"}),(0,g.jsx)("p",{children:"Trigger ad in slot"}),(0,g.jsxs)("select",{value:s,onBlur:()=>{},onChange:e=>{l(e.target.value)},children:[(0,g.jsx)("option",{value:"stream",children:"STREAM"}),(0,g.jsx)("option",{value:"billboard",children:"BILLBOARD OVERLAY"}),(0,g.jsx)("option",{value:"promotedsong",children:"PROMOTED SONG"}),(0,g.jsx)("option",{value:"hpto",children:"HPTO"}),(0,g.jsx)("option",{value:"leaderboard",children:"LEADERBOARD"})]}),(0,g.jsx)("button",{className:p,onClick:()=>{x.N.triggerSlot(s)},children:"Trigger slot"})]}),(0,g.jsx)("button",{className:p,onClick:()=>{x.N.queueVideoAd()},children:"Queue Video Ad"})]})};var b=s(61740),y=s(79475),N=s(70786),S=s(31070);const O="scaF2wOGtuiU5UBKJrGa",w="PjVBb0nlrIUasTrrFgCx",C="MjtdwpkzFFhhmzeyzOy2",A="uVClWczmJLRR5jfAENGP",k=[{label:"Production",value:"prod"},{label:"Development",value:"dev"}],I=
//# sourceMappingURL=xpui-debug-window-contents.js.map