shift73k/assets_old/node_modules/@popperjs/core/dist/umd/popper-base.min.js

6 lines
8.6 KiB
JavaScript

/**
* @popperjs/core v2.9.2 - MIT License
*/
"use strict";!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Popper={})}(this,(function(t){function e(t){return{width:(t=t.getBoundingClientRect()).width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left,x:t.left,y:t.top}}function n(t){return null==t?window:"[object Window]"!==t.toString()?(t=t.ownerDocument)&&t.defaultView||window:t}function o(t){return{scrollLeft:(t=n(t)).pageXOffset,scrollTop:t.pageYOffset}}function i(t){return t instanceof n(t).Element||t instanceof Element}function r(t){return t instanceof n(t).HTMLElement||t instanceof HTMLElement}function f(t){return"undefined"!=typeof ShadowRoot&&(t instanceof n(t).ShadowRoot||t instanceof ShadowRoot)}function a(t){return t?(t.nodeName||"").toLowerCase():null}function c(t){return((i(t)?t.ownerDocument:t.document)||window.document).documentElement}function s(t){return e(c(t)).left+o(t).scrollLeft}function l(t){return n(t).getComputedStyle(t)}function u(t){return t=l(t),/auto|scroll|overlay|hidden/.test(t.overflow+t.overflowY+t.overflowX)}function d(t,i,f){void 0===f&&(f=!1);var l=c(i);t=e(t);var d=r(i),p={scrollLeft:0,scrollTop:0},h={x:0,y:0};return(d||!d&&!f)&&(("body"!==a(i)||u(l))&&(p=i!==n(i)&&r(i)?{scrollLeft:i.scrollLeft,scrollTop:i.scrollTop}:o(i)),r(i)?((h=e(i)).x+=i.clientLeft,h.y+=i.clientTop):l&&(h.x=s(l))),{x:t.left+p.scrollLeft-h.x,y:t.top+p.scrollTop-h.y,width:t.width,height:t.height}}function p(t){var n=e(t),o=t.offsetWidth,i=t.offsetHeight;return 1>=Math.abs(n.width-o)&&(o=n.width),1>=Math.abs(n.height-i)&&(i=n.height),{x:t.offsetLeft,y:t.offsetTop,width:o,height:i}}function h(t){return"html"===a(t)?t:t.assignedSlot||t.parentNode||(f(t)?t.host:null)||c(t)}function m(t){return 0<=["html","body","#document"].indexOf(a(t))?t.ownerDocument.body:r(t)&&u(t)?t:m(h(t))}function g(t,e){var o;void 0===e&&(e=[]);var i=m(t);return t=i===(null==(o=t.ownerDocument)?void 0:o.body),o=n(i),i=t?[o].concat(o.visualViewport||[],u(i)?i:[]):i,e=e.concat(i),t?e:e.concat(g(h(i)))}function v(t){return r(t)&&"fixed"!==l(t).position?t.offsetParent:null}function b(t){for(var e=n(t),o=v(t);o&&0<=["table","td","th"].indexOf(a(o))&&"static"===l(o).position;)o=v(o);if(o&&("html"===a(o)||"body"===a(o)&&"static"===l(o).position))return e;if(!o)t:{if(o=-1!==navigator.userAgent.toLowerCase().indexOf("firefox"),-1===navigator.userAgent.indexOf("Trident")||!r(t)||"fixed"!==l(t).position)for(t=h(t);r(t)&&0>["html","body"].indexOf(a(t));){var i=l(t);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||o&&"filter"===i.willChange||o&&i.filter&&"none"!==i.filter){o=t;break t}t=t.parentNode}o=null}return o||e}function y(t){function e(t){o.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){o.has(t)||(t=n.get(t))&&e(t)})),i.push(t)}var n=new Map,o=new Set,i=[];return t.forEach((function(t){n.set(t.name,t)})),t.forEach((function(t){o.has(t.name)||e(t)})),i}function w(t){var e;return function(){return e||(e=new Promise((function(n){Promise.resolve().then((function(){e=void 0,n(t())}))}))),e}}function x(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function O(t,i){if("viewport"===i){i=n(t);var f=c(t);i=i.visualViewport;var a=f.clientWidth;f=f.clientHeight;var u=0,d=0;i&&(a=i.width,f=i.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(u=i.offsetLeft,d=i.offsetTop)),t=x(t={width:a,height:f,x:u+s(t),y:d})}else r(i)?((t=e(i)).top+=i.clientTop,t.left+=i.clientLeft,t.bottom=t.top+i.clientHeight,t.right=t.left+i.clientWidth,t.width=i.clientWidth,t.height=i.clientHeight,t.x=t.left,t.y=t.top):(d=c(t),t=c(d),a=o(d),i=null==(f=d.ownerDocument)?void 0:f.body,f=W(t.scrollWidth,t.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),u=W(t.scrollHeight,t.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),d=-a.scrollLeft+s(d),a=-a.scrollTop,"rtl"===l(i||t).direction&&(d+=W(t.clientWidth,i?i.clientWidth:0)-f),t=x({width:f,height:u,x:d,y:a}));return t}function M(t,e,n){return e="clippingParents"===e?function(t){var e=g(h(t)),n=0<=["absolute","fixed"].indexOf(l(t).position)&&r(t)?b(t):t;return i(n)?e.filter((function(t){var e;if(e=i(t))t:if(e=n.getRootNode&&n.getRootNode(),t.contains(n))e=!0;else{if(e&&f(e)){e=n;do{if(e&&t.isSameNode(e)){e=!0;break t}e=e.parentNode||e.host}while(e)}e=!1}return e&&"body"!==a(t)})):[]}(t):[].concat(e),(n=(n=[].concat(e,[n])).reduce((function(e,n){return n=O(t,n),e.top=W(n.top,e.top),e.right=H(n.right,e.right),e.bottom=H(n.bottom,e.bottom),e.left=W(n.left,e.left),e}),O(t,n[0]))).width=n.right-n.left,n.height=n.bottom-n.top,n.x=n.left,n.y=n.top,n}function E(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function L(t){void 0===t&&(t={});var e=t.defaultModifiers,n=void 0===e?[]:e,o=void 0===(t=t.defaultOptions)?P:t;return function(t,e,r){function f(){c.forEach((function(t){return t()})),c=[]}void 0===r&&(r=o);var a={placement:"bottom",orderedModifiers:[],options:Object.assign({},P,o),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},c=[],s=!1,l={state:a,setOptions:function(r){return f(),a.options=Object.assign({},o,a.options,r),a.scrollParents={reference:i(t)?g(t):t.contextElement?g(t.contextElement):[],popper:g(e)},r=function(t){var e=y(t);return j.reduce((function(t,n){return t.concat(e.filter((function(t){return t.phase===n})))}),[])}(function(t){var e=t.reduce((function(t,e){var n=t[e.name];return t[e.name]=n?Object.assign({},n,e,{options:Object.assign({},n.options,e.options),data:Object.assign({},n.data,e.data)}):e,t}),{});return Object.keys(e).map((function(t){return e[t]}))}([].concat(n,a.options.modifiers))),a.orderedModifiers=r.filter((function(t){return t.enabled})),a.orderedModifiers.forEach((function(t){var e=t.name,n=t.options;n=void 0===n?{}:n,"function"==typeof(t=t.effect)&&(e=t({state:a,name:e,instance:l,options:n}),c.push(e||function(){}))})),l.update()},forceUpdate:function(){if(!s){var t=a.elements,e=t.reference;if(E(e,t=t.popper))for(a.rects={reference:d(e,b(t),"fixed"===a.options.strategy),popper:p(t)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach((function(t){return a.modifiersData[t.name]=Object.assign({},t.data)})),e=0;e<a.orderedModifiers.length;e++)if(!0===a.reset)a.reset=!1,e=-1;else{var n=a.orderedModifiers[e];t=n.fn;var o=n.options;o=void 0===o?{}:o,n=n.name,"function"==typeof t&&(a=t({state:a,options:o,name:n,instance:l})||a)}}},update:w((function(){return new Promise((function(t){l.forceUpdate(),t(a)}))})),destroy:function(){f(),s=!0}};return E(t,e)?(l.setOptions(r).then((function(t){!s&&r.onFirstUpdate&&r.onFirstUpdate(t)})),l):l}}var T=["top","bottom","right","left"],j="beforeRead read afterRead beforeMain main afterMain beforeWrite write afterWrite".split(" "),W=Math.max,H=Math.min,P={placement:"bottom",modifiers:[],strategy:"absolute"},k=L();t.createPopper=k,t.detectOverflow=function(t,n){void 0===n&&(n={});var o=n;n=void 0===(n=o.placement)?t.placement:n;var r=o.boundary,f=void 0===r?"clippingParents":r,a=void 0===(r=o.rootBoundary)?"viewport":r;r=void 0===(r=o.elementContext)?"popper":r;var s=o.altBoundary,l=void 0!==s&&s;o=void 0===(o=o.padding)?0:o,o=Object.assign({},{top:0,right:0,bottom:0,left:0},"number"!=typeof o?o:function(t,e){return e.reduce((function(e,n){return e[n]=t,e}),{})}(o,T));var u=t.elements.reference;s=t.rects.popper,f=M(i(l=t.elements[l?"popper"===r?"reference":"popper":r])?l:l.contextElement||c(t.elements.popper),f,a),l=function(t){var e=t.reference,n=t.element,o=(t=t.placement)?t.split("-")[0]:null;t=t?t.split("-")[1]:null;var i=e.x+e.width/2-n.width/2,r=e.y+e.height/2-n.height/2;switch(o){case"top":i={x:i,y:e.y-n.height};break;case"bottom":i={x:i,y:e.y+e.height};break;case"right":i={x:e.x+e.width,y:r};break;case"left":i={x:e.x-n.width,y:r};break;default:i={x:e.x,y:e.y}}if(null!=(o=o?0<=["top","bottom"].indexOf(o)?"x":"y":null))switch(r="y"===o?"height":"width",t){case"start":i[o]-=e[r]/2-n[r]/2;break;case"end":i[o]+=e[r]/2-n[r]/2}return i}({reference:a=e(u),element:s,strategy:"absolute",placement:n}),s=x(Object.assign({},s,l)),a="popper"===r?s:a;var d={top:f.top-a.top+o.top,bottom:a.bottom-f.bottom+o.bottom,left:f.left-a.left+o.left,right:a.right-f.right+o.right};if(t=t.modifiersData.offset,"popper"===r&&t){var p=t[n];Object.keys(d).forEach((function(t){var e=0<=["right","bottom"].indexOf(t)?1:-1,n=0<=["top","bottom"].indexOf(t)?"y":"x";d[t]+=p[n]*e}))}return d},t.popperGenerator=L,Object.defineProperty(t,"__esModule",{value:!0})}));
//# sourceMappingURL=popper-base.min.js.map