import{a as b}from"./chunk-J3X5WXXN.js";import{b as a}from"./chunk-3Q3ZZWBO.js";import"./chunk-M4Q4AVUW.js";import"./chunk-JZQULWZP.js";import{a as V}from"./chunk-VSNT7HD7.js";import"./chunk-DQVEC6QH.js";import"./chunk-MI3Y2XTP.js";import{a as I,b as R}from"./chunk-ULU2WPBM.js";import{$h as U,Cd as S,Da as s,Db as C,La as h,Sb as g,Tb as y,aa as n,ab as u,bb as v,hb as l,ib as d,r as f,yd as x}from"./chunk-HJJWL6RD.js";import{i as m}from"./chunk-H2BCKOF6.js";function L(o,e){if(o&1&&(l(0,"my-alert",1),g(1),d()),o&2){let A=C();s(),y(A.error);}}var z=(()=>{let e=class e{route=n(x);router=n(S);search=n(a);error="";ngOnInit(){let t=this.route.snapshot.queryParams.uri;if(!t){this.error="\u5728 URL \u53C3\u6578\u4E2D\u7F3A\u5C11 URL \u53C3\u6578";return;}this.loadUrl(t);}loadUrl(t){f([this.search.searchVideos({search:t}),this.search.searchVideoChannels({search:t})]).subscribe(([r,i])=>{let c;if(r.data.length!==0){let p=r.data[0];c=I.buildWatchUrl(p);}else if(i.data.length!==0)c="/c/"+new R(i.data[0]).nameWithHost;else{this.error="\u7121\u6CD5\u5B58\u53D6\u9060\u7AEF\u8CC7\u6E90";return;}this.router.navigateByUrl(c);});}};m(e,"\u0275fac",function(r){return new(r||e)();}),m(e,"\u0275cmp",h({type:e,selectors:[["my-remote-interaction"]],decls:2,vars:1,consts:[[1,"root"],["type","danger"]],template:function(r,i){r&1&&(l(0,"div",0),u(1,L,2,1,"my-alert",1),d()),r&2&&(s(),v(i.error?1:-1));},dependencies:[V],encapsulation:2}));let o=e;return o;})();var J=[{path:"",component:z,providers:[b,a],canActivate:[U],data:{meta:{title:"\u9060\u7AEF\u4E92\u52D5"}}}];export{J as default};/**i18n:671d995daee9c68b73ac729b7ab2c3cf3be32c7f1a24d9dfa94e261c45ee5241*///# sourceMappingURL=chunk-NCBTGKBX.js.map