Build 576754stable
Module 888767
19,020 characters · in 25536.0ec29f5a59959fec.jsDependencies
Source Raw
function(e,t,n){"use strict";function r(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function o(e){var t=r(e).Element;return e instanceof t||e instanceof Element}function a(e){var t=r(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function i(e){if("u"<typeof ShadowRoot)return!1;var t=r(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}n.d(t,{n:()=>es});var u,l,s,c,f,d=Math.max,h=Math.min,p=Math.round;function v(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function y(){return!/^((?!chrome|android).)*safari/i.test(v())}function m(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var i=e.getBoundingClientRect(),u=1,l=1;t&&a(e)&&(u=e.offsetWidth>0&&p(i.width)/e.offsetWidth||1,l=e.offsetHeight>0&&p(i.height)/e.offsetHeight||1);var s=(o(e)?r(e):window).visualViewport,c=!y()&&n,f=(i.left+(c&&s?s.offsetLeft:0))/u,d=(i.top+(c&&s?s.offsetTop:0))/l,h=i.width/u,v=i.height/l;return{width:h,height:v,top:d,right:f+h,bottom:d+v,left:f,x:f,y:d}}function g(e){var t=r(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function b(e){return e?(e.nodeName||"").toLowerCase():null}function w(e){return((o(e)?e.ownerDocument:e.document)||window.document).documentElement}function _(e){return m(w(e)).left+g(e).scrollLeft}function D(e){return r(e).getComputedStyle(e)}function x(e){var t=D(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function k(e){var t=m(e),n=e.offsetWidth,r=e.offsetHeight;return 1>=Math.abs(t.width-n)&&(n=t.width),1>=Math.abs(t.height-r)&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function E(e){return"html"===b(e)?e:e.assignedSlot||e.parentNode||(i(e)?e.host:null)||w(e)}function C(e,t){void 0===t&&(t=[]);var n,o=function e(t){return["html","body","#document"].indexOf(b(t))>=0?t.ownerDocument.body:a(t)&&x(t)?t:e(E(t))}(e),i=o===(null==(n=e.ownerDocument)?void 0:n.body),u=r(o),l=i?[u].concat(u.visualViewport||[],x(o)?o:[]):o,s=t.concat(l);return i?s:s.concat(C(E(l)))}function A(e){return a(e)&&"fixed"!==D(e).position?e.offsetParent:null}function S(e){for(var t=r(e),n=A(e);n&&["table","td","th"].indexOf(b(n))>=0&&"static"===D(n).position;)n=A(n);return n&&("html"===b(n)||"body"===b(n)&&"static"===D(n).position)?t:n||function(e){var t=/firefox/i.test(v());if(/Trident/i.test(v())&&a(e)&&"fixed"===D(e).position)return null;var n=E(e);for(i(n)&&(n=n.host);a(n)&&0>["html","body"].indexOf(b(n));){var r=D(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var O="bottom",B="right",F="left",T="auto",P=["top",O,B,F],j="start",R="viewport",M="popper",N=P.reduce(function(e,t){return e.concat([t+"-"+j,t+"-end"])},[]),L=[].concat(P,[T]).reduce(function(e,t){return e.concat([t,t+"-"+j,t+"-end"])},[]),z=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"],U={placement:"bottom",modifiers:[],strategy:"absolute"};function I(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(e){return!(e&&"function"==typeof e.getBoundingClientRect)})}var Y={passive:!0};function W(e){return e.split("-")[0]}function H(e){return e.split("-")[1]}function q(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function V(e){var t,n=e.reference,r=e.element,o=e.placement,a=o?W(o):null,i=o?H(o):null,u=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(a){case"top":t={x:u,y:n.y-r.height};break;case O:t={x:u,y:n.y+n.height};break;case B:t={x:n.x+n.width,y:l};break;case F:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var s=a?q(a):null;if(null!=s){var c="y"===s?"height":"width";switch(i){case j:t[s]=t[s]-(n[c]/2-r[c]/2);break;case"end":t[s]=t[s]+(n[c]/2-r[c]/2)}}return t}var $={top:"auto",right:"auto",bottom:"auto",left:"auto"};function K(e){var t,n,o,a,i,u,l,s=e.popper,c=e.popperRect,f=e.placement,d=e.variation,h=e.offsets,v=e.position,y=e.gpuAcceleration,m=e.adaptive,g=e.roundOffsets,b=e.isFixed,_=h.x,x=void 0===_?0:_,k=h.y,E=void 0===k?0:k,C="function"==typeof g?g({x:x,y:E}):{x:x,y:E};x=C.x,E=C.y;var A=h.hasOwnProperty("x"),T=h.hasOwnProperty("y"),P=F,j="top",R=window;if(m){var M=S(s),N="clientHeight",L="clientWidth";M===r(s)&&"static"!==D(M=w(s)).position&&"absolute"===v&&(N="scrollHeight",L="scrollWidth"),("top"===f||(f===F||f===B)&&"end"===d)&&(j=O,E-=(b&&M===R&&R.visualViewport?R.visualViewport.height:M[N])-c.height,E*=y?1:-1),(f===F||("top"===f||f===O)&&"end"===d)&&(P=B,x-=(b&&M===R&&R.visualViewport?R.visualViewport.width:M[L])-c.width,x*=y?1:-1)}var z=Object.assign({position:v},m&&$),U=!0===g?(t={x:x,y:E},n=r(s),o=t.x,a=t.y,{x:p(o*(i=n.devicePixelRatio||1))/i||0,y:p(a*i)/i||0}):{x:x,y:E};return(x=U.x,E=U.y,y)?Object.assign({},z,((l={})[j]=T?"0":"",l[P]=A?"0":"",l.transform=1>=(R.devicePixelRatio||1)?"translate("+x+"px, "+E+"px)":"translate3d("+x+"px, "+E+"px, 0)",l)):Object.assign({},z,((u={})[j]=T?E+"px":"",u[P]=A?x+"px":"",u.transform="",u))}var Q={left:"right",right:"left",bottom:"top",top:"bottom"};function X(e){return e.replace(/left|right|bottom|top/g,function(e){return Q[e]})}var G={start:"end",end:"start"};function Z(e){return e.replace(/start|end/g,function(e){return G[e]})}function J(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&i(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function ee(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function et(e,t,n){var a,i,u,l,s,c,f,h,p,v;return t===R?ee(function(e,t){var n=r(e),o=w(e),a=n.visualViewport,i=o.clientWidth,u=o.clientHeight,l=0,s=0;if(a){i=a.width,u=a.height;var c=y();(c||!c&&"fixed"===t)&&(l=a.offsetLeft,s=a.offsetTop)}return{width:i,height:u,x:l+_(e),y:s}}(e,n)):o(t)?((a=m(t,!1,"fixed"===n)).top=a.top+t.clientTop,a.left=a.left+t.clientLeft,a.bottom=a.top+t.clientHeight,a.right=a.left+t.clientWidth,a.width=t.clientWidth,a.height=t.clientHeight,a.x=a.left,a.y=a.top,a):ee((i=w(e),l=w(i),s=g(i),c=null==(u=i.ownerDocument)?void 0:u.body,f=d(l.scrollWidth,l.clientWidth,c?c.scrollWidth:0,c?c.clientWidth:0),h=d(l.scrollHeight,l.clientHeight,c?c.scrollHeight:0,c?c.clientHeight:0),p=-s.scrollLeft+_(i),v=-s.scrollTop,"rtl"===D(c||l).direction&&(p+=d(l.clientWidth,c?c.clientWidth:0)-f),{width:f,height:h,x:p,y:v}))}function en(){return{top:0,right:0,bottom:0,left:0}}function er(e){return Object.assign({},en(),e)}function eo(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}function ea(e,t){void 0===t&&(t={});var n,r,i,u,l,s,c,f,p=t,v=p.placement,y=void 0===v?e.placement:v,g=p.strategy,_=void 0===g?e.strategy:g,x=p.boundary,k=p.rootBoundary,A=p.elementContext,F=void 0===A?M:A,T=p.altBoundary,j=p.padding,N=void 0===j?0:j,L=er("number"!=typeof N?N:eo(N,P)),z=e.rects.popper,U=e.elements[void 0!==T&&T?F===M?"reference":M:F],I=(n=o(U)?U:U.contextElement||w(e.elements.popper),r=void 0===x?"clippingParents":x,i=void 0===k?R:k,c=(s=[].concat("clippingParents"===r?(u=C(E(n)),!o(l=["absolute","fixed"].indexOf(D(n).position)>=0&&a(n)?S(n):n)?[]:u.filter(function(e){return o(e)&&J(e,l)&&"body"!==b(e)})):[].concat(r),[i]))[0],(f=s.reduce(function(e,t){var r=et(n,t,_);return e.top=d(r.top,e.top),e.right=h(r.right,e.right),e.bottom=h(r.bottom,e.bottom),e.left=d(r.left,e.left),e},et(n,c,_))).width=f.right-f.left,f.height=f.bottom-f.top,f.x=f.left,f.y=f.top,f),Y=m(e.elements.reference),W=V({reference:Y,element:z,strategy:"absolute",placement:y}),H=ee(Object.assign({},z,W)),q=F===M?H:Y,$={top:I.top-q.top+L.top,bottom:q.bottom-I.bottom+L.bottom,left:I.left-q.left+L.left,right:q.right-I.right+L.right},K=e.modifiersData.offset;if(F===M&&K){var Q=K[y];Object.keys($).forEach(function(e){var t=[B,O].indexOf(e)>=0?1:-1,n=["top",O].indexOf(e)>=0?"y":"x";$[e]+=Q[n]*t})}return $}function ei(e,t,n){return d(e,h(t,n))}function eu(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function el(e){return["top",B,O,F].some(function(t){return e[t]>=0})}var es=(s=void 0===(l=(u={defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,o=e.options,a=o.scroll,i=void 0===a||a,u=o.resize,l=void 0===u||u,s=r(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach(function(e){e.addEventListener("scroll",n.update,Y)}),l&&s.addEventListener("resize",n.update,Y),function(){i&&c.forEach(function(e){e.removeEventListener("scroll",n.update,Y)}),l&&s.removeEventListener("resize",n.update,Y)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=V({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=n.adaptive,a=n.roundOffsets,i=void 0===a||a,u={placement:W(t.placement),variation:H(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:void 0===r||r,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,K(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:void 0===o||o,roundOffsets:i})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,K(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:i})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];a(o)&&b(o)&&(Object.assign(o.style,n),Object.keys(r).forEach(function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)}))})},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(e){var r=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce(function(e,t){return e[t]="",e},{});a(r)&&b(r)&&(Object.assign(r.style,i),Object.keys(o).forEach(function(e){r.removeAttribute(e)}))})}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,a=void 0===o?[0,0]:o,i=L.reduce(function(e,n){var r,o,i,u,l,s;return e[n]=(r=t.rects,i=[F,"top"].indexOf(o=W(n))>=0?-1:1,l=(u="function"==typeof a?a(Object.assign({},r,{placement:n})):a)[0],s=u[1],l=l||0,s=(s||0)*i,[F,B].indexOf(o)>=0?{x:s,y:l}:{x:l,y:s}),e},{}),u=i[t.placement],l=u.x,s=u.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=s),t.modifiersData[r]=i}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,a=void 0===o||o,i=n.altAxis,u=void 0===i||i,l=n.fallbackPlacements,s=n.padding,c=n.boundary,f=n.rootBoundary,d=n.altBoundary,h=n.flipVariations,p=void 0===h||h,v=n.allowedAutoPlacements,y=t.options.placement,m=W(y)===y,g=l||(m||!p?[X(y)]:function(e){if(W(e)===T)return[];var t=X(e);return[Z(e),t,Z(t)]}(y)),b=[y].concat(g).reduce(function(e,n){var r,o,a,i,u,l,d,h,y,m,g,b;return e.concat(W(n)===T?(o=(r={placement:n,boundary:c,rootBoundary:f,padding:s,flipVariations:p,allowedAutoPlacements:v}).placement,a=r.boundary,i=r.rootBoundary,u=r.padding,l=r.flipVariations,h=void 0===(d=r.allowedAutoPlacements)?L:d,0===(g=(m=(y=H(o))?l?N:N.filter(function(e){return H(e)===y}):P).filter(function(e){return h.indexOf(e)>=0})).length&&(g=m),Object.keys(b=g.reduce(function(e,n){return e[n]=ea(t,{placement:n,boundary:a,rootBoundary:i,padding:u})[W(n)],e},{})).sort(function(e,t){return b[e]-b[t]})):n)},[]),w=t.rects.reference,_=t.rects.popper,D=new Map,x=!0,k=b[0],E=0;E<b.length;E++){var C=b[E],A=W(C),S=H(C)===j,R=["top",O].indexOf(A)>=0,M=R?"width":"height",z=ea(t,{placement:C,boundary:c,rootBoundary:f,altBoundary:d,padding:s}),U=R?S?B:F:S?O:"top";w[M]>_[M]&&(U=X(U));var I=X(U),Y=[];if(a&&Y.push(z[A]<=0),u&&Y.push(z[U]<=0,z[I]<=0),Y.every(function(e){return e})){k=C,x=!1;break}D.set(C,Y)}if(x)for(var q=p?3:1,V=function(e){var t=b.find(function(t){var n=D.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return k=t,"break"},$=q;$>0&&"break"!==V($);$--);t.placement!==k&&(t.modifiersData[r]._skip=!0,t.placement=k,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,a=n.altAxis,i=n.boundary,u=n.rootBoundary,l=n.altBoundary,s=n.padding,c=n.tether,f=void 0===c||c,p=n.tetherOffset,v=void 0===p?0:p,y=ea(t,{boundary:i,rootBoundary:u,padding:s,altBoundary:l}),m=W(t.placement),g=H(t.placement),b=!g,w=q(m),_="x"===w?"y":"x",D=t.modifiersData.popperOffsets,x=t.rects.reference,E=t.rects.popper,C="function"==typeof v?v(Object.assign({},t.rects,{placement:t.placement})):v,A="number"==typeof C?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),T=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,P={x:0,y:0};if(D){if(void 0===o||o){var R,M="y"===w?"top":F,N="y"===w?O:B,L="y"===w?"height":"width",z=D[w],U=z+y[M],I=z-y[N],Y=f?-E[L]/2:0,V=g===j?x[L]:E[L],$=g===j?-E[L]:-x[L],K=t.elements.arrow,Q=f&&K?k(K):{width:0,height:0},X=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:en(),G=X[M],Z=X[N],J=ei(0,x[L],Q[L]),ee=b?x[L]/2-Y-J-G-A.mainAxis:V-J-G-A.mainAxis,et=b?-x[L]/2+Y+J+Z+A.mainAxis:$+J+Z+A.mainAxis,er=t.elements.arrow&&S(t.elements.arrow),eo=er?"y"===w?er.clientTop||0:er.clientLeft||0:0,eu=null!=(R=null==T?void 0:T[w])?R:0,el=ei(f?h(U,z+ee-eu-eo):U,z,f?d(I,z+et-eu):I);D[w]=el,P[w]=el-z}if(void 0!==a&&a){var es,ec,ef="x"===w?"top":F,ed="x"===w?O:B,eh=D[_],ep="y"===_?"height":"width",ev=eh+y[ef],ey=eh-y[ed],em=-1!==["top",F].indexOf(m),eg=null!=(ec=null==T?void 0:T[_])?ec:0,eb=em?ev:eh-x[ep]-E[ep]-eg+A.altAxis,ew=em?eh+x[ep]+E[ep]-eg-A.altAxis:ey,e_=f&&em?(es=ei(eb,eh,ew))>ew?ew:es:ei(f?eb:ev,eh,f?ew:ey);D[_]=e_,P[_]=e_-eh}t.modifiersData[r]=P}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,a=n.elements.arrow,i=n.modifiersData.popperOffsets,u=W(n.placement),l=q(u),s=[F,B].indexOf(u)>=0?"height":"width";if(a&&i){var c,f=(c=o.padding,er("number"!=typeof(c="function"==typeof c?c(Object.assign({},n.rects,{placement:n.placement})):c)?c:eo(c,P))),d=k(a),h="y"===l?"top":F,p="y"===l?O:B,v=n.rects.reference[s]+n.rects.reference[l]-i[l]-n.rects.popper[s],y=i[l]-n.rects.reference[l],m=S(a),g=m?"y"===l?m.clientHeight||0:m.clientWidth||0:0,b=f[h],w=g-d[s]-f[p],_=g/2-d[s]/2+(v/2-y/2),D=ei(b,_,w);n.modifiersData[r]=((t={})[l]=D,t.centerOffset=D-_,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null==r||("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&J(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,a=t.modifiersData.preventOverflow,i=ea(t,{elementContext:"reference"}),u=ea(t,{altBoundary:!0}),l=eu(i,r),s=eu(u,o,a),c=el(l),f=el(s);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:s,isReferenceHidden:c,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":f})}}]}).defaultModifiers)?[]:l,f=void 0===(c=u.defaultOptions)?U:c,function(e,t,n){void 0===n&&(n=f);var i,u,l={placement:"bottom",orderedModifiers:[],options:Object.assign({},U,f),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},c=[],d=!1,h={state:l,setOptions:function(n){var r,a,i,u,d,p,y="function"==typeof n?n(l.options):n;v(),l.options=Object.assign({},f,l.options,y),l.scrollParents={reference:o(e)?C(e):e.contextElement?C(e.contextElement):[],popper:C(t)};var m=(a=Object.keys(r=[].concat(s,l.options.modifiers).reduce(function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e},{})).map(function(e){return r[e]}),i=new Map,u=new Set,d=[],a.forEach(function(e){i.set(e.name,e)}),a.forEach(function(e){u.has(e.name)||function e(t){u.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach(function(t){if(!u.has(t)){var n=i.get(t);n&&e(n)}}),d.push(t)}(e)}),p=d,z.reduce(function(e,t){return e.concat(p.filter(function(e){return e.phase===t}))},[]));return l.orderedModifiers=m.filter(function(e){return e.enabled}),l.orderedModifiers.forEach(function(e){var t=e.name,n=e.options,r=e.effect;if("function"==typeof r){var o=r({state:l,name:t,instance:h,options:void 0===n?{}:n});c.push(o||function(){})}}),h.update()},forceUpdate:function(){if(!d){var e=l.elements,t=e.reference,n=e.popper;if(I(t,n)){l.rects={reference:(o=S(n),i="fixed"===l.options.strategy,u=a(o),v=a(o)&&(c=p((s=o.getBoundingClientRect()).width)/o.offsetWidth||1,f=p(s.height)/o.offsetHeight||1,1!==c||1!==f),y=w(o),D=m(t,v,i),E={scrollLeft:0,scrollTop:0},C={x:0,y:0},(u||!u&&!i)&&(("body"!==b(o)||x(y))&&(E=function(e){return e!==r(e)&&a(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:g(e)}(o)),a(o)?(C=m(o,!0),C.x+=o.clientLeft,C.y+=o.clientTop):y&&(C.x=_(y))),{x:D.left+E.scrollLeft-C.x,y:D.top+E.scrollTop-C.y,width:D.width,height:D.height}),popper:k(n)},l.reset=!1,l.placement=l.options.placement,l.orderedModifiers.forEach(function(e){return l.modifiersData[e.name]=Object.assign({},e.data)});for(var o,i,u,s,c,f,v,y,D,E,C,A=0;A<l.orderedModifiers.length;A++){if(!0===l.reset){l.reset=!1,A=-1;continue}var O=l.orderedModifiers[A],B=O.fn,F=O.options,T=void 0===F?{}:F,P=O.name;"function"==typeof B&&(l=B({state:l,options:T,name:P,instance:h})||l)}}}},update:(i=function(){return new Promise(function(e){h.forceUpdate(),e(l)})},function(){return u||(u=new Promise(function(e){Promise.resolve().then(function(){u=void 0,e(i())})})),u}),destroy:function(){v(),d=!0}};if(!I(e,t))return h;function v(){c.forEach(function(e){return e()}),c=[]}return h.setOptions(n).then(function(e){!d&&n.onFirstUpdate&&n.onFirstUpdate(e)}),h})}