{
  "version": 3,
  "sources": ["src/app/shared/services/user-interaction/user-interaction.service.ts"],
  "sourcesContent": ["import { Platform } from '@angular/cdk/platform';\r\nimport { Injectable } from '@angular/core';\r\nimport { BehaviorSubject, filter, from, fromEvent, map, mergeMap, Observable, take } from 'rxjs';\r\n@Injectable({\r\n  providedIn: 'root'\r\n})\r\nexport class UserInteractionService {\r\n\r\n  get onUserAction$(): Observable<boolean> {\r\n    return this._onUserActionSubject\r\n    .pipe(\r\n      filter((v) => v),\r\n      take(1)\r\n    );\r\n  }\r\n\r\n  private _onUserActionSubject =  new BehaviorSubject(false);\r\n\r\n  constructor(\r\n    private platform: Platform\r\n  ) {\r\n\r\n    if (this.platform.isBrowser) {\r\n      const events = [\r\n        'scroll',\r\n        'mousedown ',\r\n        'mousemove',\r\n        'touchstart',\r\n        'keydown',\r\n      ];\r\n      from(events)\r\n        .pipe(\r\n          mergeMap(event => fromEvent(document, event)),\r\n          map(() => true),\r\n          take(1)\r\n        ).subscribe(v => {\r\n          this._onUserActionSubject.next(true);\r\n        });\r\n    }\r\n  }\r\n}\r\n"],
  "mappings": "2IAMA,IAAaA,GAAsB,IAAA,CAA7B,IAAOA,EAAP,MAAOA,CAAsB,CAEjC,IAAIC,eAAa,CACf,OAAO,KAAKC,qBACXC,KACCC,EAAQC,GAAMA,CAAC,EACfC,EAAK,CAAC,CAAC,CAEX,CAIAC,YACUC,EAAkB,CAAlB,KAAAA,SAAAA,EAHF,KAAAN,qBAAwB,IAAIO,EAAgB,EAAK,EAMnD,KAAKD,SAASE,WAQhBC,EAPe,CACb,SACA,aACA,YACA,aACA,SAAS,CAEA,EACRR,KACCS,EAASC,GAASC,EAAUC,SAAUF,CAAK,CAAC,EAC5CG,EAAI,IAAM,EAAI,EACdV,EAAK,CAAC,CAAC,EACPW,UAAUZ,GAAI,CACd,KAAKH,qBAAqBgB,KAAK,EAAI,CACrC,CAAC,CAEP,yCAjCWlB,GAAsBmB,EAAAC,CAAA,CAAA,CAAA,wBAAtBpB,EAAsBqB,QAAtBrB,EAAsBsB,UAAAC,WAFrB,MAAM,CAAA,EAEd,IAAOvB,EAAPwB,SAAOxB,CAAsB,GAAA",
  "names": ["UserInteractionService", "onUserAction$", "_onUserActionSubject", "pipe", "filter", "v", "take", "constructor", "platform", "BehaviorSubject", "isBrowser", "from", "mergeMap", "event", "fromEvent", "document", "map", "subscribe", "next", "\u0275\u0275inject", "Platform", "factory", "\u0275fac", "providedIn", "_UserInteractionService"]
}