import{a as b}from"./chunk-A3VDNXOS.js";import{b as a}from"./chunk-UXTOUTII.js";import"./chunk-FKYSH5OG.js";import"./chunk-HH6BK2TC.js";import{a as V}from"./chunk-JDHBJ4AH.js";import"./chunk-XTUMH3AE.js";import"./chunk-IWEJR7IZ.js";import{a as I,b as R}from"./chunk-D6HVHWLN.js";import{Da as s,Fd as x,Ib as C,Jd as S,Na as h,Xb as g,Yb as y,ba as n,fb as u,gb as v,mb as l,nb as d,s as f,xh as U}from"./chunk-MOXUT4EU.js";import{i as m}from"./chunk-QQ7SJNXU.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="\u7F3A\u5C11 URL \u53C2\u6570";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="\u65E0\u6CD5\u8BBF\u95EE\u8FDC\u7A0B\u8D44\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:"\u8FDC\u7AEF\u4EA4\u4E92"}}}];export{J as default};/**i18n:5a85df092a135682c90bae008e37ec28160e04e5f445e29af2927333ba91ffa1*///# sourceMappingURL=chunk-4KH6YDOE.js.map