HEX
Server: nginx/1.24.0
System: Linux DGT-WORDPRESS-VM-SERVER 6.14.0-1014-azure #14~24.04.1-Ubuntu SMP Fri Oct 3 20:52:11 UTC 2025 x86_64
User: ubuntu (1000)
PHP: 8.4.12
Disabled: NONE
Upload Files
File: /mnt/data/smarthr-co-in/demo/angular/template/chunk-3NNWUWWG.js
import{a as Tt}from"./chunk-4FNTF56S.js";import{Ab as wt,B as P,C as rt,E as ht,Ec as Dt,Ha as N,Hd as Nt,Jb as _t,Kb as vt,Ld as Mt,Ma as ft,Wb as yt,Xb as Et,Yb as Ct,cd as xt,f as et,fa as x,fc as Ot,ga as ct,gc as St,ja as w,k as it,kb as v,lb as V,m as ot,n as nt,ob as lt,pb as ut,q as st,qb as pt,rb as dt,sa as T,sb as y,sc as Rt,ta as at,ub as gt,yb as mt,zb as bt}from"./chunk-AQ27DSQO.js";import{a as _,b as F}from"./chunk-EQDQRRRY.js";var z=class{constructor(e,o){this.open=e,this.close=o||e}isManual(){return this.open==="manual"||this.close==="manual"}},te={hover:["mouseover","mouseout"],focus:["focusin","focusout"]};function W(t,e=te){let o=(t||"").trim();if(o.length===0)return[];let i=o.split(/\s+/).map(s=>s.split(":")).map(s=>{let r=e[s[0]]||s;return new z(r[0],r[1])}),n=i.filter(s=>s.isManual());if(n.length>1)throw new Error("Triggers parse error: only one manual trigger is allowed");if(n.length===1&&i.length>1)throw new Error("Triggers parse error: manual trigger can't be mixed with other triggers");return i}function At(t,e){let o=W(e.triggers),i=e.target;if(o.length===1&&o[0].isManual())return Function.prototype;let n=[],s=[],r=()=>{s.forEach(h=>n.push(h())),s.length=0};return o.forEach(h=>{let c=h.open===h.close,a=c?e.toggle:e.show;if(!c&&h.close&&e.hide){let f=h.close,u=e.hide,m=()=>t.listen(i,f,u);s.push(m)}a&&n.push(t.listen(i,h.open,()=>a(r)))}),()=>{n.forEach(h=>h())}}function Ht(t,e){return e.outsideClick?t.listen("document","click",o=>{e.target&&e.target.contains(o.target)||e.targets&&e.targets.some(i=>i.contains(o.target))||e.hide&&e.hide()}):Function.prototype}function Ft(t,e){return e.outsideEsc?t.listen("document","keyup.esc",o=>{e.target&&e.target.contains(o.target)||e.targets&&e.targets.some(i=>i.contains(o.target))||e.hide&&e.hide()}):Function.prototype}var d=typeof window<"u"&&window||{},Re=d.document,De=d.location,xe=d.gc?()=>d.gc():()=>null,Ne=d.performance?d.performance:null,Me=d.Event,Te=d.MouseEvent,je=d.KeyboardEvent,Ae=d.EventTarget,He=d.History,Fe=d.Location,Ve=d.EventListener;var E;function Vt(){let t=d.document.createElement("span");t.innerText="testing bs version",t.classList.add("d-none"),t.classList.add("pl-1"),d.document.head.appendChild(t);let e=d.getComputedStyle(t).paddingLeft;return e&&parseFloat(e)?(d.document.head.removeChild(t),"bs4"):(d.document.head.removeChild(t),"bs5")}function ee(){return E||(E=Vt()),E==="bs4"}function ie(){return E||(E=Vt()),E==="bs5"}function O(){return{isBs4:ee(),isBs5:ie()}}function kt(){let t="Change";return function(o,i){let n=` __${i}Value`;Object.defineProperty(o,i,{get(){return this[n]},set(s){let r=this[n];this[n]=s,r!==s&&this[i+t]&&this[i+t].emit(s)}})}}var jt={},oe=typeof console>"u"||!("warn"in console);function g(t){!xt()||oe||t in jt||(jt[t]=!0,console.warn(t))}var Wt=(function(t){return t.top="top",t.bottom="bottom",t.left="left",t.right="right",t.auto="auto",t.end="right",t.start="left",t["top left"]="top left",t["top right"]="top right",t["right top"]="right top",t["right bottom"]="right bottom",t["bottom right"]="bottom right",t["bottom left"]="bottom left",t["left bottom"]="left bottom",t["left top"]="left top",t["top start"]="top left",t["top end"]="top right",t["end top"]="right top",t["end bottom"]="right bottom",t["bottom end"]="bottom right",t["bottom start"]="bottom left",t["start bottom"]="start bottom",t["start top"]="left top",t})(Wt||{}),j=(function(t){return t.top="top",t.bottom="bottom",t.left="start",t.right="end",t.auto="auto",t.end="end",t.start="start",t["top left"]="top start",t["top right"]="top end",t["right top"]="end top",t["right bottom"]="end bottom",t["bottom right"]="bottom end",t["bottom left"]="bottom start",t["left bottom"]="start bottom",t["left top"]="start top",t["top start"]="top start",t["top end"]="top end",t["end top"]="end top",t["end bottom"]="end bottom",t["bottom end"]="bottom end",t["bottom start"]="bottom start",t["start bottom"]="start bottom",t["start top"]="start top",t})(j||{});function S(t,e){if(t.nodeType!==1)return[];let i=t.ownerDocument.defaultView?.getComputedStyle(t,null);return e?i&&i[e]:i}function G(t){if(!t)return document.documentElement;let e=null,o=t?.offsetParent,i;for(;o===e&&t.nextElementSibling&&i!==t.nextElementSibling;)i=t.nextElementSibling,o=i.offsetParent;let n=o&&o.nodeName;return!n||n==="BODY"||n==="HTML"?i?i.ownerDocument.documentElement:document.documentElement:o&&["TH","TD","TABLE"].indexOf(o.nodeName)!==-1&&S(o,"position")==="static"?G(o):o}function ne(t){let{nodeName:e}=t;return e==="BODY"?!1:e==="HTML"||G(t.firstElementChild)===t}function q(t){return t.parentNode!==null?q(t.parentNode):t}function I(t,e){if(!t||!t.nodeType||!e||!e.nodeType)return document.documentElement;let o=t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING,i=o?t:e,n=o?e:t,s=document.createRange();s.setStart(i,0),s.setEnd(n,0);let r=s.commonAncestorContainer;if(t!==r&&e!==r||i.contains(n))return ne(r)?r:G(r);let h=q(t);return h.host?I(h.host,e):I(t,q(e).host)}function qt(t){if(!t||!t.parentElement)return document.documentElement;let e=t.parentElement;for(;e?.parentElement&&S(e,"transform")==="none";)e=e.parentElement;return e||document.documentElement}function $t(t,e){let o=e==="x"?"Left":"Top",i=o==="Left"?"Right":"Bottom";return parseFloat(t[`border${o}Width`])+parseFloat(t[`border${i}Width`])}function Bt(t,e,o){let i=e,n=o;return Math.max(i[`offset${t}`],i[`scroll${t}`],n[`client${t}`],n[`offset${t}`],n[`scroll${t}`],0)}function Yt(t){let e=t.body,o=t.documentElement;return{height:Bt("Height",e,o),width:Bt("Width",e,o)}}function A(t){return F(_({},t),{right:(t.left||0)+t.width,bottom:(t.top||0)+t.height})}function se(t){return t!==""&&!isNaN(parseFloat(t))&&isFinite(Number(t))}function l(t){return typeof t=="number"||Object.prototype.toString.call(t)==="[object Number]"}function It(t){let e=t.getBoundingClientRect();if(!(e&&l(e.top)&&l(e.left)&&l(e.bottom)&&l(e.right)))return e;let o={left:e.left,top:e.top,width:e.right-e.left,height:e.bottom-e.top},i=t.nodeName==="HTML"?Yt(t.ownerDocument):void 0,n=i?.width||t.clientWidth||l(e.right)&&l(o.left)&&e.right-o.left||0,s=i?.height||t.clientHeight||l(e.bottom)&&l(o.top)&&e.bottom-o.top||0,r=t.offsetWidth-n,h=t.offsetHeight-s;if(r||h){let c=S(t);r-=$t(c,"x"),h-=$t(c,"y"),o.width-=r,o.height-=h}return A(o)}function U(t,e,o=!1){let i=e.nodeName==="HTML",n=It(t),s=It(e),r=S(e),h=parseFloat(r.borderTopWidth),c=parseFloat(r.borderLeftWidth);o&&i&&(s.top=Math.max(s.top??0,0),s.left=Math.max(s.left??0,0));let a=A({top:(n.top??0)-(s.top??0)-h,left:(n.left??0)-(s.left??0)-c,width:n.width,height:n.height});if(a.marginTop=0,a.marginLeft=0,i){let f=parseFloat(r.marginTop),u=parseFloat(r.marginLeft);l(a.top)&&(a.top-=h-f),l(a.bottom)&&(a.bottom-=h-f),l(a.left)&&(a.left-=c-u),l(a.right)&&(a.right-=c-u),a.marginTop=f,a.marginLeft=u}return a}function K(t){return t.nodeName==="HTML"?t:t.parentNode||t.host}function Zt(t){if(!t)return document.body;switch(t.nodeName){case"HTML":case"BODY":return t.ownerDocument.body;case"#document":return t.body;default:}let{overflow:e,overflowX:o,overflowY:i}=S(t);return/(auto|scroll|overlay)/.test(String(e)+String(i)+String(o))?t:Zt(K(t))}function Lt(t,e="top"){let o=e==="top"?"scrollTop":"scrollLeft",i=t.nodeName;if(i==="BODY"||i==="HTML"){let n=t.ownerDocument.documentElement;return(t.ownerDocument.scrollingElement||n)[o]}return t[o]}function re(t,e=!1){let o=t.ownerDocument.documentElement,i=U(t,o),n=Math.max(o.clientWidth,window.innerWidth||0),s=Math.max(o.clientHeight,window.innerHeight||0),r=e?0:Lt(o),h=e?0:Lt(o,"left"),c={top:r-Number(i?.top)+Number(i?.marginTop),left:h-Number(i?.left)+Number(i?.marginLeft),width:n,height:s};return A(c)}function Gt(t){let e=t.nodeName;return e==="BODY"||e==="HTML"?!1:S(t,"position")==="fixed"?!0:Gt(K(t))}function X(t,e,o=0,i,n=!1){let s={top:0,left:0},r=n?qt(t):I(t,e);if(i==="viewport")s=re(r,n);else{let h;i==="scrollParent"?(h=Zt(K(e)),h.nodeName==="BODY"&&(h=t.ownerDocument.documentElement)):i==="window"?h=t.ownerDocument.documentElement:h=i;let c=U(h,r,n);if(c&&h.nodeName==="HTML"&&!Gt(r)){let{height:a,width:f}=Yt(t.ownerDocument);l(s.top)&&l(c.top)&&l(c.marginTop)&&(s.top+=c.top-c.marginTop),l(s.top)&&(s.bottom=Number(a)+Number(c.top)),l(s.left)&&l(c.left)&&l(c.marginLeft)&&(s.left+=c.left-c.marginLeft),l(s.top)&&(s.right=Number(f)+Number(c.left))}else c&&(s=c)}return l(s.left)&&(s.left+=o),l(s.top)&&(s.top+=o),l(s.right)&&(s.right-=o),l(s.bottom)&&(s.bottom-=o),s}function he({width:t,height:e}){return t*e}function Ut(t,e,o,i,n=["top","bottom","right","left"],s="viewport",r=0){if(t.indexOf("auto")===-1)return t;let h=X(o,i,r,s),c={top:{width:h?.width??0,height:(e?.top??0)-(h?.top??0)},right:{width:(h?.right??0)-(e?.right??0),height:h?.height??0},bottom:{width:h?.width??0,height:(h?.bottom??0)-(e?.bottom??0)},left:{width:(e.left??0)-(h?.left??0),height:h?.height??0}},a=Object.keys(c).map(p=>F(_({position:p},c[p]),{area:he(c[p])})).sort((p,b)=>b.area-p.area),f=a.filter(({width:p,height:b})=>p>=o.clientWidth&&b>=o.clientHeight);f=f.filter(({position:p})=>n.some(b=>b===p));let u=f.length>0?f[0].position:a[0].position,m=t.split(" ")[1];return o.className=o.className.replace(/bs-tooltip-auto/g,`bs-tooltip-${O().isBs5?j[u]:u}`),u+(m?`-${m}`:"")}function ce(t){return{width:t.offsets.target.width,height:t.offsets.target.height,left:Math.floor(t.offsets.target.left??0),top:Math.round(t.offsets.target.top??0),bottom:Math.round(t.offsets.target.bottom??0),right:Math.floor(t.offsets.target.right??0)}}function ae(t){let e={left:"right",right:"left",bottom:"top",top:"bottom"};return t.replace(/left|right|bottom|top/g,o=>e[o])}function fe(t){return t==="right"?"left":t==="left"?"right":t}var k=(t,e=0)=>t?parseFloat(t):e;function Kt(t){let o=t.ownerDocument.defaultView?.getComputedStyle(t),i=k(o?.marginTop)+k(o?.marginBottom),n=k(o?.marginLeft)+k(o?.marginRight);return{width:Number(t.offsetWidth)+n,height:Number(t.offsetHeight)+i}}function Xt(t,e,o){let i=o?qt(t):I(t,e);return U(e,i,o)}function Y(t,e,o){let i=o.split(" ")[0],n=Kt(t),s={width:n.width,height:n.height},r=["right","left"].indexOf(i)!==-1,h=r?"top":"left",c=r?"left":"top",a=r?"height":"width",f=r?"width":"height";return s[h]=(e[h]??0)+e[a]/2-n[a]/2,s[c]=i===c?(e[c]??0)-n[f]:e[ae(c)]??0,s}function Qt(t,e){return!!t.modifiers[e]?.enabled}var le={top:["top","top start","top end"],bottom:["bottom","bottom start","bottom end"],start:["start","start top","start bottom"],end:["end","end top","end bottom"]};function $(t,e){return O().isBs5?le[e].includes(t):!1}function ue(t){return O().isBs5?$(t,"end")?"ms-2":$(t,"start")?"me-2":$(t,"top")?"mb-2":$(t,"bottom")?"mt-2":"":""}function pe(t,e){let o=t.instance.target,i=o.className,n=O().isBs5?j[t.placement]:t.placement;if(t.placementAuto&&(i=i.replace(/bs-popover-auto/g,`bs-popover-${n}`),i=i.replace(/ms-2|me-2|mb-2|mt-2/g,""),i=i.replace(/bs-tooltip-auto/g,`bs-tooltip-${n}`),i=i.replace(/\sauto/g,` ${n}`),i.indexOf("popover")!==-1&&(i=i+" "+ue(n)),i.indexOf("popover")!==-1&&i.indexOf("popover-auto")===-1&&(i+=" popover-auto"),i.indexOf("tooltip")!==-1&&i.indexOf("tooltip-auto")===-1&&(i+=" tooltip-auto")),i=i.replace(/left|right|top|bottom|end|start/g,`${n.split(" ")[0]}`),e){e.setAttribute(o,"class",i);return}o.className=i}function Pt(t,e,o){!t||!e||Object.keys(e).forEach(i=>{let n="";if(["width","height","top","right","bottom","left"].indexOf(i)!==-1&&se(e[i])&&(n="px"),o){o.setStyle(t,i,`${String(e[i])}${n}`);return}t.style[i]=String(e[i])+n})}function de(t){let e=t.offsets.target,o=t.instance.target.querySelector(".arrow");if(!o)return t;let i=["left","right"].indexOf(t.placement.split(" ")[0])!==-1,n=i?"height":"width",s=i?"Top":"Left",r=s.toLowerCase(),h=i?"left":"top",c=i?"bottom":"right",a=Kt(o)[n],f=t.placement.split(" ")[1];(t.offsets.host[c]??0)-a<(e[r]??0)&&(e[r]-=(e[r]??0)-((t.offsets.host[c]??0)-a)),Number(t.offsets.host[r])+Number(a)>(e[c]??0)&&(e[r]+=Number(t.offsets.host[r])+Number(a)-Number(e[c])),e=A(e);let u=S(t.instance.target),m=parseFloat(u[`margin${s}`])||0,p=parseFloat(u[`border${s}Width`])||0,b;if(!f)b=Number(t.offsets.host[r])+Number(t.offsets.host[n]/2-a/2);else{let H=parseFloat(u.borderRadius)||0,C=Number(m+p+H);b=r===f?Number(t.offsets.host[r])+C:Number(t.offsets.host[r])+Number(t.offsets.host[n]-C)}let D=b-(e[r]??0)-m-p;return D=Math.max(Math.min(e[n]-(a+5),D),0),t.offsets.arrow={[r]:Math.round(D),[h]:""},t.instance.arrow=o,t}function ge(t){if(t.offsets.target=A(t.offsets.target),!Qt(t.options,"flip"))return t.offsets.target=_(_({},t.offsets.target),Y(t.instance.target,t.offsets.host,t.placement)),t;let e=X(t.instance.target,t.instance.host,0,"viewport",!1),o=t.placement.split(" ")[0],i=t.placement.split(" ")[1]||"",n=t.offsets.host,s=t.instance.target,r=t.instance.host,h=Ut("auto",n,s,r,t.options.allowedPositions),c=[o,h];return c.forEach((a,f)=>{if(o!==a||c.length===f+1)return;o=t.placement.split(" ")[0];let u=o==="left"&&Math.floor(t.offsets.target.right??0)>Math.floor(t.offsets.host.left??0)||o==="right"&&Math.floor(t.offsets.target.left??0)<Math.floor(t.offsets.host.right??0)||o==="top"&&Math.floor(t.offsets.target.bottom??0)>Math.floor(t.offsets.host.top??0)||o==="bottom"&&Math.floor(t.offsets.target.top??0)<Math.floor(t.offsets.host.bottom??0),m=Math.floor(t.offsets.target.left??0)<Math.floor(e.left??0),p=Math.floor(t.offsets.target.right??0)>Math.floor(e.right??0),b=Math.floor(t.offsets.target.top??0)<Math.floor(e.top??0),D=Math.floor(t.offsets.target.bottom??0)>Math.floor(e.bottom??0),H=o==="left"&&m||o==="right"&&p||o==="top"&&b||o==="bottom"&&D,C=["top","bottom"].indexOf(o)!==-1,tt=C&&i==="left"&&m||C&&i==="right"&&p||!C&&i==="left"&&b||!C&&i==="right"&&D;(u||H||tt)&&((u||H)&&(o=c[f+1]),tt&&(i=fe(i)),t.placement=o+(i?` ${i}`:""),t.offsets.target=_(_({},t.offsets.target),Y(t.instance.target,t.offsets.host,t.placement)))}),t}function me(t,e,o,i){if(!t||!e)return;let n=Xt(t,e);!o.match(/^(auto)*\s*(left|right|top|bottom|start|end)*$/)&&!o.match(/^(left|right|top|bottom|start|end)*(?: (left|right|top|bottom|start|end))*$/)&&(o="auto");let s=!!o.match(/auto/g),r=o.match(/auto\s(left|right|top|bottom|start|end)/)?o.split(" ")[1]||"auto":o,h=r.match(/^(left|right|top|bottom|start|end)* ?(?!\1)(left|right|top|bottom|start|end)?/);h&&(r=h[1]+(h[2]?` ${h[2]}`:"")),["left right","right left","top bottom","bottom top"].indexOf(r)!==-1&&(r="auto"),r=Ut(r,n,t,e,i?i.allowedPositions:void 0);let c=Y(t,n,r);return{options:i||{modifiers:{}},instance:{target:t,host:e,arrow:void 0},offsets:{target:c,host:n,arrow:void 0},positionFixed:!1,placement:r,placementAuto:s}}function be(t){if(!Qt(t.options,"preventOverflow"))return t;let e="transform",o=t.instance.target.style,{top:i,left:n,[e]:s}=o;o.top="",o.left="",o[e]="";let r=X(t.instance.target,t.instance.host,0,t.options.modifiers.preventOverflow?.boundariesElement||"scrollParent",!1);o.top=i,o.left=n,o[e]=s;let h=["left","right","top","bottom"],c={primary(a){let f=t.offsets.target[a];return(t.offsets.target[a]??0)<(r[a]??0)&&(f=Math.max(t.offsets.target[a]??0,r[a]??0)),{[a]:f}},secondary(a){let f=a==="right",u=f?"left":"top",m=f?"width":"height",p=t.offsets.target[u];return(t.offsets.target[a]??0)>(r[a]??0)&&(p=Math.min(t.offsets.target[u]??0,(r[a]??0)-t.offsets.target[m])),{[u]:p}}};return h.forEach(a=>{let f=["left","top","start"].indexOf(a)!==-1?c.primary:c.secondary;t.offsets.target=_(_({},t.offsets.target),f(a))}),t}function we(t){let e=t.placement,o=e.split(" ")[0],i=e.split(" ")[1];if(i){let{host:n,target:s}=t.offsets,r=["bottom","top"].indexOf(o)!==-1,h=r?"left":"top",c=r?"width":"height",a={start:{[h]:n[h]},end:{[h]:(n[h]??0)+n[c]-s[c]}};t.offsets.target=F(_({},s),{[h]:h===i?a.start[h]:a.end[h]})}return t}var Z=class{position(e,o){return this.offset(e,o)}offset(e,o){return Xt(o,e)}positionElements(e,o,i,n,s){let r=[ge,we,be,de],h=Wt[i],c=me(o,e,h,s);if(c)return r.reduce((a,f)=>f(a),c)}},_e=new Z;function ve(t,e,o,i,n,s){let r=_e.positionElements(t,e,o,i,n);if(!r)return;let h=ce(r);Pt(e,{"will-change":"transform",top:"0px",left:"0px",transform:`translate3d(${h.left}px, ${h.top}px, 0px)`},s),r.instance.arrow&&Pt(r.instance.arrow,r.offsets.arrow,s),pe(r,s)}var M=(()=>{let e=class e{constructor(i,n,s){this.update$$=new et,this.positionElements=new Map,this.isDisabled=!1,Mt(s)&&i.runOutsideAngular(()=>{this.triggerEvent$=ht(P(window,"scroll",{passive:!0}),P(window,"resize",{passive:!0}),st(0,it),this.update$$),this.triggerEvent$.pipe(Tt()).subscribe(()=>{this.isDisabled||this.positionElements.forEach(r=>{ve(B(r.target),B(r.element),r.attachment,r.appendToBody,this.options,n.createRenderer(null,null))})})})}position(i){this.addPositionElement(i)}get event$(){return this.triggerEvent$}disable(){this.isDisabled=!0}enable(){this.isDisabled=!1}addPositionElement(i){this.positionElements.set(B(i.element),i)}calcPosition(){this.update$$.next(null)}deletePositionElement(i){this.positionElements.delete(B(i))}setOptions(i){this.options=i}};e.\u0275fac=function(n){return new(n||e)(w(V),w(pt),w(ft))},e.\u0275prov=x({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();function B(t){return typeof t=="string"?document.querySelector(t):t instanceof N?t.nativeElement:t??null}var R=class{constructor(e,o,i){this.nodes=e,this.viewRef=o,this.componentRef=i}},Q=class{constructor(e,o,i,n,s,r,h,c,a){this._viewContainerRef=e,this._renderer=o,this._elementRef=i,this._injector=n,this._componentFactoryResolver=s,this._ngZone=r,this._applicationRef=h,this._posService=c,this._document=a,this.onBeforeShow=new v,this.onShown=new v,this.onBeforeHide=new v,this.onHidden=new v,this._providers=[],this._isHiding=!1,this.containerDefaultSelector="body",this._listenOpts={},this._globalListener=Function.prototype}get isShown(){return this._isHiding?!1:!!this._componentRef}attach(e){return this._componentFactory=this._componentFactoryResolver.resolveComponentFactory(e),this}to(e){return this.container=e||this.container,this}position(e){return e?(this.attachment=e.attachment||this.attachment,this._elementRef=e.target||this._elementRef,this):this}provide(e){return this._providers.push(e),this}show(e={}){if(this._subscribePositioning(),this._innerComponent=void 0,!this._componentRef){this.onBeforeShow.emit(),this._contentRef=this._getContentRef(e.content,e.context,e.initialState);let o=T.create({providers:this._providers,parent:this._injector});if(!this._componentFactory)return;if(this._componentRef=this._componentFactory.create(o,this._contentRef.nodes),this._applicationRef.attachView(this._componentRef.hostView),this.instance=this._componentRef.instance,Object.assign(this._componentRef.instance,e),this.container instanceof N&&this.container.nativeElement.appendChild(this._componentRef.location.nativeElement),typeof this.container=="string"&&typeof this._document<"u"){let i=this._document.querySelector(this.container)||this._document.querySelector(this.containerDefaultSelector);if(!i)return;i.appendChild(this._componentRef.location.nativeElement)}!this.container&&this._elementRef&&this._elementRef.nativeElement.parentElement&&this._elementRef.nativeElement.parentElement.appendChild(this._componentRef.location.nativeElement),this._contentRef.componentRef&&(this._innerComponent=this._contentRef.componentRef.instance,this._contentRef.componentRef.changeDetectorRef.markForCheck(),this._contentRef.componentRef.changeDetectorRef.detectChanges()),this._componentRef.changeDetectorRef.markForCheck(),this._componentRef.changeDetectorRef.detectChanges(),this.onShown.emit(e.id?{id:e.id}:this._componentRef.instance)}return this._registerOutsideClick(),this._componentRef}hide(e){if(!this._componentRef)return this;this._posService.deletePositionElement(this._componentRef.location),this.onBeforeHide.emit(this._componentRef.instance);let o=this._componentRef.location.nativeElement;return o.parentNode?.removeChild(o),this._contentRef?.componentRef?.destroy(),this._viewContainerRef&&this._contentRef?.viewRef&&this._viewContainerRef.remove(this._viewContainerRef.indexOf(this._contentRef.viewRef)),this._contentRef?.viewRef?.destroy(),this._componentRef?.destroy(),this._contentRef=void 0,this._componentRef=void 0,this._removeGlobalListener(),this.onHidden.emit(e?{id:e}:null),this}toggle(){if(this.isShown){this.hide();return}this.show()}dispose(){this.isShown&&this.hide(),this._unsubscribePositioning(),this._unregisterListenersFn&&this._unregisterListenersFn()}listen(e){this.triggers=e.triggers||this.triggers,this._listenOpts.outsideClick=e.outsideClick,this._listenOpts.outsideEsc=e.outsideEsc,e.target=e.target||this._elementRef?.nativeElement;let o=this._listenOpts.hide=()=>e.hide?e.hide():void this.hide(),i=this._listenOpts.show=s=>{e.show?e.show(s):this.show(s),s()},n=s=>{this.isShown?o():i(s)};return this._renderer&&(this._unregisterListenersFn=At(this._renderer,{target:e.target,triggers:e.triggers,show:i,hide:o,toggle:n})),this}_removeGlobalListener(){this._globalListener&&(this._globalListener(),this._globalListener=Function.prototype)}attachInline(e,o){return e&&o&&(this._inlineViewRef=e.createEmbeddedView(o)),this}_registerOutsideClick(){if(!this._componentRef||!this._componentRef.location)return;let e=Function.prototype,o=Function.prototype;if(this._listenOpts.outsideClick){let i=this._componentRef.location.nativeElement;setTimeout(()=>{this._renderer&&this._elementRef&&(e=Ht(this._renderer,{targets:[i,this._elementRef.nativeElement],outsideClick:this._listenOpts.outsideClick,hide:()=>this._listenOpts.hide&&this._listenOpts.hide()}))})}if(this._listenOpts.outsideEsc&&this._renderer&&this._elementRef){let i=this._componentRef.location.nativeElement;o=Ft(this._renderer,{targets:[i,this._elementRef.nativeElement],outsideEsc:this._listenOpts.outsideEsc,hide:()=>this._listenOpts.hide&&this._listenOpts.hide()})}this._globalListener=()=>{e(),o()}}getInnerComponent(){return this._innerComponent}_subscribePositioning(){this._zoneSubscription||!this.attachment||(this.onShown.subscribe(()=>{this._posService.position({element:this._componentRef?.location,target:this._elementRef,attachment:this.attachment,appendToBody:this.container==="body"})}),this._zoneSubscription=this._ngZone.onStable.subscribe(()=>{this._componentRef&&this._posService.calcPosition()}))}_unsubscribePositioning(){this._zoneSubscription&&(this._zoneSubscription.unsubscribe(),this._zoneSubscription=void 0)}_getContentRef(e,o,i){if(!e)return new R([]);if(e instanceof lt){if(this._viewContainerRef){let r=this._viewContainerRef.createEmbeddedView(e,o);return r.markForCheck(),new R([r.rootNodes],r)}let s=e.createEmbeddedView({});return this._applicationRef.attachView(s),new R([s.rootNodes],s)}if(typeof e=="function"){let s=this._componentFactoryResolver.resolveComponentFactory(e),r=T.create({providers:this._providers,parent:this._injector}),h=s.create(r);return Object.assign(h.instance,i),this._applicationRef.attachView(h.hostView),new R([[h.location.nativeElement]],h.hostView,h)}let n=this._renderer?[this._renderer.createText(`${e}`)]:[];return new R([n])}},L=(()=>{let e=class e{constructor(i,n,s,r,h,c){this._componentFactoryResolver=i,this._ngZone=n,this._injector=s,this._posService=r,this._applicationRef=h,this._document=c}createLoader(i,n,s){return new Q(n,s,i,this._injector,this._componentFactoryResolver,this._ngZone,this._applicationRef,this._posService,this._document)}};e.\u0275fac=function(n){return new(n||e)(w(ut),w(V),w(T),w(M),w(_t),w(at))},e.\u0275prov=x({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var Ee=["*"],J=(()=>{let e=class e{constructor(){this.adaptivePosition=!0,this.placement="top",this.triggers="hover focus",this.delay=0}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=x({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),Ce=(()=>{let e=class e{get _bsVersions(){return O()}constructor(i){Object.assign(this,i)}ngAfterViewInit(){this.classMap={in:!1,fade:!1},this.placement&&(this._bsVersions.isBs5&&(this.placement=j[this.placement]),this.classMap[this.placement]=!0),this.classMap[`tooltip-${this.placement}`]=!0,this.classMap.in=!0,this.animation&&(this.classMap.fade=!0),this.containerClass&&(this.classMap[this.containerClass]=!0)}};e.\u0275fac=function(n){return new(n||e)(y(J))},e.\u0275cmp=mt({type:e,selectors:[["bs-tooltip-container"]],hostAttrs:["role","tooltip"],hostVars:3,hostBindings:function(n,s){n&2&&(vt("id",s.id),Rt("show tooltip in tooltip-"+s.placement+" bs-tooltip-"+s.placement+" "+s.placement+" "+s.containerClass))},ngContentSelectors:Ee,decls:3,vars:0,consts:[[1,"tooltip-arrow","arrow"],[1,"tooltip-inner"]],template:function(n,s){n&1&&(Ot(),Ct(0,"div",0),yt(1,"div",1),St(2),Et())},styles:[".tooltip[_nghost-%COMP%]{display:block;pointer-events:none;position:absolute}.tooltip[_nghost-%COMP%]   .tooltip-arrow[_ngcontent-%COMP%]{position:absolute}"],changeDetection:0});let t=e;return t})(),Oe=0,li=(()=>{let e=class e{get isOpen(){return this._tooltip.isShown}set isOpen(i){i?this.show():this.hide()}set htmlContent(i){g("tooltipHtml was deprecated, please use `tooltip` instead"),this.tooltip=i}set _placement(i){g("tooltipPlacement was deprecated, please use `placement` instead"),this.placement=i}set _isOpen(i){g("tooltipIsOpen was deprecated, please use `isOpen` instead"),this.isOpen=i}get _isOpen(){return g("tooltipIsOpen was deprecated, please use `isOpen` instead"),this.isOpen}set _enable(i){g("tooltipEnable was deprecated, please use `isDisabled` instead"),this.isDisabled=!i}get _enable(){return g("tooltipEnable was deprecated, please use `isDisabled` instead"),this.isDisabled}set _appendToBody(i){g('tooltipAppendToBody was deprecated, please use `container="body"` instead'),this.container=i?"body":this.container}get _appendToBody(){return g('tooltipAppendToBody was deprecated, please use `container="body"` instead'),this.container==="body"}set _popupClass(i){g("tooltipClass deprecated")}set _tooltipContext(i){g("tooltipContext deprecated")}set _tooltipPopupDelay(i){g("tooltipPopupDelay is deprecated, use `delay` instead"),this.delay=i}get _tooltipTrigger(){return g("tooltipTrigger was deprecated, please use `triggers` instead"),this.triggers}set _tooltipTrigger(i){g("tooltipTrigger was deprecated, please use `triggers` instead"),this.triggers=(i||"").toString()}constructor(i,n,s,r,h,c){this._elementRef=r,this._renderer=h,this._positionService=c,this.tooltipId=Oe++,this.adaptivePosition=!0,this.tooltipChange=new v,this.placement="top",this.triggers="hover focus",this.containerClass="",this.isDisabled=!1,this.delay=0,this.tooltipAnimation=!0,this.tooltipFadeDuration=150,this.tooltipStateChanged=new v,this._tooltip=n.createLoader(this._elementRef,i,this._renderer).provide({provide:J,useValue:s}),Object.assign(this,s),this.onShown=this._tooltip.onShown,this.onHidden=this._tooltip.onHidden}ngOnInit(){this._tooltip.listen({triggers:this.triggers,show:()=>this.show()}),this.tooltipChange.subscribe(i=>{i||this._tooltip.hide()}),this.onShown.subscribe(()=>{this.setAriaDescribedBy()}),this.onHidden.subscribe(()=>{this.setAriaDescribedBy()})}setAriaDescribedBy(){this._ariaDescribedby=this.isOpen?`tooltip-${this.tooltipId}`:void 0,this._ariaDescribedby?this._renderer.setAttribute(this._elementRef.nativeElement,"aria-describedby",this._ariaDescribedby):this._renderer.removeAttribute(this._elementRef.nativeElement,"aria-describedby")}toggle(){if(this.isOpen)return this.hide();this.show()}show(){if(this._positionService.setOptions({modifiers:{flip:{enabled:this.adaptivePosition},preventOverflow:{enabled:this.adaptivePosition,boundariesElement:this.boundariesElement||"scrollParent"}}}),this.isOpen||this.isDisabled||this._delayTimeoutId||!this.tooltip)return;let i=()=>{this._delayTimeoutId&&(this._delayTimeoutId=void 0),this._tooltip.attach(Ce).to(this.container).position({attachment:this.placement}).show({content:this.tooltip,placement:this.placement,containerClass:this.containerClass,id:`tooltip-${this.tooltipId}`})},n=()=>{this._tooltipCancelShowFn&&this._tooltipCancelShowFn()};this.delay?(this._delaySubscription&&this._delaySubscription.unsubscribe(),this._delaySubscription=rt(this.delay).subscribe(()=>{i(),n()}),this.triggers&&W(this.triggers).forEach(s=>{s.close&&(this._tooltipCancelShowFn=this._renderer.listen(this._elementRef.nativeElement,s.close,()=>{this._delaySubscription?.unsubscribe(),n()}))})):i()}hide(){this._delayTimeoutId&&(clearTimeout(this._delayTimeoutId),this._delayTimeoutId=void 0),this._tooltip.isShown&&(this._tooltip.instance?.classMap&&(this._tooltip.instance.classMap.in=!1),setTimeout(()=>{this._tooltip.hide()},this.tooltipFadeDuration))}ngOnDestroy(){this._tooltip.dispose(),this.tooltipChange.unsubscribe(),this._delaySubscription&&this._delaySubscription.unsubscribe(),this.onShown.unsubscribe(),this.onHidden.unsubscribe()}};e.\u0275fac=function(n){return new(n||e)(y(gt),y(L),y(J),y(N),y(dt),y(M))},e.\u0275dir=wt({type:e,selectors:[["","tooltip",""],["","tooltipHtml",""]],inputs:{adaptivePosition:"adaptivePosition",tooltip:"tooltip",placement:"placement",triggers:"triggers",container:"container",containerClass:"containerClass",boundariesElement:"boundariesElement",isOpen:"isOpen",isDisabled:"isDisabled",delay:"delay",htmlContent:[0,"tooltipHtml","htmlContent"],_placement:[0,"tooltipPlacement","_placement"],_isOpen:[0,"tooltipIsOpen","_isOpen"],_enable:[0,"tooltipEnable","_enable"],_appendToBody:[0,"tooltipAppendToBody","_appendToBody"],tooltipAnimation:"tooltipAnimation",_popupClass:[0,"tooltipClass","_popupClass"],_tooltipContext:[0,"tooltipContext","_tooltipContext"],_tooltipPopupDelay:[0,"tooltipPopupDelay","_tooltipPopupDelay"],tooltipFadeDuration:"tooltipFadeDuration",_tooltipTrigger:[0,"tooltipTrigger","_tooltipTrigger"]},outputs:{tooltipChange:"tooltipChange",onShown:"onShown",onHidden:"onHidden",tooltipStateChanged:"tooltipStateChanged"},exportAs:["bs-tooltip"],features:[Dt([L,M])]});let t=e;return ot([kt(),nt("design:type",Object)],t.prototype,"tooltip",void 0),t})(),ui=(()=>{let e=class e{static forRoot(){return{ngModule:e,providers:[]}}};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=bt({type:e}),e.\u0275inj=ct({imports:[Nt]});let t=e;return t})();export{M as a,L as b,li as c,ui as d};