@veltdev/sdk-staging 6.0.0-beta.1 → 6.0.0-beta.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/app/client/snippyly.model.d.ts +2 -3
  2. package/app/models/data/comment-events.data.model.d.ts +29 -0
  3. package/app/models/data/reaction-resolver.data.model.d.ts +1 -0
  4. package/app/models/data/selection.model.d.ts +10 -8
  5. package/app/models/data/user-resolver.data.model.d.ts +11 -9
  6. package/app/models/data/user.data.model.d.ts +21 -18
  7. package/app/models/element/activity-element.model.d.ts +0 -1
  8. package/app/models/element/area-element.model.d.ts +0 -1
  9. package/app/models/element/arrow-element.model.d.ts +1 -2
  10. package/app/models/element/autocomplete-element.model.d.ts +0 -1
  11. package/app/models/element/comment-element.model.d.ts +103 -77
  12. package/app/models/element/contact-element.model.d.ts +1 -2
  13. package/app/models/element/crdt-element.model.d.ts +1 -1
  14. package/app/models/element/cursor-element.model.d.ts +1 -2
  15. package/app/models/element/huddle-element.model.d.ts +1 -2
  16. package/app/models/element/live-state-sync-element.model.d.ts +1 -1
  17. package/app/models/element/notification-element.model.d.ts +33 -2
  18. package/app/models/element/presence-element.model.d.ts +32 -11
  19. package/app/models/element/reaction-element.model.d.ts +1 -1
  20. package/app/models/element/recorder-element.model.d.ts +21 -2
  21. package/app/models/element/rewriter-element.model.d.ts +43 -1
  22. package/app/models/element/selection-element.model.d.ts +1 -1
  23. package/app/models/element/suggestion-element.model.d.ts +0 -1
  24. package/app/models/element/tag-element.model.d.ts +7 -8
  25. package/app/models/element/views-element.model.d.ts +1 -1
  26. package/app/utils/enums.d.ts +95 -82
  27. package/{chunk-XMYVEF74.js → chunk-2YJ3NBTO.js} +1 -1
  28. package/{chunk-SALUJBOS.js → chunk-3OIAZGVH.js} +1 -1
  29. package/{chunk-Q7BPHHBS.js → chunk-3OILJMAX.js} +1 -1
  30. package/{chunk-VFAO7EZK.js → chunk-4IA5G3HQ.js} +1 -1
  31. package/{chunk-7ZOGXD6Z.js → chunk-4QPJMZ5V.js} +1 -1
  32. package/{chunk-BLIJMW4Z.js → chunk-52EPUXSU.js} +1 -1
  33. package/{chunk-25GEE4UD.js → chunk-57VK6E6U.js} +1 -1
  34. package/{chunk-DX4SZFHQ.js → chunk-5SSUFLRQ.js} +1 -1
  35. package/{chunk-2KJNXU43.js → chunk-5W33SILU.js} +1 -1
  36. package/{chunk-5FKOPJVO.js → chunk-6TORUSYX.js} +7 -7
  37. package/{chunk-BG6MNCDK.js → chunk-AMBQ736A.js} +1 -1
  38. package/{chunk-QE2MK6NF.js → chunk-DP4GMASO.js} +1 -1
  39. package/{chunk-JFRM6MNS.js → chunk-ENIVQSM6.js} +1 -1
  40. package/{chunk-5B5CQEDX.js → chunk-EWNXINED.js} +1 -1
  41. package/{chunk-2HGBJS2C.js → chunk-G2POMKRC.js} +1 -1
  42. package/{chunk-6SOP2T3L.js → chunk-G56O673H.js} +1 -1
  43. package/{chunk-N4SGYLNB.js → chunk-GUGGWPZ7.js} +1 -1
  44. package/{chunk-APIRNTKO.js → chunk-HDABOQPS.js} +1 -1
  45. package/{chunk-AOHSD4YE.js → chunk-J3FNQGWW.js} +1 -1
  46. package/{chunk-WANCOUQO.js → chunk-JSZMRBOR.js} +1 -1
  47. package/{chunk-7W553TUZ.js → chunk-LAUYCNER.js} +1 -1
  48. package/{chunk-TXOYHDVN.js → chunk-MJDGHV4Y.js} +1 -1
  49. package/{chunk-ZVY2YW2G.js → chunk-MX66OK5A.js} +1 -1
  50. package/{chunk-447SWJD2.js → chunk-NR3CZ6OR.js} +1 -1
  51. package/{chunk-USRSVPHC.js → chunk-QDQ2XJUX.js} +1 -1
  52. package/{chunk-BY627CV6.js → chunk-RMV5EWSF.js} +1 -1
  53. package/{chunk-Y6QKEGWK.js → chunk-SQTBBRA3.js} +1 -1
  54. package/chunk-TY3WZ4Q4.js +167 -0
  55. package/{chunk-IXZIBE27.js → chunk-W4BGGBK5.js} +1 -1
  56. package/{chunk-YBQBSGLX.js → chunk-XAJ4ABBW.js} +1 -1
  57. package/{chunk-UJMFCXYS.js → chunk-XJWB3IUW.js} +1 -1
  58. package/{chunk-AVMLJMVU.js → chunk-YSZQAETY.js} +1 -1
  59. package/{chunk-J6J7I3SW.js → chunk-ZMXXM7C4.js} +1 -1
  60. package/package.json +1 -1
  61. package/types.d.ts +22 -22
  62. package/velt-activity-log.js +1 -1
  63. package/velt-area.js +1 -1
  64. package/velt-arrow.js +1 -1
  65. package/velt-comment.js +7 -7
  66. package/velt-crdt.js +1 -1
  67. package/velt-cursor.js +1 -1
  68. package/velt-huddle.js +1 -1
  69. package/velt-live-state-sync.js +1 -1
  70. package/velt-notification.js +1 -1
  71. package/velt-presence.js +1 -1
  72. package/velt-reaction.js +1 -1
  73. package/velt-recorder.js +1 -1
  74. package/velt-rewriter.js +1 -1
  75. package/velt-selection.js +1 -1
  76. package/velt-tag.js +1 -1
  77. package/velt-user-invite.js +1 -1
  78. package/velt-user-request.js +1 -1
  79. package/velt-video-player.js +1 -1
  80. package/velt-views.js +1 -1
  81. package/velt.d.ts +1 -2
  82. package/velt.js +3 -3
  83. package/chunk-JWLHBAMV.js +0 -167
@@ -1 +1 @@
1
- import{a as o}from"./chunk-TXOYHDVN.js";import{Pa as g,U as c,Wa as l,k as s,pi as v}from"./chunk-JWLHBAMV.js";var p=(()=>{let i=class i{constructor(e,r){this.loggingService=e,this.dragDrop=r,this.currentX=0,this.currentY=0,this.destroy$=new s,this.subscriptions=[],this.loggingService.log("%c[WB] Creating CLASS: DraggableOverlayDirective","color: blue;")}ngOnInit(){try{this.loggingService.log("%c[WB] Calling DraggableOverlayDirective FUNCTION: ngOnInit","color: green;"),this.setupDraggableOverlay()}catch(e){this.loggingService.catch("Error in DraggableOverlayDirective ngOnInit: ",e)}}setupDraggableOverlay(){try{if(this.loggingService.log("%c[WB] Calling DraggableOverlayDirective FUNCTION: setupDraggableOverlay","color: green;"),this.connectedOverlay&&this.connectedOverlay.overlayRef){let e=this.connectedOverlay.overlayRef.overlayElement;this.dragRef=this.dragDrop.createDrag(e),this.subscriptions.push(this.dragRef.moved.pipe(c(this.destroy$)).subscribe(r=>{let a=this.connectedOverlay?.overlayRef.getConfig().positionStrategy;this.updatePosition(a,r.distance.x,r.distance.y)},r=>{this.loggingService.catch("Error in DraggableOverlayDirective dragRef.moved subscription: ",r)})),this.dragRef.ended.pipe(c(this.destroy$)).subscribe(r=>{this.currentX+=r.distance.x,this.currentY+=r.distance.y},r=>{this.loggingService.catch("Error in DraggableOverlayDirective dragRef.ended subscription: ",r)})}}catch(e){this.loggingService.catch("Error in DraggableOverlayDirective setupDraggableOverlay: ",e)}}updatePosition(e,r,a){try{if(e){let n=this.currentX+r,h=this.currentY+a;e.withDefaultOffsetX(n).withDefaultOffsetY(h),this.connectedOverlay?.overlayRef?.updatePosition()}}catch{}}cleanupDraggableOverlay(){try{this.loggingService.log("%c[WB] Calling DraggableOverlayDirective FUNCTION: cleanupDraggableOverlay","color: green;"),this.dragRef&&this.dragRef.dispose()}catch(e){this.loggingService.catch("Error in DraggableOverlayDirective cleanupDraggableOverlay: ",e)}}ngOnDestroy(){try{this.loggingService.log("%c[WB] Calling DraggableOverlayDirective FUNCTION: ngOnDestroy","color: green;"),this.cleanupDraggableOverlay(),this.destroy$.next(),this.destroy$.complete(),this.subscriptions.forEach(e=>{e.unsubscribe()})}catch(e){this.loggingService.catch("Error in DraggableOverlayDirective ngOnDestroy: ",e)}}};i.\u0275fac=function(r){return new(r||i)(g(v),g(o))},i.\u0275dir=l({type:i,selectors:[["","veltDraggableOverlay",""]],inputs:{connectedOverlay:[0,"veltDraggableOverlay","connectedOverlay"]}});let t=i;return t})();export{p as a};
1
+ import{a as o}from"./chunk-MJDGHV4Y.js";import{Pa as g,U as c,Wa as l,k as s,pi as v}from"./chunk-TY3WZ4Q4.js";var p=(()=>{let i=class i{constructor(e,r){this.loggingService=e,this.dragDrop=r,this.currentX=0,this.currentY=0,this.destroy$=new s,this.subscriptions=[],this.loggingService.log("%c[WB] Creating CLASS: DraggableOverlayDirective","color: blue;")}ngOnInit(){try{this.loggingService.log("%c[WB] Calling DraggableOverlayDirective FUNCTION: ngOnInit","color: green;"),this.setupDraggableOverlay()}catch(e){this.loggingService.catch("Error in DraggableOverlayDirective ngOnInit: ",e)}}setupDraggableOverlay(){try{if(this.loggingService.log("%c[WB] Calling DraggableOverlayDirective FUNCTION: setupDraggableOverlay","color: green;"),this.connectedOverlay&&this.connectedOverlay.overlayRef){let e=this.connectedOverlay.overlayRef.overlayElement;this.dragRef=this.dragDrop.createDrag(e),this.subscriptions.push(this.dragRef.moved.pipe(c(this.destroy$)).subscribe(r=>{let a=this.connectedOverlay?.overlayRef.getConfig().positionStrategy;this.updatePosition(a,r.distance.x,r.distance.y)},r=>{this.loggingService.catch("Error in DraggableOverlayDirective dragRef.moved subscription: ",r)})),this.dragRef.ended.pipe(c(this.destroy$)).subscribe(r=>{this.currentX+=r.distance.x,this.currentY+=r.distance.y},r=>{this.loggingService.catch("Error in DraggableOverlayDirective dragRef.ended subscription: ",r)})}}catch(e){this.loggingService.catch("Error in DraggableOverlayDirective setupDraggableOverlay: ",e)}}updatePosition(e,r,a){try{if(e){let n=this.currentX+r,h=this.currentY+a;e.withDefaultOffsetX(n).withDefaultOffsetY(h),this.connectedOverlay?.overlayRef?.updatePosition()}}catch{}}cleanupDraggableOverlay(){try{this.loggingService.log("%c[WB] Calling DraggableOverlayDirective FUNCTION: cleanupDraggableOverlay","color: green;"),this.dragRef&&this.dragRef.dispose()}catch(e){this.loggingService.catch("Error in DraggableOverlayDirective cleanupDraggableOverlay: ",e)}}ngOnDestroy(){try{this.loggingService.log("%c[WB] Calling DraggableOverlayDirective FUNCTION: ngOnDestroy","color: green;"),this.cleanupDraggableOverlay(),this.destroy$.next(),this.destroy$.complete(),this.subscriptions.forEach(e=>{e.unsubscribe()})}catch(e){this.loggingService.catch("Error in DraggableOverlayDirective ngOnDestroy: ",e)}}};i.\u0275fac=function(r){return new(r||i)(g(v),g(o))},i.\u0275dir=l({type:i,selectors:[["","veltDraggableOverlay",""]],inputs:{connectedOverlay:[0,"veltDraggableOverlay","connectedOverlay"]}});let t=i;return t})();export{p as a};
@@ -1 +1 @@
1
- import{Te as h,Xe as c}from"./chunk-JWLHBAMV.js";var d=(t,r)=>{try{let e=l(t),i=[],n=[];return e.forEach(o=>{o?.parentElement?.closest(h.TAGS.SNIPPYLY_TEXT_HIGHLIGHT)?o?.parentElement?.normalize():n.push(o)}),n.forEach(o=>{let s=a(o,r);s&&i.push(s)}),i}catch(e){return c.catch("Error in highlighter highlightRange: ",e),[]}},l=t=>{try{if(t.collapsed)return[];let r=t.commonAncestorContainer;if(t.commonAncestorContainer.nodeType!==Node.ELEMENT_NODE&&(r=t.commonAncestorContainer.parentElement),!r)return[];let e=[],i=r.ownerDocument.createNodeIterator(r,NodeFilter.SHOW_TEXT),n,o=!1;for(;n=i.nextNode();)if(t.intersectsNode(n)){let s=n?.length;t.startContainer===n&&t.startOffset>0&&(n.splitText(t.startOffset),o=!0),t.endContainer===n&&t.endOffset<s&&n.splitText(t.endOffset),e.push(n)}return o&&e.shift(),e}catch(r){return c.catch("Error in highlighter getTextNodesInRange: ",r),[]}},a=(t,r)=>{try{let e=document.createElement(r||h.TAGS.SNIPPYLY_TEXT_HIGHLIGHT);return t.parentElement?.replaceChild(e,t),e.appendChild(t),e}catch(e){return c.catch("Error in highlighter highlightNode: ",e),null}};export{d as a};
1
+ import{Te as h,Xe as c}from"./chunk-TY3WZ4Q4.js";var d=(t,r)=>{try{let e=l(t),i=[],n=[];return e.forEach(o=>{o?.parentElement?.closest(h.TAGS.SNIPPYLY_TEXT_HIGHLIGHT)?o?.parentElement?.normalize():n.push(o)}),n.forEach(o=>{let s=a(o,r);s&&i.push(s)}),i}catch(e){return c.catch("Error in highlighter highlightRange: ",e),[]}},l=t=>{try{if(t.collapsed)return[];let r=t.commonAncestorContainer;if(t.commonAncestorContainer.nodeType!==Node.ELEMENT_NODE&&(r=t.commonAncestorContainer.parentElement),!r)return[];let e=[],i=r.ownerDocument.createNodeIterator(r,NodeFilter.SHOW_TEXT),n,o=!1;for(;n=i.nextNode();)if(t.intersectsNode(n)){let s=n?.length;t.startContainer===n&&t.startOffset>0&&(n.splitText(t.startOffset),o=!0),t.endContainer===n&&t.endOffset<s&&n.splitText(t.endOffset),e.push(n)}return o&&e.shift(),e}catch(r){return c.catch("Error in highlighter getTextNodesInRange: ",r),[]}},a=(t,r)=>{try{let e=document.createElement(r||h.TAGS.SNIPPYLY_TEXT_HIGHLIGHT);return t.parentElement?.replaceChild(e,t),e.appendChild(t),e}catch(e){return c.catch("Error in highlighter highlightNode: ",e),null}};export{d as a};
@@ -1,2 +1,2 @@
1
- import{b as L}from"./chunk-UJMFCXYS.js";import{ea as z,ga as B}from"./chunk-AOHSD4YE.js";import{Fa as r,Ga as S,Gc as N,Kb as T,Nb as f,Ob as D,Pa as s,Qb as h,Ua as I,Ya as O,_a as m,a as y,b as u,ha as w,ia as _,kc as v,lb as p,lc as g,mb as a,nb as d,pi as j,qa as C,sb as E,tb as k,ui as V,vb as F,wa as b,xb as x,zb as c}from"./chunk-JWLHBAMV.js";function A(t,i){if(t&1&&(a(0,"span",6),f(1),v(2,"translate"),d()),t&2){let o=c(2).ngIf;r(),h("",g(2,2,"You are following")," ",o.leaderName)}}function P(t,i){t&1&&(a(0,"span",6),f(1),v(2,"translate"),d()),t&2&&(r(),D(g(2,1,"You are leading.")))}function R(t,i){if(t&1){let o=F();a(0,"div",2),x("click",function(){w(o);let e=c().ngIf,l=c();return _(e.type==="following"?l.closeOverlay():void 0)}),a(1,"div",3),m(2,A,3,4,"span",4)(3,P,3,3,"span",4),a(4,"button",5),x("click",function(){w(o);let e=c(2);return _(e.closeOverlay())}),f(5),v(6,"translate"),v(7,"translate"),d()()()}if(t&2){let o=c().ngIf;T("no-pointer",o.type==="leading"),r(2),p("ngIf",o.type==="following"),r(),p("ngIf",o.type==="leading"),r(2),h("",g(6,6,"Stop")," ",g(7,8,o.type))}}function Y(t,i){if(t&1&&(E(0),m(1,R,8,10,"div",1),k()),t&2){let o=i.ngIf;r(),p("ngIf",o.leaderName!==""||o.type==="leading")}}var te=(()=>{let i=class i extends B{closeOverlay(){this.closeOverlayEvent.emit()}constructor(n,e,l,M){super(e,l),this.loggingService=n,this.elementRef=e,this.themeService=l,this.domService=M,this.closeOverlayEvent=new S,this.componentConfigSignal=C({leaderName:"",type:"following"})}ngOnInit(){}ngAfterViewInit(){try{this.customCssSubscription=this.domService.subscribeInjectCustomCss(this.elementRef)}catch(n){this.loggingService.catch("Error in FollowOverlayComponent ngAfterViewInit: ",n)}}setLeaderName(n){try{this.componentConfigSignal.update(e=>(e=u(y({},e),{leaderName:n}),e))}catch(e){this.loggingService.catch("Error in FollowOverlayComponent setLeaderName: ",e)}}getLeaderName(){return this.componentConfigSignal().leaderName}setType(n){try{this.componentConfigSignal.update(e=>(e=u(y({},e),{type:n}),e))}catch(e){this.loggingService.catch("Error in FollowOverlayComponent setType: ",e)}}ngOnDestroy(){try{super.ngOnDestroy(),this.customCssSubscription?.unsubscribe()}catch(n){this.loggingService.catch("Error in FollowOverlayComponent ngOnDestroy: ",n)}}};i.\u0275fac=function(e){return new(e||i)(s(j),s(b),s(z),s(V))},i.\u0275cmp=I({type:i,selectors:[["snippyly-follow-overlay"]],outputs:{closeOverlayEvent:"closeOverlayEvent"},standalone:!1,features:[O],decls:1,vars:1,consts:[[4,"ngIf"],["data-velt-ignore","","class","follow-overlay-container",3,"no-pointer","click",4,"ngIf"],["data-velt-ignore","",1,"follow-overlay-container",3,"click"],["data-velt-ignore","",1,"follow-dialog"],["data-velt-ignore","","class","follow-text",4,"ngIf"],["data-velt-ignore","",1,"follow-btn",3,"click"],["data-velt-ignore","",1,"follow-text"]],template:function(e,l){e&1&&m(0,Y,2,1,"ng-container",0),e&2&&p("ngIf",l.componentConfigSignal())},dependencies:[N,L],styles:[`html{--velt-base-rem-unit: 1}*[data-snippyly-element=true],*[data-velt-element=true]{font-family:var(--velt-default-font-family)}velt-wireframe{display:none!important}body.velt-pin-dragging iframe{pointer-events:none!important}.follow-overlay-container{position:fixed;top:0;left:0;width:100%;height:100%;background-color:transparent;z-index:var(--velt-follow-mode-overlay-z-index);display:flex;justify-content:center;align-items:flex-end}.follow-overlay-container .follow-dialog{background-color:var(--legacy-velt-follow-overlay-bg-color);color:var(--legacy-velt-follow-overlay-text-color);font-size:12px;display:flex;justify-content:center;align-items:center;gap:calc((1.2rem + 0px) * var(--velt-base-rem-unit));padding:calc((.9rem + 0px) * var(--velt-base-rem-unit)) calc((1.1rem + 0px) * var(--velt-base-rem-unit));border-radius:90px;margin-bottom:calc((2rem + 0px) * var(--velt-base-rem-unit));box-shadow:0 8px 16px -8px #0f0f0f1a;border:1px solid var(--legacy-velt-follow-overlay-border-color)}.follow-overlay-container .follow-dialog .follow-btn{background-color:var(--legacy-velt-follow-overlay-btn-color);padding:8px 12px;border-radius:90px;display:inline-flex;justify-content:center;align-items:center;border:none;font-weight:600;font-size:14px;cursor:pointer;pointer-events:all}.follow-overlay-container .follow-dialog .follow-btn:hover{transition:background-color .5s;background-color:var(--legacy-velt-follow-overlay-btn-hover-color)}.follow-overlay-container.no-pointer{pointer-events:none}
1
+ import{b as L}from"./chunk-XJWB3IUW.js";import{ea as z,ga as B}from"./chunk-J3FNQGWW.js";import{Fa as r,Ga as S,Gc as N,Kb as T,Nb as f,Ob as D,Pa as s,Qb as h,Ua as I,Ya as O,_a as m,a as y,b as u,ha as w,ia as _,kc as v,lb as p,lc as g,mb as a,nb as d,pi as j,qa as C,sb as E,tb as k,ui as V,vb as F,wa as b,xb as x,zb as c}from"./chunk-TY3WZ4Q4.js";function A(t,i){if(t&1&&(a(0,"span",6),f(1),v(2,"translate"),d()),t&2){let o=c(2).ngIf;r(),h("",g(2,2,"You are following")," ",o.leaderName)}}function P(t,i){t&1&&(a(0,"span",6),f(1),v(2,"translate"),d()),t&2&&(r(),D(g(2,1,"You are leading.")))}function R(t,i){if(t&1){let o=F();a(0,"div",2),x("click",function(){w(o);let e=c().ngIf,l=c();return _(e.type==="following"?l.closeOverlay():void 0)}),a(1,"div",3),m(2,A,3,4,"span",4)(3,P,3,3,"span",4),a(4,"button",5),x("click",function(){w(o);let e=c(2);return _(e.closeOverlay())}),f(5),v(6,"translate"),v(7,"translate"),d()()()}if(t&2){let o=c().ngIf;T("no-pointer",o.type==="leading"),r(2),p("ngIf",o.type==="following"),r(),p("ngIf",o.type==="leading"),r(2),h("",g(6,6,"Stop")," ",g(7,8,o.type))}}function Y(t,i){if(t&1&&(E(0),m(1,R,8,10,"div",1),k()),t&2){let o=i.ngIf;r(),p("ngIf",o.leaderName!==""||o.type==="leading")}}var te=(()=>{let i=class i extends B{closeOverlay(){this.closeOverlayEvent.emit()}constructor(n,e,l,M){super(e,l),this.loggingService=n,this.elementRef=e,this.themeService=l,this.domService=M,this.closeOverlayEvent=new S,this.componentConfigSignal=C({leaderName:"",type:"following"})}ngOnInit(){}ngAfterViewInit(){try{this.customCssSubscription=this.domService.subscribeInjectCustomCss(this.elementRef)}catch(n){this.loggingService.catch("Error in FollowOverlayComponent ngAfterViewInit: ",n)}}setLeaderName(n){try{this.componentConfigSignal.update(e=>(e=u(y({},e),{leaderName:n}),e))}catch(e){this.loggingService.catch("Error in FollowOverlayComponent setLeaderName: ",e)}}getLeaderName(){return this.componentConfigSignal().leaderName}setType(n){try{this.componentConfigSignal.update(e=>(e=u(y({},e),{type:n}),e))}catch(e){this.loggingService.catch("Error in FollowOverlayComponent setType: ",e)}}ngOnDestroy(){try{super.ngOnDestroy(),this.customCssSubscription?.unsubscribe()}catch(n){this.loggingService.catch("Error in FollowOverlayComponent ngOnDestroy: ",n)}}};i.\u0275fac=function(e){return new(e||i)(s(j),s(b),s(z),s(V))},i.\u0275cmp=I({type:i,selectors:[["snippyly-follow-overlay"]],outputs:{closeOverlayEvent:"closeOverlayEvent"},standalone:!1,features:[O],decls:1,vars:1,consts:[[4,"ngIf"],["data-velt-ignore","","class","follow-overlay-container",3,"no-pointer","click",4,"ngIf"],["data-velt-ignore","",1,"follow-overlay-container",3,"click"],["data-velt-ignore","",1,"follow-dialog"],["data-velt-ignore","","class","follow-text",4,"ngIf"],["data-velt-ignore","",1,"follow-btn",3,"click"],["data-velt-ignore","",1,"follow-text"]],template:function(e,l){e&1&&m(0,Y,2,1,"ng-container",0),e&2&&p("ngIf",l.componentConfigSignal())},dependencies:[N,L],styles:[`html{--velt-base-rem-unit: 1}*[data-snippyly-element=true],*[data-velt-element=true]{font-family:var(--velt-default-font-family)}velt-wireframe{display:none!important}body.velt-pin-dragging iframe{pointer-events:none!important}.follow-overlay-container{position:fixed;top:0;left:0;width:100%;height:100%;background-color:transparent;z-index:var(--velt-follow-mode-overlay-z-index);display:flex;justify-content:center;align-items:flex-end}.follow-overlay-container .follow-dialog{background-color:var(--legacy-velt-follow-overlay-bg-color);color:var(--legacy-velt-follow-overlay-text-color);font-size:12px;display:flex;justify-content:center;align-items:center;gap:calc((1.2rem + 0px) * var(--velt-base-rem-unit));padding:calc((.9rem + 0px) * var(--velt-base-rem-unit)) calc((1.1rem + 0px) * var(--velt-base-rem-unit));border-radius:90px;margin-bottom:calc((2rem + 0px) * var(--velt-base-rem-unit));box-shadow:0 8px 16px -8px #0f0f0f1a;border:1px solid var(--legacy-velt-follow-overlay-border-color)}.follow-overlay-container .follow-dialog .follow-btn{background-color:var(--legacy-velt-follow-overlay-btn-color);padding:8px 12px;border-radius:90px;display:inline-flex;justify-content:center;align-items:center;border:none;font-weight:600;font-size:14px;cursor:pointer;pointer-events:all}.follow-overlay-container .follow-dialog .follow-btn:hover{transition:background-color .5s;background-color:var(--legacy-velt-follow-overlay-btn-hover-color)}.follow-overlay-container.no-pointer{pointer-events:none}
2
2
  `],encapsulation:3,changeDetection:0});let t=i;return t})();export{te as a};
@@ -1 +1 @@
1
- import{b as f,c as S,d as y,e as g,f as E}from"./chunk-YBQBSGLX.js";import{$ as k,Fi as N,Te as C,Ue as I,Xe as v,ag as b,ca as h,g as u,je as w,jf as x,le as A,pi as L,qe as T,qi as O,si as D,ti as P,vi as _}from"./chunk-JWLHBAMV.js";var z=l=>{try{let s={USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_ATTR:["onerror","onload","onclick","onmouseover","onmouseout","onmouseenter","onmouseleave","onmousemove","onmousedown","onmouseup","onwheel","onscroll","onkeydown","onkeyup","onkeypress","onfocus","onblur","onchange","onsubmit","on*"],FORBID_TAGS:["script","style","iframe","object","embed","form"]};return P.sanitize(l,s)}catch(s){return v.catch("Error in File utils sanitizeSvg: ",s),""}},M=l=>{try{return l.name.split(".").slice(0,-1).join(".")}catch(s){v.catch("Error in File utils getFileName: ",s);return}},R=l=>{try{return/(?:\.([^.]+))?$/.exec(l?.name)[1]}catch(s){v.catch("Error in File utils getFileExtension: ",s);return}},U=(l,s)=>{try{let d=l.slice(0,-1,l.type);return new File([d],s+"."+R(l),{type:l.type})}catch(d){v.catch("Error in File utils updateFile: ",d);return}};var F={mp4:"video/mp4",mov:"video/quicktime",avi:"video/x-msvideo",wmv:"video/x-ms-wmv",flv:"video/x-flv",mp3:"audio/mpeg",wav:"audio/wav",ogg:"audio/ogg",webm:"video/webm",mkv:"video/x-matroska",m4v:"video/x-m4v",m4a:"audio/x-m4a",aac:"audio/aac","3gp":"video/3gpp","3g2":"video/3gpp2",jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",gif:"image/gif",bmp:"image/bmp",svg:"image/svg+xml",webp:"image/webp",pdf:"application/pdf",doc:"application/msword",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",xls:"application/vnd.ms-excel",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",ppt:"application/vnd.ms-powerpoint",pptx:"application/vnd.openxmlformats-officedocument.presentationml.presentation",odt:"application/vnd.oasis.opendocument.text",ods:"application/vnd.oasis.opendocument.spreadsheet",zip:"application/zip",rar:"application/x-rar-compressed",txt:"text/plain",rtf:"application/rtf",html:"text/html",htm:"text/html",csv:"text/csv",ics:"text/calendar",vcf:"text/x-vcard",js:"application/javascript",css:"text/css",json:"application/json",xml:"application/xml",swf:"application/x-shockwave-flash"};var ie=(()=>{let s=class s{constructor(t,e,o,i,c){this.authService=t,this.configService=e,this.coreActionsService=o,this.loggingService=i,this.attachmentResolverService=c,this.storage=y();try{this.configService.getApiKey$().subscribe(r=>{this.apiKey=r}),this.authService.getFirebaseConfig$().subscribe(r=>{if(r&&r.firebaseOptions?.storageBucket){this.storage=y(void 0,r?.firebaseOptions?.storageBucket);let a=this.configService.getProxyConfig();a?.storageHost&&(this.storage.host=a.storageHost)}},r=>{this.loggingService.catch("Error in StorageService constructor: ",r)})}catch(r){this.loggingService.catch("Error in StorageService constructor:",r)}}createAttachment({path:t,file:e}){try{let o=new I;o.name=e.name;let i=U(e,`${o.attachmentId}_${M(e)}`),c=`${this.apiKey}/${t}/${i?.name}`;return o.bucketPath=c,o.size=e.size,o.type=R(e),o?.type&&(o.mimeType=F[o?.type]),o}catch(o){return this.loggingService.catch("Error in StorageService createAttachment: ",o),null}}sanitizeSvgFile(t){return u(this,null,function*(){if(t.type===F.svg)try{let e=yield t.text(),o=z(e);return new File([o],t.name,{type:t.type})}catch(e){return this.loggingService.catch("Error in StorageService sanitizeSvgFile: ",e),t}return t})}uploadAttachmentToStorage(c){return u(this,arguments,function*({attachment:t,file:e,resolve:o,reject:i}){try{let r=g(this.storage,t.bucketPath),a=E(r,e,{cacheControl:"public,max-age=3600"});a.on("state_changed",n=>{let m=n.bytesTransferred/n.totalBytes*100},n=>{i(n)},()=>{S(a.snapshot.ref).then(n=>{t.url=n,o(t)})})}catch(r){this.loggingService.catch("Error in StorageService uploadAttachmentToStorage: ",r),i(r)}})}uploadToResolver(a){return u(this,arguments,function*({file:t,attachment:e,metadata:o,resolve:i,reject:c,scope:r}){try{o.attachmentId=e.attachmentId;let n={attachmentId:e.attachmentId,name:e.name,file:t,metadata:o,mimeType:e.mimeType},m=b();this.coreActionsService.triggerAction(T.ATTACHMENT_RESOLVER,{event:w.Events.Resolver.ATTACHMENT_SAVE_REQUEST_FORMED,timestamp:new Date().getTime(),uniqueId:m,methodName:x.UPLOAD_TO_RESOLVER,source:"internal",payload:{attachment:n,eventType:A.ATTACHMENT_ADD}});let p=yield this.attachmentResolverService.saveAttachment({attachment:n,eventType:A.ATTACHMENT_ADD},m,r);p&&p.data?.url?(e.url=p.data?.url,i(e)):c(new Error("Failed to upload attachment to resolver"))}catch(n){this.loggingService.catch("Error in StorageService uploadToResolver: ",n),c(n)}})}uploadFile({path:t,file:e,useAttachmentResolver:o,metadata:i,attachmentScope:c}){return new Promise((r,a)=>u(this,null,function*(){try{if(!this.apiKey)throw new Error("API key not configured");let n=yield this.sanitizeSvgFile(e),m=this.createAttachment({path:t,file:n});if(!m)throw new Error("Attachment not created");o?this.uploadToResolver({file:n,attachment:m,metadata:i,resolve:r,reject:a,scope:c}):this.uploadAttachmentToStorage({attachment:m,file:n,resolve:r,reject:a})}catch(n){this.loggingService.catch("Error in StorageService uploadFile:",n),a(n)}}))}uploadChunk(t,e,o,i){return new Promise((c,r)=>{try{if(i?.useAttachmentResolver){let a=this.createAttachment({path:t,file:e});if(!a){r(new Error("Attachment not created for chunk upload"));return}this.uploadToResolver({file:e,attachment:a,metadata:i.metadata,resolve:n=>c(n.url),reject:r,scope:i.attachmentScope});return}if(this.apiKey){let a=`${this.apiKey}/${t}/${e.name}`,n=g(this.storage,a),m=E(n,e,{cacheControl:"public,max-age=3600"});m.on("state_changed",p=>{let $=p.bytesTransferred/p.totalBytes*100},p=>{r(p)},()=>{S(m.snapshot.ref).then(p=>{c(p)}).catch(p=>{this.loggingService.catch(`[uploadChunk] Error getting download URL for chunk ${o}:`,p),r(p)})})}else{let a=new Error("API key not available");this.loggingService.catch("[uploadChunk] API key not available",a),r(a)}}catch(a){this.loggingService.catch(`[uploadChunk] Error in StorageService uploadChunk for chunk ${o}: `,a),r(a)}})}downloadAttachment(t){try{if(t.url){let e=new XMLHttpRequest;e.responseType="blob",e.onload=()=>{let o=e.response,i=document.createElement("a"),c=window.URL.createObjectURL(o);i.setAttribute("type","hidden"),i.setAttribute(C.ATTRIBUTES.VELT_DOWNLOAD_BUTTON,"true"),i.classList.add("snippyly-overlay-panel"),i.href=c,t?.name&&(i.download=t?.name),document.body.appendChild(i);let r=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});i.dispatchEvent(r),window.URL.revokeObjectURL(c),i.remove()},e.onerror=()=>{window.open(t.url,"_blank")},e.open("GET",t.url),e.send()}}catch(e){this.loggingService.catch("Error in StorageService downloadAttachment: ",e)}}deleteAttachment({attachment:t,metadata:e,useAttachmentResolver:o,attachmentScope:i}){return new Promise((c,r)=>{if(o){let a=b();this.coreActionsService.triggerAction(T.ATTACHMENT_RESOLVER,{event:w.Events.Resolver.ATTACHMENT_DELETE_REQUEST_FORMED,timestamp:new Date().getTime(),uniqueId:a,methodName:x.DELETE_ATTACHMENT,source:"internal",payload:{attachmentId:t.attachmentId,metadata:e}}),this.attachmentResolverService.deleteAttachment({attachmentId:t.attachmentId,metadata:e},a,i).then(()=>{c(null)}).catch(n=>{r(n)})}else{let a=g(this.storage,t.bucketPath);f(a).then(()=>{c(null)}).catch(n=>{c(null)})}})}deleteFileFromPath(t){return new Promise((e,o)=>{let i=g(this.storage,t);f(i).then(()=>{e(null)}).catch(c=>{o(c)})})}};s.\u0275fac=function(e){return new(e||s)(h(_),h(O),h(D),h(L),h(N))},s.\u0275prov=k({token:s,factory:s.\u0275fac,providedIn:"root"});let l=s;return l})();export{ie as a};
1
+ import{b as f,c as S,d as y,e as g,f as E}from"./chunk-XAJ4ABBW.js";import{$ as k,Fi as N,Te as C,Ue as I,Xe as v,ag as b,ca as h,g as u,je as w,jf as x,le as A,pi as L,qe as T,qi as O,si as D,ti as P,vi as _}from"./chunk-TY3WZ4Q4.js";var z=l=>{try{let s={USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_ATTR:["onerror","onload","onclick","onmouseover","onmouseout","onmouseenter","onmouseleave","onmousemove","onmousedown","onmouseup","onwheel","onscroll","onkeydown","onkeyup","onkeypress","onfocus","onblur","onchange","onsubmit","on*"],FORBID_TAGS:["script","style","iframe","object","embed","form"]};return P.sanitize(l,s)}catch(s){return v.catch("Error in File utils sanitizeSvg: ",s),""}},M=l=>{try{return l.name.split(".").slice(0,-1).join(".")}catch(s){v.catch("Error in File utils getFileName: ",s);return}},R=l=>{try{return/(?:\.([^.]+))?$/.exec(l?.name)[1]}catch(s){v.catch("Error in File utils getFileExtension: ",s);return}},U=(l,s)=>{try{let d=l.slice(0,-1,l.type);return new File([d],s+"."+R(l),{type:l.type})}catch(d){v.catch("Error in File utils updateFile: ",d);return}};var F={mp4:"video/mp4",mov:"video/quicktime",avi:"video/x-msvideo",wmv:"video/x-ms-wmv",flv:"video/x-flv",mp3:"audio/mpeg",wav:"audio/wav",ogg:"audio/ogg",webm:"video/webm",mkv:"video/x-matroska",m4v:"video/x-m4v",m4a:"audio/x-m4a",aac:"audio/aac","3gp":"video/3gpp","3g2":"video/3gpp2",jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",gif:"image/gif",bmp:"image/bmp",svg:"image/svg+xml",webp:"image/webp",pdf:"application/pdf",doc:"application/msword",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",xls:"application/vnd.ms-excel",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",ppt:"application/vnd.ms-powerpoint",pptx:"application/vnd.openxmlformats-officedocument.presentationml.presentation",odt:"application/vnd.oasis.opendocument.text",ods:"application/vnd.oasis.opendocument.spreadsheet",zip:"application/zip",rar:"application/x-rar-compressed",txt:"text/plain",rtf:"application/rtf",html:"text/html",htm:"text/html",csv:"text/csv",ics:"text/calendar",vcf:"text/x-vcard",js:"application/javascript",css:"text/css",json:"application/json",xml:"application/xml",swf:"application/x-shockwave-flash"};var ie=(()=>{let s=class s{constructor(t,e,o,i,c){this.authService=t,this.configService=e,this.coreActionsService=o,this.loggingService=i,this.attachmentResolverService=c,this.storage=y();try{this.configService.getApiKey$().subscribe(r=>{this.apiKey=r}),this.authService.getFirebaseConfig$().subscribe(r=>{if(r&&r.firebaseOptions?.storageBucket){this.storage=y(void 0,r?.firebaseOptions?.storageBucket);let a=this.configService.getProxyConfig();a?.storageHost&&(this.storage.host=a.storageHost)}},r=>{this.loggingService.catch("Error in StorageService constructor: ",r)})}catch(r){this.loggingService.catch("Error in StorageService constructor:",r)}}createAttachment({path:t,file:e}){try{let o=new I;o.name=e.name;let i=U(e,`${o.attachmentId}_${M(e)}`),c=`${this.apiKey}/${t}/${i?.name}`;return o.bucketPath=c,o.size=e.size,o.type=R(e),o?.type&&(o.mimeType=F[o?.type]),o}catch(o){return this.loggingService.catch("Error in StorageService createAttachment: ",o),null}}sanitizeSvgFile(t){return u(this,null,function*(){if(t.type===F.svg)try{let e=yield t.text(),o=z(e);return new File([o],t.name,{type:t.type})}catch(e){return this.loggingService.catch("Error in StorageService sanitizeSvgFile: ",e),t}return t})}uploadAttachmentToStorage(c){return u(this,arguments,function*({attachment:t,file:e,resolve:o,reject:i}){try{let r=g(this.storage,t.bucketPath),a=E(r,e,{cacheControl:"public,max-age=3600"});a.on("state_changed",n=>{let m=n.bytesTransferred/n.totalBytes*100},n=>{i(n)},()=>{S(a.snapshot.ref).then(n=>{t.url=n,o(t)})})}catch(r){this.loggingService.catch("Error in StorageService uploadAttachmentToStorage: ",r),i(r)}})}uploadToResolver(a){return u(this,arguments,function*({file:t,attachment:e,metadata:o,resolve:i,reject:c,scope:r}){try{o.attachmentId=e.attachmentId;let n={attachmentId:e.attachmentId,name:e.name,file:t,metadata:o,mimeType:e.mimeType},m=b();this.coreActionsService.triggerAction(T.ATTACHMENT_RESOLVER,{event:w.Events.Resolver.ATTACHMENT_SAVE_REQUEST_FORMED,timestamp:new Date().getTime(),uniqueId:m,methodName:x.UPLOAD_TO_RESOLVER,source:"internal",payload:{attachment:n,eventType:A.ATTACHMENT_ADD}});let p=yield this.attachmentResolverService.saveAttachment({attachment:n,eventType:A.ATTACHMENT_ADD},m,r);p&&p.data?.url?(e.url=p.data?.url,i(e)):c(new Error("Failed to upload attachment to resolver"))}catch(n){this.loggingService.catch("Error in StorageService uploadToResolver: ",n),c(n)}})}uploadFile({path:t,file:e,useAttachmentResolver:o,metadata:i,attachmentScope:c}){return new Promise((r,a)=>u(this,null,function*(){try{if(!this.apiKey)throw new Error("API key not configured");let n=yield this.sanitizeSvgFile(e),m=this.createAttachment({path:t,file:n});if(!m)throw new Error("Attachment not created");o?this.uploadToResolver({file:n,attachment:m,metadata:i,resolve:r,reject:a,scope:c}):this.uploadAttachmentToStorage({attachment:m,file:n,resolve:r,reject:a})}catch(n){this.loggingService.catch("Error in StorageService uploadFile:",n),a(n)}}))}uploadChunk(t,e,o,i){return new Promise((c,r)=>{try{if(i?.useAttachmentResolver){let a=this.createAttachment({path:t,file:e});if(!a){r(new Error("Attachment not created for chunk upload"));return}this.uploadToResolver({file:e,attachment:a,metadata:i.metadata,resolve:n=>c(n.url),reject:r,scope:i.attachmentScope});return}if(this.apiKey){let a=`${this.apiKey}/${t}/${e.name}`,n=g(this.storage,a),m=E(n,e,{cacheControl:"public,max-age=3600"});m.on("state_changed",p=>{let $=p.bytesTransferred/p.totalBytes*100},p=>{r(p)},()=>{S(m.snapshot.ref).then(p=>{c(p)}).catch(p=>{this.loggingService.catch(`[uploadChunk] Error getting download URL for chunk ${o}:`,p),r(p)})})}else{let a=new Error("API key not available");this.loggingService.catch("[uploadChunk] API key not available",a),r(a)}}catch(a){this.loggingService.catch(`[uploadChunk] Error in StorageService uploadChunk for chunk ${o}: `,a),r(a)}})}downloadAttachment(t){try{if(t.url){let e=new XMLHttpRequest;e.responseType="blob",e.onload=()=>{let o=e.response,i=document.createElement("a"),c=window.URL.createObjectURL(o);i.setAttribute("type","hidden"),i.setAttribute(C.ATTRIBUTES.VELT_DOWNLOAD_BUTTON,"true"),i.classList.add("snippyly-overlay-panel"),i.href=c,t?.name&&(i.download=t?.name),document.body.appendChild(i);let r=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});i.dispatchEvent(r),window.URL.revokeObjectURL(c),i.remove()},e.onerror=()=>{window.open(t.url,"_blank")},e.open("GET",t.url),e.send()}}catch(e){this.loggingService.catch("Error in StorageService downloadAttachment: ",e)}}deleteAttachment({attachment:t,metadata:e,useAttachmentResolver:o,attachmentScope:i}){return new Promise((c,r)=>{if(o){let a=b();this.coreActionsService.triggerAction(T.ATTACHMENT_RESOLVER,{event:w.Events.Resolver.ATTACHMENT_DELETE_REQUEST_FORMED,timestamp:new Date().getTime(),uniqueId:a,methodName:x.DELETE_ATTACHMENT,source:"internal",payload:{attachmentId:t.attachmentId,metadata:e}}),this.attachmentResolverService.deleteAttachment({attachmentId:t.attachmentId,metadata:e},a,i).then(()=>{c(null)}).catch(n=>{r(n)})}else{let a=g(this.storage,t.bucketPath);f(a).then(()=>{c(null)}).catch(n=>{c(null)})}})}deleteFileFromPath(t){return new Promise((e,o)=>{let i=g(this.storage,t);f(i).then(()=>{e(null)}).catch(c=>{o(c)})})}};s.\u0275fac=function(e){return new(e||s)(h(_),h(O),h(D),h(L),h(N))},s.\u0275prov=k({token:s,factory:s.\u0275fac,providedIn:"root"});let l=s;return l})();export{ie as a};
@@ -1 +1 @@
1
- import{Ga as c,Pa as n,Wa as o,ua as a,ui as h,wa as r}from"./chunk-JWLHBAMV.js";var I=(()=>{let e=class e{constructor(t,i){this.domService=t,this.elementRef=i,this.clickOutside=new c}ngOnInit(){}ngAfterViewInit(){setTimeout(()=>{this.subscription=this.domService.onDocumentClickSubject$().subscribe(t=>{let i=this.checkInsideClick(t,this.elementRef.nativeElement);!i&&this.clickOutsideHandler&&typeof this.clickOutsideHandler=="function"&&(i=this.clickOutsideHandler(t.target,this.elementRef.nativeElement)),i||this.clickOutside.emit()})},500)}ngOnDestroy(){this.subscription?.unsubscribe()}checkInsideClick(t,i){return t.composedPath().includes(i)}};e.\u0275fac=function(i){return new(i||e)(n(h),n(r))},e.\u0275dir=o({type:e,selectors:[["","snippylyClickOutside",""]],inputs:{clickOutsideHandler:"clickOutsideHandler"},outputs:{clickOutside:"clickOutside"}});let s=e;return s})();var b=(()=>{let e=class e{constructor(t){this.elementRef=t,this.lastPosition=null,this.positionChange=new c,this.disabled=!1,this.timeSpentInMs=0,this.MAX_TIME_SPENT_IN_MS=6e4}ngAfterViewInit(){try{this.toggleTrackingPosition()}catch{}}toggleTrackingPosition(){try{this.disabled?this.stopTracking():this.startTrackingPosition()}catch{}}startTrackingPosition(){try{if(this.intervalId)return;this.intervalId=setInterval(()=>{if(this.timeSpentInMs+=10,this.timeSpentInMs>this.MAX_TIME_SPENT_IN_MS){this.stopTracking();return}let t=this.elementRef.nativeElement.getBoundingClientRect();(!this.lastPosition||!this.arePositionsEqual(this.lastPosition,t))&&(this.lastPosition=t,this.positionChange.emit(t))},10)}catch{}}stopTracking(){try{this.intervalId&&(clearInterval(this.intervalId),this.intervalId=null,this.timeSpentInMs=0)}catch{}}arePositionsEqual(t,i){try{return t.top===i.top&&t.left===i.left&&t.bottom===i.bottom&&t.right===i.right&&t.width===i.width&&t.height===i.height}catch{return!0}}ngOnChanges(){try{this.toggleTrackingPosition()}catch{}}ngOnDestroy(){try{this.stopTracking()}catch{}}};e.\u0275fac=function(i){return new(i||e)(n(r))},e.\u0275dir=o({type:e,selectors:[["","veltPositionObserver",""]],inputs:{disabled:[0,"veltPositionObserverDisabled","disabled"]},outputs:{positionChange:"positionChange"},features:[a]});let s=e;return s})();export{I as a,b};
1
+ import{Ga as c,Pa as n,Wa as o,ua as a,ui as h,wa as r}from"./chunk-TY3WZ4Q4.js";var I=(()=>{let e=class e{constructor(t,i){this.domService=t,this.elementRef=i,this.clickOutside=new c}ngOnInit(){}ngAfterViewInit(){setTimeout(()=>{this.subscription=this.domService.onDocumentClickSubject$().subscribe(t=>{let i=this.checkInsideClick(t,this.elementRef.nativeElement);!i&&this.clickOutsideHandler&&typeof this.clickOutsideHandler=="function"&&(i=this.clickOutsideHandler(t.target,this.elementRef.nativeElement)),i||this.clickOutside.emit()})},500)}ngOnDestroy(){this.subscription?.unsubscribe()}checkInsideClick(t,i){return t.composedPath().includes(i)}};e.\u0275fac=function(i){return new(i||e)(n(h),n(r))},e.\u0275dir=o({type:e,selectors:[["","snippylyClickOutside",""]],inputs:{clickOutsideHandler:"clickOutsideHandler"},outputs:{clickOutside:"clickOutside"}});let s=e;return s})();var b=(()=>{let e=class e{constructor(t){this.elementRef=t,this.lastPosition=null,this.positionChange=new c,this.disabled=!1,this.timeSpentInMs=0,this.MAX_TIME_SPENT_IN_MS=6e4}ngAfterViewInit(){try{this.toggleTrackingPosition()}catch{}}toggleTrackingPosition(){try{this.disabled?this.stopTracking():this.startTrackingPosition()}catch{}}startTrackingPosition(){try{if(this.intervalId)return;this.intervalId=setInterval(()=>{if(this.timeSpentInMs+=10,this.timeSpentInMs>this.MAX_TIME_SPENT_IN_MS){this.stopTracking();return}let t=this.elementRef.nativeElement.getBoundingClientRect();(!this.lastPosition||!this.arePositionsEqual(this.lastPosition,t))&&(this.lastPosition=t,this.positionChange.emit(t))},10)}catch{}}stopTracking(){try{this.intervalId&&(clearInterval(this.intervalId),this.intervalId=null,this.timeSpentInMs=0)}catch{}}arePositionsEqual(t,i){try{return t.top===i.top&&t.left===i.left&&t.bottom===i.bottom&&t.right===i.right&&t.width===i.width&&t.height===i.height}catch{return!0}}ngOnChanges(){try{this.toggleTrackingPosition()}catch{}}ngOnDestroy(){try{this.stopTracking()}catch{}}};e.\u0275fac=function(i){return new(i||e)(n(r))},e.\u0275dir=o({type:e,selectors:[["","veltPositionObserver",""]],inputs:{disabled:[0,"veltPositionObserverDisabled","disabled"]},outputs:{positionChange:"positionChange"},features:[a]});let s=e;return s})();export{I as a,b};
@@ -1 +1 @@
1
- import{a as i,b as r,oi as e,pi as a}from"./chunk-JWLHBAMV.js";var h=class{constructor(t){this.injector=t,this.hideAnalytics=!1}ha(t){try{this.hideAnalytics=t}catch{}}getService(t){return this.injector.get(t)}trackEvent(t,c={},n=!0){try{this.hideAnalytics||(c||(c={}),c=r(i({},c),{source:"external"}),this.getService(e).trackAuthenticatedEvent(t,c,n))}catch(s){this.getService(a).catch("Error in _trackEvent: ",s);return}}};export{h as a};
1
+ import{a as i,b as r,oi as e,pi as a}from"./chunk-TY3WZ4Q4.js";var h=class{constructor(t){this.injector=t,this.hideAnalytics=!1}ha(t){try{this.hideAnalytics=t}catch{}}getService(t){return this.injector.get(t)}trackEvent(t,c={},n=!0){try{this.hideAnalytics||(c||(c={}),c=r(i({},c),{source:"external"}),this.getService(e).trackAuthenticatedEvent(t,c,n))}catch(s){this.getService(a).catch("Error in _trackEvent: ",s);return}}};export{h as a};
@@ -1 +1 @@
1
- import{ca as F}from"./chunk-AOHSD4YE.js";import{$ as A,Ci as U,E as h,G as d,Hi as C,Ie as a,J as v,Je as m,L as l,Qf as g,Qi as w,T as n,Te as M,ca as s,je as $,l as p,lf as D,oi as E,pi as R,qi as y,r as u,v as c,vi as k,xh as I}from"./chunk-JWLHBAMV.js";var Z=(()=>{let o=class o{constructor(e,t,r,b,f,W,T,j){this.analyticsService=e,this.authService=t,this.contactService=r,this.databaseService=b,this.docService=f,this.configService=W,this.loggingService=T,this.commonDbService=j,this.documentIAM$=new p(null),this.workspaceIAM$=new p(null),this.roles$=new p([]),this.getDocumentIamSubscription=null,this.getOrganizationIamSubscription=null,this.getWorkspaceIamSubscription=null;try{this.authService.setIamService(this),this.databaseService.getDb().pipe(h(i=>!!i),v(1)).subscribe(i=>{i&&(this.getUser(),this.getDocumentPaths())},i=>{this.loggingService.catch("Error in CommentService getDb subscription: ",i)}),this.getRole$().pipe(v(1)).subscribe(i=>{this.authService?.getUser()&&!i&&this.analyticsService.trackEvent($.Events.Iam.USER_ACCESS_DENIED)}),this.documentIAM$.subscribe(i=>{i?.accessType&&this.contactService.setDocumentAccessType(i.accessType)})}catch(i){this.loggingService.catch("Error in IamService constructor: ",i)}}clearCache(){this.loggingService.log("%c[WB] Calling FUNCTION: clearCache in IamService","color: green;");try{this.documentIAM$.next(null),this.workspaceIAM$.next(null),this.roles$.next([]),this.documentPaths=null}catch(e){this.loggingService.catch("Error in IamService clearCache: ",e)}}getUser(){try{this.authService.getUser$().pipe(h(e=>!!e)).subscribe(e=>{this.user=e,this.user?this.getDocumentIam():(this.getDocumentIamSubscription?.unsubscribe(),this.getOrganizationIamSubscription?.unsubscribe(),this.getWorkspaceIamSubscription?.unsubscribe())},e=>{this.loggingService.catch("Error in IamService getUser$ subscription: ",e)})}catch(e){this.loggingService.catch("Error in IamService getUser: ",e)}}getDocumentPaths(){try{this.docService.getDocumentPaths$().pipe(h(e=>!!e)).subscribe(e=>{this.documentPaths=e,this.getDocumentIam(),this.getWorkspaceIam()},e=>{this.loggingService.catch("Error in IamService getDocumentPaths$ subscription: ",e)})}catch(e){this.loggingService.catch("Error in IamService getDocumentPaths: ",e)}}getDocumentIam(){try{this.getDocumentIamSubscription&&(this.getDocumentIamSubscription.unsubscribe(),this.getDocumentIamSubscription=null),this.user?this.getDocumentIamSubscription=this.docService.getDocumentIam$().subscribe(e=>{let t=e||new D;this.documentIAM$.next(t)},e=>{this.loggingService.catch("Error in IamService getDocumentIam$ subscription: ",e)}):this.documentIAM$.next(null)}catch(e){this.loggingService.catch("Error in IamService getDocumentIam: ",e)}}getWorkspaceIam(){try{this.getWorkspaceIamSubscription||(this.getWorkspaceIamSubscription=this.commonDbService.dbListener({feature:"workspaceIam",properties:{skipFirestore:!0}}).pipe(d(e=>u(null))).subscribe(e=>{this.workspaceIAM$.next(e?.data),this.roles$.next(e?.data?.roles||[])}))}catch(e){this.loggingService.catch("Error in IamService getWorkspaceIam: ",e)}}isUserAllowed$(){return this.getRole$().pipe(c(e=>!!e),l())}getDocumentIAM$(){return this.documentIAM$.asObservable()}getRoles$(){return this.roles$.asObservable().pipe(c(e=>e?.length?e:M.WorkspaceRoles))}getFeaturesAccessLevel$(){return this.documentIAM$.asObservable().pipe(c(e=>e?.features),n(e=>this.getRole$().pipe(c(t=>(t===a.ADMIN&&(e=e&&JSON.parse(JSON.stringify(e||{})),e?.all?.disabled&&(e.all.disabled=!1)),e)))))}hasRole(e){try{return e===this.getRole()}catch(t){return this.loggingService.catch("Error in IamService hasRole: ",t),!1}}hasRoleAny(e=[]){try{return e?.includes(this.getRole()||"")}catch(t){return this.loggingService.catch("Error in IamService hasRoleAny: ",t),!1}}hasRole$(e){try{return this.authService.getUser$().pipe(n(()=>this.documentIAM$.pipe(h(t=>!!t),n(()=>this.workspaceIAM$.pipe(c(()=>e===this.getRole()))))))}catch(t){return this.loggingService.catch("Error in IamService hasRole$: ",t),u(!1)}}getRole$(){try{return this.authService.getUser$().pipe(n(()=>this.configService.getSF$()),n(()=>this.configService.getSF()?this.contactService.isUserGlobalContact$():u(null)),n(()=>this.configService.getSF()?this.documentIAM$.pipe(h(e=>!!e),l(I)):u(null)),n(()=>this.workspaceIAM$.pipe(l(I))),c(()=>this.getRole()))}catch(e){return this.loggingService.catch("Error in IamService getRole$: ",e),u(null)}}getRole(){try{let e=this.configService.getSF();if(this.user?.isAdmin)return a.ADMIN;return a.COMMENTER;if(this.user)switch((this.documentIAM$.value?this.documentIAM$.value?.features?.all?.restricted:!1)?m.RESTRICTED:this.documentIAM$.value?this.documentIAM$.value?.documentAccessType||m.PUBLIC:null){case m.PUBLIC:r=this.getUserFromDocumentIAM(this.user?.email,this.user?.userId),r||(r=this.getUserFromWorkspaceIAM(this.user?.email,this.user?.userId)),t=r?.role?.name||a.COMMENTER;break;case m.RESTRICTED:r=this.getUserFromDocumentIAM(this.user?.email,this.user?.userId),r||(r=this.getUserFromWorkspaceIAM(this.user?.email,this.user?.userId)),t=r?.role?.name||null;break;default:break}}catch(e){this.loggingService.catch("Error in IamService getRole: ",e)}return null}isUserAdmin$(){return this.getRole$().pipe(c(e=>e===a.ADMIN),l())}isUserAdmin(){try{return this.getRole()===a.ADMIN}catch(e){return this.loggingService.catch("Error in IamService isUserAdmin: ",e),!1}}getUserFromDocumentIAM(e,t){try{if(e||t){let r;return e&&(r=this.documentIAM$.value?.users?.[g(e)]),!r&&t&&(r=this.documentIAM$.value?.users?.[g(t)]),r}else return}catch(r){this.loggingService.catch("Error in IamService getUserFromDocumentIAM: ",r)}}getUserFromWorkspaceIAM(e,t){try{if(e||t){let r;return e&&(r=this.workspaceIAM$.value?.users?.[g(e)]),!r&&t&&(r=this.workspaceIAM$.value?.users?.[g(t)]),r}else return}catch(r){this.loggingService.catch("Error in IamService getUserFromWorkspaceIAM: ",r)}}};o.\u0275fac=function(t){return new(t||o)(s(E),s(k),s(F),s(U),s(C),s(y),s(R),s(w))},o.\u0275prov=A({token:o,factory:o.\u0275fac,providedIn:"root"});let S=o;return S})();export{Z as a};
1
+ import{ca as F}from"./chunk-J3FNQGWW.js";import{$ as A,Ci as U,E as h,G as d,Hi as C,Ie as a,J as v,Je as m,L as l,Qf as g,Qi as w,T as n,Te as M,ca as s,je as $,l as p,lf as D,oi as E,pi as R,qi as y,r as u,v as c,vi as k,xh as I}from"./chunk-TY3WZ4Q4.js";var Z=(()=>{let o=class o{constructor(e,t,r,b,f,W,T,j){this.analyticsService=e,this.authService=t,this.contactService=r,this.databaseService=b,this.docService=f,this.configService=W,this.loggingService=T,this.commonDbService=j,this.documentIAM$=new p(null),this.workspaceIAM$=new p(null),this.roles$=new p([]),this.getDocumentIamSubscription=null,this.getOrganizationIamSubscription=null,this.getWorkspaceIamSubscription=null;try{this.authService.setIamService(this),this.databaseService.getDb().pipe(h(i=>!!i),v(1)).subscribe(i=>{i&&(this.getUser(),this.getDocumentPaths())},i=>{this.loggingService.catch("Error in CommentService getDb subscription: ",i)}),this.getRole$().pipe(v(1)).subscribe(i=>{this.authService?.getUser()&&!i&&this.analyticsService.trackEvent($.Events.Iam.USER_ACCESS_DENIED)}),this.documentIAM$.subscribe(i=>{i?.accessType&&this.contactService.setDocumentAccessType(i.accessType)})}catch(i){this.loggingService.catch("Error in IamService constructor: ",i)}}clearCache(){this.loggingService.log("%c[WB] Calling FUNCTION: clearCache in IamService","color: green;");try{this.documentIAM$.next(null),this.workspaceIAM$.next(null),this.roles$.next([]),this.documentPaths=null}catch(e){this.loggingService.catch("Error in IamService clearCache: ",e)}}getUser(){try{this.authService.getUser$().pipe(h(e=>!!e)).subscribe(e=>{this.user=e,this.user?this.getDocumentIam():(this.getDocumentIamSubscription?.unsubscribe(),this.getOrganizationIamSubscription?.unsubscribe(),this.getWorkspaceIamSubscription?.unsubscribe())},e=>{this.loggingService.catch("Error in IamService getUser$ subscription: ",e)})}catch(e){this.loggingService.catch("Error in IamService getUser: ",e)}}getDocumentPaths(){try{this.docService.getDocumentPaths$().pipe(h(e=>!!e)).subscribe(e=>{this.documentPaths=e,this.getDocumentIam(),this.getWorkspaceIam()},e=>{this.loggingService.catch("Error in IamService getDocumentPaths$ subscription: ",e)})}catch(e){this.loggingService.catch("Error in IamService getDocumentPaths: ",e)}}getDocumentIam(){try{this.getDocumentIamSubscription&&(this.getDocumentIamSubscription.unsubscribe(),this.getDocumentIamSubscription=null),this.user?this.getDocumentIamSubscription=this.docService.getDocumentIam$().subscribe(e=>{let t=e||new D;this.documentIAM$.next(t)},e=>{this.loggingService.catch("Error in IamService getDocumentIam$ subscription: ",e)}):this.documentIAM$.next(null)}catch(e){this.loggingService.catch("Error in IamService getDocumentIam: ",e)}}getWorkspaceIam(){try{this.getWorkspaceIamSubscription||(this.getWorkspaceIamSubscription=this.commonDbService.dbListener({feature:"workspaceIam",properties:{skipFirestore:!0}}).pipe(d(e=>u(null))).subscribe(e=>{this.workspaceIAM$.next(e?.data),this.roles$.next(e?.data?.roles||[])}))}catch(e){this.loggingService.catch("Error in IamService getWorkspaceIam: ",e)}}isUserAllowed$(){return this.getRole$().pipe(c(e=>!!e),l())}getDocumentIAM$(){return this.documentIAM$.asObservable()}getRoles$(){return this.roles$.asObservable().pipe(c(e=>e?.length?e:M.WorkspaceRoles))}getFeaturesAccessLevel$(){return this.documentIAM$.asObservable().pipe(c(e=>e?.features),n(e=>this.getRole$().pipe(c(t=>(t===a.ADMIN&&(e=e&&JSON.parse(JSON.stringify(e||{})),e?.all?.disabled&&(e.all.disabled=!1)),e)))))}hasRole(e){try{return e===this.getRole()}catch(t){return this.loggingService.catch("Error in IamService hasRole: ",t),!1}}hasRoleAny(e=[]){try{return e?.includes(this.getRole()||"")}catch(t){return this.loggingService.catch("Error in IamService hasRoleAny: ",t),!1}}hasRole$(e){try{return this.authService.getUser$().pipe(n(()=>this.documentIAM$.pipe(h(t=>!!t),n(()=>this.workspaceIAM$.pipe(c(()=>e===this.getRole()))))))}catch(t){return this.loggingService.catch("Error in IamService hasRole$: ",t),u(!1)}}getRole$(){try{return this.authService.getUser$().pipe(n(()=>this.configService.getSF$()),n(()=>this.configService.getSF()?this.contactService.isUserGlobalContact$():u(null)),n(()=>this.configService.getSF()?this.documentIAM$.pipe(h(e=>!!e),l(I)):u(null)),n(()=>this.workspaceIAM$.pipe(l(I))),c(()=>this.getRole()))}catch(e){return this.loggingService.catch("Error in IamService getRole$: ",e),u(null)}}getRole(){try{let e=this.configService.getSF();if(this.user?.isAdmin)return a.ADMIN;return a.COMMENTER;if(this.user)switch((this.documentIAM$.value?this.documentIAM$.value?.features?.all?.restricted:!1)?m.RESTRICTED:this.documentIAM$.value?this.documentIAM$.value?.documentAccessType||m.PUBLIC:null){case m.PUBLIC:r=this.getUserFromDocumentIAM(this.user?.email,this.user?.userId),r||(r=this.getUserFromWorkspaceIAM(this.user?.email,this.user?.userId)),t=r?.role?.name||a.COMMENTER;break;case m.RESTRICTED:r=this.getUserFromDocumentIAM(this.user?.email,this.user?.userId),r||(r=this.getUserFromWorkspaceIAM(this.user?.email,this.user?.userId)),t=r?.role?.name||null;break;default:break}}catch(e){this.loggingService.catch("Error in IamService getRole: ",e)}return null}isUserAdmin$(){return this.getRole$().pipe(c(e=>e===a.ADMIN),l())}isUserAdmin(){try{return this.getRole()===a.ADMIN}catch(e){return this.loggingService.catch("Error in IamService isUserAdmin: ",e),!1}}getUserFromDocumentIAM(e,t){try{if(e||t){let r;return e&&(r=this.documentIAM$.value?.users?.[g(e)]),!r&&t&&(r=this.documentIAM$.value?.users?.[g(t)]),r}else return}catch(r){this.loggingService.catch("Error in IamService getUserFromDocumentIAM: ",r)}}getUserFromWorkspaceIAM(e,t){try{if(e||t){let r;return e&&(r=this.workspaceIAM$.value?.users?.[g(e)]),!r&&t&&(r=this.workspaceIAM$.value?.users?.[g(t)]),r}else return}catch(r){this.loggingService.catch("Error in IamService getUserFromWorkspaceIAM: ",r)}}};o.\u0275fac=function(t){return new(t||o)(s(E),s(k),s(F),s(U),s(C),s(y),s(R),s(w))},o.\u0275prov=A({token:o,factory:o.\u0275fac,providedIn:"root"});let S=o;return S})();export{Z as a};
@@ -1 +1 @@
1
- import{a as N}from"./chunk-JFRM6MNS.js";import{$ as v,$g as G,Ci as K,E as P,G as x,Hi as W,I as C,J as f,Ma as j,Qi as Y,Te as m,Wd as $,Yd as V,Zg as z,_g as L,ag as H,ah as B,bb as X,bh as R,ca as a,ch as F,l as p,la as M,pi as g,r as D,sg as T,ui as J,vi as b,w as A,xg as k,z as y}from"./chunk-JWLHBAMV.js";var h=(function(n){return n.CLICK="click",n.HOVER="hover",n.SCROLL="scroll",n.NAVIGATE="navigate",n})(h||{}),u=class{constructor(){this.type=h.HOVER,this.data=null,this.pageInfo=k(),this.timestamp=Date.now()}},U=class{constructor(c,w){this.targetXpath=c,this.xpath=w}};var E=class{constructor(){this.sessionId=null,this.isLeader=!1,this.lastProcessedActionTimestamp=null}};var S=class{constructor(c){this.snippylyId=c,this.joinTimestamp=Date.now()}};var I=class{constructor(c,w,e){this.followers=[],this.actionStack=[],this.id=H(),this.leaderId=c,this.leaderName=w,this.followers.push(new S(e))}};var Z=(()=>{let c=class c{constructor(e,t,r,i,o){this.databaseService=e,this.docService=t,this.loggingService=r,this.authService=i,this.commonDbService=o,this.currentUser$=new p(null),this.currentSession$=new p(null);try{this.databaseService.getDb().pipe(P(s=>!!s),f(1)).subscribe(s=>{s&&(this.db=s)},s=>{this.loggingService.catch("Error in FlockSessionService getDb subscription: ",s)}),this.authService.getUser$().subscribe(s=>{s&&s.userSnippylyId&&(this.user=s)})}catch(s){this.loggingService.catch("Error in FlockSessionService constructor: ",s)}}startCurrentFlockUserSubscription(e){try{this.currentUserSub?.unsubscribe(),e&&e.userSnippylyId&&(this.user=e,this.subscribeToCurrentFlockUser(e?.userSnippylyId))}catch(t){this.loggingService.catch("Error in FlockSessionService startCurrentFlockUserSubscription: ",t)}}stopCurrentFlockUserSubscription(){try{this.currentUserSub?.unsubscribe()}catch(e){this.loggingService.catch("Error in FlockSessionService stopCurrentFlockUserSubscription: ",e)}}provisionFlockSession(e,t,r){try{let i=this.docService.getDocumentPaths();i&&this.db&&this.commonDbService.dbListener({feature:"flockUser",properties:{documentId:i?.documentId,organizationId:i?.organizationId,id:e,skipFirestore:!0}}).pipe(f(1)).subscribe(o=>{o?.data&&o?.data?.sessionId?this.subscribeToCurrentSession(o?.data?.sessionId,r):this.createFlockSession(e,t,r)})}catch(i){this.loggingService.catch("Error in FlockSessionService provisionFlockSession: ",i)}return null}swapLeader(e,t,r){try{if(this.updateRemoteFlockUser(e,{isLeader:!1}),this.updateRemoteFlockUser(t,{isLeader:!0}),this.currentSession){this.currentSession.leaderId=t,this.currentSession.leaderName=r,this.currentSession.followers.push(new S(e));let i=this.currentSession.followers.findIndex(o=>o.snippylyId===t);i>-1&&this.currentSession.followers.splice(i,1),this.updateSession(this.currentSession.id,this.currentSession)}}catch(i){this.loggingService.catch("Error in FlockSessionService swapLeader: ",i)}}createFlockSession(e,t,r){try{let i=new I(e,t,r);return this.updateRemoteFlockUser(e,{snippylyId:e,sessionId:i.id,isLeader:!0}),this.updateSession(i.id,i),this.subscribeToCurrentSession(i.id),i.id}catch(i){this.loggingService.catch("Error in FlockSessionService createFlockSession: ",i)}return null}removeFollowerFromCurrentSession(e){try{if(this.currentSession){this.updateRemoteFlockUser(e,{sessionId:null,lastProcessedActionTimestamp:null});let t=this.currentSession.followers.findIndex(r=>r.snippylyId===e);if(t>-1){if(this.currentSession.followers.splice(t,1),this.currentSession.followers.length===0){this.deleteSession(this.currentSession.id);return}this.updateSession(this.currentSession.id,this.currentSession),this.user&&this.user.userSnippylyId&&this.user.userSnippylyId===e&&(this.sessionSub?.unsubscribe(),this.currentSession=void 0,this.currentSession$?.next(null))}}}catch(t){this.loggingService.catch("Error in FlockSessionService removeFollowerFromSession: ",t)}}updateRemoteFlockUser(e,t={}){try{if(!e)return;let r=this.docService.getDocumentPaths();for(let i in t)t.hasOwnProperty(i)&&t[i]===void 0&&delete t[i];r&&this.db&&this.commonDbService.updateData({feature:"flockUser",properties:{documentId:r?.documentId??"",organizationId:r?.organizationId??"",id:e,skipFirestore:!0},data:JSON.parse(JSON.stringify(t))})}catch(r){this.loggingService.catch("Error in FlockSessionService updateRemoteFlockUser: ",r)}}subscribeToCurrentSession(e,t=void 0){try{let r=this.docService.getDocumentPaths();r&&this.db&&(this.sessionSub&&this.sessionSub.unsubscribe(),this.sessionSub=this.commonDbService.dbListener({feature:"flockSession",properties:{documentId:r?.documentId,organizationId:r?.organizationId,id:e,skipFirestore:!0}}).subscribe(i=>{i?.data&&typeof i?.data=="object"&&Object.keys(i?.data)?.length>0?(this.currentSession=i?.data,t!==void 0&&this.currentSession?.followers.findIndex(o=>o.snippylyId===t)===-1&&(this.currentSession.followers.push(new S(t)),this.updateSession(this.currentSession.id,this.currentSession)),this.currentSession$.next(this.currentSession??null)):(this.currentSession=void 0,this.currentSession$.next(null))}))}catch(r){this.loggingService.catch("Error in FlockSessionService subscribeToCurrentSession: ",r)}}subscribeToCurrentFlockUser(e){try{let t=this.docService.getDocumentPaths();t&&this.db&&(this.currentUserSub&&this.currentUserSub.unsubscribe(),this.currentUserSub=this.commonDbService.dbListener({feature:"flockUser",properties:{documentId:t?.documentId,organizationId:t?.organizationId,id:e,skipFirestore:!0}}).pipe(x(r=>(this.loggingService.catch("Error in FlockSessionService subscribeToCurrentFlockUser: ",r),D(null)))).subscribe(r=>{r?.data&&typeof r?.data=="object"&&Object.keys(r?.data)?.length>0&&(this.currentUser$.next(r?.data),r?.data?.sessionId&&this.subscribeToCurrentSession(r?.data?.sessionId))},r=>{this.loggingService.catch("Error in FlockSessionService subscribeToCurrentFlockUser subscription: ",r)}))}catch(t){this.loggingService.catch("Error in FlockSessionService subscribeToCurrentFlockUser: ",t)}}updateSession(e,t={}){try{if(!e)return;let r=this.docService.getDocumentPaths();for(let i in t)t.hasOwnProperty(i)&&t[i]===void 0&&delete t[i];r&&this.db&&this.commonDbService.updateData({feature:"flockSession",properties:{documentId:r?.documentId??"",organizationId:r?.organizationId??"",id:e,skipFirestore:!0},data:JSON.parse(JSON.stringify(t))})}catch(r){this.loggingService.catch("Error in FlockSessionService updateSession: ",r)}}deleteSession(e){try{let t=this.docService.getDocumentPaths();t&&this.db&&(this.commonDbService.deleteData({feature:"flockSession",properties:{documentId:t?.documentId??"",organizationId:t?.organizationId??"",id:e,skipFirestore:!0}}),this.currentSession&&e===this.currentSession.id&&(this.updateRemoteFlockUser(this.currentSession.leaderId,{sessionId:null,isLeader:!1,lastProcessedActionTimestamp:null}),this.currentSession.followers.forEach(r=>{this.updateRemoteFlockUser(r.snippylyId,{sessionId:null,lastProcessedActionTimestamp:null})}),this.currentSession=void 0,this.currentSession$.next(null),this.sessionSub?.unsubscribe()))}catch(t){this.loggingService.catch("Error in FlockSessionService deleteSession: ",t)}}addActionToStack(e,t){try{t=t&&JSON.parse(JSON.stringify(t));let r=this.docService.getDocumentPaths();if(r&&this.db&&e){let i=$(this.db,`${r.flock}/sessions/${e}/actionStack`);V(i,o=>o?(o.unshift(t),o.slice(0,5)):[t]),t.type===h.NAVIGATE&&this.updateSession(e,{pageInfo:t.pageInfo})}}catch(r){this.loggingService.catch("Error in FlockSessionService addActionToStack: ",r)}}};c.\u0275fac=function(t){return new(t||c)(a(K),a(W),a(g),a(b),a(Y))},c.\u0275prov=v({token:c,factory:c.\u0275fac,providedIn:"root"});let n=c;return n})();var _=(()=>{let c=class c{constructor(e,t,r,i){this.componentFactoryResolver=e,this.applicationRef=t,this.injector=r,this.loggingService=i,this.darkMode=!1}createFollowOverlay(e,t){try{let i=this.componentFactoryResolver.resolveComponentFactory(N).create(this.injector);i.instance.setLeaderName(e),i.instance.closeOverlayEvent.pipe(f(1)).subscribe(()=>{this.removeOverlay(),t()}),this.applicationRef.attachView(i.hostView),this.overlayRef=i,this.overlayRef.instance.darkMode=this.darkMode;let o=this.overlayRef.location.nativeElement;o.id="snippyly-follow-overlay",o.setAttribute(m.ATTRIBUTES.VELT_IGNORE,""),document.body.appendChild(o)}catch(r){this.loggingService.catch("Error in FlockOverlayService createFollowOverlay: ",r)}}createLeaderOverlay(e){let r=this.componentFactoryResolver.resolveComponentFactory(N).create(this.injector);r.instance.setType("leading"),r.instance.closeOverlayEvent.pipe(f(1)).subscribe(()=>{this.removeOverlay(),e()}),this.applicationRef.attachView(r.hostView),this.overlayRef=r,this.overlayRef.instance.darkMode=this.darkMode;let i=this.overlayRef.location.nativeElement;i.id="snippyly-follow-overlay",i.setAttribute(m.ATTRIBUTES.VELT_IGNORE,""),document.body.appendChild(i)}changeLeaderName(e){this.overlayRef&&this.overlayRef.instance.setLeaderName(e)}getLeaderName(){return this.overlayRef?this.overlayRef.instance.getLeaderName():null}removeOverlay(){if(this.overlayRef){let e=this.overlayRef.location.nativeElement;this.applicationRef.detachView(this.overlayRef.hostView),this.overlayRef.destroy(),e.shadowRoot&&e.shadowRoot.removeChild(e.shadowRoot.childNodes[0]),e.remove(),this.overlayRef=void 0}}setDarkMode(e){try{this.darkMode=e,this.overlayRef&&(this.overlayRef.instance.darkMode=e)}catch(t){this.loggingService.catch("Error in FlockOverlayService setDarkMode: ",t)}}};c.\u0275fac=function(t){return new(t||c)(a(j),a(X),a(M),a(g))},c.\u0275prov=v({token:c,factory:c.\u0275fac,providedIn:"root"});let n=c;return n})();var Te=(()=>{let c=class c{constructor(e,t,r,i,o){this.authService=e,this.domService=t,this.loggingService=r,this.flockSessionService=i,this.flockOverlayService=o,this.flockLeader$=new p({userId:"",name:""}),this.flockMode$=new p(!1),this.currentFlockUser=null,this.localScrollData=[],this.domSubscriptions=[],this.followOverlayCreated=!1,this.leaderOverlayCreated=!1,this.windowFocused=!0,this.tabFocused=!0,this.useHistoryAPI=!0,this.disableDefaultNavigation=!1;try{this.flockLeader$.subscribe(s=>{let{userId:l,name:d}=s,O=l;if(this.provisionFollowUser(),O&&this.currentFlockUser&&this.currentFlockUser.snippylyId)if(this.currentFlockUser.sessionId){if(this.currentFlockUser.snippylyId&&this.currentFlockUser.isLeader){this.flockSessionService.swapLeader(this.currentFlockUser.snippylyId,O,d);return}this.removeCurrentUserFromSession()}else this.flockSessionService.provisionFlockSession(O,d,this.currentFlockUser.snippylyId)},s=>{this.loggingService.catch("Error in FlockService flockLeader$ subscription: ",s)}),this.flockSessionService.currentSession$.subscribe(s=>{if(s!==null){if(this.currentFlockUser&&(this.currentFlockUser.sessionId===null||this.currentFlockUser.sessionId===void 0)&&this.currentFlockUser.snippylyId&&(this.currentFlockUser.sessionId=s.id,this.flockSessionService.updateRemoteFlockUser(this.currentFlockUser.snippylyId,this.currentFlockUser)),this.currentFlockUser&&!this.currentFlockUser.isLeader&&!this.followOverlayCreated&&(this.leaderOverlayCreated&&(this.flockOverlayService.removeOverlay(),this.leaderOverlayCreated=!1),this.followOverlayCreated=!0,this.flockOverlayService.createFollowOverlay(s.leaderName,()=>{this.removeCurrentUserFromSession(),this.followOverlayCreated=!1})),this.currentFlockUser&&this.currentFlockUser.isLeader&&!this.leaderOverlayCreated&&(this.followOverlayCreated&&(this.flockOverlayService.removeOverlay(),this.followOverlayCreated=!1),this.leaderOverlayCreated=!0,this.flockOverlayService.createLeaderOverlay(()=>{this.removeCurrentUserFromSession(),this.leaderOverlayCreated=!1})),this.currentFlockUser&&!this.currentFlockUser.isLeader&&s.actionStack){let l=s.actionStack[0];l&&this.currentFlockUser.lastProcessedActionTimestamp!==l.timestamp&&this.processAction(l)}if(this.currentFlockUser&&!this.currentFlockUser.isLeader&&this.followOverlayCreated&&this.flockOverlayService.getLeaderName()!==null&&s.leaderName!==this.flockOverlayService.getLeaderName()&&this.flockOverlayService.changeLeaderName(s.leaderName),this.currentFlockUser&&this.currentFlockUser.isLeader){let l=k();if(s.pageInfo){if(l&&l.url!==s.pageInfo.url){let d=new u;d.type=h.NAVIGATE,this.flockSessionService.addActionToStack(s.id,d)}}else{this.flockSessionService.updateSession(s.id,{pageInfo:l});let d=new u;d.type=h.NAVIGATE,this.flockSessionService.addActionToStack(s.id,d)}}}else this.currentFlockUser&&this.leaderOverlayCreated&&(this.flockOverlayService.removeOverlay(),this.leaderOverlayCreated=!1),this.currentFlockUser&&this.followOverlayCreated&&(this.flockOverlayService.removeOverlay(),this.followOverlayCreated=!1)}),this.flockSessionService.currentUser$.subscribe(s=>{if(s!==null&&(this.currentFlockUser&&this.currentFlockUser.isLeader!==s.isLeader&&(this.domSubscriptions.forEach(l=>l.unsubscribe()),this.domSubscriptions=[]),this.currentFlockUser=s,s.sessionId&&this.domSubscriptions.length===0))if(s.isLeader){if(!this.tabFocused||!this.windowFocused)return;this.subscribeToLeaderDOMEvents()}else this.subscribeToFollowerDOMEvents()}),A([this.authService.getUser$(),this.getFlockMode$()]).subscribe(([s,l])=>{s&&s.userSnippylyId&&l?this.flockSessionService.startCurrentFlockUserSubscription(s):this.flockSessionService.stopCurrentFlockUserSubscription()})}catch(s){this.loggingService.catch("Error in FlockService constructor: ",s)}}provisionFollowUser(){try{if(this.currentFlockUser===null){let e=this.authService.getUser();e&&e.userSnippylyId&&(this.currentFlockUser=new E,this.currentFlockUser.snippylyId=e.userSnippylyId)}}catch(e){this.loggingService.catch("Error in FlockService provisionFollowUser: ",e)}}startFollowingUser(e,t){try{if(this.provisionFollowUser(),e&&this.currentFlockUser&&this.currentFlockUser.snippylyId){if(this.currentFlockUser.sessionId){if(this.currentFlockUser.snippylyId&&this.currentFlockUser.isLeader){this.flockSessionService.swapLeader(this.currentFlockUser.snippylyId,e,t);return}this.removeCurrentUserFromSession()}this.flockSessionService.provisionFlockSession(e,t,this.currentFlockUser.snippylyId)}}catch(r){this.loggingService.catch("Error in FlockService startFollowingUser: ",r)}}stopFollowingUser(){try{this.removeCurrentUserFromSession()}catch(e){this.loggingService.catch("Error in FlockService stopFollowingUser: ",e)}}subscribeToUrlChanges(){try{if(this.useHistoryAPI){let e=window.history.pushState,t=window.history.replaceState;window.history.pushState=(...r)=>{e.apply(window.history,r),this.onUrlChange()},window.history.replaceState=(...r)=>{t.apply(window.history,r),this.onUrlChange()},this.domSubscriptions.push({unsubscribe:()=>{window.history.pushState=e,window.history.replaceState=t}}),this.domSubscriptions.push(y(window,"popstate").subscribe(()=>{this.onUrlChange()}))}}catch(e){this.loggingService.catch("Error in FlockService subscribeToUrlChanges: ",e)}}onUrlChange(){try{if(this.currentFlockUser&&this.currentFlockUser.sessionId&&this.currentFlockUser.isLeader){let e=new u;e.type=h.NAVIGATE,this.flockSessionService.addActionToStack(this.currentFlockUser.sessionId,e)}}catch(e){this.loggingService.catch("Error in FlockService onUrlChange: ",e)}}processAction(e){try{switch(e.type){case h.CLICK:this.clickUserElement(e.data);break;case h.HOVER:this.scrollToHoveredElement(e.data);break;case h.SCROLL:this.scrollToFollowedUser(e.data);break;case h.NAVIGATE:this.checkMatchingUrl(e.pageInfo);break}this.currentFlockUser&&this.currentFlockUser.snippylyId&&this.flockSessionService.updateRemoteFlockUser(this.currentFlockUser.snippylyId,{lastProcessedActionTimestamp:e.timestamp})}catch(t){this.loggingService.catch("Error in FlockService processAction: ",t)}}subscribeToLeaderDOMEvents(){try{this.domSubscriptions.length>0&&(this.domSubscriptions.forEach(e=>e.unsubscribe()),this.domSubscriptions=[]),this.domSubscriptions.push(y(window,"mouseover").pipe(C(500)).subscribe(e=>{let t=e?.target;if(t){let r=window.getComputedStyle(t);if(r.position==="fixed"||r.position==="sticky"||t.hasAttribute(m.ATTRIBUTES.VELT_IGNORE))return;t=L(t,{x:e.clientX,y:e.clientY}),this.updateHoveredElement(t)}})),this.domSubscriptions.push(this.domService.onWindowClick$().subscribe(e=>{let t=e?.target;if(t){if(t.hasAttribute(m.ATTRIBUTES.VELT_IGNORE))return;this.updateClickedElement(t)}})),this.subscribeToUrlChanges(),this.subscribeToScrollables()}catch(e){this.loggingService.catch("Error in FlockService subscribeToLeaderDOMEvents: ",e)}}subscribeToFollowerDOMEvents(){}updateClickedElement(e){try{if(this.currentFlockUser&&this.currentFlockUser.sessionId){let t=this.domService.getXPath(e),r=T(e),i=this.domService.getXPath(r),o={id:Math.random().toString(36).substring(2),xpath:t,parentXpath:i},s=new u;s.type=h.CLICK,s.data=o,this.flockSessionService.addActionToStack(this.currentFlockUser.sessionId,s)}}catch(t){this.loggingService.catch("Error in FlockService updateClickedElement: ",t)}}updateHoveredElement(e){try{if(this.currentFlockUser&&this.currentFlockUser.sessionId){let t=this.domService.getXPath(e),r=T(e),i=this.domService.getXPath(r),o={id:Math.random().toString(36).substring(2),xpath:t,parentXpath:i},s=new u;s.type=h.HOVER,s.data=o,this.flockSessionService.addActionToStack(this.currentFlockUser.sessionId,s)}}catch(t){this.loggingService.catch("Error in FlockService updateHoveredElement: ",t)}}subscribeToScrollables(){try{let e=z();e.push(document),e?.forEach(t=>{this.domSubscriptions.push(y(t,"scroll").pipe(C(100)).subscribe(r=>{this.currentFlockUser&&this.currentFlockUser.sessionId&&this.currentFlockUser.isLeader&&this.updateScrollPositionOfElement(t)}))})}catch(e){this.loggingService.catch("Error in FlockService getScrollableElements: ",e)}}updateScrollPositionOfElement(e){try{if(this.currentFlockUser&&this.currentFlockUser.sessionId){let t=new U("","");if(e===document){let o=B();if(o){let s=L(o);s&&(t.targetXpath=this.domService.getXPath(s))}t.xpath=""}else{let o=G(e);t.targetXpath=this.domService.getXPath(o),t.xpath=this.domService.getXPath(e)}let r=!1,i=!1;if(this.localScrollData.forEach((o,s)=>{o.xpath===o.xpath&&(t.targetXpath!==o.targetXpath&&(r=!0),this.localScrollData[s]=Object.assign(o,t),i=!0)}),i||this.localScrollData.push(t),r||!i){let o=new u;o.type=h.SCROLL,o.data=t,this.flockSessionService.addActionToStack(this.currentFlockUser.sessionId,o)}}}catch(t){this.loggingService.catch("Error in FlockService calculateScrollPositionOfAnElement: ",t)}}enableFlockMode(e){try{if(this.flockMode$.next(!0),e){let{useHistoryAPI:t,onNavigate:r,disableDefaultNavigation:i,darkMode:o}=e;t!==void 0&&(this.useHistoryAPI=t),r!==void 0&&typeof r=="function"&&(this.onNavigate=r),i!==void 0&&(this.disableDefaultNavigation=i),this.flockOverlayService.setDarkMode(o)}}catch(t){this.loggingService.catch("Error in FlockService enableFlockMode: ",t)}}disableFlockMode(){try{this.flockMode$.next(!1),this.onNavigateEmitter=void 0,this.useHistoryAPI=!0,this.onNavigate=void 0}catch(e){this.loggingService.catch("Error in FlockService disableFlockMode: ",e)}}setDisableFlockNavigation(e){try{this.disableDefaultNavigation=e}catch(t){this.loggingService.catch("Error in FlockService setDisableFlockNavigation: ",t)}}getFlockMode$(){return this.flockMode$.asObservable()}getFlockMode(){return this.flockMode$.value}setNavigateEmitter(e){try{this.onNavigateEmitter=e}catch(t){this.loggingService.catch("Error in FlockService setNavigateEmitter: ",t)}}setTabFocused(e){try{if(this.tabFocused=e,!this.currentFlockUser)return;this.currentFlockUser.isLeader&&this.currentFlockUser.sessionId&&(this.tabFocused&&this.domSubscriptions.length===0?this.subscribeToLeaderDOMEvents():!this.tabFocused&&this.domSubscriptions.length>0&&(this.domSubscriptions.forEach(r=>{r.unsubscribe()}),this.domSubscriptions=[]))}catch(t){this.loggingService.catch("Error in FlockService setTabFocused: ",t)}}setWindowFocused(e){try{if(this.windowFocused=e,!this.currentFlockUser)return;this.currentFlockUser.isLeader&&this.currentFlockUser.sessionId&&(this.windowFocused&&this.domSubscriptions.length===0?this.subscribeToLeaderDOMEvents():!this.windowFocused&&this.domSubscriptions.length>0&&(this.domSubscriptions.forEach(r=>{r.unsubscribe()}),this.domSubscriptions=[]))}catch(t){this.loggingService.catch("Error in FlockService setWindowFocused: ",t)}}setFlockLeader(e,t){try{this.flockLeader$.next({userId:e,name:t})}catch(r){this.loggingService.catch("Error in FlockService setFlockLeader: ",r)}}isInSession(){try{return!!(this.currentFlockUser&&this.currentFlockUser.sessionId)}catch(e){this.loggingService.catch("Error in FlockService isFollowing: ",e)}return!1}removeCurrentUserFromSession(){try{this.domSubscriptions.forEach(e=>e.unsubscribe()),this.domSubscriptions=[],this.currentFlockUser&&(this.currentFlockUser.isLeader?this.currentFlockUser.sessionId&&this.flockSessionService.deleteSession(this.currentFlockUser.sessionId):this.currentFlockUser.snippylyId&&this.flockSessionService.removeFollowerFromCurrentSession(this.currentFlockUser.snippylyId))}catch(e){this.loggingService.catch("Error in FlockService removeCurrentUserFromSession: ",e)}}checkMatchingUrl(e){try{let r=k()?.url,i=e.url;if(r!==i&&i!==void 0){let{url:o,path:s,baseUrl:l}=e;if(this.onNavigate!==void 0&&typeof this.onNavigate=="function"){this.onNavigate({url:o,path:s,baseUrl:l});return}if(this.onNavigateEmitter&&this.onNavigateEmitter.emit({url:o,path:s,baseUrl:l}),this.disableDefaultNavigation)return;window.location.href=i}}catch(t){this.loggingService.catch("Error in FlockService checkMatchingUrl: ",t)}}scrollToFollowedUser(e){try{if(e.xpath===""){let t=this.domService.getElementFromXPath(e.targetXpath);t&&F(t)}else{let t=this.domService.getElementFromXPath(e.xpath),r=this.domService.getElementFromXPath(e.targetXpath);t&&r&&(F(t),R(t,r))}}catch(t){this.loggingService.catch("Error in FlockService scrollToFollowedUser: ",t)}}clickUserElement(e){try{let t=this.domService.getElementFromXPath(e.xpath);t&&this.lastClickedElement?.id!==e.id&&(t?.click(),this.lastClickedElement=e)}catch(t){this.loggingService.catch("Error in FlockService clickUserElement: ",t)}}scrollToHoveredElement(e){try{let t=this.domService.getElementFromXPath(e.xpath);if(t&&e.parentXpath)if(e.parentXpath==="/html")F(t);else{let r=this.domService.getElementFromXPath(e.parentXpath);r&&R(r,t,!0)}}catch(t){this.loggingService.catch("Error in FlockService clickUserElement: ",t)}}};c.\u0275fac=function(t){return new(t||c)(a(b),a(J),a(g),a(Z),a(_))},c.\u0275prov=v({token:c,factory:c.\u0275fac,providedIn:"root"});let n=c;return n})();export{Te as a};
1
+ import{a as N}from"./chunk-ENIVQSM6.js";import{$ as v,$g as G,Ci as K,E as P,G as x,Hi as W,I as C,J as f,Ma as j,Qi as Y,Te as m,Wd as $,Yd as V,Zg as z,_g as L,ag as H,ah as B,bb as X,bh as R,ca as a,ch as F,l as p,la as M,pi as g,r as D,sg as T,ui as J,vi as b,w as A,xg as k,z as y}from"./chunk-TY3WZ4Q4.js";var h=(function(n){return n.CLICK="click",n.HOVER="hover",n.SCROLL="scroll",n.NAVIGATE="navigate",n})(h||{}),u=class{constructor(){this.type=h.HOVER,this.data=null,this.pageInfo=k(),this.timestamp=Date.now()}},U=class{constructor(c,w){this.targetXpath=c,this.xpath=w}};var E=class{constructor(){this.sessionId=null,this.isLeader=!1,this.lastProcessedActionTimestamp=null}};var S=class{constructor(c){this.snippylyId=c,this.joinTimestamp=Date.now()}};var I=class{constructor(c,w,e){this.followers=[],this.actionStack=[],this.id=H(),this.leaderId=c,this.leaderName=w,this.followers.push(new S(e))}};var Z=(()=>{let c=class c{constructor(e,t,r,i,o){this.databaseService=e,this.docService=t,this.loggingService=r,this.authService=i,this.commonDbService=o,this.currentUser$=new p(null),this.currentSession$=new p(null);try{this.databaseService.getDb().pipe(P(s=>!!s),f(1)).subscribe(s=>{s&&(this.db=s)},s=>{this.loggingService.catch("Error in FlockSessionService getDb subscription: ",s)}),this.authService.getUser$().subscribe(s=>{s&&s.userSnippylyId&&(this.user=s)})}catch(s){this.loggingService.catch("Error in FlockSessionService constructor: ",s)}}startCurrentFlockUserSubscription(e){try{this.currentUserSub?.unsubscribe(),e&&e.userSnippylyId&&(this.user=e,this.subscribeToCurrentFlockUser(e?.userSnippylyId))}catch(t){this.loggingService.catch("Error in FlockSessionService startCurrentFlockUserSubscription: ",t)}}stopCurrentFlockUserSubscription(){try{this.currentUserSub?.unsubscribe()}catch(e){this.loggingService.catch("Error in FlockSessionService stopCurrentFlockUserSubscription: ",e)}}provisionFlockSession(e,t,r){try{let i=this.docService.getDocumentPaths();i&&this.db&&this.commonDbService.dbListener({feature:"flockUser",properties:{documentId:i?.documentId,organizationId:i?.organizationId,id:e,skipFirestore:!0}}).pipe(f(1)).subscribe(o=>{o?.data&&o?.data?.sessionId?this.subscribeToCurrentSession(o?.data?.sessionId,r):this.createFlockSession(e,t,r)})}catch(i){this.loggingService.catch("Error in FlockSessionService provisionFlockSession: ",i)}return null}swapLeader(e,t,r){try{if(this.updateRemoteFlockUser(e,{isLeader:!1}),this.updateRemoteFlockUser(t,{isLeader:!0}),this.currentSession){this.currentSession.leaderId=t,this.currentSession.leaderName=r,this.currentSession.followers.push(new S(e));let i=this.currentSession.followers.findIndex(o=>o.snippylyId===t);i>-1&&this.currentSession.followers.splice(i,1),this.updateSession(this.currentSession.id,this.currentSession)}}catch(i){this.loggingService.catch("Error in FlockSessionService swapLeader: ",i)}}createFlockSession(e,t,r){try{let i=new I(e,t,r);return this.updateRemoteFlockUser(e,{snippylyId:e,sessionId:i.id,isLeader:!0}),this.updateSession(i.id,i),this.subscribeToCurrentSession(i.id),i.id}catch(i){this.loggingService.catch("Error in FlockSessionService createFlockSession: ",i)}return null}removeFollowerFromCurrentSession(e){try{if(this.currentSession){this.updateRemoteFlockUser(e,{sessionId:null,lastProcessedActionTimestamp:null});let t=this.currentSession.followers.findIndex(r=>r.snippylyId===e);if(t>-1){if(this.currentSession.followers.splice(t,1),this.currentSession.followers.length===0){this.deleteSession(this.currentSession.id);return}this.updateSession(this.currentSession.id,this.currentSession),this.user&&this.user.userSnippylyId&&this.user.userSnippylyId===e&&(this.sessionSub?.unsubscribe(),this.currentSession=void 0,this.currentSession$?.next(null))}}}catch(t){this.loggingService.catch("Error in FlockSessionService removeFollowerFromSession: ",t)}}updateRemoteFlockUser(e,t={}){try{if(!e)return;let r=this.docService.getDocumentPaths();for(let i in t)t.hasOwnProperty(i)&&t[i]===void 0&&delete t[i];r&&this.db&&this.commonDbService.updateData({feature:"flockUser",properties:{documentId:r?.documentId??"",organizationId:r?.organizationId??"",id:e,skipFirestore:!0},data:JSON.parse(JSON.stringify(t))})}catch(r){this.loggingService.catch("Error in FlockSessionService updateRemoteFlockUser: ",r)}}subscribeToCurrentSession(e,t=void 0){try{let r=this.docService.getDocumentPaths();r&&this.db&&(this.sessionSub&&this.sessionSub.unsubscribe(),this.sessionSub=this.commonDbService.dbListener({feature:"flockSession",properties:{documentId:r?.documentId,organizationId:r?.organizationId,id:e,skipFirestore:!0}}).subscribe(i=>{i?.data&&typeof i?.data=="object"&&Object.keys(i?.data)?.length>0?(this.currentSession=i?.data,t!==void 0&&this.currentSession?.followers.findIndex(o=>o.snippylyId===t)===-1&&(this.currentSession.followers.push(new S(t)),this.updateSession(this.currentSession.id,this.currentSession)),this.currentSession$.next(this.currentSession??null)):(this.currentSession=void 0,this.currentSession$.next(null))}))}catch(r){this.loggingService.catch("Error in FlockSessionService subscribeToCurrentSession: ",r)}}subscribeToCurrentFlockUser(e){try{let t=this.docService.getDocumentPaths();t&&this.db&&(this.currentUserSub&&this.currentUserSub.unsubscribe(),this.currentUserSub=this.commonDbService.dbListener({feature:"flockUser",properties:{documentId:t?.documentId,organizationId:t?.organizationId,id:e,skipFirestore:!0}}).pipe(x(r=>(this.loggingService.catch("Error in FlockSessionService subscribeToCurrentFlockUser: ",r),D(null)))).subscribe(r=>{r?.data&&typeof r?.data=="object"&&Object.keys(r?.data)?.length>0&&(this.currentUser$.next(r?.data),r?.data?.sessionId&&this.subscribeToCurrentSession(r?.data?.sessionId))},r=>{this.loggingService.catch("Error in FlockSessionService subscribeToCurrentFlockUser subscription: ",r)}))}catch(t){this.loggingService.catch("Error in FlockSessionService subscribeToCurrentFlockUser: ",t)}}updateSession(e,t={}){try{if(!e)return;let r=this.docService.getDocumentPaths();for(let i in t)t.hasOwnProperty(i)&&t[i]===void 0&&delete t[i];r&&this.db&&this.commonDbService.updateData({feature:"flockSession",properties:{documentId:r?.documentId??"",organizationId:r?.organizationId??"",id:e,skipFirestore:!0},data:JSON.parse(JSON.stringify(t))})}catch(r){this.loggingService.catch("Error in FlockSessionService updateSession: ",r)}}deleteSession(e){try{let t=this.docService.getDocumentPaths();t&&this.db&&(this.commonDbService.deleteData({feature:"flockSession",properties:{documentId:t?.documentId??"",organizationId:t?.organizationId??"",id:e,skipFirestore:!0}}),this.currentSession&&e===this.currentSession.id&&(this.updateRemoteFlockUser(this.currentSession.leaderId,{sessionId:null,isLeader:!1,lastProcessedActionTimestamp:null}),this.currentSession.followers.forEach(r=>{this.updateRemoteFlockUser(r.snippylyId,{sessionId:null,lastProcessedActionTimestamp:null})}),this.currentSession=void 0,this.currentSession$.next(null),this.sessionSub?.unsubscribe()))}catch(t){this.loggingService.catch("Error in FlockSessionService deleteSession: ",t)}}addActionToStack(e,t){try{t=t&&JSON.parse(JSON.stringify(t));let r=this.docService.getDocumentPaths();if(r&&this.db&&e){let i=$(this.db,`${r.flock}/sessions/${e}/actionStack`);V(i,o=>o?(o.unshift(t),o.slice(0,5)):[t]),t.type===h.NAVIGATE&&this.updateSession(e,{pageInfo:t.pageInfo})}}catch(r){this.loggingService.catch("Error in FlockSessionService addActionToStack: ",r)}}};c.\u0275fac=function(t){return new(t||c)(a(K),a(W),a(g),a(b),a(Y))},c.\u0275prov=v({token:c,factory:c.\u0275fac,providedIn:"root"});let n=c;return n})();var _=(()=>{let c=class c{constructor(e,t,r,i){this.componentFactoryResolver=e,this.applicationRef=t,this.injector=r,this.loggingService=i,this.darkMode=!1}createFollowOverlay(e,t){try{let i=this.componentFactoryResolver.resolveComponentFactory(N).create(this.injector);i.instance.setLeaderName(e),i.instance.closeOverlayEvent.pipe(f(1)).subscribe(()=>{this.removeOverlay(),t()}),this.applicationRef.attachView(i.hostView),this.overlayRef=i,this.overlayRef.instance.darkMode=this.darkMode;let o=this.overlayRef.location.nativeElement;o.id="snippyly-follow-overlay",o.setAttribute(m.ATTRIBUTES.VELT_IGNORE,""),document.body.appendChild(o)}catch(r){this.loggingService.catch("Error in FlockOverlayService createFollowOverlay: ",r)}}createLeaderOverlay(e){let r=this.componentFactoryResolver.resolveComponentFactory(N).create(this.injector);r.instance.setType("leading"),r.instance.closeOverlayEvent.pipe(f(1)).subscribe(()=>{this.removeOverlay(),e()}),this.applicationRef.attachView(r.hostView),this.overlayRef=r,this.overlayRef.instance.darkMode=this.darkMode;let i=this.overlayRef.location.nativeElement;i.id="snippyly-follow-overlay",i.setAttribute(m.ATTRIBUTES.VELT_IGNORE,""),document.body.appendChild(i)}changeLeaderName(e){this.overlayRef&&this.overlayRef.instance.setLeaderName(e)}getLeaderName(){return this.overlayRef?this.overlayRef.instance.getLeaderName():null}removeOverlay(){if(this.overlayRef){let e=this.overlayRef.location.nativeElement;this.applicationRef.detachView(this.overlayRef.hostView),this.overlayRef.destroy(),e.shadowRoot&&e.shadowRoot.removeChild(e.shadowRoot.childNodes[0]),e.remove(),this.overlayRef=void 0}}setDarkMode(e){try{this.darkMode=e,this.overlayRef&&(this.overlayRef.instance.darkMode=e)}catch(t){this.loggingService.catch("Error in FlockOverlayService setDarkMode: ",t)}}};c.\u0275fac=function(t){return new(t||c)(a(j),a(X),a(M),a(g))},c.\u0275prov=v({token:c,factory:c.\u0275fac,providedIn:"root"});let n=c;return n})();var Te=(()=>{let c=class c{constructor(e,t,r,i,o){this.authService=e,this.domService=t,this.loggingService=r,this.flockSessionService=i,this.flockOverlayService=o,this.flockLeader$=new p({userId:"",name:""}),this.flockMode$=new p(!1),this.currentFlockUser=null,this.localScrollData=[],this.domSubscriptions=[],this.followOverlayCreated=!1,this.leaderOverlayCreated=!1,this.windowFocused=!0,this.tabFocused=!0,this.useHistoryAPI=!0,this.disableDefaultNavigation=!1;try{this.flockLeader$.subscribe(s=>{let{userId:l,name:d}=s,O=l;if(this.provisionFollowUser(),O&&this.currentFlockUser&&this.currentFlockUser.snippylyId)if(this.currentFlockUser.sessionId){if(this.currentFlockUser.snippylyId&&this.currentFlockUser.isLeader){this.flockSessionService.swapLeader(this.currentFlockUser.snippylyId,O,d);return}this.removeCurrentUserFromSession()}else this.flockSessionService.provisionFlockSession(O,d,this.currentFlockUser.snippylyId)},s=>{this.loggingService.catch("Error in FlockService flockLeader$ subscription: ",s)}),this.flockSessionService.currentSession$.subscribe(s=>{if(s!==null){if(this.currentFlockUser&&(this.currentFlockUser.sessionId===null||this.currentFlockUser.sessionId===void 0)&&this.currentFlockUser.snippylyId&&(this.currentFlockUser.sessionId=s.id,this.flockSessionService.updateRemoteFlockUser(this.currentFlockUser.snippylyId,this.currentFlockUser)),this.currentFlockUser&&!this.currentFlockUser.isLeader&&!this.followOverlayCreated&&(this.leaderOverlayCreated&&(this.flockOverlayService.removeOverlay(),this.leaderOverlayCreated=!1),this.followOverlayCreated=!0,this.flockOverlayService.createFollowOverlay(s.leaderName,()=>{this.removeCurrentUserFromSession(),this.followOverlayCreated=!1})),this.currentFlockUser&&this.currentFlockUser.isLeader&&!this.leaderOverlayCreated&&(this.followOverlayCreated&&(this.flockOverlayService.removeOverlay(),this.followOverlayCreated=!1),this.leaderOverlayCreated=!0,this.flockOverlayService.createLeaderOverlay(()=>{this.removeCurrentUserFromSession(),this.leaderOverlayCreated=!1})),this.currentFlockUser&&!this.currentFlockUser.isLeader&&s.actionStack){let l=s.actionStack[0];l&&this.currentFlockUser.lastProcessedActionTimestamp!==l.timestamp&&this.processAction(l)}if(this.currentFlockUser&&!this.currentFlockUser.isLeader&&this.followOverlayCreated&&this.flockOverlayService.getLeaderName()!==null&&s.leaderName!==this.flockOverlayService.getLeaderName()&&this.flockOverlayService.changeLeaderName(s.leaderName),this.currentFlockUser&&this.currentFlockUser.isLeader){let l=k();if(s.pageInfo){if(l&&l.url!==s.pageInfo.url){let d=new u;d.type=h.NAVIGATE,this.flockSessionService.addActionToStack(s.id,d)}}else{this.flockSessionService.updateSession(s.id,{pageInfo:l});let d=new u;d.type=h.NAVIGATE,this.flockSessionService.addActionToStack(s.id,d)}}}else this.currentFlockUser&&this.leaderOverlayCreated&&(this.flockOverlayService.removeOverlay(),this.leaderOverlayCreated=!1),this.currentFlockUser&&this.followOverlayCreated&&(this.flockOverlayService.removeOverlay(),this.followOverlayCreated=!1)}),this.flockSessionService.currentUser$.subscribe(s=>{if(s!==null&&(this.currentFlockUser&&this.currentFlockUser.isLeader!==s.isLeader&&(this.domSubscriptions.forEach(l=>l.unsubscribe()),this.domSubscriptions=[]),this.currentFlockUser=s,s.sessionId&&this.domSubscriptions.length===0))if(s.isLeader){if(!this.tabFocused||!this.windowFocused)return;this.subscribeToLeaderDOMEvents()}else this.subscribeToFollowerDOMEvents()}),A([this.authService.getUser$(),this.getFlockMode$()]).subscribe(([s,l])=>{s&&s.userSnippylyId&&l?this.flockSessionService.startCurrentFlockUserSubscription(s):this.flockSessionService.stopCurrentFlockUserSubscription()})}catch(s){this.loggingService.catch("Error in FlockService constructor: ",s)}}provisionFollowUser(){try{if(this.currentFlockUser===null){let e=this.authService.getUser();e&&e.userSnippylyId&&(this.currentFlockUser=new E,this.currentFlockUser.snippylyId=e.userSnippylyId)}}catch(e){this.loggingService.catch("Error in FlockService provisionFollowUser: ",e)}}startFollowingUser(e,t){try{if(this.provisionFollowUser(),e&&this.currentFlockUser&&this.currentFlockUser.snippylyId){if(this.currentFlockUser.sessionId){if(this.currentFlockUser.snippylyId&&this.currentFlockUser.isLeader){this.flockSessionService.swapLeader(this.currentFlockUser.snippylyId,e,t);return}this.removeCurrentUserFromSession()}this.flockSessionService.provisionFlockSession(e,t,this.currentFlockUser.snippylyId)}}catch(r){this.loggingService.catch("Error in FlockService startFollowingUser: ",r)}}stopFollowingUser(){try{this.removeCurrentUserFromSession()}catch(e){this.loggingService.catch("Error in FlockService stopFollowingUser: ",e)}}subscribeToUrlChanges(){try{if(this.useHistoryAPI){let e=window.history.pushState,t=window.history.replaceState;window.history.pushState=(...r)=>{e.apply(window.history,r),this.onUrlChange()},window.history.replaceState=(...r)=>{t.apply(window.history,r),this.onUrlChange()},this.domSubscriptions.push({unsubscribe:()=>{window.history.pushState=e,window.history.replaceState=t}}),this.domSubscriptions.push(y(window,"popstate").subscribe(()=>{this.onUrlChange()}))}}catch(e){this.loggingService.catch("Error in FlockService subscribeToUrlChanges: ",e)}}onUrlChange(){try{if(this.currentFlockUser&&this.currentFlockUser.sessionId&&this.currentFlockUser.isLeader){let e=new u;e.type=h.NAVIGATE,this.flockSessionService.addActionToStack(this.currentFlockUser.sessionId,e)}}catch(e){this.loggingService.catch("Error in FlockService onUrlChange: ",e)}}processAction(e){try{switch(e.type){case h.CLICK:this.clickUserElement(e.data);break;case h.HOVER:this.scrollToHoveredElement(e.data);break;case h.SCROLL:this.scrollToFollowedUser(e.data);break;case h.NAVIGATE:this.checkMatchingUrl(e.pageInfo);break}this.currentFlockUser&&this.currentFlockUser.snippylyId&&this.flockSessionService.updateRemoteFlockUser(this.currentFlockUser.snippylyId,{lastProcessedActionTimestamp:e.timestamp})}catch(t){this.loggingService.catch("Error in FlockService processAction: ",t)}}subscribeToLeaderDOMEvents(){try{this.domSubscriptions.length>0&&(this.domSubscriptions.forEach(e=>e.unsubscribe()),this.domSubscriptions=[]),this.domSubscriptions.push(y(window,"mouseover").pipe(C(500)).subscribe(e=>{let t=e?.target;if(t){let r=window.getComputedStyle(t);if(r.position==="fixed"||r.position==="sticky"||t.hasAttribute(m.ATTRIBUTES.VELT_IGNORE))return;t=L(t,{x:e.clientX,y:e.clientY}),this.updateHoveredElement(t)}})),this.domSubscriptions.push(this.domService.onWindowClick$().subscribe(e=>{let t=e?.target;if(t){if(t.hasAttribute(m.ATTRIBUTES.VELT_IGNORE))return;this.updateClickedElement(t)}})),this.subscribeToUrlChanges(),this.subscribeToScrollables()}catch(e){this.loggingService.catch("Error in FlockService subscribeToLeaderDOMEvents: ",e)}}subscribeToFollowerDOMEvents(){}updateClickedElement(e){try{if(this.currentFlockUser&&this.currentFlockUser.sessionId){let t=this.domService.getXPath(e),r=T(e),i=this.domService.getXPath(r),o={id:Math.random().toString(36).substring(2),xpath:t,parentXpath:i},s=new u;s.type=h.CLICK,s.data=o,this.flockSessionService.addActionToStack(this.currentFlockUser.sessionId,s)}}catch(t){this.loggingService.catch("Error in FlockService updateClickedElement: ",t)}}updateHoveredElement(e){try{if(this.currentFlockUser&&this.currentFlockUser.sessionId){let t=this.domService.getXPath(e),r=T(e),i=this.domService.getXPath(r),o={id:Math.random().toString(36).substring(2),xpath:t,parentXpath:i},s=new u;s.type=h.HOVER,s.data=o,this.flockSessionService.addActionToStack(this.currentFlockUser.sessionId,s)}}catch(t){this.loggingService.catch("Error in FlockService updateHoveredElement: ",t)}}subscribeToScrollables(){try{let e=z();e.push(document),e?.forEach(t=>{this.domSubscriptions.push(y(t,"scroll").pipe(C(100)).subscribe(r=>{this.currentFlockUser&&this.currentFlockUser.sessionId&&this.currentFlockUser.isLeader&&this.updateScrollPositionOfElement(t)}))})}catch(e){this.loggingService.catch("Error in FlockService getScrollableElements: ",e)}}updateScrollPositionOfElement(e){try{if(this.currentFlockUser&&this.currentFlockUser.sessionId){let t=new U("","");if(e===document){let o=B();if(o){let s=L(o);s&&(t.targetXpath=this.domService.getXPath(s))}t.xpath=""}else{let o=G(e);t.targetXpath=this.domService.getXPath(o),t.xpath=this.domService.getXPath(e)}let r=!1,i=!1;if(this.localScrollData.forEach((o,s)=>{o.xpath===o.xpath&&(t.targetXpath!==o.targetXpath&&(r=!0),this.localScrollData[s]=Object.assign(o,t),i=!0)}),i||this.localScrollData.push(t),r||!i){let o=new u;o.type=h.SCROLL,o.data=t,this.flockSessionService.addActionToStack(this.currentFlockUser.sessionId,o)}}}catch(t){this.loggingService.catch("Error in FlockService calculateScrollPositionOfAnElement: ",t)}}enableFlockMode(e){try{if(this.flockMode$.next(!0),e){let{useHistoryAPI:t,onNavigate:r,disableDefaultNavigation:i,darkMode:o}=e;t!==void 0&&(this.useHistoryAPI=t),r!==void 0&&typeof r=="function"&&(this.onNavigate=r),i!==void 0&&(this.disableDefaultNavigation=i),this.flockOverlayService.setDarkMode(o)}}catch(t){this.loggingService.catch("Error in FlockService enableFlockMode: ",t)}}disableFlockMode(){try{this.flockMode$.next(!1),this.onNavigateEmitter=void 0,this.useHistoryAPI=!0,this.onNavigate=void 0}catch(e){this.loggingService.catch("Error in FlockService disableFlockMode: ",e)}}setDisableFlockNavigation(e){try{this.disableDefaultNavigation=e}catch(t){this.loggingService.catch("Error in FlockService setDisableFlockNavigation: ",t)}}getFlockMode$(){return this.flockMode$.asObservable()}getFlockMode(){return this.flockMode$.value}setNavigateEmitter(e){try{this.onNavigateEmitter=e}catch(t){this.loggingService.catch("Error in FlockService setNavigateEmitter: ",t)}}setTabFocused(e){try{if(this.tabFocused=e,!this.currentFlockUser)return;this.currentFlockUser.isLeader&&this.currentFlockUser.sessionId&&(this.tabFocused&&this.domSubscriptions.length===0?this.subscribeToLeaderDOMEvents():!this.tabFocused&&this.domSubscriptions.length>0&&(this.domSubscriptions.forEach(r=>{r.unsubscribe()}),this.domSubscriptions=[]))}catch(t){this.loggingService.catch("Error in FlockService setTabFocused: ",t)}}setWindowFocused(e){try{if(this.windowFocused=e,!this.currentFlockUser)return;this.currentFlockUser.isLeader&&this.currentFlockUser.sessionId&&(this.windowFocused&&this.domSubscriptions.length===0?this.subscribeToLeaderDOMEvents():!this.windowFocused&&this.domSubscriptions.length>0&&(this.domSubscriptions.forEach(r=>{r.unsubscribe()}),this.domSubscriptions=[]))}catch(t){this.loggingService.catch("Error in FlockService setWindowFocused: ",t)}}setFlockLeader(e,t){try{this.flockLeader$.next({userId:e,name:t})}catch(r){this.loggingService.catch("Error in FlockService setFlockLeader: ",r)}}isInSession(){try{return!!(this.currentFlockUser&&this.currentFlockUser.sessionId)}catch(e){this.loggingService.catch("Error in FlockService isFollowing: ",e)}return!1}removeCurrentUserFromSession(){try{this.domSubscriptions.forEach(e=>e.unsubscribe()),this.domSubscriptions=[],this.currentFlockUser&&(this.currentFlockUser.isLeader?this.currentFlockUser.sessionId&&this.flockSessionService.deleteSession(this.currentFlockUser.sessionId):this.currentFlockUser.snippylyId&&this.flockSessionService.removeFollowerFromCurrentSession(this.currentFlockUser.snippylyId))}catch(e){this.loggingService.catch("Error in FlockService removeCurrentUserFromSession: ",e)}}checkMatchingUrl(e){try{let r=k()?.url,i=e.url;if(r!==i&&i!==void 0){let{url:o,path:s,baseUrl:l}=e;if(this.onNavigate!==void 0&&typeof this.onNavigate=="function"){this.onNavigate({url:o,path:s,baseUrl:l});return}if(this.onNavigateEmitter&&this.onNavigateEmitter.emit({url:o,path:s,baseUrl:l}),this.disableDefaultNavigation)return;window.location.href=i}}catch(t){this.loggingService.catch("Error in FlockService checkMatchingUrl: ",t)}}scrollToFollowedUser(e){try{if(e.xpath===""){let t=this.domService.getElementFromXPath(e.targetXpath);t&&F(t)}else{let t=this.domService.getElementFromXPath(e.xpath),r=this.domService.getElementFromXPath(e.targetXpath);t&&r&&(F(t),R(t,r))}}catch(t){this.loggingService.catch("Error in FlockService scrollToFollowedUser: ",t)}}clickUserElement(e){try{let t=this.domService.getElementFromXPath(e.xpath);t&&this.lastClickedElement?.id!==e.id&&(t?.click(),this.lastClickedElement=e)}catch(t){this.loggingService.catch("Error in FlockService clickUserElement: ",t)}}scrollToHoveredElement(e){try{let t=this.domService.getElementFromXPath(e.xpath);if(t&&e.parentXpath)if(e.parentXpath==="/html")F(t);else{let r=this.domService.getElementFromXPath(e.parentXpath);r&&R(r,t,!0)}}catch(t){this.loggingService.catch("Error in FlockService clickUserElement: ",t)}}};c.\u0275fac=function(t){return new(t||c)(a(b),a(J),a(g),a(Z),a(_))},c.\u0275prov=v({token:c,factory:c.\u0275fac,providedIn:"root"});let n=c;return n})();export{Te as a};
@@ -1,4 +1,4 @@
1
- import{$ as y,Ab as vn,Bb as yn,Bc as At,Bi as T,Ci as Un,D as Ct,Db as Et,Dc as In,De as tt,E as D,Eb as Ot,F as bt,Fa as dn,Fb as wt,G as ai,Ga as B,Ha as U,Hf as Rn,Hi as Lt,I as St,Ia as re,Ii as Nn,J as ne,Jb as Cn,Je as Tt,Kb as et,Kf as ui,L as oe,La as be,M as Ji,Na as ae,Oa as Fe,P as en,Pa as Z,Q as tn,Qe as S,Qf as O,Qi as zn,Ra as Le,S as Ce,Sa as li,T as v,Te as je,Tf as Tn,U as he,Ua as W,V as nn,Va as N,W as J,Wa as F,Xc as H,Y as on,Ya as Y,Yc as kt,Za as hn,Zh as it,_ as sn,_a as Dt,_b as Ne,a as p,aa as L,ag as Mn,b as z,ba as A,bb as Ue,ca as R,da as h,db as fe,fa as xe,fe as Dn,g as $,ge as En,h as Q,hf as wn,i as ye,if as An,j as Zi,je as Rt,k as _,l as b,la as E,ma as P,mb as un,n as Qi,na as rn,nb as fn,nf as kn,ni as xt,o as qi,oi as Fn,pa as Pe,pb as pn,pi as te,q as _t,qa as V,qb as gn,qe as On,qi as $e,r as g,rb as mn,rc as bn,s as vt,sa as an,sc as hi,si as Ln,ta as cn,tc as ze,ua as se,uh as fi,v as C,va as ue,vi as Pt,w as Je,wa as k,wb as di,wg as xn,wi as Se,x as yt,xa as ci,xb as _n,xc as Be,xh as Mt,xi as Ve,ya as ln,yc as Sn,yi as Ie,za as It,zc as ee,zh as Pn,zi as Ft}from"./chunk-JWLHBAMV.js";function ce(o,i=0){return Bn(o)?Number(o):arguments.length===2?i:0}function Bn(o){return!isNaN(parseFloat(o))&&!isNaN(Number(o))}function De(o){return o instanceof k?o.nativeElement:o}var jo=new A("cdk-dir-doc",{providedIn:"root",factory:$o});function $o(){return h(P)}var Vo=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;function jn(o){let i=o?.toLowerCase()||"";return i==="auto"&&typeof navigator<"u"&&navigator?.language?Vo.test(navigator.language)?"rtl":"ltr":i==="rtl"?"rtl":"ltr"}var le=(()=>{class o{get value(){return this.valueSignal()}valueSignal=V("ltr");change=new B;constructor(){let e=h(jo,{optional:!0});if(e){let t=e.body?e.body.dir:null,n=e.documentElement?e.documentElement.dir:null;this.valueSignal.set(jn(t||n||"ltr"))}}ngOnDestroy(){this.change.complete()}static \u0275fac=function(t){return new(t||o)};static \u0275prov=y({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();var q=(function(o){return o[o.NORMAL=0]="NORMAL",o[o.NEGATED=1]="NEGATED",o[o.INVERTED=2]="INVERTED",o})(q||{}),Ut,Ee;function Nt(){if(Ee==null){if(typeof document!="object"||!document||typeof Element!="function"||!Element)return Ee=!1,Ee;if(document.documentElement?.style&&"scrollBehavior"in document.documentElement.style)Ee=!0;else{let o=Element.prototype.scrollTo;o?Ee=!/\{\s*\[native code\]\s*\}/.test(o.toString()):Ee=!1}}return Ee}function He(){if(typeof document!="object"||!document)return q.NORMAL;if(Ut==null){let o=document.createElement("div"),i=o.style;o.dir="rtl",i.width="1px",i.overflow="auto",i.visibility="hidden",i.pointerEvents="none",i.position="absolute";let e=document.createElement("div"),t=e.style;t.width="2px",t.height="1px",o.appendChild(e),document.body.appendChild(o),Ut=q.NORMAL,o.scrollLeft===0&&(o.scrollLeft=1,Ut=o.scrollLeft===0?q.NEGATED:q.INVERTED),o.remove()}return Ut}var pe=(()=>{class o{static \u0275fac=function(t){return new(t||o)};static \u0275mod=N({type:o});static \u0275inj=L({})}return o})();var zt=class{};function $n(o){return o&&typeof o.connect=="function"&&!(o instanceof Zi)}var Bt=class extends zt{_data;constructor(i){super(),this._data=i}connect(){return vt(this._data)?this._data:g(this._data)}disconnect(){}},nt=(function(o){return o[o.REPLACED=0]="REPLACED",o[o.INSERTED=1]="INSERTED",o[o.MOVED=2]="MOVED",o[o.REMOVED=3]="REMOVED",o})(nt||{}),pi=new A("_ViewRepeater"),jt=class{viewCacheSize=20;_viewCache=[];applyChanges(i,e,t,n,s){i.forEachOperation((r,a,c)=>{let d,l;if(r.previousIndex==null){let u=()=>t(r,a,c);d=this._insertView(u,c,e,n(r)),l=d?nt.INSERTED:nt.REPLACED}else c==null?(this._detachAndCacheView(a,e),l=nt.REMOVED):(d=this._moveView(a,c,e,n(r)),l=nt.MOVED);s&&s({context:d?.context,operation:l,record:r})})}detach(){for(let i of this._viewCache)i.destroy();this._viewCache=[]}_insertView(i,e,t,n){let s=this._insertViewFromCache(e,t);if(s){s.context.$implicit=n;return}let r=i();return t.createEmbeddedView(r.templateRef,r.context,r.index)}_detachAndCacheView(i,e){let t=e.detach(i);this._maybeCacheView(t,e)}_moveView(i,e,t,n){let s=t.get(i);return t.move(s,e),s.context.$implicit=n,s}_maybeCacheView(i,e){if(this._viewCache.length<this.viewCacheSize)this._viewCache.push(i);else{let t=e.indexOf(i);t===-1?i.destroy():e.remove(t)}}_insertViewFromCache(i,e){let t=this._viewCache.pop();return t&&e.insert(t,i),t||null}};var Ho=["contentWrapper"],Go=["*"],Gn=new A("VIRTUAL_SCROLL_STRATEGY"),gi=class{_scrolledIndexChange=new _;scrolledIndexChange=this._scrolledIndexChange.pipe(oe());_viewport=null;_itemSize;_minBufferPx;_maxBufferPx;constructor(i,e,t){this._itemSize=i,this._minBufferPx=e,this._maxBufferPx=t}attach(i){this._viewport=i,this._updateTotalContentSize(),this._updateRenderedRange()}detach(){this._scrolledIndexChange.complete(),this._viewport=null}updateItemAndBufferSize(i,e,t){t<e,this._itemSize=i,this._minBufferPx=e,this._maxBufferPx=t,this._updateTotalContentSize(),this._updateRenderedRange()}onContentScrolled(){this._updateRenderedRange()}onDataLengthChanged(){this._updateTotalContentSize(),this._updateRenderedRange()}onContentRendered(){}onRenderedOffsetChanged(){}scrollToIndex(i,e){this._viewport&&this._viewport.scrollToOffset(i*this._itemSize,e)}_updateTotalContentSize(){this._viewport&&this._viewport.setTotalContentSize(this._viewport.getDataLength()*this._itemSize)}_updateRenderedRange(){if(!this._viewport)return;let i=this._viewport.getRenderedRange(),e={start:i.start,end:i.end},t=this._viewport.getViewportSize(),n=this._viewport.getDataLength(),s=this._viewport.measureScrollOffset(),r=this._itemSize>0?s/this._itemSize:0;if(e.end>n){let c=Math.ceil(t/this._itemSize),d=Math.max(0,Math.min(r,n-c));r!=d&&(r=d,s=d*this._itemSize,e.start=Math.floor(r)),e.end=Math.max(0,Math.min(n,e.start+c))}let a=s-e.start*this._itemSize;if(a<this._minBufferPx&&e.start!=0){let c=Math.ceil((this._maxBufferPx-a)/this._itemSize);e.start=Math.max(0,e.start-c),e.end=Math.min(n,Math.ceil(r+(t+this._minBufferPx)/this._itemSize))}else{let c=e.end*this._itemSize-(s+t);if(c<this._minBufferPx&&e.end!=n){let d=Math.ceil((this._maxBufferPx-c)/this._itemSize);d>0&&(e.end=Math.min(n,e.end+d),e.start=Math.max(0,Math.floor(r-this._minBufferPx/this._itemSize)))}}this._viewport.setRenderedRange(e),this._viewport.setRenderedContentOffset(Math.round(this._itemSize*e.start)),this._scrolledIndexChange.next(Math.floor(r))}};function Wo(o){return o._scrollStrategy}var Yo=(()=>{class o{get itemSize(){return this._itemSize}set itemSize(e){this._itemSize=ce(e)}_itemSize=20;get minBufferPx(){return this._minBufferPx}set minBufferPx(e){this._minBufferPx=ce(e)}_minBufferPx=100;get maxBufferPx(){return this._maxBufferPx}set maxBufferPx(e){this._maxBufferPx=ce(e)}_maxBufferPx=200;_scrollStrategy=new gi(this.itemSize,this.minBufferPx,this.maxBufferPx);ngOnChanges(){this._scrollStrategy.updateItemAndBufferSize(this.itemSize,this.minBufferPx,this.maxBufferPx)}static \u0275fac=function(t){return new(t||o)};static \u0275dir=F({type:o,selectors:[["cdk-virtual-scroll-viewport","itemSize",""]],inputs:{itemSize:"itemSize",minBufferPx:"minBufferPx",maxBufferPx:"maxBufferPx"},features:[Ne([{provide:Gn,useFactory:Wo,deps:[sn(()=>o)]}]),se]})}return o})(),Ko=20,ot=(()=>{class o{_ngZone=h(U);_platform=h(H);_renderer=h(ae).createRenderer(null,null);_cleanupGlobalListener;constructor(){}_scrolled=new _;_scrolledCount=0;scrollContainers=new Map;register(e){this.scrollContainers.has(e)||this.scrollContainers.set(e,e.elementScrolled().subscribe(()=>this._scrolled.next(e)))}deregister(e){let t=this.scrollContainers.get(e);t&&(t.unsubscribe(),this.scrollContainers.delete(e))}scrolled(e=Ko){return this._platform.isBrowser?new ye(t=>{this._cleanupGlobalListener||(this._cleanupGlobalListener=this._ngZone.runOutsideAngular(()=>this._renderer.listen("document","scroll",()=>this._scrolled.next())));let n=e>0?this._scrolled.pipe(bt(e)).subscribe(t):this._scrolled.subscribe(t);return this._scrolledCount++,()=>{n.unsubscribe(),this._scrolledCount--,this._scrolledCount||(this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0)}}):g()}ngOnDestroy(){this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0,this.scrollContainers.forEach((e,t)=>this.deregister(t)),this._scrolled.complete()}ancestorScrolled(e,t){let n=this.getAncestorScrollContainers(e);return this.scrolled(t).pipe(D(s=>!s||n.indexOf(s)>-1))}getAncestorScrollContainers(e){let t=[];return this.scrollContainers.forEach((n,s)=>{this._scrollableContainsElement(s,e)&&t.push(s)}),t}_scrollableContainsElement(e,t){let n=De(t),s=e.getElementRef().nativeElement;do if(n==s)return!0;while(n=n.parentElement);return!1}static \u0275fac=function(t){return new(t||o)};static \u0275prov=y({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})(),st=(()=>{class o{elementRef=h(k);scrollDispatcher=h(ot);ngZone=h(U);dir=h(le,{optional:!0});_scrollElement=this.elementRef.nativeElement;_destroyed=new _;_renderer=h(Fe);_cleanupScroll;_elementScrolled=new _;constructor(){}ngOnInit(){this._cleanupScroll=this.ngZone.runOutsideAngular(()=>this._renderer.listen(this._scrollElement,"scroll",e=>this._elementScrolled.next(e))),this.scrollDispatcher.register(this)}ngOnDestroy(){this._cleanupScroll?.(),this._elementScrolled.complete(),this.scrollDispatcher.deregister(this),this._destroyed.next(),this._destroyed.complete()}elementScrolled(){return this._elementScrolled}getElementRef(){return this.elementRef}scrollTo(e){let t=this.elementRef.nativeElement,n=this.dir&&this.dir.value=="rtl";e.left==null&&(e.left=n?e.end:e.start),e.right==null&&(e.right=n?e.start:e.end),e.bottom!=null&&(e.top=t.scrollHeight-t.clientHeight-e.bottom),n&&He()!=q.NORMAL?(e.left!=null&&(e.right=t.scrollWidth-t.clientWidth-e.left),He()==q.INVERTED?e.left=e.right:He()==q.NEGATED&&(e.left=e.right?-e.right:e.right)):e.right!=null&&(e.left=t.scrollWidth-t.clientWidth-e.right),this._applyScrollToOptions(e)}_applyScrollToOptions(e){let t=this.elementRef.nativeElement;Nt()?t.scrollTo(e):(e.top!=null&&(t.scrollTop=e.top),e.left!=null&&(t.scrollLeft=e.left))}measureScrollOffset(e){let t="left",n="right",s=this.elementRef.nativeElement;if(e=="top")return s.scrollTop;if(e=="bottom")return s.scrollHeight-s.clientHeight-s.scrollTop;let r=this.dir&&this.dir.value=="rtl";return e=="start"?e=r?n:t:e=="end"&&(e=r?t:n),r&&He()==q.INVERTED?e==t?s.scrollWidth-s.clientWidth-s.scrollLeft:s.scrollLeft:r&&He()==q.NEGATED?e==t?s.scrollLeft+s.scrollWidth-s.clientWidth:-s.scrollLeft:e==t?s.scrollLeft:s.scrollWidth-s.clientWidth-s.scrollLeft}static \u0275fac=function(t){return new(t||o)};static \u0275dir=F({type:o,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]]})}return o})(),Xo=20,Oe=(()=>{class o{_platform=h(H);_listeners;_viewportSize;_change=new _;_document=h(P);constructor(){let e=h(U),t=h(ae).createRenderer(null,null);e.runOutsideAngular(()=>{if(this._platform.isBrowser){let n=s=>this._change.next(s);this._listeners=[t.listen("window","resize",n),t.listen("window","orientationchange",n)]}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){this._listeners?.forEach(e=>e()),this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();let e={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),e}getViewportRect(){let e=this.getViewportScrollPosition(),{width:t,height:n}=this.getViewportSize();return{top:e.top,left:e.left,bottom:e.top+n,right:e.left+t,height:n,width:t}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};let e=this._document,t=this._getWindow(),n=e.documentElement,s=n.getBoundingClientRect(),r=-s.top||e.body.scrollTop||t.scrollY||n.scrollTop||0,a=-s.left||e.body.scrollLeft||t.scrollX||n.scrollLeft||0;return{top:r,left:a}}change(e=Xo){return e>0?this._change.pipe(bt(e)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){let e=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:e.innerWidth,height:e.innerHeight}:{width:0,height:0}}static \u0275fac=function(t){return new(t||o)};static \u0275prov=y({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})(),Vn=new A("VIRTUAL_SCROLLABLE"),Zo=(()=>{class o extends st{constructor(){super()}measureViewportSize(e){let t=this.elementRef.nativeElement;return e==="horizontal"?t.clientWidth:t.clientHeight}static \u0275fac=function(t){return new(t||o)};static \u0275dir=F({type:o,features:[Y]})}return o})();function Qo(o,i){return o.start==i.start&&o.end==i.end}var qo=typeof requestAnimationFrame<"u"?qi:Qi,Wn=(()=>{class o extends Zo{elementRef=h(k);_changeDetectorRef=h(Be);_scrollStrategy=h(Gn,{optional:!0});scrollable=h(Vn,{optional:!0});_platform=h(H);_detachedSubject=new _;_renderedRangeSubject=new _;get orientation(){return this._orientation}set orientation(e){this._orientation!==e&&(this._orientation=e,this._calculateSpacerSize())}_orientation="vertical";appendOnly=!1;scrolledIndexChange=new ye(e=>this._scrollStrategy.scrolledIndexChange.subscribe(t=>Promise.resolve().then(()=>this.ngZone.run(()=>e.next(t)))));_contentWrapper;renderedRangeStream=this._renderedRangeSubject;_totalContentSize=0;_totalContentWidth=V("");_totalContentHeight=V("");_renderedContentTransform;_renderedRange={start:0,end:0};_dataLength=0;_viewportSize=0;_forOf;_renderedContentOffset=0;_renderedContentOffsetNeedsRewrite=!1;_changeDetectionNeeded=V(!1);_runAfterChangeDetection=[];_viewportChanges=Q.EMPTY;_injector=h(E);_isDestroyed=!1;constructor(){super();let e=h(Oe);this._scrollStrategy,this._viewportChanges=e.change().subscribe(()=>{this.checkViewportSize()}),this.scrollable||(this.elementRef.nativeElement.classList.add("cdk-virtual-scrollable"),this.scrollable=this);let t=ze(()=>{this._changeDetectionNeeded()&&this._doChangeDetection()},{injector:h(Ue).injector});h(rn).onDestroy(()=>{t.destroy()})}ngOnInit(){this._platform.isBrowser&&(this.scrollable===this&&super.ngOnInit(),this.ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>{this._measureViewportSize(),this._scrollStrategy.attach(this),this.scrollable.elementScrolled().pipe(Ce(null),bt(0,qo),he(this._destroyed)).subscribe(()=>this._scrollStrategy.onContentScrolled()),this._markChangeDetectionNeeded()})))}ngOnDestroy(){this.detach(),this._scrollStrategy.detach(),this._renderedRangeSubject.complete(),this._detachedSubject.complete(),this._viewportChanges.unsubscribe(),this._isDestroyed=!0,super.ngOnDestroy()}attach(e){this._forOf,this.ngZone.runOutsideAngular(()=>{this._forOf=e,this._forOf.dataStream.pipe(he(this._detachedSubject)).subscribe(t=>{let n=t.length;n!==this._dataLength&&(this._dataLength=n,this._scrollStrategy.onDataLengthChanged()),this._doChangeDetection()})})}detach(){this._forOf=null,this._detachedSubject.next()}getDataLength(){return this._dataLength}getViewportSize(){return this._viewportSize}getRenderedRange(){return this._renderedRange}measureBoundingClientRectWithScrollOffset(e){return this.getElementRef().nativeElement.getBoundingClientRect()[e]}setTotalContentSize(e){this._totalContentSize!==e&&(this._totalContentSize=e,this._calculateSpacerSize(),this._markChangeDetectionNeeded())}setRenderedRange(e){Qo(this._renderedRange,e)||(this.appendOnly&&(e={start:0,end:Math.max(this._renderedRange.end,e.end)}),this._renderedRangeSubject.next(this._renderedRange=e),this._markChangeDetectionNeeded(()=>this._scrollStrategy.onContentRendered()))}getOffsetToRenderedContentStart(){return this._renderedContentOffsetNeedsRewrite?null:this._renderedContentOffset}setRenderedContentOffset(e,t="to-start"){e=this.appendOnly&&t==="to-start"?0:e;let n=this.dir&&this.dir.value=="rtl",s=this.orientation=="horizontal",r=s?"X":"Y",c=`translate${r}(${Number((s&&n?-1:1)*e)}px)`;this._renderedContentOffset=e,t==="to-end"&&(c+=` translate${r}(-100%)`,this._renderedContentOffsetNeedsRewrite=!0),this._renderedContentTransform!=c&&(this._renderedContentTransform=c,this._markChangeDetectionNeeded(()=>{this._renderedContentOffsetNeedsRewrite?(this._renderedContentOffset-=this.measureRenderedContentSize(),this._renderedContentOffsetNeedsRewrite=!1,this.setRenderedContentOffset(this._renderedContentOffset)):this._scrollStrategy.onRenderedOffsetChanged()}))}scrollToOffset(e,t="auto"){let n={behavior:t};this.orientation==="horizontal"?n.start=e:n.top=e,this.scrollable.scrollTo(n)}scrollToIndex(e,t="auto"){this._scrollStrategy.scrollToIndex(e,t)}measureScrollOffset(e){let t;return this.scrollable==this?t=n=>super.measureScrollOffset(n):t=n=>this.scrollable.measureScrollOffset(n),Math.max(0,t(e??(this.orientation==="horizontal"?"start":"top"))-this.measureViewportOffset())}measureViewportOffset(e){let t,n="left",s="right",r=this.dir?.value=="rtl";e=="start"?t=r?s:n:e=="end"?t=r?n:s:e?t=e:t=this.orientation==="horizontal"?"left":"top";let a=this.scrollable.measureBoundingClientRectWithScrollOffset(t);return this.elementRef.nativeElement.getBoundingClientRect()[t]-a}measureRenderedContentSize(){let e=this._contentWrapper.nativeElement;return this.orientation==="horizontal"?e.offsetWidth:e.offsetHeight}measureRangeSize(e){return this._forOf?this._forOf.measureRangeSize(e,this.orientation):0}checkViewportSize(){this._measureViewportSize(),this._scrollStrategy.onDataLengthChanged()}_measureViewportSize(){this._viewportSize=this.scrollable.measureViewportSize(this.orientation)}_markChangeDetectionNeeded(e){e&&this._runAfterChangeDetection.push(e),!bn(this._changeDetectionNeeded)&&this.ngZone.runOutsideAngular(()=>{Promise.resolve().then(()=>{this.ngZone.run(()=>{this._changeDetectionNeeded.set(!0)})})})}_doChangeDetection(){this._isDestroyed||this.ngZone.run(()=>{this._changeDetectorRef.markForCheck(),this._contentWrapper.nativeElement.style.transform=this._renderedContentTransform,re(()=>{this._changeDetectionNeeded.set(!1);let e=this._runAfterChangeDetection;this._runAfterChangeDetection=[];for(let t of e)t()},{injector:this._injector})})}_calculateSpacerSize(){this._totalContentHeight.set(this.orientation==="horizontal"?"":`${this._totalContentSize}px`),this._totalContentWidth.set(this.orientation==="horizontal"?`${this._totalContentSize}px`:"")}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=W({type:o,selectors:[["cdk-virtual-scroll-viewport"]],viewQuery:function(t,n){if(t&1&&Et(Ho,7),t&2){let s;Ot(s=wt())&&(n._contentWrapper=s.first)}},hostAttrs:[1,"cdk-virtual-scroll-viewport"],hostVars:4,hostBindings:function(t,n){t&2&&et("cdk-virtual-scroll-orientation-horizontal",n.orientation==="horizontal")("cdk-virtual-scroll-orientation-vertical",n.orientation!=="horizontal")},inputs:{orientation:"orientation",appendOnly:[2,"appendOnly","appendOnly",ee]},outputs:{scrolledIndexChange:"scrolledIndexChange"},features:[Ne([{provide:st,useFactory:(e,t)=>e||t,deps:[[new cn,new an(Vn)],o]}]),Y],ngContentSelectors:Go,decls:4,vars:4,consts:[["contentWrapper",""],[1,"cdk-virtual-scroll-content-wrapper"],[1,"cdk-virtual-scroll-spacer"]],template:function(t,n){t&1&&(vn(),pn(0,"div",1,0),yn(2),gn(),mn(3,"div",2)),t&2&&(dn(3),Cn("width",n._totalContentWidth())("height",n._totalContentHeight()))},styles:[`cdk-virtual-scroll-viewport{display:block;position:relative;transform:translateZ(0)}.cdk-virtual-scrollable{overflow:auto;will-change:scroll-position;contain:strict}.cdk-virtual-scroll-content-wrapper{position:absolute;top:0;left:0;contain:content}[dir=rtl] .cdk-virtual-scroll-content-wrapper{right:0;left:auto}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper{min-height:100%}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-left:0;padding-right:0;margin-left:0;margin-right:0;border-left-width:0;border-right-width:0;outline:none}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper{min-width:100%}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0;border-top-width:0;border-bottom-width:0;outline:none}.cdk-virtual-scroll-spacer{height:1px;transform-origin:0 0;flex:0 0 auto}[dir=rtl] .cdk-virtual-scroll-spacer{transform-origin:100% 0}
1
+ import{$ as y,Ab as vn,Bb as yn,Bc as At,Bi as T,Ci as Un,D as Ct,Db as Et,Dc as In,De as tt,E as D,Eb as Ot,F as bt,Fa as dn,Fb as wt,G as ai,Ga as B,Ha as U,Hf as Rn,Hi as Lt,I as St,Ia as re,Ii as Nn,J as ne,Jb as Cn,Je as Tt,Kb as et,Kf as ui,L as oe,La as be,M as Ji,Na as ae,Oa as Fe,P as en,Pa as Z,Q as tn,Qe as S,Qf as O,Qi as zn,Ra as Le,S as Ce,Sa as li,T as v,Te as je,Tf as Tn,U as he,Ua as W,V as nn,Va as N,W as J,Wa as F,Xc as H,Y as on,Ya as Y,Yc as kt,Za as hn,Zh as it,_ as sn,_a as Dt,_b as Ne,a as p,aa as L,ag as Mn,b as z,ba as A,bb as Ue,ca as R,da as h,db as fe,fa as xe,fe as Dn,g as $,ge as En,h as Q,hf as wn,i as ye,if as An,j as Zi,je as Rt,k as _,l as b,la as E,ma as P,mb as un,n as Qi,na as rn,nb as fn,nf as kn,ni as xt,o as qi,oi as Fn,pa as Pe,pb as pn,pi as te,q as _t,qa as V,qb as gn,qe as On,qi as $e,r as g,rb as mn,rc as bn,s as vt,sa as an,sc as hi,si as Ln,ta as cn,tc as ze,ua as se,uh as fi,v as C,va as ue,vi as Pt,w as Je,wa as k,wb as di,wg as xn,wi as Se,x as yt,xa as ci,xb as _n,xc as Be,xh as Mt,xi as Ve,ya as ln,yc as Sn,yi as Ie,za as It,zc as ee,zh as Pn,zi as Ft}from"./chunk-TY3WZ4Q4.js";function ce(o,i=0){return Bn(o)?Number(o):arguments.length===2?i:0}function Bn(o){return!isNaN(parseFloat(o))&&!isNaN(Number(o))}function De(o){return o instanceof k?o.nativeElement:o}var jo=new A("cdk-dir-doc",{providedIn:"root",factory:$o});function $o(){return h(P)}var Vo=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;function jn(o){let i=o?.toLowerCase()||"";return i==="auto"&&typeof navigator<"u"&&navigator?.language?Vo.test(navigator.language)?"rtl":"ltr":i==="rtl"?"rtl":"ltr"}var le=(()=>{class o{get value(){return this.valueSignal()}valueSignal=V("ltr");change=new B;constructor(){let e=h(jo,{optional:!0});if(e){let t=e.body?e.body.dir:null,n=e.documentElement?e.documentElement.dir:null;this.valueSignal.set(jn(t||n||"ltr"))}}ngOnDestroy(){this.change.complete()}static \u0275fac=function(t){return new(t||o)};static \u0275prov=y({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();var q=(function(o){return o[o.NORMAL=0]="NORMAL",o[o.NEGATED=1]="NEGATED",o[o.INVERTED=2]="INVERTED",o})(q||{}),Ut,Ee;function Nt(){if(Ee==null){if(typeof document!="object"||!document||typeof Element!="function"||!Element)return Ee=!1,Ee;if(document.documentElement?.style&&"scrollBehavior"in document.documentElement.style)Ee=!0;else{let o=Element.prototype.scrollTo;o?Ee=!/\{\s*\[native code\]\s*\}/.test(o.toString()):Ee=!1}}return Ee}function He(){if(typeof document!="object"||!document)return q.NORMAL;if(Ut==null){let o=document.createElement("div"),i=o.style;o.dir="rtl",i.width="1px",i.overflow="auto",i.visibility="hidden",i.pointerEvents="none",i.position="absolute";let e=document.createElement("div"),t=e.style;t.width="2px",t.height="1px",o.appendChild(e),document.body.appendChild(o),Ut=q.NORMAL,o.scrollLeft===0&&(o.scrollLeft=1,Ut=o.scrollLeft===0?q.NEGATED:q.INVERTED),o.remove()}return Ut}var pe=(()=>{class o{static \u0275fac=function(t){return new(t||o)};static \u0275mod=N({type:o});static \u0275inj=L({})}return o})();var zt=class{};function $n(o){return o&&typeof o.connect=="function"&&!(o instanceof Zi)}var Bt=class extends zt{_data;constructor(i){super(),this._data=i}connect(){return vt(this._data)?this._data:g(this._data)}disconnect(){}},nt=(function(o){return o[o.REPLACED=0]="REPLACED",o[o.INSERTED=1]="INSERTED",o[o.MOVED=2]="MOVED",o[o.REMOVED=3]="REMOVED",o})(nt||{}),pi=new A("_ViewRepeater"),jt=class{viewCacheSize=20;_viewCache=[];applyChanges(i,e,t,n,s){i.forEachOperation((r,a,c)=>{let d,l;if(r.previousIndex==null){let u=()=>t(r,a,c);d=this._insertView(u,c,e,n(r)),l=d?nt.INSERTED:nt.REPLACED}else c==null?(this._detachAndCacheView(a,e),l=nt.REMOVED):(d=this._moveView(a,c,e,n(r)),l=nt.MOVED);s&&s({context:d?.context,operation:l,record:r})})}detach(){for(let i of this._viewCache)i.destroy();this._viewCache=[]}_insertView(i,e,t,n){let s=this._insertViewFromCache(e,t);if(s){s.context.$implicit=n;return}let r=i();return t.createEmbeddedView(r.templateRef,r.context,r.index)}_detachAndCacheView(i,e){let t=e.detach(i);this._maybeCacheView(t,e)}_moveView(i,e,t,n){let s=t.get(i);return t.move(s,e),s.context.$implicit=n,s}_maybeCacheView(i,e){if(this._viewCache.length<this.viewCacheSize)this._viewCache.push(i);else{let t=e.indexOf(i);t===-1?i.destroy():e.remove(t)}}_insertViewFromCache(i,e){let t=this._viewCache.pop();return t&&e.insert(t,i),t||null}};var Ho=["contentWrapper"],Go=["*"],Gn=new A("VIRTUAL_SCROLL_STRATEGY"),gi=class{_scrolledIndexChange=new _;scrolledIndexChange=this._scrolledIndexChange.pipe(oe());_viewport=null;_itemSize;_minBufferPx;_maxBufferPx;constructor(i,e,t){this._itemSize=i,this._minBufferPx=e,this._maxBufferPx=t}attach(i){this._viewport=i,this._updateTotalContentSize(),this._updateRenderedRange()}detach(){this._scrolledIndexChange.complete(),this._viewport=null}updateItemAndBufferSize(i,e,t){t<e,this._itemSize=i,this._minBufferPx=e,this._maxBufferPx=t,this._updateTotalContentSize(),this._updateRenderedRange()}onContentScrolled(){this._updateRenderedRange()}onDataLengthChanged(){this._updateTotalContentSize(),this._updateRenderedRange()}onContentRendered(){}onRenderedOffsetChanged(){}scrollToIndex(i,e){this._viewport&&this._viewport.scrollToOffset(i*this._itemSize,e)}_updateTotalContentSize(){this._viewport&&this._viewport.setTotalContentSize(this._viewport.getDataLength()*this._itemSize)}_updateRenderedRange(){if(!this._viewport)return;let i=this._viewport.getRenderedRange(),e={start:i.start,end:i.end},t=this._viewport.getViewportSize(),n=this._viewport.getDataLength(),s=this._viewport.measureScrollOffset(),r=this._itemSize>0?s/this._itemSize:0;if(e.end>n){let c=Math.ceil(t/this._itemSize),d=Math.max(0,Math.min(r,n-c));r!=d&&(r=d,s=d*this._itemSize,e.start=Math.floor(r)),e.end=Math.max(0,Math.min(n,e.start+c))}let a=s-e.start*this._itemSize;if(a<this._minBufferPx&&e.start!=0){let c=Math.ceil((this._maxBufferPx-a)/this._itemSize);e.start=Math.max(0,e.start-c),e.end=Math.min(n,Math.ceil(r+(t+this._minBufferPx)/this._itemSize))}else{let c=e.end*this._itemSize-(s+t);if(c<this._minBufferPx&&e.end!=n){let d=Math.ceil((this._maxBufferPx-c)/this._itemSize);d>0&&(e.end=Math.min(n,e.end+d),e.start=Math.max(0,Math.floor(r-this._minBufferPx/this._itemSize)))}}this._viewport.setRenderedRange(e),this._viewport.setRenderedContentOffset(Math.round(this._itemSize*e.start)),this._scrolledIndexChange.next(Math.floor(r))}};function Wo(o){return o._scrollStrategy}var Yo=(()=>{class o{get itemSize(){return this._itemSize}set itemSize(e){this._itemSize=ce(e)}_itemSize=20;get minBufferPx(){return this._minBufferPx}set minBufferPx(e){this._minBufferPx=ce(e)}_minBufferPx=100;get maxBufferPx(){return this._maxBufferPx}set maxBufferPx(e){this._maxBufferPx=ce(e)}_maxBufferPx=200;_scrollStrategy=new gi(this.itemSize,this.minBufferPx,this.maxBufferPx);ngOnChanges(){this._scrollStrategy.updateItemAndBufferSize(this.itemSize,this.minBufferPx,this.maxBufferPx)}static \u0275fac=function(t){return new(t||o)};static \u0275dir=F({type:o,selectors:[["cdk-virtual-scroll-viewport","itemSize",""]],inputs:{itemSize:"itemSize",minBufferPx:"minBufferPx",maxBufferPx:"maxBufferPx"},features:[Ne([{provide:Gn,useFactory:Wo,deps:[sn(()=>o)]}]),se]})}return o})(),Ko=20,ot=(()=>{class o{_ngZone=h(U);_platform=h(H);_renderer=h(ae).createRenderer(null,null);_cleanupGlobalListener;constructor(){}_scrolled=new _;_scrolledCount=0;scrollContainers=new Map;register(e){this.scrollContainers.has(e)||this.scrollContainers.set(e,e.elementScrolled().subscribe(()=>this._scrolled.next(e)))}deregister(e){let t=this.scrollContainers.get(e);t&&(t.unsubscribe(),this.scrollContainers.delete(e))}scrolled(e=Ko){return this._platform.isBrowser?new ye(t=>{this._cleanupGlobalListener||(this._cleanupGlobalListener=this._ngZone.runOutsideAngular(()=>this._renderer.listen("document","scroll",()=>this._scrolled.next())));let n=e>0?this._scrolled.pipe(bt(e)).subscribe(t):this._scrolled.subscribe(t);return this._scrolledCount++,()=>{n.unsubscribe(),this._scrolledCount--,this._scrolledCount||(this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0)}}):g()}ngOnDestroy(){this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0,this.scrollContainers.forEach((e,t)=>this.deregister(t)),this._scrolled.complete()}ancestorScrolled(e,t){let n=this.getAncestorScrollContainers(e);return this.scrolled(t).pipe(D(s=>!s||n.indexOf(s)>-1))}getAncestorScrollContainers(e){let t=[];return this.scrollContainers.forEach((n,s)=>{this._scrollableContainsElement(s,e)&&t.push(s)}),t}_scrollableContainsElement(e,t){let n=De(t),s=e.getElementRef().nativeElement;do if(n==s)return!0;while(n=n.parentElement);return!1}static \u0275fac=function(t){return new(t||o)};static \u0275prov=y({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})(),st=(()=>{class o{elementRef=h(k);scrollDispatcher=h(ot);ngZone=h(U);dir=h(le,{optional:!0});_scrollElement=this.elementRef.nativeElement;_destroyed=new _;_renderer=h(Fe);_cleanupScroll;_elementScrolled=new _;constructor(){}ngOnInit(){this._cleanupScroll=this.ngZone.runOutsideAngular(()=>this._renderer.listen(this._scrollElement,"scroll",e=>this._elementScrolled.next(e))),this.scrollDispatcher.register(this)}ngOnDestroy(){this._cleanupScroll?.(),this._elementScrolled.complete(),this.scrollDispatcher.deregister(this),this._destroyed.next(),this._destroyed.complete()}elementScrolled(){return this._elementScrolled}getElementRef(){return this.elementRef}scrollTo(e){let t=this.elementRef.nativeElement,n=this.dir&&this.dir.value=="rtl";e.left==null&&(e.left=n?e.end:e.start),e.right==null&&(e.right=n?e.start:e.end),e.bottom!=null&&(e.top=t.scrollHeight-t.clientHeight-e.bottom),n&&He()!=q.NORMAL?(e.left!=null&&(e.right=t.scrollWidth-t.clientWidth-e.left),He()==q.INVERTED?e.left=e.right:He()==q.NEGATED&&(e.left=e.right?-e.right:e.right)):e.right!=null&&(e.left=t.scrollWidth-t.clientWidth-e.right),this._applyScrollToOptions(e)}_applyScrollToOptions(e){let t=this.elementRef.nativeElement;Nt()?t.scrollTo(e):(e.top!=null&&(t.scrollTop=e.top),e.left!=null&&(t.scrollLeft=e.left))}measureScrollOffset(e){let t="left",n="right",s=this.elementRef.nativeElement;if(e=="top")return s.scrollTop;if(e=="bottom")return s.scrollHeight-s.clientHeight-s.scrollTop;let r=this.dir&&this.dir.value=="rtl";return e=="start"?e=r?n:t:e=="end"&&(e=r?t:n),r&&He()==q.INVERTED?e==t?s.scrollWidth-s.clientWidth-s.scrollLeft:s.scrollLeft:r&&He()==q.NEGATED?e==t?s.scrollLeft+s.scrollWidth-s.clientWidth:-s.scrollLeft:e==t?s.scrollLeft:s.scrollWidth-s.clientWidth-s.scrollLeft}static \u0275fac=function(t){return new(t||o)};static \u0275dir=F({type:o,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]]})}return o})(),Xo=20,Oe=(()=>{class o{_platform=h(H);_listeners;_viewportSize;_change=new _;_document=h(P);constructor(){let e=h(U),t=h(ae).createRenderer(null,null);e.runOutsideAngular(()=>{if(this._platform.isBrowser){let n=s=>this._change.next(s);this._listeners=[t.listen("window","resize",n),t.listen("window","orientationchange",n)]}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){this._listeners?.forEach(e=>e()),this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();let e={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),e}getViewportRect(){let e=this.getViewportScrollPosition(),{width:t,height:n}=this.getViewportSize();return{top:e.top,left:e.left,bottom:e.top+n,right:e.left+t,height:n,width:t}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};let e=this._document,t=this._getWindow(),n=e.documentElement,s=n.getBoundingClientRect(),r=-s.top||e.body.scrollTop||t.scrollY||n.scrollTop||0,a=-s.left||e.body.scrollLeft||t.scrollX||n.scrollLeft||0;return{top:r,left:a}}change(e=Xo){return e>0?this._change.pipe(bt(e)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){let e=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:e.innerWidth,height:e.innerHeight}:{width:0,height:0}}static \u0275fac=function(t){return new(t||o)};static \u0275prov=y({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})(),Vn=new A("VIRTUAL_SCROLLABLE"),Zo=(()=>{class o extends st{constructor(){super()}measureViewportSize(e){let t=this.elementRef.nativeElement;return e==="horizontal"?t.clientWidth:t.clientHeight}static \u0275fac=function(t){return new(t||o)};static \u0275dir=F({type:o,features:[Y]})}return o})();function Qo(o,i){return o.start==i.start&&o.end==i.end}var qo=typeof requestAnimationFrame<"u"?qi:Qi,Wn=(()=>{class o extends Zo{elementRef=h(k);_changeDetectorRef=h(Be);_scrollStrategy=h(Gn,{optional:!0});scrollable=h(Vn,{optional:!0});_platform=h(H);_detachedSubject=new _;_renderedRangeSubject=new _;get orientation(){return this._orientation}set orientation(e){this._orientation!==e&&(this._orientation=e,this._calculateSpacerSize())}_orientation="vertical";appendOnly=!1;scrolledIndexChange=new ye(e=>this._scrollStrategy.scrolledIndexChange.subscribe(t=>Promise.resolve().then(()=>this.ngZone.run(()=>e.next(t)))));_contentWrapper;renderedRangeStream=this._renderedRangeSubject;_totalContentSize=0;_totalContentWidth=V("");_totalContentHeight=V("");_renderedContentTransform;_renderedRange={start:0,end:0};_dataLength=0;_viewportSize=0;_forOf;_renderedContentOffset=0;_renderedContentOffsetNeedsRewrite=!1;_changeDetectionNeeded=V(!1);_runAfterChangeDetection=[];_viewportChanges=Q.EMPTY;_injector=h(E);_isDestroyed=!1;constructor(){super();let e=h(Oe);this._scrollStrategy,this._viewportChanges=e.change().subscribe(()=>{this.checkViewportSize()}),this.scrollable||(this.elementRef.nativeElement.classList.add("cdk-virtual-scrollable"),this.scrollable=this);let t=ze(()=>{this._changeDetectionNeeded()&&this._doChangeDetection()},{injector:h(Ue).injector});h(rn).onDestroy(()=>{t.destroy()})}ngOnInit(){this._platform.isBrowser&&(this.scrollable===this&&super.ngOnInit(),this.ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>{this._measureViewportSize(),this._scrollStrategy.attach(this),this.scrollable.elementScrolled().pipe(Ce(null),bt(0,qo),he(this._destroyed)).subscribe(()=>this._scrollStrategy.onContentScrolled()),this._markChangeDetectionNeeded()})))}ngOnDestroy(){this.detach(),this._scrollStrategy.detach(),this._renderedRangeSubject.complete(),this._detachedSubject.complete(),this._viewportChanges.unsubscribe(),this._isDestroyed=!0,super.ngOnDestroy()}attach(e){this._forOf,this.ngZone.runOutsideAngular(()=>{this._forOf=e,this._forOf.dataStream.pipe(he(this._detachedSubject)).subscribe(t=>{let n=t.length;n!==this._dataLength&&(this._dataLength=n,this._scrollStrategy.onDataLengthChanged()),this._doChangeDetection()})})}detach(){this._forOf=null,this._detachedSubject.next()}getDataLength(){return this._dataLength}getViewportSize(){return this._viewportSize}getRenderedRange(){return this._renderedRange}measureBoundingClientRectWithScrollOffset(e){return this.getElementRef().nativeElement.getBoundingClientRect()[e]}setTotalContentSize(e){this._totalContentSize!==e&&(this._totalContentSize=e,this._calculateSpacerSize(),this._markChangeDetectionNeeded())}setRenderedRange(e){Qo(this._renderedRange,e)||(this.appendOnly&&(e={start:0,end:Math.max(this._renderedRange.end,e.end)}),this._renderedRangeSubject.next(this._renderedRange=e),this._markChangeDetectionNeeded(()=>this._scrollStrategy.onContentRendered()))}getOffsetToRenderedContentStart(){return this._renderedContentOffsetNeedsRewrite?null:this._renderedContentOffset}setRenderedContentOffset(e,t="to-start"){e=this.appendOnly&&t==="to-start"?0:e;let n=this.dir&&this.dir.value=="rtl",s=this.orientation=="horizontal",r=s?"X":"Y",c=`translate${r}(${Number((s&&n?-1:1)*e)}px)`;this._renderedContentOffset=e,t==="to-end"&&(c+=` translate${r}(-100%)`,this._renderedContentOffsetNeedsRewrite=!0),this._renderedContentTransform!=c&&(this._renderedContentTransform=c,this._markChangeDetectionNeeded(()=>{this._renderedContentOffsetNeedsRewrite?(this._renderedContentOffset-=this.measureRenderedContentSize(),this._renderedContentOffsetNeedsRewrite=!1,this.setRenderedContentOffset(this._renderedContentOffset)):this._scrollStrategy.onRenderedOffsetChanged()}))}scrollToOffset(e,t="auto"){let n={behavior:t};this.orientation==="horizontal"?n.start=e:n.top=e,this.scrollable.scrollTo(n)}scrollToIndex(e,t="auto"){this._scrollStrategy.scrollToIndex(e,t)}measureScrollOffset(e){let t;return this.scrollable==this?t=n=>super.measureScrollOffset(n):t=n=>this.scrollable.measureScrollOffset(n),Math.max(0,t(e??(this.orientation==="horizontal"?"start":"top"))-this.measureViewportOffset())}measureViewportOffset(e){let t,n="left",s="right",r=this.dir?.value=="rtl";e=="start"?t=r?s:n:e=="end"?t=r?n:s:e?t=e:t=this.orientation==="horizontal"?"left":"top";let a=this.scrollable.measureBoundingClientRectWithScrollOffset(t);return this.elementRef.nativeElement.getBoundingClientRect()[t]-a}measureRenderedContentSize(){let e=this._contentWrapper.nativeElement;return this.orientation==="horizontal"?e.offsetWidth:e.offsetHeight}measureRangeSize(e){return this._forOf?this._forOf.measureRangeSize(e,this.orientation):0}checkViewportSize(){this._measureViewportSize(),this._scrollStrategy.onDataLengthChanged()}_measureViewportSize(){this._viewportSize=this.scrollable.measureViewportSize(this.orientation)}_markChangeDetectionNeeded(e){e&&this._runAfterChangeDetection.push(e),!bn(this._changeDetectionNeeded)&&this.ngZone.runOutsideAngular(()=>{Promise.resolve().then(()=>{this.ngZone.run(()=>{this._changeDetectionNeeded.set(!0)})})})}_doChangeDetection(){this._isDestroyed||this.ngZone.run(()=>{this._changeDetectorRef.markForCheck(),this._contentWrapper.nativeElement.style.transform=this._renderedContentTransform,re(()=>{this._changeDetectionNeeded.set(!1);let e=this._runAfterChangeDetection;this._runAfterChangeDetection=[];for(let t of e)t()},{injector:this._injector})})}_calculateSpacerSize(){this._totalContentHeight.set(this.orientation==="horizontal"?"":`${this._totalContentSize}px`),this._totalContentWidth.set(this.orientation==="horizontal"?`${this._totalContentSize}px`:"")}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=W({type:o,selectors:[["cdk-virtual-scroll-viewport"]],viewQuery:function(t,n){if(t&1&&Et(Ho,7),t&2){let s;Ot(s=wt())&&(n._contentWrapper=s.first)}},hostAttrs:[1,"cdk-virtual-scroll-viewport"],hostVars:4,hostBindings:function(t,n){t&2&&et("cdk-virtual-scroll-orientation-horizontal",n.orientation==="horizontal")("cdk-virtual-scroll-orientation-vertical",n.orientation!=="horizontal")},inputs:{orientation:"orientation",appendOnly:[2,"appendOnly","appendOnly",ee]},outputs:{scrolledIndexChange:"scrolledIndexChange"},features:[Ne([{provide:st,useFactory:(e,t)=>e||t,deps:[[new cn,new an(Vn)],o]}]),Y],ngContentSelectors:Go,decls:4,vars:4,consts:[["contentWrapper",""],[1,"cdk-virtual-scroll-content-wrapper"],[1,"cdk-virtual-scroll-spacer"]],template:function(t,n){t&1&&(vn(),pn(0,"div",1,0),yn(2),gn(),mn(3,"div",2)),t&2&&(dn(3),Cn("width",n._totalContentWidth())("height",n._totalContentHeight()))},styles:[`cdk-virtual-scroll-viewport{display:block;position:relative;transform:translateZ(0)}.cdk-virtual-scrollable{overflow:auto;will-change:scroll-position;contain:strict}.cdk-virtual-scroll-content-wrapper{position:absolute;top:0;left:0;contain:content}[dir=rtl] .cdk-virtual-scroll-content-wrapper{right:0;left:auto}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper{min-height:100%}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-left:0;padding-right:0;margin-left:0;margin-right:0;border-left-width:0;border-right-width:0;outline:none}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper{min-width:100%}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0;border-top-width:0;border-bottom-width:0;outline:none}.cdk-virtual-scroll-spacer{height:1px;transform-origin:0 0;flex:0 0 auto}[dir=rtl] .cdk-virtual-scroll-spacer{transform-origin:100% 0}
2
2
  `],encapsulation:2,changeDetection:0})}return o})();function Hn(o,i,e){let t=e;if(!t.getBoundingClientRect)return 0;let n=t.getBoundingClientRect();return o==="horizontal"?i==="start"?n.left:n.right:i==="start"?n.top:n.bottom}var Jo=(()=>{class o{_viewContainerRef=h(Le);_template=h(be);_differs=h(Sn);_viewRepeater=h(pi);_viewport=h(Wn,{skipSelf:!0});viewChange=new _;_dataSourceChanges=new _;get cdkVirtualForOf(){return this._cdkVirtualForOf}set cdkVirtualForOf(e){this._cdkVirtualForOf=e,$n(e)?this._dataSourceChanges.next(e):this._dataSourceChanges.next(new Bt(vt(e)?e:Array.from(e||[])))}_cdkVirtualForOf;get cdkVirtualForTrackBy(){return this._cdkVirtualForTrackBy}set cdkVirtualForTrackBy(e){this._needsUpdate=!0,this._cdkVirtualForTrackBy=e?(t,n)=>e(t+(this._renderedRange?this._renderedRange.start:0),n):void 0}_cdkVirtualForTrackBy;set cdkVirtualForTemplate(e){e&&(this._needsUpdate=!0,this._template=e)}get cdkVirtualForTemplateCacheSize(){return this._viewRepeater.viewCacheSize}set cdkVirtualForTemplateCacheSize(e){this._viewRepeater.viewCacheSize=ce(e)}dataStream=this._dataSourceChanges.pipe(Ce(null),Ji(),v(([e,t])=>this._changeDataSource(e,t)),en(1));_differ=null;_data;_renderedItems;_renderedRange;_needsUpdate=!1;_destroyed=new _;constructor(){let e=h(U);this.dataStream.subscribe(t=>{this._data=t,this._onRenderedDataChange()}),this._viewport.renderedRangeStream.pipe(he(this._destroyed)).subscribe(t=>{this._renderedRange=t,this.viewChange.observers.length&&e.run(()=>this.viewChange.next(this._renderedRange)),this._onRenderedDataChange()}),this._viewport.attach(this)}measureRangeSize(e,t){if(e.start>=e.end)return 0;e.start<this._renderedRange.start||e.end>this._renderedRange.end;let n=e.start-this._renderedRange.start,s=e.end-e.start,r,a;for(let c=0;c<s;c++){let d=this._viewContainerRef.get(c+n);if(d&&d.rootNodes.length){r=a=d.rootNodes[0];break}}for(let c=s-1;c>-1;c--){let d=this._viewContainerRef.get(c+n);if(d&&d.rootNodes.length){a=d.rootNodes[d.rootNodes.length-1];break}}return r&&a?Hn(t,"end",a)-Hn(t,"start",r):0}ngDoCheck(){if(this._differ&&this._needsUpdate){let e=this._differ.diff(this._renderedItems);e?this._applyChanges(e):this._updateContext(),this._needsUpdate=!1}}ngOnDestroy(){this._viewport.detach(),this._dataSourceChanges.next(void 0),this._dataSourceChanges.complete(),this.viewChange.complete(),this._destroyed.next(),this._destroyed.complete(),this._viewRepeater.detach()}_onRenderedDataChange(){this._renderedRange&&(this._renderedItems=this._data.slice(this._renderedRange.start,this._renderedRange.end),this._differ||(this._differ=this._differs.find(this._renderedItems).create((e,t)=>this.cdkVirtualForTrackBy?this.cdkVirtualForTrackBy(e,t):t)),this._needsUpdate=!0)}_changeDataSource(e,t){return e&&e.disconnect(this),this._needsUpdate=!0,t?t.connect(this):g()}_updateContext(){let e=this._data.length,t=this._viewContainerRef.length;for(;t--;){let n=this._viewContainerRef.get(t);n.context.index=this._renderedRange.start+t,n.context.count=e,this._updateComputedContextProperties(n.context),n.detectChanges()}}_applyChanges(e){this._viewRepeater.applyChanges(e,this._viewContainerRef,(s,r,a)=>this._getEmbeddedViewArgs(s,a),s=>s.item),e.forEachIdentityChange(s=>{let r=this._viewContainerRef.get(s.currentIndex);r.context.$implicit=s.item});let t=this._data.length,n=this._viewContainerRef.length;for(;n--;){let s=this._viewContainerRef.get(n);s.context.index=this._renderedRange.start+n,s.context.count=t,this._updateComputedContextProperties(s.context)}}_updateComputedContextProperties(e){e.first=e.index===0,e.last=e.index===e.count-1,e.even=e.index%2===0,e.odd=!e.even}_getEmbeddedViewArgs(e,t){return{templateRef:this._template,context:{$implicit:e.item,cdkVirtualForOf:this._cdkVirtualForOf,index:-1,count:-1,first:!1,last:!1,odd:!1,even:!1},index:t}}static ngTemplateContextGuard(e,t){return!0}static \u0275fac=function(t){return new(t||o)};static \u0275dir=F({type:o,selectors:[["","cdkVirtualFor","","cdkVirtualForOf",""]],inputs:{cdkVirtualForOf:"cdkVirtualForOf",cdkVirtualForTrackBy:"cdkVirtualForTrackBy",cdkVirtualForTemplate:"cdkVirtualForTemplate",cdkVirtualForTemplateCacheSize:"cdkVirtualForTemplateCacheSize"},features:[Ne([{provide:pi,useClass:jt}])]})}return o})();var mi=(()=>{class o{static \u0275fac=function(t){return new(t||o)};static \u0275mod=N({type:o});static \u0275inj=L({})}return o})(),_i=(()=>{class o{static \u0275fac=function(t){return new(t||o)};static \u0275mod=N({type:o});static \u0275inj=L({imports:[pe,mi,pe,mi]})}return o})();var rt=class{_attachedHost;attach(i){return this._attachedHost=i,i.attach(this)}detach(){let i=this._attachedHost;i!=null&&(this._attachedHost=null,i.detach())}get isAttached(){return this._attachedHost!=null}setAttachedHost(i){this._attachedHost=i}},Ge=class extends rt{component;viewContainerRef;injector;projectableNodes;constructor(i,e,t,n){super(),this.component=i,this.viewContainerRef=e,this.injector=t,this.projectableNodes=n}},we=class extends rt{templateRef;viewContainerRef;context;injector;constructor(i,e,t,n){super(),this.templateRef=i,this.viewContainerRef=e,this.context=t,this.injector=n}get origin(){return this.templateRef.elementRef}attach(i,e=this.context){return this.context=e,super.attach(i)}detach(){return this.context=void 0,super.detach()}},vi=class extends rt{element;constructor(i){super(),this.element=i instanceof k?i.nativeElement:i}},We=class{_attachedPortal;_disposeFn;_isDisposed=!1;hasAttached(){return!!this._attachedPortal}attach(i){if(i instanceof Ge)return this._attachedPortal=i,this.attachComponentPortal(i);if(i instanceof we)return this._attachedPortal=i,this.attachTemplatePortal(i);if(this.attachDomPortal&&i instanceof vi)return this._attachedPortal=i,this.attachDomPortal(i)}attachDomPortal=null;detach(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}dispose(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}setDisposeFn(i){this._disposeFn=i}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}},$t=class extends We{outletElement;_appRef;_defaultInjector;constructor(i,e,t){super(),this.outletElement=i,this._appRef=e,this._defaultInjector=t}attachComponentPortal(i){let e;if(i.viewContainerRef){let t=i.injector||i.viewContainerRef.injector,n=t.get(li,null,{optional:!0})||void 0;e=i.viewContainerRef.createComponent(i.component,{index:i.viewContainerRef.length,injector:t,ngModuleRef:n,projectableNodes:i.projectableNodes||void 0}),this.setDisposeFn(()=>e.destroy())}else{let t=this._appRef,n=i.injector||this._defaultInjector||E.NULL,s=n.get(xe,t.injector);e=At(i.component,{elementInjector:n,environmentInjector:s,projectableNodes:i.projectableNodes||void 0}),t.attachView(e.hostView),this.setDisposeFn(()=>{t.viewCount>0&&t.detachView(e.hostView),e.destroy()})}return this.outletElement.appendChild(this._getComponentRootNode(e)),this._attachedPortal=i,e}attachTemplatePortal(i){let e=i.viewContainerRef,t=e.createEmbeddedView(i.templateRef,i.context,{injector:i.injector});return t.rootNodes.forEach(n=>this.outletElement.appendChild(n)),t.detectChanges(),this.setDisposeFn(()=>{let n=e.indexOf(t);n!==-1&&e.remove(n)}),this._attachedPortal=i,t}attachDomPortal=i=>{let e=i.element;e.parentNode;let t=this.outletElement.ownerDocument.createComment("dom-portal");e.parentNode.insertBefore(t,e),this.outletElement.appendChild(e),this._attachedPortal=i,super.setDisposeFn(()=>{t.parentNode&&t.parentNode.replaceChild(e,t)})};dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(i){return i.hostView.rootNodes[0]}};var at=(()=>{class o extends We{_moduleRef=h(li,{optional:!0});_document=h(P);_viewContainerRef=h(Le);_isInitialized=!1;_attachedRef;constructor(){super()}get portal(){return this._attachedPortal}set portal(e){this.hasAttached()&&!e&&!this._isInitialized||(this.hasAttached()&&super.detach(),e&&super.attach(e),this._attachedPortal=e||null)}attached=new B;get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedRef=this._attachedPortal=null}attachComponentPortal(e){e.setAttachedHost(this);let t=e.viewContainerRef!=null?e.viewContainerRef:this._viewContainerRef,n=t.createComponent(e.component,{index:t.length,injector:e.injector||t.injector,projectableNodes:e.projectableNodes||void 0,ngModuleRef:this._moduleRef||void 0});return t!==this._viewContainerRef&&this._getRootNode().appendChild(n.hostView.rootNodes[0]),super.setDisposeFn(()=>n.destroy()),this._attachedPortal=e,this._attachedRef=n,this.attached.emit(n),n}attachTemplatePortal(e){e.setAttachedHost(this);let t=this._viewContainerRef.createEmbeddedView(e.templateRef,e.context,{injector:e.injector});return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=e,this._attachedRef=t,this.attached.emit(t),t}attachDomPortal=e=>{let t=e.element;t.parentNode;let n=this._document.createComment("dom-portal");e.setAttachedHost(this),t.parentNode.insertBefore(n,t),this._getRootNode().appendChild(t),this._attachedPortal=e,super.setDisposeFn(()=>{n.parentNode&&n.parentNode.replaceChild(t,n)})};_getRootNode(){let e=this._viewContainerRef.element.nativeElement;return e.nodeType===e.ELEMENT_NODE?e:e.parentNode}static \u0275fac=function(t){return new(t||o)};static \u0275dir=F({type:o,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:[0,"cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[Y]})}return o})();var Ae=(()=>{class o{static \u0275fac=function(t){return new(t||o)};static \u0275mod=N({type:o});static \u0275inj=L({})}return o})();var yi;function ts(){if(yi==null){let o=typeof document<"u"?document.head:null;yi=!!(o&&(o.createShadowRoot||o.attachShadow))}return yi}function Yn(o){if(ts()){let i=o.getRootNode?o.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&i instanceof ShadowRoot)return i}return null}function Vt(){let o=typeof document<"u"&&document?document.activeElement:null;for(;o&&o.shadowRoot;){let i=o.shadowRoot.activeElement;if(i===o)break;o=i}return o}function ie(o){return o.composedPath?o.composedPath()[0]:o.target}function Ci(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}var Ht=new WeakMap,Ye=(()=>{class o{_appRef;_injector=h(E);_environmentInjector=h(xe);load(e){let t=this._appRef=this._appRef||this._injector.get(Ue),n=Ht.get(t);n||(n={loaders:new Set,refs:[]},Ht.set(t,n),t.onDestroy(()=>{Ht.get(t)?.refs.forEach(s=>s.destroy()),Ht.delete(t)})),n.loaders.has(e)||(n.loaders.add(e),n.refs.push(At(e,{environmentInjector:this._environmentInjector})))}static \u0275fac=function(t){return new(t||o)};static \u0275prov=y({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();function M(o){return o==null?"":typeof o=="string"?o:`${o}px`}var bi={},ge=(()=>{class o{_appId=h(ln);getId(e){return this._appId!=="ng"&&(e+=this._appId),bi.hasOwnProperty(e)||(bi[e]=0),`${e}${bi[e]++}`}static \u0275fac=function(t){return new(t||o)};static \u0275prov=y({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();function me(o,...i){return i.length?i.some(e=>o[e]):o.altKey||o.shiftKey||o.ctrlKey||o.metaKey}var Kn=Nt();function Xe(o){return new Gt(o.get(Oe),o.get(P))}var Gt=class{_viewportRuler;_previousHTMLStyles={top:"",left:""};_previousScrollPosition;_isEnabled=!1;_document;constructor(i,e){this._viewportRuler=i,this._document=e}attach(){}enable(){if(this._canBeEnabled()){let i=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=i.style.left||"",this._previousHTMLStyles.top=i.style.top||"",i.style.left=M(-this._previousScrollPosition.left),i.style.top=M(-this._previousScrollPosition.top),i.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){let i=this._document.documentElement,e=this._document.body,t=i.style,n=e.style,s=t.scrollBehavior||"",r=n.scrollBehavior||"";this._isEnabled=!1,t.left=this._previousHTMLStyles.left,t.top=this._previousHTMLStyles.top,i.classList.remove("cdk-global-scrollblock"),Kn&&(t.scrollBehavior=n.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),Kn&&(t.scrollBehavior=s,n.scrollBehavior=r)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;let e=this._document.documentElement,t=this._viewportRuler.getViewportSize();return e.scrollHeight>t.height||e.scrollWidth>t.width}};function to(o,i){return new Wt(o.get(ot),o.get(U),o.get(Oe),i)}var Wt=class{_scrollDispatcher;_ngZone;_viewportRuler;_config;_scrollSubscription=null;_overlayRef;_initialScrollPosition;constructor(i,e,t,n){this._scrollDispatcher=i,this._ngZone=e,this._viewportRuler=t,this._config=n}attach(i){this._overlayRef,this._overlayRef=i}enable(){if(this._scrollSubscription)return;let i=this._scrollDispatcher.scrolled(0).pipe(D(e=>!e||!this._overlayRef.overlayElement.contains(e.getElementRef().nativeElement)));this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=i.subscribe(()=>{let e=this._viewportRuler.getViewportScrollPosition().top;Math.abs(e-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=i.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}_detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}};var ct=class{enable(){}disable(){}attach(){}};function Si(o,i){return i.some(e=>{let t=o.bottom<e.top,n=o.top>e.bottom,s=o.right<e.left,r=o.left>e.right;return t||n||s||r})}function Xn(o,i){return i.some(e=>{let t=o.top<e.top,n=o.bottom>e.bottom,s=o.left<e.left,r=o.right>e.right;return t||n||s||r})}function Qt(o,i){return new Yt(o.get(ot),o.get(Oe),o.get(U),i)}var Yt=class{_scrollDispatcher;_viewportRuler;_ngZone;_config;_scrollSubscription=null;_overlayRef;constructor(i,e,t,n){this._scrollDispatcher=i,this._viewportRuler=e,this._ngZone=t,this._config=n}attach(i){this._overlayRef,this._overlayRef=i}enable(){if(!this._scrollSubscription){let i=this._config?this._config.scrollThrottle:0;this._scrollSubscription=this._scrollDispatcher.scrolled(i).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){let e=this._overlayRef.overlayElement.getBoundingClientRect(),{width:t,height:n}=this._viewportRuler.getViewportSize();Si(e,[{width:t,height:n,bottom:n,right:t,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}})}}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}},io=(()=>{class o{_injector=h(E);constructor(){}noop=()=>new ct;close=e=>to(this._injector,e);block=()=>Xe(this._injector);reposition=e=>Qt(this._injector,e);static \u0275fac=function(t){return new(t||o)};static \u0275prov=y({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})(),Re=class{positionStrategy;scrollStrategy=new ct;panelClass="";hasBackdrop=!1;backdropClass="cdk-overlay-dark-backdrop";disableAnimations;width;height;minWidth;minHeight;maxWidth;maxHeight;direction;disposeOnNavigation=!1;constructor(i){if(i){let e=Object.keys(i);for(let t of e)i[t]!==void 0&&(this[t]=i[t])}}},Ii=class{offsetX;offsetY;panelClass;originX;originY;overlayX;overlayY;constructor(i,e,t,n,s){this.offsetX=t,this.offsetY=n,this.panelClass=s,this.originX=i.originX,this.originY=i.originY,this.overlayX=e.overlayX,this.overlayY=e.overlayY}};var Kt=class{connectionPair;scrollableViewProperties;constructor(i,e){this.connectionPair=i,this.scrollableViewProperties=e}};var no=(()=>{class o{_attachedOverlays=[];_document=h(P);_isAttached;constructor(){}ngOnDestroy(){this.detach()}add(e){this.remove(e),this._attachedOverlays.push(e)}remove(e){let t=this._attachedOverlays.indexOf(e);t>-1&&this._attachedOverlays.splice(t,1),this._attachedOverlays.length===0&&this.detach()}static \u0275fac=function(t){return new(t||o)};static \u0275prov=y({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})(),oo=(()=>{class o extends no{_ngZone=h(U);_renderer=h(ae).createRenderer(null,null);_cleanupKeydown;add(e){super.add(e),this._isAttached||(this._ngZone.runOutsideAngular(()=>{this._cleanupKeydown=this._renderer.listen("body","keydown",this._keydownListener)}),this._isAttached=!0)}detach(){this._isAttached&&(this._cleanupKeydown?.(),this._isAttached=!1)}_keydownListener=e=>{let t=this._attachedOverlays;for(let n=t.length-1;n>-1;n--)if(t[n]._keydownEvents.observers.length>0){this._ngZone.run(()=>t[n]._keydownEvents.next(e));break}};static \u0275fac=(()=>{let e;return function(n){return(e||(e=ue(o)))(n||o)}})();static \u0275prov=y({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})(),so=(()=>{class o extends no{_platform=h(H);_ngZone=h(U);_renderer=h(ae).createRenderer(null,null);_cursorOriginalValue;_cursorStyleIsSet=!1;_pointerDownEventTarget;_cleanups;add(e){if(super.add(e),!this._isAttached){let t=this._document.body,n={capture:!0},s=this._renderer;this._cleanups=this._ngZone.runOutsideAngular(()=>[s.listen(t,"pointerdown",this._pointerDownListener,n),s.listen(t,"click",this._clickListener,n),s.listen(t,"auxclick",this._clickListener,n),s.listen(t,"contextmenu",this._clickListener,n)]),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=t.style.cursor,t.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}detach(){this._isAttached&&(this._cleanups?.forEach(e=>e()),this._cleanups=void 0,this._platform.IOS&&this._cursorStyleIsSet&&(this._document.body.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1)}_pointerDownListener=e=>{this._pointerDownEventTarget=ie(e)};_clickListener=e=>{let t=ie(e),n=e.type==="click"&&this._pointerDownEventTarget?this._pointerDownEventTarget:t;this._pointerDownEventTarget=null;let s=this._attachedOverlays.slice();for(let r=s.length-1;r>-1;r--){let a=s[r];if(a._outsidePointerEvents.observers.length<1||!a.hasAttached())continue;if(Zn(a.overlayElement,t)||Zn(a.overlayElement,n))break;let c=a._outsidePointerEvents;this._ngZone?this._ngZone.run(()=>c.next(e)):c.next(e)}};static \u0275fac=(()=>{let e;return function(n){return(e||(e=ue(o)))(n||o)}})();static \u0275prov=y({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();function Zn(o,i){let e=typeof ShadowRoot<"u"&&ShadowRoot,t=i;for(;t;){if(t===o)return!0;t=e&&t instanceof ShadowRoot?t.host:t.parentNode}return!1}var ro=(()=>{class o{static \u0275fac=function(t){return new(t||o)};static \u0275cmp=W({type:o,selectors:[["ng-component"]],hostAttrs:["cdk-overlay-style-loader",""],decls:0,vars:0,template:function(t,n){},styles:[`.cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed}@layer cdk-overlay{.cdk-overlay-container{z-index:1000}}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute}@layer cdk-overlay{.cdk-global-overlay-wrapper{z-index:1000}}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;display:flex;max-width:100%;max-height:100%}@layer cdk-overlay{.cdk-overlay-pane{z-index:1000}}.cdk-overlay-backdrop{position:absolute;top:0;bottom:0;left:0;right:0;pointer-events:auto;-webkit-tap-highlight-color:rgba(0,0,0,0);opacity:0;touch-action:manipulation}@layer cdk-overlay{.cdk-overlay-backdrop{z-index:1000;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}}@media(prefers-reduced-motion){.cdk-overlay-backdrop{transition-duration:1ms}}.cdk-overlay-backdrop-showing{opacity:1}@media(forced-colors: active){.cdk-overlay-backdrop-showing{opacity:.6}}@layer cdk-overlay{.cdk-overlay-dark-backdrop{background:rgba(0,0,0,.32)}}.cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing,.cdk-high-contrast-active .cdk-overlay-transparent-backdrop{opacity:0;visibility:visible}.cdk-overlay-backdrop-noop-animation{transition:none}.cdk-overlay-connected-position-bounding-box{position:absolute;display:flex;flex-direction:column;min-width:1px;min-height:1px}@layer cdk-overlay{.cdk-overlay-connected-position-bounding-box{z-index:1000}}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}
3
3
  `],encapsulation:2,changeDetection:0})}return o})(),qt=(()=>{class o{_platform=h(H);_containerElement;_document=h(P);_styleLoader=h(Ye);constructor(){}ngOnDestroy(){this._containerElement?.remove()}getContainerElement(){return this._loadStyles(),this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let e="cdk-overlay-container";if(this._platform.isBrowser||Ci()){let n=this._document.querySelectorAll(`.${e}[platform="server"], .${e}[platform="test"]`);for(let s=0;s<n.length;s++)n[s].remove()}let t=this._document.createElement("div");t.classList.add(e),Ci()?t.setAttribute("platform","test"):this._platform.isBrowser||t.setAttribute("platform","server"),this._document.body.appendChild(t),this._containerElement=t}_loadStyles(){this._styleLoader.load(ro)}static \u0275fac=function(t){return new(t||o)};static \u0275prov=y({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})(),Di=class{_renderer;_ngZone;element;_cleanupClick;_cleanupTransitionEnd;_fallbackTimeout;constructor(i,e,t,n){this._renderer=e,this._ngZone=t,this.element=i.createElement("div"),this.element.classList.add("cdk-overlay-backdrop"),this._cleanupClick=e.listen(this.element,"click",n)}detach(){this._ngZone.runOutsideAngular(()=>{let i=this.element;clearTimeout(this._fallbackTimeout),this._cleanupTransitionEnd?.(),this._cleanupTransitionEnd=this._renderer.listen(i,"transitionend",this.dispose),this._fallbackTimeout=setTimeout(this.dispose,500),i.style.pointerEvents="none",i.classList.remove("cdk-overlay-backdrop-showing")})}dispose=()=>{clearTimeout(this._fallbackTimeout),this._cleanupClick?.(),this._cleanupTransitionEnd?.(),this._cleanupClick=this._cleanupTransitionEnd=this._fallbackTimeout=void 0,this.element.remove()}},Ke=class{_portalOutlet;_host;_pane;_config;_ngZone;_keyboardDispatcher;_document;_location;_outsideClickDispatcher;_animationsDisabled;_injector;_renderer;_backdropClick=new _;_attachments=new _;_detachments=new _;_positionStrategy;_scrollStrategy;_locationChanges=Q.EMPTY;_backdropRef=null;_detachContentMutationObserver;_detachContentAfterRenderRef;_previousHostParent;_keydownEvents=new _;_outsidePointerEvents=new _;_afterNextRenderRef;constructor(i,e,t,n,s,r,a,c,d,l=!1,u,w){this._portalOutlet=i,this._host=e,this._pane=t,this._config=n,this._ngZone=s,this._keyboardDispatcher=r,this._document=a,this._location=c,this._outsideClickDispatcher=d,this._animationsDisabled=l,this._injector=u,this._renderer=w,n.scrollStrategy&&(this._scrollStrategy=n.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=n.positionStrategy}get overlayElement(){return this._pane}get backdropElement(){return this._backdropRef?.element||null}get hostElement(){return this._host}attach(i){!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host);let e=this._portalOutlet.attach(i);return this._positionStrategy&&this._positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._afterNextRenderRef?.destroy(),this._afterNextRenderRef=re(()=>{this.hasAttached()&&this.updatePosition()},{injector:this._injector}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._completeDetachContent(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),typeof e?.onDestroy=="function"&&e.onDestroy(()=>{this.hasAttached()&&this._ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>this.detach()))}),e}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();let i=this._portalOutlet.detach();return this._detachments.next(),this._completeDetachContent(),this._keyboardDispatcher.remove(this),this._detachContentWhenEmpty(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),i}dispose(){let i=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this._backdropRef?.dispose(),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),this._host?.remove(),this._afterNextRenderRef?.destroy(),this._previousHostParent=this._pane=this._host=this._backdropRef=null,i&&this._detachments.next(),this._detachments.complete(),this._completeDetachContent()}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(i){i!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=i,this.hasAttached()&&(i.attach(this),this.updatePosition()))}updateSize(i){this._config=p(p({},this._config),i),this._updateElementSize()}setDirection(i){this._config=z(p({},this._config),{direction:i}),this._updateElementDirection()}addPanelClass(i){this._pane&&this._toggleClasses(this._pane,i,!0)}removePanelClass(i){this._pane&&this._toggleClasses(this._pane,i,!1)}getDirection(){let i=this._config.direction;return i?typeof i=="string"?i:i.value:"ltr"}updateScrollStrategy(i){i!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=i,this.hasAttached()&&(i.attach(this),i.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;let i=this._pane.style;i.width=M(this._config.width),i.height=M(this._config.height),i.minWidth=M(this._config.minWidth),i.minHeight=M(this._config.minHeight),i.maxWidth=M(this._config.maxWidth),i.maxHeight=M(this._config.maxHeight)}_togglePointerEvents(i){this._pane.style.pointerEvents=i?"":"none"}_attachBackdrop(){let i="cdk-overlay-backdrop-showing";this._backdropRef?.dispose(),this._backdropRef=new Di(this._document,this._renderer,this._ngZone,e=>{this._backdropClick.next(e)}),this._animationsDisabled&&this._backdropRef.element.classList.add("cdk-overlay-backdrop-noop-animation"),this._config.backdropClass&&this._toggleClasses(this._backdropRef.element,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropRef.element,this._host),!this._animationsDisabled&&typeof requestAnimationFrame<"u"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>this._backdropRef?.element.classList.add(i))}):this._backdropRef.element.classList.add(i)}_updateStackingOrder(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){this._animationsDisabled?(this._backdropRef?.dispose(),this._backdropRef=null):this._backdropRef?.detach()}_toggleClasses(i,e,t){let n=kt(e||[]).filter(s=>!!s);n.length&&(t?i.classList.add(...n):i.classList.remove(...n))}_detachContentWhenEmpty(){let i=!1;try{this._detachContentAfterRenderRef=re(()=>{i=!0,this._detachContent()},{injector:this._injector})}catch(e){if(i)throw e;this._detachContent()}globalThis.MutationObserver&&this._pane&&(this._detachContentMutationObserver||=new globalThis.MutationObserver(()=>{this._detachContent()}),this._detachContentMutationObserver.observe(this._pane,{childList:!0}))}_detachContent(){(!this._pane||!this._host||this._pane.children.length===0)&&(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._host.remove()),this._completeDetachContent())}_completeDetachContent(){this._detachContentAfterRenderRef?.destroy(),this._detachContentAfterRenderRef=void 0,this._detachContentMutationObserver?.disconnect()}_disposeScrollStrategy(){let i=this._scrollStrategy;i?.disable(),i?.detach?.()}},Qn="cdk-overlay-connected-position-bounding-box",is=/([A-Za-z%]+)$/;function wi(o,i){return new Xt(i,o.get(Oe),o.get(P),o.get(H),o.get(qt))}var Xt=class{_viewportRuler;_document;_platform;_overlayContainer;_overlayRef;_isInitialRender;_lastBoundingBoxSize={width:0,height:0};_isPushed=!1;_canPush=!0;_growAfterOpen=!1;_hasFlexibleDimensions=!0;_positionLocked=!1;_originRect;_overlayRect;_viewportRect;_containerRect;_viewportMargin=0;_scrollables=[];_preferredPositions=[];_origin;_pane;_isDisposed;_boundingBox;_lastPosition;_lastScrollVisibility;_positionChanges=new _;_resizeSubscription=Q.EMPTY;_offsetX=0;_offsetY=0;_transformOriginSelector;_appliedPanelClasses=[];_previousPushAmount;positionChanges=this._positionChanges;get positions(){return this._preferredPositions}constructor(i,e,t,n,s){this._viewportRuler=e,this._document=t,this._platform=n,this._overlayContainer=s,this.setOrigin(i)}attach(i){this._overlayRef&&this._overlayRef,this._validatePositions(),i.hostElement.classList.add(Qn),this._overlayRef=i,this._boundingBox=i.hostElement,this._pane=i.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition){this.reapplyLastPosition();return}this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let i=this._originRect,e=this._overlayRect,t=this._viewportRect,n=this._containerRect,s=[],r;for(let a of this._preferredPositions){let c=this._getOriginPoint(i,n,a),d=this._getOverlayPoint(c,e,a),l=this._getOverlayFit(d,e,t,a);if(l.isCompletelyWithinViewport){this._isPushed=!1,this._applyPosition(a,c);return}if(this._canFitWithFlexibleDimensions(l,d,t)){s.push({position:a,origin:c,overlayRect:e,boundingBoxRect:this._calculateBoundingBoxRect(c,a)});continue}(!r||r.overlayFit.visibleArea<l.visibleArea)&&(r={overlayFit:l,overlayPoint:d,originPoint:c,position:a,overlayRect:e})}if(s.length){let a=null,c=-1;for(let d of s){let l=d.boundingBoxRect.width*d.boundingBoxRect.height*(d.position.weight||1);l>c&&(c=l,a=d)}this._isPushed=!1,this._applyPosition(a.position,a.origin);return}if(this._canPush){this._isPushed=!0,this._applyPosition(r.position,r.originPoint);return}this._applyPosition(r.position,r.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&ke(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(Qn),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(this._isDisposed||!this._platform.isBrowser)return;let i=this._lastPosition;if(i){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let e=this._getOriginPoint(this._originRect,this._containerRect,i);this._applyPosition(i,e)}else this.apply()}withScrollableContainers(i){return this._scrollables=i,this}withPositions(i){return this._preferredPositions=i,i.indexOf(this._lastPosition)===-1&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(i){return this._viewportMargin=i,this}withFlexibleDimensions(i=!0){return this._hasFlexibleDimensions=i,this}withGrowAfterOpen(i=!0){return this._growAfterOpen=i,this}withPush(i=!0){return this._canPush=i,this}withLockedPosition(i=!0){return this._positionLocked=i,this}setOrigin(i){return this._origin=i,this}withDefaultOffsetX(i){return this._offsetX=i,this}withDefaultOffsetY(i){return this._offsetY=i,this}withTransformOriginOn(i){return this._transformOriginSelector=i,this}_getOriginPoint(i,e,t){let n;if(t.originX=="center")n=i.left+i.width/2;else{let r=this._isRtl()?i.right:i.left,a=this._isRtl()?i.left:i.right;n=t.originX=="start"?r:a}e.left<0&&(n-=e.left);let s;return t.originY=="center"?s=i.top+i.height/2:s=t.originY=="top"?i.top:i.bottom,e.top<0&&(s-=e.top),{x:n,y:s}}_getOverlayPoint(i,e,t){let n;t.overlayX=="center"?n=-e.width/2:t.overlayX==="start"?n=this._isRtl()?-e.width:0:n=this._isRtl()?0:-e.width;let s;return t.overlayY=="center"?s=-e.height/2:s=t.overlayY=="top"?0:-e.height,{x:i.x+n,y:i.y+s}}_getOverlayFit(i,e,t,n){let s=Jn(e),{x:r,y:a}=i,c=this._getOffset(n,"x"),d=this._getOffset(n,"y");c&&(r+=c),d&&(a+=d);let l=0-r,u=r+s.width-t.width,w=0-a,f=a+s.height-t.height,m=this._subtractOverflows(s.width,l,u),I=this._subtractOverflows(s.height,w,f),K=m*I;return{visibleArea:K,isCompletelyWithinViewport:s.width*s.height===K,fitsInViewportVertically:I===s.height,fitsInViewportHorizontally:m==s.width}}_canFitWithFlexibleDimensions(i,e,t){if(this._hasFlexibleDimensions){let n=t.bottom-e.y,s=t.right-e.x,r=qn(this._overlayRef.getConfig().minHeight),a=qn(this._overlayRef.getConfig().minWidth),c=i.fitsInViewportVertically||r!=null&&r<=n,d=i.fitsInViewportHorizontally||a!=null&&a<=s;return c&&d}return!1}_pushOverlayOnScreen(i,e,t){if(this._previousPushAmount&&this._positionLocked)return{x:i.x+this._previousPushAmount.x,y:i.y+this._previousPushAmount.y};let n=Jn(e),s=this._viewportRect,r=Math.max(i.x+n.width-s.width,0),a=Math.max(i.y+n.height-s.height,0),c=Math.max(s.top-t.top-i.y,0),d=Math.max(s.left-t.left-i.x,0),l=0,u=0;return n.width<=s.width?l=d||-r:l=i.x<this._viewportMargin?s.left-t.left-i.x:0,n.height<=s.height?u=c||-a:u=i.y<this._viewportMargin?s.top-t.top-i.y:0,this._previousPushAmount={x:l,y:u},{x:i.x+l,y:i.y+u}}_applyPosition(i,e){if(this._setTransformOrigin(i),this._setOverlayElementStyles(e,i),this._setBoundingBoxStyles(e,i),i.panelClass&&this._addPanelClasses(i.panelClass),this._positionChanges.observers.length){let t=this._getScrollVisibility();if(i!==this._lastPosition||!this._lastScrollVisibility||!ns(this._lastScrollVisibility,t)){let n=new Kt(i,t);this._positionChanges.next(n)}this._lastScrollVisibility=t}this._lastPosition=i,this._isInitialRender=!1}_setTransformOrigin(i){if(!this._transformOriginSelector)return;let e=this._boundingBox.querySelectorAll(this._transformOriginSelector),t,n=i.overlayY;i.overlayX==="center"?t="center":this._isRtl()?t=i.overlayX==="start"?"right":"left":t=i.overlayX==="start"?"left":"right";for(let s=0;s<e.length;s++)e[s].style.transformOrigin=`${t} ${n}`}_calculateBoundingBoxRect(i,e){let t=this._viewportRect,n=this._isRtl(),s,r,a;if(e.overlayY==="top")r=i.y,s=t.height-r+this._viewportMargin;else if(e.overlayY==="bottom")a=t.height-i.y+this._viewportMargin*2,s=t.height-a+this._viewportMargin;else{let f=Math.min(t.bottom-i.y+t.top,i.y),m=this._lastBoundingBoxSize.height;s=f*2,r=i.y-f,s>m&&!this._isInitialRender&&!this._growAfterOpen&&(r=i.y-m/2)}let c=e.overlayX==="start"&&!n||e.overlayX==="end"&&n,d=e.overlayX==="end"&&!n||e.overlayX==="start"&&n,l,u,w;if(d)w=t.width-i.x+this._viewportMargin*2,l=i.x-this._viewportMargin;else if(c)u=i.x,l=t.right-i.x;else{let f=Math.min(t.right-i.x+t.left,i.x),m=this._lastBoundingBoxSize.width;l=f*2,u=i.x-f,l>m&&!this._isInitialRender&&!this._growAfterOpen&&(u=i.x-m/2)}return{top:r,left:u,bottom:a,right:w,width:l,height:s}}_setBoundingBoxStyles(i,e){let t=this._calculateBoundingBoxRect(i,e);!this._isInitialRender&&!this._growAfterOpen&&(t.height=Math.min(t.height,this._lastBoundingBoxSize.height),t.width=Math.min(t.width,this._lastBoundingBoxSize.width));let n={};if(this._hasExactPosition())n.top=n.left="0",n.bottom=n.right=n.maxHeight=n.maxWidth="",n.width=n.height="100%";else{let s=this._overlayRef.getConfig().maxHeight,r=this._overlayRef.getConfig().maxWidth;n.height=M(t.height),n.top=M(t.top),n.bottom=M(t.bottom),n.width=M(t.width),n.left=M(t.left),n.right=M(t.right),e.overlayX==="center"?n.alignItems="center":n.alignItems=e.overlayX==="end"?"flex-end":"flex-start",e.overlayY==="center"?n.justifyContent="center":n.justifyContent=e.overlayY==="bottom"?"flex-end":"flex-start",s&&(n.maxHeight=M(s)),r&&(n.maxWidth=M(r))}this._lastBoundingBoxSize=t,ke(this._boundingBox.style,n)}_resetBoundingBoxStyles(){ke(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){ke(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(i,e){let t={},n=this._hasExactPosition(),s=this._hasFlexibleDimensions,r=this._overlayRef.getConfig();if(n){let l=this._viewportRuler.getViewportScrollPosition();ke(t,this._getExactOverlayY(e,i,l)),ke(t,this._getExactOverlayX(e,i,l))}else t.position="static";let a="",c=this._getOffset(e,"x"),d=this._getOffset(e,"y");c&&(a+=`translateX(${c}px) `),d&&(a+=`translateY(${d}px)`),t.transform=a.trim(),r.maxHeight&&(n?t.maxHeight=M(r.maxHeight):s&&(t.maxHeight="")),r.maxWidth&&(n?t.maxWidth=M(r.maxWidth):s&&(t.maxWidth="")),ke(this._pane.style,t)}_getExactOverlayY(i,e,t){let n={top:"",bottom:""},s=this._getOverlayPoint(e,this._overlayRect,i);if(this._isPushed&&(s=this._pushOverlayOnScreen(s,this._overlayRect,t)),i.overlayY==="bottom"){let r=this._document.documentElement.clientHeight;n.bottom=`${r-(s.y+this._overlayRect.height)}px`}else n.top=M(s.y);return n}_getExactOverlayX(i,e,t){let n={left:"",right:""},s=this._getOverlayPoint(e,this._overlayRect,i);this._isPushed&&(s=this._pushOverlayOnScreen(s,this._overlayRect,t));let r;if(this._isRtl()?r=i.overlayX==="end"?"left":"right":r=i.overlayX==="end"?"right":"left",r==="right"){let a=this._document.documentElement.clientWidth;n.right=`${a-(s.x+this._overlayRect.width)}px`}else n.left=M(s.x);return n}_getScrollVisibility(){let i=this._getOriginRect(),e=this._pane.getBoundingClientRect(),t=this._scrollables.map(n=>n.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:Xn(i,t),isOriginOutsideView:Si(i,t),isOverlayClipped:Xn(e,t),isOverlayOutsideView:Si(e,t)}}_subtractOverflows(i,...e){return e.reduce((t,n)=>t-Math.max(n,0),i)}_getNarrowedViewportRect(){let i=this._document.documentElement.clientWidth,e=this._document.documentElement.clientHeight,t=this._viewportRuler.getViewportScrollPosition();return{top:t.top+this._viewportMargin,left:t.left+this._viewportMargin,right:t.left+i-this._viewportMargin,bottom:t.top+e-this._viewportMargin,width:i-2*this._viewportMargin,height:e-2*this._viewportMargin}}_isRtl(){return this._overlayRef.getDirection()==="rtl"}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(i,e){return e==="x"?i.offsetX==null?this._offsetX:i.offsetX:i.offsetY==null?this._offsetY:i.offsetY}_validatePositions(){}_addPanelClasses(i){this._pane&&kt(i).forEach(e=>{e!==""&&this._appliedPanelClasses.indexOf(e)===-1&&(this._appliedPanelClasses.push(e),this._pane.classList.add(e))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(i=>{this._pane.classList.remove(i)}),this._appliedPanelClasses=[])}_getOriginRect(){let i=this._origin;if(i instanceof k)return i.nativeElement.getBoundingClientRect();if(i instanceof Element)return i.getBoundingClientRect();let e=i.width||0,t=i.height||0;return{top:i.y,bottom:i.y+t,left:i.x,right:i.x+e,height:t,width:e}}};function ke(o,i){for(let e in i)i.hasOwnProperty(e)&&(o[e]=i[e]);return o}function qn(o){if(typeof o!="number"&&o!=null){let[i,e]=o.split(is);return!e||e==="px"?parseFloat(i):null}return o||null}function Jn(o){return{top:Math.floor(o.top),right:Math.floor(o.right),bottom:Math.floor(o.bottom),left:Math.floor(o.left),width:Math.floor(o.width),height:Math.floor(o.height)}}function ns(o,i){return o===i?!0:o.isOriginClipped===i.isOriginClipped&&o.isOriginOutsideView===i.isOriginOutsideView&&o.isOverlayClipped===i.isOverlayClipped&&o.isOverlayOutsideView===i.isOverlayOutsideView}var eo="cdk-global-overlay-wrapper";function Ze(o){return new Zt}var Zt=class{_overlayRef;_cssPosition="static";_topOffset="";_bottomOffset="";_alignItems="";_xPosition="";_xOffset="";_width="";_height="";_isDisposed=!1;attach(i){let e=i.getConfig();this._overlayRef=i,this._width&&!e.width&&i.updateSize({width:this._width}),this._height&&!e.height&&i.updateSize({height:this._height}),i.hostElement.classList.add(eo),this._isDisposed=!1}top(i=""){return this._bottomOffset="",this._topOffset=i,this._alignItems="flex-start",this}left(i=""){return this._xOffset=i,this._xPosition="left",this}bottom(i=""){return this._topOffset="",this._bottomOffset=i,this._alignItems="flex-end",this}right(i=""){return this._xOffset=i,this._xPosition="right",this}start(i=""){return this._xOffset=i,this._xPosition="start",this}end(i=""){return this._xOffset=i,this._xPosition="end",this}width(i=""){return this._overlayRef?this._overlayRef.updateSize({width:i}):this._width=i,this}height(i=""){return this._overlayRef?this._overlayRef.updateSize({height:i}):this._height=i,this}centerHorizontally(i=""){return this.left(i),this._xPosition="center",this}centerVertically(i=""){return this.top(i),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;let i=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement.style,t=this._overlayRef.getConfig(),{width:n,height:s,maxWidth:r,maxHeight:a}=t,c=(n==="100%"||n==="100vw")&&(!r||r==="100%"||r==="100vw"),d=(s==="100%"||s==="100vh")&&(!a||a==="100%"||a==="100vh"),l=this._xPosition,u=this._xOffset,w=this._overlayRef.getConfig().direction==="rtl",f="",m="",I="";c?I="flex-start":l==="center"?(I="center",w?m=u:f=u):w?l==="left"||l==="end"?(I="flex-end",f=u):(l==="right"||l==="start")&&(I="flex-start",m=u):l==="left"||l==="start"?(I="flex-start",f=u):(l==="right"||l==="end")&&(I="flex-end",m=u),i.position=this._cssPosition,i.marginLeft=c?"0":f,i.marginTop=d?"0":this._topOffset,i.marginBottom=this._bottomOffset,i.marginRight=c?"0":m,e.justifyContent=I,e.alignItems=d?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;let i=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement,t=e.style;e.classList.remove(eo),t.justifyContent=t.alignItems=i.marginTop=i.marginBottom=i.marginLeft=i.marginRight=i.position="",this._overlayRef=null,this._isDisposed=!0}},ao=(()=>{class o{_injector=h(E);constructor(){}global(){return Ze()}flexibleConnectedTo(e){return wi(this._injector,e)}static \u0275fac=function(t){return new(t||o)};static \u0275prov=y({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();function lt(o,i){o.get(Ye).load(ro);let e=o.get(qt),t=o.get(P),n=o.get(ge),s=o.get(Ue),r=o.get(le),a=t.createElement("div"),c=t.createElement("div");c.id=n.getId("cdk-overlay-"),c.classList.add("cdk-overlay-pane"),a.appendChild(c),e.getContainerElement().appendChild(a);let d=new $t(c,s,o),l=new Re(i),u=o.get(Fe,null,{optional:!0})||o.get(ae).createRenderer(null,null);return l.direction=l.direction||r.value,new Ke(d,a,c,l,o.get(U),o.get(oo),t,o.get(In),o.get(so),i?.disableAnimations??o.get(It,null,{optional:!0})==="NoopAnimations",o.get(xe),u)}var co=(()=>{class o{scrollStrategies=h(io);_positionBuilder=h(ao);_injector=h(E);constructor(){}create(e){return lt(this._injector,e)}position(){return this._positionBuilder}static \u0275fac=function(t){return new(t||o)};static \u0275prov=y({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})(),os=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],lo=new A("cdk-connected-overlay-scroll-strategy",{providedIn:"root",factory:()=>{let o=h(E);return()=>Qt(o)}}),Ei=(()=>{class o{elementRef=h(k);constructor(){}static \u0275fac=function(t){return new(t||o)};static \u0275dir=F({type:o,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"]})}return o})(),ss=(()=>{class o{_dir=h(le,{optional:!0});_injector=h(E);_overlayRef;_templatePortal;_backdropSubscription=Q.EMPTY;_attachSubscription=Q.EMPTY;_detachSubscription=Q.EMPTY;_positionSubscription=Q.EMPTY;_offsetX;_offsetY;_position;_scrollStrategyFactory=h(lo);_disposeOnNavigation=!1;_ngZone=h(U);origin;positions;positionStrategy;get offsetX(){return this._offsetX}set offsetX(e){this._offsetX=e,this._position&&this._updatePositionStrategy(this._position)}get offsetY(){return this._offsetY}set offsetY(e){this._offsetY=e,this._position&&this._updatePositionStrategy(this._position)}width;height;minWidth;minHeight;backdropClass;panelClass;viewportMargin=0;scrollStrategy;open=!1;disableClose=!1;transformOriginSelector;hasBackdrop=!1;lockPosition=!1;flexibleDimensions=!1;growAfterOpen=!1;push=!1;get disposeOnNavigation(){return this._disposeOnNavigation}set disposeOnNavigation(e){this._disposeOnNavigation=e}backdropClick=new B;positionChange=new B;attach=new B;detach=new B;overlayKeydown=new B;overlayOutsideClick=new B;constructor(){let e=h(be),t=h(Le);this._templatePortal=new we(e,t),this.scrollStrategy=this._scrollStrategyFactory()}get overlayRef(){return this._overlayRef}get dir(){return this._dir?this._dir.value:"ltr"}ngOnDestroy(){this._attachSubscription.unsubscribe(),this._detachSubscription.unsubscribe(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this._overlayRef?.dispose()}ngOnChanges(e){this._position&&(this._updatePositionStrategy(this._position),this._overlayRef?.updateSize({width:this.width,minWidth:this.minWidth,height:this.height,minHeight:this.minHeight}),e.origin&&this.open&&this._position.apply()),e.open&&(this.open?this.attachOverlay():this.detachOverlay())}_createOverlay(){(!this.positions||!this.positions.length)&&(this.positions=os);let e=this._overlayRef=lt(this._injector,this._buildConfig());this._attachSubscription=e.attachments().subscribe(()=>this.attach.emit()),this._detachSubscription=e.detachments().subscribe(()=>this.detach.emit()),e.keydownEvents().subscribe(t=>{this.overlayKeydown.next(t),t.keyCode===27&&!this.disableClose&&!me(t)&&(t.preventDefault(),this.detachOverlay())}),this._overlayRef.outsidePointerEvents().subscribe(t=>{let n=this._getOriginElement(),s=ie(t);(!n||n!==s&&!n.contains(s))&&this.overlayOutsideClick.next(t)})}_buildConfig(){let e=this._position=this.positionStrategy||this._createPositionStrategy(),t=new Re({direction:this._dir||"ltr",positionStrategy:e,scrollStrategy:this.scrollStrategy,hasBackdrop:this.hasBackdrop,disposeOnNavigation:this.disposeOnNavigation});return(this.width||this.width===0)&&(t.width=this.width),(this.height||this.height===0)&&(t.height=this.height),(this.minWidth||this.minWidth===0)&&(t.minWidth=this.minWidth),(this.minHeight||this.minHeight===0)&&(t.minHeight=this.minHeight),this.backdropClass&&(t.backdropClass=this.backdropClass),this.panelClass&&(t.panelClass=this.panelClass),t}_updatePositionStrategy(e){let t=this.positions.map(n=>({originX:n.originX,originY:n.originY,overlayX:n.overlayX,overlayY:n.overlayY,offsetX:n.offsetX||this.offsetX,offsetY:n.offsetY||this.offsetY,panelClass:n.panelClass||void 0}));return e.setOrigin(this._getOrigin()).withPositions(t).withFlexibleDimensions(this.flexibleDimensions).withPush(this.push).withGrowAfterOpen(this.growAfterOpen).withViewportMargin(this.viewportMargin).withLockedPosition(this.lockPosition).withTransformOriginOn(this.transformOriginSelector)}_createPositionStrategy(){let e=wi(this._injector,this._getOrigin());return this._updatePositionStrategy(e),e}_getOrigin(){return this.origin instanceof Ei?this.origin.elementRef:this.origin}_getOriginElement(){return this.origin instanceof Ei?this.origin.elementRef.nativeElement:this.origin instanceof k?this.origin.nativeElement:typeof Element<"u"&&this.origin instanceof Element?this.origin:null}attachOverlay(){this._overlayRef?this._overlayRef.getConfig().hasBackdrop=this.hasBackdrop:this._createOverlay(),this._overlayRef.hasAttached()||this._overlayRef.attach(this._templatePortal),this.hasBackdrop?this._backdropSubscription=this._overlayRef.backdropClick().subscribe(e=>{this.backdropClick.emit(e)}):this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.positionChange.observers.length>0&&(this._positionSubscription=this._position.positionChanges.pipe(nn(()=>this.positionChange.observers.length>0)).subscribe(e=>{this._ngZone.run(()=>this.positionChange.emit(e)),this.positionChange.observers.length===0&&this._positionSubscription.unsubscribe()})),this.open=!0}detachOverlay(){this._overlayRef?.detach(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.open=!1}static \u0275fac=function(t){return new(t||o)};static \u0275dir=F({type:o,selectors:[["","cdk-connected-overlay",""],["","connected-overlay",""],["","cdkConnectedOverlay",""]],inputs:{origin:[0,"cdkConnectedOverlayOrigin","origin"],positions:[0,"cdkConnectedOverlayPositions","positions"],positionStrategy:[0,"cdkConnectedOverlayPositionStrategy","positionStrategy"],offsetX:[0,"cdkConnectedOverlayOffsetX","offsetX"],offsetY:[0,"cdkConnectedOverlayOffsetY","offsetY"],width:[0,"cdkConnectedOverlayWidth","width"],height:[0,"cdkConnectedOverlayHeight","height"],minWidth:[0,"cdkConnectedOverlayMinWidth","minWidth"],minHeight:[0,"cdkConnectedOverlayMinHeight","minHeight"],backdropClass:[0,"cdkConnectedOverlayBackdropClass","backdropClass"],panelClass:[0,"cdkConnectedOverlayPanelClass","panelClass"],viewportMargin:[0,"cdkConnectedOverlayViewportMargin","viewportMargin"],scrollStrategy:[0,"cdkConnectedOverlayScrollStrategy","scrollStrategy"],open:[0,"cdkConnectedOverlayOpen","open"],disableClose:[0,"cdkConnectedOverlayDisableClose","disableClose"],transformOriginSelector:[0,"cdkConnectedOverlayTransformOriginOn","transformOriginSelector"],hasBackdrop:[2,"cdkConnectedOverlayHasBackdrop","hasBackdrop",ee],lockPosition:[2,"cdkConnectedOverlayLockPosition","lockPosition",ee],flexibleDimensions:[2,"cdkConnectedOverlayFlexibleDimensions","flexibleDimensions",ee],growAfterOpen:[2,"cdkConnectedOverlayGrowAfterOpen","growAfterOpen",ee],push:[2,"cdkConnectedOverlayPush","push",ee],disposeOnNavigation:[2,"cdkConnectedOverlayDisposeOnNavigation","disposeOnNavigation",ee]},outputs:{backdropClick:"backdropClick",positionChange:"positionChange",attach:"attach",detach:"detach",overlayKeydown:"overlayKeydown",overlayOutsideClick:"overlayOutsideClick"},exportAs:["cdkConnectedOverlay"],features:[se]})}return o})();function rs(o){let i=h(E);return()=>Qt(i)}var as={provide:lo,useFactory:rs},dt=(()=>{class o{static \u0275fac=function(t){return new(t||o)};static \u0275mod=N({type:o});static \u0275inj=L({providers:[co,as],imports:[pe,Ae,_i,_i]})}return o})();function Ai(o){return o.buttons===0||o.detail===0}function ki(o){let i=o.touches&&o.touches[0]||o.changedTouches&&o.changedTouches[0];return!!i&&i.identifier===-1&&(i.radiusX==null||i.radiusX===1)&&(i.radiusY==null||i.radiusY===1)}var ht;function cs(){if(ht==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>ht=!0}))}finally{ht=ht||!1}return ht}function ho(o){return cs()?o:!!o.capture}var uo=new A("cdk-input-modality-detector-options"),fo={ignoreKeys:[18,17,224,91,16]},po=650,Ri={passive:!0,capture:!0},go=(()=>{class o{_platform=h(H);_listenerCleanups;modalityDetected;modalityChanged;get mostRecentModality(){return this._modality.value}_mostRecentTarget=null;_modality=new b(null);_options;_lastTouchMs=0;_onKeydown=e=>{this._options?.ignoreKeys?.some(t=>t===e.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=ie(e))};_onMousedown=e=>{Date.now()-this._lastTouchMs<po||(this._modality.next(Ai(e)?"keyboard":"mouse"),this._mostRecentTarget=ie(e))};_onTouchstart=e=>{if(ki(e)){this._modality.next("keyboard");return}this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=ie(e)};constructor(){let e=h(U),t=h(P),n=h(uo,{optional:!0});if(this._options=p(p({},fo),n),this.modalityDetected=this._modality.pipe(tn(1)),this.modalityChanged=this.modalityDetected.pipe(oe()),this._platform.isBrowser){let s=h(ae).createRenderer(null,null);this._listenerCleanups=e.runOutsideAngular(()=>[s.listen(t,"keydown",this._onKeydown,Ri),s.listen(t,"mousedown",this._onMousedown,Ri),s.listen(t,"touchstart",this._onTouchstart,Ri)])}}ngOnDestroy(){this._modality.complete(),this._listenerCleanups?.forEach(e=>e())}static \u0275fac=function(t){return new(t||o)};static \u0275prov=y({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})(),ut=(function(o){return o[o.IMMEDIATE=0]="IMMEDIATE",o[o.EVENTUAL=1]="EVENTUAL",o})(ut||{}),mo=new A("cdk-focus-monitor-default-options"),Jt=ho({passive:!0,capture:!0}),Ti=(()=>{class o{_ngZone=h(U);_platform=h(H);_inputModalityDetector=h(go);_origin=null;_lastFocusOrigin;_windowFocused=!1;_windowFocusTimeoutId;_originTimeoutId;_originFromTouchInteraction=!1;_elementInfo=new Map;_monitoredElementCount=0;_rootNodeFocusListenerCount=new Map;_detectionMode;_windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=setTimeout(()=>this._windowFocused=!1)};_document=h(P);_stopInputModalityDetector=new _;constructor(){let e=h(mo,{optional:!0});this._detectionMode=e?.detectionMode||ut.IMMEDIATE}_rootNodeFocusAndBlurListener=e=>{let t=ie(e);for(let n=t;n;n=n.parentElement)e.type==="focus"?this._onFocus(e,n):this._onBlur(e,n)};monitor(e,t=!1){let n=De(e);if(!this._platform.isBrowser||n.nodeType!==1)return g();let s=Yn(n)||this._document,r=this._elementInfo.get(n);if(r)return t&&(r.checkChildren=!0),r.subject;let a={checkChildren:t,subject:new _,rootNode:s};return this._elementInfo.set(n,a),this._registerGlobalListeners(a),a.subject}stopMonitoring(e){let t=De(e),n=this._elementInfo.get(t);n&&(n.subject.complete(),this._setClasses(t),this._elementInfo.delete(t),this._removeGlobalListeners(n))}focusVia(e,t,n){let s=De(e),r=this._document.activeElement;s===r?this._getClosestElementsInfo(s).forEach(([a,c])=>this._originChanged(a,t,c)):(this._setOrigin(t),typeof s.focus=="function"&&s.focus(n))}ngOnDestroy(){this._elementInfo.forEach((e,t)=>this.stopMonitoring(t))}_getWindow(){return this._document.defaultView||window}_getFocusOrigin(e){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(e)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:e&&this._isLastInteractionFromInputLabel(e)?"mouse":"program"}_shouldBeAttributedToTouch(e){return this._detectionMode===ut.EVENTUAL||!!e?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(e,t){e.classList.toggle("cdk-focused",!!t),e.classList.toggle("cdk-touch-focused",t==="touch"),e.classList.toggle("cdk-keyboard-focused",t==="keyboard"),e.classList.toggle("cdk-mouse-focused",t==="mouse"),e.classList.toggle("cdk-program-focused",t==="program")}_setOrigin(e,t=!1){this._ngZone.runOutsideAngular(()=>{if(this._origin=e,this._originFromTouchInteraction=e==="touch"&&t,this._detectionMode===ut.IMMEDIATE){clearTimeout(this._originTimeoutId);let n=this._originFromTouchInteraction?po:1;this._originTimeoutId=setTimeout(()=>this._origin=null,n)}})}_onFocus(e,t){let n=this._elementInfo.get(t),s=ie(e);!n||!n.checkChildren&&t!==s||this._originChanged(t,this._getFocusOrigin(s),n)}_onBlur(e,t){let n=this._elementInfo.get(t);!n||n.checkChildren&&e.relatedTarget instanceof Node&&t.contains(e.relatedTarget)||(this._setClasses(t),this._emitOrigin(n,null))}_emitOrigin(e,t){e.subject.observers.length&&this._ngZone.run(()=>e.subject.next(t))}_registerGlobalListeners(e){if(!this._platform.isBrowser)return;let t=e.rootNode,n=this._rootNodeFocusListenerCount.get(t)||0;n||this._ngZone.runOutsideAngular(()=>{t.addEventListener("focus",this._rootNodeFocusAndBlurListener,Jt),t.addEventListener("blur",this._rootNodeFocusAndBlurListener,Jt)}),this._rootNodeFocusListenerCount.set(t,n+1),++this._monitoredElementCount===1&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(he(this._stopInputModalityDetector)).subscribe(s=>{this._setOrigin(s,!0)}))}_removeGlobalListeners(e){let t=e.rootNode;if(this._rootNodeFocusListenerCount.has(t)){let n=this._rootNodeFocusListenerCount.get(t);n>1?this._rootNodeFocusListenerCount.set(t,n-1):(t.removeEventListener("focus",this._rootNodeFocusAndBlurListener,Jt),t.removeEventListener("blur",this._rootNodeFocusAndBlurListener,Jt),this._rootNodeFocusListenerCount.delete(t))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(e,t,n){this._setClasses(e,t),this._emitOrigin(n,t),this._lastFocusOrigin=t}_getClosestElementsInfo(e){let t=[];return this._elementInfo.forEach((n,s)=>{(s===e||n.checkChildren&&s.contains(e))&&t.push([s,n])}),t}_isLastInteractionFromInputLabel(e){let{_mostRecentTarget:t,mostRecentModality:n}=this._inputModalityDetector;if(n!=="mouse"||!t||t===e||e.nodeName!=="INPUT"&&e.nodeName!=="TEXTAREA"||e.disabled)return!1;let s=e.labels;if(s){for(let r=0;r<s.length;r++)if(s[r].contains(t))return!0}return!1}static \u0275fac=function(t){return new(t||o)};static \u0275prov=y({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();var _o=(()=>{class o{static \u0275fac=function(t){return new(t||o)};static \u0275cmp=W({type:o,selectors:[["ng-component"]],exportAs:["cdkVisuallyHidden"],decls:0,vars:0,template:function(t,n){},styles:[`.cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none;left:0}[dir=rtl] .cdk-visually-hidden{left:auto;right:0}
4
4
  `],encapsulation:2,changeDetection:0})}return o})();var ls=(()=>{class o{create(e){return typeof MutationObserver>"u"?null:new MutationObserver(e)}static \u0275fac=function(t){return new(t||o)};static \u0275prov=y({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();var vo=(()=>{class o{static \u0275fac=function(t){return new(t||o)};static \u0275mod=N({type:o});static \u0275inj=L({providers:[ls]})}return o})();var Pi=(()=>{class o{_platform=h(H);constructor(){}isDisabled(e){return e.hasAttribute("disabled")}isVisible(e){return hs(e)&&getComputedStyle(e).visibility==="visible"}isTabbable(e){if(!this._platform.isBrowser)return!1;let t=ds(ys(e));if(t&&(yo(t)===-1||!this.isVisible(t)))return!1;let n=e.nodeName.toLowerCase(),s=yo(e);return e.hasAttribute("contenteditable")?s!==-1:n==="iframe"||n==="object"||this._platform.WEBKIT&&this._platform.IOS&&!_s(e)?!1:n==="audio"?e.hasAttribute("controls")?s!==-1:!1:n==="video"?s===-1?!1:s!==null?!0:this._platform.FIREFOX||e.hasAttribute("controls"):e.tabIndex>=0}isFocusable(e,t){return vs(e)&&!this.isDisabled(e)&&(t?.ignoreVisibility||this.isVisible(e))}static \u0275fac=function(t){return new(t||o)};static \u0275prov=y({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();function ds(o){try{return o.frameElement}catch{return null}}function hs(o){return!!(o.offsetWidth||o.offsetHeight||typeof o.getClientRects=="function"&&o.getClientRects().length)}function us(o){let i=o.nodeName.toLowerCase();return i==="input"||i==="select"||i==="button"||i==="textarea"}function fs(o){return gs(o)&&o.type=="hidden"}function ps(o){return ms(o)&&o.hasAttribute("href")}function gs(o){return o.nodeName.toLowerCase()=="input"}function ms(o){return o.nodeName.toLowerCase()=="a"}function So(o){if(!o.hasAttribute("tabindex")||o.tabIndex===void 0)return!1;let i=o.getAttribute("tabindex");return!!(i&&!isNaN(parseInt(i,10)))}function yo(o){if(!So(o))return null;let i=parseInt(o.getAttribute("tabindex")||"",10);return isNaN(i)?-1:i}function _s(o){let i=o.nodeName.toLowerCase(),e=i==="input"&&o.type;return e==="text"||e==="password"||i==="select"||i==="textarea"}function vs(o){return fs(o)?!1:us(o)||ps(o)||o.hasAttribute("contenteditable")||So(o)}function ys(o){return o.ownerDocument&&o.ownerDocument.defaultView||window}var xi=class{_element;_checker;_ngZone;_document;_injector;_startAnchor;_endAnchor;_hasAttached=!1;startAnchorListener=()=>this.focusLastTabbableElement();endAnchorListener=()=>this.focusFirstTabbableElement();get enabled(){return this._enabled}set enabled(i){this._enabled=i,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(i,this._startAnchor),this._toggleAnchorTabIndex(i,this._endAnchor))}_enabled=!0;constructor(i,e,t,n,s=!1,r){this._element=i,this._checker=e,this._ngZone=t,this._document=n,this._injector=r,s||this.attachAnchors()}destroy(){let i=this._startAnchor,e=this._endAnchor;i&&(i.removeEventListener("focus",this.startAnchorListener),i.remove()),e&&(e.removeEventListener("focus",this.endAnchorListener),e.remove()),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return this._hasAttached?!0:(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(i){return new Promise(e=>{this._executeOnStable(()=>e(this.focusInitialElement(i)))})}focusFirstTabbableElementWhenReady(i){return new Promise(e=>{this._executeOnStable(()=>e(this.focusFirstTabbableElement(i)))})}focusLastTabbableElementWhenReady(i){return new Promise(e=>{this._executeOnStable(()=>e(this.focusLastTabbableElement(i)))})}_getRegionBoundary(i){let e=this._element.querySelectorAll(`[cdk-focus-region-${i}], [cdkFocusRegion${i}], [cdk-focus-${i}]`);return i=="start"?e.length?e[0]:this._getFirstTabbableElement(this._element):e.length?e[e.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(i){let e=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(e){if(!this._checker.isFocusable(e)){let t=this._getFirstTabbableElement(e);return t?.focus(i),!!t}return e.focus(i),!0}return this.focusFirstTabbableElement(i)}focusFirstTabbableElement(i){let e=this._getRegionBoundary("start");return e&&e.focus(i),!!e}focusLastTabbableElement(i){let e=this._getRegionBoundary("end");return e&&e.focus(i),!!e}hasAttached(){return this._hasAttached}_getFirstTabbableElement(i){if(this._checker.isFocusable(i)&&this._checker.isTabbable(i))return i;let e=i.children;for(let t=0;t<e.length;t++){let n=e[t].nodeType===this._document.ELEMENT_NODE?this._getFirstTabbableElement(e[t]):null;if(n)return n}return null}_getLastTabbableElement(i){if(this._checker.isFocusable(i)&&this._checker.isTabbable(i))return i;let e=i.children;for(let t=e.length-1;t>=0;t--){let n=e[t].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(e[t]):null;if(n)return n}return null}_createAnchor(){let i=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,i),i.classList.add("cdk-visually-hidden"),i.classList.add("cdk-focus-trap-anchor"),i.setAttribute("aria-hidden","true"),i}_toggleAnchorTabIndex(i,e){i?e.setAttribute("tabindex","0"):e.removeAttribute("tabindex")}toggleAnchors(i){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(i,this._startAnchor),this._toggleAnchorTabIndex(i,this._endAnchor))}_executeOnStable(i){this._injector?re(i,{injector:this._injector}):setTimeout(i)}},Fi=(()=>{class o{_checker=h(Pi);_ngZone=h(U);_document=h(P);_injector=h(E);constructor(){h(Ye).load(_o)}create(e,t=!1){return new xi(e,this._checker,this._ngZone,this._document,t,this._injector)}static \u0275fac=function(t){return new(t||o)};static \u0275prov=y({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();var _e=(function(o){return o[o.NONE=0]="NONE",o[o.BLACK_ON_WHITE=1]="BLACK_ON_WHITE",o[o.WHITE_ON_BLACK=2]="WHITE_ON_BLACK",o})(_e||{}),Co="cdk-high-contrast-black-on-white",bo="cdk-high-contrast-white-on-black",Mi="cdk-high-contrast-active",ei=(()=>{class o{_platform=h(H);_hasCheckedHighContrastMode;_document=h(P);_breakpointSubscription;constructor(){this._breakpointSubscription=h(En).observe("(forced-colors: active)").subscribe(()=>{this._hasCheckedHighContrastMode&&(this._hasCheckedHighContrastMode=!1,this._applyBodyHighContrastModeCssClasses())})}getHighContrastMode(){if(!this._platform.isBrowser)return _e.NONE;let e=this._document.createElement("div");e.style.backgroundColor="rgb(1,2,3)",e.style.position="absolute",this._document.body.appendChild(e);let t=this._document.defaultView||window,n=t&&t.getComputedStyle?t.getComputedStyle(e):null,s=(n&&n.backgroundColor||"").replace(/ /g,"");switch(e.remove(),s){case"rgb(0,0,0)":case"rgb(45,50,54)":case"rgb(32,32,32)":return _e.WHITE_ON_BLACK;case"rgb(255,255,255)":case"rgb(255,250,239)":return _e.BLACK_ON_WHITE}return _e.NONE}ngOnDestroy(){this._breakpointSubscription.unsubscribe()}_applyBodyHighContrastModeCssClasses(){if(!this._hasCheckedHighContrastMode&&this._platform.isBrowser&&this._document.body){let e=this._document.body.classList;e.remove(Mi,Co,bo),this._hasCheckedHighContrastMode=!0;let t=this.getHighContrastMode();t===_e.BLACK_ON_WHITE?e.add(Mi,Co):t===_e.WHITE_ON_BLACK&&e.add(Mi,bo)}}static \u0275fac=function(t){return new(t||o)};static \u0275prov=y({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})(),Li=(()=>{class o{constructor(){h(ei)._applyBodyHighContrastModeCssClasses()}static \u0275fac=function(t){return new(t||o)};static \u0275mod=N({type:o});static \u0275inj=L({imports:[vo]})}return o})();function Cs(o,i){}var ve=class{viewContainerRef;injector;id;role="dialog";panelClass="";hasBackdrop=!0;backdropClass="";disableClose=!1;closePredicate;width="";height="";minWidth;minHeight;maxWidth;maxHeight;positionStrategy;data=null;direction;ariaDescribedBy=null;ariaLabelledBy=null;ariaLabel=null;ariaModal=!1;autoFocus="first-tabbable";restoreFocus=!0;scrollStrategy;closeOnNavigation=!0;closeOnDestroy=!0;closeOnOverlayDetachments=!0;disableAnimations=!1;providers;container;templateContext};var Ni=(()=>{class o extends We{_elementRef=h(k);_focusTrapFactory=h(Fi);_config;_interactivityChecker=h(Pi);_ngZone=h(U);_focusMonitor=h(Ti);_renderer=h(Fe);_changeDetectorRef=h(Be);_injector=h(E);_platform=h(H);_document=h(P);_portalOutlet;_focusTrapped=new _;_focusTrap=null;_elementFocusedBeforeDialogWasOpened=null;_closeInteractionType=null;_ariaLabelledByQueue=[];_isDestroyed=!1;constructor(){super(),this._config=h(ve,{optional:!0})||new ve,this._config.ariaLabelledBy&&this._ariaLabelledByQueue.push(this._config.ariaLabelledBy)}_addAriaLabelledBy(e){this._ariaLabelledByQueue.push(e),this._changeDetectorRef.markForCheck()}_removeAriaLabelledBy(e){let t=this._ariaLabelledByQueue.indexOf(e);t>-1&&(this._ariaLabelledByQueue.splice(t,1),this._changeDetectorRef.markForCheck())}_contentAttached(){this._initializeFocusTrap(),this._captureInitialFocus()}_captureInitialFocus(){this._trapFocus()}ngOnDestroy(){this._focusTrapped.complete(),this._isDestroyed=!0,this._restoreFocus()}attachComponentPortal(e){this._portalOutlet.hasAttached();let t=this._portalOutlet.attachComponentPortal(e);return this._contentAttached(),t}attachTemplatePortal(e){this._portalOutlet.hasAttached();let t=this._portalOutlet.attachTemplatePortal(e);return this._contentAttached(),t}attachDomPortal=e=>{this._portalOutlet.hasAttached();let t=this._portalOutlet.attachDomPortal(e);return this._contentAttached(),t};_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(e,t){this._interactivityChecker.isFocusable(e)||(e.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{let n=()=>{s(),r(),e.removeAttribute("tabindex")},s=this._renderer.listen(e,"blur",n),r=this._renderer.listen(e,"mousedown",n)})),e.focus(t)}_focusByCssSelector(e,t){let n=this._elementRef.nativeElement.querySelector(e);n&&this._forceFocus(n,t)}_trapFocus(e){this._isDestroyed||re(()=>{let t=this._elementRef.nativeElement;switch(this._config.autoFocus){case!1:case"dialog":this._containsFocus()||t.focus(e);break;case!0:case"first-tabbable":this._focusTrap?.focusInitialElement(e)||this._focusDialogContainer(e);break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]',e);break;default:this._focusByCssSelector(this._config.autoFocus,e);break}this._focusTrapped.next()},{injector:this._injector})}_restoreFocus(){let e=this._config.restoreFocus,t=null;if(typeof e=="string"?t=this._document.querySelector(e):typeof e=="boolean"?t=e?this._elementFocusedBeforeDialogWasOpened:null:e&&(t=e),this._config.restoreFocus&&t&&typeof t.focus=="function"){let n=Vt(),s=this._elementRef.nativeElement;(!n||n===this._document.body||n===s||s.contains(n))&&(this._focusMonitor?(this._focusMonitor.focusVia(t,this._closeInteractionType),this._closeInteractionType=null):t.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(e){this._elementRef.nativeElement.focus?.(e)}_containsFocus(){let e=this._elementRef.nativeElement,t=Vt();return e===t||e.contains(t)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=Vt()))}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=W({type:o,selectors:[["cdk-dialog-container"]],viewQuery:function(t,n){if(t&1&&Et(at,7),t&2){let s;Ot(s=wt())&&(n._portalOutlet=s.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(t,n){t&2&&fe("id",n._config.id||null)("role",n._config.role)("aria-modal",n._config.ariaModal)("aria-labelledby",n._config.ariaLabel?null:n._ariaLabelledByQueue[0])("aria-label",n._config.ariaLabel)("aria-describedby",n._config.ariaDescribedBy||null)},features:[Y],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(t,n){t&1&&Dt(0,Cs,0,0,"ng-template",0)},dependencies:[at],styles:[`.cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}