"];return document.body.append(S.parseToDOM(T)),document.body.append(S.parseToDOM(P.join(""))),document.querySelector("#__stay_sinffer_modal")}()).style.visibility="visible";const m=document.querySelector("#__stay_sinffer_modal ._stay-sinffer-popup");document.querySelector("#__stay_sinffer_modal .__stay-sinffer-content").classList.add("__stay-trans");let f=setTimeout((function(){p.classList.add("__stay-show-modal"),m.style.visibility="visible",clearTimeout(f),f=0}),400);p.addEventListener("touchmove",(t=>{t.preventDefault(),t.stopPropagation()}),!1),p.addEventListener("touchstart",(t=>{t.preventDefault(),p.classList.remove("__stay-show-modal"),m.style.animation="fadeout .5s;";let e=setTimeout((()=>{p&&document.body.removeChild(p),document.body.removeChild(document.querySelector("#__style_sinffer_style")),clearTimeout(e),e=0}),200)}),!1);const g=document.querySelectorAll("#__stay_sinffer_modal ._stay-quality-item");if(g&&g.length)for(let t=0;t
{t=t.target.getAttribute("stay-download");var e=document.createElement("a");e.href=t,e.click()}))}function k(t){var e,r;return D()?(e=u.decodeFunStr,e=new Function("return "+e),r=S.queryParams(t,"url"),t=S.queryParams(t,"s"),t=e()(decodeURIComponent(t)),N(r=decodeURIComponent(r)+"&sig="+t)):""}function N(t){if(function(){let t=D();return t&&!!u.decodeSpeedFunStr}()&&!S.queryURLParams(t,"oid")){let n="",o=0;for(var e in f)f[e]&&void 0!==f[e]&&(o+=1,n+="&"+e+"="+f[e]);var r=S.queryURLParams(t,"n");r&&(g[r]||(g[r]=function(t){try{var e=u.decodeSpeedFunStr;return new Function("return "+e)()(decodeURIComponent(t))}catch(t){return""}}(r)),g[r])&&(t=S.replaceUrlArg(t,"n",g[r]),t+=n)}return t}function I(t,e){t&&(f.cver=f.cver||S.queryURLParams(t,"cver"),j(t)),e&&Object.keys(e).length&&(e.playbackTracking&&e.playbackTracking.ptrackingUrl&&e.playbackTracking.ptrackingUrl.baseUrl&&j(e.playbackTracking.ptrackingUrl.baseUrl),e.responseContext)&&e.responseContext.serviceTrackingParams&&e.responseContext.serviceTrackingParams.length&&e.responseContext.serviceTrackingParams.forEach((t=>{"CSI"==t.service&&t.params.length&&t.params.forEach((t=>{"cver"==t.key&&(f.cver=f.cver||t.value)}))}))}function j(t){f.cpn=f.cpn||S.queryURLParams(t,"cpn"),f.ptk=f.ptk||S.queryURLParams(t,"ptk"),f.oid=f.oid||S.queryURLParams(t,"oid"),f.ptchn=f.ptchn||S.queryURLParams(t,"ptchn"),f.pltype=f.pltype||S.queryURLParams(t,"pltype")}function M(t){return t&&t.length?(t.sort(S.compare("bitrate")),(t=t[0]).url||(D()?k(t.signatureCipher):t.signatureCipher)):""}function F(){let t=setTimeout((()=>{{let t={},e=window.location.host,r=(l=window.location.href,t.hostUrl=l,null);-1 ytm-custom-control > div.inline-player-controls > a.inline-player-overlay"))&&(i=i.getAttribute("href"),o=S.queryParams(i,"v"));var i=r?r.bootstrapPlayerResponse:{};if(o){let l="";if(t)e.poster=t.getAttribute("poster")||"",e.downloadUrl=t.getAttribute("src"),t=t.getAttribute("title"),e.title=t;else if(!r||!i.videoDetails)return e;if(i&&i.videoDetails&&i.streamingData&&(!o||o===i.videoDetails.videoId)){I("",i);t=i.videoDetails;var a=t.title||"",s=(t=(e.title=a,t.thumbnail),t=(t&&(t=t.thumbnails)&&t.length&&(e.poster=t.pop().url),i.microformat&&i.microformat.playerMicroformatRenderer&&i.microformat.playerMicroformatRenderer.thumbnail&&i.microformat.playerMicroformatRenderer.thumbnail.thumbnails.length&&(e.poster=i.microformat.playerMicroformatRenderer.thumbnail.thumbnails[0].url),i.streamingData),t.adaptiveFormats);if(t.formats,l=l||"",!s||!s.length||l&&l.replace(/\s+/g,"")!==a.replace(/\s+/g,""))e.title=l||G(),e.downloadUrl=Y();else{let o=[];new Set;var c;t=r.bootstrapWebPlayerContextConfig?r.bootstrapWebPlayerContextConfig.jsUrl:"";try{t&&(c=$(m=t))&&(n.randomPathUuid=c)}catch(tt){}let i={},a=[],l=[],u=(s.forEach((t=>{var e,r=t.mimeType;-1{var r=i[t],n=r.filter((t=>{if(-1{if(-1(t.qualityLabel&&-1{var r=window.localStorage.getItem("__stay_decode_str");r&&(u=JSON.parse(r)).pathUuid&&u.pathUuid==t&&u.decodeFunStr?(T(),Z(t,e,!1)):Z(t,e,!0)};if(m=window.ytplayer?window.ytplayer.bootstrapWebPlayerContextConfig?window.ytplayer.bootstrapWebPlayerContextConfig.jsUrl:"":m)p=$(m),t(p,m);else for(let e=1;e<10;e++){let r="setTimeout((()=">{(d=document.querySelector("#player-base"))&&d.getAttribute("src")&&(m=d.getAttribute("src"),p=$(m),t(p,m),_.forEach((t=>{clearTimeout(t)})))}),200*e)}(e),d&&d.getAttribute("src"))break;_.push(r)}}}async function Z(e,r,n){o=e,i=window.location.href;var o,i,a=await new Promise(((e,r)=>{if(t)s.runtime.sendMessage({from:"sniffer",operate:"fetchYoutubeDecodeFun",pathUuid:o,pathUrl:i},(t=>{t=t&&t.decodeFunObj?t.decodeFunObj:{},e(t)}));else{const t=Math.random().toString(36).substring(2,9),r=n=>{n.data.pid===t&&"GET_YOUTUBE_DECODE_FUN_RESP"===n.data.name&&(e(n.data.decodeFunObj),window.removeEventListener("message",r))};window.postMessage({id:t,pid:t,name:"GET_YOUTUBE_DECODE_FUN",pathUuid:o,pathUrl:i}),window.addEventListener("message",r)}}));a&&Object.keys(a).length&&a.status&&200==a.status?(J(e,a.decodeFunStr,a.decodeSpeedFunStr),n&&T()):Q(e,r)}function J(t,e,r){u={pathUuid:t,decodeFunStr:e,decodeSpeedFunStr:r},n.decodeFunStr=e,n.decodeSpeedFunStr=r,window.localStorage.setItem("__stay_decode_str",JSON.stringify(u))}async function Q(e,r){if(r&&e)try{var n=await(await fetch("https://m.youtube.com"+r)).text();if(n){var o=n.match(/[a-zA-Z0-9$]+\=function\(a\)\{[\r\n|a]\=a\.split\(\"\"\).*return\s+a\.join\(\"\"\)\};/g);let r="";if(r=o&&o.length?o[0]:r){let o="";var i=n.match(/var\s+[a-zA-Z0-9$]{2}\=\{[a-zA-Z0-9]{2}\:function[\s\S]*(a\.reverse\(\)|splice\(0\,b\)|length\]\=c)\}\};/g);if(o=i&&i.length?i[0]:o)if(r=r.replace(/[a-zA-Z0-9$]+\=function\(a\)\{/g,"function decodeFun(a){"+o)){let o="";var a=n.match(/[a-zA-Z0-9$]+\=function\(a\)\{var\sb=a\.split\(\"\"\)[\s\S]*\}return\sb\.join\(\"\"\)\};/g);if(o=(o=a&&a.length?a[0]:o)&&o.replace(/^[a-zA-Z0-9$]+\=function\(a\)\{/g,"function decodeSpeedFun(a){"),function(t){try{var e=new Function("return "+t),r=e()(decodeURIComponent("%3D%3DQmbTSWlgLuztoft4F_uqQieS7_jBtboKab9zSp5WRdSAiApcTRtZLjBmFtzLXphJ0x_haWmWIhVtdAg8jD1rsKkRKAhIQRw8JQ0qOAOA"));if(decodeURIComponent("https://rr5---sn-o097znsk.googlevideo.com/videoplayback%3Fexpire%3D1679042695%26ei%3DJ9QTZJ6FFKeksfIPkaSL-Aw%26ip%3D2602%253Afeda%253A30%253Aae86%253A40e7%253A53ff%253Afe8b%253A9a97%26id%3Do-AI3u_uLu7PqvSwoVFwTG0fSk-puen4XBHxlLqco9MH8Q%26itag%3D135%26aitags%3D133%252C134%252C135%252C160%252C242%252C243%252C244%252C278%26source%3Dyoutube%26requiressl%3Dyes%26mh%3D_m%26mm%3D31%252C26%26mn%3Dsn-o097znsk%252Csn-a5meknzk%26ms%3Dau%252Conr%26mv%3Dm%26mvi%3D5%26pl%3D44%26initcwndbps%3D2135000%26vprv%3D1%26mime%3Dvideo%252Fmp4%26ns%3DwhOrAPi40PxLIKHeHvAaoDIL%26gir%3Dyes%26clen%3D18438908%26dur%3D584.533%26lmt%3D1635010443575003%26mt%3D1679020854%26fvip%3D5%26keepalive%3Dyes%26fexp%3D24007246%26c%3DMWEB%26txp%3D5432434%26n%3D3BrEIxrXFc7SkC%26sparams%3Dexpire%252Cei%252Cip%252Cid%252Caitags%252Csource%252Crequiressl%252Cvprv%252Cmime%252Cns%252Cgir%252Cclen%252Cdur%252Clmt%26lsparams%3Dmh%252Cmm%252Cmn%252Cms%252Cmv%252Cmvi%252Cpl%252Cinitcwndbps%26lsig%3DAG3C_xAwRgIhAKYBlOvRZiHPnnEJJ5foNn7LZU1cgGvfyO3WU9TjETfZAiEA6PvSgRq0gdcsBBTTj0VHXybmMwb-ouW2TVIYGmG_PG0%253D")+"&sig="+r)return 1}catch(t){}}(r)){var l=e,c=r,u=o;if(t)s.runtime.sendMessage({from:"sniffer",operate:"saveYoutubeDecodeFun",pathUuid:l,randomFunStr:c,randomSpeedFunStr:u},(t=>{}));else{const t=Math.random().toString(36).substring(2,9),e=r=>{r.data.pid===t&&"SAVE_YOUTUBE_DECODE_FUN_STR_RESP"===r.data.name&&window.removeEventListener("message",e)};window.postMessage({id:t,pid:t,name:"SAVE_YOUTUBE_DECODE_FUN_STR",pathUuid:l,randomFunStr:c,randomSpeedFunStr:u}),window.addEventListener("message",e)}}J(e,r,o)}else J(e,"","");else J(e,"","")}else J(e,"","")}else J(e,"","")}catch(r){J(e,"","")}else J(e,"","")}function tt(t){!async function(){i||(e=!0,i=await C(),e=!1),a||(r=!0,a=await R(),r=!1)}(),X(),A(t)}tt(!1),document.onreadystatechange=()=>{"complete"===document.readyState&&tt(!0)},Object.defineProperty(n,"randomPathUuid",{get:function(){return randomPathUuid},set:function(t){(randomPathUuid=t)!=p&&Z(p=t,m,!1)}}),Object.defineProperty(n,"decodeFunStr",{get:function(){return decodeFunStr},set:function(t){(decodeFunStr=t)&&T()}})} handleInjectParseVideoJS(false);10;e++){let>