UNPKG

react-md

Version:

This is the full react-md library bundled together for convenience.

15 lines 386 kB
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("react-dom"),require("crypto")):"function"==typeof define&&define.amd?define(["exports","react","react-dom","crypto"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ReactMD={},e.React,e.ReactDOM,e.crypto)}(this,(function(e,t,r,n){"use strict";function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=o(t),a=o(n),l={exports:{}},s={};Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;!function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()||Object.assign; /** @license React v17.0.2 * 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 c=i.default,d=60103;if(s.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var u=Symbol.for;d=u("react.element"),s.Fragment=u("react.fragment")}var p=c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,f=Object.prototype.hasOwnProperty,v={key:!0,ref:!0,__self:!0,__source:!0};function y(e,t,r){var n,o={},i=null,a=null;for(n in void 0!==r&&(i=""+r),void 0!==t.key&&(i=""+t.key),void 0!==t.ref&&(a=t.ref),t)f.call(t,n)&&!v.hasOwnProperty(n)&&(o[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===o[n]&&(o[n]=t[n]);return{$$typeof:d,type:e,key:i,ref:a,props:o,_owner:p.current}}s.jsx=y,s.jsxs=y,l.exports=s;var m={exports:{}}; /*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */!function(e){!function(){var t={}.hasOwnProperty;function r(){for(var e=[],n=0;n<arguments.length;n++){var o=arguments[n];if(o){var i=typeof o;if("string"===i||"number"===i)e.push(o);else if(Array.isArray(o)){if(o.length){var a=r.apply(null,o);a&&e.push(a)}}else if("object"===i)if(o.toString===Object.prototype.toString)for(var l in o)t.call(o,l)&&o[l]&&e.push(l);else e.push(o.toString())}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):window.classNames=r}()}(m);var h=m.exports;var b=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a};function g(e){var n=e.into,o=e.intoId,i=e.children,a=b(t.useState(null),2),l=a[0],s=a[1];return t.useEffect((function(){var e=function(e,t){if("undefined"==typeof document)return null;var r=null;return void 0===e&&void 0===t?r=document.body:"string"==typeof t?r=document.getElementById(t):"string"==typeof e?r=document.querySelector(e):"function"==typeof e?r=e():e&&(r=e),r}(n,o);l!==e&&s(e)}),[n,o,l]),l?r.createPortal(i,l):null}var O=function(){return(O=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function x(e){var t=e.portal,r=e.portalInto,n=e.portalIntoId,o=e.children;return t||r||n?l.exports.jsx(g,O({into:r,intoId:n},{children:o}),void 0):l.exports.jsx(l.exports.Fragment,{children:o},void 0)}function w(e,t){t&&("function"==typeof t?t(e):"object"==typeof t&&(t.current=e))}function j(e,t){if(!t)return e;var r=Object.prototype.hasOwnProperty;return Object.keys(t).reduce((function(n,o){return r.call(t,o)&&t[o]&&(n="".concat(n," ").concat(e,"--").concat(o)),n}),e)}function S(e){return function(t,r){return t?"string"!=typeof t?j(e,t):j("".concat(e,"__").concat(t),r):e}}var P=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,C=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i;function E(e){var t=(e=e.replace(P,(function(e,t,r,n){return"".concat(t).concat(t).concat(r).concat(r).concat(n).concat(n)}))).match(C)||[];return[parseInt(t[1]||"",16)||0,parseInt(t[2]||"",16)||0,parseInt(t[3]||"",16)||0]}var N=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a};function I(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)}function T(e){var t=N(E(e),3),r=t[0],n=t[1],o=t[2];return.2126*I(r)+.7152*I(n)+.0722*I(o)}function A(e,t){var r=T(e)+.05,n=T(t)+.05;return Math.max(r,n)/Math.min(r,n)}var k=function(e){return function(e){return!!e&&void 0!==e.current}(e)?e.current:e};function R(e,t){return e=k(e),t=k(t),!!(e&&t&&e.contains(t))}var M=function(){return(M=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function L(e,t){return Object.keys(t).reduce((function(e,r){return void 0===e[r]&&(e[r]=t[r]),e}),M({},e))}var D=function(){return(D=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},F=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r},_=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},K=t.createContext({root:!0,dir:"ltr",toggleDir:function(){throw new Error("Tried to toggle the current writing direction without initializing the `Dir` component.")}}),B=K.Provider;function H(){var e=t.useContext(K);return e.root,F(e,["root"])}var V=function(){var e="ltr";"undefined"!=typeof document&&(e="rtl"===document.documentElement.getAttribute("dir")?"rtl":"ltr");return e};function W(e){var r=e.children,n=e.defaultDir,o=void 0===n?V:n,i=t.useContext(K).root,a=_(t.useState(o),2),s=a[0],c=a[1];t.useEffect((function(){if(i&&"undefined"!=typeof document)return document.documentElement.setAttribute("dir",s),function(){document.documentElement.removeAttribute("dir")}}),[s,i]);var d=t.useCallback((function(){c((function(e){return"ltr"===e?"rtl":"ltr"}))}),[]),u=t.useMemo((function(){return{root:!1,dir:s,toggleDir:d}}),[s,d]),p=t.Children.only(r);return i||(p=t.cloneElement(p,{dir:s})),l.exports.jsx(B,D({value:u},{children:p}),void 0)}var z=function(){},U=!1;function q(){if("undefined"==typeof window)return!1;var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}});return window.addEventListener("testSupportsPassive",z,t),window.removeEventListener("testSupportsPassive",z,t),U=e,e}q();var G=Object.freeze({__proto__:null,update:q,get isSupported(){return U}}),X=[];function Y(e,t,r,n){void 0===t&&(t=window),void 0===r&&(r=!1);var o=[],i=function(e,t){var r=!1,n=function(e){return function(){for(var n=0;n<t.length;n+=1)t[n](e);r=!1}};return function(t){e?r||(r=!0,window.requestAnimationFrame(n(t))):n(t)()}}(r,o);return{add:function(r){o.length||t.addEventListener(e,i,n),-1===o.indexOf(r)&&o.push(r)},remove:function(r){var a=o.indexOf(r);a>=0&&(o.splice(a,1),o.length||t.removeEventListener(e,i,n))}}}function J(e,t,r,n){void 0===t&&(t=window),void 0===r&&(r="resize"===e||"scroll"===e);var o=X.findIndex((function(o){return o.type===e&&o.target===t&&o.options===n&&o.throttle===r}));return-1===o&&(X.push({type:e,target:t,options:n,throttle:r,handler:Y(e,t,r,n)}),o=X.length-1),X[o].handler}var Q=function(){return(Q=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function Z(e,t,r,n,o,i){void 0===o&&(o=!1),t["".concat(e?"add":"remove","EventListener")]("touch".concat(r),n,U?Q({passive:!0,capture:o},i):o)}function $(e){var r=t.useRef(e);return t.useEffect((function(){r.current=e})),r}function ee(e){var r=e.enabled,n=void 0===r||r,o=e.onScroll,i=e.element,a=e.options,l=void 0===a?!!U&&{passive:!0}:a,s=$(o);t.useEffect((function(){if(n){var e=J("scroll",i||window,!0,l),t=function(e){return s.current(e)};return e.add(t),function(){e.remove(t)}}}),[n,i,l])}function te(e){var t=e.min,r=e.max,n=e.value,o=e.validate;if(void 0===o||o){if(t>=r)throw new RangeError("A range must have the min value less than the max value");if(n>r||n<t)throw new RangeError("A value must be between the min and max values")}var i=(n-t)/(r-t);return Math.max(0,Math.min(Math.abs(i),1))}var re=1e3;function ne(e){var r=t.useRef(e);return t.useEffect((function(){r.current=e})),t.useEffect((function(){return function(){return r.current()}}),[])}var oe=function(){},ie=t.createContext({visibleInTime:re,enableHoverMode:oe,disableHoverMode:oe,startDisableTimer:oe}),ae=ie.Provider;function le(){return t.useContext(ie)}var se=function(){return(se=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},ce=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a};function de(e){var r=e.children,n=e.disabled,o=void 0!==n&&n,i=e.defaultVisibleInTime,a=void 0===i?re:i,s=e.deactivateTime,c=void 0===s?1e3:s,d=ce(t.useState(a),2),u=d[0],p=d[1],f=t.useRef(),v=t.useCallback((function(){o||(window.clearTimeout(f.current),p(0))}),[o]),y=t.useCallback((function(){window.clearTimeout(f.current),p(a)}),[a]),m=t.useCallback((function(){window.clearTimeout(f.current),f.current=window.setTimeout((function(){p(a)}),c)}),[a,c]);t.useEffect((function(){o&&(window.clearTimeout(f.current),p(a))}),[o,a]),ne((function(){window.clearTimeout(f.current)}));var h=t.useMemo((function(){return{visibleInTime:u,enableHoverMode:v,disableHoverMode:y,startDisableTimer:m}}),[y,v,m,u]);return l.exports.jsx(ae,se({value:h},{children:r}),void 0)}var ue="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?t.useLayoutEffect:t.useEffect,pe=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a};var fe=function(){return(fe=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},ve=t.createContext("mouse"),ye=t.createContext(!1),me=ve.Provider,he=ye.Provider;function be(){return t.useContext(ve)}function ge(e){return be()===e}function Oe(e){var r=e.children,n=function(){var e=pe(t.useState("mouse"),2),r=e[0],n=e[1],o=t.useRef(0),i=t.useRef(!1);return ue((function(){var e=function(){return n("mouse")},t=function(){return n("keyboard")},a=function(){o.current=Date.now(),i.current=!1,n("touch")},l=function(){i.current||Date.now()-o.current<1200?i.current=!1:e()},s=function(){i.current=!0},c="rmd-utils--".concat(r);return document.body.classList.add(c),window.addEventListener("touchstart",a,!0),"mouse"===r?window.addEventListener("keydown",t,!0):"keyboard"===r?window.addEventListener("mousedown",e,!0):(window.addEventListener("mousemove",l,!0),window.addEventListener("contextmenu",s,!0)),function(){document.body.classList.remove(c),window.removeEventListener("touchstart",a,!0),"mouse"===r?window.removeEventListener("keydown",t,!0):"keyboard"===r?window.removeEventListener("mousedown",e,!0):(window.removeEventListener("mousemove",l,!0),window.removeEventListener("contextmenu",s,!0))}}),[r]),r}();if(t.useContext(ye))throw new Error("Mounted multiple `UserInteractionModeListener` components.");return l.exports.jsx(me,fe({value:n},{children:l.exports.jsx(he,fe({value:!0},{children:r}),void 0)}),void 0)}var xe=function(){return(xe=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},we=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a};function je(e){var r=void 0===e?{}:e,n=r.disabled,o=void 0!==n&&n,i=r.sticky,a=void 0!==i&&i,l=r.onClick,s=r.onMouseEnter,c=r.onMouseLeave,d=r.defaultVisible,u=void 0!==d&&d,p=r.exitVisibilityDelay,f=void 0===p?a?300:0:p,v=be(),y="touch"===v,m=we(t.useState(u),2),h=m[0],b=m[1],g=we(t.useState(!1),2),O=g[0],x=g[1],w=t.useRef(),j=t.useRef(u),S=le(),P=S.visibleInTime,C=S.enableHoverMode,E=S.disableHoverMode,N=S.startDisableTimer,I=0===P;t.useEffect((function(){a&&!h&&x(!1)}),[h,a]),ne((function(){window.clearTimeout(w.current)})),t.useEffect((function(){if(!o){var e=function(){b(!1),E(),window.clearTimeout(w.current)};return j.current||e(),j.current=!1,window.addEventListener("mousedown",e),function(){window.removeEventListener("mousedown",e)}}}),[E,v,o]);var T,A=t.useCallback((function(e){if(null==s||s(e),!(O||o||y||e.isPropagationStopped())){if(window.clearTimeout(w.current),0===P)return C(),void b(!0);w.current=window.setTimeout((function(){C(),b(!0)}),P)}}),[o,C,y,s,O,P]),k=t.useCallback((function(e){null==c||c(e),O||o||y||e.isPropagationStopped()||(N(),window.clearTimeout(w.current),0!==f?w.current=window.setTimeout((function(){b(!1)}),f):b(!1))}),[o,f,y,c,N,O]),R=t.useCallback((function(e){null==l||l(e),e.isPropagationStopped()||o||(N(),window.clearTimeout(w.current))}),[o,l,N]),M=t.useCallback((function(e){null==l||l(e),e.isPropagationStopped()||o||(O?(x(!1),b((function(e){return!e}))):(x(!0),b(!0),E()))}),[E,o,l,O]),L={onClick:R,onMouseEnter:A,onMouseLeave:k};return a&&(T=xe(xe({},L),{onClick:M})),{active:I,stuck:a?O:void 0,visible:h,setVisible:b,handlers:L,stickyHandlers:T,enableHoverMode:C,disableHoverMode:E,startDisableTimer:N}}var Se="".concat(64.0625,"em"),Pe="".concat(48,"em"),Ce="".concat(64,"em"),Ee="".concat(767/16,"em"),Ne="".concat(80,"em"),Ie=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},Te=function(){var e,t=null===(e=window.screen.orientation)||void 0===e?void 0:e.type;if("string"==typeof t)return t;var r=window.screen;return r.availHeight>r.availWidth?"portrait-primary":"landscape-primary"};function Ae(e){var r=Ie(t.useState((function(){return e||("undefined"!=typeof window?Te():"landscape-primary")})),2),n=r[0],o=r[1];return t.useEffect((function(){if("undefined"!=typeof window){var e=function(){o(Te())};return window.addEventListener("orientationchange",e),function(){return window.removeEventListener("orientationchange",e)}}}),[]),n}var ke=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a};function Re(e,r,n,o){void 0===n&&(n=!1),void 0===o&&(o="undefined"!=typeof window);var i=ke(t.useState((function(){return void 0!==r?r:!(n||!o||"undefined"==typeof window)&&window.matchMedia(e).matches})),2),a=i[0],l=i[1];return t.useEffect((function(){if("undefined"!=typeof window&&!n){var t=window.matchMedia(e),r=function(e){var t=e.matches;return l(t)};return t.addEventListener("change",r),t.matches!==a&&l(t.matches),function(){t.removeEventListener("change",r)}}}),[n,a,e]),a}var Me=function(e,t){var r=typeof e;if("undefined"===r)return"";var n="number"===r?"".concat(e,"px"):e;return"(".concat(t,"-width: ").concat(n,")")};function Le(e){var r=e.min,n=e.max;return Re(t.useMemo((function(){var e=[Me(r,"min"),Me(n,"max")].filter(Boolean).join(" and ");return"screen and ".concat(e)}),[r,n]))}var De=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},Fe={isPhone:!1,isTablet:!1,isDesktop:!0,isLargeDesktop:!1,isLandscape:!0};function _e(e){var r=void 0===e?{}:e,n=r.phoneMaxWidth,o=void 0===n?Ee:n,i=r.tabletMinWidth,a=void 0===i?Pe:i,l=r.tabletMaxWidth,s=void 0===l?Ce:l,c=r.desktopMinWidth,d=void 0===c?Se:c,u=r.desktopLargeMinWidth,p=void 0===u?Ne:u,f=r.defaultSize,v=void 0===f?Fe:f;if("undefined"==typeof window)return v;var y=Le({min:d}),m=Le({min:p}),h=Le({min:a,max:s}),b=Le({max:o}),g=y,O=!y&&h,x=!O&&!g&&b,w=Ae().includes("landscape"),j=m,S=De(t.useState(v),2),P=S[0],C=S[1];return t.useEffect((function(){P.isPhone===x&&P.isTablet===O&&P.isDesktop===g&&P.isLargeDesktop===j&&P.isLandscape===w||(x||O||g||j)&&C({isPhone:x,isTablet:O,isDesktop:g,isLargeDesktop:j,isLandscape:w})}),[x,O,g,j,w,P]),P}var Ke=function(){return(Ke=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Be=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r},He=t.createContext(Ke(Ke({},Fe),{__initialized:!1}));function Ve(){var e=t.useContext(He),r=e.__initialized,n=Be(e,["__initialized"]);if(!r)throw new Error("Unable to get the current `AppSize` from `react-md` because the `AppSizeListener` could not be found when using the `useAppSize` hook. To fix this error, either initialize the `AppSizeListener` component from `@react-md/utils` or the `Configuration` component from `@react-md/layout` near the root of your app.");return n}var We,ze=function(){return(ze=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Ue=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r},qe=S("rmd-grid"),Ge=t.forwardRef((function(e,r){var n,o,i,a,s,c,d,u=e.style,p=e.className,f=e.clone,v=e.children,y=e.colSpan,m=e.colStart,b=e.colEnd,g=e.rowSpan,O=e.rowStart,x=e.rowEnd,w=e.phone,j=e.tablet,S=e.desktop,P=e.largeDesktop,C=Ue(e,["style","className","clone","children","colSpan","colStart","colEnd","rowSpan","rowStart","rowEnd","phone","tablet","desktop","largeDesktop"]),E=Ve(),N=E.isPhone,I=E.isTablet,T=E.isDesktop,A=E.isLargeDesktop,k=y,R=m,M=b,L=g,D=O,F=x,_=N&&w||I&&j||A&&P||T&&S;_&&(L=void 0===(n=_.rowSpan)?g:n,D=void 0===(o=_.rowStart)?O:o,F=void 0===(i=_.rowEnd)?x:i,k=void 0===(a=_.colSpan)?y:a,R=void 0===(s=_.colStart)?m:s,M=void 0===(c=_.colEnd)?b:c);var K=ze({gridColumnStart:R,gridColumnEnd:M,gridRowStart:D,gridRowEnd:L?"span ".concat(L):F},u),B=h(qe("cell",((d={})["".concat(k)]=k,d)),p);if(f&&t.isValidElement(v)){var H=t.Children.only(v);return t.cloneElement(H,{style:ze(ze({},H.props.style),K),className:h(B,H.props.className)})}return l.exports.jsx("div",ze({},C,{ref:r,style:K,className:B},{children:v}),void 0)})),Xe=function(){return(Xe=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Ye=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r},Je="--rmd-grid-cols",Qe="--rmd-grid-gutter",Ze=S("rmd-grid"),$e=t.forwardRef((function(e,r){var n,o=e.style,i=e.className,a=e.children,s=e.clone,c=void 0!==s&&s,d=e.cloneStyles,u=void 0!==d&&d,p=e.wrapOnly,f=void 0!==p&&p,v=e.columns,y=e.phoneColumns,m=e.tabletColumns,b=e.desktopColumns,g=e.largeDesktopColumns,O=e.padding,x=e.gutter,w=e.minCellWidth,j=Ye(e,["style","className","children","clone","cloneStyles","wrapOnly","columns","phoneColumns","tabletColumns","desktopColumns","largeDesktopColumns","padding","gutter","minCellWidth"]),S=Ve(),P=S.isPhone,C=S.isTablet,E=S.isDesktop,N=S.isLargeDesktop,I=Xe(Xe({padding:0!==O&&O||void 0,gridTemplateColumns:w?"repeat(auto-fill, minmax(".concat(w,", 1fr))"):void 0},o),((n={})[Je]=P&&y||C&&m||N&&g||E&&b||v,n[Qe]=x,n)),T=h(Ze({"no-padding":0===O}),i);if(u&&t.isValidElement(a)){var A=t.Children.only(a);return t.cloneElement(A,{style:Xe(Xe({},I),A.props.style),className:h(T,A.props.className)})}var k=a;return(c||f)&&(k=t.Children.map(a,(function(e){return e&&l.exports.jsx(Ge,Xe({clone:c},{children:e}),void 0)}))),l.exports.jsx("div",Xe({},j,{ref:r,style:I,className:T},{children:k}),void 0)})),et=function(){return(et=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},tt=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r},rt=S("rmd-grid-list"),nt=t.forwardRef((function(e,r){var n=e.className,o=e.children,i=e.square,a=void 0!==i&&i,s=e.clone,c=void 0!==s&&s,d=tt(e,["className","children","square","clone"]),u=h(rt("cell",{square:a}),n);if(c&&t.isValidElement(o)){var p=t.Children.only(o);return t.cloneElement(p,{className:h(u,p.props.className)})}return l.exports.jsx("div",et({},d,{ref:r,className:u},{children:o}),void 0)})),ot=[],it="ResizeObserver loop completed with undelivered notifications.";!function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(We||(We={}));var at,lt=function(e){return Object.freeze(e)},st=function(e,t){this.inlineSize=e,this.blockSize=t,lt(this)},ct=function(){function e(e,t,r,n){return this.x=e,this.y=t,this.width=r,this.height=n,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,lt(this)}return e.prototype.toJSON=function(){var e=this;return{x:e.x,y:e.y,top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),dt=function(e){return e instanceof SVGElement&&"getBBox"in e},ut=function(e){if(dt(e)){var t=e.getBBox(),r=t.width,n=t.height;return!r&&!n}var o=e,i=o.offsetWidth,a=o.offsetHeight;return!(i||a||e.getClientRects().length)},pt=function(e){var t,r;if(e instanceof Element)return!0;var n=null===(r=null===(t=e)||void 0===t?void 0:t.ownerDocument)||void 0===r?void 0:r.defaultView;return!!(n&&e instanceof n.Element)},ft="undefined"!=typeof window?window:{},vt=new WeakMap,yt=/auto|scroll/,mt=/^tb|vertical/,ht=/msie|trident/i.test(ft.navigator&&ft.navigator.userAgent),bt=function(e){return parseFloat(e||"0")},gt=function(e,t,r){return void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=!1),new st((r?t:e)||0,(r?e:t)||0)},Ot=lt({devicePixelContentBoxSize:gt(),borderBoxSize:gt(),contentBoxSize:gt(),contentRect:new ct(0,0,0,0)}),xt=function(e,t){if(void 0===t&&(t=!1),vt.has(e)&&!t)return vt.get(e);if(ut(e))return vt.set(e,Ot),Ot;var r=getComputedStyle(e),n=dt(e)&&e.ownerSVGElement&&e.getBBox(),o=!ht&&"border-box"===r.boxSizing,i=mt.test(r.writingMode||""),a=!n&&yt.test(r.overflowY||""),l=!n&&yt.test(r.overflowX||""),s=n?0:bt(r.paddingTop),c=n?0:bt(r.paddingRight),d=n?0:bt(r.paddingBottom),u=n?0:bt(r.paddingLeft),p=n?0:bt(r.borderTopWidth),f=n?0:bt(r.borderRightWidth),v=n?0:bt(r.borderBottomWidth),y=u+c,m=s+d,h=(n?0:bt(r.borderLeftWidth))+f,b=p+v,g=l?e.offsetHeight-b-e.clientHeight:0,O=a?e.offsetWidth-h-e.clientWidth:0,x=o?y+h:0,w=o?m+b:0,j=n?n.width:bt(r.width)-x-O,S=n?n.height:bt(r.height)-w-g,P=j+y+O+h,C=S+m+g+b,E=lt({devicePixelContentBoxSize:gt(Math.round(j*devicePixelRatio),Math.round(S*devicePixelRatio),i),borderBoxSize:gt(P,C,i),contentBoxSize:gt(j,S,i),contentRect:new ct(u,s,j,S)});return vt.set(e,E),E},wt=function(e,t,r){var n=xt(e,r),o=n.borderBoxSize,i=n.contentBoxSize,a=n.devicePixelContentBoxSize;switch(t){case We.DEVICE_PIXEL_CONTENT_BOX:return a;case We.BORDER_BOX:return o;default:return i}},jt=function(e){var t=xt(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=lt([t.borderBoxSize]),this.contentBoxSize=lt([t.contentBoxSize]),this.devicePixelContentBoxSize=lt([t.devicePixelContentBoxSize])},St=function(e){if(ut(e))return 1/0;for(var t=0,r=e.parentNode;r;)t+=1,r=r.parentNode;return t},Pt=function(){var e=1/0,t=[];ot.forEach((function(r){if(0!==r.activeTargets.length){var n=[];r.activeTargets.forEach((function(t){var r=new jt(t.target),o=St(t.target);n.push(r),t.lastReportedSize=wt(t.target,t.observedBox),o<e&&(e=o)})),t.push((function(){r.callback.call(r.observer,n,r.observer)})),r.activeTargets.splice(0,r.activeTargets.length)}}));for(var r=0,n=t;r<n.length;r++){(0,n[r])()}return e},Ct=function(e){ot.forEach((function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach((function(r){r.isActive()&&(St(r.target)>e?t.activeTargets.push(r):t.skippedTargets.push(r))}))}))},Et=function(){var e,t=0;for(Ct(t);ot.some((function(e){return e.activeTargets.length>0}));)t=Pt(),Ct(t);return ot.some((function(e){return e.skippedTargets.length>0}))&&("function"==typeof ErrorEvent?e=new ErrorEvent("error",{message:it}):((e=document.createEvent("Event")).initEvent("error",!1,!1),e.message=it),window.dispatchEvent(e)),t>0},Nt=[],It=function(e){if(!at){var t=0,r=document.createTextNode("");new MutationObserver((function(){return Nt.splice(0).forEach((function(e){return e()}))})).observe(r,{characterData:!0}),at=function(){r.textContent=""+(t?t--:t++)}}Nt.push(e),at()},Tt=0,At={attributes:!0,characterData:!0,childList:!0,subtree:!0},kt=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Rt=function(e){return void 0===e&&(e=0),Date.now()+e},Mt=!1,Lt=new(function(){function e(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return e.prototype.run=function(e){var t=this;if(void 0===e&&(e=250),!Mt){Mt=!0;var r,n=Rt(e);r=function(){var r=!1;try{r=Et()}finally{if(Mt=!1,e=n-Rt(),!Tt)return;r?t.run(1e3):e>0?t.run(e):t.start()}},It((function(){requestAnimationFrame(r)}))}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var e=this,t=function(){return e.observer&&e.observer.observe(document.body,At)};document.body?t():ft.addEventListener("DOMContentLoaded",t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),kt.forEach((function(t){return ft.addEventListener(t,e.listener,!0)})))},e.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),kt.forEach((function(t){return ft.removeEventListener(t,e.listener,!0)})),this.stopped=!0)},e}()),Dt=function(e){!Tt&&e>0&&Lt.start(),!(Tt+=e)&&Lt.stop()},Ft=function(){function e(e,t){this.target=e,this.observedBox=t||We.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e,t=wt(this.target,this.observedBox,!0);return e=this.target,dt(e)||function(e){switch(e.tagName){case"INPUT":if("image"!==e.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(e)||"inline"!==getComputedStyle(e).display||(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),_t=function(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t},Kt=new WeakMap,Bt=function(e,t){for(var r=0;r<e.length;r+=1)if(e[r].target===t)return r;return-1},Ht=function(){function e(){}return e.connect=function(e,t){var r=new _t(e,t);Kt.set(e,r)},e.observe=function(e,t,r){var n=Kt.get(e),o=0===n.observationTargets.length;Bt(n.observationTargets,t)<0&&(o&&ot.push(n),n.observationTargets.push(new Ft(t,r&&r.box)),Dt(1),Lt.schedule())},e.unobserve=function(e,t){var r=Kt.get(e),n=Bt(r.observationTargets,t),o=1===r.observationTargets.length;n>=0&&(o&&ot.splice(ot.indexOf(r),1),r.observationTargets.splice(n,1),Dt(-1))},e.disconnect=function(e){var t=this,r=Kt.get(e);r.observationTargets.slice().forEach((function(r){return t.unobserve(e,r.target)})),r.activeTargets.splice(0,r.activeTargets.length)},e}(),Vt=function(){function e(e){if(0===arguments.length)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof e)throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Ht.connect(this,e)}return e.prototype.observe=function(e,t){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!pt(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Ht.observe(this,e,t)},e.prototype.unobserve=function(e){if(0===arguments.length)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!pt(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Ht.unobserve(this,e)},e.prototype.disconnect=function(){Ht.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();function Wt(e){var r=t.useRef(null),n=t.useCallback((function(t){w(t,e),r.current=t}),[e]);return[r,n]}var zt,Ut=function(){return(Ut=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},qt=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a};function Gt(e,t){return!e||e.height!==t.height||e.scrollHeight!==t.scrollHeight}function Xt(e,t){return!e||e.width!==t.width||e.scrollWidth!==t.scrollWidth}var Yt=[];function Jt(e,t){void 0===t&&(t={});var r=t.ref,n=t.disableWidth,o=void 0!==n&&n,i=t.disableHeight,a=void 0!==i&&i,l=qt(Wt(r),2),s=l[0],c=l[1];return ue((function(){var t=s.current;if(!(a&&o||!t))return zt||"undefined"==typeof document||(zt=new Vt((function(e){for(var t=function(t){var r=e[t],n=Yt.filter((function(e){return e.target===r.target}));if(!n.length)return{value:void 0};for(var o=r.contentRect,i=o.height,a=o.width,l=r.target,s={height:i,width:a,scrollHeight:l.scrollHeight,scrollWidth:l.scrollWidth},c=0;c<n.length;c+=1){var d=n[c],u=d.handler,p=d.prevSize,f=d.disableHeight,v=d.disableWidth,y=Gt(p,s),m=Xt(p,s);(y&&!f||m&&!v)&&(d.prevSize=s,u(Ut(Ut({},s),{element:r.target})))}},r=0;r<e.length;r+=1){var n=t(r);if("object"==typeof n)return n.value}}))),function(e,t,r,n){var o=Yt.find((function(t){return t.target===e}));Yt.push({target:e,handler:t,disableWidth:n,disableHeight:r,prevSize:void 0}),o||null==zt||zt.observe(e)}(t,e,a,o),function(){!function(e,t,r,n){var o=Yt.findIndex((function(o){return o.target===e&&o.handler===t&&o.disableWidth===n&&o.disableHeight===r}));-1!==o&&Yt.splice(o,1),Yt.some((function(t){return t.target===e}))||null==zt||zt.unobserve(e)}(t,e,a,o)}}),[a,o,e]),[s,c]}var Qt={height:void 0,width:void 0};var Zt=function(){return(Zt=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},$t=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},er="--rmd-cell-size",tr="--rmd-cell-margin",rr=t.createContext({columns:-1,cellWidth:-1}),nr=rr.Provider;function or(e){var r,n=void 0===e?{}:e,o=n.ref,i=n.style,a=n.className,l=n.cellMargin,s=n.defaultSize,c=n.maxCellSize,d=void 0===c?150:c,u=n.disableHeight,p=void 0!==u&&u,f=n.disableWidth,v=void 0!==f&&f,y=n.containerPadding,m=void 0===y?16:y,b=$t(Wt(o),2),g=b[0],O=b[1],x=$t(t.useState(s||{columns:-1,cellWidth:d}),2),w=x[0],j=x[1],S=t.useCallback((function(){var e=g.current;if(e){var t=e.getBoundingClientRect().width;t-=m,e.offsetHeight<e.scrollHeight&&(t-=function(e,t){if(void 0===e&&(e="width"),void 0===t&&(t=!1),"undefined"==typeof window)return-1;var r=Qt[e];if(!t&&"number"==typeof r)return r;var n=document.createElement("div");n.style.visibility="hidden",n.style.overflow="scroll",document.body.appendChild(n);var o=document.createElement("div");n.appendChild(o);var i="width"===e?"offsetWidth":"offsetHeight";return r=n[i]-o[i],Qt[e]=r,document.body.removeChild(n),r}("width"));var r=Math.ceil(t/d);j({cellWidth:t/r,columns:r})}}),[m,d,g]),P=$t(Jt(S,{ref:O,disableHeight:p,disableWidth:v}),2)[1],C=Zt(Zt({},i),((r={})[er]="".concat(w.cellWidth,"px"),r));return l&&(C[tr]=l),[{ref:P,style:C,className:h("rmd-grid-list",a)},w]}var ir=function(){return(ir=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},ar=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r},lr=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},sr=t.forwardRef((function(e,r){var n=e.style,o=e.className,i=e.children,a=e.clone,s=void 0!==a&&a,c=e.wrapOnly,d=void 0!==c&&c,u=e.cellMargin,p=e.defaultSize,f=e.maxCellSize,v=void 0===f?150:f,y=e.containerPadding,m=void 0===y?16:y,h=e.disableHeightObserver,b=void 0!==h&&h,g=e.disableWidthObserver,O=void 0!==g&&g,x=ar(e,["style","className","children","clone","wrapOnly","cellMargin","defaultSize","maxCellSize","containerPadding","disableHeightObserver","disableWidthObserver"]),w=lr(or({ref:r,style:n,className:o,cellMargin:u,defaultSize:p,maxCellSize:v,containerPadding:m,disableHeight:b,disableWidth:O}),2),j=w[0],S=w[1],P=null;return P=function(e){return"function"==typeof e}(i)?i(S):s||d?t.Children.map(i,(function(e){return e&&l.exports.jsx(nt,ir({clone:s},{children:e}),void 0)})):i,l.exports.jsx(nr,ir({value:S},{children:l.exports.jsx("div",ir({},x,j,{children:P}),void 0)}),void 0)}));function cr(e){var t=e.value,r=e.min,n=void 0===r?0:r,o=e.max,i=e.increment,a=e.minmax,l=t+(i?1:-1);return void 0!==a&&a?l=Math.min(o,Math.max(n,l)):l>o?l=n:l<n&&(l=o),l}function dr(e,t,r,n,o){void 0===o&&(o=r-t);var i=Math.round((e-t)*n/o)/n,a=Math.min(Math.max(i,0),1),l=o/n,s=Number.isInteger(l)?o%n:l.toString().split(".")[1].length;return Math.min(r,Math.max(t,parseFloat((a*o+t).toFixed(s))))}function ur(e,t){if(!t.length)return e;var r={};for(var n in e)t.includes(n)||(r[n]=e[n]);return r}function pr(e){if(!e)return null;if(/(tree|list)item/.test(e.getAttribute("role")||"")){if(r=e.querySelector(".rmd-tree-item__content, .rmd-item-text"))return r}else if("file"===e.getAttribute("type")){var t=document.querySelector('[for="'.concat(e.id,'"]'));if(t)return t}var r,n=e.getAttribute("data-sizing-selector");if(n&&(r=e.querySelector(n)))return r;return e}function fr(e){var t=document.documentElement||{clientHeight:0,clientWidth:0};return"width"===e?window.innerWidth||t.clientWidth:window.innerHeight||t.clientHeight}function vr(e){return"number"==typeof e?"".concat(e,"px"):""}function yr(e,t){void 0===t&&(t={});var r=e.cloneNode(!0);r.removeAttribute("id"),r.removeAttribute("role"),r.style.position="fixed",r.style.visibility="hidden",r.style.left=vr(t.left),r.style.top=vr(t.top),r.style.right=vr(t.right),r.style.bottom=vr(t.bottom),r.style.webkitTransform="none",r.style.transform="none";var n=e.parentElement||document.body;n.appendChild(r);var o=r.getBoundingClientRect();return n.removeChild(r),o}var mr={x:"center",y:"above"},hr={x:"inner-left",y:"top"},br={x:"inner-right",y:"top"},gr={x:"right",y:"top"},Or={x:"left",y:"center"},xr={x:"center",y:"center"},wr={x:"right",y:"center"},jr={x:"center",y:"below"},Sr={x:"inner-right",y:"below"};function Pr(e){var t=e.xMargin,r=e.elWidth,n=e.initialX,o=e.containerRect;return(null!=n?n:o.left)-r-t}function Cr(e){var t=e.xMargin,r=e.initialX,n=e.containerRect;return(null!=r?r:n.left)+t}function Er(e){var t=e.xMargin,r=e.elWidth,n=e.initialX,o=e.containerRect;return(null!=n?n:o.left+o.width)-r-t}function Nr(e){var t=e.xMargin,r=e.initialX,n=e.containerRect;return(null!=r?r:n.left+n.width)+t}function Ir(e){var t=e.yMargin,r=e.initialY,n=e.elHeight,o=e.containerRect;return(null!=r?r:o.top)-n-t}function Tr(e){var t=e.yMargin,r=e.initialY,n=e.containerRect;return(null!=r?r:n.top)+t}function Ar(e){var t=e.yMargin,r=e.initialY,n=e.elHeight,o=e.containerRect;return(null!=r?r:o.top+o.height)-n-t}function kr(e){var t=e.yMargin,r=e.initialY,n=e.containerRect;return(null!=r?r:n.top+n.height)+t}function Rr(e){var t=e.x,r=e.vw,n=e.vwMargin,o=e.xMargin,i=e.width,a=e.elWidth,l=e.initialX,s=e.containerRect,c=e.disableSwapping;if("min"===i||"equal"===i)return function(e){var t,r,n=e.x,o=e.vw,i=e.elWidth,a=e.xMargin,l=e.vwMargin,s=e.initialX,c=e.containerRect,d=e.isMinWidth,u=null!=s?s:c.left+a,p=c.width-2*a;return d&&(t=p,p=void 0,u+i>o-l&&(r=l)),{left:u,right:r,width:p,minWidth:t,actualX:n}}({x:t,vw:r,vwMargin:n,xMargin:o,elWidth:a,initialX:l,containerRect:s,isMinWidth:"min"===i});if(a>r-2*n)return{left:n,right:n,actualX:t};var d={vwMargin:n,xMargin:o,elWidth:a,initialX:l,screenRight:r-n,containerRect:s,disableSwapping:c};switch(t){case"left":return function(e){var t=e.vwMargin,r=e.screenRight,n=e.elWidth,o=e.disableSwapping,i=Pr(e),a="left";if(i>=t)return{actualX:a,left:i};var l=Nr(e);return o||l+n>r?i=t:(i=l,a="right"),{actualX:a,left:i}}(d);case"inner-left":return function(e){var t=e.vwMargin,r=e.screenRight,n=e.elWidth,o=e.disableSwapping,i=Cr(e),a="inner-left";if(i+n<=r)return{actualX:a,left:i};var l=Er(e);return o||l<t?i=t:(i=l,a="inner-right"),{actualX:a,left:i}}(d);case"center":return function(e){var t=e.vwMargin,r=e.screenRight,n=e.elWidth,o=function(e){var t=e.elWidth,r=e.initialX,n=e.containerRect,o=n.width/2,i=t/2;return(null!=r?r:n.left+o)-i}(e);return o<t?o=t:(o+n>r||o<t)&&(o=r-n),{actualX:"center",left:o}}(d);case"inner-right":return function(e){var t=e.screenRight,r=e.vwMargin,n=e.elWidth,o=e.disableSwapping,i=Er(e),a="inner-right";if(i>=r)return{actualX:a,left:i};var l=Cr(e);return o||l+n>t?i=t-n:(i=l,a="inner-left"),{actualX:a,left:i}}(d);case"right":return function(e){var t=e.screenRight,r=e.vwMargin,n=e.elWidth,o=e.disableSwapping,i=Nr(e),a="right";if(i+n<=t)return{actualX:a,left:i};var l=Pr(e);return o||l<r?i=t-n:(i=l,a="left"),{actualX:a,left:i}}(d);default:throw new Error("This should never happen")}}function Mr(e){var t=e.y,r=e.vh,n=e.vhMargin,o=e.yMargin,i=e.elHeight,a=e.initialY,l=e.containerRect,s=e.disableSwapping,c=e.preventOverlap,d=e.disableVHBounds;if(!d&&!c&&i>r-2*n)return{top:n,bottom:n,actualY:"center"};var u={vhMargin:n,yMargin:o,elHeight:i,initialY:a,containerRect:l,screenBottom:r-n,preventOverlap:c,disableSwapping:s,disableVHBounds:d};switch(t){case"above":return function(e){var t=e.yMargin,r=e.vhMargin,n=e.screenBottom,o=e.elHeight,i=e.containerRect,a=e.preventOverlap,l=e.disableSwapping,s=e.disableVHBounds,c=Ir(e),d="above";if(s)return{actualY:d,top:Math.max(0,c)};if(c>r)return{actualY:d,top:c};var u,p=kr(e);return l||p+o>n?c=r:(d="below",c=p),a&&"above"===d&&c+o>i.top&&(u=window.innerHeight-i.top+t),{actualY:d,top:c,bottom:u}}(u);case"top":return function(e){var t=e.vhMargin,r=e.screenBottom,n=e.elHeight,o=e.disableSwapping,i=e.disableVHBounds,a=Tr(e),l="top";if(i||a+n<=r)return{actualY:l,top:a};var s=Ar(e);return o||s<t?a=t:(l="bottom",a=s),{actualY:l,top:a}}(u);case"center":return function(e){var t=e.vhMargin,r=e.screenBottom,n=e.elHeight,o=e.disableVHBounds,i=function(e){var t=e.elHeight,r=e.initialY,n=e.containerRect,o=n.height/2,i=t/2;return(null!=r?r:n.top+o)-i}(e),a="center";return o?{actualY:a,top:Math.max(0,i)}:((i=Math.max(t,i))+n>r&&(i=r-n),{actualY:a,top:i})}(u);case"bottom":return function(e){var t=e.vhMargin,r=e.screenBottom,n=e.elHeight,o=e.disableSwapping,i=e.disableVHBounds,a=Ar(e),l="bottom";if(i||a>t)return{actualY:l,top:a};var s=Tr(e);return o||s+n>r?a=r-n:(l="top",a=s),{actualY:l,top:a}}(u);case"below":return function(e){var t=e.yMargin,r=e.vhMargin,n=e.elHeight,o=e.screenBottom,i=e.containerRect,a=e.preventOverlap,l=e.disableSwapping,s=e.disableVHBounds,c=kr(e),d="below";if(s||c+n<=o)return{actualY:d,top:c};if(a){var u=i.top-t;return l||u<o-c?{actualY:d,top:c,bottom:r}:{actualY:"above",top:Math.max(r,u-n),bottom:fr("height")-u}}var p=Ir(e);return l||p<r?c=o-n:(d="above",c=p),{actualY:d,top:c}}(u);default:throw new Error("This should never happen")}}function Lr(e){var t="0";switch(e.x){case"right":case"inner-left":t="0";break;case"center":t="50%";break;case"left":case"inner-right":t="100%";break;default:t="0"}var r="0";switch(e.y){case"above":case"bottom":r="100%";break;case"center":r="50%";break;case"below":case"top":r="0";break;default:r="0"}return"".concat(t," ").concat(r)}function Dr(e){var t=e.container,r=e.element,n=e.anchor,o=void 0===n?jr:n,i=e.initialX,a=e.initialY,l=e.vwMargin,s=void 0===l?16:l,c=e.vhMargin,d=void 0===c?16:c,u=e.xMargin,p=void 0===u?0:u,f=e.yMargin,v=void 0===f?0:f,y=e.width,m=void 0===y?"auto":y,h=e.preventOverlap,b=void 0!==h&&h,g=e.transformOrigin,O=void 0!==g&&g,x=e.disableSwapping,w=void 0!==x&&x,j=e.disableVHBounds,S=void 0!==j&&j;if(!(t=pr(t))||!r)return{actualX:o.x,actualY:o.y};var P=t.getBoundingClientRect(),C=fr("height"),E=fr("width"),N=yr(r),I=N.height,T=N.width;S&&(r.closest("[role='dialog']")||(a=(null!=a?a:0)+window.scrollY));var A=Rr({x:o.x,vw:E,vwMargin:s,xMargin:p,width:m,elWidth:T,initialX:i,containerRect:P,disableSwapping:w}),k=A.left,R=A.right,M=A.width,L=A.minWidth,D=A.actualX,F=Mr({y:o.y,vh:C,vhMargin:d,yMargin:v,initialY:a,elHeight:I,containerRect:P,disableSwapping:w,preventOverlap:b,disableVHBounds:S}),_=F.top,K=F.bottom,B=F.actualY;return{actualX:D,actualY:B,style:{left:k,top:_,right:R,bottom:K,width:M,minWidth:L,position:S?"absolute":"fixed",transformOrigin:O?Lr({x:D,y:B}):void 0}}}function Fr(e,t){if(t=pr(t),e&&t){var r=t.offsetTop;t.offsetParent!==e&&(r-=e.offsetTop);var n=r+t.offsetHeight;n>e.offsetHeight+e.scrollTop?e.scrollTop=n-e.offsetHeight:r<e.scrollTop&&(e.scrollTop=r)}}function _r(e,t,r,n){e=e.toUpperCase();for(var o=r;o<n;o+=1){if(0===t[o].toUpperCase().indexOf(e))return o}return-1}function Kr(e,t,r,n){void 0===n&&(n=!0);var o=_r(e,t,r+1,t.length);-1===o&&(o=_r(e,t,0,r+(n?1:0)));return o}function Br(e,t,r,n){return void 0===t&&(t=!1),void 0===r&&(r=!1),void 0===n&&(n=!1),t&&(e=e.toLowerCase()),n?e=e.replace(/\s/g,""):r&&(e=e.trim()),e}function Hr(e,t){switch(void 0===t&&(t="value"),typeof e){case"string":return e;case"number":return Number.isNaN(e)?"":"".concat(e);case"function":return Hr(e(),t);case"object":return e?Hr(e[t],t):"";default:return""}}var Vr=Hr,Wr="value",zr={getItemValue:Vr,valueKey:Wr,trim:true,ignoreWhitespace:false};function Ur(e,t,r){void 0===r&&(r={});var n=L(r,zr),o=n.getItemValue,i=n.valueKey,a=n.trim,l=n.ignoreWhitespace,s=n.startsWith,c=void 0!==s&&s;return(e=Br(e,!0,a,l))&&t.length?t.filter((function(t){var r=Br(o(t,i),!0,a,l);return c?0===r.indexOf(e):-1!==r.indexOf(e)})):t}function qr(e){return new RegExp("".concat(e).split("").join("\\w*").replace(/(\(|\||\)|\\(?!w\*)|\[|\|-|\.|\^|\+|\$|\?|^(?!w)\*)/g,"\\$1").replace(/\*\*/g,"*\\*"),"i")}function Gr(e,t,r){void 0===r&&(r={});var n=L(r,zr),o=n.getItemValue,i=n.valueKey,a=n.trim,l=n.ignoreWhitespace;if(e=Br(e,!1,a,l),!t.length||!e)return t;var s=qr(e);return t.filter((function(e){var t=Br(o(e,i),!1,a,l);return t.length&&t.match(s)}))}function Xr(e,r){void 0===r&&(r=500);var n=t.useRef(e),o=t.useRef(),i=t.useCallback((function(){window.clearTimeout(o.current),n.current=e}),[e]),a=t.useCallback((function(e){n.current=e,window.clearTimeout(o.current),o.current=window.setTimeout(i,r)}),[r,i]);return[n,a,i]}var Yr=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a};function Jr(e){var r=e.items,n=e.onChange,o=e.onKeyDown,i=e.resetTime,a=void 0===i?500:i,l=e.searchIndex,s=e.valueKey,c=void 0===s?Wr:s,d=e.getItemValue,u=void 0===d?Vr:d,p=e.findMatchIndex,f=void 0===p?Kr:p,v=Yr(Xr("",a),2),y=v[0],m=v[1],h=t.useMemo((function(){return r.map((function(e){return u(e,c)}))}),[r,u,c]);return t.useCallback((function(e){o&&o(e);var t=e.key,i=e.altKey,a=e.ctrlKey,s=e.metaKey;if(!(i||a||s||t.length>1||!y.current&&" "===t)){var c=t;y.current!==t&&(c="".concat(y.current).concat(t)),m(c);var d=f(c,h,l,!0);if(d!==l&&-1!==d){var u={index:d,item:r[d],items:r,query:c,target:e.currentTarget};n(u)}}}),[l,f,r,n,o,m,y,h])}var Qr=function(){return(Qr=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function Zr(e){var r=e.children,n=e.onChange,o=e.phoneMaxWidth,i=void 0===o?Ee:o,a=e.tabletMinWidth,s=void 0===a?Pe:a,c=e.tabletMaxWidth,d=void 0===c?Ce:c,u=e.desktopMinWidth,p=void 0===u?Se:u,f=e.desktopLargeMinWidth,v=void 0===f?Ne:f,y=e.defaultSize,m=void 0===y?Fe:y,h=_e({phoneMaxWidth:i,tabletMaxWidth:d,tabletMinWidth:s,desktopMinWidth:p,desktopLargeMinWidth:v,defaultSize:m}),b=t.useRef(h);t.useEffect((function(){!n||m.isPhone===h.isPhone&&m.isTablet===h.isTablet&&m.isDesktop===h.isDesktop&&m.isLargeDesktop===h.isLargeDesktop&&m.isLandscape===h.isLandscape||n(h,m)}),[]),t.useEffect((function(){b.current!==h&&(n&&n(h,b.current),b.current=h)}));var g=t.useMemo((function(){return Qr(Qr({},h),{__initialized:!0})}),[h]);return l.exports.jsx(He.Provider,Qr({value:g},{children:r}),void 0)}function $r(e){var r=e.onResize,n=e.options,o=e.immediate,i=e.enabled,a=void 0===i||i,l=$(r);t.useEffect((function(){if(a){var e=J("resize",window,!0,n),t=function(e){return l.current(e)};return e.add(t),o&&"undefined"!=typeof window&&window.dispatchEvent(new UIEvent("resize")),function(){e.remove(t)}}}),[n,a])}var en=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},tn=function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))};function rn(e,t){void 0===t&&(t={});var r=t.fontSizeFallback,n=void 0===r?16:r,o=t.element;if("number"==typeof e)return e;var i=parseFloat(e);if(/px$/.test(e))return i;if("undefined"==typeof document)return i*n;var a=/rem$/.test(e),l=document.documentElement;return!a&&o&&(l=o.parentElement||o),i*parseFloat(window.getComputedStyle(l).fontSize||"".concat(n,"px"))}function nn(e){return e?void 0!==e.current?e.current:e:null}function on(e){var r=e.enabled,n=e.element,o=e.onOutsideClick;t.useEffect((function(){if(r)return window.addEventListener("click",e),function(){window.removeEventListener("click",e)};function e(e){var t