/******/ (function() { // webpackBootstrap /******/ var __webpack_modules__ = ({ /***/ 4403: /***/ (function(module, exports) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ /* global define */ (function () { 'use strict'; var hasOwn = {}.hasOwnProperty; var nativeCodeString = '[native code]'; function classNames() { var classes = []; for (var i = 0; i < arguments.length; i++) { var arg = arguments[i]; if (!arg) continue; var argType = typeof arg; if (argType === 'string' || argType === 'number') { classes.push(arg); } else if (Array.isArray(arg)) { if (arg.length) { var inner = classNames.apply(null, arg); if (inner) { classes.push(inner); } } } else if (argType === 'object') { if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) { classes.push(arg.toString()); continue; } for (var key in arg) { if (hasOwn.call(arg, key) && arg[key]) { classes.push(key); } } } } return classes.join(' '); } if ( true && module.exports) { classNames.default = classNames; module.exports = classNames; } else if (true) { // register as 'classnames', consistent with npm package name !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () { return classNames; }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else {} }()); /***/ }), /***/ 1919: /***/ (function(module) { "use strict"; var isMergeableObject = function isMergeableObject(value) { return isNonNullObject(value) && !isSpecial(value) }; function isNonNullObject(value) { return !!value && typeof value === 'object' } function isSpecial(value) { var stringValue = Object.prototype.toString.call(value); return stringValue === '[object RegExp]' || stringValue === '[object Date]' || isReactElement(value) } // see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25 var canUseSymbol = typeof Symbol === 'function' && Symbol.for; var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7; function isReactElement(value) { return value.$$typeof === REACT_ELEMENT_TYPE } function emptyTarget(val) { return Array.isArray(val) ? [] : {} } function cloneUnlessOtherwiseSpecified(value, options) { return (options.clone !== false && options.isMergeableObject(value)) ? deepmerge(emptyTarget(value), value, options) : value } function defaultArrayMerge(target, source, options) { return target.concat(source).map(function(element) { return cloneUnlessOtherwiseSpecified(element, options) }) } function getMergeFunction(key, options) { if (!options.customMerge) { return deepmerge } var customMerge = options.customMerge(key); return typeof customMerge === 'function' ? customMerge : deepmerge } function getEnumerableOwnPropertySymbols(target) { return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol) { return Object.propertyIsEnumerable.call(target, symbol) }) : [] } function getKeys(target) { return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target)) } function propertyIsOnObject(object, property) { try { return property in object } catch(_) { return false } } // Protects from prototype poisoning and unexpected merging up the prototype chain. function propertyIsUnsafe(target, key) { return propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet, && !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain, && Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable. } function mergeObject(target, source, options) { var destination = {}; if (options.isMergeableObject(target)) { getKeys(target).forEach(function(key) { destination[key] = cloneUnlessOtherwiseSpecified(target[key], options); }); } getKeys(source).forEach(function(key) { if (propertyIsUnsafe(target, key)) { return } if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) { destination[key] = getMergeFunction(key, options)(target[key], source[key], options); } else { destination[key] = cloneUnlessOtherwiseSpecified(source[key], options); } }); return destination } function deepmerge(target, source, options) { options = options || {}; options.arrayMerge = options.arrayMerge || defaultArrayMerge; options.isMergeableObject = options.isMergeableObject || isMergeableObject; // cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge() // implementations can use it. The caller may not replace it. options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified; var sourceIsArray = Array.isArray(source); var targetIsArray = Array.isArray(target); var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray; if (!sourceAndTargetTypesMatch) { return cloneUnlessOtherwiseSpecified(source, options) } else if (sourceIsArray) { return options.arrayMerge(target, source, options) } else { return mergeObject(target, source, options) } } deepmerge.all = function deepmergeAll(array, options) { if (!Array.isArray(array)) { throw new Error('first argument should be an array') } return array.reduce(function(prev, next) { return deepmerge(prev, next, options) }, {}) }; var deepmerge_1 = deepmerge; module.exports = deepmerge_1; /***/ }), /***/ 1345: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var util = __webpack_require__(5022); function scrollIntoView(elem, container, config) { config = config || {}; // document 归一化到 window if (container.nodeType === 9) { container = util.getWindow(container); } var allowHorizontalScroll = config.allowHorizontalScroll; var onlyScrollIfNeeded = config.onlyScrollIfNeeded; var alignWithTop = config.alignWithTop; var alignWithLeft = config.alignWithLeft; var offsetTop = config.offsetTop || 0; var offsetLeft = config.offsetLeft || 0; var offsetBottom = config.offsetBottom || 0; var offsetRight = config.offsetRight || 0; allowHorizontalScroll = allowHorizontalScroll === undefined ? true : allowHorizontalScroll; var isWin = util.isWindow(container); var elemOffset = util.offset(elem); var eh = util.outerHeight(elem); var ew = util.outerWidth(elem); var containerOffset = undefined; var ch = undefined; var cw = undefined; var containerScroll = undefined; var diffTop = undefined; var diffBottom = undefined; var win = undefined; var winScroll = undefined; var ww = undefined; var wh = undefined; if (isWin) { win = container; wh = util.height(win); ww = util.width(win); winScroll = { left: util.scrollLeft(win), top: util.scrollTop(win) }; // elem 相对 container 可视视窗的距离 diffTop = { left: elemOffset.left - winScroll.left - offsetLeft, top: elemOffset.top - winScroll.top - offsetTop }; diffBottom = { left: elemOffset.left + ew - (winScroll.left + ww) + offsetRight, top: elemOffset.top + eh - (winScroll.top + wh) + offsetBottom }; containerScroll = winScroll; } else { containerOffset = util.offset(container); ch = container.clientHeight; cw = container.clientWidth; containerScroll = { left: container.scrollLeft, top: container.scrollTop }; // elem 相对 container 可视视窗的距离 // 注意边框, offset 是边框到根节点 diffTop = { left: elemOffset.left - (containerOffset.left + (parseFloat(util.css(container, 'borderLeftWidth')) || 0)) - offsetLeft, top: elemOffset.top - (containerOffset.top + (parseFloat(util.css(container, 'borderTopWidth')) || 0)) - offsetTop }; diffBottom = { left: elemOffset.left + ew - (containerOffset.left + cw + (parseFloat(util.css(container, 'borderRightWidth')) || 0)) + offsetRight, top: elemOffset.top + eh - (containerOffset.top + ch + (parseFloat(util.css(container, 'borderBottomWidth')) || 0)) + offsetBottom }; } if (diffTop.top < 0 || diffBottom.top > 0) { // 强制向上 if (alignWithTop === true) { util.scrollTop(container, containerScroll.top + diffTop.top); } else if (alignWithTop === false) { util.scrollTop(container, containerScroll.top + diffBottom.top); } else { // 自动调整 if (diffTop.top < 0) { util.scrollTop(container, containerScroll.top + diffTop.top); } else { util.scrollTop(container, containerScroll.top + diffBottom.top); } } } else { if (!onlyScrollIfNeeded) { alignWithTop = alignWithTop === undefined ? true : !!alignWithTop; if (alignWithTop) { util.scrollTop(container, containerScroll.top + diffTop.top); } else { util.scrollTop(container, containerScroll.top + diffBottom.top); } } } if (allowHorizontalScroll) { if (diffTop.left < 0 || diffBottom.left > 0) { // 强制向上 if (alignWithLeft === true) { util.scrollLeft(container, containerScroll.left + diffTop.left); } else if (alignWithLeft === false) { util.scrollLeft(container, containerScroll.left + diffBottom.left); } else { // 自动调整 if (diffTop.left < 0) { util.scrollLeft(container, containerScroll.left + diffTop.left); } else { util.scrollLeft(container, containerScroll.left + diffBottom.left); } } } else { if (!onlyScrollIfNeeded) { alignWithLeft = alignWithLeft === undefined ? true : !!alignWithLeft; if (alignWithLeft) { util.scrollLeft(container, containerScroll.left + diffTop.left); } else { util.scrollLeft(container, containerScroll.left + diffBottom.left); } } } } } module.exports = scrollIntoView; /***/ }), /***/ 5425: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; module.exports = __webpack_require__(1345); /***/ }), /***/ 5022: /***/ (function(module) { "use strict"; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; var RE_NUM = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source; function getClientPosition(elem) { var box = undefined; var x = undefined; var y = undefined; var doc = elem.ownerDocument; var body = doc.body; var docElem = doc && doc.documentElement; // 根据 GBS 最新数据,A-Grade Browsers 都已支持 getBoundingClientRect 方法,不用再考虑传统的实现方式 box = elem.getBoundingClientRect(); // 注:jQuery 还考虑减去 docElem.clientLeft/clientTop // 但测试发现,这样反而会导致当 html 和 body 有边距/边框样式时,获取的值不正确 // 此外,ie6 会忽略 html 的 margin 值,幸运地是没有谁会去设置 html 的 margin x = box.left; y = box.top; // In IE, most of the time, 2 extra pixels are added to the top and left // due to the implicit 2-pixel inset border. In IE6/7 quirks mode and // IE6 standards mode, this border can be overridden by setting the // document element's border to zero -- thus, we cannot rely on the // offset always being 2 pixels. // In quirks mode, the offset can be determined by querying the body's // clientLeft/clientTop, but in standards mode, it is found by querying // the document element's clientLeft/clientTop. Since we already called // getClientBoundingRect we have already forced a reflow, so it is not // too expensive just to query them all. // ie 下应该减去窗口的边框吧,毕竟默认 absolute 都是相对窗口定位的 // 窗口边框标准是设 documentElement ,quirks 时设置 body // 最好禁止在 body 和 html 上边框 ,但 ie < 9 html 默认有 2px ,减去 // 但是非 ie 不可能设置窗口边框,body html 也不是窗口 ,ie 可以通过 html,body 设置 // 标准 ie 下 docElem.clientTop 就是 border-top // ie7 html 即窗口边框改变不了。永远为 2 // 但标准 firefox/chrome/ie9 下 docElem.clientTop 是窗口边框,即使设了 border-top 也为 0 x -= docElem.clientLeft || body.clientLeft || 0; y -= docElem.clientTop || body.clientTop || 0; return { left: x, top: y }; } function getScroll(w, top) { var ret = w['page' + (top ? 'Y' : 'X') + 'Offset']; var method = 'scroll' + (top ? 'Top' : 'Left'); if (typeof ret !== 'number') { var d = w.document; // ie6,7,8 standard mode ret = d.documentElement[method]; if (typeof ret !== 'number') { // quirks mode ret = d.body[method]; } } return ret; } function getScrollLeft(w) { return getScroll(w); } function getScrollTop(w) { return getScroll(w, true); } function getOffset(el) { var pos = getClientPosition(el); var doc = el.ownerDocument; var w = doc.defaultView || doc.parentWindow; pos.left += getScrollLeft(w); pos.top += getScrollTop(w); return pos; } function _getComputedStyle(elem, name, computedStyle_) { var val = ''; var d = elem.ownerDocument; var computedStyle = computedStyle_ || d.defaultView.getComputedStyle(elem, null); // https://github.com/kissyteam/kissy/issues/61 if (computedStyle) { val = computedStyle.getPropertyValue(name) || computedStyle[name]; } return val; } var _RE_NUM_NO_PX = new RegExp('^(' + RE_NUM + ')(?!px)[a-z%]+$', 'i'); var RE_POS = /^(top|right|bottom|left)$/; var CURRENT_STYLE = 'currentStyle'; var RUNTIME_STYLE = 'runtimeStyle'; var LEFT = 'left'; var PX = 'px'; function _getComputedStyleIE(elem, name) { // currentStyle maybe null // http://msdn.microsoft.com/en-us/library/ms535231.aspx var ret = elem[CURRENT_STYLE] && elem[CURRENT_STYLE][name]; // 当 width/height 设置为百分比时,通过 pixelLeft 方式转换的 width/height 值 // 一开始就处理了! CUSTOM_STYLE.height,CUSTOM_STYLE.width ,cssHook 解决@2011-08-19 // 在 ie 下不对,需要直接用 offset 方式 // borderWidth 等值也有问题,但考虑到 borderWidth 设为百分比的概率很小,这里就不考虑了 // From the awesome hack by Dean Edwards // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 // If we're not dealing with a regular pixel number // but a number that has a weird ending, we need to convert it to pixels // exclude left right for relativity if (_RE_NUM_NO_PX.test(ret) && !RE_POS.test(name)) { // Remember the original values var style = elem.style; var left = style[LEFT]; var rsLeft = elem[RUNTIME_STYLE][LEFT]; // prevent flashing of content elem[RUNTIME_STYLE][LEFT] = elem[CURRENT_STYLE][LEFT]; // Put in the new values to get a computed value out style[LEFT] = name === 'fontSize' ? '1em' : ret || 0; ret = style.pixelLeft + PX; // Revert the changed values style[LEFT] = left; elem[RUNTIME_STYLE][LEFT] = rsLeft; } return ret === '' ? 'auto' : ret; } var getComputedStyleX = undefined; if (typeof window !== 'undefined') { getComputedStyleX = window.getComputedStyle ? _getComputedStyle : _getComputedStyleIE; } function each(arr, fn) { for (var i = 0; i < arr.length; i++) { fn(arr[i]); } } function isBorderBoxFn(elem) { return getComputedStyleX(elem, 'boxSizing') === 'border-box'; } var BOX_MODELS = ['margin', 'border', 'padding']; var CONTENT_INDEX = -1; var PADDING_INDEX = 2; var BORDER_INDEX = 1; var MARGIN_INDEX = 0; function swap(elem, options, callback) { var old = {}; var style = elem.style; var name = undefined; // Remember the old values, and insert the new ones for (name in options) { if (options.hasOwnProperty(name)) { old[name] = style[name]; style[name] = options[name]; } } callback.call(elem); // Revert the old values for (name in options) { if (options.hasOwnProperty(name)) { style[name] = old[name]; } } } function getPBMWidth(elem, props, which) { var value = 0; var prop = undefined; var j = undefined; var i = undefined; for (j = 0; j < props.length; j++) { prop = props[j]; if (prop) { for (i = 0; i < which.length; i++) { var cssProp = undefined; if (prop === 'border') { cssProp = prop + which[i] + 'Width'; } else { cssProp = prop + which[i]; } value += parseFloat(getComputedStyleX(elem, cssProp)) || 0; } } } return value; } /** * A crude way of determining if an object is a window * @member util */ function isWindow(obj) { // must use == for ie8 /* eslint eqeqeq:0 */ return obj != null && obj == obj.window; } var domUtils = {}; each(['Width', 'Height'], function (name) { domUtils['doc' + name] = function (refWin) { var d = refWin.document; return Math.max( // firefox chrome documentElement.scrollHeight< body.scrollHeight // ie standard mode : documentElement.scrollHeight> body.scrollHeight d.documentElement['scroll' + name], // quirks : documentElement.scrollHeight 最大等于可视窗口多一点? d.body['scroll' + name], domUtils['viewport' + name](d)); }; domUtils['viewport' + name] = function (win) { // pc browser includes scrollbar in window.innerWidth var prop = 'client' + name; var doc = win.document; var body = doc.body; var documentElement = doc.documentElement; var documentElementProp = documentElement[prop]; // 标准模式取 documentElement // backcompat 取 body return doc.compatMode === 'CSS1Compat' && documentElementProp || body && body[prop] || documentElementProp; }; }); /* 得到元素的大小信息 @param elem @param name @param {String} [extra] 'padding' : (css width) + padding 'border' : (css width) + padding + border 'margin' : (css width) + padding + border + margin */ function getWH(elem, name, extra) { if (isWindow(elem)) { return name === 'width' ? domUtils.viewportWidth(elem) : domUtils.viewportHeight(elem); } else if (elem.nodeType === 9) { return name === 'width' ? domUtils.docWidth(elem) : domUtils.docHeight(elem); } var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom']; var borderBoxValue = name === 'width' ? elem.offsetWidth : elem.offsetHeight; var computedStyle = getComputedStyleX(elem); var isBorderBox = isBorderBoxFn(elem, computedStyle); var cssBoxValue = 0; if (borderBoxValue == null || borderBoxValue <= 0) { borderBoxValue = undefined; // Fall back to computed then un computed css if necessary cssBoxValue = getComputedStyleX(elem, name); if (cssBoxValue == null || Number(cssBoxValue) < 0) { cssBoxValue = elem.style[name] || 0; } // Normalize '', auto, and prepare for extra cssBoxValue = parseFloat(cssBoxValue) || 0; } if (extra === undefined) { extra = isBorderBox ? BORDER_INDEX : CONTENT_INDEX; } var borderBoxValueOrIsBorderBox = borderBoxValue !== undefined || isBorderBox; var val = borderBoxValue || cssBoxValue; if (extra === CONTENT_INDEX) { if (borderBoxValueOrIsBorderBox) { return val - getPBMWidth(elem, ['border', 'padding'], which, computedStyle); } return cssBoxValue; } if (borderBoxValueOrIsBorderBox) { var padding = extra === PADDING_INDEX ? -getPBMWidth(elem, ['border'], which, computedStyle) : getPBMWidth(elem, ['margin'], which, computedStyle); return val + (extra === BORDER_INDEX ? 0 : padding); } return cssBoxValue + getPBMWidth(elem, BOX_MODELS.slice(extra), which, computedStyle); } var cssShow = { position: 'absolute', visibility: 'hidden', display: 'block' }; // fix #119 : https://github.com/kissyteam/kissy/issues/119 function getWHIgnoreDisplay(elem) { var val = undefined; var args = arguments; // in case elem is window // elem.offsetWidth === undefined if (elem.offsetWidth !== 0) { val = getWH.apply(undefined, args); } else { swap(elem, cssShow, function () { val = getWH.apply(undefined, args); }); } return val; } function css(el, name, v) { var value = v; if ((typeof name === 'undefined' ? 'undefined' : _typeof(name)) === 'object') { for (var i in name) { if (name.hasOwnProperty(i)) { css(el, i, name[i]); } } return undefined; } if (typeof value !== 'undefined') { if (typeof value === 'number') { value += 'px'; } el.style[name] = value; return undefined; } return getComputedStyleX(el, name); } each(['width', 'height'], function (name) { var first = name.charAt(0).toUpperCase() + name.slice(1); domUtils['outer' + first] = function (el, includeMargin) { return el && getWHIgnoreDisplay(el, name, includeMargin ? MARGIN_INDEX : BORDER_INDEX); }; var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom']; domUtils[name] = function (elem, val) { if (val !== undefined) { if (elem) { var computedStyle = getComputedStyleX(elem); var isBorderBox = isBorderBoxFn(elem); if (isBorderBox) { val += getPBMWidth(elem, ['padding', 'border'], which, computedStyle); } return css(elem, name, val); } return undefined; } return elem && getWHIgnoreDisplay(elem, name, CONTENT_INDEX); }; }); // 设置 elem 相对 elem.ownerDocument 的坐标 function setOffset(elem, offset) { // set position first, in-case top/left are set even on static elem if (css(elem, 'position') === 'static') { elem.style.position = 'relative'; } var old = getOffset(elem); var ret = {}; var current = undefined; var key = undefined; for (key in offset) { if (offset.hasOwnProperty(key)) { current = parseFloat(css(elem, key)) || 0; ret[key] = current + offset[key] - old[key]; } } css(elem, ret); } module.exports = _extends({ getWindow: function getWindow(node) { var doc = node.ownerDocument || node; return doc.defaultView || doc.parentWindow; }, offset: function offset(el, value) { if (typeof value !== 'undefined') { setOffset(el, value); } else { return getOffset(el); } }, isWindow: isWindow, each: each, css: css, clone: function clone(obj) { var ret = {}; for (var i in obj) { if (obj.hasOwnProperty(i)) { ret[i] = obj[i]; } } var overflow = obj.overflow; if (overflow) { for (var i in obj) { if (obj.hasOwnProperty(i)) { ret.overflow[i] = obj.overflow[i]; } } } return ret; }, scrollLeft: function scrollLeft(w, v) { if (isWindow(w)) { if (v === undefined) { return getScrollLeft(w); } window.scrollTo(v, getScrollTop(w)); } else { if (v === undefined) { return w.scrollLeft; } w.scrollLeft = v; } }, scrollTop: function scrollTop(w, v) { if (isWindow(w)) { if (v === undefined) { return getScrollTop(w); } window.scrollTo(getScrollLeft(w), v); } else { if (v === undefined) { return w.scrollTop; } w.scrollTop = v; } }, viewportWidth: 0, viewportHeight: 0 }, domUtils); /***/ }), /***/ 9214: /***/ (function(__unused_webpack_module, exports) { "use strict"; var __webpack_unused_export__; /** @license React v17.0.2 * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var b=60103,c=60106,d=60107,e=60108,f=60114,g=60109,h=60110,k=60112,l=60113,m=60120,n=60115,p=60116,q=60121,r=60122,u=60117,v=60129,w=60131; if("function"===typeof Symbol&&Symbol.for){var x=Symbol.for;b=x("react.element");c=x("react.portal");d=x("react.fragment");e=x("react.strict_mode");f=x("react.profiler");g=x("react.provider");h=x("react.context");k=x("react.forward_ref");l=x("react.suspense");m=x("react.suspense_list");n=x("react.memo");p=x("react.lazy");q=x("react.block");r=x("react.server.block");u=x("react.fundamental");v=x("react.debug_trace_mode");w=x("react.legacy_hidden")} function y(a){if("object"===typeof a&&null!==a){var t=a.$$typeof;switch(t){case b:switch(a=a.type,a){case d:case f:case e:case l:case m:return a;default:switch(a=a&&a.$$typeof,a){case h:case k:case p:case n:case g:return a;default:return t}}case c:return t}}}var z=g,A=b,B=k,C=d,D=p,E=n,F=c,G=f,H=e,I=l;__webpack_unused_export__=h;__webpack_unused_export__=z;__webpack_unused_export__=A;__webpack_unused_export__=B;__webpack_unused_export__=C;__webpack_unused_export__=D;__webpack_unused_export__=E;__webpack_unused_export__=F;__webpack_unused_export__=G;__webpack_unused_export__=H; __webpack_unused_export__=I;__webpack_unused_export__=function(){return!1};__webpack_unused_export__=function(){return!1};__webpack_unused_export__=function(a){return y(a)===h};__webpack_unused_export__=function(a){return y(a)===g};__webpack_unused_export__=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===b};__webpack_unused_export__=function(a){return y(a)===k};__webpack_unused_export__=function(a){return y(a)===d};__webpack_unused_export__=function(a){return y(a)===p};__webpack_unused_export__=function(a){return y(a)===n}; __webpack_unused_export__=function(a){return y(a)===c};__webpack_unused_export__=function(a){return y(a)===f};__webpack_unused_export__=function(a){return y(a)===e};__webpack_unused_export__=function(a){return y(a)===l};__webpack_unused_export__=function(a){return"string"===typeof a||"function"===typeof a||a===d||a===f||a===v||a===e||a===l||a===m||a===w||"object"===typeof a&&null!==a&&(a.$$typeof===p||a.$$typeof===n||a.$$typeof===g||a.$$typeof===h||a.$$typeof===k||a.$$typeof===u||a.$$typeof===q||a[0]===r)?!0:!1}; __webpack_unused_export__=y; /***/ }), /***/ 2797: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; if (true) { /* unused reexport */ __webpack_require__(9214); } else {} /***/ }), /***/ 5619: /***/ (function(module) { "use strict"; // do not edit .js files directly - edit src/index.jst var envHasBigInt64Array = typeof BigInt64Array !== 'undefined'; module.exports = function equal(a, b) { if (a === b) return true; if (a && b && typeof a == 'object' && typeof b == 'object') { if (a.constructor !== b.constructor) return false; var length, i, keys; if (Array.isArray(a)) { length = a.length; if (length != b.length) return false; for (i = length; i-- !== 0;) if (!equal(a[i], b[i])) return false; return true; } if ((a instanceof Map) && (b instanceof Map)) { if (a.size !== b.size) return false; for (i of a.entries()) if (!b.has(i[0])) return false; for (i of a.entries()) if (!equal(i[1], b.get(i[0]))) return false; return true; } if ((a instanceof Set) && (b instanceof Set)) { if (a.size !== b.size) return false; for (i of a.entries()) if (!b.has(i[0])) return false; return true; } if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) { length = a.length; if (length != b.length) return false; for (i = length; i-- !== 0;) if (a[i] !== b[i]) return false; return true; } if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags; if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf(); if (a.toString !== Object.prototype.toString) return a.toString() === b.toString(); keys = Object.keys(a); length = keys.length; if (length !== Object.keys(b).length) return false; for (i = length; i-- !== 0;) if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false; for (i = length; i-- !== 0;) { var key = keys[i]; if (!equal(a[key], b[key])) return false; } return true; } // true if both NaN, false otherwise return a!==a && b!==b; }; /***/ }), /***/ 7115: /***/ (function(__unused_webpack_module, exports) { // Copyright (c) 2014 Rafael Caricio. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. var GradientParser = {}; GradientParser.parse = (function() { var tokens = { linearGradient: /^(\-(webkit|o|ms|moz)\-)?(linear\-gradient)/i, repeatingLinearGradient: /^(\-(webkit|o|ms|moz)\-)?(repeating\-linear\-gradient)/i, radialGradient: /^(\-(webkit|o|ms|moz)\-)?(radial\-gradient)/i, repeatingRadialGradient: /^(\-(webkit|o|ms|moz)\-)?(repeating\-radial\-gradient)/i, sideOrCorner: /^to (left (top|bottom)|right (top|bottom)|left|right|top|bottom)/i, extentKeywords: /^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/, positionKeywords: /^(left|center|right|top|bottom)/i, pixelValue: /^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/, percentageValue: /^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/, emValue: /^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/, angleValue: /^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/, startCall: /^\(/, endCall: /^\)/, comma: /^,/, hexColor: /^\#([0-9a-fA-F]+)/, literalColor: /^([a-zA-Z]+)/, rgbColor: /^rgb/i, rgbaColor: /^rgba/i, number: /^(([0-9]*\.[0-9]+)|([0-9]+\.?))/ }; var input = ''; function error(msg) { var err = new Error(input + ': ' + msg); err.source = input; throw err; } function getAST() { var ast = matchListDefinitions(); if (input.length > 0) { error('Invalid input not EOF'); } return ast; } function matchListDefinitions() { return matchListing(matchDefinition); } function matchDefinition() { return matchGradient( 'linear-gradient', tokens.linearGradient, matchLinearOrientation) || matchGradient( 'repeating-linear-gradient', tokens.repeatingLinearGradient, matchLinearOrientation) || matchGradient( 'radial-gradient', tokens.radialGradient, matchListRadialOrientations) || matchGradient( 'repeating-radial-gradient', tokens.repeatingRadialGradient, matchListRadialOrientations); } function matchGradient(gradientType, pattern, orientationMatcher) { return matchCall(pattern, function(captures) { var orientation = orientationMatcher(); if (orientation) { if (!scan(tokens.comma)) { error('Missing comma before color stops'); } } return { type: gradientType, orientation: orientation, colorStops: matchListing(matchColorStop) }; }); } function matchCall(pattern, callback) { var captures = scan(pattern); if (captures) { if (!scan(tokens.startCall)) { error('Missing ('); } result = callback(captures); if (!scan(tokens.endCall)) { error('Missing )'); } return result; } } function matchLinearOrientation() { return matchSideOrCorner() || matchAngle(); } function matchSideOrCorner() { return match('directional', tokens.sideOrCorner, 1); } function matchAngle() { return match('angular', tokens.angleValue, 1); } function matchListRadialOrientations() { var radialOrientations, radialOrientation = matchRadialOrientation(), lookaheadCache; if (radialOrientation) { radialOrientations = []; radialOrientations.push(radialOrientation); lookaheadCache = input; if (scan(tokens.comma)) { radialOrientation = matchRadialOrientation(); if (radialOrientation) { radialOrientations.push(radialOrientation); } else { input = lookaheadCache; } } } return radialOrientations; } function matchRadialOrientation() { var radialType = matchCircle() || matchEllipse(); if (radialType) { radialType.at = matchAtPosition(); } else { var defaultPosition = matchPositioning(); if (defaultPosition) { radialType = { type: 'default-radial', at: defaultPosition }; } } return radialType; } function matchCircle() { var circle = match('shape', /^(circle)/i, 0); if (circle) { circle.style = matchLength() || matchExtentKeyword(); } return circle; } function matchEllipse() { var ellipse = match('shape', /^(ellipse)/i, 0); if (ellipse) { ellipse.style = matchDistance() || matchExtentKeyword(); } return ellipse; } function matchExtentKeyword() { return match('extent-keyword', tokens.extentKeywords, 1); } function matchAtPosition() { if (match('position', /^at/, 0)) { var positioning = matchPositioning(); if (!positioning) { error('Missing positioning value'); } return positioning; } } function matchPositioning() { var location = matchCoordinates(); if (location.x || location.y) { return { type: 'position', value: location }; } } function matchCoordinates() { return { x: matchDistance(), y: matchDistance() }; } function matchListing(matcher) { var captures = matcher(), result = []; if (captures) { result.push(captures); while (scan(tokens.comma)) { captures = matcher(); if (captures) { result.push(captures); } else { error('One extra comma'); } } } return result; } function matchColorStop() { var color = matchColor(); if (!color) { error('Expected color definition'); } color.length = matchDistance(); return color; } function matchColor() { return matchHexColor() || matchRGBAColor() || matchRGBColor() || matchLiteralColor(); } function matchLiteralColor() { return match('literal', tokens.literalColor, 0); } function matchHexColor() { return match('hex', tokens.hexColor, 1); } function matchRGBColor() { return matchCall(tokens.rgbColor, function() { return { type: 'rgb', value: matchListing(matchNumber) }; }); } function matchRGBAColor() { return matchCall(tokens.rgbaColor, function() { return { type: 'rgba', value: matchListing(matchNumber) }; }); } function matchNumber() { return scan(tokens.number)[1]; } function matchDistance() { return match('%', tokens.percentageValue, 1) || matchPositionKeyword() || matchLength(); } function matchPositionKeyword() { return match('position-keyword', tokens.positionKeywords, 1); } function matchLength() { return match('px', tokens.pixelValue, 1) || match('em', tokens.emValue, 1); } function match(type, pattern, captureIndex) { var captures = scan(pattern); if (captures) { return { type: type, value: captures[captureIndex] }; } } function scan(regexp) { var captures, blankCaptures; blankCaptures = /^[\n\r\t\s]+/.exec(input); if (blankCaptures) { consume(blankCaptures[0].length); } captures = regexp.exec(input); if (captures) { consume(captures[0].length); } return captures; } function consume(size) { input = input.substr(size); } return function(code) { input = code.toString(); return getAST(); }; })(); exports.parse = (GradientParser || {}).parse; /***/ }), /***/ 3138: /***/ (function(module) { module.exports = /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __nested_webpack_require_187__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) /******/ return installedModules[moduleId].exports; /******/ /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ exports: {}, /******/ id: moduleId, /******/ loaded: false /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __nested_webpack_require_187__); /******/ /******/ // Flag the module as loaded /******/ module.loaded = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __nested_webpack_require_187__.m = modules; /******/ /******/ // expose the module cache /******/ __nested_webpack_require_187__.c = installedModules; /******/ /******/ // __webpack_public_path__ /******/ __nested_webpack_require_187__.p = ""; /******/ /******/ // Load entry module and return exports /******/ return __nested_webpack_require_187__(0); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ (function(module, exports, __nested_webpack_require_1468__) { module.exports = __nested_webpack_require_1468__(1); /***/ }), /* 1 */ /***/ (function(module, exports, __nested_webpack_require_1587__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _utils = __nested_webpack_require_1587__(2); Object.defineProperty(exports, 'combineChunks', { enumerable: true, get: function get() { return _utils.combineChunks; } }); Object.defineProperty(exports, 'fillInChunks', { enumerable: true, get: function get() { return _utils.fillInChunks; } }); Object.defineProperty(exports, 'findAll', { enumerable: true, get: function get() { return _utils.findAll; } }); Object.defineProperty(exports, 'findChunks', { enumerable: true, get: function get() { return _utils.findChunks; } }); /***/ }), /* 2 */ /***/ (function(module, exports) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); /** * Creates an array of chunk objects representing both higlightable and non highlightable pieces of text that match each search word. * @return Array of "chunks" (where a Chunk is { start:number, end:number, highlight:boolean }) */ var findAll = exports.findAll = function findAll(_ref) { var autoEscape = _ref.autoEscape, _ref$caseSensitive = _ref.caseSensitive, caseSensitive = _ref$caseSensitive === undefined ? false : _ref$caseSensitive, _ref$findChunks = _ref.findChunks, findChunks = _ref$findChunks === undefined ? defaultFindChunks : _ref$findChunks, sanitize = _ref.sanitize, searchWords = _ref.searchWords, textToHighlight = _ref.textToHighlight; return fillInChunks({ chunksToHighlight: combineChunks({ chunks: findChunks({ autoEscape: autoEscape, caseSensitive: caseSensitive, sanitize: sanitize, searchWords: searchWords, textToHighlight: textToHighlight }) }), totalLength: textToHighlight ? textToHighlight.length : 0 }); }; /** * Takes an array of {start:number, end:number} objects and combines chunks that overlap into single chunks. * @return {start:number, end:number}[] */ var combineChunks = exports.combineChunks = function combineChunks(_ref2) { var chunks = _ref2.chunks; chunks = chunks.sort(function (first, second) { return first.start - second.start; }).reduce(function (processedChunks, nextChunk) { // First chunk just goes straight in the array... if (processedChunks.length === 0) { return [nextChunk]; } else { // ... subsequent chunks get checked to see if they overlap... var prevChunk = processedChunks.pop(); if (nextChunk.start <= prevChunk.end) { // It may be the case that prevChunk completely surrounds nextChunk, so take the // largest of the end indeces. var endIndex = Math.max(prevChunk.end, nextChunk.end); processedChunks.push({ highlight: false, start: prevChunk.start, end: endIndex }); } else { processedChunks.push(prevChunk, nextChunk); } return processedChunks; } }, []); return chunks; }; /** * Examine text for any matches. * If we find matches, add them to the returned array as a "chunk" object ({start:number, end:number}). * @return {start:number, end:number}[] */ var defaultFindChunks = function defaultFindChunks(_ref3) { var autoEscape = _ref3.autoEscape, caseSensitive = _ref3.caseSensitive, _ref3$sanitize = _ref3.sanitize, sanitize = _ref3$sanitize === undefined ? defaultSanitize : _ref3$sanitize, searchWords = _ref3.searchWords, textToHighlight = _ref3.textToHighlight; textToHighlight = sanitize(textToHighlight); return searchWords.filter(function (searchWord) { return searchWord; }) // Remove empty words .reduce(function (chunks, searchWord) { searchWord = sanitize(searchWord); if (autoEscape) { searchWord = escapeRegExpFn(searchWord); } var regex = new RegExp(searchWord, caseSensitive ? 'g' : 'gi'); var match = void 0; while (match = regex.exec(textToHighlight)) { var _start = match.index; var _end = regex.lastIndex; // We do not return zero-length matches if (_end > _start) { chunks.push({ highlight: false, start: _start, end: _end }); } // Prevent browsers like Firefox from getting stuck in an infinite loop // See http://www.regexguru.com/2008/04/watch-out-for-zero-length-matches/ if (match.index === regex.lastIndex) { regex.lastIndex++; } } return chunks; }, []); }; // Allow the findChunks to be overridden in findAll, // but for backwards compatibility we export as the old name exports.findChunks = defaultFindChunks; /** * Given a set of chunks to highlight, create an additional set of chunks * to represent the bits of text between the highlighted text. * @param chunksToHighlight {start:number, end:number}[] * @param totalLength number * @return {start:number, end:number, highlight:boolean}[] */ var fillInChunks = exports.fillInChunks = function fillInChunks(_ref4) { var chunksToHighlight = _ref4.chunksToHighlight, totalLength = _ref4.totalLength; var allChunks = []; var append = function append(start, end, highlight) { if (end - start > 0) { allChunks.push({ start: start, end: end, highlight: highlight }); } }; if (chunksToHighlight.length === 0) { append(0, totalLength, false); } else { var lastIndex = 0; chunksToHighlight.forEach(function (chunk) { append(lastIndex, chunk.start, false); append(chunk.start, chunk.end, true); lastIndex = chunk.end; }); append(lastIndex, totalLength, false); } return allChunks; }; function defaultSanitize(string) { return string; } function escapeRegExpFn(string) { return string.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&'); } /***/ }) /******/ ]); /***/ }), /***/ 1281: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var reactIs = __webpack_require__(338); /** * Copyright 2015, Yahoo! Inc. * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. */ var REACT_STATICS = { childContextTypes: true, contextType: true, contextTypes: true, defaultProps: true, displayName: true, getDefaultProps: true, getDerivedStateFromError: true, getDerivedStateFromProps: true, mixins: true, propTypes: true, type: true }; var KNOWN_STATICS = { name: true, length: true, prototype: true, caller: true, callee: true, arguments: true, arity: true }; var FORWARD_REF_STATICS = { '$$typeof': true, render: true, defaultProps: true, displayName: true, propTypes: true }; var MEMO_STATICS = { '$$typeof': true, compare: true, defaultProps: true, displayName: true, propTypes: true, type: true }; var TYPE_STATICS = {}; TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS; TYPE_STATICS[reactIs.Memo] = MEMO_STATICS; function getStatics(component) { // React v16.11 and below if (reactIs.isMemo(component)) { return MEMO_STATICS; } // React v16.12 and above return TYPE_STATICS[component['$$typeof']] || REACT_STATICS; } var defineProperty = Object.defineProperty; var getOwnPropertyNames = Object.getOwnPropertyNames; var getOwnPropertySymbols = Object.getOwnPropertySymbols; var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; var getPrototypeOf = Object.getPrototypeOf; var objectPrototype = Object.prototype; function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) { if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components if (objectPrototype) { var inheritedComponent = getPrototypeOf(sourceComponent); if (inheritedComponent && inheritedComponent !== objectPrototype) { hoistNonReactStatics(targetComponent, inheritedComponent, blacklist); } } var keys = getOwnPropertyNames(sourceComponent); if (getOwnPropertySymbols) { keys = keys.concat(getOwnPropertySymbols(sourceComponent)); } var targetStatics = getStatics(targetComponent); var sourceStatics = getStatics(sourceComponent); for (var i = 0; i < keys.length; ++i) { var key = keys[i]; if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) { var descriptor = getOwnPropertyDescriptor(sourceComponent, key); try { // Avoid failures from read-only properties defineProperty(targetComponent, key, descriptor); } catch (e) {} } } } return targetComponent; } module.exports = hoistNonReactStatics; /***/ }), /***/ 5372: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var ReactPropTypesSecret = __webpack_require__(9567); function emptyFunction() {} function emptyFunctionWithReset() {} emptyFunctionWithReset.resetWarningCache = emptyFunction; module.exports = function() { function shim(props, propName, componentName, location, propFullName, secret) { if (secret === ReactPropTypesSecret) { // It is still safe when called from React. return; } var err = new Error( 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use PropTypes.checkPropTypes() to call them. ' + 'Read more at http://fb.me/use-check-prop-types' ); err.name = 'Invariant Violation'; throw err; }; shim.isRequired = shim; function getShim() { return shim; }; // Important! // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`. var ReactPropTypes = { array: shim, bigint: shim, bool: shim, func: shim, number: shim, object: shim, string: shim, symbol: shim, any: shim, arrayOf: getShim, element: shim, elementType: shim, instanceOf: getShim, node: shim, objectOf: getShim, oneOf: getShim, oneOfType: getShim, shape: getShim, exact: getShim, checkPropTypes: emptyFunctionWithReset, resetWarningCache: emptyFunction }; ReactPropTypes.PropTypes = ReactPropTypes; return ReactPropTypes; }; /***/ }), /***/ 2652: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ if (false) { var throwOnDirectAccess, ReactIs; } else { // By explicitly using `prop-types` you are opting into new production behavior. // http://fb.me/prop-types-in-prod module.exports = __webpack_require__(5372)(); } /***/ }), /***/ 9567: /***/ (function(module) { "use strict"; /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; module.exports = ReactPropTypesSecret; /***/ }), /***/ 4821: /***/ (function(__unused_webpack_module, exports) { "use strict"; /** @license React v16.13.1 * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b? Symbol.for("react.suspense_list"):60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.block"):60121,w=b?Symbol.for("react.fundamental"):60117,x=b?Symbol.for("react.responder"):60118,y=b?Symbol.for("react.scope"):60119; function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d; exports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t}; exports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p}; exports.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z; /***/ }), /***/ 338: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; if (true) { module.exports = __webpack_require__(4821); } else {} /***/ }), /***/ 2455: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; /** * @license React * react-jsx-runtime.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var f=__webpack_require__(9196),k=Symbol.for("react.element"),l=Symbol.for("react.fragment"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0}; function q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=""+g);void 0!==a.key&&(e=""+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q; /***/ }), /***/ 7557: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; if (true) { module.exports = __webpack_require__(2455); } else {} /***/ }), /***/ 4793: /***/ (function(module) { var characterMap = { "À": "A", "Á": "A", "Â": "A", "Ã": "A", "Ä": "A", "Å": "A", "Ấ": "A", "Ắ": "A", "Ẳ": "A", "Ẵ": "A", "Ặ": "A", "Æ": "AE", "Ầ": "A", "Ằ": "A", "Ȃ": "A", "Ả": "A", "Ạ": "A", "Ẩ": "A", "Ẫ": "A", "Ậ": "A", "Ç": "C", "Ḉ": "C", "È": "E", "É": "E", "Ê": "E", "Ë": "E", "Ế": "E", "Ḗ": "E", "Ề": "E", "Ḕ": "E", "Ḝ": "E", "Ȇ": "E", "Ẻ": "E", "Ẽ": "E", "Ẹ": "E", "Ể": "E", "Ễ": "E", "Ệ": "E", "Ì": "I", "Í": "I", "Î": "I", "Ï": "I", "Ḯ": "I", "Ȋ": "I", "Ỉ": "I", "Ị": "I", "Ð": "D", "Ñ": "N", "Ò": "O", "Ó": "O", "Ô": "O", "Õ": "O", "Ö": "O", "Ø": "O", "Ố": "O", "Ṍ": "O", "Ṓ": "O", "Ȏ": "O", "Ỏ": "O", "Ọ": "O", "Ổ": "O", "Ỗ": "O", "Ộ": "O", "Ờ": "O", "Ở": "O", "Ỡ": "O", "Ớ": "O", "Ợ": "O", "Ù": "U", "Ú": "U", "Û": "U", "Ü": "U", "Ủ": "U", "Ụ": "U", "Ử": "U", "Ữ": "U", "Ự": "U", "Ý": "Y", "à": "a", "á": "a", "â": "a", "ã": "a", "ä": "a", "å": "a", "ấ": "a", "ắ": "a", "ẳ": "a", "ẵ": "a", "ặ": "a", "æ": "ae", "ầ": "a", "ằ": "a", "ȃ": "a", "ả": "a", "ạ": "a", "ẩ": "a", "ẫ": "a", "ậ": "a", "ç": "c", "ḉ": "c", "è": "e", "é": "e", "ê": "e", "ë": "e", "ế": "e", "ḗ": "e", "ề": "e", "ḕ": "e", "ḝ": "e", "ȇ": "e", "ẻ": "e", "ẽ": "e", "ẹ": "e", "ể": "e", "ễ": "e", "ệ": "e", "ì": "i", "í": "i", "î": "i", "ï": "i", "ḯ": "i", "ȋ": "i", "ỉ": "i", "ị": "i", "ð": "d", "ñ": "n", "ò": "o", "ó": "o", "ô": "o", "õ": "o", "ö": "o", "ø": "o", "ố": "o", "ṍ": "o", "ṓ": "o", "ȏ": "o", "ỏ": "o", "ọ": "o", "ổ": "o", "ỗ": "o", "ộ": "o", "ờ": "o", "ở": "o", "ỡ": "o", "ớ": "o", "ợ": "o", "ù": "u", "ú": "u", "û": "u", "ü": "u", "ủ": "u", "ụ": "u", "ử": "u", "ữ": "u", "ự": "u", "ý": "y", "ÿ": "y", "Ā": "A", "ā": "a", "Ă": "A", "ă": "a", "Ą": "A", "ą": "a", "Ć": "C", "ć": "c", "Ĉ": "C", "ĉ": "c", "Ċ": "C", "ċ": "c", "Č": "C", "č": "c", "C̆": "C", "c̆": "c", "Ď": "D", "ď": "d", "Đ": "D", "đ": "d", "Ē": "E", "ē": "e", "Ĕ": "E", "ĕ": "e", "Ė": "E", "ė": "e", "Ę": "E", "ę": "e", "Ě": "E", "ě": "e", "Ĝ": "G", "Ǵ": "G", "ĝ": "g", "ǵ": "g", "Ğ": "G", "ğ": "g", "Ġ": "G", "ġ": "g", "Ģ": "G", "ģ": "g", "Ĥ": "H", "ĥ": "h", "Ħ": "H", "ħ": "h", "Ḫ": "H", "ḫ": "h", "Ĩ": "I", "ĩ": "i", "Ī": "I", "ī": "i", "Ĭ": "I", "ĭ": "i", "Į": "I", "į": "i", "İ": "I", "ı": "i", "IJ": "IJ", "ij": "ij", "Ĵ": "J", "ĵ": "j", "Ķ": "K", "ķ": "k", "Ḱ": "K", "ḱ": "k", "K̆": "K", "k̆": "k", "Ĺ": "L", "ĺ": "l", "Ļ": "L", "ļ": "l", "Ľ": "L", "ľ": "l", "Ŀ": "L", "ŀ": "l", "Ł": "l", "ł": "l", "Ḿ": "M", "ḿ": "m", "M̆": "M", "m̆": "m", "Ń": "N", "ń": "n", "Ņ": "N", "ņ": "n", "Ň": "N", "ň": "n", "ʼn": "n", "N̆": "N", "n̆": "n", "Ō": "O", "ō": "o", "Ŏ": "O", "ŏ": "o", "Ő": "O", "ő": "o", "Œ": "OE", "œ": "oe", "P̆": "P", "p̆": "p", "Ŕ": "R", "ŕ": "r", "Ŗ": "R", "ŗ": "r", "Ř": "R", "ř": "r", "R̆": "R", "r̆": "r", "Ȓ": "R", "ȓ": "r", "Ś": "S", "ś": "s", "Ŝ": "S", "ŝ": "s", "Ş": "S", "Ș": "S", "ș": "s", "ş": "s", "Š": "S", "š": "s", "Ţ": "T", "ţ": "t", "ț": "t", "Ț": "T", "Ť": "T", "ť": "t", "Ŧ": "T", "ŧ": "t", "T̆": "T", "t̆": "t", "Ũ": "U", "ũ": "u", "Ū": "U", "ū": "u", "Ŭ": "U", "ŭ": "u", "Ů": "U", "ů": "u", "Ű": "U", "ű": "u", "Ų": "U", "ų": "u", "Ȗ": "U", "ȗ": "u", "V̆": "V", "v̆": "v", "Ŵ": "W", "ŵ": "w", "Ẃ": "W", "ẃ": "w", "X̆": "X", "x̆": "x", "Ŷ": "Y", "ŷ": "y", "Ÿ": "Y", "Y̆": "Y", "y̆": "y", "Ź": "Z", "ź": "z", "Ż": "Z", "ż": "z", "Ž": "Z", "ž": "z", "ſ": "s", "ƒ": "f", "Ơ": "O", "ơ": "o", "Ư": "U", "ư": "u", "Ǎ": "A", "ǎ": "a", "Ǐ": "I", "ǐ": "i", "Ǒ": "O", "ǒ": "o", "Ǔ": "U", "ǔ": "u", "Ǖ": "U", "ǖ": "u", "Ǘ": "U", "ǘ": "u", "Ǚ": "U", "ǚ": "u", "Ǜ": "U", "ǜ": "u", "Ứ": "U", "ứ": "u", "Ṹ": "U", "ṹ": "u", "Ǻ": "A", "ǻ": "a", "Ǽ": "AE", "ǽ": "ae", "Ǿ": "O", "ǿ": "o", "Þ": "TH", "þ": "th", "Ṕ": "P", "ṕ": "p", "Ṥ": "S", "ṥ": "s", "X́": "X", "x́": "x", "Ѓ": "Г", "ѓ": "г", "Ќ": "К", "ќ": "к", "A̋": "A", "a̋": "a", "E̋": "E", "e̋": "e", "I̋": "I", "i̋": "i", "Ǹ": "N", "ǹ": "n", "Ồ": "O", "ồ": "o", "Ṑ": "O", "ṑ": "o", "Ừ": "U", "ừ": "u", "Ẁ": "W", "ẁ": "w", "Ỳ": "Y", "ỳ": "y", "Ȁ": "A", "ȁ": "a", "Ȅ": "E", "ȅ": "e", "Ȉ": "I", "ȉ": "i", "Ȍ": "O", "ȍ": "o", "Ȑ": "R", "ȑ": "r", "Ȕ": "U", "ȕ": "u", "B̌": "B", "b̌": "b", "Č̣": "C", "č̣": "c", "Ê̌": "E", "ê̌": "e", "F̌": "F", "f̌": "f", "Ǧ": "G", "ǧ": "g", "Ȟ": "H", "ȟ": "h", "J̌": "J", "ǰ": "j", "Ǩ": "K", "ǩ": "k", "M̌": "M", "m̌": "m", "P̌": "P", "p̌": "p", "Q̌": "Q", "q̌": "q", "Ř̩": "R", "ř̩": "r", "Ṧ": "S", "ṧ": "s", "V̌": "V", "v̌": "v", "W̌": "W", "w̌": "w", "X̌": "X", "x̌": "x", "Y̌": "Y", "y̌": "y", "A̧": "A", "a̧": "a", "B̧": "B", "b̧": "b", "Ḑ": "D", "ḑ": "d", "Ȩ": "E", "ȩ": "e", "Ɛ̧": "E", "ɛ̧": "e", "Ḩ": "H", "ḩ": "h", "I̧": "I", "i̧": "i", "Ɨ̧": "I", "ɨ̧": "i", "M̧": "M", "m̧": "m", "O̧": "O", "o̧": "o", "Q̧": "Q", "q̧": "q", "U̧": "U", "u̧": "u", "X̧": "X", "x̧": "x", "Z̧": "Z", "z̧": "z", "й":"и", "Й":"И", "ё":"е", "Ё":"Е", }; var chars = Object.keys(characterMap).join('|'); var allAccents = new RegExp(chars, 'g'); var firstAccent = new RegExp(chars, ''); function matcher(match) { return characterMap[match]; } var removeAccents = function(string) { return string.replace(allAccents, matcher); }; var hasAccents = function(string) { return !!string.match(firstAccent); }; module.exports = removeAccents; module.exports.has = hasAccents; module.exports.remove = removeAccents; /***/ }), /***/ 7755: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; /** * @license React * use-sync-external-store-shim.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var e=__webpack_require__(9196);function h(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var k="function"===typeof Object.is?Object.is:h,l=e.useState,m=e.useEffect,n=e.useLayoutEffect,p=e.useDebugValue;function q(a,b){var d=b(),f=l({inst:{value:d,getSnapshot:b}}),c=f[0].inst,g=f[1];n(function(){c.value=d;c.getSnapshot=b;r(c)&&g({inst:c})},[a,d,b]);m(function(){r(c)&&g({inst:c});return a(function(){r(c)&&g({inst:c})})},[a]);p(d);return d} function r(a){var b=a.getSnapshot;a=a.value;try{var d=b();return!k(a,d)}catch(f){return!0}}function t(a,b){return b()}var u="undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement?t:q;exports.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:u; /***/ }), /***/ 635: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; if (true) { module.exports = __webpack_require__(7755); } else {} /***/ }), /***/ 9196: /***/ (function(module) { "use strict"; module.exports = window["React"]; /***/ }) /******/ }); /************************************************************************/ /******/ // The module cache /******/ var __webpack_module_cache__ = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ // Check if module is in cache /******/ var cachedModule = __webpack_module_cache__[moduleId]; /******/ if (cachedModule !== undefined) { /******/ return cachedModule.exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = __webpack_module_cache__[moduleId] = { /******/ // no module.id needed /******/ // no module.loaded needed /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /************************************************************************/ /******/ /* webpack/runtime/compat get default export */ /******/ !function() { /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function() { return module['default']; } : /******/ function() { return module; }; /******/ __webpack_require__.d(getter, { a: getter }); /******/ return getter; /******/ }; /******/ }(); /******/ /******/ /* webpack/runtime/create fake namespace object */ /******/ !function() { /******/ var getProto = Object.getPrototypeOf ? function(obj) { return Object.getPrototypeOf(obj); } : function(obj) { return obj.__proto__; }; /******/ var leafPrototypes; /******/ // create a fake namespace object /******/ // mode & 1: value is a module id, require it /******/ // mode & 2: merge all properties of value into the ns /******/ // mode & 4: return value when already ns object /******/ // mode & 16: return value when it's Promise-like /******/ // mode & 8|1: behave like require /******/ __webpack_require__.t = function(value, mode) { /******/ if(mode & 1) value = this(value); /******/ if(mode & 8) return value; /******/ if(typeof value === 'object' && value) { /******/ if((mode & 4) && value.__esModule) return value; /******/ if((mode & 16) && typeof value.then === 'function') return value; /******/ } /******/ var ns = Object.create(null); /******/ __webpack_require__.r(ns); /******/ var def = {}; /******/ leafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)]; /******/ for(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) { /******/ Object.getOwnPropertyNames(current).forEach(function(key) { def[key] = function() { return value[key]; }; }); /******/ } /******/ def['default'] = function() { return value; }; /******/ __webpack_require__.d(ns, def); /******/ return ns; /******/ }; /******/ }(); /******/ /******/ /* webpack/runtime/define property getters */ /******/ !function() { /******/ // define getter functions for harmony exports /******/ __webpack_require__.d = function(exports, definition) { /******/ for(var key in definition) { /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); /******/ } /******/ } /******/ }; /******/ }(); /******/ /******/ /* webpack/runtime/hasOwnProperty shorthand */ /******/ !function() { /******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } /******/ }(); /******/ /******/ /* webpack/runtime/make namespace object */ /******/ !function() { /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ }(); /******/ /******/ /* webpack/runtime/nonce */ /******/ !function() { /******/ __webpack_require__.nc = undefined; /******/ }(); /******/ /************************************************************************/ var __webpack_exports__ = {}; // This entry need to be wrapped in an IIFE because it need to be in strict mode. !function() { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, { AnglePickerControl: function() { return /* reexport */ angle_picker_control; }, Animate: function() { return /* reexport */ animate; }, Autocomplete: function() { return /* reexport */ Autocomplete; }, BaseControl: function() { return /* reexport */ base_control; }, BlockQuotation: function() { return /* reexport */ external_wp_primitives_namespaceObject.BlockQuotation; }, Button: function() { return /* reexport */ build_module_button; }, ButtonGroup: function() { return /* reexport */ button_group; }, Card: function() { return /* reexport */ card_component; }, CardBody: function() { return /* reexport */ card_body_component; }, CardDivider: function() { return /* reexport */ card_divider_component; }, CardFooter: function() { return /* reexport */ card_footer_component; }, CardHeader: function() { return /* reexport */ card_header_component; }, CardMedia: function() { return /* reexport */ card_media_component; }, CheckboxControl: function() { return /* reexport */ checkbox_control; }, Circle: function() { return /* reexport */ external_wp_primitives_namespaceObject.Circle; }, ClipboardButton: function() { return /* reexport */ ClipboardButton; }, ColorIndicator: function() { return /* reexport */ color_indicator; }, ColorPalette: function() { return /* reexport */ color_palette; }, ColorPicker: function() { return /* reexport */ LegacyAdapter; }, ComboboxControl: function() { return /* reexport */ combobox_control; }, CustomGradientPicker: function() { return /* reexport */ custom_gradient_picker; }, CustomSelectControl: function() { return /* reexport */ StableCustomSelectControl; }, Dashicon: function() { return /* reexport */ dashicon; }, DatePicker: function() { return /* reexport */ date; }, DateTimePicker: function() { return /* reexport */ build_module_date_time; }, Disabled: function() { return /* reexport */ disabled; }, Draggable: function() { return /* reexport */ draggable; }, DropZone: function() { return /* reexport */ drop_zone; }, DropZoneProvider: function() { return /* reexport */ DropZoneProvider; }, Dropdown: function() { return /* reexport */ dropdown; }, DropdownMenu: function() { return /* reexport */ dropdown_menu; }, DuotonePicker: function() { return /* reexport */ duotone_picker; }, DuotoneSwatch: function() { return /* reexport */ duotone_swatch; }, ExternalLink: function() { return /* reexport */ external_link; }, Fill: function() { return /* reexport */ slot_fill_Fill; }, Flex: function() { return /* reexport */ flex_component; }, FlexBlock: function() { return /* reexport */ flex_block_component; }, FlexItem: function() { return /* reexport */ flex_item_component; }, FocalPointPicker: function() { return /* reexport */ focal_point_picker; }, FocusReturnProvider: function() { return /* reexport */ with_focus_return_Provider; }, FocusableIframe: function() { return /* reexport */ FocusableIframe; }, FontSizePicker: function() { return /* reexport */ font_size_picker; }, FormFileUpload: function() { return /* reexport */ form_file_upload; }, FormToggle: function() { return /* reexport */ form_toggle; }, FormTokenField: function() { return /* reexport */ form_token_field; }, G: function() { return /* reexport */ external_wp_primitives_namespaceObject.G; }, GradientPicker: function() { return /* reexport */ gradient_picker; }, Guide: function() { return /* reexport */ guide; }, GuidePage: function() { return /* reexport */ GuidePage; }, HorizontalRule: function() { return /* reexport */ external_wp_primitives_namespaceObject.HorizontalRule; }, Icon: function() { return /* reexport */ build_module_icon; }, IconButton: function() { return /* reexport */ deprecated; }, IsolatedEventContainer: function() { return /* reexport */ isolated_event_container; }, KeyboardShortcuts: function() { return /* reexport */ keyboard_shortcuts; }, Line: function() { return /* reexport */ external_wp_primitives_namespaceObject.Line; }, MenuGroup: function() { return /* reexport */ menu_group; }, MenuItem: function() { return /* reexport */ menu_item; }, MenuItemsChoice: function() { return /* reexport */ menu_items_choice; }, Modal: function() { return /* reexport */ modal; }, NavigableMenu: function() { return /* reexport */ navigable_container_menu; }, Notice: function() { return /* reexport */ build_module_notice; }, NoticeList: function() { return /* reexport */ list; }, Panel: function() { return /* reexport */ panel; }, PanelBody: function() { return /* reexport */ body; }, PanelHeader: function() { return /* reexport */ panel_header; }, PanelRow: function() { return /* reexport */ row; }, Path: function() { return /* reexport */ external_wp_primitives_namespaceObject.Path; }, Placeholder: function() { return /* reexport */ placeholder; }, Polygon: function() { return /* reexport */ external_wp_primitives_namespaceObject.Polygon; }, Popover: function() { return /* reexport */ popover; }, QueryControls: function() { return /* reexport */ query_controls; }, RadioControl: function() { return /* reexport */ radio_control; }, RangeControl: function() { return /* reexport */ range_control; }, Rect: function() { return /* reexport */ external_wp_primitives_namespaceObject.Rect; }, ResizableBox: function() { return /* reexport */ resizable_box; }, ResponsiveWrapper: function() { return /* reexport */ responsive_wrapper; }, SVG: function() { return /* reexport */ external_wp_primitives_namespaceObject.SVG; }, SandBox: function() { return /* reexport */ sandbox; }, ScrollLock: function() { return /* reexport */ scroll_lock; }, SearchControl: function() { return /* reexport */ search_control; }, SelectControl: function() { return /* reexport */ select_control; }, Slot: function() { return /* reexport */ slot_fill_Slot; }, SlotFillProvider: function() { return /* reexport */ Provider; }, Snackbar: function() { return /* reexport */ snackbar; }, SnackbarList: function() { return /* reexport */ snackbar_list; }, Spinner: function() { return /* reexport */ spinner; }, TabPanel: function() { return /* reexport */ tab_panel; }, TabbableContainer: function() { return /* reexport */ tabbable; }, TextControl: function() { return /* reexport */ text_control; }, TextHighlight: function() { return /* reexport */ text_highlight; }, TextareaControl: function() { return /* reexport */ textarea_control; }, TimePicker: function() { return /* reexport */ time; }, Tip: function() { return /* reexport */ build_module_tip; }, ToggleControl: function() { return /* reexport */ toggle_control; }, Toolbar: function() { return /* reexport */ toolbar; }, ToolbarButton: function() { return /* reexport */ toolbar_button; }, ToolbarDropdownMenu: function() { return /* reexport */ toolbar_dropdown_menu; }, ToolbarGroup: function() { return /* reexport */ toolbar_group; }, ToolbarItem: function() { return /* reexport */ toolbar_item; }, Tooltip: function() { return /* reexport */ tooltip; }, TreeSelect: function() { return /* reexport */ tree_select; }, VisuallyHidden: function() { return /* reexport */ visually_hidden_component; }, __experimentalAlignmentMatrixControl: function() { return /* reexport */ alignment_matrix_control; }, __experimentalApplyValueToSides: function() { return /* reexport */ applyValueToSides; }, __experimentalBorderBoxControl: function() { return /* reexport */ border_box_control_component; }, __experimentalBorderControl: function() { return /* reexport */ border_control_component; }, __experimentalBoxControl: function() { return /* reexport */ box_control; }, __experimentalConfirmDialog: function() { return /* reexport */ confirm_dialog_component; }, __experimentalDimensionControl: function() { return /* reexport */ dimension_control; }, __experimentalDivider: function() { return /* reexport */ divider_component; }, __experimentalDropdownContentWrapper: function() { return /* reexport */ dropdown_content_wrapper; }, __experimentalElevation: function() { return /* reexport */ elevation_component; }, __experimentalGrid: function() { return /* reexport */ grid_component; }, __experimentalHStack: function() { return /* reexport */ h_stack_component; }, __experimentalHasSplitBorders: function() { return /* reexport */ hasSplitBorders; }, __experimentalHeading: function() { return /* reexport */ heading_component; }, __experimentalInputControl: function() { return /* reexport */ input_control; }, __experimentalInputControlPrefixWrapper: function() { return /* reexport */ input_prefix_wrapper; }, __experimentalInputControlSuffixWrapper: function() { return /* reexport */ input_suffix_wrapper; }, __experimentalIsDefinedBorder: function() { return /* reexport */ isDefinedBorder; }, __experimentalIsEmptyBorder: function() { return /* reexport */ isEmptyBorder; }, __experimentalItem: function() { return /* reexport */ item_component; }, __experimentalItemGroup: function() { return /* reexport */ item_group_component; }, __experimentalNavigation: function() { return /* reexport */ navigation; }, __experimentalNavigationBackButton: function() { return /* reexport */ back_button; }, __experimentalNavigationGroup: function() { return /* reexport */ group; }, __experimentalNavigationItem: function() { return /* reexport */ navigation_item; }, __experimentalNavigationMenu: function() { return /* reexport */ navigation_menu; }, __experimentalNavigatorBackButton: function() { return /* reexport */ navigator_back_button_component; }, __experimentalNavigatorButton: function() { return /* reexport */ navigator_button_component; }, __experimentalNavigatorProvider: function() { return /* reexport */ navigator_provider_component; }, __experimentalNavigatorScreen: function() { return /* reexport */ navigator_screen_component; }, __experimentalNavigatorToParentButton: function() { return /* reexport */ navigator_to_parent_button_component; }, __experimentalNumberControl: function() { return /* reexport */ number_control; }, __experimentalPaletteEdit: function() { return /* reexport */ palette_edit; }, __experimentalParseQuantityAndUnitFromRawValue: function() { return /* reexport */ parseQuantityAndUnitFromRawValue; }, __experimentalRadio: function() { return /* reexport */ radio_group_radio; }, __experimentalRadioGroup: function() { return /* reexport */ radio_group; }, __experimentalScrollable: function() { return /* reexport */ scrollable_component; }, __experimentalSpacer: function() { return /* reexport */ spacer_component; }, __experimentalStyleProvider: function() { return /* reexport */ style_provider; }, __experimentalSurface: function() { return /* reexport */ surface_component; }, __experimentalText: function() { return /* reexport */ text_component; }, __experimentalToggleGroupControl: function() { return /* reexport */ toggle_group_control_component; }, __experimentalToggleGroupControlOption: function() { return /* reexport */ toggle_group_control_option_component; }, __experimentalToggleGroupControlOptionIcon: function() { return /* reexport */ toggle_group_control_option_icon_component; }, __experimentalToolbarContext: function() { return /* reexport */ toolbar_context; }, __experimentalToolsPanel: function() { return /* reexport */ tools_panel_component; }, __experimentalToolsPanelContext: function() { return /* reexport */ ToolsPanelContext; }, __experimentalToolsPanelItem: function() { return /* reexport */ tools_panel_item_component; }, __experimentalTreeGrid: function() { return /* reexport */ tree_grid; }, __experimentalTreeGridCell: function() { return /* reexport */ cell; }, __experimentalTreeGridItem: function() { return /* reexport */ tree_grid_item; }, __experimentalTreeGridRow: function() { return /* reexport */ tree_grid_row; }, __experimentalTruncate: function() { return /* reexport */ truncate_component; }, __experimentalUnitControl: function() { return /* reexport */ unit_control; }, __experimentalUseCustomUnits: function() { return /* reexport */ useCustomUnits; }, __experimentalUseNavigator: function() { return /* reexport */ use_navigator; }, __experimentalUseSlot: function() { return /* reexport */ useSlot; }, __experimentalUseSlotFills: function() { return /* reexport */ useSlotFills; }, __experimentalVStack: function() { return /* reexport */ v_stack_component; }, __experimentalView: function() { return /* reexport */ component; }, __experimentalZStack: function() { return /* reexport */ z_stack_component; }, __unstableAnimatePresence: function() { return /* reexport */ AnimatePresence; }, __unstableComposite: function() { return /* reexport */ Composite; }, __unstableCompositeGroup: function() { return /* reexport */ CompositeGroup; }, __unstableCompositeItem: function() { return /* reexport */ CompositeItem; }, __unstableDisclosureContent: function() { return /* reexport */ DisclosureContent_DisclosureContent; }, __unstableGetAnimateClassName: function() { return /* reexport */ getAnimateClassName; }, __unstableMotion: function() { return /* reexport */ motion; }, __unstableMotionContext: function() { return /* reexport */ MotionContext; }, __unstableUseAutocompleteProps: function() { return /* reexport */ useAutocompleteProps; }, __unstableUseCompositeState: function() { return /* reexport */ useCompositeState; }, __unstableUseNavigateRegions: function() { return /* reexport */ useNavigateRegions; }, createSlotFill: function() { return /* reexport */ createSlotFill; }, navigateRegions: function() { return /* reexport */ navigate_regions; }, privateApis: function() { return /* reexport */ privateApis; }, useBaseControlProps: function() { return /* reexport */ useBaseControlProps; }, withConstrainedTabbing: function() { return /* reexport */ with_constrained_tabbing; }, withFallbackStyles: function() { return /* reexport */ with_fallback_styles; }, withFilters: function() { return /* reexport */ withFilters; }, withFocusOutside: function() { return /* reexport */ with_focus_outside; }, withFocusReturn: function() { return /* reexport */ with_focus_return; }, withNotices: function() { return /* reexport */ with_notices; }, withSpokenMessages: function() { return /* reexport */ with_spoken_messages; } }); // NAMESPACE OBJECT: ./node_modules/@wordpress/components/build-module/text/styles.js var text_styles_namespaceObject = {}; __webpack_require__.r(text_styles_namespaceObject); __webpack_require__.d(text_styles_namespaceObject, { Text: function() { return Text; }, block: function() { return styles_block; }, destructive: function() { return destructive; }, highlighterText: function() { return highlighterText; }, muted: function() { return muted; }, positive: function() { return positive; }, upperCase: function() { return upperCase; } }); // NAMESPACE OBJECT: ./node_modules/@wordpress/components/build-module/ui/tooltip/styles.js var tooltip_styles_namespaceObject = {}; __webpack_require__.r(tooltip_styles_namespaceObject); __webpack_require__.d(tooltip_styles_namespaceObject, { _v: function() { return TooltipContent; }, TooltipPopoverView: function() { return TooltipPopoverView; }, lr: function() { return TooltipShortcut; } }); // NAMESPACE OBJECT: ./node_modules/@wordpress/components/build-module/toggle-group-control/toggle-group-control-option-base/styles.js var toggle_group_control_option_base_styles_namespaceObject = {}; __webpack_require__.r(toggle_group_control_option_base_styles_namespaceObject); __webpack_require__.d(toggle_group_control_option_base_styles_namespaceObject, { ButtonContentView: function() { return ButtonContentView; }, LabelView: function() { return LabelView; }, Uz: function() { return backdropView; }, Ji: function() { return buttonView; }, IA: function() { return labelBlock; } }); ;// CONCATENATED MODULE: external ["wp","primitives"] var external_wp_primitives_namespaceObject = window["wp"]["primitives"]; ;// CONCATENATED MODULE: external ["wp","element"] var external_wp_element_namespaceObject = window["wp"]["element"]; // EXTERNAL MODULE: ./node_modules/classnames/index.js var classnames = __webpack_require__(4403); var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); ;// CONCATENATED MODULE: external ["wp","i18n"] var external_wp_i18n_namespaceObject = window["wp"]["i18n"]; ;// CONCATENATED MODULE: external ["wp","compose"] var external_wp_compose_namespaceObject = window["wp"]["compose"]; ;// CONCATENATED MODULE: ./node_modules/reakit/es/_rollupPluginBabelHelpers-1f0bf8c2.js function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread2(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } it = o[Symbol.iterator](); return it.next.bind(it); } // EXTERNAL MODULE: external "React" var external_React_ = __webpack_require__(9196); var external_React_namespaceObject = /*#__PURE__*/__webpack_require__.t(external_React_, 2); var external_React_default = /*#__PURE__*/__webpack_require__.n(external_React_); ;// CONCATENATED MODULE: ./node_modules/reakit-system/es/_rollupPluginBabelHelpers-0c84a174.js function _rollupPluginBabelHelpers_0c84a174_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _rollupPluginBabelHelpers_0c84a174_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _rollupPluginBabelHelpers_0c84a174_objectSpread2(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { _rollupPluginBabelHelpers_0c84a174_ownKeys(Object(source), true).forEach(function (key) { _rollupPluginBabelHelpers_0c84a174_defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { _rollupPluginBabelHelpers_0c84a174_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _rollupPluginBabelHelpers_0c84a174_objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } function _rollupPluginBabelHelpers_0c84a174_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _rollupPluginBabelHelpers_0c84a174_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _rollupPluginBabelHelpers_0c84a174_arrayLikeToArray(o, minLen); } function _rollupPluginBabelHelpers_0c84a174_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } function _rollupPluginBabelHelpers_0c84a174_createForOfIteratorHelperLoose(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _rollupPluginBabelHelpers_0c84a174_unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } it = o[Symbol.iterator](); return it.next.bind(it); } ;// CONCATENATED MODULE: ./node_modules/reakit-system/es/SystemContext.js var SystemContext = /*#__PURE__*/(0,external_React_.createContext)({}); ;// CONCATENATED MODULE: ./node_modules/reakit-system/es/useCreateElement.js function isRenderProp(children) { return typeof children === "function"; } /** * Custom hook that will call `children` if it's a function. If * `useCreateElement` has been passed to the context, it'll be used instead. * * @example * import React from "react"; * import { SystemProvider, useCreateElement } from "reakit-system"; * * const system = { * useCreateElement(type, props, children = props.children) { * // very similar to what `useCreateElement` does already * if (typeof children === "function") { * const { children: _, ...rest } = props; * return children(rest); * } * return React.createElement(type, props, children); * }, * }; * * function Component(props) { * return useCreateElement("div", props); * } * * function App() { * return ( * * {({ url }) => link} * * ); * } */ var useCreateElement = function useCreateElement(type, props, children) { if (children === void 0) { children = props.children; } var context = (0,external_React_.useContext)(SystemContext); if (context.useCreateElement) { return context.useCreateElement(type, props, children); } if (typeof type === "string" && isRenderProp(children)) { var _ = props.children, rest = _rollupPluginBabelHelpers_0c84a174_objectWithoutPropertiesLoose(props, ["children"]); return children(rest); } return /*#__PURE__*/(0,external_React_.createElement)(type, props, children); }; ;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/_rollupPluginBabelHelpers-1f0bf8c2.js function _rollupPluginBabelHelpers_1f0bf8c2_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _rollupPluginBabelHelpers_1f0bf8c2_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _rollupPluginBabelHelpers_1f0bf8c2_objectSpread2(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { _rollupPluginBabelHelpers_1f0bf8c2_ownKeys(Object(source), true).forEach(function (key) { _rollupPluginBabelHelpers_1f0bf8c2_defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { _rollupPluginBabelHelpers_1f0bf8c2_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _rollupPluginBabelHelpers_1f0bf8c2_objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } function _rollupPluginBabelHelpers_1f0bf8c2_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _rollupPluginBabelHelpers_1f0bf8c2_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _rollupPluginBabelHelpers_1f0bf8c2_arrayLikeToArray(o, minLen); } function _rollupPluginBabelHelpers_1f0bf8c2_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } function _rollupPluginBabelHelpers_1f0bf8c2_createForOfIteratorHelperLoose(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _rollupPluginBabelHelpers_1f0bf8c2_unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } it = o[Symbol.iterator](); return it.next.bind(it); } ;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/isObject.js /** * Checks whether `arg` is an object or not. * * @returns {boolean} */ function isObject_isObject(arg) { return typeof arg === "object" && arg != null; } ;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/isPlainObject.js /** * Checks whether `arg` is a plain object or not. * * @returns {boolean} */ function isPlainObject(arg) { var _proto$constructor; if (!isObject_isObject(arg)) return false; var proto = Object.getPrototypeOf(arg); if (proto == null) return true; return ((_proto$constructor = proto.constructor) === null || _proto$constructor === void 0 ? void 0 : _proto$constructor.toString()) === Object.toString(); } ;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/splitProps.js /** * Splits an object (`props`) into a tuple where the first item is an object * with the passed `keys`, and the second item is an object with these keys * omitted. * * @deprecated will be removed in version 2 * * @example * import { splitProps } from "reakit-utils"; * * splitProps({ a: "a", b: "b" }, ["a"]); // [{ a: "a" }, { b: "b" }] */ function __deprecatedSplitProps(props, keys) { var propsKeys = Object.keys(props); var picked = {}; var omitted = {}; for (var _i = 0, _propsKeys = propsKeys; _i < _propsKeys.length; _i++) { var key = _propsKeys[_i]; if (keys.indexOf(key) >= 0) { picked[key] = props[key]; } else { omitted[key] = props[key]; } } return [picked, omitted]; } /** * Splits an object (`props`) into a tuple where the first item * is the `state` property, and the second item is the rest of the properties. * * It is also backward compatible with version 1. If `keys` are passed then * splits an object (`props`) into a tuple where the first item is an object * with the passed `keys`, and the second item is an object with these keys * omitted. * * @example * import { splitProps } from "reakit-utils"; * * splitProps({ a: "a", b: "b" }, ["a"]); // [{ a: "a" }, { b: "b" }] * * @example * import { splitProps } from "reakit-utils"; * * splitProps({ state: { a: "a" }, b: "b" }); // [{ a: "a" }, { b: "b" }] */ function splitProps(props, keys) { if (keys === void 0) { keys = []; } if (!isPlainObject(props.state)) { return __deprecatedSplitProps(props, keys); } var _deprecatedSplitProp = __deprecatedSplitProps(props, [].concat(keys, ["state"])), picked = _deprecatedSplitProp[0], omitted = _deprecatedSplitProp[1]; var state = picked.state, restPicked = _rollupPluginBabelHelpers_1f0bf8c2_objectWithoutPropertiesLoose(picked, ["state"]); return [_rollupPluginBabelHelpers_1f0bf8c2_objectSpread2(_rollupPluginBabelHelpers_1f0bf8c2_objectSpread2({}, state), restPicked), omitted]; } ;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/shallowEqual.js /** * Compares two objects. * * @example * import { shallowEqual } from "reakit-utils"; * * shallowEqual({ a: "a" }, {}); // false * shallowEqual({ a: "a" }, { b: "b" }); // false * shallowEqual({ a: "a" }, { a: "a" }); // true * shallowEqual({ a: "a" }, { a: "a", b: "b" }); // false */ function shallowEqual(objA, objB) { if (objA === objB) return true; if (!objA) return false; if (!objB) return false; if (typeof objA !== "object") return false; if (typeof objB !== "object") return false; var aKeys = Object.keys(objA); var bKeys = Object.keys(objB); var length = aKeys.length; if (bKeys.length !== length) return false; for (var _i = 0, _aKeys = aKeys; _i < _aKeys.length; _i++) { var key = _aKeys[_i]; if (objA[key] !== objB[key]) { return false; } } return true; } ;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/normalizePropsAreEqual.js /** * This higher order functions take `propsAreEqual` function and * returns a new function which normalizes the props. * * Normalizing in our case is making sure the `propsAreEqual` works with * both version 1 (object spreading) and version 2 (state object) state passing. * * To achieve this, the returned function in case of a state object * will spread the state object in both `prev` and `next props. * * Other case it just returns the function as is which makes sure * that we are still backward compatible */ function normalizePropsAreEqual(propsAreEqual) { if (propsAreEqual.name === "normalizePropsAreEqualInner") { return propsAreEqual; } return function normalizePropsAreEqualInner(prev, next) { if (!isPlainObject(prev.state) || !isPlainObject(next.state)) { return propsAreEqual(prev, next); } return propsAreEqual(_rollupPluginBabelHelpers_1f0bf8c2_objectSpread2(_rollupPluginBabelHelpers_1f0bf8c2_objectSpread2({}, prev.state), prev), _rollupPluginBabelHelpers_1f0bf8c2_objectSpread2(_rollupPluginBabelHelpers_1f0bf8c2_objectSpread2({}, next.state), next)); }; } ;// CONCATENATED MODULE: ./node_modules/reakit-system/es/createComponent.js function createComponent_forwardRef(component) { return /*#__PURE__*/(0,external_React_.forwardRef)(component); } function memo(component, propsAreEqual) { return /*#__PURE__*/(0,external_React_.memo)(component, propsAreEqual); } /** * Creates a React component. * * @example * import { createComponent } from "reakit-system"; * * const A = createComponent({ as: "a" }); * * @param options */ function createComponent(_ref) { var type = _ref.as, useHook = _ref.useHook, shouldMemo = _ref.memo, _ref$propsAreEqual = _ref.propsAreEqual, propsAreEqual = _ref$propsAreEqual === void 0 ? useHook === null || useHook === void 0 ? void 0 : useHook.unstable_propsAreEqual : _ref$propsAreEqual, _ref$keys = _ref.keys, keys = _ref$keys === void 0 ? (useHook === null || useHook === void 0 ? void 0 : useHook.__keys) || [] : _ref$keys, _ref$useCreateElement = _ref.useCreateElement, useCreateElement$1 = _ref$useCreateElement === void 0 ? useCreateElement : _ref$useCreateElement; var Comp = function Comp(_ref2, ref) { var _ref2$as = _ref2.as, as = _ref2$as === void 0 ? type : _ref2$as, props = _rollupPluginBabelHelpers_0c84a174_objectWithoutPropertiesLoose(_ref2, ["as"]); if (useHook) { var _as$render; var _splitProps = splitProps(props, keys), _options = _splitProps[0], htmlProps = _splitProps[1]; var _useHook = useHook(_options, _rollupPluginBabelHelpers_0c84a174_objectSpread2({ ref: ref }, htmlProps)), wrapElement = _useHook.wrapElement, elementProps = _rollupPluginBabelHelpers_0c84a174_objectWithoutPropertiesLoose(_useHook, ["wrapElement"]); // @ts-ignore var asKeys = ((_as$render = as.render) === null || _as$render === void 0 ? void 0 : _as$render.__keys) || as.__keys; var asOptions = asKeys && splitProps(props, asKeys)[0]; var allProps = asOptions ? _rollupPluginBabelHelpers_0c84a174_objectSpread2(_rollupPluginBabelHelpers_0c84a174_objectSpread2({}, elementProps), asOptions) : elementProps; var _element = useCreateElement$1(as, allProps); if (wrapElement) { return wrapElement(_element); } return _element; } return useCreateElement$1(as, _rollupPluginBabelHelpers_0c84a174_objectSpread2({ ref: ref }, props)); }; if (false) {} Comp = createComponent_forwardRef(Comp); if (shouldMemo) { Comp = memo(Comp, propsAreEqual && normalizePropsAreEqual(propsAreEqual)); } Comp.__keys = keys; Comp.unstable_propsAreEqual = normalizePropsAreEqual(propsAreEqual || shallowEqual); return Comp; } ;// CONCATENATED MODULE: ./node_modules/reakit-system/es/useToken.js /** * React custom hook that returns the value of any token defined in the * SystemContext. It's mainly used internally in [`useOptions`](#useoptions) * and [`useProps`](#useprops). * * @example * import { SystemProvider, useToken } from "reakit-system"; * * const system = { * token: "value", * }; * * function Component(props) { * const token = useToken("token", "default value"); * return
{token}
; * } * * function App() { * return ( * * * * ); * } */ function useToken(token, defaultValue) { (0,external_React_.useDebugValue)(token); var context = (0,external_React_.useContext)(SystemContext); return context[token] != null ? context[token] : defaultValue; } ;// CONCATENATED MODULE: ./node_modules/reakit-system/es/useProps.js /** * React custom hook that returns the props returned by a given * `use${name}Props` in the SystemContext. * * @example * import { SystemProvider, useProps } from "reakit-system"; * * const system = { * useAProps(options, htmlProps) { * return { * ...htmlProps, * href: options.url, * }; * }, * }; * * function A({ url, ...htmlProps }) { * const props = useProps("A", { url }, htmlProps); * return ; * } * * function App() { * return ( * * It will convert url into href in useAProps * * ); * } */ function useProps(name, options, htmlProps) { if (options === void 0) { options = {}; } if (htmlProps === void 0) { htmlProps = {}; } var hookName = "use" + name + "Props"; (0,external_React_.useDebugValue)(hookName); var useHook = useToken(hookName); if (useHook) { return useHook(options, htmlProps); } return htmlProps; } ;// CONCATENATED MODULE: ./node_modules/reakit-system/es/useOptions.js /** * React custom hook that returns the options returned by a given * `use${name}Options` in the SystemContext. * * @example * import React from "react"; * import { SystemProvider, useOptions } from "reakit-system"; * * const system = { * useAOptions(options, htmlProps) { * return { * ...options, * url: htmlProps.href, * }; * }, * }; * * function A({ url, ...htmlProps }) { * const options = useOptions("A", { url }, htmlProps); * return ; * } * * function App() { * return ( * * * It will convert href into url in useAOptions and then url into href in A * * * ); * } */ function useOptions(name, options, htmlProps) { if (options === void 0) { options = {}; } if (htmlProps === void 0) { htmlProps = {}; } var hookName = "use" + name + "Options"; (0,external_React_.useDebugValue)(hookName); var useHook = useToken(hookName); if (useHook) { return _rollupPluginBabelHelpers_0c84a174_objectSpread2(_rollupPluginBabelHelpers_0c84a174_objectSpread2({}, options), useHook(options, htmlProps)); } return options; } ;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/toArray.js /** * Transforms `arg` into an array if it's not already. * * @example * import { toArray } from "reakit-utils"; * * toArray("a"); // ["a"] * toArray(["a"]); // ["a"] */ function toArray(arg) { if (Array.isArray(arg)) { return arg; } return typeof arg !== "undefined" ? [arg] : []; } ;// CONCATENATED MODULE: ./node_modules/reakit-system/es/createHook.js /** * Creates a React custom hook that will return component props. * * @example * import { createHook } from "reakit-system"; * * const useA = createHook({ * name: "A", * keys: ["url"], // custom props/options keys * useProps(options, htmlProps) { * return { * ...htmlProps, * href: options.url, * }; * }, * }); * * function A({ url, ...htmlProps }) { * const props = useA({ url }, htmlProps); * return ; * } * * @param options */ function createHook(options) { var _options$useState, _composedHooks$; var composedHooks = toArray(options.compose); var __useOptions = function __useOptions(hookOptions, htmlProps) { // Call the current hook's useOptions first if (options.useOptions) { hookOptions = options.useOptions(hookOptions, htmlProps); } // If there's name, call useOptions from the system context if (options.name) { hookOptions = useOptions(options.name, hookOptions, htmlProps); } // Run composed hooks useOptions if (options.compose) { for (var _iterator = _rollupPluginBabelHelpers_0c84a174_createForOfIteratorHelperLoose(composedHooks), _step; !(_step = _iterator()).done;) { var hook = _step.value; hookOptions = hook.__useOptions(hookOptions, htmlProps); } } return hookOptions; }; var useHook = function useHook(hookOptions, htmlProps, unstable_ignoreUseOptions) { if (hookOptions === void 0) { hookOptions = {}; } if (htmlProps === void 0) { htmlProps = {}; } if (unstable_ignoreUseOptions === void 0) { unstable_ignoreUseOptions = false; } // This won't execute when useHook was called from within another useHook if (!unstable_ignoreUseOptions) { hookOptions = __useOptions(hookOptions, htmlProps); } // Call the current hook's useProps if (options.useProps) { htmlProps = options.useProps(hookOptions, htmlProps); } // If there's name, call useProps from the system context if (options.name) { htmlProps = useProps(options.name, hookOptions, htmlProps); } if (options.compose) { if (options.useComposeOptions) { hookOptions = options.useComposeOptions(hookOptions, htmlProps); } if (options.useComposeProps) { htmlProps = options.useComposeProps(hookOptions, htmlProps); } else { for (var _iterator2 = _rollupPluginBabelHelpers_0c84a174_createForOfIteratorHelperLoose(composedHooks), _step2; !(_step2 = _iterator2()).done;) { var hook = _step2.value; htmlProps = hook(hookOptions, htmlProps, true); } } } // Remove undefined values from htmlProps var finalHTMLProps = {}; var definedHTMLProps = htmlProps || {}; for (var prop in definedHTMLProps) { if (definedHTMLProps[prop] !== undefined) { finalHTMLProps[prop] = definedHTMLProps[prop]; } } return finalHTMLProps; }; useHook.__useOptions = __useOptions; var composedKeys = composedHooks.reduce(function (keys, hook) { keys.push.apply(keys, hook.__keys || []); return keys; }, []); // It's used by createComponent to split option props (keys) and html props useHook.__keys = [].concat(composedKeys, ((_options$useState = options.useState) === null || _options$useState === void 0 ? void 0 : _options$useState.__keys) || [], options.keys || []); useHook.unstable_propsAreEqual = options.propsAreEqual || ((_composedHooks$ = composedHooks[0]) === null || _composedHooks$ === void 0 ? void 0 : _composedHooks$.unstable_propsAreEqual) || shallowEqual; if (false) {} return useHook; } ;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/useForkRef.js // https://github.com/mui-org/material-ui/blob/2bcc874cf07b81202968f769cb9c2398c7c11311/packages/material-ui/src/utils/useForkRef.js function setRef(ref, value) { if (value === void 0) { value = null; } if (!ref) return; if (typeof ref === "function") { ref(value); } else { ref.current = value; } } /** * Merges up to two React Refs into a single memoized function React Ref so you * can pass it to an element. * * @example * import React from "react"; * import { useForkRef } from "reakit-utils"; * * const Component = React.forwardRef((props, ref) => { * const internalRef = React.useRef(); * return
; * }); */ function useForkRef(refA, refB) { return (0,external_React_.useMemo)(function () { if (refA == null && refB == null) { return null; } return function (value) { setRef(refA, value); setRef(refB, value); }; }, [refA, refB]); } ;// CONCATENATED MODULE: ./node_modules/reakit-warning/es/useWarning.js function isRefObject(ref) { return isObject(ref) && "current" in ref; } /** * Logs `messages` to the console using `console.warn` based on a `condition`. * This should be used inside components. */ function useWarning(condition) { for (var _len = arguments.length, messages = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { messages[_key - 1] = arguments[_key]; } if (false) {} } ;// CONCATENATED MODULE: ./node_modules/reakit-warning/es/index.js ;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/getDocument.js /** * Returns `element.ownerDocument || document`. */ function getDocument_getDocument(element) { return element ? element.ownerDocument || element : document; } ;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/getWindow.js // Thanks to Fluent UI for doing the [research on IE11 memory leak](https://github.com/microsoft/fluentui/pull/9010#issuecomment-490768427) var _window; // Note: Accessing "window" in IE11 is somewhat expensive, and calling "typeof window" // hits a memory leak, whereas aliasing it and calling "typeof _window" does not. // Caching the window value at the file scope lets us minimize the impact. try { _window = window; } catch (e) { /* no-op */ } /** * Returns `element.ownerDocument.defaultView || window`. */ function getWindow(element) { if (!element) { return _window; } return getDocument_getDocument(element).defaultView || _window; } ;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/canUseDOM.js function checkIsBrowser() { var _window = getWindow(); return Boolean(typeof _window !== "undefined" && _window.document && _window.document.createElement); } /** * It's `true` if it is running in a browser environment or `false` if it is not (SSR). * * @example * import { canUseDOM } from "reakit-utils"; * * const title = canUseDOM ? document.title : ""; */ var canUseDOM = checkIsBrowser(); ;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/useIsomorphicEffect.js /** * `React.useLayoutEffect` that fallbacks to `React.useEffect` on server side * rendering. */ var useIsomorphicEffect = !canUseDOM ? external_React_.useEffect : external_React_.useLayoutEffect; ;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/useLiveRef.js /** * A `React.Ref` that keeps track of the passed `value`. */ function useLiveRef(value) { var ref = (0,external_React_.useRef)(value); useIsomorphicEffect(function () { ref.current = value; }); return ref; } ;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/isSelfTarget.js /** * Returns `true` if `event.target` and `event.currentTarget` are the same. */ function isSelfTarget(event) { return event.target === event.currentTarget; } ;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/getActiveElement.js /** * Returns `element.ownerDocument.activeElement`. */ function getActiveElement_getActiveElement(element) { var _getDocument = getDocument_getDocument(element), activeElement = _getDocument.activeElement; if (!(activeElement !== null && activeElement !== void 0 && activeElement.nodeName)) { // In IE11, activeElement might be an empty object if we're interacting // with elements inside of an iframe. return null; } return activeElement; } ;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/contains.js /** * Similar to `Element.prototype.contains`, but a little bit faster when * `element` is the same as `child`. * * @example * import { contains } from "reakit-utils"; * * contains(document.getElementById("parent"), document.getElementById("child")); */ function contains(parent, child) { return parent === child || parent.contains(child); } ;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/hasFocusWithin.js /** * Checks if `element` has focus within. Elements that are referenced by * `aria-activedescendant` are also considered. * * @example * import { hasFocusWithin } from "reakit-utils"; * * hasFocusWithin(document.getElementById("id")); */ function hasFocusWithin(element) { var activeElement = getActiveElement_getActiveElement(element); if (!activeElement) return false; if (contains(element, activeElement)) return true; var activeDescendant = activeElement.getAttribute("aria-activedescendant"); if (!activeDescendant) return false; if (activeDescendant === element.id) return true; return !!element.querySelector("#" + activeDescendant); } ;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/isPortalEvent.js /** * Returns `true` if `event` has been fired within a React Portal element. */ function isPortalEvent(event) { return !contains(event.currentTarget, event.target); } ;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/isButton.js var buttonInputTypes = ["button", "color", "file", "image", "reset", "submit"]; /** * Checks whether `element` is a native HTML button element. * * @example * import { isButton } from "reakit-utils"; * * isButton(document.querySelector("button")); // true * isButton(document.querySelector("input[type='button']")); // true * isButton(document.querySelector("div")); // false * isButton(document.querySelector("input[type='text']")); // false * isButton(document.querySelector("div[role='button']")); // false * * @returns {boolean} */ function isButton(element) { if (element.tagName === "BUTTON") return true; if (element.tagName === "INPUT") { var input = element; return buttonInputTypes.indexOf(input.type) !== -1; } return false; } ;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/dom.js /** * Checks if a given string exists in the user agent string. */ function isUA(string) { if (!canUseDOM) return false; return window.navigator.userAgent.indexOf(string) !== -1; } ;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/matches.js /** * Ponyfill for `Element.prototype.matches` * * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/matches */ function matches(element, selectors) { if ("matches" in element) { return element.matches(selectors); } if ("msMatchesSelector" in element) { return element.msMatchesSelector(selectors); } return element.webkitMatchesSelector(selectors); } ;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/tabbable.js /** @module tabbable */ var selector = "input:not([type='hidden']):not([disabled]), select:not([disabled]), " + "textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], " + "iframe, object, embed, area[href], audio[controls], video[controls], " + "[contenteditable]:not([contenteditable='false'])"; function isVisible(element) { var htmlElement = element; return htmlElement.offsetWidth > 0 || htmlElement.offsetHeight > 0 || element.getClientRects().length > 0; } function hasNegativeTabIndex(element) { var tabIndex = parseInt(element.getAttribute("tabindex") || "0", 10); return tabIndex < 0; } /** * Checks whether `element` is focusable or not. * * @memberof tabbable * * @example * import { isFocusable } from "reakit-utils"; * * isFocusable(document.querySelector("input")); // true * isFocusable(document.querySelector("input[tabindex='-1']")); // true * isFocusable(document.querySelector("input[hidden]")); // false * isFocusable(document.querySelector("input:disabled")); // false */ function isFocusable(element) { return matches(element, selector) && isVisible(element); } /** * Checks whether `element` is tabbable or not. * * @memberof tabbable * * @example * import { isTabbable } from "reakit-utils"; * * isTabbable(document.querySelector("input")); // true * isTabbable(document.querySelector("input[tabindex='-1']")); // false * isTabbable(document.querySelector("input[hidden]")); // false * isTabbable(document.querySelector("input:disabled")); // false */ function isTabbable(element) { return isFocusable(element) && !hasNegativeTabIndex(element); } /** * Returns all the focusable elements in `container`. * * @memberof tabbable * * @param {Element} container * * @returns {Element[]} */ function getAllFocusableIn(container) { var allFocusable = Array.from(container.querySelectorAll(selector)); allFocusable.unshift(container); return allFocusable.filter(isFocusable); } /** * Returns the first focusable element in `container`. * * @memberof tabbable * * @param {Element} container * * @returns {Element|null} */ function getFirstFocusableIn(container) { var _getAllFocusableIn = getAllFocusableIn(container), first = _getAllFocusableIn[0]; return first || null; } /** * Returns all the tabbable elements in `container`, including the container * itself. * * @memberof tabbable * * @param {Element} container * @param fallbackToFocusable If `true`, it'll return focusable elements if there are no tabbable ones. * * @returns {Element[]} */ function getAllTabbableIn(container, fallbackToFocusable) { var allFocusable = Array.from(container.querySelectorAll(selector)); var allTabbable = allFocusable.filter(isTabbable); if (isTabbable(container)) { allTabbable.unshift(container); } if (!allTabbable.length && fallbackToFocusable) { return allFocusable; } return allTabbable; } /** * Returns the first tabbable element in `container`, including the container * itself if it's tabbable. * * @memberof tabbable * * @param {Element} container * @param fallbackToFocusable If `true`, it'll return the first focusable element if there are no tabbable ones. * * @returns {Element|null} */ function getFirstTabbableIn(container, fallbackToFocusable) { var _getAllTabbableIn = getAllTabbableIn(container, fallbackToFocusable), first = _getAllTabbableIn[0]; return first || null; } /** * Returns the last tabbable element in `container`, including the container * itself if it's tabbable. * * @memberof tabbable * * @param {Element} container * @param fallbackToFocusable If `true`, it'll return the last focusable element if there are no tabbable ones. * * @returns {Element|null} */ function getLastTabbableIn(container, fallbackToFocusable) { var allTabbable = getAllTabbableIn(container, fallbackToFocusable); return allTabbable[allTabbable.length - 1] || null; } /** * Returns the next tabbable element in `container`. * * @memberof tabbable * * @param {Element} container * @param fallbackToFocusable If `true`, it'll return the next focusable element if there are no tabbable ones. * * @returns {Element|null} */ function getNextTabbableIn(container, fallbackToFocusable) { var activeElement = getActiveElement(container); var allFocusable = getAllFocusableIn(container); var index = allFocusable.indexOf(activeElement); var slice = allFocusable.slice(index + 1); return slice.find(isTabbable) || allFocusable.find(isTabbable) || (fallbackToFocusable ? slice[0] : null); } /** * Returns the previous tabbable element in `container`. * * @memberof tabbable * * @param {Element} container * @param fallbackToFocusable If `true`, it'll return the previous focusable element if there are no tabbable ones. * * @returns {Element|null} */ function getPreviousTabbableIn(container, fallbackToFocusable) { var activeElement = getActiveElement(container); var allFocusable = getAllFocusableIn(container).reverse(); var index = allFocusable.indexOf(activeElement); var slice = allFocusable.slice(index + 1); return slice.find(isTabbable) || allFocusable.find(isTabbable) || (fallbackToFocusable ? slice[0] : null); } /** * Returns the closest focusable element. * * @memberof tabbable * * @param {Element} container * * @returns {Element|null} */ function getClosestFocusable(element) { while (element && !isFocusable(element)) { element = closest(element, selector); } return element; } ;// CONCATENATED MODULE: ./node_modules/reakit/es/Role/Role.js // Automatically generated var ROLE_KEYS = ["unstable_system"]; var useRole = createHook({ name: "Role", keys: ROLE_KEYS, propsAreEqual: function propsAreEqual(prev, next) { var prevSystem = prev.unstable_system, prevProps = _objectWithoutPropertiesLoose(prev, ["unstable_system"]); var nextSystem = next.unstable_system, nextProps = _objectWithoutPropertiesLoose(next, ["unstable_system"]); if (prevSystem !== nextSystem && !shallowEqual(prevSystem, nextSystem)) { return false; } return shallowEqual(prevProps, nextProps); } }); var Role = createComponent({ as: "div", useHook: useRole }); ;// CONCATENATED MODULE: ./node_modules/reakit/es/Tabbable/Tabbable.js // Automatically generated var TABBABLE_KEYS = ["disabled", "focusable"]; var isSafariOrFirefoxOnMac = isUA("Mac") && !isUA("Chrome") && (isUA("Safari") || isUA("Firefox")); function focusIfNeeded(element) { if (!hasFocusWithin(element) && isFocusable(element)) { element.focus(); } } function isNativeTabbable(element) { return ["BUTTON", "INPUT", "SELECT", "TEXTAREA", "A"].includes(element.tagName); } function supportsDisabledAttribute(element) { return ["BUTTON", "INPUT", "SELECT", "TEXTAREA"].includes(element.tagName); } function getTabIndex(trulyDisabled, nativeTabbable, supportsDisabled, htmlTabIndex) { if (trulyDisabled) { if (nativeTabbable && !supportsDisabled) { // Anchor, audio and video tags don't support the `disabled` attribute. // We must pass tabIndex={-1} so they don't receive focus on tab. return -1; } // Elements that support the `disabled` attribute don't need tabIndex. return undefined; } if (nativeTabbable) { // If the element is enabled and it's natively tabbable, we don't need to // specify a tabIndex attribute unless it's explicitly set by the user. return htmlTabIndex; } // If the element is enabled and is not natively tabbable, we have to // fallback tabIndex={0}. return htmlTabIndex || 0; } function useDisableEvent(htmlEventRef, disabled) { return (0,external_React_.useCallback)(function (event) { var _htmlEventRef$current; (_htmlEventRef$current = htmlEventRef.current) === null || _htmlEventRef$current === void 0 ? void 0 : _htmlEventRef$current.call(htmlEventRef, event); if (event.defaultPrevented) return; if (disabled) { event.stopPropagation(); event.preventDefault(); } }, [htmlEventRef, disabled]); } var useTabbable = createHook({ name: "Tabbable", compose: useRole, keys: TABBABLE_KEYS, useOptions: function useOptions(options, _ref) { var disabled = _ref.disabled; return _objectSpread2({ disabled: disabled }, options); }, useProps: function useProps(options, _ref2) { var htmlRef = _ref2.ref, htmlTabIndex = _ref2.tabIndex, htmlOnClickCapture = _ref2.onClickCapture, htmlOnMouseDownCapture = _ref2.onMouseDownCapture, htmlOnMouseDown = _ref2.onMouseDown, htmlOnKeyPressCapture = _ref2.onKeyPressCapture, htmlStyle = _ref2.style, htmlProps = _objectWithoutPropertiesLoose(_ref2, ["ref", "tabIndex", "onClickCapture", "onMouseDownCapture", "onMouseDown", "onKeyPressCapture", "style"]); var ref = (0,external_React_.useRef)(null); var onClickCaptureRef = useLiveRef(htmlOnClickCapture); var onMouseDownCaptureRef = useLiveRef(htmlOnMouseDownCapture); var onMouseDownRef = useLiveRef(htmlOnMouseDown); var onKeyPressCaptureRef = useLiveRef(htmlOnKeyPressCapture); var trulyDisabled = !!options.disabled && !options.focusable; var _React$useState = (0,external_React_.useState)(true), nativeTabbable = _React$useState[0], setNativeTabbable = _React$useState[1]; var _React$useState2 = (0,external_React_.useState)(true), supportsDisabled = _React$useState2[0], setSupportsDisabled = _React$useState2[1]; var style = options.disabled ? _objectSpread2({ pointerEvents: "none" }, htmlStyle) : htmlStyle; useIsomorphicEffect(function () { var tabbable = ref.current; if (!tabbable) { false ? 0 : void 0; return; } if (!isNativeTabbable(tabbable)) { setNativeTabbable(false); } if (!supportsDisabledAttribute(tabbable)) { setSupportsDisabled(false); } }, []); var onClickCapture = useDisableEvent(onClickCaptureRef, options.disabled); var onMouseDownCapture = useDisableEvent(onMouseDownCaptureRef, options.disabled); var onKeyPressCapture = useDisableEvent(onKeyPressCaptureRef, options.disabled); var onMouseDown = (0,external_React_.useCallback)(function (event) { var _onMouseDownRef$curre; (_onMouseDownRef$curre = onMouseDownRef.current) === null || _onMouseDownRef$curre === void 0 ? void 0 : _onMouseDownRef$curre.call(onMouseDownRef, event); var element = event.currentTarget; if (event.defaultPrevented) return; // Safari and Firefox on MacOS don't focus on buttons on mouse down // like other browsers/platforms. Instead, they focus on the closest // focusable ancestor element, which is ultimately the body element. So // we make sure to give focus to the tabbable element on mouse down so // it works consistently across browsers. if (!isSafariOrFirefoxOnMac) return; if (isPortalEvent(event)) return; if (!isButton(element)) return; // We can't focus right away after on mouse down, otherwise it would // prevent drag events from happening. So we schedule the focus to the // next animation frame. var raf = requestAnimationFrame(function () { element.removeEventListener("mouseup", focusImmediately, true); focusIfNeeded(element); }); // If mouseUp happens before the next animation frame (which is common // on touch screens or by just tapping the trackpad on MacBook's), we // cancel the animation frame and immediately focus on the element. var focusImmediately = function focusImmediately() { cancelAnimationFrame(raf); focusIfNeeded(element); }; // By listening to the event in the capture phase, we make sure the // focus event is fired before the onMouseUp and onMouseUpCapture React // events, which is aligned with the default browser behavior. element.addEventListener("mouseup", focusImmediately, { once: true, capture: true }); }, []); return _objectSpread2({ ref: useForkRef(ref, htmlRef), style: style, tabIndex: getTabIndex(trulyDisabled, nativeTabbable, supportsDisabled, htmlTabIndex), disabled: trulyDisabled && supportsDisabled ? true : undefined, "aria-disabled": options.disabled ? true : undefined, onClickCapture: onClickCapture, onMouseDownCapture: onMouseDownCapture, onMouseDown: onMouseDown, onKeyPressCapture: onKeyPressCapture }, htmlProps); } }); var Tabbable = createComponent({ as: "div", useHook: useTabbable }); ;// CONCATENATED MODULE: ./node_modules/reakit/es/Clickable/Clickable.js // Automatically generated var CLICKABLE_KEYS = ["unstable_clickOnEnter", "unstable_clickOnSpace"]; function isNativeClick(event) { var element = event.currentTarget; if (!event.isTrusted) return false; // istanbul ignore next: can't test trusted events yet return isButton(element) || element.tagName === "INPUT" || element.tagName === "TEXTAREA" || element.tagName === "A" || element.tagName === "SELECT"; } var useClickable = createHook({ name: "Clickable", compose: useTabbable, keys: CLICKABLE_KEYS, useOptions: function useOptions(_ref) { var _ref$unstable_clickOn = _ref.unstable_clickOnEnter, unstable_clickOnEnter = _ref$unstable_clickOn === void 0 ? true : _ref$unstable_clickOn, _ref$unstable_clickOn2 = _ref.unstable_clickOnSpace, unstable_clickOnSpace = _ref$unstable_clickOn2 === void 0 ? true : _ref$unstable_clickOn2, options = _objectWithoutPropertiesLoose(_ref, ["unstable_clickOnEnter", "unstable_clickOnSpace"]); return _objectSpread2({ unstable_clickOnEnter: unstable_clickOnEnter, unstable_clickOnSpace: unstable_clickOnSpace }, options); }, useProps: function useProps(options, _ref2) { var htmlOnKeyDown = _ref2.onKeyDown, htmlOnKeyUp = _ref2.onKeyUp, htmlProps = _objectWithoutPropertiesLoose(_ref2, ["onKeyDown", "onKeyUp"]); var _React$useState = (0,external_React_.useState)(false), active = _React$useState[0], setActive = _React$useState[1]; var onKeyDownRef = useLiveRef(htmlOnKeyDown); var onKeyUpRef = useLiveRef(htmlOnKeyUp); var onKeyDown = (0,external_React_.useCallback)(function (event) { var _onKeyDownRef$current; (_onKeyDownRef$current = onKeyDownRef.current) === null || _onKeyDownRef$current === void 0 ? void 0 : _onKeyDownRef$current.call(onKeyDownRef, event); if (event.defaultPrevented) return; if (options.disabled) return; if (event.metaKey) return; if (!isSelfTarget(event)) return; var isEnter = options.unstable_clickOnEnter && event.key === "Enter"; var isSpace = options.unstable_clickOnSpace && event.key === " "; if (isEnter || isSpace) { if (isNativeClick(event)) return; event.preventDefault(); if (isEnter) { event.currentTarget.click(); } else if (isSpace) { setActive(true); } } }, [options.disabled, options.unstable_clickOnEnter, options.unstable_clickOnSpace]); var onKeyUp = (0,external_React_.useCallback)(function (event) { var _onKeyUpRef$current; (_onKeyUpRef$current = onKeyUpRef.current) === null || _onKeyUpRef$current === void 0 ? void 0 : _onKeyUpRef$current.call(onKeyUpRef, event); if (event.defaultPrevented) return; if (options.disabled) return; if (event.metaKey) return; var isSpace = options.unstable_clickOnSpace && event.key === " "; if (active && isSpace) { setActive(false); event.currentTarget.click(); } }, [options.disabled, options.unstable_clickOnSpace, active]); return _objectSpread2({ "data-active": active || undefined, onKeyDown: onKeyDown, onKeyUp: onKeyUp }, htmlProps); } }); var Clickable = createComponent({ as: "button", memo: true, useHook: useClickable }); ;// CONCATENATED MODULE: ./node_modules/reakit/es/getCurrentId-5aa9849e.js function findFirstEnabledItem(items, excludeId) { if (excludeId) { return items.find(function (item) { return !item.disabled && item.id !== excludeId; }); } return items.find(function (item) { return !item.disabled; }); } function getCurrentId(options, passedId) { var _findFirstEnabledItem; if (passedId || passedId === null) { return passedId; } if (options.currentId || options.currentId === null) { return options.currentId; } return (_findFirstEnabledItem = findFirstEnabledItem(options.items || [])) === null || _findFirstEnabledItem === void 0 ? void 0 : _findFirstEnabledItem.id; } ;// CONCATENATED MODULE: ./node_modules/reakit/es/__keys-6742f591.js // Automatically generated var COMPOSITE_STATE_KEYS = ["baseId", "unstable_idCountRef", "setBaseId", "unstable_virtual", "rtl", "orientation", "items", "groups", "currentId", "loop", "wrap", "shift", "unstable_moves", "unstable_hasActiveWidget", "unstable_includesBaseElement", "registerItem", "unregisterItem", "registerGroup", "unregisterGroup", "move", "next", "previous", "up", "down", "first", "last", "sort", "unstable_setVirtual", "setRTL", "setOrientation", "setCurrentId", "setLoop", "setWrap", "setShift", "reset", "unstable_setIncludesBaseElement", "unstable_setHasActiveWidget"]; var COMPOSITE_KEYS = COMPOSITE_STATE_KEYS; var COMPOSITE_GROUP_KEYS = COMPOSITE_KEYS; var COMPOSITE_ITEM_KEYS = COMPOSITE_GROUP_KEYS; var COMPOSITE_ITEM_WIDGET_KEYS = (/* unused pure expression or super */ null && (COMPOSITE_ITEM_KEYS)); ;// CONCATENATED MODULE: ./node_modules/reakit/es/userFocus-e16425e3.js function userFocus(element) { element.userFocus = true; element.focus(); element.userFocus = false; } function hasUserFocus(element) { return !!element.userFocus; } function setUserFocus(element, value) { element.userFocus = value; } ;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/isTextField.js /** * Check whether the given element is a text field, where text field is defined * by the ability to select within the input, or that it is contenteditable. * * @example * import { isTextField } from "reakit-utils"; * * isTextField(document.querySelector("div")); // false * isTextField(document.querySelector("input")); // true * isTextField(document.querySelector("input[type='button']")); // false * isTextField(document.querySelector("textarea")); // true * isTextField(document.querySelector("div[contenteditable='true']")); // true */ function isTextField_isTextField(element) { try { var isTextInput = element instanceof HTMLInputElement && element.selectionStart !== null; var isTextArea = element.tagName === "TEXTAREA"; var isContentEditable = element.contentEditable === "true"; return isTextInput || isTextArea || isContentEditable || false; } catch (error) { // Safari throws an exception when trying to get `selectionStart` // on non-text elements (which, understandably, don't // have the text selection API). We catch this via a try/catch // block, as opposed to a more explicit check of the element's // input types, because of Safari's non-standard behavior. This // also means we don't have to worry about the list of input // types that support `selectionStart` changing as the HTML spec // evolves over time. return false; } } ;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/hasFocus.js /** * Checks if `element` has focus. Elements that are referenced by * `aria-activedescendant` are also considered. * * @example * import { hasFocus } from "reakit-utils"; * * hasFocus(document.getElementById("id")); */ function hasFocus(element) { var activeElement = getActiveElement_getActiveElement(element); if (!activeElement) return false; if (activeElement === element) return true; var activeDescendant = activeElement.getAttribute("aria-activedescendant"); if (!activeDescendant) return false; return activeDescendant === element.id; } ;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/ensureFocus.js /** * Ensures `element` will receive focus if it's not already. * * @example * import { ensureFocus } from "reakit-utils"; * * ensureFocus(document.activeElement); // does nothing * * const element = document.querySelector("input"); * * ensureFocus(element); // focuses element * ensureFocus(element, { preventScroll: true }); // focuses element preventing scroll jump * * function isActive(el) { * return el.dataset.active === "true"; * } * * ensureFocus(document.querySelector("[data-active='true']"), { isActive }); // does nothing * * @returns {number} `requestAnimationFrame` call ID so it can be passed to `cancelAnimationFrame` if needed. */ function ensureFocus(element, _temp) { var _ref = _temp === void 0 ? {} : _temp, preventScroll = _ref.preventScroll, _ref$isActive = _ref.isActive, isActive = _ref$isActive === void 0 ? hasFocus : _ref$isActive; if (isActive(element)) return -1; element.focus({ preventScroll: preventScroll }); if (isActive(element)) return -1; return requestAnimationFrame(function () { element.focus({ preventScroll: preventScroll }); }); } ;// CONCATENATED MODULE: ./node_modules/reakit/es/Id/IdProvider.js var defaultPrefix = "id"; function generateRandomString(prefix) { if (prefix === void 0) { prefix = defaultPrefix; } return "" + (prefix ? prefix + "-" : "") + Math.random().toString(32).substr(2, 6); } var unstable_IdContext = /*#__PURE__*/(0,external_React_.createContext)(generateRandomString); function unstable_IdProvider(_ref) { var children = _ref.children, _ref$prefix = _ref.prefix, prefix = _ref$prefix === void 0 ? defaultPrefix : _ref$prefix; var count = useRef(0); var generateId = useCallback(function (localPrefix) { if (localPrefix === void 0) { localPrefix = prefix; } return "" + (localPrefix ? localPrefix + "-" : "") + ++count.current; }, [prefix]); return /*#__PURE__*/createElement(unstable_IdContext.Provider, { value: generateId }, children); } ;// CONCATENATED MODULE: ./node_modules/reakit/es/Id/Id.js // Automatically generated var ID_STATE_KEYS = ["baseId", "unstable_idCountRef", "setBaseId"]; var ID_KEYS = [].concat(ID_STATE_KEYS, ["id"]); var unstable_useId = createHook({ keys: ID_KEYS, useOptions: function useOptions(options, htmlProps) { var generateId = (0,external_React_.useContext)(unstable_IdContext); var _React$useState = (0,external_React_.useState)(function () { // This comes from useIdState if (options.unstable_idCountRef) { options.unstable_idCountRef.current += 1; return "-" + options.unstable_idCountRef.current; } // If there's no useIdState, we check if `baseId` was passed (as a prop, // not from useIdState). if (options.baseId) { return "-" + generateId(""); } return ""; }), suffix = _React$useState[0]; // `baseId` will be the prop passed directly as a prop or via useIdState. // If there's neither, then it'll fallback to Context's generateId. // This generateId can result in a sequential ID (if there's a Provider) // or a random string (without Provider). var baseId = (0,external_React_.useMemo)(function () { return options.baseId || generateId(); }, [options.baseId, generateId]); var id = htmlProps.id || options.id || "" + baseId + suffix; return _objectSpread2(_objectSpread2({}, options), {}, { id: id }); }, useProps: function useProps(options, htmlProps) { return _objectSpread2({ id: options.id }, htmlProps); } }); var unstable_Id = createComponent({ as: "div", useHook: unstable_useId }); ;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/createEvent.js /** * Creates an `Event` in a way that also works on IE 11. * * @example * import { createEvent } from "reakit-utils"; * * const el = document.getElementById("id"); * el.dispatchEvent(createEvent(el, "blur", { bubbles: false })); */ function createEvent(element, type, eventInit) { if (typeof Event === "function") { return new Event(type, eventInit); } // IE 11 doesn't support Event constructors var event = getDocument_getDocument(element).createEvent("Event"); event.initEvent(type, eventInit === null || eventInit === void 0 ? void 0 : eventInit.bubbles, eventInit === null || eventInit === void 0 ? void 0 : eventInit.cancelable); return event; } ;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/fireEvent.js /** * Creates and dispatches `Event` in a way that also works on IE 11. * * @example * import { fireEvent } from "reakit-utils"; * * fireEvent(document.getElementById("id"), "blur", { * bubbles: true, * cancelable: true, * }); */ function fireEvent(element, type, eventInit) { return element.dispatchEvent(createEvent(element, type, eventInit)); } ;// CONCATENATED MODULE: ./node_modules/reakit/es/setTextFieldValue-0a221f4e.js function setTextFieldValue(element, value) { if (element instanceof HTMLInputElement || element instanceof HTMLTextAreaElement) { var _Object$getOwnPropert; var proto = Object.getPrototypeOf(element); var setValue = (_Object$getOwnPropert = Object.getOwnPropertyDescriptor(proto, "value")) === null || _Object$getOwnPropert === void 0 ? void 0 : _Object$getOwnPropert.set; if (setValue) { setValue.call(element, value); fireEvent(element, "input", { bubbles: true }); } } } ;// CONCATENATED MODULE: ./node_modules/reakit/es/Composite/CompositeItem.js function getWidget(itemElement) { return itemElement.querySelector("[data-composite-item-widget]"); } function useItem(options) { return (0,external_React_.useMemo)(function () { var _options$items; return (_options$items = options.items) === null || _options$items === void 0 ? void 0 : _options$items.find(function (item) { return options.id && item.id === options.id; }); }, [options.items, options.id]); } function targetIsAnotherItem(event, items) { if (isSelfTarget(event)) return false; for (var _iterator = _createForOfIteratorHelperLoose(items), _step; !(_step = _iterator()).done;) { var item = _step.value; if (item.ref.current === event.target) { return true; } } return false; } var useCompositeItem = createHook({ name: "CompositeItem", compose: [useClickable, unstable_useId], keys: COMPOSITE_ITEM_KEYS, propsAreEqual: function propsAreEqual(prev, next) { if (!next.id || prev.id !== next.id) { return useClickable.unstable_propsAreEqual(prev, next); } var prevCurrentId = prev.currentId, prevMoves = prev.unstable_moves, prevProps = _objectWithoutPropertiesLoose(prev, ["currentId", "unstable_moves"]); var nextCurrentId = next.currentId, nextMoves = next.unstable_moves, nextProps = _objectWithoutPropertiesLoose(next, ["currentId", "unstable_moves"]); if (nextCurrentId !== prevCurrentId) { if (next.id === nextCurrentId || next.id === prevCurrentId) { return false; } } else if (prevMoves !== nextMoves) { return false; } return useClickable.unstable_propsAreEqual(prevProps, nextProps); }, useOptions: function useOptions(options) { return _objectSpread2(_objectSpread2({}, options), {}, { id: options.id, currentId: getCurrentId(options), unstable_clickOnSpace: options.unstable_hasActiveWidget ? false : options.unstable_clickOnSpace }); }, useProps: function useProps(options, _ref) { var _options$items2; var htmlRef = _ref.ref, _ref$tabIndex = _ref.tabIndex, htmlTabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex, htmlOnMouseDown = _ref.onMouseDown, htmlOnFocus = _ref.onFocus, htmlOnBlurCapture = _ref.onBlurCapture, htmlOnKeyDown = _ref.onKeyDown, htmlOnClick = _ref.onClick, htmlProps = _objectWithoutPropertiesLoose(_ref, ["ref", "tabIndex", "onMouseDown", "onFocus", "onBlurCapture", "onKeyDown", "onClick"]); var ref = (0,external_React_.useRef)(null); var id = options.id; var trulyDisabled = options.disabled && !options.focusable; var isCurrentItem = options.currentId === id; var isCurrentItemRef = useLiveRef(isCurrentItem); var hasFocusedComposite = (0,external_React_.useRef)(false); var item = useItem(options); var onMouseDownRef = useLiveRef(htmlOnMouseDown); var onFocusRef = useLiveRef(htmlOnFocus); var onBlurCaptureRef = useLiveRef(htmlOnBlurCapture); var onKeyDownRef = useLiveRef(htmlOnKeyDown); var onClickRef = useLiveRef(htmlOnClick); var shouldTabIndex = !options.unstable_virtual && !options.unstable_hasActiveWidget && isCurrentItem || // We don't want to set tabIndex="-1" when using CompositeItem as a // standalone component, without state props. !((_options$items2 = options.items) !== null && _options$items2 !== void 0 && _options$items2.length); (0,external_React_.useEffect)(function () { var _options$registerItem; if (!id) return undefined; (_options$registerItem = options.registerItem) === null || _options$registerItem === void 0 ? void 0 : _options$registerItem.call(options, { id: id, ref: ref, disabled: !!trulyDisabled }); return function () { var _options$unregisterIt; (_options$unregisterIt = options.unregisterItem) === null || _options$unregisterIt === void 0 ? void 0 : _options$unregisterIt.call(options, id); }; }, [id, trulyDisabled, options.registerItem, options.unregisterItem]); (0,external_React_.useEffect)(function () { var element = ref.current; if (!element) { false ? 0 : void 0; return; } // `moves` will be incremented whenever next, previous, up, down, first, // last or move have been called. This means that the composite item will // be focused whenever some of these functions are called. We're using // isCurrentItemRef instead of isCurrentItem because we don't want to // focus the item if isCurrentItem changes (and options.moves doesn't). if (options.unstable_moves && isCurrentItemRef.current) { userFocus(element); } }, [options.unstable_moves]); var onMouseDown = (0,external_React_.useCallback)(function (event) { var _onMouseDownRef$curre; (_onMouseDownRef$curre = onMouseDownRef.current) === null || _onMouseDownRef$curre === void 0 ? void 0 : _onMouseDownRef$curre.call(onMouseDownRef, event); setUserFocus(event.currentTarget, true); }, []); var onFocus = (0,external_React_.useCallback)(function (event) { var _onFocusRef$current, _options$setCurrentId; var shouldFocusComposite = hasUserFocus(event.currentTarget); setUserFocus(event.currentTarget, false); (_onFocusRef$current = onFocusRef.current) === null || _onFocusRef$current === void 0 ? void 0 : _onFocusRef$current.call(onFocusRef, event); if (event.defaultPrevented) return; if (isPortalEvent(event)) return; if (!id) return; if (targetIsAnotherItem(event, options.items)) return; (_options$setCurrentId = options.setCurrentId) === null || _options$setCurrentId === void 0 ? void 0 : _options$setCurrentId.call(options, id); // When using aria-activedescendant, we want to make sure that the // composite container receives focus, not the composite item. // But we don't want to do this if the target is another focusable // element inside the composite item, such as CompositeItemWidget. if (shouldFocusComposite && options.unstable_virtual && options.baseId && isSelfTarget(event)) { var target = event.target; var composite = getDocument_getDocument(target).getElementById(options.baseId); if (composite) { hasFocusedComposite.current = true; ensureFocus(composite); } } }, [id, options.items, options.setCurrentId, options.unstable_virtual, options.baseId]); var onBlurCapture = (0,external_React_.useCallback)(function (event) { var _onBlurCaptureRef$cur; (_onBlurCaptureRef$cur = onBlurCaptureRef.current) === null || _onBlurCaptureRef$cur === void 0 ? void 0 : _onBlurCaptureRef$cur.call(onBlurCaptureRef, event); if (event.defaultPrevented) return; if (options.unstable_virtual && hasFocusedComposite.current) { // When hasFocusedComposite is true, composite has been focused right // after focusing this item. This is an intermediate blur event, so // we ignore it. hasFocusedComposite.current = false; event.preventDefault(); event.stopPropagation(); } }, [options.unstable_virtual]); var onKeyDown = (0,external_React_.useCallback)(function (event) { var _onKeyDownRef$current; if (!isSelfTarget(event)) return; var isVertical = options.orientation !== "horizontal"; var isHorizontal = options.orientation !== "vertical"; var isGrid = !!(item !== null && item !== void 0 && item.groupId); var keyMap = { ArrowUp: (isGrid || isVertical) && options.up, ArrowRight: (isGrid || isHorizontal) && options.next, ArrowDown: (isGrid || isVertical) && options.down, ArrowLeft: (isGrid || isHorizontal) && options.previous, Home: function Home() { if (!isGrid || event.ctrlKey) { var _options$first; (_options$first = options.first) === null || _options$first === void 0 ? void 0 : _options$first.call(options); } else { var _options$previous; (_options$previous = options.previous) === null || _options$previous === void 0 ? void 0 : _options$previous.call(options, true); } }, End: function End() { if (!isGrid || event.ctrlKey) { var _options$last; (_options$last = options.last) === null || _options$last === void 0 ? void 0 : _options$last.call(options); } else { var _options$next; (_options$next = options.next) === null || _options$next === void 0 ? void 0 : _options$next.call(options, true); } }, PageUp: function PageUp() { if (isGrid) { var _options$up; (_options$up = options.up) === null || _options$up === void 0 ? void 0 : _options$up.call(options, true); } else { var _options$first2; (_options$first2 = options.first) === null || _options$first2 === void 0 ? void 0 : _options$first2.call(options); } }, PageDown: function PageDown() { if (isGrid) { var _options$down; (_options$down = options.down) === null || _options$down === void 0 ? void 0 : _options$down.call(options, true); } else { var _options$last2; (_options$last2 = options.last) === null || _options$last2 === void 0 ? void 0 : _options$last2.call(options); } } }; var action = keyMap[event.key]; if (action) { event.preventDefault(); action(); return; } (_onKeyDownRef$current = onKeyDownRef.current) === null || _onKeyDownRef$current === void 0 ? void 0 : _onKeyDownRef$current.call(onKeyDownRef, event); if (event.defaultPrevented) return; if (event.key.length === 1 && event.key !== " ") { var widget = getWidget(event.currentTarget); if (widget && isTextField_isTextField(widget)) { widget.focus(); setTextFieldValue(widget, ""); } } else if (event.key === "Delete" || event.key === "Backspace") { var _widget = getWidget(event.currentTarget); if (_widget && isTextField_isTextField(_widget)) { event.preventDefault(); setTextFieldValue(_widget, ""); } } }, [options.orientation, item, options.up, options.next, options.down, options.previous, options.first, options.last]); var onClick = (0,external_React_.useCallback)(function (event) { var _onClickRef$current; (_onClickRef$current = onClickRef.current) === null || _onClickRef$current === void 0 ? void 0 : _onClickRef$current.call(onClickRef, event); if (event.defaultPrevented) return; var element = event.currentTarget; var widget = getWidget(element); if (widget && !hasFocusWithin(widget)) { // If there's a widget inside the composite item, we make sure it's // focused when pressing enter, space or clicking on the composite item. widget.focus(); } }, []); return _objectSpread2({ ref: useForkRef(ref, htmlRef), id: id, tabIndex: shouldTabIndex ? htmlTabIndex : -1, "aria-selected": options.unstable_virtual && isCurrentItem ? true : undefined, onMouseDown: onMouseDown, onFocus: onFocus, onBlurCapture: onBlurCapture, onKeyDown: onKeyDown, onClick: onClick }, htmlProps); } }); var CompositeItem = createComponent({ as: "button", memo: true, useHook: useCompositeItem }); ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/PNRLI7OV.js var __defProp = Object.defineProperty; var __defProps = Object.defineProperties; var __getOwnPropDescs = Object.getOwnPropertyDescriptors; var __getOwnPropSymbols = Object.getOwnPropertySymbols; var __hasOwnProp = Object.prototype.hasOwnProperty; var __propIsEnum = Object.prototype.propertyIsEnumerable; var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; var PNRLI7OV_spreadValues = (a, b) => { for (var prop in b || (b = {})) if (__hasOwnProp.call(b, prop)) __defNormalProp(a, prop, b[prop]); if (__getOwnPropSymbols) for (var prop of __getOwnPropSymbols(b)) { if (__propIsEnum.call(b, prop)) __defNormalProp(a, prop, b[prop]); } return a; }; var PNRLI7OV_spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b)); var __objRest = (source, exclude) => { var target = {}; for (var prop in source) if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0) target[prop] = source[prop]; if (source != null && __getOwnPropSymbols) for (var prop of __getOwnPropSymbols(source)) { if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop)) target[prop] = source[prop]; } return target; }; ;// CONCATENATED MODULE: ./node_modules/@ariakit/core/esm/__chunks/PNRLI7OV.js var PNRLI7OV_defProp = Object.defineProperty; var PNRLI7OV_defProps = Object.defineProperties; var PNRLI7OV_getOwnPropDescs = Object.getOwnPropertyDescriptors; var PNRLI7OV_getOwnPropSymbols = Object.getOwnPropertySymbols; var PNRLI7OV_hasOwnProp = Object.prototype.hasOwnProperty; var PNRLI7OV_propIsEnum = Object.prototype.propertyIsEnumerable; var PNRLI7OV_defNormalProp = (obj, key, value) => key in obj ? PNRLI7OV_defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; var _chunks_PNRLI7OV_spreadValues = (a, b) => { for (var prop in b || (b = {})) if (PNRLI7OV_hasOwnProp.call(b, prop)) PNRLI7OV_defNormalProp(a, prop, b[prop]); if (PNRLI7OV_getOwnPropSymbols) for (var prop of PNRLI7OV_getOwnPropSymbols(b)) { if (PNRLI7OV_propIsEnum.call(b, prop)) PNRLI7OV_defNormalProp(a, prop, b[prop]); } return a; }; var _chunks_PNRLI7OV_spreadProps = (a, b) => PNRLI7OV_defProps(a, PNRLI7OV_getOwnPropDescs(b)); var PNRLI7OV_objRest = (source, exclude) => { var target = {}; for (var prop in source) if (PNRLI7OV_hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0) target[prop] = source[prop]; if (source != null && PNRLI7OV_getOwnPropSymbols) for (var prop of PNRLI7OV_getOwnPropSymbols(source)) { if (exclude.indexOf(prop) < 0 && PNRLI7OV_propIsEnum.call(source, prop)) target[prop] = source[prop]; } return target; }; ;// CONCATENATED MODULE: ./node_modules/@ariakit/core/esm/__chunks/WVTCK5PV.js // src/utils/misc.ts function noop(..._) { } function WVTCK5PV_shallowEqual(a, b) { if (a === b) return true; if (!a) return false; if (!b) return false; if (typeof a !== "object") return false; if (typeof b !== "object") return false; const aKeys = Object.keys(a); const bKeys = Object.keys(b); const { length } = aKeys; if (bKeys.length !== length) return false; for (const key of aKeys) { if (a[key] !== b[key]) { return false; } } return true; } function WVTCK5PV_applyState(argument, currentValue) { if (isUpdater(argument)) { const value = isLazyValue(currentValue) ? currentValue() : currentValue; return argument(value); } return argument; } function isUpdater(argument) { return typeof argument === "function"; } function isLazyValue(value) { return typeof value === "function"; } function WVTCK5PV_isObject(arg) { return typeof arg === "object" && arg != null; } function isEmpty(arg) { if (Array.isArray(arg)) return !arg.length; if (WVTCK5PV_isObject(arg)) return !Object.keys(arg).length; if (arg == null) return true; if (arg === "") return true; return false; } function isInteger(arg) { if (typeof arg === "number") { return Math.floor(arg) === arg; } return String(Math.floor(Number(arg))) === arg; } function WVTCK5PV_hasOwnProperty(object, prop) { return Object.prototype.hasOwnProperty.call(object, prop); } function chain(...fns) { return (...args) => { for (const fn of fns) { if (typeof fn === "function") { fn(...args); } } }; } function cx(...args) { return args.filter(Boolean).join(" ") || void 0; } function normalizeString(str) { return str.normalize("NFD").replace(/[\u0300-\u036f]/g, ""); } function omit(object, keys) { const result = _chunks_PNRLI7OV_spreadValues({}, object); for (const key of keys) { if (WVTCK5PV_hasOwnProperty(result, key)) { delete result[key]; } } return result; } function pick(object, paths) { const result = {}; for (const key of paths) { if (WVTCK5PV_hasOwnProperty(object, key)) { result[key] = object[key]; } } return result; } function identity(value) { return value; } function beforePaint(cb = noop) { const raf = requestAnimationFrame(cb); return () => cancelAnimationFrame(raf); } function afterPaint(cb = noop) { let raf = requestAnimationFrame(() => { raf = requestAnimationFrame(cb); }); return () => cancelAnimationFrame(raf); } function invariant(condition, message) { if (condition) return; if (typeof message !== "string") throw new Error("Invariant failed"); throw new Error(message); } function getKeys(obj) { return Object.keys(obj); } function isFalsyBooleanCallback(booleanOrCallback, ...args) { const result = typeof booleanOrCallback === "function" ? booleanOrCallback(...args) : booleanOrCallback; if (result == null) return false; return !result; } function defaultValue(...values) { for (const value of values) { if (value !== void 0) return value; } return void 0; } ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/CP3U4HPL.js // src/utils/misc.ts function CP3U4HPL_setRef(ref, value) { if (typeof ref === "function") { ref(value); } else if (ref) { ref.current = value; } } function isValidElementWithRef(element) { if (!element) return false; if (!(0,external_React_.isValidElement)(element)) return false; if (!("ref" in element)) return false; return true; } function getRefProperty(element) { if (!isValidElementWithRef(element)) return null; return element.ref; } function mergeProps(base, overrides) { const props = PNRLI7OV_spreadValues({}, base); for (const key in overrides) { if (!WVTCK5PV_hasOwnProperty(overrides, key)) continue; if (key === "className") { const prop = "className"; props[prop] = base[prop] ? `${base[prop]} ${overrides[prop]}` : overrides[prop]; continue; } if (key === "style") { const prop = "style"; props[prop] = base[prop] ? PNRLI7OV_spreadValues(PNRLI7OV_spreadValues({}, base[prop]), overrides[prop]) : overrides[prop]; continue; } const overrideValue = overrides[key]; if (typeof overrideValue === "function" && key.startsWith("on")) { const baseValue = base[key]; if (typeof baseValue === "function") { props[key] = (...args) => { overrideValue(...args); baseValue(...args); }; continue; } } props[key] = overrideValue; } return props; } ;// CONCATENATED MODULE: ./node_modules/@ariakit/core/esm/__chunks/O35LWD4W.js // src/utils/dom.ts var O35LWD4W_canUseDOM = O35LWD4W_checkIsBrowser(); function O35LWD4W_checkIsBrowser() { var _a; return typeof window !== "undefined" && !!((_a = window.document) == null ? void 0 : _a.createElement); } function O35LWD4W_getDocument(node) { return node ? node.ownerDocument || node : document; } function O35LWD4W_getWindow(node) { return O35LWD4W_getDocument(node).defaultView || window; } function O35LWD4W_getActiveElement(node, activeDescendant = false) { const { activeElement } = O35LWD4W_getDocument(node); if (!(activeElement == null ? void 0 : activeElement.nodeName)) { return null; } if (isFrame(activeElement) && activeElement.contentDocument) { return O35LWD4W_getActiveElement( activeElement.contentDocument.body, activeDescendant ); } if (activeDescendant) { const id = activeElement.getAttribute("aria-activedescendant"); if (id) { const element = O35LWD4W_getDocument(activeElement).getElementById(id); if (element) { return element; } } } return activeElement; } function O35LWD4W_contains(parent, child) { return parent === child || parent.contains(child); } function isFrame(element) { return element.tagName === "IFRAME"; } function O35LWD4W_isButton(element) { const tagName = element.tagName.toLowerCase(); if (tagName === "button") return true; if (tagName === "input" && element.type) { return O35LWD4W_buttonInputTypes.indexOf(element.type) !== -1; } return false; } var O35LWD4W_buttonInputTypes = [ "button", "color", "file", "image", "reset", "submit" ]; function O35LWD4W_matches(element, selectors) { if ("matches" in element) { return element.matches(selectors); } if ("msMatchesSelector" in element) { return element.msMatchesSelector(selectors); } return element.webkitMatchesSelector(selectors); } function O35LWD4W_isVisible(element) { const htmlElement = element; return htmlElement.offsetWidth > 0 || htmlElement.offsetHeight > 0 || element.getClientRects().length > 0; } function O35LWD4W_closest(element, selectors) { if ("closest" in element) return element.closest(selectors); do { if (O35LWD4W_matches(element, selectors)) return element; element = element.parentElement || element.parentNode; } while (element !== null && element.nodeType === 1); return null; } function O35LWD4W_isTextField(element) { try { const isTextInput = element instanceof HTMLInputElement && element.selectionStart !== null; const isTextArea = element.tagName === "TEXTAREA"; return isTextInput || isTextArea || false; } catch (error) { return false; } } function getPopupRole(element, fallback) { const allowedPopupRoles = ["dialog", "menu", "listbox", "tree", "grid"]; const role = element == null ? void 0 : element.getAttribute("role"); if (role && allowedPopupRoles.indexOf(role) !== -1) { return role; } return fallback; } function getPopupItemRole(element, fallback) { var _a; const itemRoleByPopupRole = { menu: "menuitem", listbox: "option", tree: "treeitem", grid: "gridcell" }; const popupRole = getPopupRole(element); if (!popupRole) return fallback; const key = popupRole; return (_a = itemRoleByPopupRole[key]) != null ? _a : fallback; } function getTextboxSelection(element) { let start = 0; let end = 0; if (O35LWD4W_isTextField(element)) { start = element.selectionStart || 0; end = element.selectionEnd || 0; } else if (element.isContentEditable) { const selection = O35LWD4W_getDocument(element).getSelection(); if ((selection == null ? void 0 : selection.rangeCount) && selection.anchorNode && O35LWD4W_contains(element, selection.anchorNode) && selection.focusNode && O35LWD4W_contains(element, selection.focusNode)) { const range = selection.getRangeAt(0); const nextRange = range.cloneRange(); nextRange.selectNodeContents(element); nextRange.setEnd(range.startContainer, range.startOffset); start = nextRange.toString().length; nextRange.setEnd(range.endContainer, range.endOffset); end = nextRange.toString().length; } } return { start, end }; } function scrollIntoViewIfNeeded(element, arg) { if (isPartiallyHidden(element) && "scrollIntoView" in element) { element.scrollIntoView(arg); } } function getScrollingElement(element) { if (!element) return null; if (element.clientHeight && element.scrollHeight > element.clientHeight) { const { overflowY } = getComputedStyle(element); const isScrollable = overflowY !== "visible" && overflowY !== "hidden"; if (isScrollable) return element; } else if (element.clientWidth && element.scrollWidth > element.clientWidth) { const { overflowX } = getComputedStyle(element); const isScrollable = overflowX !== "visible" && overflowX !== "hidden"; if (isScrollable) return element; } return getScrollingElement(element.parentElement) || document.scrollingElement || document.body; } function isPartiallyHidden(element) { const elementRect = element.getBoundingClientRect(); const scroller = getScrollingElement(element); if (!scroller) return false; const scrollerRect = scroller.getBoundingClientRect(); const isHTML = scroller.tagName === "HTML"; const scrollerTop = isHTML ? scrollerRect.top + scroller.scrollTop : scrollerRect.top; const scrollerBottom = isHTML ? scroller.clientHeight : scrollerRect.bottom; const scrollerLeft = isHTML ? scrollerRect.left + scroller.scrollLeft : scrollerRect.left; const scrollerRight = isHTML ? scroller.clientWidth : scrollerRect.right; const top = elementRect.top < scrollerTop; const left = elementRect.left < scrollerLeft; const bottom = elementRect.bottom > scrollerBottom; const right = elementRect.right > scrollerRight; return top || left || bottom || right; } ;// CONCATENATED MODULE: ./node_modules/@ariakit/core/esm/utils/events.js // src/utils/events.ts function events_isPortalEvent(event) { return Boolean( event.currentTarget && !O35LWD4W_contains(event.currentTarget, event.target) ); } function events_isSelfTarget(event) { return event.target === event.currentTarget; } function isOpeningInNewTab(event) { const element = event.currentTarget; if (!element) return false; const isAppleDevice = isApple(); if (isAppleDevice && !event.metaKey) return false; if (!isAppleDevice && !event.ctrlKey) return false; const tagName = element.tagName.toLowerCase(); if (tagName === "a") return true; if (tagName === "button" && element.type === "submit") return true; if (tagName === "input" && element.type === "submit") return true; return false; } function isDownloading(event) { const element = event.currentTarget; if (!element) return false; const tagName = element.tagName.toLowerCase(); if (!event.altKey) return false; if (tagName === "a") return true; if (tagName === "button" && element.type === "submit") return true; if (tagName === "input" && element.type === "submit") return true; return false; } function events_fireEvent(element, type, eventInit) { const event = new Event(type, eventInit); return element.dispatchEvent(event); } function fireBlurEvent(element, eventInit) { const event = new FocusEvent("blur", eventInit); const defaultAllowed = element.dispatchEvent(event); const bubbleInit = _chunks_PNRLI7OV_spreadProps(_chunks_PNRLI7OV_spreadValues({}, eventInit), { bubbles: true }); element.dispatchEvent(new FocusEvent("focusout", bubbleInit)); return defaultAllowed; } function fireFocusEvent(element, eventInit) { const event = new FocusEvent("focus", eventInit); const defaultAllowed = element.dispatchEvent(event); const bubbleInit = _chunks_PNRLI7OV_spreadProps(_chunks_PNRLI7OV_spreadValues({}, eventInit), { bubbles: true }); element.dispatchEvent(new FocusEvent("focusin", bubbleInit)); return defaultAllowed; } function fireKeyboardEvent(element, type, eventInit) { const event = new KeyboardEvent(type, eventInit); return element.dispatchEvent(event); } function fireClickEvent(element, eventInit) { const event = new MouseEvent("click", eventInit); return element.dispatchEvent(event); } function isFocusEventOutside(event, container) { const containerElement = container || event.currentTarget; const relatedTarget = event.relatedTarget; return !relatedTarget || !O35LWD4W_contains(containerElement, relatedTarget); } function queueBeforeEvent(element, type, callback) { const raf = requestAnimationFrame(() => { element.removeEventListener(type, callImmediately, true); callback(); }); const callImmediately = () => { cancelAnimationFrame(raf); callback(); }; element.addEventListener(type, callImmediately, { once: true, capture: true }); return raf; } function addGlobalEventListener(type, listener, options, scope = window) { var _a; try { scope.document.addEventListener(type, listener, options); } catch (e) { } const listeners = []; for (let i = 0; i < ((_a = scope.frames) == null ? void 0 : _a.length); i += 1) { const frameWindow = scope.frames[i]; if (frameWindow) { listeners.push( addGlobalEventListener(type, listener, options, frameWindow) ); } } const removeEventListener = () => { try { scope.document.removeEventListener(type, listener, options); } catch (e) { } listeners.forEach((listener2) => listener2()); }; return removeEventListener; } ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/J7Q2EO23.js // src/utils/hooks.ts var _React = PNRLI7OV_spreadValues({}, external_React_namespaceObject); var useReactId = _React.useId; var useReactDeferredValue = _React.useDeferredValue; var useReactInsertionEffect = _React.useInsertionEffect; var useSafeLayoutEffect = O35LWD4W_canUseDOM ? external_React_.useLayoutEffect : external_React_.useEffect; function useInitialValue(value) { const [initialValue] = useState(value); return initialValue; } function useLazyValue(init) { const ref = (0,external_React_.useRef)(); if (ref.current === void 0) { ref.current = init(); } return ref.current; } function J7Q2EO23_useLiveRef(value) { const ref = (0,external_React_.useRef)(value); useSafeLayoutEffect(() => { ref.current = value; }); return ref; } function usePreviousValue(value) { const [previousValue, setPreviousValue] = useState(value); if (value !== previousValue) { setPreviousValue(value); } return previousValue; } function useEvent(callback) { const ref = (0,external_React_.useRef)(() => { throw new Error("Cannot call an event handler while rendering."); }); if (useReactInsertionEffect) { useReactInsertionEffect(() => { ref.current = callback; }); } else { ref.current = callback; } return (0,external_React_.useCallback)((...args) => { var _a; return (_a = ref.current) == null ? void 0 : _a.call(ref, ...args); }, []); } function useMergeRefs(...refs) { return (0,external_React_.useMemo)(() => { if (!refs.some(Boolean)) return; return (value) => { refs.forEach((ref) => CP3U4HPL_setRef(ref, value)); }; }, refs); } function useRefId(ref, deps) { const [id, setId] = useState(void 0); useSafeLayoutEffect(() => { var _a; setId((_a = ref == null ? void 0 : ref.current) == null ? void 0 : _a.id); }, deps); return id; } function useId(defaultId) { if (useReactId) { const reactId = useReactId(); if (defaultId) return defaultId; return reactId; } const [id, setId] = (0,external_React_.useState)(defaultId); useSafeLayoutEffect(() => { if (defaultId || id) return; const random = Math.random().toString(36).substr(2, 6); setId(`id-${random}`); }, [defaultId, id]); return defaultId || id; } function useDeferredValue(value) { if (useReactDeferredValue) { return useReactDeferredValue(value); } const [deferredValue, setDeferredValue] = useState(value); useEffect(() => { const raf = requestAnimationFrame(() => setDeferredValue(value)); return () => cancelAnimationFrame(raf); }, [value]); return deferredValue; } function useTagName(refOrElement, type) { const stringOrUndefined = (type2) => { if (typeof type2 !== "string") return; return type2; }; const [tagName, setTagName] = (0,external_React_.useState)(() => stringOrUndefined(type)); useSafeLayoutEffect(() => { const element = refOrElement && "current" in refOrElement ? refOrElement.current : refOrElement; setTagName((element == null ? void 0 : element.tagName.toLowerCase()) || stringOrUndefined(type)); }, [refOrElement, type]); return tagName; } function useAttribute(refOrElement, attributeName, defaultValue) { const [attribute, setAttribute] = useState(defaultValue); useSafeLayoutEffect(() => { const element = refOrElement && "current" in refOrElement ? refOrElement.current : refOrElement; const value = element == null ? void 0 : element.getAttribute(attributeName); if (value == null) return; setAttribute(value); }, [refOrElement, attributeName]); return attribute; } function useUpdateEffect(effect, deps) { const mounted = useRef(false); useEffect(() => { if (mounted.current) { return effect(); } mounted.current = true; }, deps); useEffect( () => () => { mounted.current = false; }, [] ); } function useUpdateLayoutEffect(effect, deps) { const mounted = useRef(false); useSafeLayoutEffect(() => { if (mounted.current) { return effect(); } mounted.current = true; }, deps); useSafeLayoutEffect( () => () => { mounted.current = false; }, [] ); } function useControlledState(defaultState, state, setState) { const [localState, setLocalState] = useState(defaultState); const nextState = state !== void 0 ? state : localState; const stateRef = J7Q2EO23_useLiveRef(state); const setStateRef = J7Q2EO23_useLiveRef(setState); const nextStateRef = J7Q2EO23_useLiveRef(nextState); const setNextState = useCallback((prevValue) => { const setStateProp = setStateRef.current; if (setStateProp) { if (isSetNextState(setStateProp)) { setStateProp(prevValue); } else { const nextValue = applyState(prevValue, nextStateRef.current); nextStateRef.current = nextValue; setStateProp(nextValue); } } if (stateRef.current === void 0) { setLocalState(prevValue); } }, []); defineSetNextState(setNextState); return [nextState, setNextState]; } var SET_NEXT_STATE = Symbol("setNextState"); function isSetNextState(arg) { return arg[SET_NEXT_STATE] === true; } function defineSetNextState(arg) { if (!isSetNextState(arg)) { Object.defineProperty(arg, SET_NEXT_STATE, { value: true }); } } function useForceUpdate() { return (0,external_React_.useReducer)(() => [], []); } function useBooleanEvent(booleanOrCallback) { return useEvent( typeof booleanOrCallback === "function" ? booleanOrCallback : () => booleanOrCallback ); } function useWrapElement(props, callback, deps = []) { const wrapElement = (0,external_React_.useCallback)( (element) => { if (props.wrapElement) { element = props.wrapElement(element); } return callback(element); }, [...deps, props.wrapElement] ); return PNRLI7OV_spreadProps(PNRLI7OV_spreadValues({}, props), { wrapElement }); } function usePortalRef(portalProp = false, portalRefProp) { const [portalNode, setPortalNode] = (0,external_React_.useState)(null); const portalRef = useMergeRefs(setPortalNode, portalRefProp); const domReady = !portalProp || portalNode; return { portalRef, portalNode, domReady }; } function useIsMouseMoving() { (0,external_React_.useEffect)(() => { addGlobalEventListener("mousemove", setMouseMoving, true); addGlobalEventListener("mousedown", resetMouseMoving, true); addGlobalEventListener("mouseup", resetMouseMoving, true); addGlobalEventListener("keydown", resetMouseMoving, true); addGlobalEventListener("scroll", resetMouseMoving, true); }, []); const isMouseMoving = useEvent(() => mouseMoving); return isMouseMoving; } var mouseMoving = false; var previousScreenX = 0; var previousScreenY = 0; function hasMouseMovement(event) { const movementX = event.movementX || event.screenX - previousScreenX; const movementY = event.movementY || event.screenY - previousScreenY; previousScreenX = event.screenX; previousScreenY = event.screenY; return movementX || movementY || "production" === "test"; } function setMouseMoving(event) { if (!hasMouseMovement(event)) return; mouseMoving = true; } function resetMouseMoving() { mouseMoving = false; } // EXTERNAL MODULE: ./node_modules/use-sync-external-store/shim/index.js var shim = __webpack_require__(635); ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/FHQZ2KRN.js // src/utils/store.tsx var noopSubscribe = () => () => { }; function useStoreState(store, keyOrSelector = identity) { const getSnapshot = () => { if (!store) return; const state = store.getState(); const selector = typeof keyOrSelector === "function" ? keyOrSelector : null; const key = typeof keyOrSelector === "string" ? keyOrSelector : null; if (selector) return selector(state); if (!key) return; if (!WVTCK5PV_hasOwnProperty(state, key)) return; return state[key]; }; return (0,shim.useSyncExternalStore)( (store == null ? void 0 : store.subscribe) || noopSubscribe, getSnapshot, getSnapshot ); } function useStoreProps(store, props, key, setKey) { const value = WVTCK5PV_hasOwnProperty(props, key) ? props[key] : void 0; const propsRef = J7Q2EO23_useLiveRef({ value, setValue: setKey ? props[setKey] : void 0 }); useSafeLayoutEffect(() => { return store.sync( (state, prev) => { const { value: value2, setValue } = propsRef.current; if (!setValue) return; if (state[key] === prev[key]) return; if (state[key] === value2) return; setValue(state[key]); }, [key] ); }, [store, key]); useSafeLayoutEffect(() => { return store.sync(() => { if (value === void 0) return; store.setState(key, value); }, [key]); }, [store, key, value]); } function FHQZ2KRN_useStore(createStore) { const store = useLazyValue(createStore); useSafeLayoutEffect(() => store.init(), [store]); const useState = (0,external_React_.useCallback)( (keyOrSelector) => useStoreState(store, keyOrSelector), [store] ); return (0,external_React_.useMemo)(() => PNRLI7OV_spreadProps(PNRLI7OV_spreadValues({}, store), { useState }), [store, useState]); } ;// CONCATENATED MODULE: ./node_modules/@ariakit/core/esm/__chunks/FQL4TRMX.js // src/utils/store.ts function createStore(initialState, ...stores) { let state = initialState; let prevStateBatch = state; let lastUpdate = Symbol(); let initialized = false; const updatedKeys = /* @__PURE__ */ new Set(); const setups = /* @__PURE__ */ new Set(); const listeners = /* @__PURE__ */ new Set(); const listenersBatch = /* @__PURE__ */ new Set(); const disposables = /* @__PURE__ */ new WeakMap(); const listenerKeys = /* @__PURE__ */ new WeakMap(); const setup = (callback) => { setups.add(callback); return () => setups.delete(callback); }; const init = () => { if (initialized) return noop; if (!stores.length) return noop; initialized = true; const desyncs = getKeys(state).map( (key) => chain( ...stores.map((store) => { var _a, _b; const storeState = (_a = store == null ? void 0 : store.getState) == null ? void 0 : _a.call(store); if (!storeState) return; if (!WVTCK5PV_hasOwnProperty(storeState, key)) return; return (_b = store == null ? void 0 : store.sync) == null ? void 0 : _b.call(store, (state2) => setState(key, state2[key]), [key]); }) ) ); const teardowns = []; setups.forEach((setup2) => teardowns.push(setup2())); const cleanups = stores.map((store) => { var _a; return (_a = store == null ? void 0 : store.init) == null ? void 0 : _a.call(store); }); return chain(...desyncs, ...teardowns, ...cleanups, () => { initialized = false; }); }; const sub = (listener, keys, batch = false) => { const set = batch ? listenersBatch : listeners; set.add(listener); listenerKeys.set(listener, keys); return () => { var _a; (_a = disposables.get(listener)) == null ? void 0 : _a(); disposables.delete(listener); listenerKeys.delete(listener); set.delete(listener); }; }; const subscribe = (listener, keys) => sub(listener, keys); const sync = (listener, keys) => { disposables.set(listener, listener(state, state)); return sub(listener, keys); }; const syncBatch = (listener, keys) => { disposables.set(listener, listener(state, prevStateBatch)); return sub(listener, keys, true); }; const getState = () => state; const setState = (key, value) => { if (!WVTCK5PV_hasOwnProperty(state, key)) return; const nextValue = WVTCK5PV_applyState(value, state[key]); if (nextValue === state[key]) return; stores.forEach((store) => { var _a; (_a = store == null ? void 0 : store.setState) == null ? void 0 : _a.call(store, key, nextValue); }); const prevState = state; state = _chunks_PNRLI7OV_spreadProps(_chunks_PNRLI7OV_spreadValues({}, state), { [key]: nextValue }); const thisUpdate = Symbol(); lastUpdate = thisUpdate; updatedKeys.add(key); const run = (listener, prev, uKeys) => { var _a; const keys = listenerKeys.get(listener); const updated = (k) => uKeys ? uKeys.has(k) : k === key; if (!keys || keys.some(updated)) { (_a = disposables.get(listener)) == null ? void 0 : _a(); disposables.set(listener, listener(state, prev)); } }; listeners.forEach((listener) => run(listener, prevState)); queueMicrotask(() => { if (lastUpdate !== thisUpdate) return; const snapshot = state; listenersBatch.forEach((listener) => { run(listener, prevStateBatch, updatedKeys); }); prevStateBatch = snapshot; updatedKeys.clear(); }); }; const pick2 = (...keys) => createStore(pick(state, keys), finalStore); const omit2 = (...keys) => createStore(omit(state, keys), finalStore); const finalStore = { setup, init, subscribe, sync, syncBatch, getState, setState, pick: pick2, omit: omit2 }; return finalStore; } function mergeStore(...stores) { const initialState = stores.reduce((state, store2) => { var _a; const nextState = (_a = store2 == null ? void 0 : store2.getState) == null ? void 0 : _a.call(store2); if (!nextState) return state; return _chunks_PNRLI7OV_spreadValues(_chunks_PNRLI7OV_spreadValues({}, state), nextState); }, {}); const store = createStore(initialState, ...stores); return store; } ;// CONCATENATED MODULE: ./node_modules/@ariakit/core/esm/__chunks/L5RO76KW.js // src/disclosure/disclosure-store.ts function createDisclosureStore(props = {}) { var _a; const store = mergeStore( props.store, (_a = props.disclosure) == null ? void 0 : _a.omit("contentElement", "disclosureElement") ); const syncState = store == null ? void 0 : store.getState(); const open = defaultValue( props.open, syncState == null ? void 0 : syncState.open, props.defaultOpen, false ); const animated = defaultValue(props.animated, syncState == null ? void 0 : syncState.animated, false); const initialState = { open, animated, animating: !!animated && open, mounted: open, contentElement: defaultValue(syncState == null ? void 0 : syncState.contentElement, null), disclosureElement: defaultValue(syncState == null ? void 0 : syncState.disclosureElement, null) }; const disclosure = createStore(initialState, store); disclosure.setup( () => disclosure.sync( (state) => { if (state.animated) return; disclosure.setState("animating", false); }, ["animated", "animating"] ) ); disclosure.setup( () => disclosure.sync( (state, prev) => { if (!state.animated) return; const mounting = state === prev; const animating = mounting ? state.open : state.open !== prev.open; disclosure.setState("animating", animating); }, ["open", "animated"] ) ); disclosure.setup( () => disclosure.sync( (state) => { disclosure.setState("mounted", state.open || state.animating); }, ["open", "animating"] ) ); return _chunks_PNRLI7OV_spreadProps(_chunks_PNRLI7OV_spreadValues({}, disclosure), { setOpen: (value) => disclosure.setState("open", value), show: () => disclosure.setState("open", true), hide: () => disclosure.setState("open", false), toggle: () => disclosure.setState("open", (open2) => !open2), stopAnimation: () => disclosure.setState("animating", false), setContentElement: (value) => disclosure.setState("contentElement", value), setDisclosureElement: (value) => disclosure.setState("disclosureElement", value) }); } ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/54LBRJ55.js // src/disclosure/disclosure-store.ts function useDisclosureStoreOptions(_props) { return {}; } function useDisclosureStoreProps(store, props) { useStoreProps(store, props, "open", "setOpen"); useStoreProps(store, props, "animated"); return store; } function useDisclosureStore(props = {}) { const options = useDisclosureStoreOptions(props); const store = FHQZ2KRN_useStore( () => createDisclosureStore(PNRLI7OV_spreadValues(PNRLI7OV_spreadValues({}, props), options)) ); return useDisclosureStoreProps(store, props); } ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/TALTYI5G.js // src/dialog/dialog-store.ts function useDialogStoreOptions(props) { return useDisclosureStoreOptions(props); } function useDialogStoreProps(store, props) { return useDisclosureStoreProps(store, props); } function useDialogStore(props = {}) { const options = useDialogStoreOptions(props); const store = useStore( () => Core.createDialogStore(__spreadValues(__spreadValues({}, props), options)) ); return useDialogStoreProps(store, props); } ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/5QJYOWLQ.js // src/popover/popover-store.ts function usePopoverStoreOptions(props) { return useDialogStoreOptions(props); } function usePopoverStoreProps(store, props) { store = useDialogStoreProps(store, props); useStoreProps(store, props, "placement"); return store; } function usePopoverStore(props = {}) { const options = usePopoverStoreOptions(props); const store = useStore( () => Core.createPopoverStore(__spreadValues(__spreadValues({}, props), options)) ); return usePopoverStoreProps(store, props); } ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/JFHRFFJJ.js // src/hovercard/hovercard-store.ts function useHovercardStoreOptions(props) { return usePopoverStoreOptions(props); } function useHovercardStoreProps(store, props) { store = usePopoverStoreProps(store, props); useStoreProps(store, props, "timeout"); useStoreProps(store, props, "showTimeout"); useStoreProps(store, props, "hideTimeout"); return store; } function useHovercardStore(props = {}) { const options = useHovercardStoreOptions(props); const store = useStore( () => Core.createHovercardStore(__spreadValues(__spreadValues({}, props), options)) ); return useHovercardStoreProps(store, props); } ;// CONCATENATED MODULE: ./node_modules/@ariakit/core/esm/__chunks/UWW2ZP3K.js // src/dialog/dialog-store.ts function createDialogStore(props = {}) { return createDisclosureStore(props); } ;// CONCATENATED MODULE: ./node_modules/@ariakit/core/esm/__chunks/LM4QG55U.js // src/popover/popover-store.ts function createPopoverStore(_a = {}) { var _b = _a, { popover: otherPopover } = _b, props = PNRLI7OV_objRest(_b, [ "popover" ]); const store = mergeStore( props.store, otherPopover == null ? void 0 : otherPopover.omit( "arrowElement", "anchorElement", "contentElement", "popoverElement", "disclosureElement" ) ); const syncState = store == null ? void 0 : store.getState(); const dialog = createDialogStore(_chunks_PNRLI7OV_spreadProps(_chunks_PNRLI7OV_spreadValues({}, props), { store })); const placement = defaultValue( props.placement, syncState == null ? void 0 : syncState.placement, "bottom" ); const initialState = _chunks_PNRLI7OV_spreadProps(_chunks_PNRLI7OV_spreadValues({}, dialog.getState()), { placement, currentPlacement: placement, anchorElement: defaultValue(syncState == null ? void 0 : syncState.anchorElement, null), popoverElement: defaultValue(syncState == null ? void 0 : syncState.popoverElement, null), arrowElement: defaultValue(syncState == null ? void 0 : syncState.arrowElement, null), rendered: Symbol("rendered") }); const popover = createStore(initialState, dialog, store); return _chunks_PNRLI7OV_spreadProps(_chunks_PNRLI7OV_spreadValues(_chunks_PNRLI7OV_spreadValues({}, dialog), popover), { setAnchorElement: (element) => popover.setState("anchorElement", element), setPopoverElement: (element) => popover.setState("popoverElement", element), setArrowElement: (element) => popover.setState("arrowElement", element), render: () => popover.setState("rendered", Symbol("rendered")) }); } ;// CONCATENATED MODULE: ./node_modules/@ariakit/core/esm/__chunks/XJGRXN57.js // src/hovercard/hovercard-store.ts function createHovercardStore(props = {}) { var _a; const syncState = (_a = props.store) == null ? void 0 : _a.getState(); const popover = createPopoverStore(_chunks_PNRLI7OV_spreadProps(_chunks_PNRLI7OV_spreadValues({}, props), { placement: defaultValue( props.placement, syncState == null ? void 0 : syncState.placement, "bottom" ) })); const timeout = defaultValue(props.timeout, syncState == null ? void 0 : syncState.timeout, 500); const initialState = _chunks_PNRLI7OV_spreadProps(_chunks_PNRLI7OV_spreadValues({}, popover.getState()), { timeout, showTimeout: defaultValue(props.showTimeout, syncState == null ? void 0 : syncState.showTimeout), hideTimeout: defaultValue(props.hideTimeout, syncState == null ? void 0 : syncState.hideTimeout), autoFocusOnShow: defaultValue(syncState == null ? void 0 : syncState.autoFocusOnShow, false) }); const hovercard = createStore(initialState, popover, props.store); return _chunks_PNRLI7OV_spreadProps(_chunks_PNRLI7OV_spreadValues(_chunks_PNRLI7OV_spreadValues({}, popover), hovercard), { setAutoFocusOnShow: (value) => hovercard.setState("autoFocusOnShow", value) }); } ;// CONCATENATED MODULE: ./node_modules/@ariakit/core/esm/tooltip/tooltip-store.js // src/tooltip/tooltip-store.ts function createTooltipStore(props = {}) { var _a; const syncState = (_a = props.store) == null ? void 0 : _a.getState(); const hovercard = createHovercardStore(_chunks_PNRLI7OV_spreadProps(_chunks_PNRLI7OV_spreadValues({}, props), { placement: defaultValue( props.placement, syncState == null ? void 0 : syncState.placement, "top" ), hideTimeout: defaultValue(props.hideTimeout, syncState == null ? void 0 : syncState.hideTimeout, 0) })); const initialState = _chunks_PNRLI7OV_spreadProps(_chunks_PNRLI7OV_spreadValues({}, hovercard.getState()), { type: defaultValue(props.type, syncState == null ? void 0 : syncState.type, "description"), skipTimeout: defaultValue(props.skipTimeout, syncState == null ? void 0 : syncState.skipTimeout, 300) }); const tooltip = createStore(initialState, hovercard, props.store); return _chunks_PNRLI7OV_spreadValues(_chunks_PNRLI7OV_spreadValues({}, hovercard), tooltip); } ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/tooltip/tooltip-store.js // src/tooltip/tooltip-store.ts function useTooltipStoreOptions(props) { return useHovercardStoreOptions(props); } function useTooltipStoreProps(store, props) { store = useHovercardStoreProps(store, props); useStoreProps(store, props, "type"); useStoreProps(store, props, "skipTimeout"); return store; } function useTooltipStore(props = {}) { const options = useTooltipStoreOptions(props); const store = FHQZ2KRN_useStore( () => createTooltipStore(PNRLI7OV_spreadValues(PNRLI7OV_spreadValues({}, props), options)) ); return useTooltipStoreProps(store, props); } ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/BMLNRUFQ.js // src/focusable/focusable-context.ts var FocusableContext = (0,external_React_.createContext)(true); // EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js var jsx_runtime = __webpack_require__(7557); ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/NQJBHION.js // src/utils/system.tsx function NQJBHION_isRenderProp(children) { return typeof children === "function"; } function forwardRef2(render) { const Role = React.forwardRef((props, ref) => render(__spreadProps(__spreadValues({}, props), { ref }))); Role.displayName = render.displayName || render.name; return Role; } function memo2(Component, propsAreEqual) { const Role = React.memo(Component, propsAreEqual); Role.displayName = Component.displayName || Component.name; return Role; } function NQJBHION_createComponent(render) { const Role = (props, ref) => render(PNRLI7OV_spreadValues({ ref }, props)); return external_React_.forwardRef(Role); } function createMemoComponent(render) { const Role = NQJBHION_createComponent(render); return external_React_.memo(Role); } function NQJBHION_createElement(Type, props) { const _a = props, { as: As, wrapElement, render } = _a, rest = __objRest(_a, ["as", "wrapElement", "render"]); let element; const mergedRef = useMergeRefs(props.ref, getRefProperty(render)); if (As && typeof As !== "string") { element = /* @__PURE__ */ (0,jsx_runtime.jsx)(As, PNRLI7OV_spreadProps(PNRLI7OV_spreadValues({}, rest), { render })); } else if (external_React_.isValidElement(render)) { const renderProps = PNRLI7OV_spreadProps(PNRLI7OV_spreadValues({}, render.props), { ref: mergedRef }); element = external_React_.cloneElement(render, mergeProps(rest, renderProps)); } else if (render) { element = render(rest); } else if (NQJBHION_isRenderProp(props.children)) { const _b = rest, { children } = _b, otherProps = __objRest(_b, ["children"]); element = props.children(otherProps); } else if (As) { element = /* @__PURE__ */ (0,jsx_runtime.jsx)(As, PNRLI7OV_spreadValues({}, rest)); } else { element = /* @__PURE__ */ (0,jsx_runtime.jsx)(Type, PNRLI7OV_spreadValues({}, rest)); } if (wrapElement) { return wrapElement(element); } return element; } function NQJBHION_createHook(useProps) { const useRole = (props = {}) => { const htmlProps = useProps(props); const copy = {}; for (const prop in htmlProps) { if (WVTCK5PV_hasOwnProperty(htmlProps, prop) && htmlProps[prop] !== void 0) { copy[prop] = htmlProps[prop]; } } return copy; }; return useRole; } ;// CONCATENATED MODULE: ./node_modules/@ariakit/core/esm/utils/focus.js // src/utils/focus.ts var focus_selector = "input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false'])"; function focus_hasNegativeTabIndex(element) { const tabIndex = parseInt(element.getAttribute("tabindex") || "0", 10); return tabIndex < 0; } function focus_isFocusable(element) { if (!O35LWD4W_matches(element, focus_selector)) return false; if (!O35LWD4W_isVisible(element)) return false; if (O35LWD4W_closest(element, "[inert]")) return false; return true; } function focus_isTabbable(element) { if (!focus_isFocusable(element)) return false; if (focus_hasNegativeTabIndex(element)) return false; if (!("form" in element)) return true; if (!element.form) return true; if (element.checked) return true; if (element.type !== "radio") return true; const radioGroup = element.form.elements.namedItem(element.name); if (!radioGroup) return true; if (!("length" in radioGroup)) return true; const activeElement = O35LWD4W_getActiveElement(element); if (!activeElement) return true; if (activeElement === element) return true; if (!("form" in activeElement)) return true; if (activeElement.form !== element.form) return true; if (activeElement.name !== element.name) return true; return false; } function focus_getAllFocusableIn(container, includeContainer) { const elements = Array.from( container.querySelectorAll(focus_selector) ); if (includeContainer) { elements.unshift(container); } const focusableElements = elements.filter(focus_isFocusable); focusableElements.forEach((element, i) => { if (isFrame(element) && element.contentDocument) { const frameBody = element.contentDocument.body; focusableElements.splice(i, 1, ...focus_getAllFocusableIn(frameBody)); } }); return focusableElements; } function getAllFocusable(includeBody) { return focus_getAllFocusableIn(document.body, includeBody); } function focus_getFirstFocusableIn(container, includeContainer) { const [first] = focus_getAllFocusableIn(container, includeContainer); return first || null; } function getFirstFocusable(includeBody) { return focus_getFirstFocusableIn(document.body, includeBody); } function focus_getAllTabbableIn(container, includeContainer, fallbackToFocusable) { const elements = Array.from( container.querySelectorAll(focus_selector) ); const tabbableElements = elements.filter(focus_isTabbable); if (includeContainer && focus_isTabbable(container)) { tabbableElements.unshift(container); } tabbableElements.forEach((element, i) => { if (isFrame(element) && element.contentDocument) { const frameBody = element.contentDocument.body; const allFrameTabbable = focus_getAllTabbableIn( frameBody, false, fallbackToFocusable ); tabbableElements.splice(i, 1, ...allFrameTabbable); } }); if (!tabbableElements.length && fallbackToFocusable) { return elements; } return tabbableElements; } function getAllTabbable(fallbackToFocusable) { return focus_getAllTabbableIn(document.body, false, fallbackToFocusable); } function focus_getFirstTabbableIn(container, includeContainer, fallbackToFocusable) { const [first] = focus_getAllTabbableIn( container, includeContainer, fallbackToFocusable ); return first || null; } function getFirstTabbable(fallbackToFocusable) { return focus_getFirstTabbableIn(document.body, false, fallbackToFocusable); } function focus_getLastTabbableIn(container, includeContainer, fallbackToFocusable) { const allTabbable = focus_getAllTabbableIn( container, includeContainer, fallbackToFocusable ); return allTabbable[allTabbable.length - 1] || null; } function getLastTabbable(fallbackToFocusable) { return focus_getLastTabbableIn(document.body, false, fallbackToFocusable); } function focus_getNextTabbableIn(container, includeContainer, fallbackToFirst, fallbackToFocusable) { const activeElement = O35LWD4W_getActiveElement(container); const allFocusable = focus_getAllFocusableIn(container, includeContainer); const activeIndex = allFocusable.indexOf(activeElement); const nextFocusableElements = allFocusable.slice(activeIndex + 1); return nextFocusableElements.find(focus_isTabbable) || (fallbackToFirst ? allFocusable.find(focus_isTabbable) : null) || (fallbackToFocusable ? nextFocusableElements[0] : null) || null; } function getNextTabbable(fallbackToFirst, fallbackToFocusable) { return focus_getNextTabbableIn( document.body, false, fallbackToFirst, fallbackToFocusable ); } function focus_getPreviousTabbableIn(container, includeContainer, fallbackToLast, fallbackToFocusable) { const activeElement = O35LWD4W_getActiveElement(container); const allFocusable = focus_getAllFocusableIn(container, includeContainer).reverse(); const activeIndex = allFocusable.indexOf(activeElement); const previousFocusableElements = allFocusable.slice(activeIndex + 1); return previousFocusableElements.find(focus_isTabbable) || (fallbackToLast ? allFocusable.find(focus_isTabbable) : null) || (fallbackToFocusable ? previousFocusableElements[0] : null) || null; } function getPreviousTabbable(fallbackToFirst, fallbackToFocusable) { return focus_getPreviousTabbableIn( document.body, false, fallbackToFirst, fallbackToFocusable ); } function focus_getClosestFocusable(element) { while (element && !focus_isFocusable(element)) { element = closest(element, focus_selector); } return element || null; } function focus_hasFocus(element) { const activeElement = O35LWD4W_getActiveElement(element); if (!activeElement) return false; if (activeElement === element) return true; const activeDescendant = activeElement.getAttribute("aria-activedescendant"); if (!activeDescendant) return false; return activeDescendant === element.id; } function focus_hasFocusWithin(element) { const activeElement = O35LWD4W_getActiveElement(element); if (!activeElement) return false; if (O35LWD4W_contains(element, activeElement)) return true; const activeDescendant = activeElement.getAttribute("aria-activedescendant"); if (!activeDescendant) return false; if (!("id" in element)) return false; if (activeDescendant === element.id) return true; return !!element.querySelector(`#${CSS.escape(activeDescendant)}`); } function focus_focusIfNeeded(element) { if (!focus_hasFocusWithin(element) && focus_isFocusable(element)) { element.focus(); } } function disableFocus(element) { var _a; const currentTabindex = (_a = element.getAttribute("tabindex")) != null ? _a : ""; element.setAttribute("data-tabindex", currentTabindex); element.setAttribute("tabindex", "-1"); } function disableFocusIn(container, includeContainer) { const tabbableElements = focus_getAllTabbableIn(container, includeContainer); tabbableElements.forEach(disableFocus); } function restoreFocusIn(container) { const elements = container.querySelectorAll("[data-tabindex]"); const restoreTabIndex = (element) => { const tabindex = element.getAttribute("data-tabindex"); element.removeAttribute("data-tabindex"); if (tabindex) { element.setAttribute("tabindex", tabindex); } else { element.removeAttribute("tabindex"); } }; if (container.hasAttribute("data-tabindex")) { restoreTabIndex(container); } elements.forEach(restoreTabIndex); } function focusIntoView(element, options) { if (!("scrollIntoView" in element)) { element.focus(); } else { element.focus({ preventScroll: true }); element.scrollIntoView(_chunks_PNRLI7OV_spreadValues({ block: "nearest", inline: "nearest" }, options)); } } ;// CONCATENATED MODULE: ./node_modules/@ariakit/core/esm/__chunks/UCFCIHEU.js // src/utils/platform.ts function isTouchDevice() { return O35LWD4W_canUseDOM && !!navigator.maxTouchPoints; } function UCFCIHEU_isApple() { if (!O35LWD4W_canUseDOM) return false; return /mac|iphone|ipad|ipod/i.test(navigator.platform); } function isSafari() { return O35LWD4W_canUseDOM && UCFCIHEU_isApple() && /apple/i.test(navigator.vendor); } function isFirefox() { return O35LWD4W_canUseDOM && /firefox\//i.test(navigator.userAgent); } function isMac() { return O35LWD4W_canUseDOM && navigator.platform.startsWith("Mac") && !isTouchDevice(); } ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/MYID4V27.js // src/focusable/focusable.ts var isSafariBrowser = isSafari(); var alwaysFocusVisibleInputTypes = [ "text", "search", "url", "tel", "email", "password", "number", "date", "month", "week", "time", "datetime", "datetime-local" ]; function isAlwaysFocusVisible(element) { const { tagName, readOnly, type } = element; if (tagName === "TEXTAREA" && !readOnly) return true; if (tagName === "SELECT" && !readOnly) return true; if (tagName === "INPUT" && !readOnly) { return alwaysFocusVisibleInputTypes.includes(type); } if (element.isContentEditable) return true; return false; } function isAlwaysFocusVisibleDelayed(element) { const role = element.getAttribute("role"); if (role !== "combobox") return false; return !!element.dataset.name; } function getLabels(element) { if ("labels" in element) { return element.labels; } return null; } function isNativeCheckboxOrRadio(element) { const tagName = element.tagName.toLowerCase(); if (tagName === "input" && element.type) { return element.type === "radio" || element.type === "checkbox"; } return false; } function MYID4V27_isNativeTabbable(tagName) { if (!tagName) return true; return tagName === "button" || tagName === "input" || tagName === "select" || tagName === "textarea" || tagName === "a"; } function MYID4V27_supportsDisabledAttribute(tagName) { if (!tagName) return true; return tagName === "button" || tagName === "input" || tagName === "select" || tagName === "textarea"; } function MYID4V27_getTabIndex(focusable, trulyDisabled, nativeTabbable, supportsDisabled, tabIndexProp) { if (!focusable) { return tabIndexProp; } if (trulyDisabled) { if (nativeTabbable && !supportsDisabled) { return -1; } return; } if (nativeTabbable) { return tabIndexProp; } return tabIndexProp || 0; } function MYID4V27_useDisableEvent(onEvent, disabled) { return useEvent((event) => { onEvent == null ? void 0 : onEvent(event); if (event.defaultPrevented) return; if (disabled) { event.stopPropagation(); event.preventDefault(); } }); } var isKeyboardModality = true; function onGlobalMouseDown(event) { const target = event.target; if (target && "hasAttribute" in target) { if (!target.hasAttribute("data-focus-visible")) { isKeyboardModality = false; } } } function onGlobalKeyDown(event) { if (event.metaKey) return; if (event.ctrlKey) return; if (event.altKey) return; isKeyboardModality = true; } var useFocusable = NQJBHION_createHook( (_a) => { var _b = _a, { focusable = true, accessibleWhenDisabled, autoFocus, onFocusVisible } = _b, props = __objRest(_b, [ "focusable", "accessibleWhenDisabled", "autoFocus", "onFocusVisible" ]); const ref = (0,external_React_.useRef)(null); (0,external_React_.useEffect)(() => { if (!focusable) return; addGlobalEventListener("mousedown", onGlobalMouseDown, true); addGlobalEventListener("keydown", onGlobalKeyDown, true); }, [focusable]); if (isSafariBrowser) { (0,external_React_.useEffect)(() => { if (!focusable) return; const element = ref.current; if (!element) return; if (!isNativeCheckboxOrRadio(element)) return; const labels = getLabels(element); if (!labels) return; const onMouseUp = () => queueMicrotask(() => element.focus()); labels.forEach((label) => label.addEventListener("mouseup", onMouseUp)); return () => { labels.forEach( (label) => label.removeEventListener("mouseup", onMouseUp) ); }; }, [focusable]); } const disabled = focusable && props.disabled; const trulyDisabled = !!disabled && !accessibleWhenDisabled; const [focusVisible, setFocusVisible] = (0,external_React_.useState)(false); (0,external_React_.useEffect)(() => { if (!focusable) return; if (trulyDisabled && focusVisible) { setFocusVisible(false); } }, [focusable, trulyDisabled, focusVisible]); (0,external_React_.useEffect)(() => { if (!focusable) return; if (!focusVisible) return; const element = ref.current; if (!element) return; if (typeof IntersectionObserver === "undefined") return; const observer = new IntersectionObserver(() => { if (!focus_isFocusable(element)) { setFocusVisible(false); } }); observer.observe(element); return () => observer.disconnect(); }, [focusable, focusVisible]); const onKeyPressCapture = MYID4V27_useDisableEvent( props.onKeyPressCapture, disabled ); const onMouseDownCapture = MYID4V27_useDisableEvent( props.onMouseDownCapture, disabled ); const onClickCapture = MYID4V27_useDisableEvent(props.onClickCapture, disabled); const onMouseDownProp = props.onMouseDown; const onMouseDown = useEvent((event) => { onMouseDownProp == null ? void 0 : onMouseDownProp(event); if (event.defaultPrevented) return; if (!focusable) return; const element = event.currentTarget; if (!isSafariBrowser) return; if (events_isPortalEvent(event)) return; if (!O35LWD4W_isButton(element) && !isNativeCheckboxOrRadio(element)) return; let receivedFocus = false; const onFocus = () => { receivedFocus = true; }; const options = { capture: true, once: true }; element.addEventListener("focusin", onFocus, options); queueBeforeEvent(element, "mouseup", () => { element.removeEventListener("focusin", onFocus, true); if (receivedFocus) return; focus_focusIfNeeded(element); }); }); const handleFocusVisible = (event, currentTarget) => { if (currentTarget) { event.currentTarget = currentTarget; } onFocusVisible == null ? void 0 : onFocusVisible(event); if (event.defaultPrevented) return; if (!focusable) return; const element = event.currentTarget; if (!element) return; if (!focus_hasFocus(element)) return; setFocusVisible(true); }; const onKeyDownCaptureProp = props.onKeyDownCapture; const onKeyDownCapture = useEvent( (event) => { onKeyDownCaptureProp == null ? void 0 : onKeyDownCaptureProp(event); if (event.defaultPrevented) return; if (!focusable) return; if (focusVisible) return; if (event.metaKey) return; if (event.altKey) return; if (event.ctrlKey) return; if (!events_isSelfTarget(event)) return; const element = event.currentTarget; queueMicrotask(() => handleFocusVisible(event, element)); } ); const onFocusCaptureProp = props.onFocusCapture; const onFocusCapture = useEvent((event) => { onFocusCaptureProp == null ? void 0 : onFocusCaptureProp(event); if (event.defaultPrevented) return; if (!focusable) return; if (!events_isSelfTarget(event)) { setFocusVisible(false); return; } const element = event.currentTarget; const applyFocusVisible = () => handleFocusVisible(event, element); if (isKeyboardModality || isAlwaysFocusVisible(event.target)) { queueMicrotask(applyFocusVisible); } else if (isAlwaysFocusVisibleDelayed(event.target)) { queueBeforeEvent(event.target, "focusout", applyFocusVisible); } else { setFocusVisible(false); } }); const onBlurProp = props.onBlur; const onBlur = useEvent((event) => { onBlurProp == null ? void 0 : onBlurProp(event); if (!focusable) return; if (!isFocusEventOutside(event)) return; setFocusVisible(false); }); const autoFocusOnShow = (0,external_React_.useContext)(FocusableContext); const autoFocusRef = useEvent((element) => { if (!focusable) return; if (!autoFocus) return; if (!element) return; if (!autoFocusOnShow) return; queueMicrotask(() => { if (focus_hasFocus(element)) return; if (!focus_isFocusable(element)) return; element.focus(); }); }); const tagName = useTagName(ref, props.as); const nativeTabbable = focusable && MYID4V27_isNativeTabbable(tagName); const supportsDisabled = focusable && MYID4V27_supportsDisabledAttribute(tagName); const style = trulyDisabled ? PNRLI7OV_spreadValues({ pointerEvents: "none" }, props.style) : props.style; props = PNRLI7OV_spreadProps(PNRLI7OV_spreadValues({ "data-focus-visible": focusable && focusVisible ? "" : void 0, "data-autofocus": autoFocus ? true : void 0, "aria-disabled": disabled ? true : void 0 }, props), { ref: useMergeRefs(ref, autoFocusRef, props.ref), style, tabIndex: MYID4V27_getTabIndex( focusable, trulyDisabled, nativeTabbable, supportsDisabled, props.tabIndex ), disabled: supportsDisabled && trulyDisabled ? true : void 0, // TODO: Test Focusable contentEditable. contentEditable: disabled ? void 0 : props.contentEditable, onKeyPressCapture, onClickCapture, onMouseDownCapture, onMouseDown, onKeyDownCapture, onFocusCapture, onBlur }); return props; } ); var Focusable = NQJBHION_createComponent((props) => { props = useFocusable(props); return NQJBHION_createElement("div", props); }); if (false) {} ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/I3PXTXPI.js // src/hovercard/hovercard-anchor.ts var useHovercardAnchor = NQJBHION_createHook( (_a) => { var _b = _a, { store, showOnHover = true } = _b, props = __objRest(_b, ["store", "showOnHover"]); const disabled = props.disabled || props["aria-disabled"] === true || props["aria-disabled"] === "true"; const showTimeoutRef = (0,external_React_.useRef)(0); (0,external_React_.useEffect)(() => () => window.clearTimeout(showTimeoutRef.current), []); (0,external_React_.useEffect)(() => { const onMouseLeave = (event) => { const { anchorElement } = store.getState(); if (!anchorElement) return; if (event.target !== anchorElement) return; window.clearTimeout(showTimeoutRef.current); showTimeoutRef.current = 0; }; return addGlobalEventListener("mouseleave", onMouseLeave, true); }, [store]); const onMouseMoveProp = props.onMouseMove; const showOnHoverProp = useBooleanEvent(showOnHover); const isMouseMoving = useIsMouseMoving(); const onMouseMove = useEvent( (event) => { store.setAnchorElement(event.currentTarget); onMouseMoveProp == null ? void 0 : onMouseMoveProp(event); if (disabled) return; if (event.defaultPrevented) return; if (showTimeoutRef.current) return; if (!isMouseMoving()) return; if (!showOnHoverProp(event)) return; const { showTimeout, timeout } = store.getState(); showTimeoutRef.current = window.setTimeout(() => { showTimeoutRef.current = 0; if (!isMouseMoving()) return; store.show(); }, showTimeout != null ? showTimeout : timeout); } ); props = PNRLI7OV_spreadProps(PNRLI7OV_spreadValues({}, props), { ref: useMergeRefs(store.setAnchorElement, props.ref), onMouseMove }); props = useFocusable(props); return props; } ); var HovercardAnchor = NQJBHION_createComponent( (props) => { const htmlProps = useHovercardAnchor(props); return NQJBHION_createElement("a", htmlProps); } ); if (false) {} ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/tooltip/tooltip-anchor.js // src/tooltip/tooltip-anchor.ts var globalStore = createStore({ activeStore: null }); var useTooltipAnchor = NQJBHION_createHook( (_a) => { var _b = _a, { store, showOnHover = true } = _b, props = __objRest(_b, ["store", "showOnHover"]); (0,external_React_.useEffect)(() => { return store.sync( (state) => { if (state.mounted) { const { activeStore } = globalStore.getState(); if (activeStore !== store) { activeStore == null ? void 0 : activeStore.hide(); } return globalStore.setState("activeStore", store); } const id = setTimeout(() => { const { activeStore } = globalStore.getState(); if (activeStore !== store) return; globalStore.setState("activeStore", null); }, state.skipTimeout); return () => clearTimeout(id); }, ["mounted", "skipTimeout"] ); }, [store]); const onFocusVisibleProp = props.onFocusVisible; const onFocusVisible = useEvent((event) => { onFocusVisibleProp == null ? void 0 : onFocusVisibleProp(event); if (event.defaultPrevented) return; store.setAnchorElement(event.currentTarget); store.show(); }); const onBlurProp = props.onBlur; const onBlur = useEvent((event) => { onBlurProp == null ? void 0 : onBlurProp(event); if (event.defaultPrevented) return; const { activeStore } = globalStore.getState(); if (activeStore === store) { globalStore.setState("activeStore", null); } }); const type = store.useState("type"); const contentId = store.useState((state) => { var _a2; return (_a2 = state.contentElement) == null ? void 0 : _a2.id; }); props = PNRLI7OV_spreadProps(PNRLI7OV_spreadValues({ "aria-labelledby": type === "label" ? contentId : void 0, "aria-describedby": type === "description" ? contentId : void 0 }, props), { onFocusVisible, onBlur }); props = useHovercardAnchor(PNRLI7OV_spreadValues({ store, showOnHover: (event) => { if (isFalsyBooleanCallback(showOnHover, event)) return false; const { activeStore } = globalStore.getState(); if (!activeStore) return true; store.show(); return false; } }, props)); return props; } ); var TooltipAnchor = NQJBHION_createComponent((props) => { const htmlProps = useTooltipAnchor(props); return NQJBHION_createElement("div", htmlProps); }); if (false) {} ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/X7FKJQME.js // src/hovercard/utils/polygon.ts function getEventPoint(event) { return [event.clientX, event.clientY]; } function isPointInPolygon(point, polygon) { const [x, y] = point; let inside = false; const length = polygon.length; for (let l = length, i = 0, j = l - 1; i < l; j = i++) { const [xi, yi] = polygon[i]; const [xj, yj] = polygon[j]; const [, vy] = polygon[j === 0 ? l - 1 : j - 1] || [0, 0]; const where = (yi - yj) * (x - xi) - (xi - xj) * (y - yi); if (yj < yi) { if (y >= yj && y < yi) { if (where === 0) return true; if (where > 0) { if (y === yj) { if (y > vy) { inside = !inside; } } else { inside = !inside; } } } } else if (yi < yj) { if (y > yi && y <= yj) { if (where === 0) return true; if (where < 0) { if (y === yj) { if (y < vy) { inside = !inside; } } else { inside = !inside; } } } } else if (y == yi && (x >= xj && x <= xi || x >= xi && x <= xj)) { return true; } } return inside; } function getEnterPointPlacement(enterPoint, rect) { const { top, right, bottom, left } = rect; const [x, y] = enterPoint; const placementX = x < left ? "left" : x > right ? "right" : null; const placementY = y < top ? "top" : y > bottom ? "bottom" : null; return [placementX, placementY]; } function getElementPolygon(element, enterPoint) { const rect = element.getBoundingClientRect(); const { top, right, bottom, left } = rect; const [x, y] = getEnterPointPlacement(enterPoint, rect); const polygon = [enterPoint]; if (x) { if (y !== "top") { polygon.push([x === "left" ? left : right, top]); } polygon.push([x === "left" ? right : left, top]); polygon.push([x === "left" ? right : left, bottom]); if (y !== "bottom") { polygon.push([x === "left" ? left : right, bottom]); } } else if (y === "top") { polygon.push([left, top]); polygon.push([left, bottom]); polygon.push([right, bottom]); polygon.push([right, top]); } else { polygon.push([left, bottom]); polygon.push([left, top]); polygon.push([right, top]); polygon.push([right, bottom]); } return polygon; } ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/IXXFVVA2.js // src/dialog/utils/is-backdrop.ts function isBackdrop(element, ...ids) { if (!element) return false; const backdrop = element.getAttribute("data-backdrop"); if (backdrop == null) return false; if (backdrop === "") return true; if (backdrop === "true") return true; if (!ids.length) return true; return ids.some((id) => backdrop === id); } ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/FW6QFGFT.js // src/dialog/utils/orchestrate.ts var cleanups = /* @__PURE__ */ new WeakMap(); function orchestrate(element, key, setup) { if (!cleanups.has(element)) { cleanups.set(element, /* @__PURE__ */ new Map()); } const elementCleanups = cleanups.get(element); const prevCleanup = elementCleanups.get(key); if (!prevCleanup) { elementCleanups.set(key, setup()); return () => { var _a; (_a = elementCleanups.get(key)) == null ? void 0 : _a(); elementCleanups.delete(key); }; } const cleanup = setup(); const nextCleanup = () => { cleanup(); prevCleanup(); elementCleanups.delete(key); }; elementCleanups.set(key, nextCleanup); return () => { const isCurrent = elementCleanups.get(key) === nextCleanup; if (!isCurrent) return; cleanup(); elementCleanups.set(key, prevCleanup); }; } function setAttribute(element, attr, value) { const setup = () => { const previousValue = element.getAttribute(attr); element.setAttribute(attr, value); return () => { if (previousValue == null) { element.removeAttribute(attr); } else { element.setAttribute(attr, previousValue); } }; }; return orchestrate(element, attr, setup); } function setProperty(element, property, value) { const setup = () => { const exists = property in element; const previousValue = element[property]; element[property] = value; return () => { if (!exists) { delete element[property]; } else { element[property] = previousValue; } }; }; return orchestrate(element, property, setup); } function assignStyle(element, style) { if (!element) return () => { }; const setup = () => { const prevStyle = element.style.cssText; Object.assign(element.style, style); return () => { element.style.cssText = prevStyle; }; }; return orchestrate(element, "style", setup); } function setCSSProperty(element, property, value) { if (!element) return () => { }; const setup = () => { const previousValue = element.style.getPropertyValue(property); element.style.setProperty(property, value); return () => { if (previousValue) { element.style.setProperty(property, previousValue); } else { element.style.removeProperty(property); } }; }; return orchestrate(element, property, setup); } ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/FV23EKJL.js // src/dialog/utils/walk-tree-outside.ts var ignoreTags = ["SCRIPT", "STYLE"]; function isValidElement(element, ignoredElements) { if (ignoreTags.includes(element.tagName)) return false; return !ignoredElements.some( (enabledElement) => enabledElement && O35LWD4W_contains(element, enabledElement) ); } function walkTreeOutside(elements, callback, ancestorCallback) { for (let element of elements) { if (!(element == null ? void 0 : element.isConnected)) continue; const hasAncestorAlready = elements.some((maybeAncestor) => { if (!maybeAncestor) return false; if (maybeAncestor === element) return false; return maybeAncestor.contains(element); }); const doc = O35LWD4W_getDocument(element); while (element.parentElement && element !== doc.body) { ancestorCallback == null ? void 0 : ancestorCallback(element.parentElement); if (!hasAncestorAlready) { for (const child of element.parentElement.children) { if (isValidElement(child, elements)) { callback(child); } } } element = element.parentElement; } } } ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/HCZMY53N.js // src/dialog/utils/mark-tree-outside.ts function getPropertyName(id = "", ancestor = false) { return `__ariakit-dialog-${ancestor ? "ancestor" : "outside"}${id ? `-${id}` : ""}`; } function markElement(element, id = "") { return chain( setProperty(element, getPropertyName(), true), setProperty(element, getPropertyName(id), true) ); } function markAncestor(element, id = "") { return chain( setProperty(element, getPropertyName("", true), true), setProperty(element, getPropertyName(id, true), true) ); } function isElementMarked(element, id) { const ancestorProperty = getPropertyName(id, true); if (element[ancestorProperty]) return true; const elementProperty = getPropertyName(id); do { if (element[elementProperty]) return true; if (!element.parentElement) return false; element = element.parentElement; } while (true); } function markTreeOutside(dialogId, ...elements) { const cleanups = []; const ids = elements.map((el) => el == null ? void 0 : el.id); walkTreeOutside( elements, (element) => { if (isBackdrop(element, ...ids)) return; cleanups.unshift(markElement(element, dialogId)); }, (ancestor) => cleanups.unshift(markAncestor(ancestor, dialogId)) ); const restoreAccessibilityTree = () => { cleanups.forEach((fn) => fn()); }; return restoreAccessibilityTree; } ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/4PKIGBPJ.js // src/role/role.ts var _4PKIGBPJ_useRole = NQJBHION_createHook((props) => { return props; }); var _4PKIGBPJ_Role = NQJBHION_createComponent((props) => { return NQJBHION_createElement("div", props); }); if (false) {} ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/WHEEIXMF.js // src/disclosure/disclosure-content.ts function afterTimeout(timeoutMs, cb) { const timeoutId = setTimeout(cb, timeoutMs); return () => clearTimeout(timeoutId); } function WHEEIXMF_afterPaint(cb) { let raf = requestAnimationFrame(() => { raf = requestAnimationFrame(cb); }); return () => cancelAnimationFrame(raf); } function parseCSSTime(...times) { return times.join(", ").split(", ").reduce((longestTime, currentTimeString) => { const currentTime = parseFloat(currentTimeString || "0s") * 1e3; if (currentTime > longestTime) return currentTime; return longestTime; }, 0); } function isHidden(mounted, hidden, alwaysVisible) { return !alwaysVisible && hidden !== false && (!mounted || !!hidden); } var useDisclosureContent = NQJBHION_createHook( (_a) => { var _b = _a, { store, alwaysVisible } = _b, props = __objRest(_b, ["store", "alwaysVisible"]); const id = useId(props.id); const [transition, setTransition] = (0,external_React_.useState)(null); const open = store.useState("open"); const mounted = store.useState("mounted"); const animated = store.useState("animated"); const contentElement = store.useState("contentElement"); useSafeLayoutEffect(() => { if (!animated) return; if (!(contentElement == null ? void 0 : contentElement.isConnected)) { setTransition(null); return; } return WHEEIXMF_afterPaint(() => { setTransition(open ? "enter" : "leave"); }); }, [animated, contentElement, open]); useSafeLayoutEffect(() => { if (!animated) return; if (!contentElement) return; if (!transition) return; if (transition === "enter" && !open) return; if (transition === "leave" && open) return; if (typeof animated === "number") { const timeoutMs2 = animated; return afterTimeout(timeoutMs2, store.stopAnimation); } const { transitionDuration, animationDuration, transitionDelay, animationDelay } = getComputedStyle(contentElement); const delay = parseCSSTime(transitionDelay, animationDelay); const duration = parseCSSTime(transitionDuration, animationDuration); const timeoutMs = delay + duration; if (!timeoutMs) return; return afterTimeout(timeoutMs, store.stopAnimation); }, [animated, contentElement, open, transition]); const hidden = isHidden(mounted, props.hidden, alwaysVisible); const style = hidden ? PNRLI7OV_spreadProps(PNRLI7OV_spreadValues({}, props.style), { display: "none" }) : props.style; props = PNRLI7OV_spreadProps(PNRLI7OV_spreadValues({ id, "data-enter": transition === "enter" ? "" : void 0, "data-leave": transition === "leave" ? "" : void 0, hidden }, props), { ref: useMergeRefs(id ? store.setContentElement : null, props.ref), style }); return props; } ); var DisclosureContent = NQJBHION_createComponent( (props) => { const htmlProps = useDisclosureContent(props); return NQJBHION_createElement("div", htmlProps); } ); if (false) {} ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/53MSBYTF.js // src/dialog/dialog-backdrop.tsx function DialogBackdrop({ store, backdrop, backdropProps, alwaysVisible, hidden }) { const ref = (0,external_React_.useRef)(null); const disclosure = useDisclosureStore({ disclosure: store }); const contentElement = store.useState("contentElement"); useSafeLayoutEffect(() => { const backdrop2 = ref.current; const dialog = contentElement; if (!backdrop2) return; if (!dialog) return; backdrop2.style.zIndex = getComputedStyle(dialog).zIndex; }, [contentElement]); useSafeLayoutEffect(() => { const id = contentElement == null ? void 0 : contentElement.id; if (!id) return; const backdrop2 = ref.current; if (!backdrop2) return; return markAncestor(backdrop2, id); }, [contentElement]); if (hidden != null) { backdropProps = PNRLI7OV_spreadProps(PNRLI7OV_spreadValues({}, backdropProps), { hidden }); } const props = useDisclosureContent(PNRLI7OV_spreadProps(PNRLI7OV_spreadValues({ store: disclosure, role: "presentation", "data-backdrop": (contentElement == null ? void 0 : contentElement.id) || "", alwaysVisible }, backdropProps), { ref: useMergeRefs(backdropProps == null ? void 0 : backdropProps.ref, ref), style: PNRLI7OV_spreadValues({ position: "fixed", top: 0, right: 0, bottom: 0, left: 0 }, backdropProps == null ? void 0 : backdropProps.style) })); if (!backdrop) return null; if ((0,external_React_.isValidElement)(backdrop)) { return /* @__PURE__ */ (0,jsx_runtime.jsx)(_4PKIGBPJ_Role, PNRLI7OV_spreadProps(PNRLI7OV_spreadValues({}, props), { render: backdrop })); } const Component = typeof backdrop !== "boolean" ? backdrop : "div"; return /* @__PURE__ */ (0,jsx_runtime.jsx)(_4PKIGBPJ_Role, PNRLI7OV_spreadProps(PNRLI7OV_spreadValues({}, props), { render: /* @__PURE__ */ (0,jsx_runtime.jsx)(Component, {}) })); } ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/CYJJUQU3.js // src/dialog/utils/disable-accessibility-tree-outside.ts function hideElementFromAccessibilityTree(element) { return setAttribute(element, "aria-hidden", "true"); } function disableAccessibilityTreeOutside(...elements) { const cleanups = []; const ids = elements.map((el) => el == null ? void 0 : el.id); walkTreeOutside(elements, (element) => { if (isBackdrop(element, ...ids)) return; cleanups.unshift(hideElementFromAccessibilityTree(element)); }); const restoreAccessibilityTree = () => { cleanups.forEach((fn) => fn()); }; return restoreAccessibilityTree; } ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/KOVUJERF.js // src/dialog/utils/supports-inert.ts function supportsInert() { return "inert" in HTMLElement.prototype; } ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/AR6DTI3S.js // src/dialog/utils/disable-tree-outside.ts function disableElement(element) { if (!("style" in element)) return noop; if (supportsInert()) { return setProperty(element, "inert", true); } return chain( hideElementFromAccessibilityTree(element), assignStyle(element, { pointerEvents: "none", userSelect: "none", cursor: "default" }) ); } function disableTreeOutside(...elements) { const cleanups = []; const ids = elements.map((el) => el == null ? void 0 : el.id); if (!supportsInert()) { getAllTabbable().forEach((element) => { if (elements.some((el) => el && O35LWD4W_contains(el, element))) return; cleanups.unshift(setAttribute(element, "tabindex", "-1")); }); } walkTreeOutside(elements, (element) => { if (isBackdrop(element, ...ids)) return; cleanups.unshift(disableElement(element)); }); const restoreTreeOutside = () => { cleanups.forEach((fn) => fn()); }; return restoreTreeOutside; } ;// CONCATENATED MODULE: external "ReactDOM" var external_ReactDOM_namespaceObject = window["ReactDOM"]; var external_ReactDOM_default = /*#__PURE__*/__webpack_require__.n(external_ReactDOM_namespaceObject); ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/CJI67A3R.js // src/dialog/utils/use-root-dialog.ts function useRootDialog({ attribute, contentId, contentElement, enabled }) { const [updated, retry] = useForceUpdate(); const isRootDialog = (0,external_React_.useCallback)(() => { if (!enabled) return false; if (!contentElement) return false; const { body } = O35LWD4W_getDocument(contentElement); const id = body.getAttribute(attribute); return !id || id === contentId; }, [updated, enabled, contentElement, attribute, contentId]); (0,external_React_.useEffect)(() => { if (!enabled) return; if (!contentId) return; if (!contentElement) return; const { body } = O35LWD4W_getDocument(contentElement); if (isRootDialog()) { body.setAttribute(attribute, contentId); return () => body.removeAttribute(attribute); } const observer = new MutationObserver(() => (0,external_ReactDOM_namespaceObject.flushSync)(retry)); observer.observe(body, { attributeFilter: [attribute] }); return () => observer.disconnect(); }, [updated, enabled, contentId, contentElement, isRootDialog, attribute]); return isRootDialog; } ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/3LAWLNOX.js // src/dialog/utils/use-prevent-body-scroll.ts function getPaddingProperty(documentElement) { const documentLeft = documentElement.getBoundingClientRect().left; const scrollbarX = Math.round(documentLeft) + documentElement.scrollLeft; return scrollbarX ? "paddingLeft" : "paddingRight"; } function usePreventBodyScroll(contentElement, contentId, enabled) { const isRootDialog = useRootDialog({ attribute: "data-dialog-prevent-body-scroll", contentElement, contentId, enabled }); (0,external_React_.useEffect)(() => { if (!isRootDialog()) return; if (!contentElement) return; const doc = O35LWD4W_getDocument(contentElement); const win = O35LWD4W_getWindow(contentElement); const { documentElement, body } = doc; const cssScrollbarWidth = documentElement.style.getPropertyValue("--scrollbar-width"); const scrollbarWidth = cssScrollbarWidth ? parseInt(cssScrollbarWidth) : win.innerWidth - documentElement.clientWidth; const setScrollbarWidthProperty = () => setCSSProperty( documentElement, "--scrollbar-width", `${scrollbarWidth}px` ); const paddingProperty = getPaddingProperty(documentElement); const setStyle = () => assignStyle(body, { overflow: "hidden", [paddingProperty]: `${scrollbarWidth}px` }); const setIOSStyle = () => { var _a, _b; const { scrollX, scrollY, visualViewport } = win; const offsetLeft = (_a = visualViewport == null ? void 0 : visualViewport.offsetLeft) != null ? _a : 0; const offsetTop = (_b = visualViewport == null ? void 0 : visualViewport.offsetTop) != null ? _b : 0; const restoreStyle = assignStyle(body, { position: "fixed", overflow: "hidden", top: `${-(scrollY - Math.floor(offsetTop))}px`, left: `${-(scrollX - Math.floor(offsetLeft))}px`, right: "0", [paddingProperty]: `${scrollbarWidth}px` }); return () => { restoreStyle(); if (true) { win.scrollTo(scrollX, scrollY); } }; }; const isIOS = UCFCIHEU_isApple() && !isMac(); return chain( setScrollbarWidthProperty(), isIOS ? setIOSStyle() : setStyle() ); }, [isRootDialog, contentElement]); } ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/OEA63YXU.js // src/dialog/utils/use-nested-dialogs.tsx var NestedDialogsContext = (0,external_React_.createContext)({}); function useNestedDialogs(store) { const context = (0,external_React_.useContext)(NestedDialogsContext); const [dialogs, setDialogs] = (0,external_React_.useState)([]); const add = (0,external_React_.useCallback)( (dialog) => { var _a; setDialogs((dialogs2) => [...dialogs2, dialog]); return chain((_a = context.add) == null ? void 0 : _a.call(context, dialog), () => { setDialogs((dialogs2) => dialogs2.filter((d) => d !== dialog)); }); }, [context] ); useSafeLayoutEffect(() => { return store.sync( (state) => { var _a; if (!state.open) return; if (!state.contentElement) return; return (_a = context.add) == null ? void 0 : _a.call(context, store); }, ["open", "contentElement"] ); }, [store, context]); useSafeLayoutEffect(() => { var _a; return (_a = context.store) == null ? void 0 : _a.sync( (state) => { if (state.open) return; store.hide(); }, ["open"] ); }, [context, store]); const providerValue = (0,external_React_.useMemo)(() => ({ store, add }), [store, add]); const wrapElement = (0,external_React_.useCallback)( (element) => /* @__PURE__ */ (0,jsx_runtime.jsx)(NestedDialogsContext.Provider, { value: providerValue, children: element }), [providerValue] ); return { wrapElement, nestedDialogs: dialogs }; } ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/7JNF6I52.js // src/dialog/utils/use-previous-mouse-down-ref.ts function usePreviousMouseDownRef(enabled) { const previousMouseDownRef = (0,external_React_.useRef)(); (0,external_React_.useEffect)(() => { if (!enabled) { previousMouseDownRef.current = null; return; } const onMouseDown = (event) => { previousMouseDownRef.current = event.target; }; return addGlobalEventListener("mousedown", onMouseDown, true); }, [enabled]); return previousMouseDownRef; } ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/4XWTU3WN.js // src/dialog/utils/use-hide-on-interact-outside.ts function isInDocument(target) { if (target.tagName === "HTML") return true; return O35LWD4W_contains(O35LWD4W_getDocument(target).body, target); } function isDisclosure(disclosure, target) { if (!disclosure) return false; if (O35LWD4W_contains(disclosure, target)) return true; const activeId = target.getAttribute("aria-activedescendant"); if (activeId) { const activeElement = O35LWD4W_getDocument(disclosure).getElementById(activeId); if (activeElement) { return O35LWD4W_contains(disclosure, activeElement); } } return false; } function isMouseEventOnDialog(event, dialog) { if (!("clientY" in event)) return false; const rect = dialog.getBoundingClientRect(); if (rect.width === 0 || rect.height === 0) return false; return rect.top <= event.clientY && event.clientY <= rect.top + rect.height && rect.left <= event.clientX && event.clientX <= rect.left + rect.width; } function useEventOutside({ store, type, listener, capture }) { const callListener = useEvent(listener); const open = store.useState("open"); (0,external_React_.useEffect)(() => { if (!open) return; const onEvent = (event) => { const { contentElement, disclosureElement } = store.getState(); const target = event.target; if (!contentElement) return; if (!target) return; if (!isInDocument(target)) return; if (O35LWD4W_contains(contentElement, target)) return; if (isDisclosure(disclosureElement, target)) return; if (target.hasAttribute("data-focus-trap")) return; if (isMouseEventOnDialog(event, contentElement)) return; if (!isElementMarked(target, contentElement.id)) return; callListener(event); }; return addGlobalEventListener(type, onEvent, capture); }, [open, capture]); } function shouldHideOnInteractOutside(hideOnInteractOutside, event) { if (typeof hideOnInteractOutside === "function") { return hideOnInteractOutside(event); } return !!hideOnInteractOutside; } function useHideOnInteractOutside(store, hideOnInteractOutside) { const open = store.useState("open"); const previousMouseDownRef = usePreviousMouseDownRef(open); const props = { store, capture: true }; useEventOutside(PNRLI7OV_spreadProps(PNRLI7OV_spreadValues({}, props), { type: "click", listener: (event) => { const { contentElement } = store.getState(); const previousMouseDown = previousMouseDownRef.current; if (!previousMouseDown) return; if (!O35LWD4W_isVisible(previousMouseDown)) return; if (!isElementMarked(previousMouseDown, contentElement == null ? void 0 : contentElement.id)) return; if (!shouldHideOnInteractOutside(hideOnInteractOutside, event)) return; store.hide(); } })); useEventOutside(PNRLI7OV_spreadProps(PNRLI7OV_spreadValues({}, props), { type: "focusin", listener: (event) => { const { contentElement } = store.getState(); if (!contentElement) return; if (event.target === O35LWD4W_getDocument(contentElement)) return; if (!shouldHideOnInteractOutside(hideOnInteractOutside, event)) return; store.hide(); } })); useEventOutside(PNRLI7OV_spreadProps(PNRLI7OV_spreadValues({}, props), { type: "contextmenu", listener: (event) => { if (!shouldHideOnInteractOutside(hideOnInteractOutside, event)) return; store.hide(); } })); } ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/62DFK33R.js // src/dialog/utils/prepend-hidden-dismiss.ts function prependHiddenDismiss(container, onClick) { const document = O35LWD4W_getDocument(container); const button = document.createElement("button"); button.type = "button"; button.tabIndex = -1; button.textContent = "Dismiss popup"; Object.assign(button.style, { border: "0px", clip: "rect(0 0 0 0)", height: "1px", margin: "-1px", overflow: "hidden", padding: "0px", position: "absolute", whiteSpace: "nowrap", width: "1px" }); button.addEventListener("click", onClick); container.prepend(button); const removeHiddenDismiss = () => { button.removeEventListener("click", onClick); button.remove(); }; return removeHiddenDismiss; } ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/IYNN2ZO5.js // src/focusable/focusable-container.tsx var useFocusableContainer = NQJBHION_createHook( (_a) => { var _b = _a, { autoFocusOnShow = true } = _b, props = __objRest(_b, ["autoFocusOnShow"]); props = useWrapElement( props, (element) => /* @__PURE__ */ (0,jsx_runtime.jsx)(FocusableContext.Provider, { value: autoFocusOnShow, children: element }), [autoFocusOnShow] ); return props; } ); var FocusableContainer = NQJBHION_createComponent( (props) => { const htmlProps = useFocusableContainer(props); return NQJBHION_createElement("div", htmlProps); } ); if (false) {} ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/COQHFAEN.js // src/heading/heading-context.ts var HeadingContext = (0,external_React_.createContext)(0); ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/6OMX4H3W.js // src/heading/heading-level.tsx function HeadingLevel({ level, children }) { const contextLevel = (0,external_React_.useContext)(HeadingContext); const nextLevel = Math.max( Math.min(level || contextLevel + 1, 6), 1 ); return /* @__PURE__ */ (0,jsx_runtime.jsx)(HeadingContext.Provider, { value: nextLevel, children }); } ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/FL2AU7YJ.js // src/visually-hidden/visually-hidden.ts var useVisuallyHidden = NQJBHION_createHook((props) => { props = PNRLI7OV_spreadProps(PNRLI7OV_spreadValues({}, props), { style: PNRLI7OV_spreadValues({ border: 0, clip: "rect(0 0 0 0)", height: "1px", margin: "-1px", overflow: "hidden", padding: 0, position: "absolute", whiteSpace: "nowrap", width: "1px" }, props.style) }); return props; }); var VisuallyHidden = NQJBHION_createComponent( (props) => { const htmlProps = useVisuallyHidden(props); return NQJBHION_createElement("span", htmlProps); } ); if (false) {} ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/EJ3GIT5B.js // src/focus-trap/focus-trap.ts var useFocusTrap = NQJBHION_createHook((props) => { props = PNRLI7OV_spreadProps(PNRLI7OV_spreadValues({ "data-focus-trap": "", tabIndex: 0, "aria-hidden": true }, props), { style: PNRLI7OV_spreadValues({ // Prevents unintended scroll jumps. position: "fixed", top: 0, left: 0 }, props.style) }); props = useVisuallyHidden(props); return props; }); var FocusTrap = NQJBHION_createComponent((props) => { const htmlProps = useFocusTrap(props); return NQJBHION_createElement("span", htmlProps); }); if (false) {} ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/LDDPB3PY.js // src/portal/portal-context.ts var PortalContext = (0,external_React_.createContext)(null); ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/LL3AE4N4.js // src/portal/portal.tsx function getRootElement(element) { return O35LWD4W_getDocument(element).body; } function getPortalElement(element, portalElement) { if (!portalElement) { return O35LWD4W_getDocument(element).createElement("div"); } if (typeof portalElement === "function") { return portalElement(element); } return portalElement; } function getRandomId(prefix = "id") { return `${prefix ? `${prefix}-` : ""}${Math.random().toString(36).substr(2, 6)}`; } function queueFocus(element) { queueMicrotask(() => { element == null ? void 0 : element.focus(); }); } var usePortal = NQJBHION_createHook( (_a) => { var _b = _a, { preserveTabOrder, portalElement, portalRef, portal = true } = _b, props = __objRest(_b, ["preserveTabOrder", "portalElement", "portalRef", "portal"]); const ref = (0,external_React_.useRef)(null); const refProp = useMergeRefs(ref, props.ref); const context = (0,external_React_.useContext)(PortalContext); const [portalNode, setPortalNode] = (0,external_React_.useState)(null); const outerBeforeRef = (0,external_React_.useRef)(null); const innerBeforeRef = (0,external_React_.useRef)(null); const innerAfterRef = (0,external_React_.useRef)(null); const outerAfterRef = (0,external_React_.useRef)(null); useSafeLayoutEffect(() => { const element = ref.current; if (!element || !portal) { setPortalNode(null); return; } const portalEl = getPortalElement(element, portalElement); if (!portalEl) { setPortalNode(null); return; } const isPortalInDocument = portalEl.isConnected; if (!isPortalInDocument) { const rootElement = context || getRootElement(element); rootElement.appendChild(portalEl); } if (!portalEl.id) { portalEl.id = element.id ? `portal/${element.id}` : getRandomId(); } setPortalNode(portalEl); CP3U4HPL_setRef(portalRef, portalEl); if (isPortalInDocument) return; return () => { portalEl.remove(); CP3U4HPL_setRef(portalRef, null); }; }, [portal, portalElement, context, portalRef]); (0,external_React_.useEffect)(() => { if (!portalNode) return; if (!preserveTabOrder) return; let raf = 0; const onFocus = (event) => { if (!isFocusEventOutside(event)) return; const focusing = event.type === "focusin"; if (focusing) return restoreFocusIn(portalNode); cancelAnimationFrame(raf); raf = requestAnimationFrame(() => { disableFocusIn(portalNode, true); }); }; portalNode.addEventListener("focusin", onFocus, true); portalNode.addEventListener("focusout", onFocus, true); return () => { portalNode.removeEventListener("focusin", onFocus, true); portalNode.removeEventListener("focusout", onFocus, true); }; }, [portalNode, preserveTabOrder]); props = useWrapElement( props, (element) => { element = // While the portal node is not in the DOM, we need to pass the // current context to the portal context, otherwise it's going to // reset to the body element on nested portals. /* @__PURE__ */ (0,jsx_runtime.jsx)(PortalContext.Provider, { value: portalNode || context, children: element }); if (!portal) return element; if (!portalNode) { return /* @__PURE__ */ (0,jsx_runtime.jsx)( "span", { ref: refProp, id: props.id, style: { position: "fixed" }, hidden: true } ); } element = /* @__PURE__ */ (0,jsx_runtime.jsxs)(jsx_runtime.Fragment, { children: [ preserveTabOrder && portalNode && /* @__PURE__ */ (0,jsx_runtime.jsx)( FocusTrap, { ref: innerBeforeRef, className: "__focus-trap-inner-before", onFocus: (event) => { if (isFocusEventOutside(event, portalNode)) { queueFocus(getNextTabbable()); } else { queueFocus(outerBeforeRef.current); } } } ), element, preserveTabOrder && portalNode && /* @__PURE__ */ (0,jsx_runtime.jsx)( FocusTrap, { ref: innerAfterRef, className: "__focus-trap-inner-after", onFocus: (event) => { if (isFocusEventOutside(event, portalNode)) { queueFocus(getPreviousTabbable()); } else { queueFocus(outerAfterRef.current); } } } ) ] }); if (portalNode) { element = (0,external_ReactDOM_namespaceObject.createPortal)(element, portalNode); } element = /* @__PURE__ */ (0,jsx_runtime.jsxs)(jsx_runtime.Fragment, { children: [ preserveTabOrder && portalNode && /* @__PURE__ */ (0,jsx_runtime.jsx)( FocusTrap, { ref: outerBeforeRef, className: "__focus-trap-outer-before", onFocus: (event) => { const fromOuter = event.relatedTarget === outerAfterRef.current; if (!fromOuter && isFocusEventOutside(event, portalNode)) { queueFocus(innerBeforeRef.current); } else { queueFocus(getPreviousTabbable()); } } } ), preserveTabOrder && // We're using position: fixed here so that the browser doesn't // add margin to the element when setting gap on a parent element. /* @__PURE__ */ (0,jsx_runtime.jsx)("span", { "aria-owns": portalNode == null ? void 0 : portalNode.id, style: { position: "fixed" } }), element, preserveTabOrder && portalNode && /* @__PURE__ */ (0,jsx_runtime.jsx)( FocusTrap, { ref: outerAfterRef, className: "__focus-trap-outer-after", onFocus: (event) => { if (isFocusEventOutside(event, portalNode)) { queueFocus(innerAfterRef.current); } else { const nextTabbable = getNextTabbable(); if (nextTabbable === innerBeforeRef.current) { requestAnimationFrame(() => { var _a2; return (_a2 = getNextTabbable()) == null ? void 0 : _a2.focus(); }); return; } queueFocus(nextTabbable); } } } ) ] }); return element; }, [portalNode, context, portal, props.id, preserveTabOrder] ); props = PNRLI7OV_spreadProps(PNRLI7OV_spreadValues({}, props), { ref: refProp }); return props; } ); var Portal = NQJBHION_createComponent((props) => { const htmlProps = usePortal(props); return NQJBHION_createElement("div", htmlProps); }); if (false) {} ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/LNHZLQEK.js // src/dialog/dialog-context.ts var DialogContext = (0,external_React_.createContext)(void 0); var DialogHeadingContext = (0,external_React_.createContext)(void 0); var DialogDescriptionContext = (0,external_React_.createContext)(void 0); ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/DTAO6DRL.js // src/dialog/dialog.tsx var DTAO6DRL_isSafariBrowser = isSafari(); function isAlreadyFocusingAnotherElement(dialog) { const activeElement = O35LWD4W_getActiveElement(); if (!activeElement) return false; if (dialog && O35LWD4W_contains(dialog, activeElement)) return false; if (focus_isFocusable(activeElement)) return true; return false; } function getElementFromProp(prop, focusable = false) { if (!prop) return null; const element = "current" in prop ? prop.current : prop; if (!element) return null; if (focusable) return focus_isFocusable(element) ? element : null; return element; } var useDialog = NQJBHION_createHook( (_a) => { var _b = _a, { store, focusable = true, modal = true, portal = !!modal, backdrop = !!modal, backdropProps, hideOnEscape = true, hideOnInteractOutside = true, getPersistentElements, preventBodyScroll = !!modal, autoFocusOnShow = true, autoFocusOnHide = true, initialFocus, finalFocus } = _b, props = __objRest(_b, [ "store", "focusable", "modal", "portal", "backdrop", "backdropProps", "hideOnEscape", "hideOnInteractOutside", "getPersistentElements", "preventBodyScroll", "autoFocusOnShow", "autoFocusOnHide", "initialFocus", "finalFocus" ]); const ref = (0,external_React_.useRef)(null); const { portalRef, domReady } = usePortalRef(portal, props.portalRef); const preserveTabOrderProp = props.preserveTabOrder; const preserveTabOrder = store.useState( (state) => preserveTabOrderProp && !modal && state.mounted ); const id = useId(props.id); const open = store.useState("open"); const mounted = store.useState("mounted"); const contentElement = store.useState("contentElement"); const hidden = isHidden(mounted, props.hidden, props.alwaysVisible); usePreventBodyScroll(contentElement, id, preventBodyScroll && !hidden); useHideOnInteractOutside(store, hideOnInteractOutside); const { wrapElement, nestedDialogs } = useNestedDialogs(store); props = useWrapElement(props, wrapElement, [wrapElement]); useSafeLayoutEffect(() => { if (!open) return; const dialog = ref.current; const activeElement = O35LWD4W_getActiveElement(dialog, true); if (!activeElement) return; if (activeElement.tagName === "BODY") return; if (dialog && O35LWD4W_contains(dialog, activeElement)) return; store.setDisclosureElement(activeElement); }, [open]); if (DTAO6DRL_isSafariBrowser) { (0,external_React_.useEffect)(() => { if (!mounted) return; const { disclosureElement } = store.getState(); if (!disclosureElement) return; if (!O35LWD4W_isButton(disclosureElement)) return; const onMouseDown = () => { let receivedFocus = false; const onFocus = () => { receivedFocus = true; }; const options = { capture: true, once: true }; disclosureElement.addEventListener("focusin", onFocus, options); queueBeforeEvent(disclosureElement, "mouseup", () => { disclosureElement.removeEventListener("focusin", onFocus, true); if (receivedFocus) return; focus_focusIfNeeded(disclosureElement); }); }; disclosureElement.addEventListener("mousedown", onMouseDown); return () => { disclosureElement.removeEventListener("mousedown", onMouseDown); }; }, [mounted]); } const shouldDisableAccessibilityTree = modal || // Usually, we only want to disable the accessibility tree outside if the // dialog is a modal. But the Portal component can't preserve the tab // order on Safari/VoiceOver. By allowing only the dialog/portal to be // accessible, we provide a similar tab order flow. We don't need to // disable pointer events because it's just for screen readers. portal && preserveTabOrder && isSafari(); (0,external_React_.useEffect)(() => { if (!mounted) return; if (!domReady) return; const dialog = ref.current; if (!dialog) return; if (!shouldDisableAccessibilityTree) return; const existingDismiss = dialog.querySelector("[data-dialog-dismiss]"); if (existingDismiss) return; return prependHiddenDismiss(dialog, store.hide); }, [mounted, domReady, shouldDisableAccessibilityTree]); const getPersistentElementsProp = useEvent(getPersistentElements); useSafeLayoutEffect(() => { if (!domReady) return; if (!id) return; if (!open) return; const { disclosureElement } = store.getState(); const dialog = ref.current; const persistentElements = getPersistentElementsProp() || []; const allElements = [ dialog, ...persistentElements, ...nestedDialogs.map((dialog2) => dialog2.getState().contentElement) ]; if (!shouldDisableAccessibilityTree) { return markTreeOutside(id, disclosureElement, ...allElements); } if (modal) { return chain( markTreeOutside(id, ...allElements), disableTreeOutside(...allElements) ); } return chain( markTreeOutside(id, disclosureElement, ...allElements), disableAccessibilityTreeOutside(...allElements) ); }, [ domReady, id, open, store, getPersistentElementsProp, nestedDialogs, shouldDisableAccessibilityTree, modal ]); const mayAutoFocusOnShow = !!autoFocusOnShow; const autoFocusOnShowProp = useBooleanEvent(autoFocusOnShow); const [autoFocusEnabled, setAutoFocusEnabled] = (0,external_React_.useState)(false); (0,external_React_.useEffect)(() => { if (!open) return; if (!mayAutoFocusOnShow) return; if (!domReady) return; if (!(contentElement == null ? void 0 : contentElement.isConnected)) return; const element = getElementFromProp(initialFocus, true) || // If no initial focus is specified, we try to focus the first element // with the autofocus attribute. If it's an Ariakit component, the // Focusable component will consume the autoFocus prop and add the // data-autofocus attribute to the element instead. contentElement.querySelector( "[data-autofocus=true],[autofocus]" ) || // We have to fallback to the first focusable element otherwise portaled // dialogs with preserveTabOrder set to true will not receive focus // properly because the elements aren't tabbable until the dialog // receives focus. focus_getFirstTabbableIn(contentElement, true, portal && preserveTabOrder) || // Finally, we fallback to the dialog element itself. contentElement; const isElementFocusable = focus_isFocusable(element); if (!autoFocusOnShowProp(isElementFocusable ? element : null)) return; setAutoFocusEnabled(true); queueMicrotask(() => { element.focus(); if (!DTAO6DRL_isSafariBrowser) return; element.scrollIntoView({ block: "nearest", inline: "nearest" }); }); }, [ open, mayAutoFocusOnShow, domReady, contentElement, initialFocus, portal, preserveTabOrder, autoFocusOnShowProp ]); const mayAutoFocusOnHide = !!autoFocusOnHide; const autoFocusOnHideProp = useBooleanEvent(autoFocusOnHide); const [hasOpened, setHasOpened] = (0,external_React_.useState)(false); (0,external_React_.useEffect)(() => { if (!open) return; setHasOpened(true); return () => setHasOpened(false); }, [open]); useSafeLayoutEffect(() => { if (!hasOpened) return; if (!mayAutoFocusOnHide) return; const dialog = ref.current; const focusOnHide = (retry = true) => { if (isAlreadyFocusingAnotherElement(dialog)) return; const { disclosureElement } = store.getState(); let element = getElementFromProp(finalFocus) || disclosureElement; if (element == null ? void 0 : element.id) { const doc = O35LWD4W_getDocument(element); const selector = `[aria-activedescendant="${element.id}"]`; const composite = doc.querySelector(selector); if (composite) { element = composite; } } if (element && !focus_isFocusable(element)) { const maybeParentDialog = O35LWD4W_closest(element, "[data-dialog]"); if (maybeParentDialog && maybeParentDialog.id) { const doc = O35LWD4W_getDocument(maybeParentDialog); const selector = `[aria-controls~="${maybeParentDialog.id}"]`; const control = doc.querySelector(selector); if (control) { element = control; } } } const isElementFocusable = element && focus_isFocusable(element); if (!isElementFocusable && retry) { requestAnimationFrame(() => focusOnHide(false)); return; } if (!autoFocusOnHideProp(isElementFocusable ? element : null)) return; if (!isElementFocusable) return; element == null ? void 0 : element.focus(); }; if (!open) { return focusOnHide(); } return focusOnHide; }, [hasOpened, open, mayAutoFocusOnHide, finalFocus, autoFocusOnHideProp]); const hideOnEscapeProp = useBooleanEvent(hideOnEscape); (0,external_React_.useEffect)(() => { if (!domReady) return; if (!mounted) return; const onKeyDown = (event) => { if (event.key !== "Escape") return; if (event.defaultPrevented) return; const dialog = ref.current; if (!dialog) return; if (isElementMarked(dialog)) return; const target = event.target; if (!target) return; const { disclosureElement } = store.getState(); const isValidTarget = () => { if (target.tagName === "BODY") return true; if (O35LWD4W_contains(dialog, target)) return true; if (!disclosureElement) return false; if (O35LWD4W_contains(disclosureElement, target)) return true; return false; }; if (!isValidTarget()) return; if (!hideOnEscapeProp(event)) return; store.hide(); }; return addGlobalEventListener("keydown", onKeyDown); }, [mounted, domReady, hideOnEscapeProp]); props = useWrapElement( props, (element) => /* @__PURE__ */ (0,jsx_runtime.jsx)(HeadingLevel, { level: modal ? 1 : void 0, children: element }), [modal] ); const hiddenProp = props.hidden; const alwaysVisible = props.alwaysVisible; props = useWrapElement( props, (element) => { if (!backdrop) return element; return /* @__PURE__ */ (0,jsx_runtime.jsxs)(jsx_runtime.Fragment, { children: [ /* @__PURE__ */ (0,jsx_runtime.jsx)( DialogBackdrop, { store, backdrop, backdropProps, hidden: hiddenProp, alwaysVisible } ), element ] }); }, [store, backdrop, backdropProps, hiddenProp, alwaysVisible] ); const [headingId, setHeadingId] = (0,external_React_.useState)(); const [descriptionId, setDescriptionId] = (0,external_React_.useState)(); props = useWrapElement( props, (element) => /* @__PURE__ */ (0,jsx_runtime.jsx)(DialogContext.Provider, { value: store, children: /* @__PURE__ */ (0,jsx_runtime.jsx)(DialogHeadingContext.Provider, { value: setHeadingId, children: /* @__PURE__ */ (0,jsx_runtime.jsx)(DialogDescriptionContext.Provider, { value: setDescriptionId, children: element }) }) }), [store] ); props = PNRLI7OV_spreadProps(PNRLI7OV_spreadValues({ id, "data-dialog": "", role: "dialog", tabIndex: focusable ? -1 : void 0, "aria-labelledby": headingId, "aria-describedby": descriptionId }, props), { ref: useMergeRefs(ref, props.ref) }); props = useFocusableContainer(PNRLI7OV_spreadProps(PNRLI7OV_spreadValues({}, props), { autoFocusOnShow: autoFocusEnabled })); props = useDisclosureContent(PNRLI7OV_spreadValues({ store }, props)); props = useFocusable(PNRLI7OV_spreadProps(PNRLI7OV_spreadValues({}, props), { focusable })); props = usePortal(PNRLI7OV_spreadProps(PNRLI7OV_spreadValues({ portal }, props), { portalRef, preserveTabOrder })); return props; } ); var Dialog = NQJBHION_createComponent((props) => { const htmlProps = useDialog(props); return NQJBHION_createElement("div", htmlProps); }); if (false) {} ;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/6GS36SYX.js // src/popover/popover-context.ts var PopoverContext = (0,external_React_.createContext)( void 0 ); ;// CONCATENATED MODULE: ./node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs const floating_ui_utils_sides = (/* unused pure expression or super */ null && (['top', 'right', 'bottom', 'left'])); const alignments = (/* unused pure expression or super */ null && (['start', 'end'])); const floating_ui_utils_placements = /*#__PURE__*/(/* unused pure expression or super */ null && (floating_ui_utils_sides.reduce((acc, side) => acc.concat(side, side + "-" + alignments[0], side + "-" + alignments[1]), []))); const floating_ui_utils_min = Math.min; const floating_ui_utils_max = Math.max; const round = Math.round; const floor = Math.floor; const createCoords = v => ({ x: v, y: v }); const oppositeSideMap = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' }; const oppositeAlignmentMap = { start: 'end', end: 'start' }; function clamp(start, value, end) { return floating_ui_utils_max(start, floating_ui_utils_min(value, end)); } function floating_ui_utils_evaluate(value, param) { return typeof value === 'function' ? value(param) : value; } function floating_ui_utils_getSide(placement) { return placement.split('-')[0]; } function floating_ui_utils_getAlignment(placement) { return placement.split('-')[1]; } function getOppositeAxis(axis) { return axis === 'x' ? 'y' : 'x'; } function getAxisLength(axis) { return axis === 'y' ? 'height' : 'width'; } function floating_ui_utils_getSideAxis(placement) { return ['top', 'bottom'].includes(floating_ui_utils_getSide(placement)) ? 'y' : 'x'; } function getAlignmentAxis(placement) { return getOppositeAxis(floating_ui_utils_getSideAxis(placement)); } function floating_ui_utils_getAlignmentSides(placement, rects, rtl) { if (rtl === void 0) { rtl = false; } const alignment = floating_ui_utils_getAlignment(placement); const alignmentAxis = getAlignmentAxis(placement); const length = getAxisLength(alignmentAxis); let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top'; if (rects.reference[length] > rects.floating[length]) { mainAlignmentSide = getOppositePlacement(mainAlignmentSide); } return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)]; } function getExpandedPlacements(placement) { const oppositePlacement = getOppositePlacement(placement); return [floating_ui_utils_getOppositeAlignmentPlacement(placement), oppositePlacement, floating_ui_utils_getOppositeAlignmentPlacement(oppositePlacement)]; } function floating_ui_utils_getOppositeAlignmentPlacement(placement) { return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]); } function getSideList(side, isStart, rtl) { const lr = ['left', 'right']; const rl = ['right', 'left']; const tb = ['top', 'bottom']; const bt = ['bottom', 'top']; switch (side) { case 'top': case 'bottom': if (rtl) return isStart ? rl : lr; return isStart ? lr : rl; case 'left': case 'right': return isStart ? tb : bt; default: return []; } } function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) { const alignment = floating_ui_utils_getAlignment(placement); let list = getSideList(floating_ui_utils_getSide(placement), direction === 'start', rtl); if (alignment) { list = list.map(side => side + "-" + alignment); if (flipAlignment) { list = list.concat(list.map(floating_ui_utils_getOppositeAlignmentPlacement)); } } return list; } function getOppositePlacement(placement) { return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]); } function expandPaddingObject(padding) { return { top: 0, right: 0, bottom: 0, left: 0, ...padding }; } function floating_ui_utils_getPaddingObject(padding) { return typeof padding !== 'number' ? expandPaddingObject(padding) : { top: padding, right: padding, bottom: padding, left: padding }; } function floating_ui_utils_rectToClientRect(rect) { return { ...rect, top: rect.y, left: rect.x, right: rect.x + rect.width, bottom: rect.y + rect.height }; } ;// CONCATENATED MODULE: ./node_modules/@floating-ui/core/dist/floating-ui.core.mjs function computeCoordsFromPlacement(_ref, placement, rtl) { let { reference, floating } = _ref; const sideAxis = floating_ui_utils_getSideAxis(placement); const alignmentAxis = getAlignmentAxis(placement); const alignLength = getAxisLength(alignmentAxis); const side = floating_ui_utils_getSide(placement); const isVertical = sideAxis === 'y'; const commonX = reference.x + reference.width / 2 - floating.width / 2; const commonY = reference.y + reference.height / 2 - floating.height / 2; const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2; let coords; switch (side) { case 'top': coords = { x: commonX, y: reference.y - floating.height }; break; case 'bottom': coords = { x: commonX, y: reference.y + reference.height }; break; case 'right': coords = { x: reference.x + reference.width, y: commonY }; break; case 'left': coords = { x: reference.x - floating.width, y: commonY }; break; default: coords = { x: reference.x, y: reference.y }; } switch (floating_ui_utils_getAlignment(placement)) { case 'start': coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1); break; case 'end': coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1); break; } return coords; } /** * Computes the `x` and `y` coordinates that will place the floating element * next to a reference element when it is given a certain positioning strategy. * * This export does not have any `platform` interface logic. You will need to * write one for the platform you are using Floating UI with. */ const computePosition = async (reference, floating, config) => { const { placement = 'bottom', strategy = 'absolute', middleware = [], platform } = config; const validMiddleware = middleware.filter(Boolean); const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating)); let rects = await platform.getElementRects({ reference, floating, strategy }); let { x, y } = computeCoordsFromPlacement(rects, placement, rtl); let statefulPlacement = placement; let middlewareData = {}; let resetCount = 0; for (let i = 0; i < validMiddleware.length; i++) { const { name, fn } = validMiddleware[i]; const { x: nextX, y: nextY, data, reset } = await fn({ x, y, initialPlacement: placement, placement: statefulPlacement, strategy, middlewareData, rects, platform, elements: { reference, floating } }); x = nextX != null ? nextX : x; y = nextY != null ? nextY : y; middlewareData = { ...middlewareData, [name]: { ...middlewareData[name], ...data } }; if (reset && resetCount <= 50) { resetCount++; if (typeof reset === 'object') { if (reset.placement) { statefulPlacement = reset.placement; } if (reset.rects) { rects = reset.rects === true ? await platform.getElementRects({ reference, floating, strategy }) : reset.rects; } ({ x, y } = computeCoordsFromPlacement(rects, statefulPlacement, rtl)); } i = -1; continue; } } return { x, y, placement: statefulPlacement, strategy, middlewareData }; }; /** * Resolves with an object of overflow side offsets that determine how much the * element is overflowing a given clipping boundary on each side. * - positive = overflowing the boundary by that number of pixels * - negative = how many pixels left before it will overflow * - 0 = lies flush with the boundary * @see https://floating-ui.com/docs/detectOverflow */ async function detectOverflow(state, options) { var _await$platform$isEle; if (options === void 0) { options = {}; } const { x, y, platform, rects, elements, strategy } = state; const { boundary = 'clippingAncestors', rootBoundary = 'viewport', elementContext = 'floating', altBoundary = false, padding = 0 } = floating_ui_utils_evaluate(options, state); const paddingObject = floating_ui_utils_getPaddingObject(padding); const altContext = elementContext === 'floating' ? 'reference' : 'floating'; const element = elements[altBoundary ? altContext : elementContext]; const clippingClientRect = floating_ui_utils_rectToClientRect(await platform.getClippingRect({ element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))), boundary, rootBoundary, strategy })); const rect = elementContext === 'floating' ? { ...rects.floating, x, y } : rects.reference; const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating)); const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || { x: 1, y: 1 } : { x: 1, y: 1 }; const elementClientRect = floating_ui_utils_rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({ rect, offsetParent, strategy }) : rect); return { top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y, bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y, left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x, right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x }; } /** * Provides data to position an inner element of the floating element so that it * appears centered to the reference element. * @see https://floating-ui.com/docs/arrow */ const arrow = options => ({ name: 'arrow', options, async fn(state) { const { x, y, placement, rects, platform, elements, middlewareData } = state; // Since `element` is required, we don't Partial<> the type. const { element, padding = 0 } = floating_ui_utils_evaluate(options, state) || {}; if (element == null) { return {}; } const paddingObject = floating_ui_utils_getPaddingObject(padding); const coords = { x, y }; const axis = getAlignmentAxis(placement); const length = getAxisLength(axis); const arrowDimensions = await platform.getDimensions(element); const isYAxis = axis === 'y'; const minProp = isYAxis ? 'top' : 'left'; const maxProp = isYAxis ? 'bottom' : 'right'; const clientProp = isYAxis ? 'clientHeight' : 'clientWidth'; const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length]; const startDiff = coords[axis] - rects.reference[axis]; const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element)); let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0; // DOM platform can return `window` as the `offsetParent`. if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) { clientSize = elements.floating[clientProp] || rects.floating[length]; } const centerToReference = endDiff / 2 - startDiff / 2; // If the padding is large enough that it causes the arrow to no longer be // centered, modify the padding so that it is centered. const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1; const minPadding = floating_ui_utils_min(paddingObject[minProp], largestPossiblePadding); const maxPadding = floating_ui_utils_min(paddingObject[maxProp], largestPossiblePadding); // Make sure the arrow doesn't overflow the floating element if the center // point is outside the floating element's bounds. const min$1 = minPadding; const max = clientSize - arrowDimensions[length] - maxPadding; const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference; const offset = clamp(min$1, center, max); // If the reference is small enough that the arrow's padding causes it to // to point to nothing for an aligned placement, adjust the offset of the // floating element itself. To ensure `shift()` continues to take action, // a single reset is performed when this is true. const shouldAddOffset = !middlewareData.arrow && floating_ui_utils_getAlignment(placement) != null && center != offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0; const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max : 0; return { [axis]: coords[axis] + alignmentOffset, data: { [axis]: offset, centerOffset: center - offset - alignmentOffset, ...(shouldAddOffset && { alignmentOffset }) }, reset: shouldAddOffset }; } }); function getPlacementList(alignment, autoAlignment, allowedPlacements) { const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => getSide(placement) === placement); return allowedPlacementsSortedByAlignment.filter(placement => { if (alignment) { return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false); } return true; }); } /** * Optimizes the visibility of the floating element by choosing the placement * that has the most space available automatically, without needing to specify a * preferred placement. Alternative to `flip`. * @see https://floating-ui.com/docs/autoPlacement */ const autoPlacement = function (options) { if (options === void 0) { options = {}; } return { name: 'autoPlacement', options, async fn(state) { var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE; const { rects, middlewareData, placement, platform, elements } = state; const { crossAxis = false, alignment, allowedPlacements = placements, autoAlignment = true, ...detectOverflowOptions } = evaluate(options, state); const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements; const overflow = await detectOverflow(state, detectOverflowOptions); const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0; const currentPlacement = placements$1[currentIndex]; if (currentPlacement == null) { return {}; } const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))); // Make `computeCoords` start from the right place. if (placement !== currentPlacement) { return { reset: { placement: placements$1[0] } }; } const currentOverflows = [overflow[getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]]; const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), { placement: currentPlacement, overflows: currentOverflows }]; const nextPlacement = placements$1[currentIndex + 1]; // There are more placements to check. if (nextPlacement) { return { data: { index: currentIndex + 1, overflows: allOverflows }, reset: { placement: nextPlacement } }; } const placementsSortedByMostSpace = allOverflows.map(d => { const alignment = getAlignment(d.placement); return [d.placement, alignment && crossAxis ? // Check along the mainAxis and main crossAxis side. d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) : // Check only the mainAxis. d.overflows[0], d.overflows]; }).sort((a, b) => a[1] - b[1]); const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter(d => d[2].slice(0, // Aligned placements should not check their opposite crossAxis // side. getAlignment(d[0]) ? 2 : 3).every(v => v <= 0)); const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0]; if (resetPlacement !== placement) { return { data: { index: currentIndex + 1, overflows: allOverflows }, reset: { placement: resetPlacement } }; } return {}; } }; }; /** * Optimizes the visibility of the floating element by flipping the `placement` * in order to keep it in view when the preferred placement(s) will overflow the * clipping boundary. Alternative to `autoPlacement`. * @see https://floating-ui.com/docs/flip */ const floating_ui_core_flip = function (options) { if (options === void 0) { options = {}; } return { name: 'flip', options, async fn(state) { var _middlewareData$arrow, _middlewareData$flip; const { placement, middlewareData, rects, initialPlacement, platform, elements } = state; const { mainAxis: checkMainAxis = true, crossAxis: checkCrossAxis = true, fallbackPlacements: specifiedFallbackPlacements, fallbackStrategy = 'bestFit', fallbackAxisSideDirection = 'none', flipAlignment = true, ...detectOverflowOptions } = floating_ui_utils_evaluate(options, state); // If a reset by the arrow was caused due to an alignment offset being // added, we should skip any logic now since `flip()` has already done its // work. // https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643 if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) { return {}; } const side = floating_ui_utils_getSide(placement); const isBasePlacement = floating_ui_utils_getSide(initialPlacement) === initialPlacement; const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)); const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement)); if (!specifiedFallbackPlacements && fallbackAxisSideDirection !== 'none') { fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl)); } const placements = [initialPlacement, ...fallbackPlacements]; const overflow = await detectOverflow(state, detectOverflowOptions); const overflows = []; let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || []; if (checkMainAxis) { overflows.push(overflow[side]); } if (checkCrossAxis) { const sides = floating_ui_utils_getAlignmentSides(placement, rects, rtl); overflows.push(overflow[sides[0]], overflow[sides[1]]); } overflowsData = [...overflowsData, { placement, overflows }]; // One or more sides is overflowing. if (!overflows.every(side => side <= 0)) { var _middlewareData$flip2, _overflowsData$filter; const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1; const nextPlacement = placements[nextIndex]; if (nextPlacement) { // Try next placement and re-run the lifecycle. return { data: { index: nextIndex, overflows: overflowsData }, reset: { placement: nextPlacement } }; } // First, find the candidates that fit on the mainAxis side of overflow, // then find the placement that fits the best on the main crossAxis side. let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement; // Otherwise fallback. if (!resetPlacement) { switch (fallbackStrategy) { case 'bestFit': { var _overflowsData$map$so; const placement = (_overflowsData$map$so = overflowsData.map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$map$so[0]; if (placement) { resetPlacement = placement; } break; } case 'initialPlacement': resetPlacement = initialPlacement; break; } } if (placement !== resetPlacement) { return { reset: { placement: resetPlacement } }; } } return {}; } }; }; function getSideOffsets(overflow, rect) { return { top: overflow.top - rect.height, right: overflow.right - rect.width, bottom: overflow.bottom - rect.height, left: overflow.left - rect.width }; } function isAnySideFullyClipped(overflow) { return sides.some(side => overflow[side] >= 0); } /** * Provides data to hide the floating element in applicable situations, such as * when it is not in the same clipping context as the reference element. * @see https://floating-ui.com/docs/hide */ const hide = function (options) { if (options === void 0) { options = {}; } return { name: 'hide', options, async fn(state) { const { rects } = state; const { strategy = 'referenceHidden', ...detectOverflowOptions } = evaluate(options, state); switch (strategy) { case 'referenceHidden': { const overflow = await detectOverflow(state, { ...detectOverflowOptions, elementContext: 'reference' }); const offsets = getSideOffsets(overflow, rects.reference); return { data: { referenceHiddenOffsets: offsets, referenceHidden: isAnySideFullyClipped(offsets) } }; } case 'escaped': { const overflow = await detectOverflow(state, { ...detectOverflowOptions, altBoundary: true }); const offsets = getSideOffsets(overflow, rects.floating); return { data: { escapedOffsets: offsets, escaped: isAnySideFullyClipped(offsets) } }; } default: { return {}; } } } }; }; function getBoundingRect(rects) { const minX = min(...rects.map(rect => rect.left)); const minY = min(...rects.map(rect => rect.top)); const maxX = max(...rects.map(rect => rect.right)); const maxY = max(...rects.map(rect => rect.bottom)); return { x: minX, y: minY, width: maxX - minX, height: maxY - minY }; } function getRectsByLine(rects) { const sortedRects = rects.slice().sort((a, b) => a.y - b.y); const groups = []; let prevRect = null; for (let i = 0; i < sortedRects.length; i++) { const rect = sortedRects[i]; if (!prevRect || rect.y - prevRect.y > prevRect.height / 2) { groups.push([rect]); } else { groups[groups.length - 1].push(rect); } prevRect = rect; } return groups.map(rect => rectToClientRect(getBoundingRect(rect))); } /** * Provides improved positioning for inline reference elements that can span * over multiple lines, such as hyperlinks or range selections. * @see https://floating-ui.com/docs/inline */ const inline = function (options) { if (options === void 0) { options = {}; } return { name: 'inline', options, async fn(state) { const { placement, elements, rects, platform, strategy } = state; // A MouseEvent's client{X,Y} coords can be up to 2 pixels off a // ClientRect's bounds, despite the event listener being triggered. A // padding of 2 seems to handle this issue. const { padding = 2, x, y } = evaluate(options, state); const nativeClientRects = Array.from((await (platform.getClientRects == null ? void 0 : platform.getClientRects(elements.reference))) || []); const clientRects = getRectsByLine(nativeClientRects); const fallback = rectToClientRect(getBoundingRect(nativeClientRects)); const paddingObject = getPaddingObject(padding); function getBoundingClientRect() { // There are two rects and they are disjoined. if (clientRects.length === 2 && clientRects[0].left > clientRects[1].right && x != null && y != null) { // Find the first rect in which the point is fully inside. return clientRects.find(rect => x > rect.left - paddingObject.left && x < rect.right + paddingObject.right && y > rect.top - paddingObject.top && y < rect.bottom + paddingObject.bottom) || fallback; } // There are 2 or more connected rects. if (clientRects.length >= 2) { if (getSideAxis(placement) === 'y') { const firstRect = clientRects[0]; const lastRect = clientRects[clientRects.length - 1]; const isTop = getSide(placement) === 'top'; const top = firstRect.top; const bottom = lastRect.bottom; const left = isTop ? firstRect.left : lastRect.left; const right = isTop ? firstRect.right : lastRect.right; const width = right - left; const height = bottom - top; return { top, bottom, left, right, width, height, x: left, y: top }; } const isLeftSide = getSide(placement) === 'left'; const maxRight = max(...clientRects.map(rect => rect.right)); const minLeft = min(...clientRects.map(rect => rect.left)); const measureRects = clientRects.filter(rect => isLeftSide ? rect.left === minLeft : rect.right === maxRight); const top = measureRects[0].top; const bottom = measureRects[measureRects.length - 1].bottom; const left = minLeft; const right = maxRight; const width = right - left; const height = bottom - top; return { top, bottom, left, right, width, height, x: left, y: top }; } return fallback; } const resetRects = await platform.getElementRects({ reference: { getBoundingClientRect }, floating: elements.floating, strategy }); if (rects.reference.x !== resetRects.reference.x || rects.reference.y !== resetRects.reference.y || rects.reference.width !== resetRects.reference.width || rects.reference.height !== resetRects.reference.height) { return { reset: { rects: resetRects } }; } return {}; } }; }; // For type backwards-compatibility, the `OffsetOptions` type was also // Derivable. async function convertValueToCoords(state, options) { const { placement, platform, elements } = state; const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)); const side = floating_ui_utils_getSide(placement); const alignment = floating_ui_utils_getAlignment(placement); const isVertical = floating_ui_utils_getSideAxis(placement) === 'y'; const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1; const crossAxisMulti = rtl && isVertical ? -1 : 1; const rawValue = floating_ui_utils_evaluate(options, state); // eslint-disable-next-line prefer-const let { mainAxis, crossAxis, alignmentAxis } = typeof rawValue === 'number' ? { mainAxis: rawValue, crossAxis: 0, alignmentAxis: null } : { mainAxis: 0, crossAxis: 0, alignmentAxis: null, ...rawValue }; if (alignment && typeof alignmentAxis === 'number') { crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis; } return isVertical ? { x: crossAxis * crossAxisMulti, y: mainAxis * mainAxisMulti } : { x: mainAxis * mainAxisMulti, y: crossAxis * crossAxisMulti }; } /** * Modifies the placement by translating the floating element along the * specified axes. * A number (shorthand for `mainAxis` or distance), or an axes configuration * object may be passed. * @see https://floating-ui.com/docs/offset */ const offset = function (options) { if (options === void 0) { options = 0; } return { name: 'offset', options, async fn(state) { const { x, y } = state; const diffCoords = await convertValueToCoords(state, options); return { x: x + diffCoords.x, y: y + diffCoords.y, data: diffCoords }; } }; }; /** * Optimizes the visibility of the floating element by shifting it in order to * keep it in view when it will overflow the clipping boundary. * @see https://floating-ui.com/docs/shift */ const floating_ui_core_shift = function (options) { if (options === void 0) { options = {}; } return { name: 'shift', options, async fn(state) { const { x, y, placement } = state; const { mainAxis: checkMainAxis = true, crossAxis: checkCrossAxis = false, limiter = { fn: _ref => { let { x, y } = _ref; return { x, y }; } }, ...detectOverflowOptions } = floating_ui_utils_evaluate(options, state); const coords = { x, y }; const overflow = await detectOverflow(state, detectOverflowOptions); const crossAxis = floating_ui_utils_getSideAxis(floating_ui_utils_getSide(placement)); const mainAxis = getOppositeAxis(crossAxis); let mainAxisCoord = coords[mainAxis]; let crossAxisCoord = coords[crossAxis]; if (checkMainAxis) { const minSide = mainAxis === 'y' ? 'top' : 'left'; const maxSide = mainAxis === 'y' ? 'bottom' : 'right'; const min = mainAxisCoord + overflow[minSide]; const max = mainAxisCoord - overflow[maxSide]; mainAxisCoord = clamp(min, mainAxisCoord, max); } if (checkCrossAxis) { const minSide = crossAxis === 'y' ? 'top' : 'left'; const maxSide = crossAxis === 'y' ? 'bottom' : 'right'; const min = crossAxisCoord + overflow[minSide]; const max = crossAxisCoord - overflow[maxSide]; crossAxisCoord = clamp(min, crossAxisCoord, max); } const limitedCoords = limiter.fn({ ...state, [mainAxis]: mainAxisCoord, [crossAxis]: crossAxisCoord }); return { ...limitedCoords, data: { x: limitedCoords.x - x, y: limitedCoords.y - y } }; } }; }; /** * Built-in `limiter` that will stop `shift()` at a certain point. */ const limitShift = function (options) { if (options === void 0) { options = {}; } return { options, fn(state) { const { x, y, placement, rects, middlewareData } = state; const { offset = 0, mainAxis: checkMainAxis = true, crossAxis: checkCrossAxis = true } = floating_ui_utils_evaluate(options, state); const coords = { x, y }; const crossAxis = floating_ui_utils_getSideAxis(placement); const mainAxis = getOppositeAxis(crossAxis); let mainAxisCoord = coords[mainAxis]; let crossAxisCoord = coords[crossAxis]; const rawOffset = floating_ui_utils_evaluate(offset, state); const computedOffset = typeof rawOffset === 'number' ? { mainAxis: rawOffset, crossAxis: 0 } : { mainAxis: 0, crossAxis: 0, ...rawOffset }; if (checkMainAxis) { const len = mainAxis === 'y' ? 'height' : 'width'; const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis; const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis; if (mainAxisCoord < limitMin) { mainAxisCoord = limitMin; } else if (mainAxisCoord > limitMax) { mainAxisCoord = limitMax; } } if (checkCrossAxis) { var _middlewareData$offse, _middlewareData$offse2; const len = mainAxis === 'y' ? 'width' : 'height'; const isOriginSide = ['top', 'left'].includes(floating_ui_utils_getSide(placement)); const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis); const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0); if (crossAxisCoord < limitMin) { crossAxisCoord = limitMin; } else if (crossAxisCoord > limitMax) { crossAxisCoord = limitMax; } } return { [mainAxis]: mainAxisCoord, [crossAxis]: crossAxisCoord }; } }; }; /** * Provides data that allows you to change the size of the floating element — * for instance, prevent it from overflowing the clipping boundary or match the * width of the reference element. * @see https://floating-ui.com/docs/size */ const size = function (options) { if (options === void 0) { options = {}; } return { name: 'size', options, async fn(state) { const { placement, rects, platform, elements } = state; const { apply = () => {}, ...detectOverflowOptions } = floating_ui_utils_evaluate(options, state); const overflow = await detectOverflow(state, detectOverflowOptions); const side = floating_ui_utils_getSide(placement); const alignment = floating_ui_utils_getAlignment(placement); const isYAxis = floating_ui_utils_getSideAxis(placement) === 'y'; const { width, height } = rects.floating; let heightSide; let widthSide; if (side === 'top' || side === 'bottom') { heightSide = side; widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right'; } else { widthSide = side; heightSide = alignment === 'end' ? 'top' : 'bottom'; } const overflowAvailableHeight = height - overflow[heightSide]; const overflowAvailableWidth = width - overflow[widthSide]; const noShift = !state.middlewareData.shift; let availableHeight = overflowAvailableHeight; let availableWidth = overflowAvailableWidth; if (isYAxis) { const maximumClippingWidth = width - overflow.left - overflow.right; availableWidth = alignment || noShift ? floating_ui_utils_min(overflowAvailableWidth, maximumClippingWidth) : maximumClippingWidth; } else { const maximumClippingHeight = height - overflow.top - overflow.bottom; availableHeight = alignment || noShift ? floating_ui_utils_min(overflowAvailableHeight, maximumClippingHeight) : maximumClippingHeight; } if (noShift && !alignment) { const xMin = floating_ui_utils_max(overflow.left, 0); const xMax = floating_ui_utils_max(overflow.right, 0); const yMin = floating_ui_utils_max(overflow.top, 0); const yMax = floating_ui_utils_max(overflow.bottom, 0); if (isYAxis) { availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : floating_ui_utils_max(overflow.left, overflow.right)); } else { availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : floating_ui_utils_max(overflow.top, overflow.bottom)); } } await apply({ ...state, availableWidth, availableHeight }); const nextDimensions = await platform.getDimensions(elements.floating); if (width !== nextDimensions.width || height !== nextDimensions.height) { return { reset: { rects: true } }; } return {}; } }; }; ;// CONCATENATED MODULE: ./node_modules/@floating-ui/utils/dom/dist/floating-ui.utils.dom.mjs function getNodeName(node) { if (isNode(node)) { return (node.nodeName || '').toLowerCase(); } // Mocked nodes in testing environments may not be instances of Node. By // returning `#document` an infinite loop won't occur. // https://github.com/floating-ui/floating-ui/issues/2317 return '#document'; } function floating_ui_utils_dom_getWindow(node) { var _node$ownerDocument; return (node == null ? void 0 : (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window; } function getDocumentElement(node) { var _ref; return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement; } function isNode(value) { return value instanceof Node || value instanceof floating_ui_utils_dom_getWindow(value).Node; } function isElement(value) { return value instanceof Element || value instanceof floating_ui_utils_dom_getWindow(value).Element; } function isHTMLElement(value) { return value instanceof HTMLElement || value instanceof floating_ui_utils_dom_getWindow(value).HTMLElement; } function isShadowRoot(value) { // Browsers without `ShadowRoot` support. if (typeof ShadowRoot === 'undefined') { return false; } return value instanceof ShadowRoot || value instanceof floating_ui_utils_dom_getWindow(value).ShadowRoot; } function isOverflowElement(element) { const { overflow, overflowX, overflowY, display } = floating_ui_utils_dom_getComputedStyle(element); return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display); } function isTableElement(element) { return ['table', 'td', 'th'].includes(getNodeName(element)); } function isContainingBlock(element) { const webkit = isWebKit(); const css = floating_ui_utils_dom_getComputedStyle(element); // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block return css.transform !== 'none' || css.perspective !== 'none' || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value)); } function getContainingBlock(element) { let currentNode = getParentNode(element); while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) { if (isContainingBlock(currentNode)) { return currentNode; } else { currentNode = getParentNode(currentNode); } } return null; } function isWebKit() { if (typeof CSS === 'undefined' || !CSS.supports) return false; return CSS.supports('-webkit-backdrop-filter', 'none'); } function isLastTraversableNode(node) { return ['html', 'body', '#document'].includes(getNodeName(node)); } function floating_ui_utils_dom_getComputedStyle(element) { return floating_ui_utils_dom_getWindow(element).getComputedStyle(element); } function getNodeScroll(element) { if (isElement(element)) { return { scrollLeft: element.scrollLeft, scrollTop: element.scrollTop }; } return { scrollLeft: element.pageXOffset, scrollTop: element.pageYOffset }; } function getParentNode(node) { if (getNodeName(node) === 'html') { return node; } const result = // Step into the shadow DOM of the parent of a slotted node. node.assignedSlot || // DOM Element detected. node.parentNode || // ShadowRoot detected. isShadowRoot(node) && node.host || // Fallback. getDocumentElement(node); return isShadowRoot(result) ? result.host : result; } function getNearestOverflowAncestor(node) { const parentNode = getParentNode(node); if (isLastTraversableNode(parentNode)) { return node.ownerDocument ? node.ownerDocument.body : node.body; } if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) { return parentNode; } return getNearestOverflowAncestor(parentNode); } function getOverflowAncestors(node, list, traverseIframes) { var _node$ownerDocument2; if (list === void 0) { list = []; } if (traverseIframes === void 0) { traverseIframes = true; } const scrollableAncestor = getNearestOverflowAncestor(node); const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body); const win = floating_ui_utils_dom_getWindow(scrollableAncestor); if (isBody) { return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], win.frameElement && traverseIframes ? getOverflowAncestors(win.frameElement) : []); } return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes)); } ;// CONCATENATED MODULE: ./node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs function getCssDimensions(element) { const css = floating_ui_utils_dom_getComputedStyle(element); // In testing environments, the `width` and `height` properties are empty // strings for SVG elements, returning NaN. Fallback to `0` in this case. let width = parseFloat(css.width) || 0; let height = parseFloat(css.height) || 0; const hasOffset = isHTMLElement(element); const offsetWidth = hasOffset ? element.offsetWidth : width; const offsetHeight = hasOffset ? element.offsetHeight : height; const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight; if (shouldFallback) { width = offsetWidth; height = offsetHeight; } return { width, height, $: shouldFallback }; } function unwrapElement(element) { return !isElement(element) ? element.contextElement : element; } function getScale(element) { const domElement = unwrapElement(element); if (!isHTMLElement(domElement)) { return createCoords(1); } const rect = domElement.getBoundingClientRect(); const { width, height, $ } = getCssDimensions(domElement); let x = ($ ? round(rect.width) : rect.width) / width; let y = ($ ? round(rect.height) : rect.height) / height; // 0, NaN, or Infinity should always fallback to 1. if (!x || !Number.isFinite(x)) { x = 1; } if (!y || !Number.isFinite(y)) { y = 1; } return { x, y }; } const noOffsets = /*#__PURE__*/createCoords(0); function getVisualOffsets(element) { const win = floating_ui_utils_dom_getWindow(element); if (!isWebKit() || !win.visualViewport) { return noOffsets; } return { x: win.visualViewport.offsetLeft, y: win.visualViewport.offsetTop }; } function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) { if (isFixed === void 0) { isFixed = false; } if (!floatingOffsetParent || isFixed && floatingOffsetParent !== floating_ui_utils_dom_getWindow(element)) { return false; } return isFixed; } function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) { if (includeScale === void 0) { includeScale = false; } if (isFixedStrategy === void 0) { isFixedStrategy = false; } const clientRect = element.getBoundingClientRect(); const domElement = unwrapElement(element); let scale = createCoords(1); if (includeScale) { if (offsetParent) { if (isElement(offsetParent)) { scale = getScale(offsetParent); } } else { scale = getScale(element); } } const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0); let x = (clientRect.left + visualOffsets.x) / scale.x; let y = (clientRect.top + visualOffsets.y) / scale.y; let width = clientRect.width / scale.x; let height = clientRect.height / scale.y; if (domElement) { const win = floating_ui_utils_dom_getWindow(domElement); const offsetWin = offsetParent && isElement(offsetParent) ? floating_ui_utils_dom_getWindow(offsetParent) : offsetParent; let currentIFrame = win.frameElement; while (currentIFrame && offsetParent && offsetWin !== win) { const iframeScale = getScale(currentIFrame); const iframeRect = currentIFrame.getBoundingClientRect(); const css = floating_ui_utils_dom_getComputedStyle(currentIFrame); const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x; const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y; x *= iframeScale.x; y *= iframeScale.y; width *= iframeScale.x; height *= iframeScale.y; x += left; y += top; currentIFrame = floating_ui_utils_dom_getWindow(currentIFrame).frameElement; } } return floating_ui_utils_rectToClientRect({ width, height, x, y }); } function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) { let { rect, offsetParent, strategy } = _ref; const isOffsetParentAnElement = isHTMLElement(offsetParent); const documentElement = getDocumentElement(offsetParent); if (offsetParent === documentElement) { return rect; } let scroll = { scrollLeft: 0, scrollTop: 0 }; let scale = createCoords(1); const offsets = createCoords(0); if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== 'fixed') { if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) { scroll = getNodeScroll(offsetParent); } if (isHTMLElement(offsetParent)) { const offsetRect = getBoundingClientRect(offsetParent); scale = getScale(offsetParent); offsets.x = offsetRect.x + offsetParent.clientLeft; offsets.y = offsetRect.y + offsetParent.clientTop; } } return { width: rect.width * scale.x, height: rect.height * scale.y, x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x, y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y }; } function getClientRects(element) { return Array.from(element.getClientRects()); } function getWindowScrollBarX(element) { // If has a CSS width greater than the viewport, then this will be // incorrect for RTL. return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft; } // Gets the entire size of the scrollable document area, even extending outside // of the `` and `` rect bounds if horizontally scrollable. function getDocumentRect(element) { const html = getDocumentElement(element); const scroll = getNodeScroll(element); const body = element.ownerDocument.body; const width = floating_ui_utils_max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth); const height = floating_ui_utils_max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight); let x = -scroll.scrollLeft + getWindowScrollBarX(element); const y = -scroll.scrollTop; if (floating_ui_utils_dom_getComputedStyle(body).direction === 'rtl') { x += floating_ui_utils_max(html.clientWidth, body.clientWidth) - width; } return { width, height, x, y }; } function getViewportRect(element, strategy) { const win = floating_ui_utils_dom_getWindow(element); const html = getDocumentElement(element); const visualViewport = win.visualViewport; let width = html.clientWidth; let height = html.clientHeight; let x = 0; let y = 0; if (visualViewport) { width = visualViewport.width; height = visualViewport.height; const visualViewportBased = isWebKit(); if (!visualViewportBased || visualViewportBased && strategy === 'fixed') { x = visualViewport.offsetLeft; y = visualViewport.offsetTop; } } return { width, height, x, y }; } // Returns the inner client rect, subtracting scrollbars if present. function getInnerBoundingClientRect(element, strategy) { const clientRect = getBoundingClientRect(element, true, strategy === 'fixed'); const top = clientRect.top + element.clientTop; const left = clientRect.left + element.clientLeft; const scale = isHTMLElement(element) ? getScale(element) : createCoords(1); const width = element.clientWidth * scale.x; const height = element.clientHeight * scale.y; const x = left * scale.x; const y = top * scale.y; return { width, height, x, y }; } function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) { let rect; if (clippingAncestor === 'viewport') { rect = getViewportRect(element, strategy); } else if (clippingAncestor === 'document') { rect = getDocumentRect(getDocumentElement(element)); } else if (isElement(clippingAncestor)) { rect = getInnerBoundingClientRect(clippingAncestor, strategy); } else { const visualOffsets = getVisualOffsets(element); rect = { ...clippingAncestor, x: clippingAncestor.x - visualOffsets.x, y: clippingAncestor.y - visualOffsets.y }; } return floating_ui_utils_rectToClientRect(rect); } function hasFixedPositionAncestor(element, stopNode) { const parentNode = getParentNode(element); if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) { return false; } return floating_ui_utils_dom_getComputedStyle(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode); } // A "clipping ancestor" is an `overflow` element with the characteristic of // clipping (or hiding) child elements. This returns all clipping ancestors // of the given element up the tree. function getClippingElementAncestors(element, cache) { const cachedResult = cache.get(element); if (cachedResult) { return cachedResult; } let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body'); let currentContainingBlockComputedStyle = null; const elementIsFixed = floating_ui_utils_dom_getComputedStyle(element).position === 'fixed'; let currentNode = elementIsFixed ? getParentNode(element) : element; // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block while (isElement(currentNode) && !isLastTraversableNode(currentNode)) { const computedStyle = floating_ui_utils_dom_getComputedStyle(currentNode); const currentNodeIsContaining = isContainingBlock(currentNode); if (!currentNodeIsContaining && computedStyle.position === 'fixed') { currentContainingBlockComputedStyle = null; } const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode); if (shouldDropCurrentNode) { // Drop non-containing blocks. result = result.filter(ancestor => ancestor !== currentNode); } else { // Record last containing block for next iteration. currentContainingBlockComputedStyle = computedStyle; } currentNode = getParentNode(currentNode); } cache.set(element, result); return result; } // Gets the maximum area that the element is visible in due to any number of // clipping ancestors. function getClippingRect(_ref) { let { element, boundary, rootBoundary, strategy } = _ref; const elementClippingAncestors = boundary === 'clippingAncestors' ? getClippingElementAncestors(element, this._c) : [].concat(boundary); const clippingAncestors = [...elementClippingAncestors, rootBoundary]; const firstClippingAncestor = clippingAncestors[0]; const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => { const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy); accRect.top = floating_ui_utils_max(rect.top, accRect.top); accRect.right = floating_ui_utils_min(rect.right, accRect.right); accRect.bottom = floating_ui_utils_min(rect.bottom, accRect.bottom); accRect.left = floating_ui_utils_max(rect.left, accRect.left); return accRect; }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy)); return { width: clippingRect.right - clippingRect.left, height: clippingRect.bottom - clippingRect.top, x: clippingRect.left, y: clippingRect.top }; } function getDimensions(element) { return getCssDimensions(element); } function getRectRelativeToOffsetParent(element, offsetParent, strategy) { const isOffsetParentAnElement = isHTMLElement(offsetParent); const documentElement = getDocumentElement(offsetParent); const isFixed = strategy === 'fixed'; const rect = getBoundingClientRect(element, true, isFixed, offsetParent); let scroll = { scrollLeft: 0, scrollTop: 0 }; const offsets = createCoords(0); if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) { if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) { scroll = getNodeScroll(offsetParent); } if (isOffsetParentAnElement) { const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent); offsets.x = offsetRect.x + offsetParent.clientLeft; offsets.y = offsetRect.y + offsetParent.clientTop; } else if (documentElement) { offsets.x = getWindowScrollBarX(documentElement); } } return { x: rect.left + scroll.scrollLeft - offsets.x, y: rect.top + scroll.scrollTop - offsets.y, width: rect.width, height: rect.height }; } function getTrueOffsetParent(element, polyfill) { if (!isHTMLElement(element) || floating_ui_utils_dom_getComputedStyle(element).position === 'fixed') { return null; } if (polyfill) { return polyfill(element); } return element.offsetParent; } // Gets the closest ancestor positioned element. Handles some edge cases, // such as table ancestors and cross browser bugs. function getOffsetParent(element, polyfill) { const window = floating_ui_utils_dom_getWindow(element); if (!isHTMLElement(element)) { return window; } let offsetParent = getTrueOffsetParent(element, polyfill); while (offsetParent && isTableElement(offsetParent) && floating_ui_utils_dom_getComputedStyle(offsetParent).position === 'static') { offsetParent = getTrueOffsetParent(offsetParent, polyfill); } if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && floating_ui_utils_dom_getComputedStyle(offsetParent).position === 'static' && !isContainingBlock(offsetParent))) { return window; } return offsetParent || getContainingBlock(element) || window; } const getElementRects = async function (_ref) { let { reference, floating, strategy } = _ref; const getOffsetParentFn = this.getOffsetParent || getOffsetParent; const getDimensionsFn = this.getDimensions; return { reference: getRectRelativeToOffsetParent(reference, await getOffsetParentFn(floating), strategy), floating: { x: 0, y: 0, ...(await getDimensionsFn(floating)) } }; }; function isRTL(element) { return floating_ui_utils_dom_getComputedStyle(element).direction === 'rtl'; } const platform = { convertOffsetParentRelativeRectToViewportRelativeRect, getDocumentElement: getDocumentElement, getClippingRect, getOffsetParent, getElementRects, getClientRects, getDimensions, getScale, isElement: isElement, isRTL }; // https://samthor.au/2021/observing-dom/ function observeMove(element, onMove) { let io = null; let timeoutId; const root = getDocumentElement(element); function cleanup() { clearTimeout(timeoutId); io && io.disconnect(); io = null; } function refresh(skip, threshold) { if (skip === void 0) { skip = false; } if (threshold === void 0) { threshold = 1; } cleanup(); const { left, top, width, height } = element.getBoundingClientRect(); if (!skip) { onMove(); } if (!width || !height) { return; } const insetTop = floor(top); const insetRight = floor(root.clientWidth - (left + width)); const insetBottom = floor(root.clientHeight - (top + height)); const insetLeft = floor(left); const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px"; const options = { rootMargin, threshold: floating_ui_utils_max(0, floating_ui_utils_min(1, threshold)) || 1 }; let isFirstUpdate = true; function handleObserve(entries) { const ratio = entries[0].intersectionRatio; if (ratio !== threshold) { if (!isFirstUpdate) { return refresh(); } if (!ratio) { timeoutId = setTimeout(() => { refresh(false, 1e-7); }, 100); } else { refresh(false, ratio); } } isFirstUpdate = false; } // Older browsers don't support a `document` as the root and will throw an // error. try { io = new IntersectionObserver(handleObserve, { ...options, // Handle