-
Notifications
You must be signed in to change notification settings - Fork 1
/
popper-container.min.js
1 lines (1 loc) · 21.2 KB
/
popper-container.min.js
1
(()=>{var _e=Object.defineProperty;var $e=(e,t,r)=>t in e?_e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var ce=(e,t,r)=>($e(e,typeof t!="symbol"?t+"":t,r),r);var P="top",T="bottom",C="right",R="left",Tt="auto",Q=[P,T,C,R],z="start",at="end",ue="clippingParents",Bt="viewport",dt="popper",de="reference",Ft=Q.reduce(function(e,t){return e.concat([t+"-"+z,t+"-"+at])},[]),Mt=[].concat(Q,[Tt]).reduce(function(e,t){return e.concat([t,t+"-"+z,t+"-"+at])},[]),Ie="beforeRead",Fe="read",qe="afterRead",Xe="beforeMain",Ue="main",Ye="afterMain",ze="beforeWrite",Ge="write",Je="afterWrite",ve=[Ie,Fe,qe,Xe,Ue,Ye,ze,Ge,Je];function M(e){return e?(e.nodeName||"").toLowerCase():null}function E(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function $(e){var t=E(e).Element;return e instanceof t||e instanceof Element}function B(e){var t=E(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function vt(e){if(typeof ShadowRoot>"u")return!1;var t=E(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Ke(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var o=t.styles[r]||{},i=t.attributes[r]||{},a=t.elements[r];!B(a)||!M(a)||(Object.assign(a.style,o),Object.keys(i).forEach(function(f){var n=i[f];n===!1?a.removeAttribute(f):a.setAttribute(f,n===!0?"":n)}))})}function Qe(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(o){var i=t.elements[o],a=t.attributes[o]||{},f=Object.keys(t.styles.hasOwnProperty(o)?t.styles[o]:r[o]),n=f.reduce(function(p,m){return p[m]="",p},{});!B(i)||!M(i)||(Object.assign(i.style,n),Object.keys(a).forEach(function(p){i.removeAttribute(p)}))})}}var ge={name:"applyStyles",enabled:!0,phase:"write",fn:Ke,effect:Qe,requires:["computeStyles"]};function j(e){return e.split("-")[0]}var X=Math.max,nt=Math.min,G=Math.round;function gt(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function bt(){return!/^((?!chrome|android).)*safari/i.test(gt())}function I(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var o=e.getBoundingClientRect(),i=1,a=1;t&&B(e)&&(i=e.offsetWidth>0&&G(o.width)/e.offsetWidth||1,a=e.offsetHeight>0&&G(o.height)/e.offsetHeight||1);var f=$(e)?E(e):window,n=f.visualViewport,p=!bt()&&r,m=(o.left+(p&&n?n.offsetLeft:0))/i,s=(o.top+(p&&n?n.offsetTop:0))/a,v=o.width/i,x=o.height/a;return{width:v,height:x,top:s,right:m+v,bottom:s+x,left:m,x:m,y:s}}function pt(e){var t=I(e),r=e.offsetWidth,o=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-o)<=1&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:o}}function Ot(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&vt(r)){var o=t;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function k(e){return E(e).getComputedStyle(e)}function qt(e){return["table","td","th"].indexOf(M(e))>=0}function W(e){return(($(e)?e.ownerDocument:e.document)||window.document).documentElement}function J(e){return M(e)==="html"?e:e.assignedSlot||e.parentNode||(vt(e)?e.host:null)||W(e)}function he(e){return!B(e)||k(e).position==="fixed"?null:e.offsetParent}function Ze(e){var t=/firefox/i.test(gt()),r=/Trident/i.test(gt());if(r&&B(e)){var o=k(e);if(o.position==="fixed")return null}var i=J(e);for(vt(i)&&(i=i.host);B(i)&&["html","body"].indexOf(M(i))<0;){var a=k(i);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||t&&a.willChange==="filter"||t&&a.filter&&a.filter!=="none")return i;i=i.parentNode}return null}function U(e){for(var t=E(e),r=he(e);r&&qt(r)&&k(r).position==="static";)r=he(r);return r&&(M(r)==="html"||M(r)==="body"&&k(r).position==="static")?t:r||Ze(e)||t}function st(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function ft(e,t,r){return X(e,nt(t,r))}function xe(e,t,r){var o=ft(e,t,r);return o>r?r:o}function Et(){return{top:0,right:0,bottom:0,left:0}}function Pt(e){return Object.assign({},Et(),e)}function St(e,t){return t.reduce(function(r,o){return r[o]=e,r},{})}var tr=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,Pt(typeof t!="number"?t:St(t,Q))};function er(e){var t,r=e.state,o=e.name,i=e.options,a=r.elements.arrow,f=r.modifiersData.popperOffsets,n=j(r.placement),p=st(n),m=[R,C].indexOf(n)>=0,s=m?"height":"width";if(!(!a||!f)){var v=tr(i.padding,r),x=pt(a),l=p==="y"?P:R,w=p==="y"?T:C,u=r.rects.reference[s]+r.rects.reference[p]-f[p]-r.rects.popper[s],c=f[p]-r.rects.reference[p],y=U(a),S=y?p==="y"?y.clientHeight||0:y.clientWidth||0:0,A=u/2-c/2,d=v[l],g=S-x[s]-v[w],h=S/2-x[s]/2+A,O=ft(d,h,g),L=p;r.modifiersData[o]=(t={},t[L]=O,t.centerOffset=O-h,t)}}function rr(e){var t=e.state,r=e.options,o=r.element,i=o===void 0?"[data-popper-arrow]":o;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||!Ot(t.elements.popper,i)||(t.elements.arrow=i))}var ye={name:"arrow",enabled:!0,phase:"main",fn:er,effect:rr,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function F(e){return e.split("-")[1]}var or={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ir(e){var t=e.x,r=e.y,o=window,i=o.devicePixelRatio||1;return{x:G(t*i)/i||0,y:G(r*i)/i||0}}function we(e){var t,r=e.popper,o=e.popperRect,i=e.placement,a=e.variation,f=e.offsets,n=e.position,p=e.gpuAcceleration,m=e.adaptive,s=e.roundOffsets,v=e.isFixed,x=f.x,l=x===void 0?0:x,w=f.y,u=w===void 0?0:w,c=typeof s=="function"?s({x:l,y:u}):{x:l,y:u};l=c.x,u=c.y;var y=f.hasOwnProperty("x"),S=f.hasOwnProperty("y"),A=R,d=P,g=window;if(m){var h=U(r),O="clientHeight",L="clientWidth";if(h===E(r)&&(h=W(r),k(h).position!=="static"&&n==="absolute"&&(O="scrollHeight",L="scrollWidth")),h=h,i===P||(i===R||i===C)&&a===at){d=T;var D=v&&h===g&&g.visualViewport?g.visualViewport.height:h[O];u-=D-o.height,u*=p?1:-1}if(i===R||(i===P||i===T)&&a===at){A=C;var N=v&&h===g&&g.visualViewport?g.visualViewport.width:h[L];l-=N-o.width,l*=p?1:-1}}var b=Object.assign({position:n},m&&or),H=s===!0?ir({x:l,y:u}):{x:l,y:u};if(l=H.x,u=H.y,p){var V;return Object.assign({},b,(V={},V[d]=S?"0":"",V[A]=y?"0":"",V.transform=(g.devicePixelRatio||1)<=1?"translate("+l+"px, "+u+"px)":"translate3d("+l+"px, "+u+"px, 0)",V))}return Object.assign({},b,(t={},t[d]=S?u+"px":"",t[A]=y?l+"px":"",t.transform="",t))}function ar(e){var t=e.state,r=e.options,o=r.gpuAcceleration,i=o===void 0?!0:o,a=r.adaptive,f=a===void 0?!0:a,n=r.roundOffsets,p=n===void 0?!0:n;if(!1)var m;var s={placement:j(t.placement),variation:F(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,we(Object.assign({},s,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:f,roundOffsets:p})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,we(Object.assign({},s,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:p})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var be={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:ar,data:{}};var jt={passive:!0};function nr(e){var t=e.state,r=e.instance,o=e.options,i=o.scroll,a=i===void 0?!0:i,f=o.resize,n=f===void 0?!0:f,p=E(t.elements.popper),m=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&m.forEach(function(s){s.addEventListener("scroll",r.update,jt)}),n&&p.addEventListener("resize",r.update,jt),function(){a&&m.forEach(function(s){s.removeEventListener("scroll",r.update,jt)}),n&&p.removeEventListener("resize",r.update,jt)}}var Oe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:nr,data:{}};var pr={left:"right",right:"left",bottom:"top",top:"bottom"};function ht(e){return e.replace(/left|right|bottom|top/g,function(t){return pr[t]})}var sr={start:"end",end:"start"};function Wt(e){return e.replace(/start|end/g,function(t){return sr[t]})}function mt(e){var t=E(e),r=t.pageXOffset,o=t.pageYOffset;return{scrollLeft:r,scrollTop:o}}function lt(e){return I(W(e)).left+mt(e).scrollLeft}function Xt(e,t){var r=E(e),o=W(e),i=r.visualViewport,a=o.clientWidth,f=o.clientHeight,n=0,p=0;if(i){a=i.width,f=i.height;var m=bt();(m||!m&&t==="fixed")&&(n=i.offsetLeft,p=i.offsetTop)}return{width:a,height:f,x:n+lt(e),y:p}}function Ut(e){var t,r=W(e),o=mt(e),i=(t=e.ownerDocument)==null?void 0:t.body,a=X(r.scrollWidth,r.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),f=X(r.scrollHeight,r.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),n=-o.scrollLeft+lt(e),p=-o.scrollTop;return k(i||r).direction==="rtl"&&(n+=X(r.clientWidth,i?i.clientWidth:0)-a),{width:a,height:f,x:n,y:p}}function ct(e){var t=k(e),r=t.overflow,o=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+o)}function Vt(e){return["html","body","#document"].indexOf(M(e))>=0?e.ownerDocument.body:B(e)&&ct(e)?e:Vt(J(e))}function Z(e,t){var r;t===void 0&&(t=[]);var o=Vt(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=E(o),f=i?[a].concat(a.visualViewport||[],ct(o)?o:[]):o,n=t.concat(f);return i?n:n.concat(Z(J(f)))}function xt(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function fr(e,t){var r=I(e,!1,t==="fixed");return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}function Ee(e,t,r){return t===Bt?xt(Xt(e,r)):$(t)?fr(t,r):xt(Ut(W(e)))}function mr(e){var t=Z(J(e)),r=["absolute","fixed"].indexOf(k(e).position)>=0,o=r&&B(e)?U(e):e;return $(o)?t.filter(function(i){return $(i)&&Ot(i,o)&&M(i)!=="body"}):[]}function Yt(e,t,r,o){var i=t==="clippingParents"?mr(e):[].concat(t),a=[].concat(i,[r]),f=a[0],n=a.reduce(function(p,m){var s=Ee(e,m,o);return p.top=X(s.top,p.top),p.right=nt(s.right,p.right),p.bottom=nt(s.bottom,p.bottom),p.left=X(s.left,p.left),p},Ee(e,f,o));return n.width=n.right-n.left,n.height=n.bottom-n.top,n.x=n.left,n.y=n.top,n}function At(e){var t=e.reference,r=e.element,o=e.placement,i=o?j(o):null,a=o?F(o):null,f=t.x+t.width/2-r.width/2,n=t.y+t.height/2-r.height/2,p;switch(i){case P:p={x:f,y:t.y-r.height};break;case T:p={x:f,y:t.y+t.height};break;case C:p={x:t.x+t.width,y:n};break;case R:p={x:t.x-r.width,y:n};break;default:p={x:t.x,y:t.y}}var m=i?st(i):null;if(m!=null){var s=m==="y"?"height":"width";switch(a){case z:p[m]=p[m]-(t[s]/2-r[s]/2);break;case at:p[m]=p[m]+(t[s]/2-r[s]/2);break;default:}}return p}function Y(e,t){t===void 0&&(t={});var r=t,o=r.placement,i=o===void 0?e.placement:o,a=r.strategy,f=a===void 0?e.strategy:a,n=r.boundary,p=n===void 0?ue:n,m=r.rootBoundary,s=m===void 0?Bt:m,v=r.elementContext,x=v===void 0?dt:v,l=r.altBoundary,w=l===void 0?!1:l,u=r.padding,c=u===void 0?0:u,y=Pt(typeof c!="number"?c:St(c,Q)),S=x===dt?de:dt,A=e.rects.popper,d=e.elements[w?S:x],g=Yt($(d)?d:d.contextElement||W(e.elements.popper),p,s,f),h=I(e.elements.reference),O=At({reference:h,element:A,strategy:"absolute",placement:i}),L=xt(Object.assign({},A,O)),D=x===dt?L:h,N={top:g.top-D.top+y.top,bottom:D.bottom-g.bottom+y.bottom,left:g.left-D.left+y.left,right:D.right-g.right+y.right},b=e.modifiersData.offset;if(x===dt&&b){var H=b[i];Object.keys(N).forEach(function(V){var tt=[C,T].indexOf(V)>=0?1:-1,et=[P,T].indexOf(V)>=0?"y":"x";N[V]+=H[et]*tt})}return N}function zt(e,t){t===void 0&&(t={});var r=t,o=r.placement,i=r.boundary,a=r.rootBoundary,f=r.padding,n=r.flipVariations,p=r.allowedAutoPlacements,m=p===void 0?Mt:p,s=F(o),v=s?n?Ft:Ft.filter(function(w){return F(w)===s}):Q,x=v.filter(function(w){return m.indexOf(w)>=0});x.length===0&&(x=v);var l=x.reduce(function(w,u){return w[u]=Y(e,{placement:u,boundary:i,rootBoundary:a,padding:f})[j(u)],w},{});return Object.keys(l).sort(function(w,u){return l[w]-l[u]})}function lr(e){if(j(e)===Tt)return[];var t=ht(e);return[Wt(e),t,Wt(t)]}function cr(e){var t=e.state,r=e.options,o=e.name;if(!t.modifiersData[o]._skip){for(var i=r.mainAxis,a=i===void 0?!0:i,f=r.altAxis,n=f===void 0?!0:f,p=r.fallbackPlacements,m=r.padding,s=r.boundary,v=r.rootBoundary,x=r.altBoundary,l=r.flipVariations,w=l===void 0?!0:l,u=r.allowedAutoPlacements,c=t.options.placement,y=j(c),S=y===c,A=p||(S||!w?[ht(c)]:lr(c)),d=[c].concat(A).reduce(function(ut,K){return ut.concat(j(K)===Tt?zt(t,{placement:K,boundary:s,rootBoundary:v,padding:m,flipVariations:w,allowedAutoPlacements:u}):K)},[]),g=t.rects.reference,h=t.rects.popper,O=new Map,L=!0,D=d[0],N=0;N<d.length;N++){var b=d[N],H=j(b),V=F(b)===z,tt=[P,T].indexOf(H)>=0,et=tt?"width":"height",_=Y(t,{placement:b,boundary:s,rootBoundary:v,altBoundary:x,padding:m}),q=tt?V?C:R:V?T:P;g[et]>h[et]&&(q=ht(q));var Rt=ht(q),rt=[];if(a&&rt.push(_[H]<=0),n&&rt.push(_[q]<=0,_[Rt]<=0),rt.every(function(ut){return ut})){D=b,L=!1;break}O.set(b,rt)}if(L)for(var Ct=w?3:1,Ht=function(K){var wt=d.find(function(Dt){var ot=O.get(Dt);if(ot)return ot.slice(0,K).every(function(_t){return _t})});if(wt)return D=wt,"break"},yt=Ct;yt>0;yt--){var Lt=Ht(yt);if(Lt==="break")break}t.placement!==D&&(t.modifiersData[o]._skip=!0,t.placement=D,t.reset=!0)}}var Pe={name:"flip",enabled:!0,phase:"main",fn:cr,requiresIfExists:["offset"],data:{_skip:!1}};function Se(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function Ae(e){return[P,C,T,R].some(function(t){return e[t]>=0})}function ur(e){var t=e.state,r=e.name,o=t.rects.reference,i=t.rects.popper,a=t.modifiersData.preventOverflow,f=Y(t,{elementContext:"reference"}),n=Y(t,{altBoundary:!0}),p=Se(f,o),m=Se(n,i,a),s=Ae(p),v=Ae(m);t.modifiersData[r]={referenceClippingOffsets:p,popperEscapeOffsets:m,isReferenceHidden:s,hasPopperEscaped:v},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":s,"data-popper-escaped":v})}var Re={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:ur};function dr(e,t,r){var o=j(e),i=[R,P].indexOf(o)>=0?-1:1,a=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,f=a[0],n=a[1];return f=f||0,n=(n||0)*i,[R,C].indexOf(o)>=0?{x:n,y:f}:{x:f,y:n}}function vr(e){var t=e.state,r=e.options,o=e.name,i=r.offset,a=i===void 0?[0,0]:i,f=Mt.reduce(function(s,v){return s[v]=dr(v,t.rects,a),s},{}),n=f[t.placement],p=n.x,m=n.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=p,t.modifiersData.popperOffsets.y+=m),t.modifiersData[o]=f}var Ce={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:vr};function gr(e){var t=e.state,r=e.name;t.modifiersData[r]=At({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var Le={name:"popperOffsets",enabled:!0,phase:"read",fn:gr,data:{}};function Gt(e){return e==="x"?"y":"x"}function hr(e){var t=e.state,r=e.options,o=e.name,i=r.mainAxis,a=i===void 0?!0:i,f=r.altAxis,n=f===void 0?!1:f,p=r.boundary,m=r.rootBoundary,s=r.altBoundary,v=r.padding,x=r.tether,l=x===void 0?!0:x,w=r.tetherOffset,u=w===void 0?0:w,c=Y(t,{boundary:p,rootBoundary:m,padding:v,altBoundary:s}),y=j(t.placement),S=F(t.placement),A=!S,d=st(y),g=Gt(d),h=t.modifiersData.popperOffsets,O=t.rects.reference,L=t.rects.popper,D=typeof u=="function"?u(Object.assign({},t.rects,{placement:t.placement})):u,N=typeof D=="number"?{mainAxis:D,altAxis:D}:Object.assign({mainAxis:0,altAxis:0},D),b=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,H={x:0,y:0};if(!!h){if(a){var V,tt=d==="y"?P:R,et=d==="y"?T:C,_=d==="y"?"height":"width",q=h[d],Rt=q+c[tt],rt=q-c[et],Ct=l?-L[_]/2:0,Ht=S===z?O[_]:L[_],yt=S===z?-L[_]:-O[_],Lt=t.elements.arrow,ut=l&&Lt?pt(Lt):{width:0,height:0},K=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Et(),wt=K[tt],Dt=K[et],ot=ft(0,O[_],ut[_]),_t=A?O[_]/2-Ct-ot-wt-N.mainAxis:Ht-ot-wt-N.mainAxis,Me=A?-O[_]/2+Ct+ot+Dt+N.mainAxis:yt+ot+Dt+N.mainAxis,$t=t.elements.arrow&&U(t.elements.arrow),je=$t?d==="y"?$t.clientTop||0:$t.clientLeft||0:0,oe=(V=b?.[d])!=null?V:0,We=q+_t-oe-je,Ve=q+Me-oe,ie=ft(l?nt(Rt,We):Rt,q,l?X(rt,Ve):rt);h[d]=ie,H[d]=ie-q}if(n){var ae,ke=d==="x"?P:R,He=d==="x"?T:C,it=h[g],Nt=g==="y"?"height":"width",ne=it+c[ke],pe=it-c[He],It=[P,R].indexOf(y)!==-1,se=(ae=b?.[g])!=null?ae:0,fe=It?ne:it-O[Nt]-L[Nt]-se+N.altAxis,me=It?it+O[Nt]+L[Nt]-se-N.altAxis:pe,le=l&&It?xe(fe,it,me):ft(l?fe:ne,it,l?me:pe);h[g]=le,H[g]=le-it}t.modifiersData[o]=H}}var De={name:"preventOverflow",enabled:!0,phase:"main",fn:hr,requiresIfExists:["offset"]};function Jt(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Kt(e){return e===E(e)||!B(e)?mt(e):Jt(e)}function xr(e){var t=e.getBoundingClientRect(),r=G(t.width)/e.offsetWidth||1,o=G(t.height)/e.offsetHeight||1;return r!==1||o!==1}function Qt(e,t,r){r===void 0&&(r=!1);var o=B(t),i=B(t)&&xr(t),a=W(t),f=I(e,i,r),n={scrollLeft:0,scrollTop:0},p={x:0,y:0};return(o||!o&&!r)&&((M(t)!=="body"||ct(a))&&(n=Kt(t)),B(t)?(p=I(t,!0),p.x+=t.clientLeft,p.y+=t.clientTop):a&&(p.x=lt(a))),{x:f.left+n.scrollLeft-p.x,y:f.top+n.scrollTop-p.y,width:f.width,height:f.height}}function yr(e){var t=new Map,r=new Set,o=[];e.forEach(function(a){t.set(a.name,a)});function i(a){r.add(a.name);var f=[].concat(a.requires||[],a.requiresIfExists||[]);f.forEach(function(n){if(!r.has(n)){var p=t.get(n);p&&i(p)}}),o.push(a)}return e.forEach(function(a){r.has(a.name)||i(a)}),o}function Zt(e){var t=yr(e);return ve.reduce(function(r,o){return r.concat(t.filter(function(i){return i.phase===o}))},[])}function te(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function ee(e){var t=e.reduce(function(r,o){var i=r[o.name];return r[o.name]=i?Object.assign({},i,o,{options:Object.assign({},i.options,o.options),data:Object.assign({},i.data,o.data)}):o,r},{});return Object.keys(t).map(function(r){return t[r]})}var Ne={placement:"bottom",modifiers:[],strategy:"absolute"};function Te(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return!t.some(function(o){return!(o&&typeof o.getBoundingClientRect=="function")})}function Be(e){e===void 0&&(e={});var t=e,r=t.defaultModifiers,o=r===void 0?[]:r,i=t.defaultOptions,a=i===void 0?Ne:i;return function(n,p,m){m===void 0&&(m=a);var s={placement:"bottom",orderedModifiers:[],options:Object.assign({},Ne,a),modifiersData:{},elements:{reference:n,popper:p},attributes:{},styles:{}},v=[],x=!1,l={state:s,setOptions:function(y){var S=typeof y=="function"?y(s.options):y;u(),s.options=Object.assign({},a,s.options,S),s.scrollParents={reference:$(n)?Z(n):n.contextElement?Z(n.contextElement):[],popper:Z(p)};var A=Zt(ee([].concat(o,s.options.modifiers)));if(s.orderedModifiers=A.filter(function(b){return b.enabled}),!1){var d;if(getBasePlacement(s.options.placement)===auto)var g;var h,O,L,D,N}return w(),l.update()},forceUpdate:function(){if(!x){var y=s.elements,S=y.reference,A=y.popper;if(!!Te(S,A)){s.rects={reference:Qt(S,U(A),s.options.strategy==="fixed"),popper:pt(A)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach(function(b){return s.modifiersData[b.name]=Object.assign({},b.data)});for(var d=0,g=0;g<s.orderedModifiers.length;g++){if(s.reset===!0){s.reset=!1,g=-1;continue}var h=s.orderedModifiers[g],O=h.fn,L=h.options,D=L===void 0?{}:L,N=h.name;typeof O=="function"&&(s=O({state:s,options:D,name:N,instance:l})||s)}}}},update:te(function(){return new Promise(function(c){l.forceUpdate(),c(s)})}),destroy:function(){u(),x=!0}};if(!Te(n,p))return l;l.setOptions(m).then(function(c){!x&&m.onFirstUpdate&&m.onFirstUpdate(c)});function w(){s.orderedModifiers.forEach(function(c){var y=c.name,S=c.options,A=S===void 0?{}:S,d=c.effect;if(typeof d=="function"){var g=d({state:s,name:y,instance:l,options:A}),h=function(){};v.push(g||h)}})}function u(){v.forEach(function(c){return c()}),v=[]}return l}}var wr=[Oe,Le,be,ge,Ce,Pe,De,ye,Re],re=Be({defaultModifiers:wr});var kt=class extends HTMLElement{connectedCallback(){requestAnimationFrame(()=>this.setup())}disconnectedCallback(){this.teardown()}attributeChangedCallback(t,r,o){r!==o&&(this.teardown(),this.setup())}teardown(){this.poll&&clearTimeout(this.poll),this.popper&&this.popper.destroy()}setup(){let t=document.getElementById(this.getAttribute("data-tooltip-id")),r=this.firstElementChild;if(t){this.popper=re(r,t,{placement:this.getAttribute("data-placement"),strategy:this.getAttribute("data-strategy"),modifiers:JSON.parse(this.getAttribute("data-modifiers"))});let o=n=>{t.setAttribute("data-show","true"),this.popper.update()},i=()=>{t.removeAttribute("data-show"),this.popper.update()},a=n=>{t.removeAttribute("data-show"),this.popper.update()},f=t.querySelector("[data-tooltip-close]");f&&f.addEventListener("click",a),r.addEventListener("mouseenter",o),r.addEventListener("focus",o),r.addEventListener("mouseleave",i),r.addEventListener("blur",a),this.teardown=()=>{f&&f.removeEventListener("click",a),r.removeEventListener("mouseenter",o),r.removeEventListener("focus",o),r.removeEventListener("mouseleave",i),r.removeEventListener("blur",a)};return}this.poll=setTimeout(()=>{this.setup(),this.poll=null},100)}};ce(kt,"observedAttributes",["data-placement","data-strategy","data-options"]);window.customElements.define("popper-container",kt);})();