import{b as de,c as Ce,d as he,da as me,e as _e,i as ue,j as we,l as fe,m as ke,na as Te,ta as g,va as Oe}from"./chunk-QH7CG3K4.js";import{c as te,d as O,g as b,h as y,i as S,s as ye}from"./chunk-IS75LVR4.js";import{E as L,Ea as le,Ha as ce,Ia as I,La as pe,O as se,Q as ae,b as ie,i as oe,m as ne,u as re,xa as ge}from"./chunk-5YPL7P3G.js";import{D as J,F as v,K as ee,m as K,p as U,s as X,t as G}from"./chunk-HJI5FNS6.js";import{Ab as z,Bb as H,Cc as M,Dc as j,Gb as _,Hc as h,Ic as s,Jc as Q,Ka as a,Kc as N,La as l,Ld as p,Md as q,Oa as V,Rb as E,Rc as u,Sb as R,Sd as W,Tc as f,Ua as C,Uc as m,Va as $,Vb as A,Xb as w,jc as F,kc as d,kd as Y,nd as T,oc as Z,ta as x,ua as P,xc as k,yc as B,za as D}from"./chunk-XJKQ67XR.js";import{e as be}from"./chunk-SZAW6ZBW.js";function De(t,c){t&1&&M(0)}function Ve(t,c){if(t&1){let e=j();k(0,"div",1),h("click",function(o){a(e);let n=s();return l(n.onOverlayClick(o))})("@animation.start",function(o){a(e);let n=s();return l(n.onAnimationStart(o))})("@animation.done",function(o){a(e);let n=s();return l(n.onAnimationEnd(o))}),k(1,"div",2),h("click",function(o){a(e);let n=s();return l(n.onContentClick(o))})("mousedown",function(o){a(e);let n=s();return l(n.onContentClick(o))}),N(2),w(3,De,1,0,"ng-container",3),B()()}if(t&2){let e=s();Z(e.styleClass),d("ngClass","p-popover p-component")("ngStyle",e.style)("@animation",T(12,Pe,e.overlayVisible?"open":"close",T(9,xe,e.showTransitionOptions,e.hideTransitionOptions))),F("aria-modal",e.overlayVisible)("aria-label",e.ariaLabel)("aria-labelledBy",e.ariaLabelledBy),H(3),d("ngTemplateOutlet",e.contentTemplate||e._contentTemplate)}}var Se,Le,Ie,xe,Pe,$e,ze,ve,st,at,He=be(()=>{ye();ee();ee();W();W();ge();pe();pe();we();ke();Te();Oe();_e();Ce();Se=["content"],Le=["closeicon"],Ie=["*"],xe=(t,c)=>({showTransitionParams:t,hideTransitionParams:c}),Pe=(t,c)=>({value:t,params:c});$e=({dt:t})=>`
.p-popover {
    margin-top: ${t("popover.gutter")};
    background: ${t("popover.background")};
    color: ${t("popover.color")};
    border: 1px solid ${t("popover.border.color")};
    border-radius: ${t("popover.border.radius")};
    box-shadow: ${t("popover.shadow")};
    position: absolute
}

.p-popover-content {
    padding: ${t("popover.content.padding")};
}

.p-popover-flipped {
    margin-top: calc(${t("popover.gutter")} * -1);
    margin-bottom: ${t("popover.gutter")};
}

.p-popover-enter-from {
    opacity: 0;
    transform: scaleY(0.8);
}

.p-popover-leave-to {
    opacity: 0;
}

.p-popover-enter-active {
    transition: transform 0.12s cubic-bezier(0, 0, 0.2, 1), opacity 0.12s cubic-bezier(0, 0, 0.2, 1);
}

.p-popover-leave-active {
    transition: opacity 0.1s linear;
}

.p-popover:after,
.p-popover:before {
    bottom: 100%;
    left: calc(${t("popover.arrow.offset")} + ${t("popover.arrow.left")});
    content: " ";
    height: 0;
    width: 0;
    position: absolute;
    pointer-events: none;
}

.p-popover:after {
    border-width: calc(${t("popover.gutter")} - 2px);
    margin-left: calc(-1 * (${t("popover.gutter")} - 2px));
    border-style: solid;
    border-color: transparent;
    border-bottom-color: ${t("popover.background")};
}

.p-popover:before {
    border-width: ${t("popover.gutter")};
    margin-left: calc(-1 * ${t("popover.gutter")});
    border-style: solid;
    border-color: transparent;
    border-bottom-color: ${t("popover.border.color")};
}

.p-popover-flipped:after,
.p-popover-flipped:before {
    bottom: auto;
    top: 100%;
}

.p-popover.p-popover-flipped:after {
    border-bottom-color: transparent;
    border-top-color: ${t("popover.background")};
}

.p-popover.p-popover-flipped:before {
    border-bottom-color: transparent;
    border-top-color: ${t("popover.border.color")};
}

`,ze={root:"p-popover p-component",content:"p-popover-content"},ve=(()=>{class t extends he{name="popover";theme=$e;classes=ze;static \u0275fac=(()=>{let e;return function(o){return(e||(e=V(t)))(o||t)}})();static \u0275prov=x({token:t,factory:t.\u0275fac})}return t})(),st=(()=>{class t extends ue{zone;overlayService;ariaLabel;ariaLabelledBy;dismissable=!0;showCloseIcon;style;styleClass;appendTo="body";autoZIndex=!0;ariaCloseLabel;baseZIndex=0;focusOnShow=!0;showTransitionOptions=".12s cubic-bezier(0, 0, 0.2, 1)";hideTransitionOptions=".1s linear";onShow=new C;onHide=new C;container;overlayVisible=!1;render=!1;isOverlayAnimationInProgress=!1;selfClick=!1;documentClickListener;target;willHide;scrollHandler;documentResizeListener;contentTemplate;closeIconTemplate;templates;_contentTemplate;destroyCallback;overlayEventListener;overlaySubscription;_componentStyle=D(ve);constructor(e,i){super(),this.zone=e,this.overlayService=i,console.log("OverlayPanel is deprecated. Use Popover instead.")}ngAfterContentInit(){this.templates?.forEach(e=>{switch(e.getType()){case"content":this._contentTemplate=e.template;break;default:this._contentTemplate=e.template;break}this.cd.markForCheck()})}bindDocumentClickListener(){if(v(this.platformId)&&!this.documentClickListener){let e=se()?"touchstart":"click",i=this.el?this.el.nativeElement.ownerDocument:this.document;this.documentClickListener=this.renderer.listen(i,e,o=>{this.dismissable&&(!this.container?.contains(o.target)&&this.target!==o.target&&!this.target.contains(o.target)&&!this.selfClick&&this.hide(),this.selfClick=!1,this.cd.markForCheck())})}}unbindDocumentClickListener(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null,this.selfClick=!1)}toggle(e,i){this.isOverlayAnimationInProgress||(this.overlayVisible?(this.hasTargetChanged(e,i)&&(this.destroyCallback=()=>{this.show(null,i||e.currentTarget||e.target)}),this.hide()):this.show(e,i))}show(e,i){i&&e&&e.stopPropagation(),!this.isOverlayAnimationInProgress&&(this.target=i||e.currentTarget||e.target,this.overlayVisible=!0,this.render=!0,this.cd.markForCheck())}onOverlayClick(e){this.overlayService.add({originalEvent:e,target:this.el.nativeElement}),this.selfClick=!0}onContentClick(e){let i=e.target;this.selfClick=e.offsetX<i.clientWidth&&e.offsetY<i.clientHeight}hasTargetChanged(e,i){return this.target!=null&&this.target!==(i||e.currentTarget||e.target)}appendContainer(){this.appendTo&&(this.appendTo==="body"?this.renderer.appendChild(this.document.body,this.container):ne(this.appendTo,this.container))}restoreAppend(){this.container&&this.appendTo&&this.renderer.appendChild(this.el.nativeElement,this.container)}align(){this.autoZIndex&&g.set("overlay",this.container,this.baseZIndex+this.config.zIndex.overlay),oe(this.container,this.target,!1);let e=L(this.container),i=L(this.target),o=this.document.defaultView?.getComputedStyle(this.container).getPropertyValue("border-radius"),n=0;e.left<i.left&&(n=i.left-e.left-parseFloat(o)*2),this.container?.style.setProperty(de("popover.arrow.left").name,`${n}px`),e.top<i.top&&(this.container.setAttribute("data-p-popover-flipped","true"),ie(this.container,"p-popover-flipped"),this.showCloseIcon&&this.renderer.setStyle(this.container,"margin-top","-30px"))}onAnimationStart(e){e.toState==="open"&&(this.container=e.element,this.appendContainer(),this.align(),this.bindDocumentClickListener(),this.bindDocumentResizeListener(),this.bindScrollListener(),this.focusOnShow&&this.focus(),this.overlayEventListener=i=>{this.container&&this.container.contains(i.target)&&(this.selfClick=!0)},this.overlaySubscription=this.overlayService.clickObservable.subscribe(this.overlayEventListener),this.onShow.emit(null)),this.isOverlayAnimationInProgress=!0}onAnimationEnd(e){switch(e.toState){case"void":this.destroyCallback&&(this.destroyCallback(),this.destroyCallback=null),this.overlaySubscription&&this.overlaySubscription.unsubscribe();break;case"close":this.autoZIndex&&g.clear(this.container),this.overlaySubscription&&this.overlaySubscription.unsubscribe(),this.onContainerDestroy(),this.onHide.emit({}),this.render=!1;break}this.isOverlayAnimationInProgress=!1}focus(){let e=re(this.container,"[autofocus]");e&&this.zone.runOutsideAngular(()=>{setTimeout(()=>e.focus(),5)})}hide(){this.overlayVisible=!1,this.cd.markForCheck()}onCloseClick(e){this.hide(),e.preventDefault()}onEscapeKeydown(e){this.hide()}onWindowResize(){this.overlayVisible&&!ae()&&this.hide()}bindDocumentResizeListener(){if(v(this.platformId)&&!this.documentResizeListener){let e=this.document.defaultView;this.documentResizeListener=this.renderer.listen(e,"resize",this.onWindowResize.bind(this))}}unbindDocumentResizeListener(){this.documentResizeListener&&(this.documentResizeListener(),this.documentResizeListener=null)}bindScrollListener(){v(this.platformId)&&(this.scrollHandler||(this.scrollHandler=new fe(this.target,()=>{this.overlayVisible&&this.hide()})),this.scrollHandler.bindScrollListener())}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}onContainerDestroy(){this.cd.destroyed||(this.target=null),this.unbindDocumentClickListener(),this.unbindDocumentResizeListener(),this.unbindScrollListener()}ngOnDestroy(){this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.container&&this.autoZIndex&&g.clear(this.container),this.cd.destroyed||(this.target=null),this.destroyCallback=null,this.container&&(this.restoreAppend(),this.onContainerDestroy()),this.overlaySubscription&&this.overlaySubscription.unsubscribe(),super.ngOnDestroy()}static \u0275fac=function(i){return new(i||t)(_($),_(le))};static \u0275cmp=E({type:t,selectors:[["p-overlayPanel"],["p-overlaypanel"]],contentQueries:function(i,o,n){if(i&1&&(u(n,Se,4),u(n,Le,4),u(n,ce,4)),i&2){let r;f(r=m())&&(o.contentTemplate=r.first),f(r=m())&&(o.closeIconTemplate=r.first),f(r=m())&&(o.templates=r)}},hostBindings:function(i,o){i&1&&h("keydown.escape",function(r){return o.onEscapeKeydown(r)},!1,z)},inputs:{ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy",dismissable:[2,"dismissable","dismissable",p],showCloseIcon:[2,"showCloseIcon","showCloseIcon",p],style:"style",styleClass:"styleClass",appendTo:"appendTo",autoZIndex:[2,"autoZIndex","autoZIndex",p],ariaCloseLabel:"ariaCloseLabel",baseZIndex:[2,"baseZIndex","baseZIndex",q],focusOnShow:[2,"focusOnShow","focusOnShow",p],showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions"},outputs:{onShow:"onShow",onHide:"onHide"},standalone:!1,features:[Y([ve]),A],ngContentSelectors:Ie,decls:1,vars:1,consts:[["role","dialog",3,"ngClass","ngStyle","class","click",4,"ngIf"],["role","dialog",3,"click","ngClass","ngStyle"],[1,"p-popover-content",3,"click","mousedown"],[4,"ngTemplateOutlet"]],template:function(i,o){i&1&&(Q(),w(0,Ve,4,15,"div",0)),i&2&&d("ngIf",o.render)},dependencies:[K,U,G,X],encapsulation:2,data:{animation:[te("animation",[y("void",b({transform:"scaleY(0.8)",opacity:0})),y("close",b({opacity:0})),y("open",b({transform:"translateY(0)",opacity:1})),S("void => open",O("{{showTransitionParams}}")),S("open => close",O("{{hideTransitionParams}}"))])]},changeDetection:0})}return t})(),at=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=R({type:t});static \u0275inj=P({imports:[J,I,me,I]})}return t})()});export{st as a,at as b,He as c};
