1import{c as le,j as de}from"./chunk-QIWZL5RQ.js";import{f as Q,q as X,r as Y}from"./chunk-MOINSKK7.js";import{a as ee,c as te,d as ie,e as ne,f as re,g as oe,h as se,j as ae}from"./chunk-ELFTTI6P.js";import{a as be}from"./chunk-4Z5MUJO3.js";import{Ea as f,Eb as P,Fc as W,Ga as A,Gb as $,Ja as l,Ka as p,Lb as w,Mb as C,Md as K,Nb as R,Ob as L,Oc as G,Pc as T,Qa as a,Tc as o,Ub as j,Xb as M,Zb as x,cb as b,fb as O,ic as q,jb as u,mb as F,mc as z,md as J,ob as k,oc as V,qb as c,sa as E,tb as B,ua as r,vc as Z,wc as U,xc as N}from"./chunk-PMSJWPYZ.js";import{a as s,b as h,h as De,k as m}from"./chunk-NIF3MU5U.js";var ce=(()=>{class i{el=r(a);renderer=r(u);attrs=o(null,{alias:"trn-aria-attributes"});constructor(){p(()=>{let e=this.el.nativeElement;Object.entries(this.attrs()??{}).forEach(([t,n])=>n==null?this.renderer.removeAttribute(e,t):this.renderer.setAttribute(e,t,n))})}static \u0275fac=function(t){return new(t||i)};static \u0275dir=c({type:i,selectors:[["","trn-aria-attributes",""]],inputs:{attrs:[1,"trn-aria-attributes","attrs"]}})}return i})();var g=(()=>{class i{el=r(a);renderer=r(u);ngZone=r(A);origin=o.required({alias:"trn-floating",transform:e=>e instanceof a?e.nativeElement:e});strategy=o("absolute");placement=o();syncSizes=o([],{transform:e=>Array.isArray(e)?e:[e]});boundary=o(void 0,{transform:e=>e instanceof a?e.nativeElement:e});middlewareOptions=o();extraMiddleware=l([]);positioned=l(!1);constructor(){p(e=>{this.origin()&&e(this.ngZone.runOutsideAngular(()=>ee(this.origin(),this.el.nativeElement,()=>this.updatePosition())))}),p(()=>{let e=this.el.nativeElement,t=this.positioned();this.renderer.setStyle(e,"opacity",t?null:"0"),this.renderer.setStyle(e,"pointer-events",t?null:"none")})}registerMiddleware(e){return this.extraMiddleware.update(t=>[...t,e]),()=>this.extraMiddleware.update(t=>t.filter(n=>n!==e))}updatePosition(){return m(this,null,function*(){if(!this.origin())return;let e=this.el.nativeElement;if(!e.checkVisibility())return;let t=this.placement();t&&!e.hasAttribute("data-placement")&&this.renderer.setAttribute(e,"data-placement",t);let n=this.boundary(),y={boundary:typeof n=="function"?n():n,altBoundary:!0},_=this.middlewareOptions()??{},{x:fe,y:ge,placement:ve}=yield ae(this.origin(),e,{placement:t,strategy:this.strategy(),middleware:[t?ne(s(s({},_.flip),y)):te(s(s({},_.autoPlacement),y)),ie(s(s({},_.shift),y)),re(h(s({},y),{apply:({rects:D,availableWidth:S,availableHeight:H})=>
1{this.syncSizes().forEach(ye=>{switch(ye){case"min-width":this.renderer.setStyle(e,"min-width",`${D.reference.width}px`);break;case"min-height":this.renderer.setStyle(e,"min-height",`${D.reference.height}px`);break;case"width":this.renderer.setStyle(e,"width",`${D.reference.width}px`);break;case"height":this.renderer.setStyle(e,"height",`${D.reference.height}px`);break}}),this.renderer.setStyle(e,"max-height",H?`${Math.max(0,H)}px`:null),this.renderer.setStyle(e,"max-width",S?`${Math.max(0,S)}px`:null)}})),...this.extraMiddleware()]});this.renderer.setStyle(e,"transform",`translate3d(${fe}px, ${ge}px, 0)`),this.renderer.setAttribute(e,"data-placement",ve),this.positioned.set(!0)})}static \u0275fac=function(t){return new(t||i)};static \u0275dir=c({type:i,selectors:[["","trn-floating",""]],hostAttrs:[1,"trn-floating"],hostVars:2,hostBindings:function(t,n){t&2&&q("position",n.strategy())},inputs:{origin:[1,"trn-floating","origin"],strategy:[1,"strategy"],placement:[1,"placement"],syncSizes:[1,"syncSizes"],boundary:[1,"boundary"],middlewareOptions:[1,"middlewareOptions"]}})}return i})();var pe=(()=>{class i{element=r(a).nativeElement;renderer=r(u);constructor(){let e=se({element:this.element});r(f).onDestroy(r(g).registerMiddleware(h(s({},e),{fn:t=>m(this,null,function*(){let n=yield e.fn(t);return this.apply(n.data),n})})))}apply(e){this.renderer.setStyle(this.element,"left",e.x==null?null:`${e.x}px`),this.renderer.setStyle(this.element,"top",e.y==null?null:`${e.y}px`)}static \u0275fac=function(t){return new(t||i)};static \u0275dir=c({type:i,selectors:[["","trn-floating-arrow",""]],hostAttrs:[1,"trn-floating-arrow"]})}return i})();var ue=(()=>{class i{element=r(a).nativeElement;renderer=r(u);constructor(){let e=oe();r(f).onDestroy(r(g).registerMiddleware(h(s({},e),{fn:t=>m(this,null,function*(){let n=yield e.fn(t),{referenceHidden:d}=n.data??{};return this.renderer.setStyle(this.element,"visibility",d?"hidden":null),n})})))}static \u0275fac=function(t){return new(t||i)};static \u0275dir=c({type:i,selectors:[["","trn-floating-hide-with-origin",""]]})}return i})();var we=i=>({role:"tooltip",id:i});function Me(i,I){i&1&&j(0)}function Te(i,I){if(i&1&&B(0,Me,1,0,"ng-container",3),i&2){x();let e=N(2);w("ngTemplateOutlet",e)}}function _e(i,I){if(i&1&&z(0),i&2){x();let e=N(2);V(" ",e," ")}}var he=(()=>{class i{origin=o.required();placement=o("top");id=o.required();content=o.required();hovered=l(!1);isTemplateRef(e){return e instanceof O}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=k({type:i,selectors:[["trn-tooltip-content"]],inputs:{origin:[1,"origin"],placement:[1,"placement"],id:[1,"id"],content:[1,"content"]},decls:6,vars:7,consts:[["trn-floating-hide-with-origin","",1,"trn-tooltip-frame",3,"mouseenter","mouseleave","trn-floating","placement"],[1,"trn-tooltip",3,"trn-aria-attributes"],["trn-floating-arrow","",1,"trn-tooltip-arrow"],[4,"ngTemplateOutlet"]],template:function(t,n){if(t&1&&(C(0,"div",0),M("mouseenter",function(){return n.hovered.set(!0)})("mouseleave",function(){return n.hovered.set(!1)}),C(1,"div",1),Z(2),P(3,Te,1,1,"ng-container")(4,_e,1,1),R(),L(5,"span",2),R()),t&2){w("trn-floating",n.origin())("placement",n.placement()),b(),w("trn-aria-attributes",W(5,we,n.id())),b();let d=U(n.content());b(),$(n.isTemplateRef(d)?3:4)}},dependencies:[g,pe,ue,ce,J],encapsulation:2,changeDetection:0})}return i})();var me=De(be());var Ce=new E("TRN_TOOLTIP_ACTIVE",{providedIn:"root",factory:()=>l(null)}),lt=(()=>{class i{el=r(a);viewContainerRef=r(F);overlay=r(de);focusMonitor=r(Q);active=r(Ce);content=o.required({alias:"trn-tooltip"});placement=o("top",{alias:"trn-tooltip-placement"});showDelay=o(200,{alias:"trn-tooltip-show-delay"});hideDelay=o(200,{alias:"trn-tooltip-hide-delay"});disabled=o(!1,{alias:"trn-tooltip-disabled"});tooltipId=(0,me.uniqueId)("trn-tooltip-");overlayRef;componentRef=l(null);hostHovered=l(!1);focused=l(!1);suppressed=l(!1);panelHovered=T(()=>this.componentRef()?.instance.hovered()??!1);held=T(()=>this.hostHovered()||this.focused()||this.panelHovered());visible=T(()=>this.active()===this);timeoutId;constructor(){p(()=>this.visible()?this.attach():this.detach()),p(()=>{let t=this.componentRef();t&&(t.setInput("content",this.content()),t.setInput("placement",this.placement()))});let e=!1;p(()=>{let t=this.panelHovered();t!==e&&(e=t,G(()=>t?this.scheduleShow():this.scheduleHide()))}),this.focusMonitor.monitor(this.el).pipe(K()).subscribe(t=>{let n=t==="keyboard"||t==="program";if(n!==this.focused()){if(this.focused.set(n),!n)return this.scheduleHide();this.suppressed.set(!1),this.scheduleShow()}}),r(f).onDestroy(()=>{this.cancel(),this.focusMonitor.stopMonitoring(this.el),this.overlayRef?.dispose(),this.active()===this&&this.active.set(null)})}onMouseEnter(){this.hostHovered.set(!0),this.suppressed.set(!1),this.scheduleShow()}onMouseLeave(){this.hostHovered.set(!1),this.scheduleHide()}suppress(){this.cancel(),this.suppressed.set(!0),this.active()===this&&this.active.set(null)}scheduleShow(){if(this.cancel(),!(this.disabled()||this.suppressed()||!this.content()||this.active()===this)){if(this.active())return this.active.set(this);this.timeoutId=setTimeout(()=>{this.timeoutId=void 0,this.active()||this.active.set(this)},this.showDelay())}}scheduleHide(){this.cancel(),this.active()===this&&(this.held()||(this.timeoutId=setTimeout(()=>{this.timeoutId=void 0,this.active()===this&&this.active.set(null)},this.hideDelay())))}cancel(){clearTimeout(this.timeoutId),this.timeoutId=void 0}attach(){if(this.componentRef()||!this.content())return;this.overlayRef??=this.overlay.create({scrollStrategy:this.overlay.scrollStrategies.noop(),positionStrategy:this.overlay.position().global(),hasBackdrop:!1,panelClass:"trn-overlay-pane"});let e=this.overlayRef.attach(new le(he,this.viewContainerRef));e.setInput("origin",this.el.nativeElement),e.setInput("id",this.tooltipId),e.setInput("content",this.content()),e.setInput("placement",this.placement()),X(this.el.nativeElement,"aria-describedby",this.tooltipId),this.componentRef.set(e)}detach(){this.componentRef()&&(this.overlayRef?.detach(),this.componentRef.set(null),Y(this.el.nativeElement,"aria-describedby",this.tooltipId))}static \u0275fac=function(t){return new(t||i)};static \u0275dir=c({type:i,selectors:[["","trn-tooltip",""]],hostAttrs:[1,"trn-tooltip-host"],hostBindings:function(t,n){t&1&&M("mouseenter",function(){return n.onMouseEnter()})("mouseleave",function(){return n.onMouseLeave()})("click",function(){return n.suppress()})("keydown.escape",function(){return n.suppress()})},inputs:{content:[1,"trn-tooltip","content"],placement:[1,"trn-tooltip-placement","placement"],showDelay:[1,"trn-tooltip-show-delay","showDelay"],hideDelay:[1,"trn-tooltip-hide-delay","hideDelay"],disabled:[1,"trn-tooltip-disabled","disabled"]}})}return i})();export{lt as a};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.