"use strict";(("undefined"!=typeof self?self:global).webpackChunkopen=("undefined"!=typeof self?self:global).webpackChunkopen||[]).push([[163],{6372:(e,t,a)=>{a.r(t),a.d(t,{DebugUtils:()=>p,default:()=>b});var l=a(67294),n=a.n(l);const r=(0,a(21270).v)();window.abba={get:async function(e,t){const a=await r.get("sp://product-state/v1/values");let l={},n="";if(a.abbaOverrides?n=a.abbaOverrides:a.abbaoverrides&&(n=a.abbaoverrides),n)try{l=JSON.parse(n)}catch(e){console.error(`error parsing value=${n}, error=${e}`)}if(Object.prototype.hasOwnProperty.call(l,e))return console.warn(`Abba: Override for ${e} : ${l[e]}`),void setTimeout((()=>t(null,l[e])),0);r.post("sp://abba/v1/flags",{flags:[e]}).then((a=>{const{flags:l=[]}=a,n=l[0]&&l[0].featureName===e&&l[0].cell;t(null,n||null)})).catch((e=>{t(e)}))},getAll:function(e){console.warn("Abba:getAll should only be used by TA tests for logging purposes."),r.get("sp://abba/v1/all_flags").then((t=>{const{flags:a=[]}=t,l=a.reduce(((e,t)=>(e[t.featureName]=t.cell,e)),{});e(null,JSON.stringify(l,null,2))})).catch((t=>{e(t)}))},getRequestedFlagNames:function(e){r.get("sp://abba/v1/requested_flag_names").then((t=>{e(null,JSON.stringify(t.sort(),null,2))})).catch((t=>{e(t)}))}};var o=a(54125);const s="lhvnnVvR76GZRTTQrnBD",c="NhrhmqakmzA1wLKBCFI7",u="rnzO_v_oMdX7ZvOqmbh9",i="WQyaKuxo0FQJyvIIzNmf",m=()=>{const[e,t]=(0,l.useState)(60),[a,r]=(0,l.useState)("stream"),[m,v]=(0,l.useState)("");return n().createElement("div",{className:s},n().createElement("h2",null,"Ad Debug"),n().createElement("div",{className:c},n().createElement("p",null,"Stream time (in seconds)"),n().createElement("input",{className:u,type:"text",value:e,onChange:e=>{const a=e.target.value;t(parseInt(a,10))}}),n().createElement("button",{className:i,onClick:()=>{o.N.increaseStreamTime(e)}},"Add time"),n().createElement("button",{className:i,onClick:()=>{o.N.increaseStreamTime(1200)}},"Add 20 minutes")),n().createElement("div",{className:c},n().createElement("p",null,"Override Country"),n().createElement("select",{value:m,onBlur:()=>{},onChange:e=>{v(e.target.value)}},n().createElement("option",{value:"US"},"USA"),n().createElement("option",{value:"UK"},"United Kingdom"),n().createElement("option",{value:"JP"},"Japan"),n().createElement("option",{value:"BR"},"Brasil"),n().createElement("option",{value:"AU"},"Australia"),n().createElement("option",{value:"SE"},"Sweden"),n().createElement("option",{value:""},"Clear Override")),n().createElement("button",{className:i,onClick:()=>{o.N.overrideCountry(m)}},"Override")),n().createElement("div",{className:c},n().createElement("p",null,"Clear ad in slot"),n().createElement("select",{value:a,onBlur:()=>{},onChange:e=>{r(e.target.value)}},n().createElement("option",{value:"stream"},"STREAM"),n().createElement("option",{value:"billboard"},"BILLBOARD OVERLAY"),n().createElement("option",{value:"promotedsong"},"PROMOTED SONG"),n().createElement("option",{value:"hpto"},"HPTO"),n().createElement("option",{value:"leaderboard"},"LEADERBOARD")),n().createElement("button",{className:i,onClick:()=>{o.N.clearSlot(a)}},"Clear slot"),n().createElement("p",null,"Trigger ad in slot"),n().createElement("select",{value:a,onBlur:()=>{},onChange:e=>{r(e.target.value)}},n().createElement("option",{value:"stream"},"STREAM"),n().createElement("option",{value:"billboard"},"BILLBOARD OVERLAY"),n().createElement("option",{value:"promotedsong"},"PROMOTED SONG"),n().createElement("option",{value:"hpto"},"HPTO"),n().createElement("option",{value:"leaderboard"},"LEADERBOARD")),n().createElement("button",{className:i,onClick:()=>{o.N.triggerSlot(a)}},"Trigger slot")),n().createElement("button",{className:i,onClick:()=>{o.N.queueVideoAd()}},"Queue Video Ad"))};var v=a(40122);const d="opPuRpE3T7W5odnuIzzA",E="z_eDOmvZFJOZf85IK2aG",p=()=>{const{settings:e}=(0,v.useSettings)();return(0,v.getIsEmployee)(e.values)?n().createElement("div",{className:d},n().createElement("h1",{className:E},"Debug Utils"),n().createElement(m,null)):null},b=p}}]);
//# sourceMappingURL=xpui-desktop-routes-debug-utils.js.map