"use strict";(self.webpackChunkangular_chrome_extension=self.webpackChunkangular_chrome_extension||[]).push([[121],{6121:(B,d,s)=>{s.r(d),s.d(d,{PopupModule:()=>I});var C=s(6011),m=s(3072),P=s(5861),x=s(2322),b=s(4125),f=s(2216);class v extends b.xQ{constructor(){super(...arguments),this.value=null,this.hasNext=!1,this.hasCompleted=!1}_subscribe(n){return this.hasError?(n.error(this.thrownError),f.w.EMPTY):this.hasCompleted&&this.hasNext?(n.next(this.value),n.complete(),f.w.EMPTY):super._subscribe(n)}next(n){this.hasCompleted||(this.value=n,this.hasNext=!0)}error(n){this.hasCompleted||super.error(n)}complete(){this.hasCompleted=!0,this.hasNext&&super.next(this.value),super.complete()}}var g=s(8193),T=s(249),M=s(9136),Z=s(4289);function y(t,n,o){if(n){if(!(0,Z.K)(n))return(...r)=>y(t,o)(...r).pipe((0,g.U)(u=>(0,M.k)(u)?n(...u):n(u)));o=n}return function(...r){const u=this;let p;const h={context:u,subject:p,callbackFunc:t,scheduler:o};return new x.y(l=>{if(o)return o.schedule(j,0,{args:r,subscriber:l,params:h});if(!p){p=new v;const a=(...c)=>{p.next(c.length<=1?c[0]:c),p.complete()};try{t.apply(u,[...r,a])}catch(c){(0,T._)(p)?p.error(c):console.warn(c)}}return p.subscribe(l)})}}function j(t){const{args:o,subscriber:r,params:u}=t,{callbackFunc:p,context:h,scheduler:l}=u;let{subject:a}=u;if(!a){a=u.subject=new v;const c=(...i)=>{this.add(l.schedule(U,0,{value:i.length<=1?i[0]:i,subject:a}))};try{p.apply(h,[...o,c])}catch(i){a.error(i)}}this.add(a.subscribe(r))}function U(t){const{value:n,subject:o}=t;o.next(n),o.complete()}var E=s(8313),e=s(4602);const N=[{path:"",pathMatch:"full",component:(()=>{class t{constructor(o){this.tabId=o}onClick(){var o=this;return(0,P.Z)(function*(){o.message=yield y(chrome.tabs.sendMessage.bind(o,o.tabId,"request"))().pipe((0,g.U)(r=>chrome.runtime.lastError?"The current page is protected by the browser, goto: https://www.google.nl and try again.":r)).toPromise()})()}}return t.\u0275fac=function(o){return new(o||t)(e.Y36(E.$))},t.\u0275cmp=e.Xpm({type:t,selectors:[["app-popup"]],decls:12,vars:2,consts:[[3,"click"]],template:function(o,r){1&o&&(e.TgZ(0,"h1"),e._uU(1,"Popup"),e.qZA(),e.TgZ(2,"p"),e._uU(3,"You can easily send messages from the popup to the content page with the provided Tab ID! (tabId="),e.TgZ(4,"strong"),e._uU(5),e.qZA(),e._uU(6,")"),e.qZA(),e.TgZ(7,"button",0),e.NdJ("click",function(){return r.onClick()}),e._uU(8,"Click me to test"),e.qZA(),e.TgZ(9,"p")(10,"strong"),e._uU(11),e.qZA()()),2&o&&(e.xp6(5),e.Oqu(r.tabId),e.xp6(6),e.Oqu(r.message))},styles:[""]}),t})()}];let A=(()=>{class t{}return t.\u0275fac=function(o){return new(o||t)},t.\u0275mod=e.oAB({type:t}),t.\u0275inj=e.cJS({imports:[[m.Bz.forChild(N)],m.Bz]}),t})(),I=(()=>{class t{}return t.\u0275fac=function(o){return new(o||t)},t.\u0275mod=e.oAB({type:t}),t.\u0275inj=e.cJS({imports:[[C.ez,A]]}),t})()}}]);