/* eslint-disable */ var Pw=Object.defineProperty;var n=(t,e)=>Pw(t,"name",{value:e,configurable:!0});var B=(t,e)=>{for(var i in e)Pw(t,i,{get:e[i],enumerable:!0})};function Aw(t,e){var i={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(i[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,o=Object.getOwnPropertySymbols(t);s=t.length&&(t=void 0),{value:t&&t[o++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}n(Nw,"__values");function ko(t){return this instanceof ko?(this.v=t,this):new ko(t)}n(ko,"__await");function Mw(t,e,i){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var o=i.apply(t,e||[]),s,r=[];return s={},l("next"),l("throw"),l("return"),s[Symbol.asyncIterator]=function(){return this},s;function l(x){o[x]&&(s[x]=function(T){return new Promise(function(k,C){r.push([x,T,k,C])>1||p(x,T)})})}function p(x,T){try{f(o[x](T))}catch(k){b(r[0][3],k)}}function f(x){x.value instanceof ko?Promise.resolve(x.value.v).then(h,m):b(r[0][2],x)}function h(x){p("next",x)}function m(x){p("throw",x)}function b(x,T){x(T),r.shift(),r.length&&p(r[0][0],r[0][1])}}n(Mw,"__asyncGenerator");function Vw(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],i;return e?e.call(t):(t=typeof Nw=="function"?Nw(t):t[Symbol.iterator](),i={},o("next"),o("throw"),o("return"),i[Symbol.asyncIterator]=function(){return this},i);function o(r){i[r]=t[r]&&function(l){return new Promise(function(p,f){l=t[r](l),s(p,f,l.done,l.value)})}}function s(r,l,p,f){Promise.resolve(f).then(function(h){r({value:h,done:p})},l)}}n(Vw,"__asyncValues");function d(t,e,i,o){if(i==="a"&&!o)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?o:i==="a"?o.call(t):o?o.value:e.get(t)}n(d,"__classPrivateFieldGet");function I(t,e,i,o,s){if(o==="m")throw new TypeError("Private method is not writable");if(o==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return o==="a"?s.call(t,i):s?s.value=i:e.set(t,i),i}n(I,"__classPrivateFieldSet");var tb={};B(tb,{ChannelError:()=>Ks,InnertubeError:()=>v,MissingParamError:()=>Ln,OAuthError:()=>mi,ParsingError:()=>kt,Platform:()=>L,PlayerError:()=>zt,SessionError:()=>wr,base64ToU8:()=>Tb,concatMemos:()=>Bb,debugFetch:()=>RP,deepCompare:()=>g_,escapeStringRegexp:()=>Kb,generateRandomString:()=>Nt,generateSidAuth:()=>eb,getRandomUserAgent:()=>Ao,getStringBetweenStrings:()=>Ye,hasKeys:()=>AP,isTextRun:()=>nt,streamToIterable:()=>Xy,throwIfMissing:()=>ie,timeToSeconds:()=>je,u8ToBase64:()=>dt});var qy={};B(qy,{Maybe:()=>Co,Memo:()=>Oi,SuperParsedResult:()=>ei,YTNode:()=>a,observe:()=>re});var Vi,ge=class{static doLog(e,i,o){if(!this.log_map_[e]||!this.log_level_.includes(e))return;let s=[`[${this.YTJS_TAG}]`];i&&s.push(`[${i}]`),this.log_map_[e](`${s.join("")}:`,...o||[])}static setLevel(...e){this.log_level_=e}};n(ge,"Log");Vi=ge;ge.YTJS_TAG="YOUTUBEJS";ge.Level={NONE:0,ERROR:1,WARNING:2,INFO:3,DEBUG:4};ge.log_map_={[ge.Level.ERROR]:(...t)=>console.error(...t),[ge.Level.WARNING]:(...t)=>console.warn(...t),[ge.Level.INFO]:(...t)=>console.info(...t),[ge.Level.DEBUG]:(...t)=>console.debug(...t)};ge.log_level_=[ge.Level.WARNING];ge.one_time_warnings_issued_=new Set;ge.warnOnce=(t,...e)=>{Vi.one_time_warnings_issued_.has(t)||(Vi.doLog(ge.Level.WARNING,t,e),Vi.one_time_warnings_issued_.add(t))};ge.warn=(t,...e)=>Vi.doLog(ge.Level.WARNING,t,e);ge.error=(t,...e)=>Vi.doLog(ge.Level.ERROR,t,e);ge.info=(t,...e)=>Vi.doLog(ge.Level.INFO,t,e);ge.debug=(t,...e)=>Vi.doLog(ge.Level.DEBUG,t,e);var U=ge;var $y,Ow,Le,Ky,fe,Zt,gi,So,Dw=Symbol("ObservedArray.isObserved"),a=class{constructor(){$y.add(this),this.type=this.constructor.type}is(...e){return e.some(i=>d(this,$y,"m",Ow).call(this,i))}as(...e){if(!this.is(...e))throw new kt(`Cannot cast ${this.type} to one of ${e.map(i=>i.type).join(", ")}`);return this}hasKey(e){return Reflect.has(this,e)}key(e){if(!this.hasKey(e))throw new kt(`Missing key ${e}`);return new Co(this[e])}};n(a,"YTNode");$y=new WeakSet,Ow=n(function(e){return this.type===e.type},"_YTNode_is");a.type="YTNode";var Co=class{constructor(e){Le.add(this),Ky.set(this,"Maybe"),fe.set(this,void 0),I(this,fe,e,"f")}get typeof(){return typeof d(this,fe,"f")}string(){return d(this,Le,"m",gi).call(this,"string")}isString(){return d(this,Le,"m",Zt).call(this,"string")}number(){return d(this,Le,"m",gi).call(this,"number")}isNumber(){return d(this,Le,"m",Zt).call(this,"number")}bigint(){return d(this,Le,"m",gi).call(this,"bigint")}isBigint(){return d(this,Le,"m",Zt).call(this,"bigint")}boolean(){return d(this,Le,"m",gi).call(this,"boolean")}isBoolean(){return d(this,Le,"m",Zt).call(this,"boolean")}symbol(){return d(this,Le,"m",gi).call(this,"symbol")}isSymbol(){return d(this,Le,"m",Zt).call(this,"symbol")}undefined(){return d(this,Le,"m",gi).call(this,"undefined")}isUndefined(){return d(this,Le,"m",Zt).call(this,"undefined")}null(){if(d(this,fe,"f")!==null)throw new TypeError(`Expected null, got ${typeof d(this,fe,"f")}`);return d(this,fe,"f")}isNull(){return d(this,fe,"f")===null}object(){return d(this,Le,"m",gi).call(this,"object")}isObject(){return d(this,Le,"m",Zt).call(this,"object")}function(){return d(this,Le,"m",gi).call(this,"function")}isFunction(){return d(this,Le,"m",Zt).call(this,"function")}array(){if(!Array.isArray(d(this,fe,"f")))throw new TypeError(`Expected array, got ${typeof d(this,fe,"f")}`);return d(this,fe,"f")}arrayOfMaybe(){let e=[];return new Proxy(this.array(),{get(i,o){return Reflect.has(e,o)?Reflect.get(i,o):new Co(Reflect.get(i,o))}})}isArray(){return Array.isArray(d(this,fe,"f"))}node(){if(!(d(this,fe,"f")instanceof a))throw new TypeError(`Expected YTNode, got ${d(this,fe,"f").constructor.name}`);return d(this,fe,"f")}isNode(){return d(this,fe,"f")instanceof a}nodeOfType(...e){return this.node().as(...e)}isNodeOfType(...e){return this.isNode()&&this.node().is(...e)}observed(){if(!this.isObserved())throw new TypeError(`Expected ObservedArray, got ${typeof d(this,fe,"f")}`);return d(this,fe,"f")}isObserved(){var e;return(e=d(this,fe,"f"))===null||e===void 0?void 0:e[Dw]}parsed(){if(!(d(this,fe,"f")instanceof ei))throw new TypeError(`Expected SuperParsedResult, got ${typeof d(this,fe,"f")}`);return d(this,fe,"f")}isParsed(){return d(this,fe,"f")instanceof ei}any(){return U.warn(d(this,Ky,"f"),"This call is not meant to be used outside of debugging. Please use the specific type getter instead."),d(this,fe,"f")}instanceof(e){if(!this.isInstanceof(e))throw new TypeError(`Expected instance of ${e.name}, got ${d(this,fe,"f").constructor.name}`);return d(this,fe,"f")}isInstanceof(e){return d(this,fe,"f")instanceof e}};n(Co,"Maybe");Ky=new WeakMap,fe=new WeakMap,Le=new WeakSet,Zt=n(function(e){return typeof d(this,fe,"f")===e},"_Maybe_checkPrimative"),gi=n(function(e){if(!d(this,Le,"m",Zt).call(this,e))throw new TypeError(`Expected ${e}, got ${this.typeof}`);return d(this,fe,"f")},"_Maybe_assertPrimative");var ei=class{constructor(e){So.set(this,void 0),I(this,So,e,"f")}get is_null(){return d(this,So,"f")===null}get is_array(){return!this.is_null&&Array.isArray(d(this,So,"f"))}get is_node(){return!this.is_array}array(){if(!this.is_array)throw new TypeError("Expected an array, got a node");return d(this,So,"f")}item(){if(!this.is_node)throw new TypeError("Expected a node, got an array");return d(this,So,"f")}};n(ei,"SuperParsedResult");So=new WeakMap;function re(t){return new Proxy(t,{get(e,i){return i=="get"?(o,s)=>e.find((r,l)=>{let p=g_(o,r);return p&&s&&e.splice(l,1),p}):i==Dw?!0:i=="getAll"?(o,s)=>e.filter((r,l)=>{let p=g_(o,r);return p&&s&&e.splice(l,1),p}):i=="matchCondition"?o=>e.find(s=>o(s)):i=="filterType"?(...o)=>re(e.filter(s=>!!s.is(...o))):i=="firstOfType"?(...o)=>e.find(s=>!!s.is(...o)):i=="first"?()=>e[0]:i=="as"?(...o)=>re(e.map(s=>{if(s.is(...o))return s;throw new kt(`Expected node of any type ${o.map(r=>r.type).join(", ")}, got ${s.type}`)})):i=="remove"?o=>e.splice(o,1):Reflect.get(e,i)}})}n(re,"observe");var Oi=class extends Map{getType(...e){return e=e.flat(),re(e.flatMap(i=>this.get(i.type)||[]))}};n(Oi,"Memo");var $b={};B($b,{Author:()=>V,ChildElement:()=>n0,EmojiRun:()=>Di,Format:()=>Zg,Text:()=>u,TextRun:()=>Li,Thumbnail:()=>w,VideoDetails:()=>ao});var X={};B(X,{CLIENTS:()=>ae,INNERTUBE_HEADERS_BASE:()=>wC,OAUTH:()=>bC,STREAM_HEADERS:()=>xi,URLS:()=>lt});var lt=Object.freeze({YT_BASE:"https://www.youtube.com",YT_MUSIC_BASE:"https://music.youtube.com",YT_SUGGESTIONS:"https://suggestqueries.google.com/complete/",YT_UPLOAD:"https://upload.youtube.com/",API:Object.freeze({BASE:"https://youtubei.googleapis.com",PRODUCTION_1:"https://www.youtube.com/youtubei/",PRODUCTION_2:"https://youtubei.googleapis.com/youtubei/",STAGING:"https://green-youtubei.sandbox.googleapis.com/youtubei/",RELEASE:"https://release-youtubei.sandbox.googleapis.com/youtubei/",TEST:"https://test-youtubei.sandbox.googleapis.com/youtubei/",CAMI:"http://cami-youtubei.sandbox.googleapis.com/youtubei/",UYTFE:"https://uytfe.sandbox.google.com/youtubei/"})}),bC=Object.freeze({SCOPE:"http://gdata.youtube.com https://www.googleapis.com/auth/youtube-paid-content",GRANT_TYPE:"http://oauth.net/grant_type/device/1.0",MODEL_NAME:"ytlr::",HEADERS:Object.freeze({accept:"*/*",origin:"https://www.youtube.com","user-agent":"Mozilla/5.0 (ChromiumStylePlatform) Cobalt/Version","content-type":"application/json",referer:"https://www.youtube.com/tv","accept-language":"en-US"}),REGEX:Object.freeze({AUTH_SCRIPT:/