phanpy/assets/vendor--8C7Txey.js.map
Lim Chee Aun 296ef9214b Imported from 2023.12.31.8aa0542.tar.gz.
SHA256:17ea8854a3504752a8ae4540ecb09e62f6f8aa260221d3619fda46f66b2ec43f
2024-01-06 12:29:42 +00:00

1 line
1.1 MiB
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{"version":3,"file":"vendor--8C7Txey.js","sources":["../../node_modules/preact/dist/preact.module.js","../../node_modules/preact/hooks/dist/hooks.module.js","../../node_modules/preact/compat/dist/compat.module.js","../../node_modules/@remix-run/router/dist/router.js","../../node_modules/react-router/dist/index.js","../../node_modules/react-router-dom/dist/index.js","../../node_modules/just-debounce-it/index.mjs","../../node_modules/swiped-events/src/swiped-events.js","../../node_modules/proxy-compare/dist/index.modern.js","../../node_modules/valtio/esm/vanilla.mjs","../../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js","../../node_modules/use-sync-external-store/shim/index.js","../../node_modules/valtio/esm/react.mjs","../../node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js","../../node_modules/react-hotkeys-hook/dist/react-hotkeys-hook.esm.js","../../node_modules/ts-custom-error/dist/custom-error.mjs","../../node_modules/tslib/tslib.es6.js","../../node_modules/lower-case/dist.es2015/index.js","../../node_modules/no-case/dist.es2015/index.js","../../node_modules/pascal-case/dist.es2015/index.js","../../node_modules/camel-case/dist.es2015/index.js","../../node_modules/dot-case/dist.es2015/index.js","../../node_modules/snake-case/dist.es2015/index.js","../../node_modules/ws/browser.js","../../node_modules/events-to-async/module/events-to-async.js","../../node_modules/masto/dist/index.js","../../node_modules/toastify-js/src/toastify.js","../../node_modules/micro-memoize/dist/micro-memoize.js","../../node_modules/fast-equals/dist/fast-equals.js","../../node_modules/moize/dist/moize.js","../../node_modules/p-throttle/index.js","../../node_modules/@formkit/auto-animate/index.mjs","../../node_modules/@formkit/auto-animate/preact/index.mjs","../../node_modules/prop-types/lib/ReactPropTypesSecret.js","../../node_modules/prop-types/factoryWithThrowingShims.js","../../node_modules/prop-types/index.js","../../node_modules/@szhsin/react-menu/dist/es/utils/utils.js","../../node_modules/@szhsin/react-menu/dist/es/utils/propTypes.js","../../node_modules/@szhsin/react-menu/dist/es/hooks/useBEM.js","../../node_modules/@szhsin/react-menu/dist/es/utils/constants.js","../../node_modules/@szhsin/react-menu/dist/es/components/MenuContainer.js","../../node_modules/@szhsin/react-menu/dist/es/utils/submenuCtx.js","../../node_modules/@szhsin/react-menu/dist/es/hooks/useItems.js","../../node_modules/@szhsin/react-menu/dist/es/positionUtils/getPositionHelpers.js","../../node_modules/@szhsin/react-menu/dist/es/positionUtils/placeArrowVertical.js","../../node_modules/@szhsin/react-menu/dist/es/positionUtils/placeLeftorRight.js","../../node_modules/@szhsin/react-menu/dist/es/positionUtils/placeArrowHorizontal.js","../../node_modules/@szhsin/react-menu/dist/es/positionUtils/placeToporBottom.js","../../node_modules/@szhsin/react-menu/dist/es/positionUtils/positionMenu.js","../../node_modules/@szhsin/react-menu/dist/es/hooks/useIsomorphicLayoutEffect.js","../../node_modules/@szhsin/react-menu/dist/es/hooks/useCombinedRef.js","../../node_modules/@szhsin/react-menu/dist/es/components/MenuList.js","../../node_modules/@szhsin/react-menu/dist/es/components/ControlledMenu.js","../../node_modules/react-transition-state/dist/es/hooks/utils.js","../../node_modules/react-transition-state/dist/es/hooks/useTransition.js","../../node_modules/@szhsin/react-menu/dist/es/hooks/useMenuState.js","../../node_modules/@szhsin/react-menu/dist/es/hooks/useMenuStateAndFocus.js","../../node_modules/@szhsin/react-menu/dist/es/hooks/useClick.js","../../node_modules/@szhsin/react-menu/dist/es/hooks/useMenuChange.js","../../node_modules/@szhsin/react-menu/dist/es/components/Menu.js","../../node_modules/@szhsin/react-menu/dist/es/utils/withHovering.js","../../node_modules/@szhsin/react-menu/dist/es/hooks/useItemEffect.js","../../node_modules/@szhsin/react-menu/dist/es/components/SubMenu.js","../../node_modules/@szhsin/react-menu/dist/es/hooks/useItemState.js","../../node_modules/@szhsin/react-menu/dist/es/components/MenuItem.js","../../node_modules/@szhsin/react-menu/dist/es/components/FocusableItem.js","../../node_modules/@szhsin/react-menu/dist/es/components/MenuDivider.js","../../node_modules/@szhsin/react-menu/dist/es/components/MenuHeader.js","../../node_modules/@szhsin/react-menu/dist/es/components/MenuGroup.js","../../node_modules/@uidotdev/usehooks/index.js","../../node_modules/dayjs/dayjs.min.js","../../node_modules/dayjs-twitter/dist/dayjs-twitter.min.js","../../node_modules/dayjs/plugin/localizedFormat.js","../../node_modules/dayjs/plugin/relativeTime.js","../../node_modules/@formatjs/intl-localematcher/lib/abstract/CanonicalizeLocaleList.js","../../node_modules/@formatjs/intl-localematcher/lib/abstract/languageMatching.js","../../node_modules/@formatjs/intl-localematcher/lib/abstract/regions.generated.js","../../node_modules/@formatjs/intl-localematcher/lib/abstract/utils.js","../../node_modules/@formatjs/intl-localematcher/lib/abstract/BestFitMatcher.js","../../node_modules/@formatjs/intl-localematcher/lib/abstract/BestAvailableLocale.js","../../node_modules/@formatjs/intl-localematcher/lib/abstract/LookupMatcher.js","../../node_modules/@formatjs/intl-localematcher/lib/abstract/UnicodeExtensionValue.js","../../node_modules/@formatjs/intl-localematcher/lib/abstract/ResolveLocale.js","../../node_modules/@formatjs/intl-localematcher/lib/index.js","../../node_modules/compare-versions/lib/esm/utils.js","../../node_modules/compare-versions/lib/esm/compareVersions.js","../../node_modules/compare-versions/lib/esm/compare.js","../../node_modules/compare-versions/lib/esm/satisfies.js","../../node_modules/retry/lib/retry_operation.js","../../node_modules/retry/lib/retry.js","../../node_modules/retry/index.js","../../node_modules/is-network-error/index.js","../../node_modules/p-retry/index.js","../../node_modules/@github/combobox-nav/dist/index.js","../../node_modules/@github/text-expander-element/dist/index.js","../../node_modules/fast-deep-equal/index.js","../../node_modules/runes2/dist/index.esm.mjs","../../node_modules/ansi-regex/index.js","../../node_modules/strip-ansi/index.js","../../node_modules/char-regex/index.js","../../node_modules/string-length/index.js","../../node_modules/uid/single/index.mjs","../../node_modules/use-debounce/dist/index.module.js","../../node_modules/idb-keyval/dist/index.js","../../node_modules/@justinribeiro/lite-youtube/lite-youtube.js","../../node_modules/fast-blurhash/index.js","../../node_modules/use-long-press/index.mjs","../../node_modules/use-resize-observer/dist/bundle.esm.js","../../node_modules/react-quick-pinch-zoom/esm/PinchZoom/styles.css.js","../../node_modules/react-quick-pinch-zoom/esm/utils.js","../../node_modules/react-quick-pinch-zoom/esm/PinchZoom/getOffsetBounds.js","../../node_modules/react-quick-pinch-zoom/esm/PinchZoom/component.js","../../node_modules/react-intersection-observer/index.mjs","../../node_modules/lz-string/libs/lz-string.js"],"sourcesContent":["var n,l,u,t,i,o,r,f,e,c={},s=[],a=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,h=Array.isArray;function v(n,l){for(var u in l)n[u]=l[u];return n}function p(n){var l=n.parentNode;l&&l.removeChild(n)}function y(l,u,t){var i,o,r,f={};for(r in u)\"key\"==r?i=u[r]:\"ref\"==r?o=u[r]:f[r]=u[r];if(arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):t),\"function\"==typeof l&&null!=l.defaultProps)for(r in l.defaultProps)void 0===f[r]&&(f[r]=l.defaultProps[r]);return d(l,f,i,o,null)}function d(n,t,i,o,r){var f={type:n,props:t,key:i,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==r?++u:r,__i:-1,__u:0};return null==r&&null!=l.vnode&&l.vnode(f),f}function _(){return{current:null}}function g(n){return n.children}function b(n,l){this.props=n,this.context=l}function m(n,l){if(null==l)return n.__?m(n.__,n.__i+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return\"function\"==typeof n.type?m(n):null}function k(n){var l,u;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e){n.__e=n.__c.base=u.__e;break}return k(n)}}function w(n){(!n.__d&&(n.__d=!0)&&i.push(n)&&!x.__r++||o!==l.debounceRendering)&&((o=l.debounceRendering)||r)(x)}function x(){var n,u,t,o,r,e,c,s,a;for(i.sort(f);n=i.shift();)n.__d&&(u=i.length,o=void 0,e=(r=(t=n).__v).__e,s=[],a=[],(c=t.__P)&&((o=v({},r)).__v=r.__v+1,l.vnode&&l.vnode(o),L(c,o,r,t.__n,void 0!==c.ownerSVGElement,32&r.__u?[e]:null,s,null==e?m(r):e,!!(32&r.__u),a),o.__.__k[o.__i]=o,M(s,o,a),o.__e!=e&&k(o)),i.length>u&&i.sort(f));x.__r=0}function C(n,l,u,t,i,o,r,f,e,a,h){var v,p,y,d,_,g=t&&t.__k||s,b=l.length;for(u.__d=e,P(u,l,g),e=u.__d,v=0;v<b;v++)null!=(y=u.__k[v])&&\"boolean\"!=typeof y&&\"function\"!=typeof y&&(p=-1===y.__i?c:g[y.__i]||c,y.__i=v,L(n,y,p,i,o,r,f,e,a,h),d=y.__e,y.ref&&p.ref!=y.ref&&(p.ref&&z(p.ref,null,y),h.push(y.ref,y.__c||d,y)),null==_&&null!=d&&(_=d),65536&y.__u||p.__k===y.__k?e=S(y,e,n):\"function\"==typeof y.type&&void 0!==y.__d?e=y.__d:d&&(e=d.nextSibling),y.__d=void 0,y.__u&=-196609);u.__d=e,u.__e=_}function P(n,l,u){var t,i,o,r,f,e=l.length,c=u.length,s=c,a=0;for(n.__k=[],t=0;t<e;t++)null!=(i=n.__k[t]=null==(i=l[t])||\"boolean\"==typeof i||\"function\"==typeof i?null:\"string\"==typeof i||\"number\"==typeof i||\"bigint\"==typeof i||i.constructor==String?d(null,i,null,null,i):h(i)?d(g,{children:i},null,null,null):void 0===i.constructor&&i.__b>0?d(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)?(i.__=n,i.__b=n.__b+1,f=H(i,u,r=t+a,s),i.__i=f,o=null,-1!==f&&(s--,(o=u[f])&&(o.__u|=131072)),null==o||null===o.__v?(-1==f&&a--,\"function\"!=typeof i.type&&(i.__u|=65536)):f!==r&&(f===r+1?a++:f>r?s>e-r?a+=f-r:a--:a=f<r&&f==r-1?f-r:0,f!==t+a&&(i.__u|=65536))):(o=u[t])&&null==o.key&&o.__e&&(o.__e==n.__d&&(n.__d=m(o)),N(o,o,!1),u[t]=null,s--);if(s)for(t=0;t<c;t++)null!=(o=u[t])&&0==(131072&o.__u)&&(o.__e==n.__d&&(n.__d=m(o)),N(o,o))}function S(n,l,u){var t,i;if(\"function\"==typeof n.type){for(t=n.__k,i=0;t&&i<t.length;i++)t[i]&&(t[i].__=n,l=S(t[i],l,u));return l}return n.__e!=l&&(u.insertBefore(n.__e,l||null),l=n.__e),l&&l.nextSibling}function $(n,l){return l=l||[],null==n||\"boolean\"==typeof n||(h(n)?n.some(function(n){$(n,l)}):l.push(n)),l}function H(n,l,u,t){var i=n.key,o=n.type,r=u-1,f=u+1,e=l[u];if(null===e||e&&i==e.key&&o===e.type)return u;if(t>(null!=e&&0==(131072&e.__u)?1:0))for(;r>=0||f<l.length;){if(r>=0){if((e=l[r])&&0==(131072&e.__u)&&i==e.key&&o===e.type)return r;r--}if(f<l.length){if((e=l[f])&&0==(131072&e.__u)&&i==e.key&&o===e.type)return f;f++}}return-1}function I(n,l,u){\"-\"===l[0]?n.setProperty(l,null==u?\"\":u):n[l]=null==u?\"\":\"number\"!=typeof u||a.test(l)?u:u+\"px\"}function T(n,l,u,t,i){var o;n:if(\"style\"===l)if(\"string\"==typeof u)n.style.cssText=u;else{if(\"string\"==typeof t&&(n.style.cssText=t=\"\"),t)for(l in t)u&&l in u||I(n.style,l,\"\");if(u)for(l in u)t&&u[l]===t[l]||I(n.style,l,u[l])}else if(\"o\"===l[0]&&\"n\"===l[1])o=l!==(l=l.replace(/(PointerCapture)$|Capture$/,\"$1\")),l=l.toLowerCase()in n?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+o]=u,u?t?u.u=t.u:(u.u=Date.now(),n.addEventListener(l,o?D:A,o)):n.removeEventListener(l,o?D:A,o);else{if(i)l=l.replace(/xlink(H|:h)/,\"h\").replace(/sName$/,\"s\");else if(\"width\"!==l&&\"height\"!==l&&\"href\"!==l&&\"list\"!==l&&\"form\"!==l&&\"tabIndex\"!==l&&\"download\"!==l&&\"rowSpan\"!==l&&\"colSpan\"!==l&&\"role\"!==l&&l in n)try{n[l]=null==u?\"\":u;break n}catch(n){}\"function\"==typeof u||(null==u||!1===u&&\"-\"!==l[4]?n.removeAttribute(l):n.setAttribute(l,u))}}function A(n){var u=this.l[n.type+!1];if(n.t){if(n.t<=u.u)return}else n.t=Date.now();return u(l.event?l.event(n):n)}function D(n){return this.l[n.type+!0](l.event?l.event(n):n)}function L(n,u,t,i,o,r,f,e,c,s){var a,p,y,d,_,m,k,w,x,P,S,$,H,I,T,A=u.type;if(void 0!==u.constructor)return null;128&t.__u&&(c=!!(32&t.__u),r=[e=u.__e=t.__e]),(a=l.__b)&&a(u);n:if(\"function\"==typeof A)try{if(w=u.props,x=(a=A.contextType)&&i[a.__c],P=a?x?x.props.value:a.__:i,t.__c?k=(p=u.__c=t.__c).__=p.__E:(\"prototype\"in A&&A.prototype.render?u.__c=p=new A(w,P):(u.__c=p=new b(w,P),p.constructor=A,p.render=O),x&&x.sub(p),p.props=w,p.state||(p.state={}),p.context=P,p.__n=i,y=p.__d=!0,p.__h=[],p._sb=[]),null==p.__s&&(p.__s=p.state),null!=A.getDerivedStateFromProps&&(p.__s==p.state&&(p.__s=v({},p.__s)),v(p.__s,A.getDerivedStateFromProps(w,p.__s))),d=p.props,_=p.state,p.__v=u,y)null==A.getDerivedStateFromProps&&null!=p.componentWillMount&&p.componentWillMount(),null!=p.componentDidMount&&p.__h.push(p.componentDidMount);else{if(null==A.getDerivedStateFromProps&&w!==d&&null!=p.componentWillReceiveProps&&p.componentWillReceiveProps(w,P),!p.__e&&(null!=p.shouldComponentUpdate&&!1===p.shouldComponentUpdate(w,p.__s,P)||u.__v===t.__v)){for(u.__v!==t.__v&&(p.props=w,p.state=p.__s,p.__d=!1),u.__e=t.__e,u.__k=t.__k,u.__k.forEach(function(n){n&&(n.__=u)}),S=0;S<p._sb.length;S++)p.__h.push(p._sb[S]);p._sb=[],p.__h.length&&f.push(p);break n}null!=p.componentWillUpdate&&p.componentWillUpdate(w,p.__s,P),null!=p.componentDidUpdate&&p.__h.push(function(){p.componentDidUpdate(d,_,m)})}if(p.context=P,p.props=w,p.__P=n,p.__e=!1,$=l.__r,H=0,\"prototype\"in A&&A.prototype.render){for(p.state=p.__s,p.__d=!1,$&&$(u),a=p.render(p.props,p.state,p.context),I=0;I<p._sb.length;I++)p.__h.push(p._sb[I]);p._sb=[]}else do{p.__d=!1,$&&$(u),a=p.render(p.props,p.state,p.context),p.state=p.__s}while(p.__d&&++H<25);p.state=p.__s,null!=p.getChildContext&&(i=v(v({},i),p.getChildContext())),y||null==p.getSnapshotBeforeUpdate||(m=p.getSnapshotBeforeUpdate(d,_)),C(n,h(T=null!=a&&a.type===g&&null==a.key?a.props.children:a)?T:[T],u,t,i,o,r,f,e,c,s),p.base=u.__e,u.__u&=-161,p.__h.length&&f.push(p),k&&(p.__E=p.__=null)}catch(n){u.__v=null,c||null!=r?(u.__e=e,u.__u|=c?160:32,r[r.indexOf(e)]=null):(u.__e=t.__e,u.__k=t.__k),l.__e(n,u,t)}else null==r&&u.__v===t.__v?(u.__k=t.__k,u.__e=t.__e):u.__e=j(t.__e,u,t,i,o,r,f,c,s);(a=l.diffed)&&a(u)}function M(n,u,t){u.__d=void 0;for(var i=0;i<t.length;i++)z(t[i],t[++i],t[++i]);l.__c&&l.__c(u,n),n.some(function(u){try{n=u.__h,u.__h=[],n.some(function(n){n.call(u)})}catch(n){l.__e(n,u.__v)}})}function j(l,u,t,i,o,r,f,e,s){var a,v,y,d,_,g,b,k=t.props,w=u.props,x=u.type;if(\"svg\"===x&&(o=!0),null!=r)for(a=0;a<r.length;a++)if((_=r[a])&&\"setAttribute\"in _==!!x&&(x?_.localName===x:3===_.nodeType)){l=_,r[a]=null;break}if(null==l){if(null===x)return document.createTextNode(w);l=o?document.createElementNS(\"http://www.w3.org/2000/svg\",x):document.createElement(x,w.is&&w),r=null,e=!1}if(null===x)k===w||e&&l.data===w||(l.data=w);else{if(r=r&&n.call(l.childNodes),k=t.props||c,!e&&null!=r)for(k={},a=0;a<l.attributes.length;a++)k[(_=l.attributes[a]).name]=_.value;for(a in k)_=k[a],\"children\"==a||(\"dangerouslySetInnerHTML\"==a?y=_:\"key\"===a||a in w||T(l,a,null,_,o));for(a in w)_=w[a],\"children\"==a?d=_:\"dangerouslySetInnerHTML\"==a?v=_:\"value\"==a?g=_:\"checked\"==a?b=_:\"key\"===a||e&&\"function\"!=typeof _||k[a]===_||T(l,a,_,k[a],o);if(v)e||y&&(v.__html===y.__html||v.__html===l.innerHTML)||(l.innerHTML=v.__html),u.__k=[];else if(y&&(l.innerHTML=\"\"),C(l,h(d)?d:[d],u,t,i,o&&\"foreignObject\"!==x,r,f,r?r[0]:t.__k&&m(t,0),e,s),null!=r)for(a=r.length;a--;)null!=r[a]&&p(r[a]);e||(a=\"value\",void 0!==g&&(g!==l[a]||\"progress\"===x&&!g||\"option\"===x&&g!==k[a])&&T(l,a,g,k[a],!1),a=\"checked\",void 0!==b&&b!==l[a]&&T(l,a,b,k[a],!1))}return l}function z(n,u,t){try{\"function\"==typeof n?n(u):n.current=u}catch(n){l.__e(n,t)}}function N(n,u,t){var i,o;if(l.unmount&&l.unmount(n),(i=n.ref)&&(i.current&&i.current!==n.__e||z(i,null,u)),null!=(i=n.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(n){l.__e(n,u)}i.base=i.__P=null,n.__c=void 0}if(i=n.__k)for(o=0;o<i.length;o++)i[o]&&N(i[o],u,t||\"function\"!=typeof n.type);t||null==n.__e||p(n.__e),n.__=n.__e=n.__d=void 0}function O(n,l,u){return this.constructor(n,u)}function q(u,t,i){var o,r,f,e;l.__&&l.__(u,t),r=(o=\"function\"==typeof i)?null:i&&i.__k||t.__k,f=[],e=[],L(t,u=(!o&&i||t).__k=y(g,null,[u]),r||c,c,void 0!==t.ownerSVGElement,!o&&i?[i]:r?null:t.firstChild?n.call(t.childNodes):null,f,!o&&i?i:r?r.__e:t.firstChild,o,e),M(f,u,e)}function B(n,l){q(n,l,B)}function E(l,u,t){var i,o,r,f,e=v({},l.props);for(r in l.type&&l.type.defaultProps&&(f=l.type.defaultProps),u)\"key\"==r?i=u[r]:\"ref\"==r?o=u[r]:e[r]=void 0===u[r]&&void 0!==f?f[r]:u[r];return arguments.length>2&&(e.children=arguments.length>3?n.call(arguments,2):t),d(l.type,e,i||l.key,o||l.ref,null)}function F(n,l){var u={__c:l=\"__cC\"+e++,__:n,Consumer:function(n,l){return n.children(l)},Provider:function(n){var u,t;return this.getChildContext||(u=[],(t={})[l]=this,this.getChildContext=function(){return t},this.shouldComponentUpdate=function(n){this.props.value!==n.value&&u.some(function(n){n.__e=!0,w(n)})},this.sub=function(n){u.push(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){u.splice(u.indexOf(n),1),l&&l.call(n)}}),n.children}};return u.Provider.__=u.Consumer.contextType=u}n=s.slice,l={__e:function(n,l,u,t){for(var i,o,r;l=l.__;)if((i=l.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(n)),r=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(n,t||{}),r=i.__d),r)return i.__E=i}catch(l){n=l}throw n}},u=0,t=function(n){return null!=n&&null==n.constructor},b.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=v({},this.state),\"function\"==typeof n&&(n=n(v({},u),this.props)),n&&v(u,n),null!=n&&this.__v&&(l&&this._sb.push(l),w(this))},b.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),w(this))},b.prototype.render=g,i=[],r=\"function\"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,f=function(n,l){return n.__v.__b-l.__v.__b},x.__r=0,e=0;export{b as Component,g as Fragment,E as cloneElement,F as createContext,y as createElement,_ as createRef,y as h,B as hydrate,t as isValidElement,l as options,q as render,$ as toChildArray};\n//# sourceMappingURL=preact.module.js.map\n","import{options as n}from\"preact\";var t,r,u,i,o=0,f=[],c=[],e=n.__b,a=n.__r,v=n.diffed,l=n.__c,m=n.unmount;function d(t,u){n.__h&&n.__h(r,t,o||u),o=0;var i=r.__H||(r.__H={__:[],__h:[]});return t>=i.__.length&&i.__.push({__V:c}),i.__[t]}function h(n){return o=1,s(B,n)}function s(n,u,i){var o=d(t++,2);if(o.t=n,!o.__c&&(o.__=[i?i(u):B(void 0,u),function(n){var t=o.__N?o.__N[0]:o.__[0],r=o.t(t,n);t!==r&&(o.__N=[r,o.__[1]],o.__c.setState({}))}],o.__c=r,!r.u)){var f=function(n,t,r){if(!o.__c.__H)return!0;var u=o.__c.__H.__.filter(function(n){return n.__c});if(u.every(function(n){return!n.__N}))return!c||c.call(this,n,t,r);var i=!1;return u.forEach(function(n){if(n.__N){var t=n.__[0];n.__=n.__N,n.__N=void 0,t!==n.__[0]&&(i=!0)}}),!(!i&&o.__c.props===n)&&(!c||c.call(this,n,t,r))};r.u=!0;var c=r.shouldComponentUpdate,e=r.componentWillUpdate;r.componentWillUpdate=function(n,t,r){if(this.__e){var u=c;c=void 0,f(n,t,r),c=u}e&&e.call(this,n,t,r)},r.shouldComponentUpdate=f}return o.__N||o.__}function p(u,i){var o=d(t++,3);!n.__s&&z(o.__H,i)&&(o.__=u,o.i=i,r.__H.__h.push(o))}function y(u,i){var o=d(t++,4);!n.__s&&z(o.__H,i)&&(o.__=u,o.i=i,r.__h.push(o))}function _(n){return o=5,F(function(){return{current:n}},[])}function A(n,t,r){o=6,y(function(){return\"function\"==typeof n?(n(t()),function(){return n(null)}):n?(n.current=t(),function(){return n.current=null}):void 0},null==r?r:r.concat(n))}function F(n,r){var u=d(t++,7);return z(u.__H,r)?(u.__V=n(),u.i=r,u.__h=n,u.__V):u.__}function T(n,t){return o=8,F(function(){return n},t)}function q(n){var u=r.context[n.__c],i=d(t++,9);return i.c=n,u?(null==i.__&&(i.__=!0,u.sub(r)),u.props.value):n.__}function x(t,r){n.useDebugValue&&n.useDebugValue(r?r(t):t)}function P(n){var u=d(t++,10),i=h();return u.__=n,r.componentDidCatch||(r.componentDidCatch=function(n,t){u.__&&u.__(n,t),i[1](n)}),[i[0],function(){i[1](void 0)}]}function V(){var n=d(t++,11);if(!n.__){for(var u=r.__v;null!==u&&!u.__m&&null!==u.__;)u=u.__;var i=u.__m||(u.__m=[0,0]);n.__=\"P\"+i[0]+\"-\"+i[1]++}return n.__}function b(){for(var t;t=f.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(k),t.__H.__h.forEach(w),t.__H.__h=[]}catch(r){t.__H.__h=[],n.__e(r,t.__v)}}n.__b=function(n){r=null,e&&e(n)},n.__r=function(n){a&&a(n),t=0;var i=(r=n.__c).__H;i&&(u===r?(i.__h=[],r.__h=[],i.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=c,n.__N=n.i=void 0})):(i.__h.forEach(k),i.__h.forEach(w),i.__h=[],t=0)),u=r},n.diffed=function(t){v&&v(t);var o=t.__c;o&&o.__H&&(o.__H.__h.length&&(1!==f.push(o)&&i===n.requestAnimationFrame||((i=n.requestAnimationFrame)||j)(b)),o.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==c&&(n.__=n.__V),n.i=void 0,n.__V=c})),u=r=null},n.__c=function(t,r){r.some(function(t){try{t.__h.forEach(k),t.__h=t.__h.filter(function(n){return!n.__||w(n)})}catch(u){r.some(function(n){n.__h&&(n.__h=[])}),r=[],n.__e(u,t.__v)}}),l&&l(t,r)},n.unmount=function(t){m&&m(t);var r,u=t.__c;u&&u.__H&&(u.__H.__.forEach(function(n){try{k(n)}catch(n){r=n}}),u.__H=void 0,r&&n.__e(r,u.__v))};var g=\"function\"==typeof requestAnimationFrame;function j(n){var t,r=function(){clearTimeout(u),g&&cancelAnimationFrame(t),setTimeout(n)},u=setTimeout(r,100);g&&(t=requestAnimationFrame(r))}function k(n){var t=r,u=n.__c;\"function\"==typeof u&&(n.__c=void 0,u()),r=t}function w(n){var t=r;n.__c=n.__(),r=t}function z(n,t){return!n||n.length!==t.length||t.some(function(t,r){return t!==n[r]})}function B(n,t){return\"function\"==typeof t?t(n):t}export{T as useCallback,q as useContext,x as useDebugValue,p as useEffect,P as useErrorBoundary,V as useId,A as useImperativeHandle,y as useLayoutEffect,F as useMemo,s as useReducer,_ as useRef,h as useState};\n//# sourceMappingURL=hooks.module.js.map\n","import{Component as n,createElement as t,options as e,toChildArray as r,Fragment as u,render as o,hydrate as i,createContext as l,createRef as c,cloneElement as f}from\"preact\";export{Component,Fragment,createContext,createElement,createRef}from\"preact\";import{useState as a,useId as s,useReducer as h,useEffect as v,useLayoutEffect as d,useRef as p,useImperativeHandle as m,useMemo as y,useCallback as _,useContext as b,useDebugValue as S}from\"preact/hooks\";export*from\"preact/hooks\";function g(n,t){for(var e in t)n[e]=t[e];return n}function C(n,t){for(var e in n)if(\"__source\"!==e&&!(e in t))return!0;for(var r in t)if(\"__source\"!==r&&n[r]!==t[r])return!0;return!1}function E(n){this.props=n}function w(n,e){function r(n){var t=this.props.ref,r=t==n.ref;return!r&&t&&(t.call?t(null):t.current=null),e?!e(this.props,n)||!r:C(this.props,n)}function u(e){return this.shouldComponentUpdate=r,t(n,e)}return u.displayName=\"Memo(\"+(n.displayName||n.name)+\")\",u.prototype.isReactComponent=!0,u.__f=!0,u}(E.prototype=new n).isPureReactComponent=!0,E.prototype.shouldComponentUpdate=function(n,t){return C(this.props,n)||C(this.state,t)};var x=e.__b;e.__b=function(n){n.type&&n.type.__f&&n.ref&&(n.props.ref=n.ref,n.ref=null),x&&x(n)};var R=\"undefined\"!=typeof Symbol&&Symbol.for&&Symbol.for(\"react.forward_ref\")||3911;function N(n){function t(t){var e=g({},t);return delete e.ref,n(e,t.ref||null)}return t.$$typeof=R,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName=\"ForwardRef(\"+(n.displayName||n.name)+\")\",t}var k=function(n,t){return null==n?null:r(r(n).map(t))},A={map:k,forEach:k,count:function(n){return n?r(n).length:0},only:function(n){var t=r(n);if(1!==t.length)throw\"Children.only\";return t[0]},toArray:r},O=e.__e;e.__e=function(n,t,e,r){if(n.then)for(var u,o=t;o=o.__;)if((u=o.__c)&&u.__c)return null==t.__e&&(t.__e=e.__e,t.__k=e.__k),u.__c(n,t);O(n,t,e,r)};var T=e.unmount;function F(n,t,e){return n&&(n.__c&&n.__c.__H&&(n.__c.__H.__.forEach(function(n){\"function\"==typeof n.__c&&n.__c()}),n.__c.__H=null),null!=(n=g({},n)).__c&&(n.__c.__P===e&&(n.__c.__P=t),n.__c=null),n.__k=n.__k&&n.__k.map(function(n){return F(n,t,e)})),n}function I(n,t,e){return n&&e&&(n.__v=null,n.__k=n.__k&&n.__k.map(function(n){return I(n,t,e)}),n.__c&&n.__c.__P===t&&(n.__e&&e.appendChild(n.__e),n.__c.__e=!0,n.__c.__P=e)),n}function L(){this.__u=0,this.t=null,this.__b=null}function U(n){var t=n.__.__c;return t&&t.__a&&t.__a(n)}function D(n){var e,r,u;function o(o){if(e||(e=n()).then(function(n){r=n.default||n},function(n){u=n}),u)throw u;if(!r)throw e;return t(r,o)}return o.displayName=\"Lazy\",o.__f=!0,o}function M(){this.u=null,this.o=null}e.unmount=function(n){var t=n.__c;t&&t.__R&&t.__R(),t&&32&n.__u&&(n.type=null),T&&T(n)},(L.prototype=new n).__c=function(n,t){var e=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(e);var u=U(r.__v),o=!1,i=function(){o||(o=!0,e.__R=null,u?u(l):l())};e.__R=i;var l=function(){if(!--r.__u){if(r.state.__a){var n=r.state.__a;r.__v.__k[0]=I(n,n.__c.__P,n.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),n.then(i,i)},L.prototype.componentWillUnmount=function(){this.t=[]},L.prototype.render=function(n,e){if(this.__b){if(this.__v.__k){var r=document.createElement(\"div\"),o=this.__v.__k[0].__c;this.__v.__k[0]=F(this.__b,r,o.__O=o.__P)}this.__b=null}var i=e.__a&&t(u,null,n.fallback);return i&&(i.__u&=-33),[t(u,null,e.__a?null:n.children),i]};var V=function(n,t,e){if(++e[1]===e[0]&&n.o.delete(t),n.props.revealOrder&&(\"t\"!==n.props.revealOrder[0]||!n.o.size))for(e=n.u;e;){for(;e.length>3;)e.pop()();if(e[1]<e[0])break;n.u=e=e[2]}};function W(n){return this.getChildContext=function(){return n.context},n.children}function P(n){var e=this,r=n.i;e.componentWillUnmount=function(){o(null,e.l),e.l=null,e.i=null},e.i&&e.i!==r&&e.componentWillUnmount(),e.l||(e.i=r,e.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(n){this.childNodes.push(n),e.i.appendChild(n)},insertBefore:function(n,t){this.childNodes.push(n),e.i.appendChild(n)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),e.i.removeChild(n)}}),o(t(W,{context:e.context},n.__v),e.l)}function j(n,e){var r=t(P,{__v:n,i:e});return r.containerInfo=e,r}(M.prototype=new n).__a=function(n){var t=this,e=U(t.__v),r=t.o.get(n);return r[0]++,function(u){var o=function(){t.props.revealOrder?(r.push(u),V(t,n,r)):u()};e?e(o):o()}},M.prototype.render=function(n){this.u=null,this.o=new Map;var t=r(n.children);n.revealOrder&&\"b\"===n.revealOrder[0]&&t.reverse();for(var e=t.length;e--;)this.o.set(t[e],this.u=[1,0,this.u]);return n.children},M.prototype.componentDidUpdate=M.prototype.componentDidMount=function(){var n=this;this.o.forEach(function(t,e){V(n,e,t)})};var z=\"undefined\"!=typeof Symbol&&Symbol.for&&Symbol.for(\"react.element\")||60103,B=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,H=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Z=/[A-Z0-9]/g,Y=\"undefined\"!=typeof document,$=function(n){return(\"undefined\"!=typeof Symbol&&\"symbol\"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(n)};function q(n,t,e){return null==t.__k&&(t.textContent=\"\"),o(n,t),\"function\"==typeof e&&e(),n?n.__c:null}function G(n,t,e){return i(n,t),\"function\"==typeof e&&e(),n?n.__c:null}n.prototype.isReactComponent={},[\"componentWillMount\",\"componentWillReceiveProps\",\"componentWillUpdate\"].forEach(function(t){Object.defineProperty(n.prototype,t,{configurable:!0,get:function(){return this[\"UNSAFE_\"+t]},set:function(n){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:n})}})});var J=e.event;function K(){}function Q(){return this.cancelBubble}function X(){return this.defaultPrevented}e.event=function(n){return J&&(n=J(n)),n.persist=K,n.isPropagationStopped=Q,n.isDefaultPrevented=X,n.nativeEvent=n};var nn,tn={enumerable:!1,configurable:!0,get:function(){return this.class}},en=e.vnode;e.vnode=function(n){\"string\"==typeof n.type&&function(n){var t=n.props,e=n.type,u={};for(var o in t){var i=t[o];if(!(\"value\"===o&&\"defaultValue\"in t&&null==i||Y&&\"children\"===o&&\"noscript\"===e||\"class\"===o||\"className\"===o)){var l=o.toLowerCase();\"defaultValue\"===o&&\"value\"in t&&null==t.value?o=\"value\":\"download\"===o&&!0===i?i=\"\":\"ondoubleclick\"===l?o=\"ondblclick\":\"onchange\"!==l||\"input\"!==e&&\"textarea\"!==e||$(t.type)?\"onfocus\"===l?o=\"onfocusin\":\"onblur\"===l?o=\"onfocusout\":H.test(o)?o=l:-1===e.indexOf(\"-\")&&B.test(o)?o=o.replace(Z,\"-$&\").toLowerCase():null===i&&(i=void 0):l=o=\"oninput\",\"oninput\"===l&&u[o=l]&&(o=\"oninputCapture\"),u[o]=i}}\"select\"==e&&u.multiple&&Array.isArray(u.value)&&(u.value=r(t.children).forEach(function(n){n.props.selected=-1!=u.value.indexOf(n.props.value)})),\"select\"==e&&null!=u.defaultValue&&(u.value=r(t.children).forEach(function(n){n.props.selected=u.multiple?-1!=u.defaultValue.indexOf(n.props.value):u.defaultValue==n.props.value})),t.class&&!t.className?(u.class=t.class,Object.defineProperty(u,\"className\",tn)):(t.className&&!t.class||t.class&&t.className)&&(u.class=u.className=t.className),n.props=u}(n),n.$$typeof=z,en&&en(n)};var rn=e.__r;e.__r=function(n){rn&&rn(n),nn=n.__c};var un=e.diffed;e.diffed=function(n){un&&un(n);var t=n.props,e=n.__e;null!=e&&\"textarea\"===n.type&&\"value\"in t&&t.value!==e.value&&(e.value=null==t.value?\"\":t.value),nn=null};var on={ReactCurrentDispatcher:{current:{readContext:function(n){return nn.__n[n.__c].props.value}}}},ln=\"17.0.2\";function cn(n){return t.bind(null,n)}function fn(n){return!!n&&n.$$typeof===z}function an(n){return fn(n)&&n.type===u}function sn(n){return fn(n)?f.apply(null,arguments):n}function hn(n){return!!n.__k&&(o(null,n),!0)}function vn(n){return n&&(n.base||1===n.nodeType&&n)||null}var dn=function(n,t){return n(t)},pn=function(n,t){return n(t)},mn=u;function yn(n){n()}function _n(n){return n}function bn(){return[!1,yn]}var Sn=d,gn=fn;function Cn(n,t){var e=t(),r=a({h:{__:e,v:t}}),u=r[0].h,o=r[1];return d(function(){u.__=e,u.v=t,En(u)&&o({h:u})},[n,e,t]),v(function(){return En(u)&&o({h:u}),n(function(){En(u)&&o({h:u})})},[n]),e}function En(n){var t,e,r=n.v,u=n.__;try{var o=r();return!((t=u)===(e=o)&&(0!==t||1/t==1/e)||t!=t&&e!=e)}catch(n){return!0}}var wn={useState:a,useId:s,useReducer:h,useEffect:v,useLayoutEffect:d,useInsertionEffect:Sn,useTransition:bn,useDeferredValue:_n,useSyncExternalStore:Cn,startTransition:yn,useRef:p,useImperativeHandle:m,useMemo:y,useCallback:_,useContext:b,useDebugValue:S,version:\"17.0.2\",Children:A,render:q,hydrate:G,unmountComponentAtNode:hn,createPortal:j,createElement:t,createContext:l,createFactory:cn,cloneElement:sn,createRef:c,Fragment:u,isValidElement:fn,isElement:gn,isFragment:an,findDOMNode:vn,Component:n,PureComponent:E,memo:w,forwardRef:N,flushSync:pn,unstable_batchedUpdates:dn,StrictMode:mn,Suspense:L,SuspenseList:M,lazy:D,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:on};export{A as Children,E as PureComponent,mn as StrictMode,L as Suspense,M as SuspenseList,on as __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,sn as cloneElement,cn as createFactory,j as createPortal,wn as default,vn as findDOMNode,pn as flushSync,N as forwardRef,G as hydrate,gn as isElement,an as isFragment,fn as isValidElement,D as lazy,w as memo,q as render,yn as startTransition,hn as unmountComponentAtNode,dn as unstable_batchedUpdates,_n as useDeferredValue,Sn as useInsertionEffect,Cn as useSyncExternalStore,bn as useTransition,ln as version};\n//# sourceMappingURL=compat.module.js.map\n","/**\n * @remix-run/router v1.2.1\n *\n * Copyright (c) Remix Software Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\nfunction _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\n////////////////////////////////////////////////////////////////////////////////\n//#region Types and Constants\n////////////////////////////////////////////////////////////////////////////////\n\n/**\n * Actions represent the type of change to a location value.\n */\nvar Action;\n\n(function (Action) {\n /**\n * A POP indicates a change to an arbitrary index in the history stack, such\n * as a back or forward navigation. It does not describe the direction of the\n * navigation, only that the current index changed.\n *\n * Note: This is the default action for newly created history objects.\n */\n Action[\"Pop\"] = \"POP\";\n /**\n * A PUSH indicates a new entry being added to the history stack, such as when\n * a link is clicked and a new page loads. When this happens, all subsequent\n * entries in the stack are lost.\n */\n\n Action[\"Push\"] = \"PUSH\";\n /**\n * A REPLACE indicates the entry at the current index in the history stack\n * being replaced by a new one.\n */\n\n Action[\"Replace\"] = \"REPLACE\";\n})(Action || (Action = {}));\n\nconst PopStateEventType = \"popstate\";\n/**\n * Memory history stores the current location in memory. It is designed for use\n * in stateful non-browser environments like tests and React Native.\n */\n\nfunction createMemoryHistory(options) {\n if (options === void 0) {\n options = {};\n }\n\n let {\n initialEntries = [\"/\"],\n initialIndex,\n v5Compat = false\n } = options;\n let entries; // Declare so we can access from createMemoryLocation\n\n entries = initialEntries.map((entry, index) => createMemoryLocation(entry, typeof entry === \"string\" ? null : entry.state, index === 0 ? \"default\" : undefined));\n let index = clampIndex(initialIndex == null ? entries.length - 1 : initialIndex);\n let action = Action.Pop;\n let listener = null;\n\n function clampIndex(n) {\n return Math.min(Math.max(n, 0), entries.length - 1);\n }\n\n function getCurrentLocation() {\n return entries[index];\n }\n\n function createMemoryLocation(to, state, key) {\n if (state === void 0) {\n state = null;\n }\n\n let location = createLocation(entries ? getCurrentLocation().pathname : \"/\", to, state, key);\n warning$1(location.pathname.charAt(0) === \"/\", \"relative pathnames are not supported in memory history: \" + JSON.stringify(to));\n return location;\n }\n\n let history = {\n get index() {\n return index;\n },\n\n get action() {\n return action;\n },\n\n get location() {\n return getCurrentLocation();\n },\n\n createHref(to) {\n return typeof to === \"string\" ? to : createPath(to);\n },\n\n encodeLocation(to) {\n let path = typeof to === \"string\" ? parsePath(to) : to;\n return {\n pathname: path.pathname || \"\",\n search: path.search || \"\",\n hash: path.hash || \"\"\n };\n },\n\n push(to, state) {\n action = Action.Push;\n let nextLocation = createMemoryLocation(to, state);\n index += 1;\n entries.splice(index, entries.length, nextLocation);\n\n if (v5Compat && listener) {\n listener({\n action,\n location: nextLocation\n });\n }\n },\n\n replace(to, state) {\n action = Action.Replace;\n let nextLocation = createMemoryLocation(to, state);\n entries[index] = nextLocation;\n\n if (v5Compat && listener) {\n listener({\n action,\n location: nextLocation\n });\n }\n },\n\n go(delta) {\n action = Action.Pop;\n index = clampIndex(index + delta);\n\n if (listener) {\n listener({\n action,\n location: getCurrentLocation()\n });\n }\n },\n\n listen(fn) {\n listener = fn;\n return () => {\n listener = null;\n };\n }\n\n };\n return history;\n}\n/**\n * Browser history stores the location in regular URLs. This is the standard for\n * most web apps, but it requires some configuration on the server to ensure you\n * serve the same app at multiple URLs.\n *\n * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#createbrowserhistory\n */\n\nfunction createBrowserHistory(options) {\n if (options === void 0) {\n options = {};\n }\n\n function createBrowserLocation(window, globalHistory) {\n let {\n pathname,\n search,\n hash\n } = window.location;\n return createLocation(\"\", {\n pathname,\n search,\n hash\n }, // state defaults to `null` because `window.history.state` does\n globalHistory.state && globalHistory.state.usr || null, globalHistory.state && globalHistory.state.key || \"default\");\n }\n\n function createBrowserHref(window, to) {\n return typeof to === \"string\" ? to : createPath(to);\n }\n\n return getUrlBasedHistory(createBrowserLocation, createBrowserHref, null, options);\n}\n/**\n * Hash history stores the location in window.location.hash. This makes it ideal\n * for situations where you don't want to send the location to the server for\n * some reason, either because you do cannot configure it or the URL space is\n * reserved for something else.\n *\n * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#createhashhistory\n */\n\nfunction createHashHistory(options) {\n if (options === void 0) {\n options = {};\n }\n\n function createHashLocation(window, globalHistory) {\n let {\n pathname = \"/\",\n search = \"\",\n hash = \"\"\n } = parsePath(window.location.hash.substr(1));\n return createLocation(\"\", {\n pathname,\n search,\n hash\n }, // state defaults to `null` because `window.history.state` does\n globalHistory.state && globalHistory.state.usr || null, globalHistory.state && globalHistory.state.key || \"default\");\n }\n\n function createHashHref(window, to) {\n let base = window.document.querySelector(\"base\");\n let href = \"\";\n\n if (base && base.getAttribute(\"href\")) {\n let url = window.location.href;\n let hashIndex = url.indexOf(\"#\");\n href = hashIndex === -1 ? url : url.slice(0, hashIndex);\n }\n\n return href + \"#\" + (typeof to === \"string\" ? to : createPath(to));\n }\n\n function validateHashLocation(location, to) {\n warning$1(location.pathname.charAt(0) === \"/\", \"relative pathnames are not supported in hash history.push(\" + JSON.stringify(to) + \")\");\n }\n\n return getUrlBasedHistory(createHashLocation, createHashHref, validateHashLocation, options);\n}\nfunction invariant(value, message) {\n if (value === false || value === null || typeof value === \"undefined\") {\n throw new Error(message);\n }\n}\n\nfunction warning$1(cond, message) {\n if (!cond) {\n // eslint-disable-next-line no-console\n if (typeof console !== \"undefined\") console.warn(message);\n\n try {\n // Welcome to debugging history!\n //\n // This error is thrown as a convenience so you can more easily\n // find the source for a warning that appears in the console by\n // enabling \"pause on exceptions\" in your JavaScript debugger.\n throw new Error(message); // eslint-disable-next-line no-empty\n } catch (e) {}\n }\n}\n\nfunction createKey() {\n return Math.random().toString(36).substr(2, 8);\n}\n/**\n * For browser-based histories, we combine the state and key into an object\n */\n\n\nfunction getHistoryState(location) {\n return {\n usr: location.state,\n key: location.key\n };\n}\n/**\n * Creates a Location object with a unique key from the given Path\n */\n\n\nfunction createLocation(current, to, state, key) {\n if (state === void 0) {\n state = null;\n }\n\n let location = _extends({\n pathname: typeof current === \"string\" ? current : current.pathname,\n search: \"\",\n hash: \"\"\n }, typeof to === \"string\" ? parsePath(to) : to, {\n state,\n // TODO: This could be cleaned up. push/replace should probably just take\n // full Locations now and avoid the need to run through this flow at all\n // But that's a pretty big refactor to the current test suite so going to\n // keep as is for the time being and just let any incoming keys take precedence\n key: to && to.key || key || createKey()\n });\n\n return location;\n}\n/**\n * Creates a string URL path from the given pathname, search, and hash components.\n */\n\nfunction createPath(_ref) {\n let {\n pathname = \"/\",\n search = \"\",\n hash = \"\"\n } = _ref;\n if (search && search !== \"?\") pathname += search.charAt(0) === \"?\" ? search : \"?\" + search;\n if (hash && hash !== \"#\") pathname += hash.charAt(0) === \"#\" ? hash : \"#\" + hash;\n return pathname;\n}\n/**\n * Parses a string URL path into its separate pathname, search, and hash components.\n */\n\nfunction parsePath(path) {\n let parsedPath = {};\n\n if (path) {\n let hashIndex = path.indexOf(\"#\");\n\n if (hashIndex >= 0) {\n parsedPath.hash = path.substr(hashIndex);\n path = path.substr(0, hashIndex);\n }\n\n let searchIndex = path.indexOf(\"?\");\n\n if (searchIndex >= 0) {\n parsedPath.search = path.substr(searchIndex);\n path = path.substr(0, searchIndex);\n }\n\n if (path) {\n parsedPath.pathname = path;\n }\n }\n\n return parsedPath;\n}\nfunction createClientSideURL(location) {\n // window.location.origin is \"null\" (the literal string value) in Firefox\n // under certain conditions, notably when serving from a local HTML file\n // See https://bugzilla.mozilla.org/show_bug.cgi?id=878297\n let base = typeof window !== \"undefined\" && typeof window.location !== \"undefined\" && window.location.origin !== \"null\" ? window.location.origin : window.location.href;\n let href = typeof location === \"string\" ? location : createPath(location);\n invariant(base, \"No window.location.(origin|href) available to create URL for href: \" + href);\n return new URL(href, base);\n}\n\nfunction getUrlBasedHistory(getLocation, createHref, validateLocation, options) {\n if (options === void 0) {\n options = {};\n }\n\n let {\n window = document.defaultView,\n v5Compat = false\n } = options;\n let globalHistory = window.history;\n let action = Action.Pop;\n let listener = null;\n\n function handlePop() {\n action = Action.Pop;\n\n if (listener) {\n listener({\n action,\n location: history.location\n });\n }\n }\n\n function push(to, state) {\n action = Action.Push;\n let location = createLocation(history.location, to, state);\n if (validateLocation) validateLocation(location, to);\n let historyState = getHistoryState(location);\n let url = history.createHref(location); // try...catch because iOS limits us to 100 pushState calls :/\n\n try {\n globalHistory.pushState(historyState, \"\", url);\n } catch (error) {\n // They are going to lose state here, but there is no real\n // way to warn them about it since the page will refresh...\n window.location.assign(url);\n }\n\n if (v5Compat && listener) {\n listener({\n action,\n location: history.location\n });\n }\n }\n\n function replace(to, state) {\n action = Action.Replace;\n let location = createLocation(history.location, to, state);\n if (validateLocation) validateLocation(location, to);\n let historyState = getHistoryState(location);\n let url = history.createHref(location);\n globalHistory.replaceState(historyState, \"\", url);\n\n if (v5Compat && listener) {\n listener({\n action,\n location: history.location\n });\n }\n }\n\n let history = {\n get action() {\n return action;\n },\n\n get location() {\n return getLocation(window, globalHistory);\n },\n\n listen(fn) {\n if (listener) {\n throw new Error(\"A history only accepts one active listener\");\n }\n\n window.addEventListener(PopStateEventType, handlePop);\n listener = fn;\n return () => {\n window.removeEventListener(PopStateEventType, handlePop);\n listener = null;\n };\n },\n\n createHref(to) {\n return createHref(window, to);\n },\n\n encodeLocation(to) {\n // Encode a Location the same way window.location would\n let url = createClientSideURL(typeof to === \"string\" ? to : createPath(to));\n return {\n pathname: url.pathname,\n search: url.search,\n hash: url.hash\n };\n },\n\n push,\n replace,\n\n go(n) {\n return globalHistory.go(n);\n }\n\n };\n return history;\n} //#endregion\n\nvar ResultType;\n\n(function (ResultType) {\n ResultType[\"data\"] = \"data\";\n ResultType[\"deferred\"] = \"deferred\";\n ResultType[\"redirect\"] = \"redirect\";\n ResultType[\"error\"] = \"error\";\n})(ResultType || (ResultType = {}));\n\nfunction isIndexRoute(route) {\n return route.index === true;\n} // Walk the route tree generating unique IDs where necessary so we are working\n// solely with AgnosticDataRouteObject's within the Router\n\n\nfunction convertRoutesToDataRoutes(routes, parentPath, allIds) {\n if (parentPath === void 0) {\n parentPath = [];\n }\n\n if (allIds === void 0) {\n allIds = new Set();\n }\n\n return routes.map((route, index) => {\n let treePath = [...parentPath, index];\n let id = typeof route.id === \"string\" ? route.id : treePath.join(\"-\");\n invariant(route.index !== true || !route.children, \"Cannot specify children on an index route\");\n invariant(!allIds.has(id), \"Found a route id collision on id \\\"\" + id + \"\\\". Route \" + \"id's must be globally unique within Data Router usages\");\n allIds.add(id);\n\n if (isIndexRoute(route)) {\n let indexRoute = _extends({}, route, {\n id\n });\n\n return indexRoute;\n } else {\n let pathOrLayoutRoute = _extends({}, route, {\n id,\n children: route.children ? convertRoutesToDataRoutes(route.children, treePath, allIds) : undefined\n });\n\n return pathOrLayoutRoute;\n }\n });\n}\n/**\n * Matches the given routes to a location and returns the match data.\n *\n * @see https://reactrouter.com/utils/match-routes\n */\n\nfunction matchRoutes(routes, locationArg, basename) {\n if (basename === void 0) {\n basename = \"/\";\n }\n\n let location = typeof locationArg === \"string\" ? parsePath(locationArg) : locationArg;\n let pathname = stripBasename(location.pathname || \"/\", basename);\n\n if (pathname == null) {\n return null;\n }\n\n let branches = flattenRoutes(routes);\n rankRouteBranches(branches);\n let matches = null;\n\n for (let i = 0; matches == null && i < branches.length; ++i) {\n matches = matchRouteBranch(branches[i], // Incoming pathnames are generally encoded from either window.location\n // or from router.navigate, but we want to match against the unencoded\n // paths in the route definitions. Memory router locations won't be\n // encoded here but there also shouldn't be anything to decode so this\n // should be a safe operation. This avoids needing matchRoutes to be\n // history-aware.\n safelyDecodeURI(pathname));\n }\n\n return matches;\n}\n\nfunction flattenRoutes(routes, branches, parentsMeta, parentPath) {\n if (branches === void 0) {\n branches = [];\n }\n\n if (parentsMeta === void 0) {\n parentsMeta = [];\n }\n\n if (parentPath === void 0) {\n parentPath = \"\";\n }\n\n let flattenRoute = (route, index, relativePath) => {\n let meta = {\n relativePath: relativePath === undefined ? route.path || \"\" : relativePath,\n caseSensitive: route.caseSensitive === true,\n childrenIndex: index,\n route\n };\n\n if (meta.relativePath.startsWith(\"/\")) {\n invariant(meta.relativePath.startsWith(parentPath), \"Absolute route path \\\"\" + meta.relativePath + \"\\\" nested under path \" + (\"\\\"\" + parentPath + \"\\\" is not valid. An absolute child route path \") + \"must start with the combined path of all its parent routes.\");\n meta.relativePath = meta.relativePath.slice(parentPath.length);\n }\n\n let path = joinPaths([parentPath, meta.relativePath]);\n let routesMeta = parentsMeta.concat(meta); // Add the children before adding this route to the array so we traverse the\n // route tree depth-first and child routes appear before their parents in\n // the \"flattened\" version.\n\n if (route.children && route.children.length > 0) {\n invariant( // Our types know better, but runtime JS may not!\n // @ts-expect-error\n route.index !== true, \"Index routes must not have child routes. Please remove \" + (\"all child routes from route path \\\"\" + path + \"\\\".\"));\n flattenRoutes(route.children, branches, routesMeta, path);\n } // Routes without a path shouldn't ever match by themselves unless they are\n // index routes, so don't add them to the list of possible branches.\n\n\n if (route.path == null && !route.index) {\n return;\n }\n\n branches.push({\n path,\n score: computeScore(path, route.index),\n routesMeta\n });\n };\n\n routes.forEach((route, index) => {\n var _route$path;\n\n // coarse-grain check for optional params\n if (route.path === \"\" || !((_route$path = route.path) != null && _route$path.includes(\"?\"))) {\n flattenRoute(route, index);\n } else {\n for (let exploded of explodeOptionalSegments(route.path)) {\n flattenRoute(route, index, exploded);\n }\n }\n });\n return branches;\n}\n/**\n * Computes all combinations of optional path segments for a given path,\n * excluding combinations that are ambiguous and of lower priority.\n *\n * For example, `/one/:two?/three/:four?/:five?` explodes to:\n * - `/one/three`\n * - `/one/:two/three`\n * - `/one/three/:four`\n * - `/one/three/:five`\n * - `/one/:two/three/:four`\n * - `/one/:two/three/:five`\n * - `/one/three/:four/:five`\n * - `/one/:two/three/:four/:five`\n */\n\n\nfunction explodeOptionalSegments(path) {\n let segments = path.split(\"/\");\n if (segments.length === 0) return [];\n let [first, ...rest] = segments; // Optional path segments are denoted by a trailing `?`\n\n let isOptional = first.endsWith(\"?\"); // Compute the corresponding required segment: `foo?` -> `foo`\n\n let required = first.replace(/\\?$/, \"\");\n\n if (rest.length === 0) {\n // Intepret empty string as omitting an optional segment\n // `[\"one\", \"\", \"three\"]` corresponds to omitting `:two` from `/one/:two?/three` -> `/one/three`\n return isOptional ? [required, \"\"] : [required];\n }\n\n let restExploded = explodeOptionalSegments(rest.join(\"/\"));\n let result = []; // All child paths with the prefix. Do this for all children before the\n // optional version for all children so we get consistent ordering where the\n // parent optional aspect is preferred as required. Otherwise, we can get\n // child sections interspersed where deeper optional segments are higher than\n // parent optional segments, where for example, /:two would explodes _earlier_\n // then /:one. By always including the parent as required _for all children_\n // first, we avoid this issue\n\n result.push(...restExploded.map(subpath => subpath === \"\" ? required : [required, subpath].join(\"/\"))); // Then if this is an optional value, add all child versions without\n\n if (isOptional) {\n result.push(...restExploded);\n } // for absolute paths, ensure `/` instead of empty segment\n\n\n return result.map(exploded => path.startsWith(\"/\") && exploded === \"\" ? \"/\" : exploded);\n}\n\nfunction rankRouteBranches(branches) {\n branches.sort((a, b) => a.score !== b.score ? b.score - a.score // Higher score first\n : compareIndexes(a.routesMeta.map(meta => meta.childrenIndex), b.routesMeta.map(meta => meta.childrenIndex)));\n}\n\nconst paramRe = /^:\\w+$/;\nconst dynamicSegmentValue = 3;\nconst indexRouteValue = 2;\nconst emptySegmentValue = 1;\nconst staticSegmentValue = 10;\nconst splatPenalty = -2;\n\nconst isSplat = s => s === \"*\";\n\nfunction computeScore(path, index) {\n let segments = path.split(\"/\");\n let initialScore = segments.length;\n\n if (segments.some(isSplat)) {\n initialScore += splatPenalty;\n }\n\n if (index) {\n initialScore += indexRouteValue;\n }\n\n return segments.filter(s => !isSplat(s)).reduce((score, segment) => score + (paramRe.test(segment) ? dynamicSegmentValue : segment === \"\" ? emptySegmentValue : staticSegmentValue), initialScore);\n}\n\nfunction compareIndexes(a, b) {\n let siblings = a.length === b.length && a.slice(0, -1).every((n, i) => n === b[i]);\n return siblings ? // If two routes are siblings, we should try to match the earlier sibling\n // first. This allows people to have fine-grained control over the matching\n // behavior by simply putting routes with identical paths in the order they\n // want them tried.\n a[a.length - 1] - b[b.length - 1] : // Otherwise, it doesn't really make sense to rank non-siblings by index,\n // so they sort equally.\n 0;\n}\n\nfunction matchRouteBranch(branch, pathname) {\n let {\n routesMeta\n } = branch;\n let matchedParams = {};\n let matchedPathname = \"/\";\n let matches = [];\n\n for (let i = 0; i < routesMeta.length; ++i) {\n let meta = routesMeta[i];\n let end = i === routesMeta.length - 1;\n let remainingPathname = matchedPathname === \"/\" ? pathname : pathname.slice(matchedPathname.length) || \"/\";\n let match = matchPath({\n path: meta.relativePath,\n caseSensitive: meta.caseSensitive,\n end\n }, remainingPathname);\n if (!match) return null;\n Object.assign(matchedParams, match.params);\n let route = meta.route;\n matches.push({\n // TODO: Can this as be avoided?\n params: matchedParams,\n pathname: joinPaths([matchedPathname, match.pathname]),\n pathnameBase: normalizePathname(joinPaths([matchedPathname, match.pathnameBase])),\n route\n });\n\n if (match.pathnameBase !== \"/\") {\n matchedPathname = joinPaths([matchedPathname, match.pathnameBase]);\n }\n }\n\n return matches;\n}\n/**\n * Returns a path with params interpolated.\n *\n * @see https://reactrouter.com/utils/generate-path\n */\n\n\nfunction generatePath(originalPath, params) {\n if (params === void 0) {\n params = {};\n }\n\n let path = originalPath;\n\n if (path.endsWith(\"*\") && path !== \"*\" && !path.endsWith(\"/*\")) {\n warning(false, \"Route path \\\"\" + path + \"\\\" will be treated as if it were \" + (\"\\\"\" + path.replace(/\\*$/, \"/*\") + \"\\\" because the `*` character must \") + \"always follow a `/` in the pattern. To get rid of this warning, \" + (\"please change the route path to \\\"\" + path.replace(/\\*$/, \"/*\") + \"\\\".\"));\n path = path.replace(/\\*$/, \"/*\");\n }\n\n return path.replace(/^:(\\w+)/g, (_, key) => {\n invariant(params[key] != null, \"Missing \\\":\" + key + \"\\\" param\");\n return params[key];\n }).replace(/\\/:(\\w+)/g, (_, key) => {\n invariant(params[key] != null, \"Missing \\\":\" + key + \"\\\" param\");\n return \"/\" + params[key];\n }).replace(/(\\/?)\\*/, (_, prefix, __, str) => {\n const star = \"*\";\n\n if (params[star] == null) {\n // If no splat was provided, trim the trailing slash _unless_ it's\n // the entire path\n return str === \"/*\" ? \"/\" : \"\";\n } // Apply the splat\n\n\n return \"\" + prefix + params[star];\n });\n}\n/**\n * Performs pattern matching on a URL pathname and returns information about\n * the match.\n *\n * @see https://reactrouter.com/utils/match-path\n */\n\nfunction matchPath(pattern, pathname) {\n if (typeof pattern === \"string\") {\n pattern = {\n path: pattern,\n caseSensitive: false,\n end: true\n };\n }\n\n let [matcher, paramNames] = compilePath(pattern.path, pattern.caseSensitive, pattern.end);\n let match = pathname.match(matcher);\n if (!match) return null;\n let matchedPathname = match[0];\n let pathnameBase = matchedPathname.replace(/(.)\\/+$/, \"$1\");\n let captureGroups = match.slice(1);\n let params = paramNames.reduce((memo, paramName, index) => {\n // We need to compute the pathnameBase here using the raw splat value\n // instead of using params[\"*\"] later because it will be decoded then\n if (paramName === \"*\") {\n let splatValue = captureGroups[index] || \"\";\n pathnameBase = matchedPathname.slice(0, matchedPathname.length - splatValue.length).replace(/(.)\\/+$/, \"$1\");\n }\n\n memo[paramName] = safelyDecodeURIComponent(captureGroups[index] || \"\", paramName);\n return memo;\n }, {});\n return {\n params,\n pathname: matchedPathname,\n pathnameBase,\n pattern\n };\n}\n\nfunction compilePath(path, caseSensitive, end) {\n if (caseSensitive === void 0) {\n caseSensitive = false;\n }\n\n if (end === void 0) {\n end = true;\n }\n\n warning(path === \"*\" || !path.endsWith(\"*\") || path.endsWith(\"/*\"), \"Route path \\\"\" + path + \"\\\" will be treated as if it were \" + (\"\\\"\" + path.replace(/\\*$/, \"/*\") + \"\\\" because the `*` character must \") + \"always follow a `/` in the pattern. To get rid of this warning, \" + (\"please change the route path to \\\"\" + path.replace(/\\*$/, \"/*\") + \"\\\".\"));\n let paramNames = [];\n let regexpSource = \"^\" + path.replace(/\\/*\\*?$/, \"\") // Ignore trailing / and /*, we'll handle it below\n .replace(/^\\/*/, \"/\") // Make sure it has a leading /\n .replace(/[\\\\.*+^$?{}|()[\\]]/g, \"\\\\$&\") // Escape special regex chars\n .replace(/\\/:(\\w+)/g, (_, paramName) => {\n paramNames.push(paramName);\n return \"/([^\\\\/]+)\";\n });\n\n if (path.endsWith(\"*\")) {\n paramNames.push(\"*\");\n regexpSource += path === \"*\" || path === \"/*\" ? \"(.*)$\" // Already matched the initial /, just match the rest\n : \"(?:\\\\/(.+)|\\\\/*)$\"; // Don't include the / in params[\"*\"]\n } else if (end) {\n // When matching to the end, ignore trailing slashes\n regexpSource += \"\\\\/*$\";\n } else if (path !== \"\" && path !== \"/\") {\n // If our path is non-empty and contains anything beyond an initial slash,\n // then we have _some_ form of path in our regex so we should expect to\n // match only if we find the end of this path segment. Look for an optional\n // non-captured trailing slash (to match a portion of the URL) or the end\n // of the path (if we've matched to the end). We used to do this with a\n // word boundary but that gives false positives on routes like\n // /user-preferences since `-` counts as a word boundary.\n regexpSource += \"(?:(?=\\\\/|$))\";\n } else ;\n\n let matcher = new RegExp(regexpSource, caseSensitive ? undefined : \"i\");\n return [matcher, paramNames];\n}\n\nfunction safelyDecodeURI(value) {\n try {\n return decodeURI(value);\n } catch (error) {\n warning(false, \"The URL path \\\"\" + value + \"\\\" could not be decoded because it is is a \" + \"malformed URL segment. This is probably due to a bad percent \" + (\"encoding (\" + error + \").\"));\n return value;\n }\n}\n\nfunction safelyDecodeURIComponent(value, paramName) {\n try {\n return decodeURIComponent(value);\n } catch (error) {\n warning(false, \"The value for the URL param \\\"\" + paramName + \"\\\" will not be decoded because\" + (\" the string \\\"\" + value + \"\\\" is a malformed URL segment. This is probably\") + (\" due to a bad percent encoding (\" + error + \").\"));\n return value;\n }\n}\n/**\n * @private\n */\n\n\nfunction stripBasename(pathname, basename) {\n if (basename === \"/\") return pathname;\n\n if (!pathname.toLowerCase().startsWith(basename.toLowerCase())) {\n return null;\n } // We want to leave trailing slash behavior in the user's control, so if they\n // specify a basename with a trailing slash, we should support it\n\n\n let startIndex = basename.endsWith(\"/\") ? basename.length - 1 : basename.length;\n let nextChar = pathname.charAt(startIndex);\n\n if (nextChar && nextChar !== \"/\") {\n // pathname does not start with basename/\n return null;\n }\n\n return pathname.slice(startIndex) || \"/\";\n}\n/**\n * @private\n */\n\nfunction warning(cond, message) {\n if (!cond) {\n // eslint-disable-next-line no-console\n if (typeof console !== \"undefined\") console.warn(message);\n\n try {\n // Welcome to debugging React Router!\n //\n // This error is thrown as a convenience so you can more easily\n // find the source for a warning that appears in the console by\n // enabling \"pause on exceptions\" in your JavaScript debugger.\n throw new Error(message); // eslint-disable-next-line no-empty\n } catch (e) {}\n }\n}\n/**\n * Returns a resolved path object relative to the given pathname.\n *\n * @see https://reactrouter.com/utils/resolve-path\n */\n\nfunction resolvePath(to, fromPathname) {\n if (fromPathname === void 0) {\n fromPathname = \"/\";\n }\n\n let {\n pathname: toPathname,\n search = \"\",\n hash = \"\"\n } = typeof to === \"string\" ? parsePath(to) : to;\n let pathname = toPathname ? toPathname.startsWith(\"/\") ? toPathname : resolvePathname(toPathname, fromPathname) : fromPathname;\n return {\n pathname,\n search: normalizeSearch(search),\n hash: normalizeHash(hash)\n };\n}\n\nfunction resolvePathname(relativePath, fromPathname) {\n let segments = fromPathname.replace(/\\/+$/, \"\").split(\"/\");\n let relativeSegments = relativePath.split(\"/\");\n relativeSegments.forEach(segment => {\n if (segment === \"..\") {\n // Keep the root \"\" segment so the pathname starts at /\n if (segments.length > 1) segments.pop();\n } else if (segment !== \".\") {\n segments.push(segment);\n }\n });\n return segments.length > 1 ? segments.join(\"/\") : \"/\";\n}\n\nfunction getInvalidPathError(char, field, dest, path) {\n return \"Cannot include a '\" + char + \"' character in a manually specified \" + (\"`to.\" + field + \"` field [\" + JSON.stringify(path) + \"]. Please separate it out to the \") + (\"`to.\" + dest + \"` field. Alternatively you may provide the full path as \") + \"a string in <Link to=\\\"...\\\"> and the router will parse it for you.\";\n}\n/**\n * @private\n *\n * When processing relative navigation we want to ignore ancestor routes that\n * do not contribute to the path, such that index/pathless layout routes don't\n * interfere.\n *\n * For example, when moving a route element into an index route and/or a\n * pathless layout route, relative link behavior contained within should stay\n * the same. Both of the following examples should link back to the root:\n *\n * <Route path=\"/\">\n * <Route path=\"accounts\" element={<Link to=\"..\"}>\n * </Route>\n *\n * <Route path=\"/\">\n * <Route path=\"accounts\">\n * <Route element={<AccountsLayout />}> // <-- Does not contribute\n * <Route index element={<Link to=\"..\"} /> // <-- Does not contribute\n * </Route\n * </Route>\n * </Route>\n */\n\n\nfunction getPathContributingMatches(matches) {\n return matches.filter((match, index) => index === 0 || match.route.path && match.route.path.length > 0);\n}\n/**\n * @private\n */\n\nfunction resolveTo(toArg, routePathnames, locationPathname, isPathRelative) {\n if (isPathRelative === void 0) {\n isPathRelative = false;\n }\n\n let to;\n\n if (typeof toArg === \"string\") {\n to = parsePath(toArg);\n } else {\n to = _extends({}, toArg);\n invariant(!to.pathname || !to.pathname.includes(\"?\"), getInvalidPathError(\"?\", \"pathname\", \"search\", to));\n invariant(!to.pathname || !to.pathname.includes(\"#\"), getInvalidPathError(\"#\", \"pathname\", \"hash\", to));\n invariant(!to.search || !to.search.includes(\"#\"), getInvalidPathError(\"#\", \"search\", \"hash\", to));\n }\n\n let isEmptyPath = toArg === \"\" || to.pathname === \"\";\n let toPathname = isEmptyPath ? \"/\" : to.pathname;\n let from; // Routing is relative to the current pathname if explicitly requested.\n //\n // If a pathname is explicitly provided in `to`, it should be relative to the\n // route context. This is explained in `Note on `<Link to>` values` in our\n // migration guide from v5 as a means of disambiguation between `to` values\n // that begin with `/` and those that do not. However, this is problematic for\n // `to` values that do not provide a pathname. `to` can simply be a search or\n // hash string, in which case we should assume that the navigation is relative\n // to the current location's pathname and *not* the route pathname.\n\n if (isPathRelative || toPathname == null) {\n from = locationPathname;\n } else {\n let routePathnameIndex = routePathnames.length - 1;\n\n if (toPathname.startsWith(\"..\")) {\n let toSegments = toPathname.split(\"/\"); // Each leading .. segment means \"go up one route\" instead of \"go up one\n // URL segment\". This is a key difference from how <a href> works and a\n // major reason we call this a \"to\" value instead of a \"href\".\n\n while (toSegments[0] === \"..\") {\n toSegments.shift();\n routePathnameIndex -= 1;\n }\n\n to.pathname = toSegments.join(\"/\");\n } // If there are more \"..\" segments than parent routes, resolve relative to\n // the root / URL.\n\n\n from = routePathnameIndex >= 0 ? routePathnames[routePathnameIndex] : \"/\";\n }\n\n let path = resolvePath(to, from); // Ensure the pathname has a trailing slash if the original \"to\" had one\n\n let hasExplicitTrailingSlash = toPathname && toPathname !== \"/\" && toPathname.endsWith(\"/\"); // Or if this was a link to the current path which has a trailing slash\n\n let hasCurrentTrailingSlash = (isEmptyPath || toPathname === \".\") && locationPathname.endsWith(\"/\");\n\n if (!path.pathname.endsWith(\"/\") && (hasExplicitTrailingSlash || hasCurrentTrailingSlash)) {\n path.pathname += \"/\";\n }\n\n return path;\n}\n/**\n * @private\n */\n\nfunction getToPathname(to) {\n // Empty strings should be treated the same as / paths\n return to === \"\" || to.pathname === \"\" ? \"/\" : typeof to === \"string\" ? parsePath(to).pathname : to.pathname;\n}\n/**\n * @private\n */\n\nconst joinPaths = paths => paths.join(\"/\").replace(/\\/\\/+/g, \"/\");\n/**\n * @private\n */\n\nconst normalizePathname = pathname => pathname.replace(/\\/+$/, \"\").replace(/^\\/*/, \"/\");\n/**\n * @private\n */\n\nconst normalizeSearch = search => !search || search === \"?\" ? \"\" : search.startsWith(\"?\") ? search : \"?\" + search;\n/**\n * @private\n */\n\nconst normalizeHash = hash => !hash || hash === \"#\" ? \"\" : hash.startsWith(\"#\") ? hash : \"#\" + hash;\n/**\n * This is a shortcut for creating `application/json` responses. Converts `data`\n * to JSON and sets the `Content-Type` header.\n */\n\nconst json = function json(data, init) {\n if (init === void 0) {\n init = {};\n }\n\n let responseInit = typeof init === \"number\" ? {\n status: init\n } : init;\n let headers = new Headers(responseInit.headers);\n\n if (!headers.has(\"Content-Type\")) {\n headers.set(\"Content-Type\", \"application/json; charset=utf-8\");\n }\n\n return new Response(JSON.stringify(data), _extends({}, responseInit, {\n headers\n }));\n};\nclass AbortedDeferredError extends Error {}\nclass DeferredData {\n constructor(data) {\n this.pendingKeys = new Set();\n this.subscriber = undefined;\n invariant(data && typeof data === \"object\" && !Array.isArray(data), \"defer() only accepts plain objects\"); // Set up an AbortController + Promise we can race against to exit early\n // cancellation\n\n let reject;\n this.abortPromise = new Promise((_, r) => reject = r);\n this.controller = new AbortController();\n\n let onAbort = () => reject(new AbortedDeferredError(\"Deferred data aborted\"));\n\n this.unlistenAbortSignal = () => this.controller.signal.removeEventListener(\"abort\", onAbort);\n\n this.controller.signal.addEventListener(\"abort\", onAbort);\n this.data = Object.entries(data).reduce((acc, _ref) => {\n let [key, value] = _ref;\n return Object.assign(acc, {\n [key]: this.trackPromise(key, value)\n });\n }, {});\n }\n\n trackPromise(key, value) {\n if (!(value instanceof Promise)) {\n return value;\n }\n\n this.pendingKeys.add(key); // We store a little wrapper promise that will be extended with\n // _data/_error props upon resolve/reject\n\n let promise = Promise.race([value, this.abortPromise]).then(data => this.onSettle(promise, key, null, data), error => this.onSettle(promise, key, error)); // Register rejection listeners to avoid uncaught promise rejections on\n // errors or aborted deferred values\n\n promise.catch(() => {});\n Object.defineProperty(promise, \"_tracked\", {\n get: () => true\n });\n return promise;\n }\n\n onSettle(promise, key, error, data) {\n if (this.controller.signal.aborted && error instanceof AbortedDeferredError) {\n this.unlistenAbortSignal();\n Object.defineProperty(promise, \"_error\", {\n get: () => error\n });\n return Promise.reject(error);\n }\n\n this.pendingKeys.delete(key);\n\n if (this.done) {\n // Nothing left to abort!\n this.unlistenAbortSignal();\n }\n\n const subscriber = this.subscriber;\n\n if (error) {\n Object.defineProperty(promise, \"_error\", {\n get: () => error\n });\n subscriber && subscriber(false);\n return Promise.reject(error);\n }\n\n Object.defineProperty(promise, \"_data\", {\n get: () => data\n });\n subscriber && subscriber(false);\n return data;\n }\n\n subscribe(fn) {\n this.subscriber = fn;\n }\n\n cancel() {\n this.controller.abort();\n this.pendingKeys.forEach((v, k) => this.pendingKeys.delete(k));\n let subscriber = this.subscriber;\n subscriber && subscriber(true);\n }\n\n async resolveData(signal) {\n let aborted = false;\n\n if (!this.done) {\n let onAbort = () => this.cancel();\n\n signal.addEventListener(\"abort\", onAbort);\n aborted = await new Promise(resolve => {\n this.subscribe(aborted => {\n signal.removeEventListener(\"abort\", onAbort);\n\n if (aborted || this.done) {\n resolve(aborted);\n }\n });\n });\n }\n\n return aborted;\n }\n\n get done() {\n return this.pendingKeys.size === 0;\n }\n\n get unwrappedData() {\n invariant(this.data !== null && this.done, \"Can only unwrap data on initialized and settled deferreds\");\n return Object.entries(this.data).reduce((acc, _ref2) => {\n let [key, value] = _ref2;\n return Object.assign(acc, {\n [key]: unwrapTrackedPromise(value)\n });\n }, {});\n }\n\n}\n\nfunction isTrackedPromise(value) {\n return value instanceof Promise && value._tracked === true;\n}\n\nfunction unwrapTrackedPromise(value) {\n if (!isTrackedPromise(value)) {\n return value;\n }\n\n if (value._error) {\n throw value._error;\n }\n\n return value._data;\n}\n\nfunction defer(data) {\n return new DeferredData(data);\n}\n/**\n * A redirect response. Sets the status code and the `Location` header.\n * Defaults to \"302 Found\".\n */\n\nconst redirect = function redirect(url, init) {\n if (init === void 0) {\n init = 302;\n }\n\n let responseInit = init;\n\n if (typeof responseInit === \"number\") {\n responseInit = {\n status: responseInit\n };\n } else if (typeof responseInit.status === \"undefined\") {\n responseInit.status = 302;\n }\n\n let headers = new Headers(responseInit.headers);\n headers.set(\"Location\", url);\n return new Response(null, _extends({}, responseInit, {\n headers\n }));\n};\n/**\n * @private\n * Utility class we use to hold auto-unwrapped 4xx/5xx Response bodies\n */\n\nclass ErrorResponse {\n constructor(status, statusText, data, internal) {\n if (internal === void 0) {\n internal = false;\n }\n\n this.status = status;\n this.statusText = statusText || \"\";\n this.internal = internal;\n\n if (data instanceof Error) {\n this.data = data.toString();\n this.error = data;\n } else {\n this.data = data;\n }\n }\n\n}\n/**\n * Check if the given error is an ErrorResponse generated from a 4xx/5xx\n * Response throw from an action/loader\n */\n\nfunction isRouteErrorResponse(e) {\n return e instanceof ErrorResponse;\n}\n\nconst validMutationMethodsArr = [\"post\", \"put\", \"patch\", \"delete\"];\nconst validMutationMethods = new Set(validMutationMethodsArr);\nconst validRequestMethodsArr = [\"get\", ...validMutationMethodsArr];\nconst validRequestMethods = new Set(validRequestMethodsArr);\nconst redirectStatusCodes = new Set([301, 302, 303, 307, 308]);\nconst redirectPreserveMethodStatusCodes = new Set([307, 308]);\nconst IDLE_NAVIGATION = {\n state: \"idle\",\n location: undefined,\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined\n};\nconst IDLE_FETCHER = {\n state: \"idle\",\n data: undefined,\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined\n};\nconst isBrowser = typeof window !== \"undefined\" && typeof window.document !== \"undefined\" && typeof window.document.createElement !== \"undefined\";\nconst isServer = !isBrowser; //#endregion\n////////////////////////////////////////////////////////////////////////////////\n//#region createRouter\n////////////////////////////////////////////////////////////////////////////////\n\n/**\n * Create a router and listen to history POP navigations\n */\n\nfunction createRouter(init) {\n invariant(init.routes.length > 0, \"You must provide a non-empty routes array to createRouter\");\n let dataRoutes = convertRoutesToDataRoutes(init.routes); // Cleanup function for history\n\n let unlistenHistory = null; // Externally-provided functions to call on all state changes\n\n let subscribers = new Set(); // Externally-provided object to hold scroll restoration locations during routing\n\n let savedScrollPositions = null; // Externally-provided function to get scroll restoration keys\n\n let getScrollRestorationKey = null; // Externally-provided function to get current scroll position\n\n let getScrollPosition = null; // One-time flag to control the initial hydration scroll restoration. Because\n // we don't get the saved positions from <ScrollRestoration /> until _after_\n // the initial render, we need to manually trigger a separate updateState to\n // send along the restoreScrollPosition\n // Set to true if we have `hydrationData` since we assume we were SSR'd and that\n // SSR did the initial scroll restoration.\n\n let initialScrollRestored = init.hydrationData != null;\n let initialMatches = matchRoutes(dataRoutes, init.history.location, init.basename);\n let initialErrors = null;\n\n if (initialMatches == null) {\n // If we do not match a user-provided-route, fall back to the root\n // to allow the error boundary to take over\n let error = getInternalRouterError(404, {\n pathname: init.history.location.pathname\n });\n let {\n matches,\n route\n } = getShortCircuitMatches(dataRoutes);\n initialMatches = matches;\n initialErrors = {\n [route.id]: error\n };\n }\n\n let initialized = !initialMatches.some(m => m.route.loader) || init.hydrationData != null;\n let router;\n let state = {\n historyAction: init.history.action,\n location: init.history.location,\n matches: initialMatches,\n initialized,\n navigation: IDLE_NAVIGATION,\n // Don't restore on initial updateState() if we were SSR'd\n restoreScrollPosition: init.hydrationData != null ? false : null,\n preventScrollReset: false,\n revalidation: \"idle\",\n loaderData: init.hydrationData && init.hydrationData.loaderData || {},\n actionData: init.hydrationData && init.hydrationData.actionData || null,\n errors: init.hydrationData && init.hydrationData.errors || initialErrors,\n fetchers: new Map()\n }; // -- Stateful internal variables to manage navigations --\n // Current navigation in progress (to be committed in completeNavigation)\n\n let pendingAction = Action.Pop; // Should the current navigation prevent the scroll reset if scroll cannot\n // be restored?\n\n let pendingPreventScrollReset = false; // AbortController for the active navigation\n\n let pendingNavigationController; // We use this to avoid touching history in completeNavigation if a\n // revalidation is entirely uninterrupted\n\n let isUninterruptedRevalidation = false; // Use this internal flag to force revalidation of all loaders:\n // - submissions (completed or interrupted)\n // - useRevalidate()\n // - X-Remix-Revalidate (from redirect)\n\n let isRevalidationRequired = false; // Use this internal array to capture routes that require revalidation due\n // to a cancelled deferred on action submission\n\n let cancelledDeferredRoutes = []; // Use this internal array to capture fetcher loads that were cancelled by an\n // action navigation and require revalidation\n\n let cancelledFetcherLoads = []; // AbortControllers for any in-flight fetchers\n\n let fetchControllers = new Map(); // Track loads based on the order in which they started\n\n let incrementingLoadId = 0; // Track the outstanding pending navigation data load to be compared against\n // the globally incrementing load when a fetcher load lands after a completed\n // navigation\n\n let pendingNavigationLoadId = -1; // Fetchers that triggered data reloads as a result of their actions\n\n let fetchReloadIds = new Map(); // Fetchers that triggered redirect navigations from their actions\n\n let fetchRedirectIds = new Set(); // Most recent href/match for fetcher.load calls for fetchers\n\n let fetchLoadMatches = new Map(); // Store DeferredData instances for active route matches. When a\n // route loader returns defer() we stick one in here. Then, when a nested\n // promise resolves we update loaderData. If a new navigation starts we\n // cancel active deferreds for eliminated routes.\n\n let activeDeferreds = new Map(); // Initialize the router, all side effects should be kicked off from here.\n // Implemented as a Fluent API for ease of:\n // let router = createRouter(init).initialize();\n\n function initialize() {\n // If history informs us of a POP navigation, start the navigation but do not update\n // state. We'll update our own state once the navigation completes\n unlistenHistory = init.history.listen(_ref => {\n let {\n action: historyAction,\n location\n } = _ref;\n return startNavigation(historyAction, location);\n }); // Kick off initial data load if needed. Use Pop to avoid modifying history\n\n if (!state.initialized) {\n startNavigation(Action.Pop, state.location);\n }\n\n return router;\n } // Clean up a router and it's side effects\n\n\n function dispose() {\n if (unlistenHistory) {\n unlistenHistory();\n }\n\n subscribers.clear();\n pendingNavigationController && pendingNavigationController.abort();\n state.fetchers.forEach((_, key) => deleteFetcher(key));\n } // Subscribe to state updates for the router\n\n\n function subscribe(fn) {\n subscribers.add(fn);\n return () => subscribers.delete(fn);\n } // Update our state and notify the calling context of the change\n\n\n function updateState(newState) {\n state = _extends({}, state, newState);\n subscribers.forEach(subscriber => subscriber(state));\n } // Complete a navigation returning the state.navigation back to the IDLE_NAVIGATION\n // and setting state.[historyAction/location/matches] to the new route.\n // - Location is a required param\n // - Navigation will always be set to IDLE_NAVIGATION\n // - Can pass any other state in newState\n\n\n function completeNavigation(location, newState) {\n var _location$state;\n\n // Deduce if we're in a loading/actionReload state:\n // - We have committed actionData in the store\n // - The current navigation was a mutation submission\n // - We're past the submitting state and into the loading state\n // - The location being loaded is not the result of a redirect\n let isActionReload = state.actionData != null && state.navigation.formMethod != null && isMutationMethod(state.navigation.formMethod) && state.navigation.state === \"loading\" && ((_location$state = location.state) == null ? void 0 : _location$state._isRedirect) !== true;\n let actionData;\n\n if (newState.actionData) {\n if (Object.keys(newState.actionData).length > 0) {\n actionData = newState.actionData;\n } else {\n // Empty actionData -> clear prior actionData due to an action error\n actionData = null;\n }\n } else if (isActionReload) {\n // Keep the current data if we're wrapping up the action reload\n actionData = state.actionData;\n } else {\n // Clear actionData on any other completed navigations\n actionData = null;\n } // Always preserve any existing loaderData from re-used routes\n\n\n let loaderData = newState.loaderData ? mergeLoaderData(state.loaderData, newState.loaderData, newState.matches || [], newState.errors) : state.loaderData;\n updateState(_extends({}, newState, {\n actionData,\n loaderData,\n historyAction: pendingAction,\n location,\n initialized: true,\n navigation: IDLE_NAVIGATION,\n revalidation: \"idle\",\n // Don't restore on submission navigations\n restoreScrollPosition: state.navigation.formData ? false : getSavedScrollPosition(location, newState.matches || state.matches),\n preventScrollReset: pendingPreventScrollReset\n }));\n\n if (isUninterruptedRevalidation) ; else if (pendingAction === Action.Pop) ; else if (pendingAction === Action.Push) {\n init.history.push(location, location.state);\n } else if (pendingAction === Action.Replace) {\n init.history.replace(location, location.state);\n } // Reset stateful navigation vars\n\n\n pendingAction = Action.Pop;\n pendingPreventScrollReset = false;\n isUninterruptedRevalidation = false;\n isRevalidationRequired = false;\n cancelledDeferredRoutes = [];\n cancelledFetcherLoads = [];\n } // Trigger a navigation event, which can either be a numerical POP or a PUSH\n // replace with an optional submission\n\n\n async function navigate(to, opts) {\n if (typeof to === \"number\") {\n init.history.go(to);\n return;\n }\n\n let {\n path,\n submission,\n error\n } = normalizeNavigateOptions(to, opts);\n let location = createLocation(state.location, path, opts && opts.state); // When using navigate as a PUSH/REPLACE we aren't reading an already-encoded\n // URL from window.location, so we need to encode it here so the behavior\n // remains the same as POP and non-data-router usages. new URL() does all\n // the same encoding we'd get from a history.pushState/window.location read\n // without having to touch history\n\n location = _extends({}, location, init.history.encodeLocation(location));\n let userReplace = opts && opts.replace != null ? opts.replace : undefined;\n let historyAction = Action.Push;\n\n if (userReplace === true) {\n historyAction = Action.Replace;\n } else if (userReplace === false) ; else if (submission != null && isMutationMethod(submission.formMethod) && submission.formAction === state.location.pathname + state.location.search) {\n // By default on submissions to the current location we REPLACE so that\n // users don't have to double-click the back button to get to the prior\n // location. If the user redirects to a different location from the\n // action/loader this will be ignored and the redirect will be a PUSH\n historyAction = Action.Replace;\n }\n\n let preventScrollReset = opts && \"preventScrollReset\" in opts ? opts.preventScrollReset === true : undefined;\n return await startNavigation(historyAction, location, {\n submission,\n // Send through the formData serialization error if we have one so we can\n // render at the right error boundary after we match routes\n pendingError: error,\n preventScrollReset,\n replace: opts && opts.replace\n });\n } // Revalidate all current loaders. If a navigation is in progress or if this\n // is interrupted by a navigation, allow this to \"succeed\" by calling all\n // loaders during the next loader round\n\n\n function revalidate() {\n interruptActiveLoads();\n updateState({\n revalidation: \"loading\"\n }); // If we're currently submitting an action, we don't need to start a new\n // navigation, we'll just let the follow up loader execution call all loaders\n\n if (state.navigation.state === \"submitting\") {\n return;\n } // If we're currently in an idle state, start a new navigation for the current\n // action/location and mark it as uninterrupted, which will skip the history\n // update in completeNavigation\n\n\n if (state.navigation.state === \"idle\") {\n startNavigation(state.historyAction, state.location, {\n startUninterruptedRevalidation: true\n });\n return;\n } // Otherwise, if we're currently in a loading state, just start a new\n // navigation to the navigation.location but do not trigger an uninterrupted\n // revalidation so that history correctly updates once the navigation completes\n\n\n startNavigation(pendingAction || state.historyAction, state.navigation.location, {\n overrideNavigation: state.navigation\n });\n } // Start a navigation to the given action/location. Can optionally provide a\n // overrideNavigation which will override the normalLoad in the case of a redirect\n // navigation\n\n\n async function startNavigation(historyAction, location, opts) {\n // Abort any in-progress navigations and start a new one. Unset any ongoing\n // uninterrupted revalidations unless told otherwise, since we want this\n // new navigation to update history normally\n pendingNavigationController && pendingNavigationController.abort();\n pendingNavigationController = null;\n pendingAction = historyAction;\n isUninterruptedRevalidation = (opts && opts.startUninterruptedRevalidation) === true; // Save the current scroll position every time we start a new navigation,\n // and track whether we should reset scroll on completion\n\n saveScrollPosition(state.location, state.matches);\n pendingPreventScrollReset = (opts && opts.preventScrollReset) === true;\n let loadingNavigation = opts && opts.overrideNavigation;\n let matches = matchRoutes(dataRoutes, location, init.basename); // Short circuit with a 404 on the root error boundary if we match nothing\n\n if (!matches) {\n let error = getInternalRouterError(404, {\n pathname: location.pathname\n });\n let {\n matches: notFoundMatches,\n route\n } = getShortCircuitMatches(dataRoutes); // Cancel all pending deferred on 404s since we don't keep any routes\n\n cancelActiveDeferreds();\n completeNavigation(location, {\n matches: notFoundMatches,\n loaderData: {},\n errors: {\n [route.id]: error\n }\n });\n return;\n } // Short circuit if it's only a hash change\n\n\n if (isHashChangeOnly(state.location, location)) {\n completeNavigation(location, {\n matches\n });\n return;\n } // Create a controller/Request for this navigation\n\n\n pendingNavigationController = new AbortController();\n let request = createClientSideRequest(location, pendingNavigationController.signal, opts && opts.submission);\n let pendingActionData;\n let pendingError;\n\n if (opts && opts.pendingError) {\n // If we have a pendingError, it means the user attempted a GET submission\n // with binary FormData so assign here and skip to handleLoaders. That\n // way we handle calling loaders above the boundary etc. It's not really\n // different from an actionError in that sense.\n pendingError = {\n [findNearestBoundary(matches).route.id]: opts.pendingError\n };\n } else if (opts && opts.submission && isMutationMethod(opts.submission.formMethod)) {\n // Call action if we received an action submission\n let actionOutput = await handleAction(request, location, opts.submission, matches, {\n replace: opts.replace\n });\n\n if (actionOutput.shortCircuited) {\n return;\n }\n\n pendingActionData = actionOutput.pendingActionData;\n pendingError = actionOutput.pendingActionError;\n\n let navigation = _extends({\n state: \"loading\",\n location\n }, opts.submission);\n\n loadingNavigation = navigation; // Create a GET request for the loaders\n\n request = new Request(request.url, {\n signal: request.signal\n });\n } // Call loaders\n\n\n let {\n shortCircuited,\n loaderData,\n errors\n } = await handleLoaders(request, location, matches, loadingNavigation, opts && opts.submission, opts && opts.replace, pendingActionData, pendingError);\n\n if (shortCircuited) {\n return;\n } // Clean up now that the action/loaders have completed. Don't clean up if\n // we short circuited because pendingNavigationController will have already\n // been assigned to a new controller for the next navigation\n\n\n pendingNavigationController = null;\n completeNavigation(location, _extends({\n matches\n }, pendingActionData ? {\n actionData: pendingActionData\n } : {}, {\n loaderData,\n errors\n }));\n } // Call the action matched by the leaf route for this navigation and handle\n // redirects/errors\n\n\n async function handleAction(request, location, submission, matches, opts) {\n interruptActiveLoads(); // Put us in a submitting state\n\n let navigation = _extends({\n state: \"submitting\",\n location\n }, submission);\n\n updateState({\n navigation\n }); // Call our action and get the result\n\n let result;\n let actionMatch = getTargetMatch(matches, location);\n\n if (!actionMatch.route.action) {\n result = {\n type: ResultType.error,\n error: getInternalRouterError(405, {\n method: request.method,\n pathname: location.pathname,\n routeId: actionMatch.route.id\n })\n };\n } else {\n result = await callLoaderOrAction(\"action\", request, actionMatch, matches, router.basename);\n\n if (request.signal.aborted) {\n return {\n shortCircuited: true\n };\n }\n }\n\n if (isRedirectResult(result)) {\n let replace;\n\n if (opts && opts.replace != null) {\n replace = opts.replace;\n } else {\n // If the user didn't explicity indicate replace behavior, replace if\n // we redirected to the exact same location we're currently at to avoid\n // double back-buttons\n replace = result.location === state.location.pathname + state.location.search;\n }\n\n await startRedirectNavigation(state, result, {\n submission,\n replace\n });\n return {\n shortCircuited: true\n };\n }\n\n if (isErrorResult(result)) {\n // Store off the pending error - we use it to determine which loaders\n // to call and will commit it when we complete the navigation\n let boundaryMatch = findNearestBoundary(matches, actionMatch.route.id); // By default, all submissions are REPLACE navigations, but if the\n // action threw an error that'll be rendered in an errorElement, we fall\n // back to PUSH so that the user can use the back button to get back to\n // the pre-submission form location to try again\n\n if ((opts && opts.replace) !== true) {\n pendingAction = Action.Push;\n }\n\n return {\n // Send back an empty object we can use to clear out any prior actionData\n pendingActionData: {},\n pendingActionError: {\n [boundaryMatch.route.id]: result.error\n }\n };\n }\n\n if (isDeferredResult(result)) {\n throw new Error(\"defer() is not supported in actions\");\n }\n\n return {\n pendingActionData: {\n [actionMatch.route.id]: result.data\n }\n };\n } // Call all applicable loaders for the given matches, handling redirects,\n // errors, etc.\n\n\n async function handleLoaders(request, location, matches, overrideNavigation, submission, replace, pendingActionData, pendingError) {\n // Figure out the right navigation we want to use for data loading\n let loadingNavigation = overrideNavigation;\n\n if (!loadingNavigation) {\n let navigation = _extends({\n state: \"loading\",\n location,\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined\n }, submission);\n\n loadingNavigation = navigation;\n } // If this was a redirect from an action we don't have a \"submission\" but\n // we have it on the loading navigation so use that if available\n\n\n let activeSubmission = submission ? submission : loadingNavigation.formMethod && loadingNavigation.formAction && loadingNavigation.formData && loadingNavigation.formEncType ? {\n formMethod: loadingNavigation.formMethod,\n formAction: loadingNavigation.formAction,\n formData: loadingNavigation.formData,\n formEncType: loadingNavigation.formEncType\n } : undefined;\n let [matchesToLoad, revalidatingFetchers] = getMatchesToLoad(state, matches, activeSubmission, location, isRevalidationRequired, cancelledDeferredRoutes, cancelledFetcherLoads, pendingActionData, pendingError, fetchLoadMatches); // Cancel pending deferreds for no-longer-matched routes or routes we're\n // about to reload. Note that if this is an action reload we would have\n // already cancelled all pending deferreds so this would be a no-op\n\n cancelActiveDeferreds(routeId => !(matches && matches.some(m => m.route.id === routeId)) || matchesToLoad && matchesToLoad.some(m => m.route.id === routeId)); // Short circuit if we have no loaders to run\n\n if (matchesToLoad.length === 0 && revalidatingFetchers.length === 0) {\n completeNavigation(location, _extends({\n matches,\n loaderData: {},\n // Commit pending error if we're short circuiting\n errors: pendingError || null\n }, pendingActionData ? {\n actionData: pendingActionData\n } : {}));\n return {\n shortCircuited: true\n };\n } // If this is an uninterrupted revalidation, we remain in our current idle\n // state. If not, we need to switch to our loading state and load data,\n // preserving any new action data or existing action data (in the case of\n // a revalidation interrupting an actionReload)\n\n\n if (!isUninterruptedRevalidation) {\n revalidatingFetchers.forEach(_ref2 => {\n let [key] = _ref2;\n let fetcher = state.fetchers.get(key);\n let revalidatingFetcher = {\n state: \"loading\",\n data: fetcher && fetcher.data,\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined,\n \" _hasFetcherDoneAnything \": true\n };\n state.fetchers.set(key, revalidatingFetcher);\n });\n let actionData = pendingActionData || state.actionData;\n updateState(_extends({\n navigation: loadingNavigation\n }, actionData ? Object.keys(actionData).length === 0 ? {\n actionData: null\n } : {\n actionData\n } : {}, revalidatingFetchers.length > 0 ? {\n fetchers: new Map(state.fetchers)\n } : {}));\n }\n\n pendingNavigationLoadId = ++incrementingLoadId;\n revalidatingFetchers.forEach(_ref3 => {\n let [key] = _ref3;\n return fetchControllers.set(key, pendingNavigationController);\n });\n let {\n results,\n loaderResults,\n fetcherResults\n } = await callLoadersAndMaybeResolveData(state.matches, matches, matchesToLoad, revalidatingFetchers, request);\n\n if (request.signal.aborted) {\n return {\n shortCircuited: true\n };\n } // Clean up _after_ loaders have completed. Don't clean up if we short\n // circuited because fetchControllers would have been aborted and\n // reassigned to new controllers for the next navigation\n\n\n revalidatingFetchers.forEach(_ref4 => {\n let [key] = _ref4;\n return fetchControllers.delete(key);\n }); // If any loaders returned a redirect Response, start a new REPLACE navigation\n\n let redirect = findRedirect(results);\n\n if (redirect) {\n await startRedirectNavigation(state, redirect, {\n replace\n });\n return {\n shortCircuited: true\n };\n } // Process and commit output from loaders\n\n\n let {\n loaderData,\n errors\n } = processLoaderData(state, matches, matchesToLoad, loaderResults, pendingError, revalidatingFetchers, fetcherResults, activeDeferreds); // Wire up subscribers to update loaderData as promises settle\n\n activeDeferreds.forEach((deferredData, routeId) => {\n deferredData.subscribe(aborted => {\n // Note: No need to updateState here since the TrackedPromise on\n // loaderData is stable across resolve/reject\n // Remove this instance if we were aborted or if promises have settled\n if (aborted || deferredData.done) {\n activeDeferreds.delete(routeId);\n }\n });\n });\n markFetchRedirectsDone();\n let didAbortFetchLoads = abortStaleFetchLoads(pendingNavigationLoadId);\n return _extends({\n loaderData,\n errors\n }, didAbortFetchLoads || revalidatingFetchers.length > 0 ? {\n fetchers: new Map(state.fetchers)\n } : {});\n }\n\n function getFetcher(key) {\n return state.fetchers.get(key) || IDLE_FETCHER;\n } // Trigger a fetcher load/submit for the given fetcher key\n\n\n function fetch(key, routeId, href, opts) {\n if (isServer) {\n throw new Error(\"router.fetch() was called during the server render, but it shouldn't be. \" + \"You are likely calling a useFetcher() method in the body of your component. \" + \"Try moving it to a useEffect or a callback.\");\n }\n\n if (fetchControllers.has(key)) abortFetcher(key);\n let matches = matchRoutes(dataRoutes, href, init.basename);\n\n if (!matches) {\n setFetcherError(key, routeId, getInternalRouterError(404, {\n pathname: href\n }));\n return;\n }\n\n let {\n path,\n submission\n } = normalizeNavigateOptions(href, opts, true);\n let match = getTargetMatch(matches, path);\n\n if (submission && isMutationMethod(submission.formMethod)) {\n handleFetcherAction(key, routeId, path, match, matches, submission);\n return;\n } // Store off the match so we can call it's shouldRevalidate on subsequent\n // revalidations\n\n\n fetchLoadMatches.set(key, [path, match, matches]);\n handleFetcherLoader(key, routeId, path, match, matches, submission);\n } // Call the action for the matched fetcher.submit(), and then handle redirects,\n // errors, and revalidation\n\n\n async function handleFetcherAction(key, routeId, path, match, requestMatches, submission) {\n interruptActiveLoads();\n fetchLoadMatches.delete(key);\n\n if (!match.route.action) {\n let error = getInternalRouterError(405, {\n method: submission.formMethod,\n pathname: path,\n routeId: routeId\n });\n setFetcherError(key, routeId, error);\n return;\n } // Put this fetcher into it's submitting state\n\n\n let existingFetcher = state.fetchers.get(key);\n\n let fetcher = _extends({\n state: \"submitting\"\n }, submission, {\n data: existingFetcher && existingFetcher.data,\n \" _hasFetcherDoneAnything \": true\n });\n\n state.fetchers.set(key, fetcher);\n updateState({\n fetchers: new Map(state.fetchers)\n }); // Call the action for the fetcher\n\n let abortController = new AbortController();\n let fetchRequest = createClientSideRequest(path, abortController.signal, submission);\n fetchControllers.set(key, abortController);\n let actionResult = await callLoaderOrAction(\"action\", fetchRequest, match, requestMatches, router.basename);\n\n if (fetchRequest.signal.aborted) {\n // We can delete this so long as we weren't aborted by ou our own fetcher\n // re-submit which would have put _new_ controller is in fetchControllers\n if (fetchControllers.get(key) === abortController) {\n fetchControllers.delete(key);\n }\n\n return;\n }\n\n if (isRedirectResult(actionResult)) {\n fetchControllers.delete(key);\n fetchRedirectIds.add(key);\n\n let loadingFetcher = _extends({\n state: \"loading\"\n }, submission, {\n data: undefined,\n \" _hasFetcherDoneAnything \": true\n });\n\n state.fetchers.set(key, loadingFetcher);\n updateState({\n fetchers: new Map(state.fetchers)\n });\n return startRedirectNavigation(state, actionResult, {\n isFetchActionRedirect: true\n });\n } // Process any non-redirect errors thrown\n\n\n if (isErrorResult(actionResult)) {\n setFetcherError(key, routeId, actionResult.error);\n return;\n }\n\n if (isDeferredResult(actionResult)) {\n invariant(false, \"defer() is not supported in actions\");\n } // Start the data load for current matches, or the next location if we're\n // in the middle of a navigation\n\n\n let nextLocation = state.navigation.location || state.location;\n let revalidationRequest = createClientSideRequest(nextLocation, abortController.signal);\n let matches = state.navigation.state !== \"idle\" ? matchRoutes(dataRoutes, state.navigation.location, init.basename) : state.matches;\n invariant(matches, \"Didn't find any matches after fetcher action\");\n let loadId = ++incrementingLoadId;\n fetchReloadIds.set(key, loadId);\n\n let loadFetcher = _extends({\n state: \"loading\",\n data: actionResult.data\n }, submission, {\n \" _hasFetcherDoneAnything \": true\n });\n\n state.fetchers.set(key, loadFetcher);\n let [matchesToLoad, revalidatingFetchers] = getMatchesToLoad(state, matches, submission, nextLocation, isRevalidationRequired, cancelledDeferredRoutes, cancelledFetcherLoads, {\n [match.route.id]: actionResult.data\n }, undefined, // No need to send through errors since we short circuit above\n fetchLoadMatches); // Put all revalidating fetchers into the loading state, except for the\n // current fetcher which we want to keep in it's current loading state which\n // contains it's action submission info + action data\n\n revalidatingFetchers.filter(_ref5 => {\n let [staleKey] = _ref5;\n return staleKey !== key;\n }).forEach(_ref6 => {\n let [staleKey] = _ref6;\n let existingFetcher = state.fetchers.get(staleKey);\n let revalidatingFetcher = {\n state: \"loading\",\n data: existingFetcher && existingFetcher.data,\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined,\n \" _hasFetcherDoneAnything \": true\n };\n state.fetchers.set(staleKey, revalidatingFetcher);\n fetchControllers.set(staleKey, abortController);\n });\n updateState({\n fetchers: new Map(state.fetchers)\n });\n let {\n results,\n loaderResults,\n fetcherResults\n } = await callLoadersAndMaybeResolveData(state.matches, matches, matchesToLoad, revalidatingFetchers, revalidationRequest);\n\n if (abortController.signal.aborted) {\n return;\n }\n\n fetchReloadIds.delete(key);\n fetchControllers.delete(key);\n revalidatingFetchers.forEach(_ref7 => {\n let [staleKey] = _ref7;\n return fetchControllers.delete(staleKey);\n });\n let redirect = findRedirect(results);\n\n if (redirect) {\n return startRedirectNavigation(state, redirect);\n } // Process and commit output from loaders\n\n\n let {\n loaderData,\n errors\n } = processLoaderData(state, state.matches, matchesToLoad, loaderResults, undefined, revalidatingFetchers, fetcherResults, activeDeferreds);\n let doneFetcher = {\n state: \"idle\",\n data: actionResult.data,\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined,\n \" _hasFetcherDoneAnything \": true\n };\n state.fetchers.set(key, doneFetcher);\n let didAbortFetchLoads = abortStaleFetchLoads(loadId); // If we are currently in a navigation loading state and this fetcher is\n // more recent than the navigation, we want the newer data so abort the\n // navigation and complete it with the fetcher data\n\n if (state.navigation.state === \"loading\" && loadId > pendingNavigationLoadId) {\n invariant(pendingAction, \"Expected pending action\");\n pendingNavigationController && pendingNavigationController.abort();\n completeNavigation(state.navigation.location, {\n matches,\n loaderData,\n errors,\n fetchers: new Map(state.fetchers)\n });\n } else {\n // otherwise just update with the fetcher data, preserving any existing\n // loaderData for loaders that did not need to reload. We have to\n // manually merge here since we aren't going through completeNavigation\n updateState(_extends({\n errors,\n loaderData: mergeLoaderData(state.loaderData, loaderData, matches, errors)\n }, didAbortFetchLoads ? {\n fetchers: new Map(state.fetchers)\n } : {}));\n isRevalidationRequired = false;\n }\n } // Call the matched loader for fetcher.load(), handling redirects, errors, etc.\n\n\n async function handleFetcherLoader(key, routeId, path, match, matches, submission) {\n let existingFetcher = state.fetchers.get(key); // Put this fetcher into it's loading state\n\n let loadingFetcher = _extends({\n state: \"loading\",\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined\n }, submission, {\n data: existingFetcher && existingFetcher.data,\n \" _hasFetcherDoneAnything \": true\n });\n\n state.fetchers.set(key, loadingFetcher);\n updateState({\n fetchers: new Map(state.fetchers)\n }); // Call the loader for this fetcher route match\n\n let abortController = new AbortController();\n let fetchRequest = createClientSideRequest(path, abortController.signal);\n fetchControllers.set(key, abortController);\n let result = await callLoaderOrAction(\"loader\", fetchRequest, match, matches, router.basename); // Deferred isn't supported or fetcher loads, await everything and treat it\n // as a normal load. resolveDeferredData will return undefined if this\n // fetcher gets aborted, so we just leave result untouched and short circuit\n // below if that happens\n\n if (isDeferredResult(result)) {\n result = (await resolveDeferredData(result, fetchRequest.signal, true)) || result;\n } // We can delete this so long as we weren't aborted by ou our own fetcher\n // re-load which would have put _new_ controller is in fetchControllers\n\n\n if (fetchControllers.get(key) === abortController) {\n fetchControllers.delete(key);\n }\n\n if (fetchRequest.signal.aborted) {\n return;\n } // If the loader threw a redirect Response, start a new REPLACE navigation\n\n\n if (isRedirectResult(result)) {\n await startRedirectNavigation(state, result);\n return;\n } // Process any non-redirect errors thrown\n\n\n if (isErrorResult(result)) {\n let boundaryMatch = findNearestBoundary(state.matches, routeId);\n state.fetchers.delete(key); // TODO: In remix, this would reset to IDLE_NAVIGATION if it was a catch -\n // do we need to behave any differently with our non-redirect errors?\n // What if it was a non-redirect Response?\n\n updateState({\n fetchers: new Map(state.fetchers),\n errors: {\n [boundaryMatch.route.id]: result.error\n }\n });\n return;\n }\n\n invariant(!isDeferredResult(result), \"Unhandled fetcher deferred data\"); // Put the fetcher back into an idle state\n\n let doneFetcher = {\n state: \"idle\",\n data: result.data,\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined,\n \" _hasFetcherDoneAnything \": true\n };\n state.fetchers.set(key, doneFetcher);\n updateState({\n fetchers: new Map(state.fetchers)\n });\n }\n /**\n * Utility function to handle redirects returned from an action or loader.\n * Normally, a redirect \"replaces\" the navigation that triggered it. So, for\n * example:\n *\n * - user is on /a\n * - user clicks a link to /b\n * - loader for /b redirects to /c\n *\n * In a non-JS app the browser would track the in-flight navigation to /b and\n * then replace it with /c when it encountered the redirect response. In\n * the end it would only ever update the URL bar with /c.\n *\n * In client-side routing using pushState/replaceState, we aim to emulate\n * this behavior and we also do not update history until the end of the\n * navigation (including processed redirects). This means that we never\n * actually touch history until we've processed redirects, so we just use\n * the history action from the original navigation (PUSH or REPLACE).\n */\n\n\n async function startRedirectNavigation(state, redirect, _temp) {\n var _window;\n\n let {\n submission,\n replace,\n isFetchActionRedirect\n } = _temp === void 0 ? {} : _temp;\n\n if (redirect.revalidate) {\n isRevalidationRequired = true;\n }\n\n let redirectLocation = createLocation(state.location, redirect.location, // TODO: This can be removed once we get rid of useTransition in Remix v2\n _extends({\n _isRedirect: true\n }, isFetchActionRedirect ? {\n _isFetchActionRedirect: true\n } : {}));\n invariant(redirectLocation, \"Expected a location on the redirect navigation\"); // Check if this an external redirect that goes to a new origin\n\n if (typeof ((_window = window) == null ? void 0 : _window.location) !== \"undefined\") {\n let newOrigin = createClientSideURL(redirect.location).origin;\n\n if (window.location.origin !== newOrigin) {\n if (replace) {\n window.location.replace(redirect.location);\n } else {\n window.location.assign(redirect.location);\n }\n\n return;\n }\n } // There's no need to abort on redirects, since we don't detect the\n // redirect until the action/loaders have settled\n\n\n pendingNavigationController = null;\n let redirectHistoryAction = replace === true ? Action.Replace : Action.Push; // Use the incoming submission if provided, fallback on the active one in\n // state.navigation\n\n let {\n formMethod,\n formAction,\n formEncType,\n formData\n } = state.navigation;\n\n if (!submission && formMethod && formAction && formData && formEncType) {\n submission = {\n formMethod,\n formAction,\n formEncType,\n formData\n };\n } // If this was a 307/308 submission we want to preserve the HTTP method and\n // re-submit the GET/POST/PUT/PATCH/DELETE as a submission navigation to the\n // redirected location\n\n\n if (redirectPreserveMethodStatusCodes.has(redirect.status) && submission && isMutationMethod(submission.formMethod)) {\n await startNavigation(redirectHistoryAction, redirectLocation, {\n submission: _extends({}, submission, {\n formAction: redirect.location\n })\n });\n } else {\n // Otherwise, we kick off a new loading navigation, preserving the\n // submission info for the duration of this navigation\n await startNavigation(redirectHistoryAction, redirectLocation, {\n overrideNavigation: {\n state: \"loading\",\n location: redirectLocation,\n formMethod: submission ? submission.formMethod : undefined,\n formAction: submission ? submission.formAction : undefined,\n formEncType: submission ? submission.formEncType : undefined,\n formData: submission ? submission.formData : undefined\n }\n });\n }\n }\n\n async function callLoadersAndMaybeResolveData(currentMatches, matches, matchesToLoad, fetchersToLoad, request) {\n // Call all navigation loaders and revalidating fetcher loaders in parallel,\n // then slice off the results into separate arrays so we can handle them\n // accordingly\n let results = await Promise.all([...matchesToLoad.map(match => callLoaderOrAction(\"loader\", request, match, matches, router.basename)), ...fetchersToLoad.map(_ref8 => {\n let [, href, match, fetchMatches] = _ref8;\n return callLoaderOrAction(\"loader\", createClientSideRequest(href, request.signal), match, fetchMatches, router.basename);\n })]);\n let loaderResults = results.slice(0, matchesToLoad.length);\n let fetcherResults = results.slice(matchesToLoad.length);\n await Promise.all([resolveDeferredResults(currentMatches, matchesToLoad, loaderResults, request.signal, false, state.loaderData), resolveDeferredResults(currentMatches, fetchersToLoad.map(_ref9 => {\n let [,, match] = _ref9;\n return match;\n }), fetcherResults, request.signal, true)]);\n return {\n results,\n loaderResults,\n fetcherResults\n };\n }\n\n function interruptActiveLoads() {\n // Every interruption triggers a revalidation\n isRevalidationRequired = true; // Cancel pending route-level deferreds and mark cancelled routes for\n // revalidation\n\n cancelledDeferredRoutes.push(...cancelActiveDeferreds()); // Abort in-flight fetcher loads\n\n fetchLoadMatches.forEach((_, key) => {\n if (fetchControllers.has(key)) {\n cancelledFetcherLoads.push(key);\n abortFetcher(key);\n }\n });\n }\n\n function setFetcherError(key, routeId, error) {\n let boundaryMatch = findNearestBoundary(state.matches, routeId);\n deleteFetcher(key);\n updateState({\n errors: {\n [boundaryMatch.route.id]: error\n },\n fetchers: new Map(state.fetchers)\n });\n }\n\n function deleteFetcher(key) {\n if (fetchControllers.has(key)) abortFetcher(key);\n fetchLoadMatches.delete(key);\n fetchReloadIds.delete(key);\n fetchRedirectIds.delete(key);\n state.fetchers.delete(key);\n }\n\n function abortFetcher(key) {\n let controller = fetchControllers.get(key);\n invariant(controller, \"Expected fetch controller: \" + key);\n controller.abort();\n fetchControllers.delete(key);\n }\n\n function markFetchersDone(keys) {\n for (let key of keys) {\n let fetcher = getFetcher(key);\n let doneFetcher = {\n state: \"idle\",\n data: fetcher.data,\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined,\n \" _hasFetcherDoneAnything \": true\n };\n state.fetchers.set(key, doneFetcher);\n }\n }\n\n function markFetchRedirectsDone() {\n let doneKeys = [];\n\n for (let key of fetchRedirectIds) {\n let fetcher = state.fetchers.get(key);\n invariant(fetcher, \"Expected fetcher: \" + key);\n\n if (fetcher.state === \"loading\") {\n fetchRedirectIds.delete(key);\n doneKeys.push(key);\n }\n }\n\n markFetchersDone(doneKeys);\n }\n\n function abortStaleFetchLoads(landedId) {\n let yeetedKeys = [];\n\n for (let [key, id] of fetchReloadIds) {\n if (id < landedId) {\n let fetcher = state.fetchers.get(key);\n invariant(fetcher, \"Expected fetcher: \" + key);\n\n if (fetcher.state === \"loading\") {\n abortFetcher(key);\n fetchReloadIds.delete(key);\n yeetedKeys.push(key);\n }\n }\n }\n\n markFetchersDone(yeetedKeys);\n return yeetedKeys.length > 0;\n }\n\n function cancelActiveDeferreds(predicate) {\n let cancelledRouteIds = [];\n activeDeferreds.forEach((dfd, routeId) => {\n if (!predicate || predicate(routeId)) {\n // Cancel the deferred - but do not remove from activeDeferreds here -\n // we rely on the subscribers to do that so our tests can assert proper\n // cleanup via _internalActiveDeferreds\n dfd.cancel();\n cancelledRouteIds.push(routeId);\n activeDeferreds.delete(routeId);\n }\n });\n return cancelledRouteIds;\n } // Opt in to capturing and reporting scroll positions during navigations,\n // used by the <ScrollRestoration> component\n\n\n function enableScrollRestoration(positions, getPosition, getKey) {\n savedScrollPositions = positions;\n getScrollPosition = getPosition;\n\n getScrollRestorationKey = getKey || (location => location.key); // Perform initial hydration scroll restoration, since we miss the boat on\n // the initial updateState() because we've not yet rendered <ScrollRestoration/>\n // and therefore have no savedScrollPositions available\n\n\n if (!initialScrollRestored && state.navigation === IDLE_NAVIGATION) {\n initialScrollRestored = true;\n let y = getSavedScrollPosition(state.location, state.matches);\n\n if (y != null) {\n updateState({\n restoreScrollPosition: y\n });\n }\n }\n\n return () => {\n savedScrollPositions = null;\n getScrollPosition = null;\n getScrollRestorationKey = null;\n };\n }\n\n function saveScrollPosition(location, matches) {\n if (savedScrollPositions && getScrollRestorationKey && getScrollPosition) {\n let userMatches = matches.map(m => createUseMatchesMatch(m, state.loaderData));\n let key = getScrollRestorationKey(location, userMatches) || location.key;\n savedScrollPositions[key] = getScrollPosition();\n }\n }\n\n function getSavedScrollPosition(location, matches) {\n if (savedScrollPositions && getScrollRestorationKey && getScrollPosition) {\n let userMatches = matches.map(m => createUseMatchesMatch(m, state.loaderData));\n let key = getScrollRestorationKey(location, userMatches) || location.key;\n let y = savedScrollPositions[key];\n\n if (typeof y === \"number\") {\n return y;\n }\n }\n\n return null;\n }\n\n router = {\n get basename() {\n return init.basename;\n },\n\n get state() {\n return state;\n },\n\n get routes() {\n return dataRoutes;\n },\n\n initialize,\n subscribe,\n enableScrollRestoration,\n navigate,\n fetch,\n revalidate,\n // Passthrough to history-aware createHref used by useHref so we get proper\n // hash-aware URLs in DOM paths\n createHref: to => init.history.createHref(to),\n encodeLocation: to => init.history.encodeLocation(to),\n getFetcher,\n deleteFetcher,\n dispose,\n _internalFetchControllers: fetchControllers,\n _internalActiveDeferreds: activeDeferreds\n };\n return router;\n} //#endregion\n////////////////////////////////////////////////////////////////////////////////\n//#region createStaticHandler\n////////////////////////////////////////////////////////////////////////////////\n\nfunction createStaticHandler(routes, opts) {\n invariant(routes.length > 0, \"You must provide a non-empty routes array to createStaticHandler\");\n let dataRoutes = convertRoutesToDataRoutes(routes);\n let basename = (opts ? opts.basename : null) || \"/\";\n /**\n * The query() method is intended for document requests, in which we want to\n * call an optional action and potentially multiple loaders for all nested\n * routes. It returns a StaticHandlerContext object, which is very similar\n * to the router state (location, loaderData, actionData, errors, etc.) and\n * also adds SSR-specific information such as the statusCode and headers\n * from action/loaders Responses.\n *\n * It _should_ never throw and should report all errors through the\n * returned context.errors object, properly associating errors to their error\n * boundary. Additionally, it tracks _deepestRenderedBoundaryId which can be\n * used to emulate React error boundaries during SSr by performing a second\n * pass only down to the boundaryId.\n *\n * The one exception where we do not return a StaticHandlerContext is when a\n * redirect response is returned or thrown from any action/loader. We\n * propagate that out and return the raw Response so the HTTP server can\n * return it directly.\n */\n\n async function query(request, _temp2) {\n let {\n requestContext\n } = _temp2 === void 0 ? {} : _temp2;\n let url = new URL(request.url);\n let method = request.method.toLowerCase();\n let location = createLocation(\"\", createPath(url), null, \"default\");\n let matches = matchRoutes(dataRoutes, location, basename); // SSR supports HEAD requests while SPA doesn't\n\n if (!isValidMethod(method) && method !== \"head\") {\n let error = getInternalRouterError(405, {\n method\n });\n let {\n matches: methodNotAllowedMatches,\n route\n } = getShortCircuitMatches(dataRoutes);\n return {\n basename,\n location,\n matches: methodNotAllowedMatches,\n loaderData: {},\n actionData: null,\n errors: {\n [route.id]: error\n },\n statusCode: error.status,\n loaderHeaders: {},\n actionHeaders: {}\n };\n } else if (!matches) {\n let error = getInternalRouterError(404, {\n pathname: location.pathname\n });\n let {\n matches: notFoundMatches,\n route\n } = getShortCircuitMatches(dataRoutes);\n return {\n basename,\n location,\n matches: notFoundMatches,\n loaderData: {},\n actionData: null,\n errors: {\n [route.id]: error\n },\n statusCode: error.status,\n loaderHeaders: {},\n actionHeaders: {}\n };\n }\n\n let result = await queryImpl(request, location, matches, requestContext);\n\n if (isResponse(result)) {\n return result;\n } // When returning StaticHandlerContext, we patch back in the location here\n // since we need it for React Context. But this helps keep our submit and\n // loadRouteData operating on a Request instead of a Location\n\n\n return _extends({\n location,\n basename\n }, result);\n }\n /**\n * The queryRoute() method is intended for targeted route requests, either\n * for fetch ?_data requests or resource route requests. In this case, we\n * are only ever calling a single action or loader, and we are returning the\n * returned value directly. In most cases, this will be a Response returned\n * from the action/loader, but it may be a primitive or other value as well -\n * and in such cases the calling context should handle that accordingly.\n *\n * We do respect the throw/return differentiation, so if an action/loader\n * throws, then this method will throw the value. This is important so we\n * can do proper boundary identification in Remix where a thrown Response\n * must go to the Catch Boundary but a returned Response is happy-path.\n *\n * One thing to note is that any Router-initiated Errors that make sense\n * to associate with a status code will be thrown as an ErrorResponse\n * instance which include the raw Error, such that the calling context can\n * serialize the error as they see fit while including the proper response\n * code. Examples here are 404 and 405 errors that occur prior to reaching\n * any user-defined loaders.\n */\n\n\n async function queryRoute(request, _temp3) {\n let {\n routeId,\n requestContext\n } = _temp3 === void 0 ? {} : _temp3;\n let url = new URL(request.url);\n let method = request.method.toLowerCase();\n let location = createLocation(\"\", createPath(url), null, \"default\");\n let matches = matchRoutes(dataRoutes, location, basename); // SSR supports HEAD requests while SPA doesn't\n\n if (!isValidMethod(method) && method !== \"head\") {\n throw getInternalRouterError(405, {\n method\n });\n } else if (!matches) {\n throw getInternalRouterError(404, {\n pathname: location.pathname\n });\n }\n\n let match = routeId ? matches.find(m => m.route.id === routeId) : getTargetMatch(matches, location);\n\n if (routeId && !match) {\n throw getInternalRouterError(403, {\n pathname: location.pathname,\n routeId\n });\n } else if (!match) {\n // This should never hit I don't think?\n throw getInternalRouterError(404, {\n pathname: location.pathname\n });\n }\n\n let result = await queryImpl(request, location, matches, requestContext, match);\n\n if (isResponse(result)) {\n return result;\n }\n\n let error = result.errors ? Object.values(result.errors)[0] : undefined;\n\n if (error !== undefined) {\n // If we got back result.errors, that means the loader/action threw\n // _something_ that wasn't a Response, but it's not guaranteed/required\n // to be an `instanceof Error` either, so we have to use throw here to\n // preserve the \"error\" state outside of queryImpl.\n throw error;\n } // Pick off the right state value to return\n\n\n let routeData = [result.actionData, result.loaderData].find(v => v);\n return Object.values(routeData || {})[0];\n }\n\n async function queryImpl(request, location, matches, requestContext, routeMatch) {\n invariant(request.signal, \"query()/queryRoute() requests must contain an AbortController signal\");\n\n try {\n if (isMutationMethod(request.method.toLowerCase())) {\n let result = await submit(request, matches, routeMatch || getTargetMatch(matches, location), requestContext, routeMatch != null);\n return result;\n }\n\n let result = await loadRouteData(request, matches, requestContext, routeMatch);\n return isResponse(result) ? result : _extends({}, result, {\n actionData: null,\n actionHeaders: {}\n });\n } catch (e) {\n // If the user threw/returned a Response in callLoaderOrAction, we throw\n // it to bail out and then return or throw here based on whether the user\n // returned or threw\n if (isQueryRouteResponse(e)) {\n if (e.type === ResultType.error && !isRedirectResponse(e.response)) {\n throw e.response;\n }\n\n return e.response;\n } // Redirects are always returned since they don't propagate to catch\n // boundaries\n\n\n if (isRedirectResponse(e)) {\n return e;\n }\n\n throw e;\n }\n }\n\n async function submit(request, matches, actionMatch, requestContext, isRouteRequest) {\n let result;\n\n if (!actionMatch.route.action) {\n let error = getInternalRouterError(405, {\n method: request.method,\n pathname: new URL(request.url).pathname,\n routeId: actionMatch.route.id\n });\n\n if (isRouteRequest) {\n throw error;\n }\n\n result = {\n type: ResultType.error,\n error\n };\n } else {\n result = await callLoaderOrAction(\"action\", request, actionMatch, matches, basename, true, isRouteRequest, requestContext);\n\n if (request.signal.aborted) {\n let method = isRouteRequest ? \"queryRoute\" : \"query\";\n throw new Error(method + \"() call aborted\");\n }\n }\n\n if (isRedirectResult(result)) {\n // Uhhhh - this should never happen, we should always throw these from\n // callLoaderOrAction, but the type narrowing here keeps TS happy and we\n // can get back on the \"throw all redirect responses\" train here should\n // this ever happen :/\n throw new Response(null, {\n status: result.status,\n headers: {\n Location: result.location\n }\n });\n }\n\n if (isDeferredResult(result)) {\n throw new Error(\"defer() is not supported in actions\");\n }\n\n if (isRouteRequest) {\n // Note: This should only be non-Response values if we get here, since\n // isRouteRequest should throw any Response received in callLoaderOrAction\n if (isErrorResult(result)) {\n throw result.error;\n }\n\n return {\n matches: [actionMatch],\n loaderData: {},\n actionData: {\n [actionMatch.route.id]: result.data\n },\n errors: null,\n // Note: statusCode + headers are unused here since queryRoute will\n // return the raw Response or value\n statusCode: 200,\n loaderHeaders: {},\n actionHeaders: {}\n };\n }\n\n if (isErrorResult(result)) {\n // Store off the pending error - we use it to determine which loaders\n // to call and will commit it when we complete the navigation\n let boundaryMatch = findNearestBoundary(matches, actionMatch.route.id);\n let context = await loadRouteData(request, matches, requestContext, undefined, {\n [boundaryMatch.route.id]: result.error\n }); // action status codes take precedence over loader status codes\n\n return _extends({}, context, {\n statusCode: isRouteErrorResponse(result.error) ? result.error.status : 500,\n actionData: null,\n actionHeaders: _extends({}, result.headers ? {\n [actionMatch.route.id]: result.headers\n } : {})\n });\n } // Create a GET request for the loaders\n\n\n let loaderRequest = new Request(request.url, {\n headers: request.headers,\n redirect: request.redirect,\n signal: request.signal\n });\n let context = await loadRouteData(loaderRequest, matches, requestContext);\n return _extends({}, context, result.statusCode ? {\n statusCode: result.statusCode\n } : {}, {\n actionData: {\n [actionMatch.route.id]: result.data\n },\n actionHeaders: _extends({}, result.headers ? {\n [actionMatch.route.id]: result.headers\n } : {})\n });\n }\n\n async function loadRouteData(request, matches, requestContext, routeMatch, pendingActionError) {\n let isRouteRequest = routeMatch != null; // Short circuit if we have no loaders to run (queryRoute())\n\n if (isRouteRequest && !(routeMatch != null && routeMatch.route.loader)) {\n throw getInternalRouterError(400, {\n method: request.method,\n pathname: new URL(request.url).pathname,\n routeId: routeMatch == null ? void 0 : routeMatch.route.id\n });\n }\n\n let requestMatches = routeMatch ? [routeMatch] : getLoaderMatchesUntilBoundary(matches, Object.keys(pendingActionError || {})[0]);\n let matchesToLoad = requestMatches.filter(m => m.route.loader); // Short circuit if we have no loaders to run (query())\n\n if (matchesToLoad.length === 0) {\n return {\n matches,\n // Add a null for all matched routes for proper revalidation on the client\n loaderData: matches.reduce((acc, m) => Object.assign(acc, {\n [m.route.id]: null\n }), {}),\n errors: pendingActionError || null,\n statusCode: 200,\n loaderHeaders: {}\n };\n }\n\n let results = await Promise.all([...matchesToLoad.map(match => callLoaderOrAction(\"loader\", request, match, matches, basename, true, isRouteRequest, requestContext))]);\n\n if (request.signal.aborted) {\n let method = isRouteRequest ? \"queryRoute\" : \"query\";\n throw new Error(method + \"() call aborted\");\n }\n\n let executedLoaders = new Set();\n results.forEach((result, i) => {\n executedLoaders.add(matchesToLoad[i].route.id); // Can't do anything with these without the Remix side of things, so just\n // cancel them for now\n\n if (isDeferredResult(result)) {\n result.deferredData.cancel();\n }\n }); // Process and commit output from loaders\n\n let context = processRouteLoaderData(matches, matchesToLoad, results, pendingActionError); // Add a null for any non-loader matches for proper revalidation on the client\n\n matches.forEach(match => {\n if (!executedLoaders.has(match.route.id)) {\n context.loaderData[match.route.id] = null;\n }\n });\n return _extends({}, context, {\n matches\n });\n }\n\n return {\n dataRoutes,\n query,\n queryRoute\n };\n} //#endregion\n////////////////////////////////////////////////////////////////////////////////\n//#region Helpers\n////////////////////////////////////////////////////////////////////////////////\n\n/**\n * Given an existing StaticHandlerContext and an error thrown at render time,\n * provide an updated StaticHandlerContext suitable for a second SSR render\n */\n\nfunction getStaticContextFromError(routes, context, error) {\n let newContext = _extends({}, context, {\n statusCode: 500,\n errors: {\n [context._deepestRenderedBoundaryId || routes[0].id]: error\n }\n });\n\n return newContext;\n}\n\nfunction isSubmissionNavigation(opts) {\n return opts != null && \"formData\" in opts;\n} // Normalize navigation options by converting formMethod=GET formData objects to\n// URLSearchParams so they behave identically to links with query params\n\n\nfunction normalizeNavigateOptions(to, opts, isFetcher) {\n if (isFetcher === void 0) {\n isFetcher = false;\n }\n\n let path = typeof to === \"string\" ? to : createPath(to); // Return location verbatim on non-submission navigations\n\n if (!opts || !isSubmissionNavigation(opts)) {\n return {\n path\n };\n }\n\n if (opts.formMethod && !isValidMethod(opts.formMethod)) {\n return {\n path,\n error: getInternalRouterError(405, {\n method: opts.formMethod\n })\n };\n } // Create a Submission on non-GET navigations\n\n\n let submission;\n\n if (opts.formData) {\n submission = {\n formMethod: opts.formMethod || \"get\",\n formAction: stripHashFromPath(path),\n formEncType: opts && opts.formEncType || \"application/x-www-form-urlencoded\",\n formData: opts.formData\n };\n\n if (isMutationMethod(submission.formMethod)) {\n return {\n path,\n submission\n };\n }\n } // Flatten submission onto URLSearchParams for GET submissions\n\n\n let parsedPath = parsePath(path);\n\n try {\n let searchParams = convertFormDataToSearchParams(opts.formData); // Since fetcher GET submissions only run a single loader (as opposed to\n // navigation GET submissions which run all loaders), we need to preserve\n // any incoming ?index params\n\n if (isFetcher && parsedPath.search && hasNakedIndexQuery(parsedPath.search)) {\n searchParams.append(\"index\", \"\");\n }\n\n parsedPath.search = \"?\" + searchParams;\n } catch (e) {\n return {\n path,\n error: getInternalRouterError(400)\n };\n }\n\n return {\n path: createPath(parsedPath),\n submission\n };\n} // Filter out all routes below any caught error as they aren't going to\n// render so we don't need to load them\n\n\nfunction getLoaderMatchesUntilBoundary(matches, boundaryId) {\n let boundaryMatches = matches;\n\n if (boundaryId) {\n let index = matches.findIndex(m => m.route.id === boundaryId);\n\n if (index >= 0) {\n boundaryMatches = matches.slice(0, index);\n }\n }\n\n return boundaryMatches;\n}\n\nfunction getMatchesToLoad(state, matches, submission, location, isRevalidationRequired, cancelledDeferredRoutes, cancelledFetcherLoads, pendingActionData, pendingError, fetchLoadMatches) {\n let actionResult = pendingError ? Object.values(pendingError)[0] : pendingActionData ? Object.values(pendingActionData)[0] : undefined; // Pick navigation matches that are net-new or qualify for revalidation\n\n let boundaryId = pendingError ? Object.keys(pendingError)[0] : undefined;\n let boundaryMatches = getLoaderMatchesUntilBoundary(matches, boundaryId);\n let navigationMatches = boundaryMatches.filter((match, index) => match.route.loader != null && (isNewLoader(state.loaderData, state.matches[index], match) || // If this route had a pending deferred cancelled it must be revalidated\n cancelledDeferredRoutes.some(id => id === match.route.id) || shouldRevalidateLoader(state.location, state.matches[index], submission, location, match, isRevalidationRequired, actionResult))); // Pick fetcher.loads that need to be revalidated\n\n let revalidatingFetchers = [];\n fetchLoadMatches && fetchLoadMatches.forEach((_ref10, key) => {\n let [href, match, fetchMatches] = _ref10;\n\n // This fetcher was cancelled from a prior action submission - force reload\n if (cancelledFetcherLoads.includes(key)) {\n revalidatingFetchers.push([key, href, match, fetchMatches]);\n } else if (isRevalidationRequired) {\n let shouldRevalidate = shouldRevalidateLoader(href, match, submission, href, match, isRevalidationRequired, actionResult);\n\n if (shouldRevalidate) {\n revalidatingFetchers.push([key, href, match, fetchMatches]);\n }\n }\n });\n return [navigationMatches, revalidatingFetchers];\n}\n\nfunction isNewLoader(currentLoaderData, currentMatch, match) {\n let isNew = // [a] -> [a, b]\n !currentMatch || // [a, b] -> [a, c]\n match.route.id !== currentMatch.route.id; // Handle the case that we don't have data for a re-used route, potentially\n // from a prior error or from a cancelled pending deferred\n\n let isMissingData = currentLoaderData[match.route.id] === undefined; // Always load if this is a net-new route or we don't yet have data\n\n return isNew || isMissingData;\n}\n\nfunction isNewRouteInstance(currentMatch, match) {\n let currentPath = currentMatch.route.path;\n return (// param change for this match, /users/123 -> /users/456\n currentMatch.pathname !== match.pathname || // splat param changed, which is not present in match.path\n // e.g. /files/images/avatar.jpg -> files/finances.xls\n currentPath && currentPath.endsWith(\"*\") && currentMatch.params[\"*\"] !== match.params[\"*\"]\n );\n}\n\nfunction shouldRevalidateLoader(currentLocation, currentMatch, submission, location, match, isRevalidationRequired, actionResult) {\n let currentUrl = createClientSideURL(currentLocation);\n let currentParams = currentMatch.params;\n let nextUrl = createClientSideURL(location);\n let nextParams = match.params; // This is the default implementation as to when we revalidate. If the route\n // provides it's own implementation, then we give them full control but\n // provide this value so they can leverage it if needed after they check\n // their own specific use cases\n // Note that fetchers always provide the same current/next locations so the\n // URL-based checks here don't apply to fetcher shouldRevalidate calls\n\n let defaultShouldRevalidate = isNewRouteInstance(currentMatch, match) || // Clicked the same link, resubmitted a GET form\n currentUrl.toString() === nextUrl.toString() || // Search params affect all loaders\n currentUrl.search !== nextUrl.search || // Forced revalidation due to submission, useRevalidate, or X-Remix-Revalidate\n isRevalidationRequired;\n\n if (match.route.shouldRevalidate) {\n let routeChoice = match.route.shouldRevalidate(_extends({\n currentUrl,\n currentParams,\n nextUrl,\n nextParams\n }, submission, {\n actionResult,\n defaultShouldRevalidate\n }));\n\n if (typeof routeChoice === \"boolean\") {\n return routeChoice;\n }\n }\n\n return defaultShouldRevalidate;\n}\n\nasync function callLoaderOrAction(type, request, match, matches, basename, isStaticRequest, isRouteRequest, requestContext) {\n if (basename === void 0) {\n basename = \"/\";\n }\n\n if (isStaticRequest === void 0) {\n isStaticRequest = false;\n }\n\n if (isRouteRequest === void 0) {\n isRouteRequest = false;\n }\n\n let resultType;\n let result; // Setup a promise we can race against so that abort signals short circuit\n\n let reject;\n let abortPromise = new Promise((_, r) => reject = r);\n\n let onReject = () => reject();\n\n request.signal.addEventListener(\"abort\", onReject);\n\n try {\n let handler = match.route[type];\n invariant(handler, \"Could not find the \" + type + \" to run on the \\\"\" + match.route.id + \"\\\" route\");\n result = await Promise.race([handler({\n request,\n params: match.params,\n context: requestContext\n }), abortPromise]);\n invariant(result !== undefined, \"You defined \" + (type === \"action\" ? \"an action\" : \"a loader\") + \" for route \" + (\"\\\"\" + match.route.id + \"\\\" but didn't return anything from your `\" + type + \"` \") + \"function. Please return a value or `null`.\");\n } catch (e) {\n resultType = ResultType.error;\n result = e;\n } finally {\n request.signal.removeEventListener(\"abort\", onReject);\n }\n\n if (isResponse(result)) {\n let status = result.status; // Process redirects\n\n if (redirectStatusCodes.has(status)) {\n let location = result.headers.get(\"Location\");\n invariant(location, \"Redirects returned/thrown from loaders/actions must have a Location header\");\n let isAbsolute = /^[a-z+]+:\\/\\//i.test(location) || location.startsWith(\"//\"); // Support relative routing in internal redirects\n\n if (!isAbsolute) {\n let activeMatches = matches.slice(0, matches.indexOf(match) + 1);\n let routePathnames = getPathContributingMatches(activeMatches).map(match => match.pathnameBase);\n let resolvedLocation = resolveTo(location, routePathnames, new URL(request.url).pathname);\n invariant(createPath(resolvedLocation), \"Unable to resolve redirect location: \" + location); // Prepend the basename to the redirect location if we have one\n\n if (basename) {\n let path = resolvedLocation.pathname;\n resolvedLocation.pathname = path === \"/\" ? basename : joinPaths([basename, path]);\n }\n\n location = createPath(resolvedLocation);\n } // Don't process redirects in the router during static requests requests.\n // Instead, throw the Response and let the server handle it with an HTTP\n // redirect. We also update the Location header in place in this flow so\n // basename and relative routing is taken into account\n\n\n if (isStaticRequest) {\n result.headers.set(\"Location\", location);\n throw result;\n }\n\n return {\n type: ResultType.redirect,\n status,\n location,\n revalidate: result.headers.get(\"X-Remix-Revalidate\") !== null\n };\n } // For SSR single-route requests, we want to hand Responses back directly\n // without unwrapping. We do this with the QueryRouteResponse wrapper\n // interface so we can know whether it was returned or thrown\n\n\n if (isRouteRequest) {\n // eslint-disable-next-line no-throw-literal\n throw {\n type: resultType || ResultType.data,\n response: result\n };\n }\n\n let data;\n let contentType = result.headers.get(\"Content-Type\"); // Check between word boundaries instead of startsWith() due to the last\n // paragraph of https://httpwg.org/specs/rfc9110.html#field.content-type\n\n if (contentType && /\\bapplication\\/json\\b/.test(contentType)) {\n data = await result.json();\n } else {\n data = await result.text();\n }\n\n if (resultType === ResultType.error) {\n return {\n type: resultType,\n error: new ErrorResponse(status, result.statusText, data),\n headers: result.headers\n };\n }\n\n return {\n type: ResultType.data,\n data,\n statusCode: result.status,\n headers: result.headers\n };\n }\n\n if (resultType === ResultType.error) {\n return {\n type: resultType,\n error: result\n };\n }\n\n if (result instanceof DeferredData) {\n return {\n type: ResultType.deferred,\n deferredData: result\n };\n }\n\n return {\n type: ResultType.data,\n data: result\n };\n} // Utility method for creating the Request instances for loaders/actions during\n// client-side navigations and fetches. During SSR we will always have a\n// Request instance from the static handler (query/queryRoute)\n\n\nfunction createClientSideRequest(location, signal, submission) {\n let url = createClientSideURL(stripHashFromPath(location)).toString();\n let init = {\n signal\n };\n\n if (submission && isMutationMethod(submission.formMethod)) {\n let {\n formMethod,\n formEncType,\n formData\n } = submission;\n init.method = formMethod.toUpperCase();\n init.body = formEncType === \"application/x-www-form-urlencoded\" ? convertFormDataToSearchParams(formData) : formData;\n } // Content-Type is inferred (https://fetch.spec.whatwg.org/#dom-request)\n\n\n return new Request(url, init);\n}\n\nfunction convertFormDataToSearchParams(formData) {\n let searchParams = new URLSearchParams();\n\n for (let [key, value] of formData.entries()) {\n invariant(typeof value === \"string\", 'File inputs are not supported with encType \"application/x-www-form-urlencoded\", ' + 'please use \"multipart/form-data\" instead.');\n searchParams.append(key, value);\n }\n\n return searchParams;\n}\n\nfunction processRouteLoaderData(matches, matchesToLoad, results, pendingError, activeDeferreds) {\n // Fill in loaderData/errors from our loaders\n let loaderData = {};\n let errors = null;\n let statusCode;\n let foundError = false;\n let loaderHeaders = {}; // Process loader results into state.loaderData/state.errors\n\n results.forEach((result, index) => {\n let id = matchesToLoad[index].route.id;\n invariant(!isRedirectResult(result), \"Cannot handle redirect results in processLoaderData\");\n\n if (isErrorResult(result)) {\n // Look upwards from the matched route for the closest ancestor\n // error boundary, defaulting to the root match\n let boundaryMatch = findNearestBoundary(matches, id);\n let error = result.error; // If we have a pending action error, we report it at the highest-route\n // that throws a loader error, and then clear it out to indicate that\n // it was consumed\n\n if (pendingError) {\n error = Object.values(pendingError)[0];\n pendingError = undefined;\n }\n\n errors = errors || {}; // Prefer higher error values if lower errors bubble to the same boundary\n\n if (errors[boundaryMatch.route.id] == null) {\n errors[boundaryMatch.route.id] = error;\n } // Clear our any prior loaderData for the throwing route\n\n\n loaderData[id] = undefined; // Once we find our first (highest) error, we set the status code and\n // prevent deeper status codes from overriding\n\n if (!foundError) {\n foundError = true;\n statusCode = isRouteErrorResponse(result.error) ? result.error.status : 500;\n }\n\n if (result.headers) {\n loaderHeaders[id] = result.headers;\n }\n } else if (isDeferredResult(result)) {\n activeDeferreds && activeDeferreds.set(id, result.deferredData);\n loaderData[id] = result.deferredData.data; // TODO: Add statusCode/headers once we wire up streaming in Remix\n } else {\n loaderData[id] = result.data; // Error status codes always override success status codes, but if all\n // loaders are successful we take the deepest status code.\n\n if (result.statusCode != null && result.statusCode !== 200 && !foundError) {\n statusCode = result.statusCode;\n }\n\n if (result.headers) {\n loaderHeaders[id] = result.headers;\n }\n }\n }); // If we didn't consume the pending action error (i.e., all loaders\n // resolved), then consume it here. Also clear out any loaderData for the\n // throwing route\n\n if (pendingError) {\n errors = pendingError;\n loaderData[Object.keys(pendingError)[0]] = undefined;\n }\n\n return {\n loaderData,\n errors,\n statusCode: statusCode || 200,\n loaderHeaders\n };\n}\n\nfunction processLoaderData(state, matches, matchesToLoad, results, pendingError, revalidatingFetchers, fetcherResults, activeDeferreds) {\n let {\n loaderData,\n errors\n } = processRouteLoaderData(matches, matchesToLoad, results, pendingError, activeDeferreds); // Process results from our revalidating fetchers\n\n for (let index = 0; index < revalidatingFetchers.length; index++) {\n let [key,, match] = revalidatingFetchers[index];\n invariant(fetcherResults !== undefined && fetcherResults[index] !== undefined, \"Did not find corresponding fetcher result\");\n let result = fetcherResults[index]; // Process fetcher non-redirect errors\n\n if (isErrorResult(result)) {\n let boundaryMatch = findNearestBoundary(state.matches, match.route.id);\n\n if (!(errors && errors[boundaryMatch.route.id])) {\n errors = _extends({}, errors, {\n [boundaryMatch.route.id]: result.error\n });\n }\n\n state.fetchers.delete(key);\n } else if (isRedirectResult(result)) {\n // Should never get here, redirects should get processed above, but we\n // keep this to type narrow to a success result in the else\n throw new Error(\"Unhandled fetcher revalidation redirect\");\n } else if (isDeferredResult(result)) {\n // Should never get here, deferred data should be awaited for fetchers\n // in resolveDeferredResults\n throw new Error(\"Unhandled fetcher deferred data\");\n } else {\n let doneFetcher = {\n state: \"idle\",\n data: result.data,\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined,\n \" _hasFetcherDoneAnything \": true\n };\n state.fetchers.set(key, doneFetcher);\n }\n }\n\n return {\n loaderData,\n errors\n };\n}\n\nfunction mergeLoaderData(loaderData, newLoaderData, matches, errors) {\n let mergedLoaderData = _extends({}, newLoaderData);\n\n for (let match of matches) {\n let id = match.route.id;\n\n if (newLoaderData.hasOwnProperty(id)) {\n if (newLoaderData[id] !== undefined) {\n mergedLoaderData[id] = newLoaderData[id];\n }\n } else if (loaderData[id] !== undefined) {\n mergedLoaderData[id] = loaderData[id];\n }\n\n if (errors && errors.hasOwnProperty(id)) {\n // Don't keep any loader data below the boundary\n break;\n }\n }\n\n return mergedLoaderData;\n} // Find the nearest error boundary, looking upwards from the leaf route (or the\n// route specified by routeId) for the closest ancestor error boundary,\n// defaulting to the root match\n\n\nfunction findNearestBoundary(matches, routeId) {\n let eligibleMatches = routeId ? matches.slice(0, matches.findIndex(m => m.route.id === routeId) + 1) : [...matches];\n return eligibleMatches.reverse().find(m => m.route.hasErrorBoundary === true) || matches[0];\n}\n\nfunction getShortCircuitMatches(routes) {\n // Prefer a root layout route if present, otherwise shim in a route object\n let route = routes.find(r => r.index || !r.path || r.path === \"/\") || {\n id: \"__shim-error-route__\"\n };\n return {\n matches: [{\n params: {},\n pathname: \"\",\n pathnameBase: \"\",\n route\n }],\n route\n };\n}\n\nfunction getInternalRouterError(status, _temp4) {\n let {\n pathname,\n routeId,\n method\n } = _temp4 === void 0 ? {} : _temp4;\n let statusText = \"Unknown Server Error\";\n let errorMessage = \"Unknown @remix-run/router error\";\n\n if (status === 400) {\n statusText = \"Bad Request\";\n\n if (method && pathname && routeId) {\n errorMessage = \"You made a \" + method + \" request to \\\"\" + pathname + \"\\\" but \" + (\"did not provide a `loader` for route \\\"\" + routeId + \"\\\", \") + \"so there is no way to handle the request.\";\n } else {\n errorMessage = \"Cannot submit binary form data using GET\";\n }\n } else if (status === 403) {\n statusText = \"Forbidden\";\n errorMessage = \"Route \\\"\" + routeId + \"\\\" does not match URL \\\"\" + pathname + \"\\\"\";\n } else if (status === 404) {\n statusText = \"Not Found\";\n errorMessage = \"No route matches URL \\\"\" + pathname + \"\\\"\";\n } else if (status === 405) {\n statusText = \"Method Not Allowed\";\n\n if (method && pathname && routeId) {\n errorMessage = \"You made a \" + method.toUpperCase() + \" request to \\\"\" + pathname + \"\\\" but \" + (\"did not provide an `action` for route \\\"\" + routeId + \"\\\", \") + \"so there is no way to handle the request.\";\n } else if (method) {\n errorMessage = \"Invalid request method \\\"\" + method.toUpperCase() + \"\\\"\";\n }\n }\n\n return new ErrorResponse(status || 500, statusText, new Error(errorMessage), true);\n} // Find any returned redirect errors, starting from the lowest match\n\n\nfunction findRedirect(results) {\n for (let i = results.length - 1; i >= 0; i--) {\n let result = results[i];\n\n if (isRedirectResult(result)) {\n return result;\n }\n }\n}\n\nfunction stripHashFromPath(path) {\n let parsedPath = typeof path === \"string\" ? parsePath(path) : path;\n return createPath(_extends({}, parsedPath, {\n hash: \"\"\n }));\n}\n\nfunction isHashChangeOnly(a, b) {\n return a.pathname === b.pathname && a.search === b.search && a.hash !== b.hash;\n}\n\nfunction isDeferredResult(result) {\n return result.type === ResultType.deferred;\n}\n\nfunction isErrorResult(result) {\n return result.type === ResultType.error;\n}\n\nfunction isRedirectResult(result) {\n return (result && result.type) === ResultType.redirect;\n}\n\nfunction isResponse(value) {\n return value != null && typeof value.status === \"number\" && typeof value.statusText === \"string\" && typeof value.headers === \"object\" && typeof value.body !== \"undefined\";\n}\n\nfunction isRedirectResponse(result) {\n if (!isResponse(result)) {\n return false;\n }\n\n let status = result.status;\n let location = result.headers.get(\"Location\");\n return status >= 300 && status <= 399 && location != null;\n}\n\nfunction isQueryRouteResponse(obj) {\n return obj && isResponse(obj.response) && (obj.type === ResultType.data || ResultType.error);\n}\n\nfunction isValidMethod(method) {\n return validRequestMethods.has(method);\n}\n\nfunction isMutationMethod(method) {\n return validMutationMethods.has(method);\n}\n\nasync function resolveDeferredResults(currentMatches, matchesToLoad, results, signal, isFetcher, currentLoaderData) {\n for (let index = 0; index < results.length; index++) {\n let result = results[index];\n let match = matchesToLoad[index];\n let currentMatch = currentMatches.find(m => m.route.id === match.route.id);\n let isRevalidatingLoader = currentMatch != null && !isNewRouteInstance(currentMatch, match) && (currentLoaderData && currentLoaderData[match.route.id]) !== undefined;\n\n if (isDeferredResult(result) && (isFetcher || isRevalidatingLoader)) {\n // Note: we do not have to touch activeDeferreds here since we race them\n // against the signal in resolveDeferredData and they'll get aborted\n // there if needed\n await resolveDeferredData(result, signal, isFetcher).then(result => {\n if (result) {\n results[index] = result || results[index];\n }\n });\n }\n }\n}\n\nasync function resolveDeferredData(result, signal, unwrap) {\n if (unwrap === void 0) {\n unwrap = false;\n }\n\n let aborted = await result.deferredData.resolveData(signal);\n\n if (aborted) {\n return;\n }\n\n if (unwrap) {\n try {\n return {\n type: ResultType.data,\n data: result.deferredData.unwrappedData\n };\n } catch (e) {\n // Handle any TrackedPromise._error values encountered while unwrapping\n return {\n type: ResultType.error,\n error: e\n };\n }\n }\n\n return {\n type: ResultType.data,\n data: result.deferredData.data\n };\n}\n\nfunction hasNakedIndexQuery(search) {\n return new URLSearchParams(search).getAll(\"index\").some(v => v === \"\");\n} // Note: This should match the format exported by useMatches, so if you change\n// this please also change that :) Eventually we'll DRY this up\n\n\nfunction createUseMatchesMatch(match, loaderData) {\n let {\n route,\n pathname,\n params\n } = match;\n return {\n id: route.id,\n pathname,\n params,\n data: loaderData[route.id],\n handle: route.handle\n };\n}\n\nfunction getTargetMatch(matches, location) {\n let search = typeof location === \"string\" ? parsePath(location).search : location.search;\n\n if (matches[matches.length - 1].route.index && hasNakedIndexQuery(search || \"\")) {\n // Return the leaf index route when index is present\n return matches[matches.length - 1];\n } // Otherwise grab the deepest \"path contributing\" match (ignoring index and\n // pathless layout routes)\n\n\n let pathMatches = getPathContributingMatches(matches);\n return pathMatches[pathMatches.length - 1];\n} //#endregion\n\nexport { AbortedDeferredError, Action, ErrorResponse, IDLE_FETCHER, IDLE_NAVIGATION, convertRoutesToDataRoutes as UNSAFE_convertRoutesToDataRoutes, getPathContributingMatches as UNSAFE_getPathContributingMatches, createBrowserHistory, createHashHistory, createMemoryHistory, createPath, createRouter, createStaticHandler, defer, generatePath, getStaticContextFromError, getToPathname, invariant, isRouteErrorResponse, joinPaths, json, matchPath, matchRoutes, normalizePathname, parsePath, redirect, resolvePath, resolveTo, stripBasename, warning };\n//# sourceMappingURL=router.js.map\n","/**\n * React Router v6.6.2\n *\n * Copyright (c) Remix Software Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\nimport { invariant, joinPaths, matchPath, UNSAFE_getPathContributingMatches, warning, resolveTo, parsePath, matchRoutes, Action, isRouteErrorResponse, createMemoryHistory, stripBasename, AbortedDeferredError, createRouter } from '@remix-run/router';\nexport { AbortedDeferredError, Action as NavigationType, createPath, defer, generatePath, isRouteErrorResponse, json, matchPath, matchRoutes, parsePath, redirect, resolvePath } from '@remix-run/router';\nimport * as React from 'react';\n\nfunction _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n/**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n\nfunction isPolyfill(x, y) {\n return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare\n ;\n}\n\nconst is = typeof Object.is === \"function\" ? Object.is : isPolyfill; // Intentionally not using named imports because Rollup uses dynamic\n// dispatch for CommonJS interop named imports.\n\nconst {\n useState,\n useEffect,\n useLayoutEffect,\n useDebugValue\n} = React;\nlet didWarnOld18Alpha = false;\nlet didWarnUncachedGetSnapshot = false; // Disclaimer: This shim breaks many of the rules of React, and only works\n// because of a very particular set of implementation details and assumptions\n// -- change any one of them and it will break. The most important assumption\n// is that updates are always synchronous, because concurrent rendering is\n// only available in versions of React that also have a built-in\n// useSyncExternalStore API. And we only use this shim when the built-in API\n// does not exist.\n//\n// Do not assume that the clever hacks used by this hook also work in general.\n// The point of this shim is to replace the need for hacks by other libraries.\n\nfunction useSyncExternalStore$2(subscribe, getSnapshot, // Note: The shim does not use getServerSnapshot, because pre-18 versions of\n// React do not expose a way to check if we're hydrating. So users of the shim\n// will need to track that themselves and return the correct value\n// from `getSnapshot`.\ngetServerSnapshot) {\n if (process.env.NODE_ENV !== \"production\") {\n if (!didWarnOld18Alpha) {\n if (\"startTransition\" in React) {\n didWarnOld18Alpha = true;\n console.error(\"You are using an outdated, pre-release alpha of React 18 that \" + \"does not support useSyncExternalStore. The \" + \"use-sync-external-store shim will not work correctly. Upgrade \" + \"to a newer pre-release.\");\n }\n }\n } // Read the current snapshot from the store on every render. Again, this\n // breaks the rules of React, and only works here because of specific\n // implementation details, most importantly that updates are\n // always synchronous.\n\n\n const value = getSnapshot();\n\n if (process.env.NODE_ENV !== \"production\") {\n if (!didWarnUncachedGetSnapshot) {\n const cachedValue = getSnapshot();\n\n if (!is(value, cachedValue)) {\n console.error(\"The result of getSnapshot should be cached to avoid an infinite loop\");\n didWarnUncachedGetSnapshot = true;\n }\n }\n } // Because updates are synchronous, we don't queue them. Instead we force a\n // re-render whenever the subscribed state changes by updating an some\n // arbitrary useState hook. Then, during render, we call getSnapshot to read\n // the current value.\n //\n // Because we don't actually use the state returned by the useState hook, we\n // can save a bit of memory by storing other stuff in that slot.\n //\n // To implement the early bailout, we need to track some things on a mutable\n // object. Usually, we would put that in a useRef hook, but we can stash it in\n // our useState hook instead.\n //\n // To force a re-render, we call forceUpdate({inst}). That works because the\n // new object always fails an equality check.\n\n\n const [{\n inst\n }, forceUpdate] = useState({\n inst: {\n value,\n getSnapshot\n }\n }); // Track the latest getSnapshot function with a ref. This needs to be updated\n // in the layout phase so we can access it during the tearing check that\n // happens on subscribe.\n\n useLayoutEffect(() => {\n inst.value = value;\n inst.getSnapshot = getSnapshot; // Whenever getSnapshot or subscribe changes, we need to check in the\n // commit phase if there was an interleaved mutation. In concurrent mode\n // this can happen all the time, but even in synchronous mode, an earlier\n // effect may have mutated the store.\n\n if (checkIfSnapshotChanged(inst)) {\n // Force a re-render.\n forceUpdate({\n inst\n });\n } // eslint-disable-next-line react-hooks/exhaustive-deps\n\n }, [subscribe, value, getSnapshot]);\n useEffect(() => {\n // Check for changes right before subscribing. Subsequent changes will be\n // detected in the subscription handler.\n if (checkIfSnapshotChanged(inst)) {\n // Force a re-render.\n forceUpdate({\n inst\n });\n }\n\n const handleStoreChange = () => {\n // TODO: Because there is no cross-renderer API for batching updates, it's\n // up to the consumer of this library to wrap their subscription event\n // with unstable_batchedUpdates. Should we try to detect when this isn't\n // the case and print a warning in development?\n // The store changed. Check if the snapshot changed since the last time we\n // read from the store.\n if (checkIfSnapshotChanged(inst)) {\n // Force a re-render.\n forceUpdate({\n inst\n });\n }\n }; // Subscribe to the store and return a clean-up function.\n\n\n return subscribe(handleStoreChange); // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [subscribe]);\n useDebugValue(value);\n return value;\n}\n\nfunction checkIfSnapshotChanged(inst) {\n const latestGetSnapshot = inst.getSnapshot;\n const prevValue = inst.value;\n\n try {\n const nextValue = latestGetSnapshot();\n return !is(prevValue, nextValue);\n } catch (error) {\n return true;\n }\n}\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\nfunction useSyncExternalStore$1(subscribe, getSnapshot, getServerSnapshot) {\n // Note: The shim does not use getServerSnapshot, because pre-18 versions of\n // React do not expose a way to check if we're hydrating. So users of the shim\n // will need to track that themselves and return the correct value\n // from `getSnapshot`.\n return getSnapshot();\n}\n\n/**\n * Inlined into the react-router repo since use-sync-external-store does not\n * provide a UMD-compatible package, so we need this to be able to distribute\n * UMD react-router bundles\n */\nconst canUseDOM = !!(typeof window !== \"undefined\" && typeof window.document !== \"undefined\" && typeof window.document.createElement !== \"undefined\");\nconst isServerEnvironment = !canUseDOM;\nconst shim = isServerEnvironment ? useSyncExternalStore$1 : useSyncExternalStore$2;\nconst useSyncExternalStore = \"useSyncExternalStore\" in React ? (module => module.useSyncExternalStore)(React) : shim;\n\nconst DataRouterContext = /*#__PURE__*/React.createContext(null);\n\nif (process.env.NODE_ENV !== \"production\") {\n DataRouterContext.displayName = \"DataRouter\";\n}\n\nconst DataRouterStateContext = /*#__PURE__*/React.createContext(null);\n\nif (process.env.NODE_ENV !== \"production\") {\n DataRouterStateContext.displayName = \"DataRouterState\";\n}\n\nconst AwaitContext = /*#__PURE__*/React.createContext(null);\n\nif (process.env.NODE_ENV !== \"production\") {\n AwaitContext.displayName = \"Await\";\n}\n\nconst NavigationContext = /*#__PURE__*/React.createContext(null);\n\nif (process.env.NODE_ENV !== \"production\") {\n NavigationContext.displayName = \"Navigation\";\n}\n\nconst LocationContext = /*#__PURE__*/React.createContext(null);\n\nif (process.env.NODE_ENV !== \"production\") {\n LocationContext.displayName = \"Location\";\n}\n\nconst RouteContext = /*#__PURE__*/React.createContext({\n outlet: null,\n matches: []\n});\n\nif (process.env.NODE_ENV !== \"production\") {\n RouteContext.displayName = \"Route\";\n}\n\nconst RouteErrorContext = /*#__PURE__*/React.createContext(null);\n\nif (process.env.NODE_ENV !== \"production\") {\n RouteErrorContext.displayName = \"RouteError\";\n}\n\n/**\n * Returns the full href for the given \"to\" value. This is useful for building\n * custom links that are also accessible and preserve right-click behavior.\n *\n * @see https://reactrouter.com/hooks/use-href\n */\n\nfunction useHref(to, _temp) {\n let {\n relative\n } = _temp === void 0 ? {} : _temp;\n !useInRouterContext() ? process.env.NODE_ENV !== \"production\" ? invariant(false, // TODO: This error is probably because they somehow have 2 versions of the\n // router loaded. We can help them understand how to avoid that.\n \"useHref() may be used only in the context of a <Router> component.\") : invariant(false) : void 0;\n let {\n basename,\n navigator\n } = React.useContext(NavigationContext);\n let {\n hash,\n pathname,\n search\n } = useResolvedPath(to, {\n relative\n });\n let joinedPathname = pathname; // If we're operating within a basename, prepend it to the pathname prior\n // to creating the href. If this is a root navigation, then just use the raw\n // basename which allows the basename to have full control over the presence\n // of a trailing slash on root links\n\n if (basename !== \"/\") {\n joinedPathname = pathname === \"/\" ? basename : joinPaths([basename, pathname]);\n }\n\n return navigator.createHref({\n pathname: joinedPathname,\n search,\n hash\n });\n}\n/**\n * Returns true if this component is a descendant of a <Router>.\n *\n * @see https://reactrouter.com/hooks/use-in-router-context\n */\n\nfunction useInRouterContext() {\n return React.useContext(LocationContext) != null;\n}\n/**\n * Returns the current location object, which represents the current URL in web\n * browsers.\n *\n * Note: If you're using this it may mean you're doing some of your own\n * \"routing\" in your app, and we'd like to know what your use case is. We may\n * be able to provide something higher-level to better suit your needs.\n *\n * @see https://reactrouter.com/hooks/use-location\n */\n\nfunction useLocation() {\n !useInRouterContext() ? process.env.NODE_ENV !== \"production\" ? invariant(false, // TODO: This error is probably because they somehow have 2 versions of the\n // router loaded. We can help them understand how to avoid that.\n \"useLocation() may be used only in the context of a <Router> component.\") : invariant(false) : void 0;\n return React.useContext(LocationContext).location;\n}\n/**\n * Returns the current navigation action which describes how the router came to\n * the current location, either by a pop, push, or replace on the history stack.\n *\n * @see https://reactrouter.com/hooks/use-navigation-type\n */\n\nfunction useNavigationType() {\n return React.useContext(LocationContext).navigationType;\n}\n/**\n * Returns a PathMatch object if the given pattern matches the current URL.\n * This is useful for components that need to know \"active\" state, e.g.\n * <NavLink>.\n *\n * @see https://reactrouter.com/hooks/use-match\n */\n\nfunction useMatch(pattern) {\n !useInRouterContext() ? process.env.NODE_ENV !== \"production\" ? invariant(false, // TODO: This error is probably because they somehow have 2 versions of the\n // router loaded. We can help them understand how to avoid that.\n \"useMatch() may be used only in the context of a <Router> component.\") : invariant(false) : void 0;\n let {\n pathname\n } = useLocation();\n return React.useMemo(() => matchPath(pattern, pathname), [pathname, pattern]);\n}\n/**\n * The interface for the navigate() function returned from useNavigate().\n */\n\n/**\n * Returns an imperative method for changing the location. Used by <Link>s, but\n * may also be used by other elements to change the location.\n *\n * @see https://reactrouter.com/hooks/use-navigate\n */\nfunction useNavigate() {\n !useInRouterContext() ? process.env.NODE_ENV !== \"production\" ? invariant(false, // TODO: This error is probably because they somehow have 2 versions of the\n // router loaded. We can help them understand how to avoid that.\n \"useNavigate() may be used only in the context of a <Router> component.\") : invariant(false) : void 0;\n let {\n basename,\n navigator\n } = React.useContext(NavigationContext);\n let {\n matches\n } = React.useContext(RouteContext);\n let {\n pathname: locationPathname\n } = useLocation();\n let routePathnamesJson = JSON.stringify(UNSAFE_getPathContributingMatches(matches).map(match => match.pathnameBase));\n let activeRef = React.useRef(false);\n React.useEffect(() => {\n activeRef.current = true;\n });\n let navigate = React.useCallback(function (to, options) {\n if (options === void 0) {\n options = {};\n }\n\n process.env.NODE_ENV !== \"production\" ? warning(activeRef.current, \"You should call navigate() in a React.useEffect(), not when \" + \"your component is first rendered.\") : void 0;\n if (!activeRef.current) return;\n\n if (typeof to === \"number\") {\n navigator.go(to);\n return;\n }\n\n let path = resolveTo(to, JSON.parse(routePathnamesJson), locationPathname, options.relative === \"path\"); // If we're operating within a basename, prepend it to the pathname prior\n // to handing off to history. If this is a root navigation, then we\n // navigate to the raw basename which allows the basename to have full\n // control over the presence of a trailing slash on root links\n\n if (basename !== \"/\") {\n path.pathname = path.pathname === \"/\" ? basename : joinPaths([basename, path.pathname]);\n }\n\n (!!options.replace ? navigator.replace : navigator.push)(path, options.state, options);\n }, [basename, navigator, routePathnamesJson, locationPathname]);\n return navigate;\n}\nconst OutletContext = /*#__PURE__*/React.createContext(null);\n/**\n * Returns the context (if provided) for the child route at this level of the route\n * hierarchy.\n * @see https://reactrouter.com/hooks/use-outlet-context\n */\n\nfunction useOutletContext() {\n return React.useContext(OutletContext);\n}\n/**\n * Returns the element for the child route at this level of the route\n * hierarchy. Used internally by <Outlet> to render child routes.\n *\n * @see https://reactrouter.com/hooks/use-outlet\n */\n\nfunction useOutlet(context) {\n let outlet = React.useContext(RouteContext).outlet;\n\n if (outlet) {\n return /*#__PURE__*/React.createElement(OutletContext.Provider, {\n value: context\n }, outlet);\n }\n\n return outlet;\n}\n/**\n * Returns an object of key/value pairs of the dynamic params from the current\n * URL that were matched by the route path.\n *\n * @see https://reactrouter.com/hooks/use-params\n */\n\nfunction useParams() {\n let {\n matches\n } = React.useContext(RouteContext);\n let routeMatch = matches[matches.length - 1];\n return routeMatch ? routeMatch.params : {};\n}\n/**\n * Resolves the pathname of the given `to` value against the current location.\n *\n * @see https://reactrouter.com/hooks/use-resolved-path\n */\n\nfunction useResolvedPath(to, _temp2) {\n let {\n relative\n } = _temp2 === void 0 ? {} : _temp2;\n let {\n matches\n } = React.useContext(RouteContext);\n let {\n pathname: locationPathname\n } = useLocation();\n let routePathnamesJson = JSON.stringify(UNSAFE_getPathContributingMatches(matches).map(match => match.pathnameBase));\n return React.useMemo(() => resolveTo(to, JSON.parse(routePathnamesJson), locationPathname, relative === \"path\"), [to, routePathnamesJson, locationPathname, relative]);\n}\n/**\n * Returns the element of the route that matched the current location, prepared\n * with the correct context to render the remainder of the route tree. Route\n * elements in the tree must render an <Outlet> to render their child route's\n * element.\n *\n * @see https://reactrouter.com/hooks/use-routes\n */\n\nfunction useRoutes(routes, locationArg) {\n !useInRouterContext() ? process.env.NODE_ENV !== \"production\" ? invariant(false, // TODO: This error is probably because they somehow have 2 versions of the\n // router loaded. We can help them understand how to avoid that.\n \"useRoutes() may be used only in the context of a <Router> component.\") : invariant(false) : void 0;\n let {\n navigator\n } = React.useContext(NavigationContext);\n let dataRouterStateContext = React.useContext(DataRouterStateContext);\n let {\n matches: parentMatches\n } = React.useContext(RouteContext);\n let routeMatch = parentMatches[parentMatches.length - 1];\n let parentParams = routeMatch ? routeMatch.params : {};\n let parentPathname = routeMatch ? routeMatch.pathname : \"/\";\n let parentPathnameBase = routeMatch ? routeMatch.pathnameBase : \"/\";\n let parentRoute = routeMatch && routeMatch.route;\n\n if (process.env.NODE_ENV !== \"production\") {\n // You won't get a warning about 2 different <Routes> under a <Route>\n // without a trailing *, but this is a best-effort warning anyway since we\n // cannot even give the warning unless they land at the parent route.\n //\n // Example:\n //\n // <Routes>\n // {/* This route path MUST end with /* because otherwise\n // it will never match /blog/post/123 */}\n // <Route path=\"blog\" element={<Blog />} />\n // <Route path=\"blog/feed\" element={<BlogFeed />} />\n // </Routes>\n //\n // function Blog() {\n // return (\n // <Routes>\n // <Route path=\"post/:id\" element={<Post />} />\n // </Routes>\n // );\n // }\n let parentPath = parentRoute && parentRoute.path || \"\";\n warningOnce(parentPathname, !parentRoute || parentPath.endsWith(\"*\"), \"You rendered descendant <Routes> (or called `useRoutes()`) at \" + (\"\\\"\" + parentPathname + \"\\\" (under <Route path=\\\"\" + parentPath + \"\\\">) but the \") + \"parent route path has no trailing \\\"*\\\". This means if you navigate \" + \"deeper, the parent won't match anymore and therefore the child \" + \"routes will never render.\\n\\n\" + (\"Please change the parent <Route path=\\\"\" + parentPath + \"\\\"> to <Route \") + (\"path=\\\"\" + (parentPath === \"/\" ? \"*\" : parentPath + \"/*\") + \"\\\">.\"));\n }\n\n let locationFromContext = useLocation();\n let location;\n\n if (locationArg) {\n var _parsedLocationArg$pa;\n\n let parsedLocationArg = typeof locationArg === \"string\" ? parsePath(locationArg) : locationArg;\n !(parentPathnameBase === \"/\" || ((_parsedLocationArg$pa = parsedLocationArg.pathname) == null ? void 0 : _parsedLocationArg$pa.startsWith(parentPathnameBase))) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"When overriding the location using `<Routes location>` or `useRoutes(routes, location)`, \" + \"the location pathname must begin with the portion of the URL pathname that was \" + (\"matched by all parent routes. The current pathname base is \\\"\" + parentPathnameBase + \"\\\" \") + (\"but pathname \\\"\" + parsedLocationArg.pathname + \"\\\" was given in the `location` prop.\")) : invariant(false) : void 0;\n location = parsedLocationArg;\n } else {\n location = locationFromContext;\n }\n\n let pathname = location.pathname || \"/\";\n let remainingPathname = parentPathnameBase === \"/\" ? pathname : pathname.slice(parentPathnameBase.length) || \"/\";\n let matches = matchRoutes(routes, {\n pathname: remainingPathname\n });\n\n if (process.env.NODE_ENV !== \"production\") {\n process.env.NODE_ENV !== \"production\" ? warning(parentRoute || matches != null, \"No routes matched location \\\"\" + location.pathname + location.search + location.hash + \"\\\" \") : void 0;\n process.env.NODE_ENV !== \"production\" ? warning(matches == null || matches[matches.length - 1].route.element !== undefined, \"Matched leaf route at location \\\"\" + location.pathname + location.search + location.hash + \"\\\" does not have an element. \" + \"This means it will render an <Outlet /> with a null value by default resulting in an \\\"empty\\\" page.\") : void 0;\n }\n\n let renderedMatches = _renderMatches(matches && matches.map(match => Object.assign({}, match, {\n params: Object.assign({}, parentParams, match.params),\n pathname: joinPaths([parentPathnameBase, // Re-encode pathnames that were decoded inside matchRoutes\n navigator.encodeLocation ? navigator.encodeLocation(match.pathname).pathname : match.pathname]),\n pathnameBase: match.pathnameBase === \"/\" ? parentPathnameBase : joinPaths([parentPathnameBase, // Re-encode pathnames that were decoded inside matchRoutes\n navigator.encodeLocation ? navigator.encodeLocation(match.pathnameBase).pathname : match.pathnameBase])\n })), parentMatches, dataRouterStateContext || undefined); // When a user passes in a `locationArg`, the associated routes need to\n // be wrapped in a new `LocationContext.Provider` in order for `useLocation`\n // to use the scoped location instead of the global location.\n\n\n if (locationArg && renderedMatches) {\n return /*#__PURE__*/React.createElement(LocationContext.Provider, {\n value: {\n location: _extends({\n pathname: \"/\",\n search: \"\",\n hash: \"\",\n state: null,\n key: \"default\"\n }, location),\n navigationType: Action.Pop\n }\n }, renderedMatches);\n }\n\n return renderedMatches;\n}\n\nfunction DefaultErrorElement() {\n let error = useRouteError();\n let message = isRouteErrorResponse(error) ? error.status + \" \" + error.statusText : error instanceof Error ? error.message : JSON.stringify(error);\n let stack = error instanceof Error ? error.stack : null;\n let lightgrey = \"rgba(200,200,200, 0.5)\";\n let preStyles = {\n padding: \"0.5rem\",\n backgroundColor: lightgrey\n };\n let codeStyles = {\n padding: \"2px 4px\",\n backgroundColor: lightgrey\n };\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"h2\", null, \"Unhandled Thrown Error!\"), /*#__PURE__*/React.createElement(\"h3\", {\n style: {\n fontStyle: \"italic\"\n }\n }, message), stack ? /*#__PURE__*/React.createElement(\"pre\", {\n style: preStyles\n }, stack) : null, /*#__PURE__*/React.createElement(\"p\", null, \"\\uD83D\\uDCBF Hey developer \\uD83D\\uDC4B\"), /*#__PURE__*/React.createElement(\"p\", null, \"You can provide a way better UX than this when your app throws errors by providing your own\\xA0\", /*#__PURE__*/React.createElement(\"code\", {\n style: codeStyles\n }, \"errorElement\"), \" props on\\xA0\", /*#__PURE__*/React.createElement(\"code\", {\n style: codeStyles\n }, \"<Route>\")));\n}\n\nclass RenderErrorBoundary extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n location: props.location,\n error: props.error\n };\n }\n\n static getDerivedStateFromError(error) {\n return {\n error: error\n };\n }\n\n static getDerivedStateFromProps(props, state) {\n // When we get into an error state, the user will likely click \"back\" to the\n // previous page that didn't have an error. Because this wraps the entire\n // application, that will have no effect--the error page continues to display.\n // This gives us a mechanism to recover from the error when the location changes.\n //\n // Whether we're in an error state or not, we update the location in state\n // so that when we are in an error state, it gets reset when a new location\n // comes in and the user recovers from the error.\n if (state.location !== props.location) {\n return {\n error: props.error,\n location: props.location\n };\n } // If we're not changing locations, preserve the location but still surface\n // any new errors that may come through. We retain the existing error, we do\n // this because the error provided from the app state may be cleared without\n // the location changing.\n\n\n return {\n error: props.error || state.error,\n location: state.location\n };\n }\n\n componentDidCatch(error, errorInfo) {\n console.error(\"React Router caught the following error during render\", error, errorInfo);\n }\n\n render() {\n return this.state.error ? /*#__PURE__*/React.createElement(RouteContext.Provider, {\n value: this.props.routeContext\n }, /*#__PURE__*/React.createElement(RouteErrorContext.Provider, {\n value: this.state.error,\n children: this.props.component\n })) : this.props.children;\n }\n\n}\n\nfunction RenderedRoute(_ref) {\n let {\n routeContext,\n match,\n children\n } = _ref;\n let dataRouterContext = React.useContext(DataRouterContext); // Track how deep we got in our render pass to emulate SSR componentDidCatch\n // in a DataStaticRouter\n\n if (dataRouterContext && dataRouterContext.static && dataRouterContext.staticContext && match.route.errorElement) {\n dataRouterContext.staticContext._deepestRenderedBoundaryId = match.route.id;\n }\n\n return /*#__PURE__*/React.createElement(RouteContext.Provider, {\n value: routeContext\n }, children);\n}\n\nfunction _renderMatches(matches, parentMatches, dataRouterState) {\n if (parentMatches === void 0) {\n parentMatches = [];\n }\n\n if (matches == null) {\n if (dataRouterState != null && dataRouterState.errors) {\n // Don't bail if we have data router errors so we can render them in the\n // boundary. Use the pre-matched (or shimmed) matches\n matches = dataRouterState.matches;\n } else {\n return null;\n }\n }\n\n let renderedMatches = matches; // If we have data errors, trim matches to the highest error boundary\n\n let errors = dataRouterState == null ? void 0 : dataRouterState.errors;\n\n if (errors != null) {\n let errorIndex = renderedMatches.findIndex(m => m.route.id && (errors == null ? void 0 : errors[m.route.id]));\n !(errorIndex >= 0) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Could not find a matching route for the current errors: \" + errors) : invariant(false) : void 0;\n renderedMatches = renderedMatches.slice(0, Math.min(renderedMatches.length, errorIndex + 1));\n }\n\n return renderedMatches.reduceRight((outlet, match, index) => {\n let error = match.route.id ? errors == null ? void 0 : errors[match.route.id] : null; // Only data routers handle errors\n\n let errorElement = dataRouterState ? match.route.errorElement || /*#__PURE__*/React.createElement(DefaultErrorElement, null) : null;\n let matches = parentMatches.concat(renderedMatches.slice(0, index + 1));\n\n let getChildren = () => /*#__PURE__*/React.createElement(RenderedRoute, {\n match: match,\n routeContext: {\n outlet,\n matches\n }\n }, error ? errorElement : match.route.element !== undefined ? match.route.element : outlet); // Only wrap in an error boundary within data router usages when we have an\n // errorElement on this route. Otherwise let it bubble up to an ancestor\n // errorElement\n\n\n return dataRouterState && (match.route.errorElement || index === 0) ? /*#__PURE__*/React.createElement(RenderErrorBoundary, {\n location: dataRouterState.location,\n component: errorElement,\n error: error,\n children: getChildren(),\n routeContext: {\n outlet: null,\n matches\n }\n }) : getChildren();\n }, null);\n}\nvar DataRouterHook;\n\n(function (DataRouterHook) {\n DataRouterHook[\"UseRevalidator\"] = \"useRevalidator\";\n})(DataRouterHook || (DataRouterHook = {}));\n\nvar DataRouterStateHook;\n\n(function (DataRouterStateHook) {\n DataRouterStateHook[\"UseLoaderData\"] = \"useLoaderData\";\n DataRouterStateHook[\"UseActionData\"] = \"useActionData\";\n DataRouterStateHook[\"UseRouteError\"] = \"useRouteError\";\n DataRouterStateHook[\"UseNavigation\"] = \"useNavigation\";\n DataRouterStateHook[\"UseRouteLoaderData\"] = \"useRouteLoaderData\";\n DataRouterStateHook[\"UseMatches\"] = \"useMatches\";\n DataRouterStateHook[\"UseRevalidator\"] = \"useRevalidator\";\n})(DataRouterStateHook || (DataRouterStateHook = {}));\n\nfunction getDataRouterConsoleError(hookName) {\n return hookName + \" must be used within a data router. See https://reactrouter.com/routers/picking-a-router.\";\n}\n\nfunction useDataRouterContext(hookName) {\n let ctx = React.useContext(DataRouterContext);\n !ctx ? process.env.NODE_ENV !== \"production\" ? invariant(false, getDataRouterConsoleError(hookName)) : invariant(false) : void 0;\n return ctx;\n}\n\nfunction useDataRouterState(hookName) {\n let state = React.useContext(DataRouterStateContext);\n !state ? process.env.NODE_ENV !== \"production\" ? invariant(false, getDataRouterConsoleError(hookName)) : invariant(false) : void 0;\n return state;\n}\n\nfunction useRouteContext(hookName) {\n let route = React.useContext(RouteContext);\n !route ? process.env.NODE_ENV !== \"production\" ? invariant(false, getDataRouterConsoleError(hookName)) : invariant(false) : void 0;\n return route;\n}\n\nfunction useCurrentRouteId(hookName) {\n let route = useRouteContext(hookName);\n let thisRoute = route.matches[route.matches.length - 1];\n !thisRoute.route.id ? process.env.NODE_ENV !== \"production\" ? invariant(false, hookName + \" can only be used on routes that contain a unique \\\"id\\\"\") : invariant(false) : void 0;\n return thisRoute.route.id;\n}\n/**\n * Returns the current navigation, defaulting to an \"idle\" navigation when\n * no navigation is in progress\n */\n\n\nfunction useNavigation() {\n let state = useDataRouterState(DataRouterStateHook.UseNavigation);\n return state.navigation;\n}\n/**\n * Returns a revalidate function for manually triggering revalidation, as well\n * as the current state of any manual revalidations\n */\n\nfunction useRevalidator() {\n let dataRouterContext = useDataRouterContext(DataRouterHook.UseRevalidator);\n let state = useDataRouterState(DataRouterStateHook.UseRevalidator);\n return {\n revalidate: dataRouterContext.router.revalidate,\n state: state.revalidation\n };\n}\n/**\n * Returns the active route matches, useful for accessing loaderData for\n * parent/child routes or the route \"handle\" property\n */\n\nfunction useMatches() {\n let {\n matches,\n loaderData\n } = useDataRouterState(DataRouterStateHook.UseMatches);\n return React.useMemo(() => matches.map(match => {\n let {\n pathname,\n params\n } = match; // Note: This structure matches that created by createUseMatchesMatch\n // in the @remix-run/router , so if you change this please also change\n // that :) Eventually we'll DRY this up\n\n return {\n id: match.route.id,\n pathname,\n params,\n data: loaderData[match.route.id],\n handle: match.route.handle\n };\n }), [matches, loaderData]);\n}\n/**\n * Returns the loader data for the nearest ancestor Route loader\n */\n\nfunction useLoaderData() {\n let state = useDataRouterState(DataRouterStateHook.UseLoaderData);\n let routeId = useCurrentRouteId(DataRouterStateHook.UseLoaderData);\n\n if (state.errors && state.errors[routeId] != null) {\n console.error(\"You cannot `useLoaderData` in an errorElement (routeId: \" + routeId + \")\");\n return undefined;\n }\n\n return state.loaderData[routeId];\n}\n/**\n * Returns the loaderData for the given routeId\n */\n\nfunction useRouteLoaderData(routeId) {\n let state = useDataRouterState(DataRouterStateHook.UseRouteLoaderData);\n return state.loaderData[routeId];\n}\n/**\n * Returns the action data for the nearest ancestor Route action\n */\n\nfunction useActionData() {\n let state = useDataRouterState(DataRouterStateHook.UseActionData);\n let route = React.useContext(RouteContext);\n !route ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"useActionData must be used inside a RouteContext\") : invariant(false) : void 0;\n return Object.values((state == null ? void 0 : state.actionData) || {})[0];\n}\n/**\n * Returns the nearest ancestor Route error, which could be a loader/action\n * error or a render error. This is intended to be called from your\n * errorElement to display a proper error message.\n */\n\nfunction useRouteError() {\n var _state$errors;\n\n let error = React.useContext(RouteErrorContext);\n let state = useDataRouterState(DataRouterStateHook.UseRouteError);\n let routeId = useCurrentRouteId(DataRouterStateHook.UseRouteError); // If this was a render error, we put it in a RouteError context inside\n // of RenderErrorBoundary\n\n if (error) {\n return error;\n } // Otherwise look for errors from our data router state\n\n\n return (_state$errors = state.errors) == null ? void 0 : _state$errors[routeId];\n}\n/**\n * Returns the happy-path data from the nearest ancestor <Await /> value\n */\n\nfunction useAsyncValue() {\n let value = React.useContext(AwaitContext);\n return value == null ? void 0 : value._data;\n}\n/**\n * Returns the error from the nearest ancestor <Await /> value\n */\n\nfunction useAsyncError() {\n let value = React.useContext(AwaitContext);\n return value == null ? void 0 : value._error;\n}\nconst alreadyWarned = {};\n\nfunction warningOnce(key, cond, message) {\n if (!cond && !alreadyWarned[key]) {\n alreadyWarned[key] = true;\n process.env.NODE_ENV !== \"production\" ? warning(false, message) : void 0;\n }\n}\n\n/**\n * Given a Remix Router instance, render the appropriate UI\n */\nfunction RouterProvider(_ref) {\n let {\n fallbackElement,\n router\n } = _ref;\n // Sync router state to our component state to force re-renders\n let state = useSyncExternalStore(router.subscribe, () => router.state, // We have to provide this so React@18 doesn't complain during hydration,\n // but we pass our serialized hydration data into the router so state here\n // is already synced with what the server saw\n () => router.state);\n let navigator = React.useMemo(() => {\n return {\n createHref: router.createHref,\n encodeLocation: router.encodeLocation,\n go: n => router.navigate(n),\n push: (to, state, opts) => router.navigate(to, {\n state,\n preventScrollReset: opts == null ? void 0 : opts.preventScrollReset\n }),\n replace: (to, state, opts) => router.navigate(to, {\n replace: true,\n state,\n preventScrollReset: opts == null ? void 0 : opts.preventScrollReset\n })\n };\n }, [router]);\n let basename = router.basename || \"/\"; // The fragment and {null} here are important! We need them to keep React 18's\n // useId happy when we are server-rendering since we may have a <script> here\n // containing the hydrated server-side staticContext (from StaticRouterProvider).\n // useId relies on the component tree structure to generate deterministic id's\n // so we need to ensure it remains the same on the client even though\n // we don't need the <script> tag\n\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DataRouterContext.Provider, {\n value: {\n router,\n navigator,\n static: false,\n // Do we need this?\n basename\n }\n }, /*#__PURE__*/React.createElement(DataRouterStateContext.Provider, {\n value: state\n }, /*#__PURE__*/React.createElement(Router, {\n basename: router.basename,\n location: router.state.location,\n navigationType: router.state.historyAction,\n navigator: navigator\n }, router.state.initialized ? /*#__PURE__*/React.createElement(Routes, null) : fallbackElement))), null);\n}\n\n/**\n * A <Router> that stores all entries in memory.\n *\n * @see https://reactrouter.com/router-components/memory-router\n */\nfunction MemoryRouter(_ref2) {\n let {\n basename,\n children,\n initialEntries,\n initialIndex\n } = _ref2;\n let historyRef = React.useRef();\n\n if (historyRef.current == null) {\n historyRef.current = createMemoryHistory({\n initialEntries,\n initialIndex,\n v5Compat: true\n });\n }\n\n let history = historyRef.current;\n let [state, setState] = React.useState({\n action: history.action,\n location: history.location\n });\n React.useLayoutEffect(() => history.listen(setState), [history]);\n return /*#__PURE__*/React.createElement(Router, {\n basename: basename,\n children: children,\n location: state.location,\n navigationType: state.action,\n navigator: history\n });\n}\n\n/**\n * Changes the current location.\n *\n * Note: This API is mostly useful in React.Component subclasses that are not\n * able to use hooks. In functional components, we recommend you use the\n * `useNavigate` hook instead.\n *\n * @see https://reactrouter.com/components/navigate\n */\nfunction Navigate(_ref3) {\n let {\n to,\n replace,\n state,\n relative\n } = _ref3;\n !useInRouterContext() ? process.env.NODE_ENV !== \"production\" ? invariant(false, // TODO: This error is probably because they somehow have 2 versions of\n // the router loaded. We can help them understand how to avoid that.\n \"<Navigate> may be used only in the context of a <Router> component.\") : invariant(false) : void 0;\n process.env.NODE_ENV !== \"production\" ? warning(!React.useContext(NavigationContext).static, \"<Navigate> must not be used on the initial render in a <StaticRouter>. \" + \"This is a no-op, but you should modify your code so the <Navigate> is \" + \"only ever rendered in response to some user interaction or state change.\") : void 0;\n let dataRouterState = React.useContext(DataRouterStateContext);\n let navigate = useNavigate();\n React.useEffect(() => {\n // Avoid kicking off multiple navigations if we're in the middle of a\n // data-router navigation, since components get re-rendered when we enter\n // a submitting/loading state\n if (dataRouterState && dataRouterState.navigation.state !== \"idle\") {\n return;\n }\n\n navigate(to, {\n replace,\n state,\n relative\n });\n });\n return null;\n}\n\n/**\n * Renders the child route's element, if there is one.\n *\n * @see https://reactrouter.com/components/outlet\n */\nfunction Outlet(props) {\n return useOutlet(props.context);\n}\n\n/**\n * Declares an element that should be rendered at a certain URL path.\n *\n * @see https://reactrouter.com/components/route\n */\nfunction Route(_props) {\n process.env.NODE_ENV !== \"production\" ? invariant(false, \"A <Route> is only ever to be used as the child of <Routes> element, \" + \"never rendered directly. Please wrap your <Route> in a <Routes>.\") : invariant(false) ;\n}\n\n/**\n * Provides location context for the rest of the app.\n *\n * Note: You usually won't render a <Router> directly. Instead, you'll render a\n * router that is more specific to your environment such as a <BrowserRouter>\n * in web browsers or a <StaticRouter> for server rendering.\n *\n * @see https://reactrouter.com/router-components/router\n */\nfunction Router(_ref4) {\n let {\n basename: basenameProp = \"/\",\n children = null,\n location: locationProp,\n navigationType = Action.Pop,\n navigator,\n static: staticProp = false\n } = _ref4;\n !!useInRouterContext() ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"You cannot render a <Router> inside another <Router>.\" + \" You should never have more than one in your app.\") : invariant(false) : void 0; // Preserve trailing slashes on basename, so we can let the user control\n // the enforcement of trailing slashes throughout the app\n\n let basename = basenameProp.replace(/^\\/*/, \"/\");\n let navigationContext = React.useMemo(() => ({\n basename,\n navigator,\n static: staticProp\n }), [basename, navigator, staticProp]);\n\n if (typeof locationProp === \"string\") {\n locationProp = parsePath(locationProp);\n }\n\n let {\n pathname = \"/\",\n search = \"\",\n hash = \"\",\n state = null,\n key = \"default\"\n } = locationProp;\n let location = React.useMemo(() => {\n let trailingPathname = stripBasename(pathname, basename);\n\n if (trailingPathname == null) {\n return null;\n }\n\n return {\n pathname: trailingPathname,\n search,\n hash,\n state,\n key\n };\n }, [basename, pathname, search, hash, state, key]);\n process.env.NODE_ENV !== \"production\" ? warning(location != null, \"<Router basename=\\\"\" + basename + \"\\\"> is not able to match the URL \" + (\"\\\"\" + pathname + search + hash + \"\\\" because it does not start with the \") + \"basename, so the <Router> won't render anything.\") : void 0;\n\n if (location == null) {\n return null;\n }\n\n return /*#__PURE__*/React.createElement(NavigationContext.Provider, {\n value: navigationContext\n }, /*#__PURE__*/React.createElement(LocationContext.Provider, {\n children: children,\n value: {\n location,\n navigationType\n }\n }));\n}\n\n/**\n * A container for a nested tree of <Route> elements that renders the branch\n * that best matches the current location.\n *\n * @see https://reactrouter.com/components/routes\n */\nfunction Routes(_ref5) {\n let {\n children,\n location\n } = _ref5;\n let dataRouterContext = React.useContext(DataRouterContext); // When in a DataRouterContext _without_ children, we use the router routes\n // directly. If we have children, then we're in a descendant tree and we\n // need to use child routes.\n\n let routes = dataRouterContext && !children ? dataRouterContext.router.routes : createRoutesFromChildren(children);\n return useRoutes(routes, location);\n}\n\n/**\n * Component to use for rendering lazily loaded data from returning defer()\n * in a loader function\n */\nfunction Await(_ref6) {\n let {\n children,\n errorElement,\n resolve\n } = _ref6;\n return /*#__PURE__*/React.createElement(AwaitErrorBoundary, {\n resolve: resolve,\n errorElement: errorElement\n }, /*#__PURE__*/React.createElement(ResolveAwait, null, children));\n}\nvar AwaitRenderStatus;\n\n(function (AwaitRenderStatus) {\n AwaitRenderStatus[AwaitRenderStatus[\"pending\"] = 0] = \"pending\";\n AwaitRenderStatus[AwaitRenderStatus[\"success\"] = 1] = \"success\";\n AwaitRenderStatus[AwaitRenderStatus[\"error\"] = 2] = \"error\";\n})(AwaitRenderStatus || (AwaitRenderStatus = {}));\n\nconst neverSettledPromise = new Promise(() => {});\n\nclass AwaitErrorBoundary extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n error: null\n };\n }\n\n static getDerivedStateFromError(error) {\n return {\n error\n };\n }\n\n componentDidCatch(error, errorInfo) {\n console.error(\"<Await> caught the following error during render\", error, errorInfo);\n }\n\n render() {\n let {\n children,\n errorElement,\n resolve\n } = this.props;\n let promise = null;\n let status = AwaitRenderStatus.pending;\n\n if (!(resolve instanceof Promise)) {\n // Didn't get a promise - provide as a resolved promise\n status = AwaitRenderStatus.success;\n promise = Promise.resolve();\n Object.defineProperty(promise, \"_tracked\", {\n get: () => true\n });\n Object.defineProperty(promise, \"_data\", {\n get: () => resolve\n });\n } else if (this.state.error) {\n // Caught a render error, provide it as a rejected promise\n status = AwaitRenderStatus.error;\n let renderError = this.state.error;\n promise = Promise.reject().catch(() => {}); // Avoid unhandled rejection warnings\n\n Object.defineProperty(promise, \"_tracked\", {\n get: () => true\n });\n Object.defineProperty(promise, \"_error\", {\n get: () => renderError\n });\n } else if (resolve._tracked) {\n // Already tracked promise - check contents\n promise = resolve;\n status = promise._error !== undefined ? AwaitRenderStatus.error : promise._data !== undefined ? AwaitRenderStatus.success : AwaitRenderStatus.pending;\n } else {\n // Raw (untracked) promise - track it\n status = AwaitRenderStatus.pending;\n Object.defineProperty(resolve, \"_tracked\", {\n get: () => true\n });\n promise = resolve.then(data => Object.defineProperty(resolve, \"_data\", {\n get: () => data\n }), error => Object.defineProperty(resolve, \"_error\", {\n get: () => error\n }));\n }\n\n if (status === AwaitRenderStatus.error && promise._error instanceof AbortedDeferredError) {\n // Freeze the UI by throwing a never resolved promise\n throw neverSettledPromise;\n }\n\n if (status === AwaitRenderStatus.error && !errorElement) {\n // No errorElement, throw to the nearest route-level error boundary\n throw promise._error;\n }\n\n if (status === AwaitRenderStatus.error) {\n // Render via our errorElement\n return /*#__PURE__*/React.createElement(AwaitContext.Provider, {\n value: promise,\n children: errorElement\n });\n }\n\n if (status === AwaitRenderStatus.success) {\n // Render children with resolved value\n return /*#__PURE__*/React.createElement(AwaitContext.Provider, {\n value: promise,\n children: children\n });\n } // Throw to the suspense boundary\n\n\n throw promise;\n }\n\n}\n/**\n * @private\n * Indirection to leverage useAsyncValue for a render-prop API on <Await>\n */\n\n\nfunction ResolveAwait(_ref7) {\n let {\n children\n } = _ref7;\n let data = useAsyncValue();\n\n if (typeof children === \"function\") {\n return children(data);\n }\n\n return /*#__PURE__*/React.createElement(React.Fragment, null, children);\n} ///////////////////////////////////////////////////////////////////////////////\n// UTILS\n///////////////////////////////////////////////////////////////////////////////\n\n/**\n * Creates a route config from a React \"children\" object, which is usually\n * either a `<Route>` element or an array of them. Used internally by\n * `<Routes>` to create a route config from its children.\n *\n * @see https://reactrouter.com/utils/create-routes-from-children\n */\n\n\nfunction createRoutesFromChildren(children, parentPath) {\n if (parentPath === void 0) {\n parentPath = [];\n }\n\n let routes = [];\n React.Children.forEach(children, (element, index) => {\n if (! /*#__PURE__*/React.isValidElement(element)) {\n // Ignore non-elements. This allows people to more easily inline\n // conditionals in their route config.\n return;\n }\n\n if (element.type === React.Fragment) {\n // Transparently support React.Fragment and its children.\n routes.push.apply(routes, createRoutesFromChildren(element.props.children, parentPath));\n return;\n }\n\n !(element.type === Route) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"[\" + (typeof element.type === \"string\" ? element.type : element.type.name) + \"] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>\") : invariant(false) : void 0;\n !(!element.props.index || !element.props.children) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"An index route cannot have child routes.\") : invariant(false) : void 0;\n let treePath = [...parentPath, index];\n let route = {\n id: element.props.id || treePath.join(\"-\"),\n caseSensitive: element.props.caseSensitive,\n element: element.props.element,\n index: element.props.index,\n path: element.props.path,\n loader: element.props.loader,\n action: element.props.action,\n errorElement: element.props.errorElement,\n hasErrorBoundary: element.props.errorElement != null,\n shouldRevalidate: element.props.shouldRevalidate,\n handle: element.props.handle\n };\n\n if (element.props.children) {\n route.children = createRoutesFromChildren(element.props.children, treePath);\n }\n\n routes.push(route);\n });\n return routes;\n}\n/**\n * Renders the result of `matchRoutes()` into a React element.\n */\n\nfunction renderMatches(matches) {\n return _renderMatches(matches);\n}\n/**\n * @private\n * Walk the route tree and add hasErrorBoundary if it's not provided, so that\n * users providing manual route arrays can just specify errorElement\n */\n\nfunction enhanceManualRouteObjects(routes) {\n return routes.map(route => {\n let routeClone = _extends({}, route);\n\n if (routeClone.hasErrorBoundary == null) {\n routeClone.hasErrorBoundary = routeClone.errorElement != null;\n }\n\n if (routeClone.children) {\n routeClone.children = enhanceManualRouteObjects(routeClone.children);\n }\n\n return routeClone;\n });\n}\n\nfunction createMemoryRouter(routes, opts) {\n return createRouter({\n basename: opts == null ? void 0 : opts.basename,\n history: createMemoryHistory({\n initialEntries: opts == null ? void 0 : opts.initialEntries,\n initialIndex: opts == null ? void 0 : opts.initialIndex\n }),\n hydrationData: opts == null ? void 0 : opts.hydrationData,\n routes: enhanceManualRouteObjects(routes)\n }).initialize();\n} ///////////////////////////////////////////////////////////////////////////////\n\nexport { Await, MemoryRouter, Navigate, Outlet, Route, Router, RouterProvider, Routes, DataRouterContext as UNSAFE_DataRouterContext, DataRouterStateContext as UNSAFE_DataRouterStateContext, LocationContext as UNSAFE_LocationContext, NavigationContext as UNSAFE_NavigationContext, RouteContext as UNSAFE_RouteContext, enhanceManualRouteObjects as UNSAFE_enhanceManualRouteObjects, createMemoryRouter, createRoutesFromChildren, createRoutesFromChildren as createRoutesFromElements, renderMatches, useActionData, useAsyncError, useAsyncValue, useHref, useInRouterContext, useLoaderData, useLocation, useMatch, useMatches, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRouteError, useRouteLoaderData, useRoutes };\n//# sourceMappingURL=index.js.map\n","/**\n * React Router DOM v6.6.2\n *\n * Copyright (c) Remix Software Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\nimport * as React from 'react';\nimport { UNSAFE_enhanceManualRouteObjects, Router, useHref, useResolvedPath, useLocation, UNSAFE_DataRouterStateContext, UNSAFE_NavigationContext, useNavigate, createPath, UNSAFE_RouteContext, useMatches, useNavigation, UNSAFE_DataRouterContext } from 'react-router';\nexport { AbortedDeferredError, Await, MemoryRouter, Navigate, NavigationType, Outlet, Route, Router, RouterProvider, Routes, UNSAFE_DataRouterContext, UNSAFE_DataRouterStateContext, UNSAFE_LocationContext, UNSAFE_NavigationContext, UNSAFE_RouteContext, UNSAFE_enhanceManualRouteObjects, createMemoryRouter, createPath, createRoutesFromChildren, createRoutesFromElements, defer, generatePath, isRouteErrorResponse, json, matchPath, matchRoutes, parsePath, redirect, renderMatches, resolvePath, useActionData, useAsyncError, useAsyncValue, useHref, useInRouterContext, useLoaderData, useLocation, useMatch, useMatches, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRouteError, useRouteLoaderData, useRoutes } from 'react-router';\nimport { createRouter, createBrowserHistory, createHashHistory, ErrorResponse, invariant, joinPaths } from '@remix-run/router';\n\nfunction _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nconst defaultMethod = \"get\";\nconst defaultEncType = \"application/x-www-form-urlencoded\";\nfunction isHtmlElement(object) {\n return object != null && typeof object.tagName === \"string\";\n}\nfunction isButtonElement(object) {\n return isHtmlElement(object) && object.tagName.toLowerCase() === \"button\";\n}\nfunction isFormElement(object) {\n return isHtmlElement(object) && object.tagName.toLowerCase() === \"form\";\n}\nfunction isInputElement(object) {\n return isHtmlElement(object) && object.tagName.toLowerCase() === \"input\";\n}\n\nfunction isModifiedEvent(event) {\n return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);\n}\n\nfunction shouldProcessLinkClick(event, target) {\n return event.button === 0 && ( // Ignore everything but left clicks\n !target || target === \"_self\") && // Let browser handle \"target=_blank\" etc.\n !isModifiedEvent(event) // Ignore clicks with modifier keys\n ;\n}\n/**\n * Creates a URLSearchParams object using the given initializer.\n *\n * This is identical to `new URLSearchParams(init)` except it also\n * supports arrays as values in the object form of the initializer\n * instead of just strings. This is convenient when you need multiple\n * values for a given key, but don't want to use an array initializer.\n *\n * For example, instead of:\n *\n * let searchParams = new URLSearchParams([\n * ['sort', 'name'],\n * ['sort', 'price']\n * ]);\n *\n * you can do:\n *\n * let searchParams = createSearchParams({\n * sort: ['name', 'price']\n * });\n */\n\nfunction createSearchParams(init) {\n if (init === void 0) {\n init = \"\";\n }\n\n return new URLSearchParams(typeof init === \"string\" || Array.isArray(init) || init instanceof URLSearchParams ? init : Object.keys(init).reduce((memo, key) => {\n let value = init[key];\n return memo.concat(Array.isArray(value) ? value.map(v => [key, v]) : [[key, value]]);\n }, []));\n}\nfunction getSearchParamsForLocation(locationSearch, defaultSearchParams) {\n let searchParams = createSearchParams(locationSearch);\n\n for (let key of defaultSearchParams.keys()) {\n if (!searchParams.has(key)) {\n defaultSearchParams.getAll(key).forEach(value => {\n searchParams.append(key, value);\n });\n }\n }\n\n return searchParams;\n}\nfunction getFormSubmissionInfo(target, defaultAction, options) {\n let method;\n let action;\n let encType;\n let formData;\n\n if (isFormElement(target)) {\n let submissionTrigger = options.submissionTrigger;\n method = options.method || target.getAttribute(\"method\") || defaultMethod;\n action = options.action || target.getAttribute(\"action\") || defaultAction;\n encType = options.encType || target.getAttribute(\"enctype\") || defaultEncType;\n formData = new FormData(target);\n\n if (submissionTrigger && submissionTrigger.name) {\n formData.append(submissionTrigger.name, submissionTrigger.value);\n }\n } else if (isButtonElement(target) || isInputElement(target) && (target.type === \"submit\" || target.type === \"image\")) {\n let form = target.form;\n\n if (form == null) {\n throw new Error(\"Cannot submit a <button> or <input type=\\\"submit\\\"> without a <form>\");\n } // <button>/<input type=\"submit\"> may override attributes of <form>\n\n\n method = options.method || target.getAttribute(\"formmethod\") || form.getAttribute(\"method\") || defaultMethod;\n action = options.action || target.getAttribute(\"formaction\") || form.getAttribute(\"action\") || defaultAction;\n encType = options.encType || target.getAttribute(\"formenctype\") || form.getAttribute(\"enctype\") || defaultEncType;\n formData = new FormData(form); // Include name + value from a <button>, appending in case the button name\n // matches an existing input name\n\n if (target.name) {\n formData.append(target.name, target.value);\n }\n } else if (isHtmlElement(target)) {\n throw new Error(\"Cannot submit element that is not <form>, <button>, or \" + \"<input type=\\\"submit|image\\\">\");\n } else {\n method = options.method || defaultMethod;\n action = options.action || defaultAction;\n encType = options.encType || defaultEncType;\n\n if (target instanceof FormData) {\n formData = target;\n } else {\n formData = new FormData();\n\n if (target instanceof URLSearchParams) {\n for (let [name, value] of target) {\n formData.append(name, value);\n }\n } else if (target != null) {\n for (let name of Object.keys(target)) {\n formData.append(name, target[name]);\n }\n }\n }\n }\n\n let {\n protocol,\n host\n } = window.location;\n let url = new URL(action, protocol + \"//\" + host);\n return {\n url,\n method: method.toLowerCase(),\n encType,\n formData\n };\n}\n\nconst _excluded = [\"onClick\", \"relative\", \"reloadDocument\", \"replace\", \"state\", \"target\", \"to\", \"preventScrollReset\"],\n _excluded2 = [\"aria-current\", \"caseSensitive\", \"className\", \"end\", \"style\", \"to\", \"children\"],\n _excluded3 = [\"reloadDocument\", \"replace\", \"method\", \"action\", \"onSubmit\", \"fetcherKey\", \"routeId\", \"relative\"];\n//#region Routers\n////////////////////////////////////////////////////////////////////////////////\n\nfunction createBrowserRouter(routes, opts) {\n return createRouter({\n basename: opts == null ? void 0 : opts.basename,\n history: createBrowserHistory({\n window: opts == null ? void 0 : opts.window\n }),\n hydrationData: (opts == null ? void 0 : opts.hydrationData) || parseHydrationData(),\n routes: UNSAFE_enhanceManualRouteObjects(routes)\n }).initialize();\n}\nfunction createHashRouter(routes, opts) {\n return createRouter({\n basename: opts == null ? void 0 : opts.basename,\n history: createHashHistory({\n window: opts == null ? void 0 : opts.window\n }),\n hydrationData: (opts == null ? void 0 : opts.hydrationData) || parseHydrationData(),\n routes: UNSAFE_enhanceManualRouteObjects(routes)\n }).initialize();\n}\n\nfunction parseHydrationData() {\n var _window;\n\n let state = (_window = window) == null ? void 0 : _window.__staticRouterHydrationData;\n\n if (state && state.errors) {\n state = _extends({}, state, {\n errors: deserializeErrors(state.errors)\n });\n }\n\n return state;\n}\n\nfunction deserializeErrors(errors) {\n if (!errors) return null;\n let entries = Object.entries(errors);\n let serialized = {};\n\n for (let [key, val] of entries) {\n // Hey you! If you change this, please change the corresponding logic in\n // serializeErrors in react-router-dom/server.tsx :)\n if (val && val.__type === \"RouteErrorResponse\") {\n serialized[key] = new ErrorResponse(val.status, val.statusText, val.data, val.internal === true);\n } else if (val && val.__type === \"Error\") {\n let error = new Error(val.message); // Wipe away the client-side stack trace. Nothing to fill it in with\n // because we don't serialize SSR stack traces for security reasons\n\n error.stack = \"\";\n serialized[key] = error;\n } else {\n serialized[key] = val;\n }\n }\n\n return serialized;\n}\n/**\n * A `<Router>` for use in web browsers. Provides the cleanest URLs.\n */\n\n\nfunction BrowserRouter(_ref) {\n let {\n basename,\n children,\n window\n } = _ref;\n let historyRef = React.useRef();\n\n if (historyRef.current == null) {\n historyRef.current = createBrowserHistory({\n window,\n v5Compat: true\n });\n }\n\n let history = historyRef.current;\n let [state, setState] = React.useState({\n action: history.action,\n location: history.location\n });\n React.useLayoutEffect(() => history.listen(setState), [history]);\n return /*#__PURE__*/React.createElement(Router, {\n basename: basename,\n children: children,\n location: state.location,\n navigationType: state.action,\n navigator: history\n });\n}\n/**\n * A `<Router>` for use in web browsers. Stores the location in the hash\n * portion of the URL so it is not sent to the server.\n */\n\nfunction HashRouter(_ref2) {\n let {\n basename,\n children,\n window\n } = _ref2;\n let historyRef = React.useRef();\n\n if (historyRef.current == null) {\n historyRef.current = createHashHistory({\n window,\n v5Compat: true\n });\n }\n\n let history = historyRef.current;\n let [state, setState] = React.useState({\n action: history.action,\n location: history.location\n });\n React.useLayoutEffect(() => history.listen(setState), [history]);\n return /*#__PURE__*/React.createElement(Router, {\n basename: basename,\n children: children,\n location: state.location,\n navigationType: state.action,\n navigator: history\n });\n}\n/**\n * A `<Router>` that accepts a pre-instantiated history object. It's important\n * to note that using your own history object is highly discouraged and may add\n * two versions of the history library to your bundles unless you use the same\n * version of the history library that React Router uses internally.\n */\n\nfunction HistoryRouter(_ref3) {\n let {\n basename,\n children,\n history\n } = _ref3;\n const [state, setState] = React.useState({\n action: history.action,\n location: history.location\n });\n React.useLayoutEffect(() => history.listen(setState), [history]);\n return /*#__PURE__*/React.createElement(Router, {\n basename: basename,\n children: children,\n location: state.location,\n navigationType: state.action,\n navigator: history\n });\n}\n\nif (process.env.NODE_ENV !== \"production\") {\n HistoryRouter.displayName = \"unstable_HistoryRouter\";\n}\n/**\n * The public API for rendering a history-aware <a>.\n */\n\nconst Link = /*#__PURE__*/React.forwardRef(function LinkWithRef(_ref4, ref) {\n let {\n onClick,\n relative,\n reloadDocument,\n replace,\n state,\n target,\n to,\n preventScrollReset\n } = _ref4,\n rest = _objectWithoutPropertiesLoose(_ref4, _excluded);\n\n let href = useHref(to, {\n relative\n });\n let internalOnClick = useLinkClickHandler(to, {\n replace,\n state,\n target,\n preventScrollReset,\n relative\n });\n\n function handleClick(event) {\n if (onClick) onClick(event);\n\n if (!event.defaultPrevented) {\n internalOnClick(event);\n }\n }\n\n return (\n /*#__PURE__*/\n // eslint-disable-next-line jsx-a11y/anchor-has-content\n React.createElement(\"a\", _extends({}, rest, {\n href: href,\n onClick: reloadDocument ? onClick : handleClick,\n ref: ref,\n target: target\n }))\n );\n});\n\nif (process.env.NODE_ENV !== \"production\") {\n Link.displayName = \"Link\";\n}\n/**\n * A <Link> wrapper that knows if it's \"active\" or not.\n */\n\n\nconst NavLink = /*#__PURE__*/React.forwardRef(function NavLinkWithRef(_ref5, ref) {\n let {\n \"aria-current\": ariaCurrentProp = \"page\",\n caseSensitive = false,\n className: classNameProp = \"\",\n end = false,\n style: styleProp,\n to,\n children\n } = _ref5,\n rest = _objectWithoutPropertiesLoose(_ref5, _excluded2);\n\n let path = useResolvedPath(to, {\n relative: rest.relative\n });\n let location = useLocation();\n let routerState = React.useContext(UNSAFE_DataRouterStateContext);\n let {\n navigator\n } = React.useContext(UNSAFE_NavigationContext);\n let toPathname = navigator.encodeLocation ? navigator.encodeLocation(path).pathname : path.pathname;\n let locationPathname = location.pathname;\n let nextLocationPathname = routerState && routerState.navigation && routerState.navigation.location ? routerState.navigation.location.pathname : null;\n\n if (!caseSensitive) {\n locationPathname = locationPathname.toLowerCase();\n nextLocationPathname = nextLocationPathname ? nextLocationPathname.toLowerCase() : null;\n toPathname = toPathname.toLowerCase();\n }\n\n let isActive = locationPathname === toPathname || !end && locationPathname.startsWith(toPathname) && locationPathname.charAt(toPathname.length) === \"/\";\n let isPending = nextLocationPathname != null && (nextLocationPathname === toPathname || !end && nextLocationPathname.startsWith(toPathname) && nextLocationPathname.charAt(toPathname.length) === \"/\");\n let ariaCurrent = isActive ? ariaCurrentProp : undefined;\n let className;\n\n if (typeof classNameProp === \"function\") {\n className = classNameProp({\n isActive,\n isPending\n });\n } else {\n // If the className prop is not a function, we use a default `active`\n // class for <NavLink />s that are active. In v5 `active` was the default\n // value for `activeClassName`, but we are removing that API and can still\n // use the old default behavior for a cleaner upgrade path and keep the\n // simple styling rules working as they currently do.\n className = [classNameProp, isActive ? \"active\" : null, isPending ? \"pending\" : null].filter(Boolean).join(\" \");\n }\n\n let style = typeof styleProp === \"function\" ? styleProp({\n isActive,\n isPending\n }) : styleProp;\n return /*#__PURE__*/React.createElement(Link, _extends({}, rest, {\n \"aria-current\": ariaCurrent,\n className: className,\n ref: ref,\n style: style,\n to: to\n }), typeof children === \"function\" ? children({\n isActive,\n isPending\n }) : children);\n});\n\nif (process.env.NODE_ENV !== \"production\") {\n NavLink.displayName = \"NavLink\";\n}\n/**\n * A `@remix-run/router`-aware `<form>`. It behaves like a normal form except\n * that the interaction with the server is with `fetch` instead of new document\n * requests, allowing components to add nicer UX to the page as the form is\n * submitted and returns with data.\n */\n\n\nconst Form = /*#__PURE__*/React.forwardRef((props, ref) => {\n return /*#__PURE__*/React.createElement(FormImpl, _extends({}, props, {\n ref: ref\n }));\n});\n\nif (process.env.NODE_ENV !== \"production\") {\n Form.displayName = \"Form\";\n}\n\nconst FormImpl = /*#__PURE__*/React.forwardRef((_ref6, forwardedRef) => {\n let {\n reloadDocument,\n replace,\n method = defaultMethod,\n action,\n onSubmit,\n fetcherKey,\n routeId,\n relative\n } = _ref6,\n props = _objectWithoutPropertiesLoose(_ref6, _excluded3);\n\n let submit = useSubmitImpl(fetcherKey, routeId);\n let formMethod = method.toLowerCase() === \"get\" ? \"get\" : \"post\";\n let formAction = useFormAction(action, {\n relative\n });\n\n let submitHandler = event => {\n onSubmit && onSubmit(event);\n if (event.defaultPrevented) return;\n event.preventDefault();\n let submitter = event.nativeEvent.submitter;\n let submitMethod = (submitter == null ? void 0 : submitter.getAttribute(\"formmethod\")) || method;\n submit(submitter || event.currentTarget, {\n method: submitMethod,\n replace,\n relative\n });\n };\n\n return /*#__PURE__*/React.createElement(\"form\", _extends({\n ref: forwardedRef,\n method: formMethod,\n action: formAction,\n onSubmit: reloadDocument ? onSubmit : submitHandler\n }, props));\n});\n\nif (process.env.NODE_ENV !== \"production\") {\n FormImpl.displayName = \"FormImpl\";\n}\n/**\n * This component will emulate the browser's scroll restoration on location\n * changes.\n */\n\n\nfunction ScrollRestoration(_ref7) {\n let {\n getKey,\n storageKey\n } = _ref7;\n useScrollRestoration({\n getKey,\n storageKey\n });\n return null;\n}\n\nif (process.env.NODE_ENV !== \"production\") {\n ScrollRestoration.displayName = \"ScrollRestoration\";\n} //#endregion\n////////////////////////////////////////////////////////////////////////////////\n//#region Hooks\n////////////////////////////////////////////////////////////////////////////////\n\n\nvar DataRouterHook;\n\n(function (DataRouterHook) {\n DataRouterHook[\"UseScrollRestoration\"] = \"useScrollRestoration\";\n DataRouterHook[\"UseSubmitImpl\"] = \"useSubmitImpl\";\n DataRouterHook[\"UseFetcher\"] = \"useFetcher\";\n})(DataRouterHook || (DataRouterHook = {}));\n\nvar DataRouterStateHook;\n\n(function (DataRouterStateHook) {\n DataRouterStateHook[\"UseFetchers\"] = \"useFetchers\";\n DataRouterStateHook[\"UseScrollRestoration\"] = \"useScrollRestoration\";\n})(DataRouterStateHook || (DataRouterStateHook = {}));\n\nfunction getDataRouterConsoleError(hookName) {\n return hookName + \" must be used within a data router. See https://reactrouter.com/routers/picking-a-router.\";\n}\n\nfunction useDataRouterContext(hookName) {\n let ctx = React.useContext(UNSAFE_DataRouterContext);\n !ctx ? process.env.NODE_ENV !== \"production\" ? invariant(false, getDataRouterConsoleError(hookName)) : invariant(false) : void 0;\n return ctx;\n}\n\nfunction useDataRouterState(hookName) {\n let state = React.useContext(UNSAFE_DataRouterStateContext);\n !state ? process.env.NODE_ENV !== \"production\" ? invariant(false, getDataRouterConsoleError(hookName)) : invariant(false) : void 0;\n return state;\n}\n/**\n * Handles the click behavior for router `<Link>` components. This is useful if\n * you need to create custom `<Link>` components with the same click behavior we\n * use in our exported `<Link>`.\n */\n\n\nfunction useLinkClickHandler(to, _temp) {\n let {\n target,\n replace: replaceProp,\n state,\n preventScrollReset,\n relative\n } = _temp === void 0 ? {} : _temp;\n let navigate = useNavigate();\n let location = useLocation();\n let path = useResolvedPath(to, {\n relative\n });\n return React.useCallback(event => {\n if (shouldProcessLinkClick(event, target)) {\n event.preventDefault(); // If the URL hasn't changed, a regular <a> will do a replace instead of\n // a push, so do the same here unless the replace prop is explicitly set\n\n let replace = replaceProp !== undefined ? replaceProp : createPath(location) === createPath(path);\n navigate(to, {\n replace,\n state,\n preventScrollReset,\n relative\n });\n }\n }, [location, navigate, path, replaceProp, state, target, to, preventScrollReset, relative]);\n}\n/**\n * A convenient wrapper for reading and writing search parameters via the\n * URLSearchParams interface.\n */\n\nfunction useSearchParams(defaultInit) {\n process.env.NODE_ENV !== \"production\" ? warning(typeof URLSearchParams !== \"undefined\", \"You cannot use the `useSearchParams` hook in a browser that does not \" + \"support the URLSearchParams API. If you need to support Internet \" + \"Explorer 11, we recommend you load a polyfill such as \" + \"https://github.com/ungap/url-search-params\\n\\n\" + \"If you're unsure how to load polyfills, we recommend you check out \" + \"https://polyfill.io/v3/ which provides some recommendations about how \" + \"to load polyfills only for users that need them, instead of for every \" + \"user.\") : void 0;\n let defaultSearchParamsRef = React.useRef(createSearchParams(defaultInit));\n let location = useLocation();\n let searchParams = React.useMemo(() => getSearchParamsForLocation(location.search, defaultSearchParamsRef.current), [location.search]);\n let navigate = useNavigate();\n let setSearchParams = React.useCallback((nextInit, navigateOptions) => {\n const newSearchParams = createSearchParams(typeof nextInit === \"function\" ? nextInit(searchParams) : nextInit);\n navigate(\"?\" + newSearchParams, navigateOptions);\n }, [navigate, searchParams]);\n return [searchParams, setSearchParams];\n}\n/**\n * Returns a function that may be used to programmatically submit a form (or\n * some arbitrary data) to the server.\n */\n\nfunction useSubmit() {\n return useSubmitImpl();\n}\n\nfunction useSubmitImpl(fetcherKey, routeId) {\n let {\n router\n } = useDataRouterContext(DataRouterHook.UseSubmitImpl);\n let defaultAction = useFormAction();\n return React.useCallback(function (target, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof document === \"undefined\") {\n throw new Error(\"You are calling submit during the server render. \" + \"Try calling submit within a `useEffect` or callback instead.\");\n }\n\n let {\n method,\n encType,\n formData,\n url\n } = getFormSubmissionInfo(target, defaultAction, options);\n let href = url.pathname + url.search;\n let opts = {\n replace: options.replace,\n formData,\n formMethod: method,\n formEncType: encType\n };\n\n if (fetcherKey) {\n !(routeId != null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"No routeId available for useFetcher()\") : invariant(false) : void 0;\n router.fetch(fetcherKey, routeId, href, opts);\n } else {\n router.navigate(href, opts);\n }\n }, [defaultAction, router, fetcherKey, routeId]);\n}\n\nfunction useFormAction(action, _temp2) {\n let {\n relative\n } = _temp2 === void 0 ? {} : _temp2;\n let {\n basename\n } = React.useContext(UNSAFE_NavigationContext);\n let routeContext = React.useContext(UNSAFE_RouteContext);\n !routeContext ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"useFormAction must be used inside a RouteContext\") : invariant(false) : void 0;\n let [match] = routeContext.matches.slice(-1); // Shallow clone path so we can modify it below, otherwise we modify the\n // object referenced by useMemo inside useResolvedPath\n\n let path = _extends({}, useResolvedPath(action ? action : \".\", {\n relative\n })); // Previously we set the default action to \".\". The problem with this is that\n // `useResolvedPath(\".\")` excludes search params and the hash of the resolved\n // URL. This is the intended behavior of when \".\" is specifically provided as\n // the form action, but inconsistent w/ browsers when the action is omitted.\n // https://github.com/remix-run/remix/issues/927\n\n\n let location = useLocation();\n\n if (action == null) {\n // Safe to write to these directly here since if action was undefined, we\n // would have called useResolvedPath(\".\") which will never include a search\n // or hash\n path.search = location.search;\n path.hash = location.hash; // When grabbing search params from the URL, remove the automatically\n // inserted ?index param so we match the useResolvedPath search behavior\n // which would not include ?index\n\n if (match.route.index) {\n let params = new URLSearchParams(path.search);\n params.delete(\"index\");\n path.search = params.toString() ? \"?\" + params.toString() : \"\";\n }\n }\n\n if ((!action || action === \".\") && match.route.index) {\n path.search = path.search ? path.search.replace(/^\\?/, \"?index&\") : \"?index\";\n } // If we're operating within a basename, prepend it to the pathname prior\n // to creating the form action. If this is a root navigation, then just use\n // the raw basename which allows the basename to have full control over the\n // presence of a trailing slash on root actions\n\n\n if (basename !== \"/\") {\n path.pathname = path.pathname === \"/\" ? basename : joinPaths([basename, path.pathname]);\n }\n\n return createPath(path);\n}\n\nfunction createFetcherForm(fetcherKey, routeId) {\n let FetcherForm = /*#__PURE__*/React.forwardRef((props, ref) => {\n return /*#__PURE__*/React.createElement(FormImpl, _extends({}, props, {\n ref: ref,\n fetcherKey: fetcherKey,\n routeId: routeId\n }));\n });\n\n if (process.env.NODE_ENV !== \"production\") {\n FetcherForm.displayName = \"fetcher.Form\";\n }\n\n return FetcherForm;\n}\n\nlet fetcherId = 0;\n/**\n * Interacts with route loaders and actions without causing a navigation. Great\n * for any interaction that stays on the same page.\n */\n\nfunction useFetcher() {\n var _route$matches;\n\n let {\n router\n } = useDataRouterContext(DataRouterHook.UseFetcher);\n let route = React.useContext(UNSAFE_RouteContext);\n !route ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"useFetcher must be used inside a RouteContext\") : invariant(false) : void 0;\n let routeId = (_route$matches = route.matches[route.matches.length - 1]) == null ? void 0 : _route$matches.route.id;\n !(routeId != null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"useFetcher can only be used on routes that contain a unique \\\"id\\\"\") : invariant(false) : void 0;\n let [fetcherKey] = React.useState(() => String(++fetcherId));\n let [Form] = React.useState(() => {\n !routeId ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"No routeId available for fetcher.Form()\") : invariant(false) : void 0;\n return createFetcherForm(fetcherKey, routeId);\n });\n let [load] = React.useState(() => href => {\n !router ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"No router available for fetcher.load()\") : invariant(false) : void 0;\n !routeId ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"No routeId available for fetcher.load()\") : invariant(false) : void 0;\n router.fetch(fetcherKey, routeId, href);\n });\n let submit = useSubmitImpl(fetcherKey, routeId);\n let fetcher = router.getFetcher(fetcherKey);\n let fetcherWithComponents = React.useMemo(() => _extends({\n Form,\n submit,\n load\n }, fetcher), [fetcher, Form, submit, load]);\n React.useEffect(() => {\n // Is this busted when the React team gets real weird and calls effects\n // twice on mount? We really just need to garbage collect here when this\n // fetcher is no longer around.\n return () => {\n if (!router) {\n console.warn(\"No fetcher available to clean up from useFetcher()\");\n return;\n }\n\n router.deleteFetcher(fetcherKey);\n };\n }, [router, fetcherKey]);\n return fetcherWithComponents;\n}\n/**\n * Provides all fetchers currently on the page. Useful for layouts and parent\n * routes that need to provide pending/optimistic UI regarding the fetch.\n */\n\nfunction useFetchers() {\n let state = useDataRouterState(DataRouterStateHook.UseFetchers);\n return [...state.fetchers.values()];\n}\nconst SCROLL_RESTORATION_STORAGE_KEY = \"react-router-scroll-positions\";\nlet savedScrollPositions = {};\n/**\n * When rendered inside a RouterProvider, will restore scroll positions on navigations\n */\n\nfunction useScrollRestoration(_temp3) {\n let {\n getKey,\n storageKey\n } = _temp3 === void 0 ? {} : _temp3;\n let {\n router\n } = useDataRouterContext(DataRouterHook.UseScrollRestoration);\n let {\n restoreScrollPosition,\n preventScrollReset\n } = useDataRouterState(DataRouterStateHook.UseScrollRestoration);\n let location = useLocation();\n let matches = useMatches();\n let navigation = useNavigation(); // Trigger manual scroll restoration while we're active\n\n React.useEffect(() => {\n window.history.scrollRestoration = \"manual\";\n return () => {\n window.history.scrollRestoration = \"auto\";\n };\n }, []); // Save positions on unload\n\n useBeforeUnload(React.useCallback(() => {\n if (navigation.state === \"idle\") {\n let key = (getKey ? getKey(location, matches) : null) || location.key;\n savedScrollPositions[key] = window.scrollY;\n }\n\n sessionStorage.setItem(storageKey || SCROLL_RESTORATION_STORAGE_KEY, JSON.stringify(savedScrollPositions));\n window.history.scrollRestoration = \"auto\";\n }, [storageKey, getKey, navigation.state, location, matches])); // Read in any saved scroll locations\n\n if (typeof document !== \"undefined\") {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useLayoutEffect(() => {\n try {\n let sessionPositions = sessionStorage.getItem(storageKey || SCROLL_RESTORATION_STORAGE_KEY);\n\n if (sessionPositions) {\n savedScrollPositions = JSON.parse(sessionPositions);\n }\n } catch (e) {// no-op, use default empty object\n }\n }, [storageKey]); // Enable scroll restoration in the router\n // eslint-disable-next-line react-hooks/rules-of-hooks\n\n React.useLayoutEffect(() => {\n let disableScrollRestoration = router == null ? void 0 : router.enableScrollRestoration(savedScrollPositions, () => window.scrollY, getKey);\n return () => disableScrollRestoration && disableScrollRestoration();\n }, [router, getKey]); // Restore scrolling when state.restoreScrollPosition changes\n // eslint-disable-next-line react-hooks/rules-of-hooks\n\n React.useLayoutEffect(() => {\n // Explicit false means don't do anything (used for submissions)\n if (restoreScrollPosition === false) {\n return;\n } // been here before, scroll to it\n\n\n if (typeof restoreScrollPosition === \"number\") {\n window.scrollTo(0, restoreScrollPosition);\n return;\n } // try to scroll to the hash\n\n\n if (location.hash) {\n let el = document.getElementById(location.hash.slice(1));\n\n if (el) {\n el.scrollIntoView();\n return;\n }\n } // Opt out of scroll reset if this link requested it\n\n\n if (preventScrollReset === true) {\n return;\n } // otherwise go to the top on new locations\n\n\n window.scrollTo(0, 0);\n }, [location, restoreScrollPosition, preventScrollReset]);\n }\n}\n/**\n * Setup a callback to be fired on the window's `beforeunload` event. This is\n * useful for saving some data to `window.localStorage` just before the page\n * refreshes.\n *\n * Note: The `callback` argument should be a function created with\n * `React.useCallback()`.\n */\n\n\nfunction useBeforeUnload(callback) {\n React.useEffect(() => {\n window.addEventListener(\"beforeunload\", callback);\n return () => {\n window.removeEventListener(\"beforeunload\", callback);\n };\n }, [callback]);\n} //#endregion\n////////////////////////////////////////////////////////////////////////////////\n//#region Utils\n////////////////////////////////////////////////////////////////////////////////\n\nfunction warning(cond, message) {\n if (!cond) {\n // eslint-disable-next-line no-console\n if (typeof console !== \"undefined\") console.warn(message);\n\n try {\n // Welcome to debugging React Router!\n //\n // This error is thrown as a convenience so you can more easily\n // find the source for a warning that appears in the console by\n // enabling \"pause on exceptions\" in your JavaScript debugger.\n throw new Error(message); // eslint-disable-next-line no-empty\n } catch (e) {}\n }\n} //#endregion\n\nexport { BrowserRouter, Form, HashRouter, Link, NavLink, ScrollRestoration, useScrollRestoration as UNSAFE_useScrollRestoration, createBrowserRouter, createHashRouter, createSearchParams, HistoryRouter as unstable_HistoryRouter, useBeforeUnload, useFetcher, useFetchers, useFormAction, useLinkClickHandler, useSearchParams, useSubmit };\n//# sourceMappingURL=index.js.map\n","var functionDebounce = debounce;\n\nfunction debounce(fn, wait, callFirst) {\n var timeout = null;\n var debouncedFn = null;\n\n var clear = function() {\n if (timeout) {\n clearTimeout(timeout);\n\n debouncedFn = null;\n timeout = null;\n }\n };\n\n var flush = function() {\n var call = debouncedFn;\n clear();\n\n if (call) {\n call();\n }\n };\n\n var debounceWrapper = function() {\n if (!wait) {\n return fn.apply(this, arguments);\n }\n\n var context = this;\n var args = arguments;\n var callNow = callFirst && !timeout;\n clear();\n\n debouncedFn = function() {\n fn.apply(context, args);\n };\n\n timeout = setTimeout(function() {\n timeout = null;\n\n if (!callNow) {\n var call = debouncedFn;\n debouncedFn = null;\n\n return call();\n }\n }, wait);\n\n if (callNow) {\n return debouncedFn();\n }\n };\n\n debounceWrapper.cancel = clear;\n debounceWrapper.flush = flush;\n\n return debounceWrapper;\n}\n\nexport {functionDebounce as default};\n","/*!\n * swiped-events.js - v@version@\n * Pure JavaScript swipe events\n * https://github.com/john-doherty/swiped-events\n * @inspiration https://stackoverflow.com/questions/16348031/disable-scrolling-when-touch-moving-certain-element\n * @author John Doherty <www.johndoherty.info>\n * @license MIT\n */\n(function (window, document) {\n\n 'use strict';\n\n // patch CustomEvent to allow constructor creation (IE/Chrome)\n if (typeof window.CustomEvent !== 'function') {\n\n window.CustomEvent = function (event, params) {\n\n params = params || { bubbles: false, cancelable: false, detail: undefined };\n\n var evt = document.createEvent('CustomEvent');\n evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);\n return evt;\n };\n\n window.CustomEvent.prototype = window.Event.prototype;\n }\n\n document.addEventListener('touchstart', handleTouchStart, false);\n document.addEventListener('touchmove', handleTouchMove, false);\n document.addEventListener('touchend', handleTouchEnd, false);\n\n var xDown = null;\n var yDown = null;\n var xDiff = null;\n var yDiff = null;\n var timeDown = null;\n var startEl = null;\n var touchCount = 0;\n\n /**\n * Fires swiped event if swipe detected on touchend\n * @param {object} e - browser event object\n * @returns {void}\n */\n function handleTouchEnd(e) {\n\n // if the user released on a different target, cancel!\n if (startEl !== e.target) return;\n\n var swipeThreshold = parseInt(getNearestAttribute(startEl, 'data-swipe-threshold', '20'), 10); // default 20 units\n var swipeUnit = getNearestAttribute(startEl, 'data-swipe-unit', 'px'); // default px\n var swipeTimeout = parseInt(getNearestAttribute(startEl, 'data-swipe-timeout', '500'), 10); // default 500ms\n var timeDiff = Date.now() - timeDown;\n var eventType = '';\n var changedTouches = e.changedTouches || e.touches || [];\n\n if (swipeUnit === 'vh') {\n swipeThreshold = Math.round((swipeThreshold / 100) * document.documentElement.clientHeight); // get percentage of viewport height in pixels\n }\n if (swipeUnit === 'vw') {\n swipeThreshold = Math.round((swipeThreshold / 100) * document.documentElement.clientWidth); // get percentage of viewport height in pixels\n }\n\n if (Math.abs(xDiff) > Math.abs(yDiff)) { // most significant\n if (Math.abs(xDiff) > swipeThreshold && timeDiff < swipeTimeout) {\n if (xDiff > 0) {\n eventType = 'swiped-left';\n }\n else {\n eventType = 'swiped-right';\n }\n }\n }\n else if (Math.abs(yDiff) > swipeThreshold && timeDiff < swipeTimeout) {\n if (yDiff > 0) {\n eventType = 'swiped-up';\n }\n else {\n eventType = 'swiped-down';\n }\n }\n\n if (eventType !== '') {\n\n var eventData = {\n dir: eventType.replace(/swiped-/, ''),\n touchType: (changedTouches[0] || {}).touchType || 'direct',\n fingers: touchCount, // Number of fingers used\n xStart: parseInt(xDown, 10),\n xEnd: parseInt((changedTouches[0] || {}).clientX || -1, 10),\n yStart: parseInt(yDown, 10),\n yEnd: parseInt((changedTouches[0] || {}).clientY || -1, 10)\n };\n\n // fire `swiped` event event on the element that started the swipe\n startEl.dispatchEvent(new CustomEvent('swiped', { bubbles: true, cancelable: true, detail: eventData }));\n\n // fire `swiped-dir` event on the element that started the swipe\n startEl.dispatchEvent(new CustomEvent(eventType, { bubbles: true, cancelable: true, detail: eventData }));\n }\n\n // reset values\n xDown = null;\n yDown = null;\n timeDown = null;\n }\n /**\n * Records current location on touchstart event\n * @param {object} e - browser event object\n * @returns {void}\n */\n function handleTouchStart(e) {\n\n // if the element has data-swipe-ignore=\"true\" we stop listening for swipe events\n if (e.target.getAttribute('data-swipe-ignore') === 'true') return;\n\n startEl = e.target;\n\n timeDown = Date.now();\n xDown = e.touches[0].clientX;\n yDown = e.touches[0].clientY;\n xDiff = 0;\n yDiff = 0;\n touchCount = e.touches.length;\n }\n\n /**\n * Records location diff in px on touchmove event\n * @param {object} e - browser event object\n * @returns {void}\n */\n function handleTouchMove(e) {\n\n if (!xDown || !yDown) return;\n\n var xUp = e.touches[0].clientX;\n var yUp = e.touches[0].clientY;\n\n xDiff = xDown - xUp;\n yDiff = yDown - yUp;\n }\n\n /**\n * Gets attribute off HTML element or nearest parent\n * @param {object} el - HTML element to retrieve attribute from\n * @param {string} attributeName - name of the attribute\n * @param {any} defaultValue - default value to return if no match found\n * @returns {any} attribute value or defaultValue\n */\n function getNearestAttribute(el, attributeName, defaultValue) {\n\n // walk up the dom tree looking for attributeName\n while (el && el !== document.documentElement) {\n\n var attributeValue = el.getAttribute(attributeName);\n\n if (attributeValue) {\n return attributeValue;\n }\n\n el = el.parentNode;\n }\n\n return defaultValue;\n }\n\n}(window, document));\n","const e=Symbol(),t=Symbol(),r=\"a\",n=\"w\";let o=(e,t)=>new Proxy(e,t);const s=Object.getPrototypeOf,c=new WeakMap,l=e=>e&&(c.has(e)?c.get(e):s(e)===Object.prototype||s(e)===Array.prototype),f=e=>\"object\"==typeof e&&null!==e,i=new WeakMap,a=e=>e[t]||e,u=(c,f,p)=>{if(!l(c))return c;const y=a(c),g=(e=>Object.isFrozen(e)||Object.values(Object.getOwnPropertyDescriptors(e)).some(e=>!e.writable))(y);let h=p&&p.get(y);return h&&h[1].f===g||(h=((o,s)=>{const c={f:s};let l=!1;const f=(e,t)=>{if(!l){let s=c[r].get(o);if(s||(s={},c[r].set(o,s)),e===n)s[n]=!0;else{let r=s[e];r||(r=new Set,s[e]=r),r.add(t)}}},i={get:(e,n)=>n===t?o:(f(\"k\",n),u(Reflect.get(e,n),c[r],c.c)),has:(t,n)=>n===e?(l=!0,c[r].delete(o),!0):(f(\"h\",n),Reflect.has(t,n)),getOwnPropertyDescriptor:(e,t)=>(f(\"o\",t),Reflect.getOwnPropertyDescriptor(e,t)),ownKeys:e=>(f(n),Reflect.ownKeys(e))};return s&&(i.set=i.deleteProperty=()=>!1),[i,c]})(y,g),h[1].p=o(g?(e=>{let t=i.get(e);if(!t){if(Array.isArray(e))t=Array.from(e);else{const r=Object.getOwnPropertyDescriptors(e);Object.values(r).forEach(e=>{e.configurable=!0}),t=Object.create(s(e),r)}i.set(e,t)}return t})(y):y,h[0]),p&&p.set(y,h)),h[1][r]=f,h[1].c=p,h[1].p},p=(e,t,r,o)=>{if(Object.is(e,t))return!1;if(!f(e)||!f(t))return!0;const s=r.get(a(e));if(!s)return!0;if(o){const r=o.get(e);if(r&&r.n===t)return r.g;o.set(e,{n:t,g:!1})}let c=null;try{for(const r of s.h||[])if(c=Reflect.has(e,r)!==Reflect.has(t,r),c)return c;if(!0===s[n]){if(c=((e,t)=>{const r=Reflect.ownKeys(e),n=Reflect.ownKeys(t);return r.length!==n.length||r.some((e,t)=>e!==n[t])})(e,t),c)return c}else for(const r of s.o||[])if(c=!!Reflect.getOwnPropertyDescriptor(e,r)!=!!Reflect.getOwnPropertyDescriptor(t,r),c)return c;for(const n of s.k||[])if(c=p(e[n],t[n],r,o),c)return c;return null===c&&(c=!0),c}finally{o&&o.set(e,{n:t,g:c})}},y=t=>!!l(t)&&e in t,g=e=>l(e)&&e[t]||null,h=(e,t=!0)=>{c.set(e,t)},w=(e,t,r)=>{const o=[],s=new WeakSet,c=(e,l)=>{if(s.has(e))return;f(e)&&s.add(e);const i=f(e)&&t.get(a(e));if(i){var u,p;if(null==(u=i.h)||u.forEach(e=>{const t=`:has(${String(e)})`;o.push(l?[...l,t]:[t])}),!0===i[n]){const e=\":ownKeys\";o.push(l?[...l,e]:[e])}else{var y;null==(y=i.o)||y.forEach(e=>{const t=`:hasOwn(${String(e)})`;o.push(l?[...l,t]:[t])})}null==(p=i.k)||p.forEach(t=>{r&&!(\"value\"in(Object.getOwnPropertyDescriptor(e,t)||{}))||c(e[t],l?[...l,t]:[t])})}else l&&o.push(l)};return c(e),o},O=e=>{o=e};export{w as affectedToPathList,u as createProxy,g as getUntracked,p as isChanged,h as markToTrack,O as replaceNewProxy,y as trackMemo};\n//# sourceMappingURL=index.modern.mjs.map\n","import { markToTrack, getUntracked } from 'proxy-compare';\n\nconst isObject = (x) => typeof x === \"object\" && x !== null;\nconst proxyStateMap = /* @__PURE__ */ new WeakMap();\nconst refSet = /* @__PURE__ */ new WeakSet();\nconst buildProxyFunction = (objectIs = Object.is, newProxy = (target, handler) => new Proxy(target, handler), canProxy = (x) => isObject(x) && !refSet.has(x) && (Array.isArray(x) || !(Symbol.iterator in x)) && !(x instanceof WeakMap) && !(x instanceof WeakSet) && !(x instanceof Error) && !(x instanceof Number) && !(x instanceof Date) && !(x instanceof String) && !(x instanceof RegExp) && !(x instanceof ArrayBuffer), defaultHandlePromise = (promise) => {\n switch (promise.status) {\n case \"fulfilled\":\n return promise.value;\n case \"rejected\":\n throw promise.reason;\n default:\n throw promise;\n }\n}, snapCache = /* @__PURE__ */ new WeakMap(), createSnapshot = (target, version, handlePromise = defaultHandlePromise) => {\n const cache = snapCache.get(target);\n if ((cache == null ? void 0 : cache[0]) === version) {\n return cache[1];\n }\n const snap = Array.isArray(target) ? [] : Object.create(Object.getPrototypeOf(target));\n markToTrack(snap, true);\n snapCache.set(target, [version, snap]);\n Reflect.ownKeys(target).forEach((key) => {\n const value = Reflect.get(target, key);\n if (refSet.has(value)) {\n markToTrack(value, false);\n snap[key] = value;\n } else if (value instanceof Promise) {\n Object.defineProperty(snap, key, {\n get() {\n return handlePromise(value);\n }\n });\n } else if (proxyStateMap.has(value)) {\n snap[key] = snapshot(value, handlePromise);\n } else {\n snap[key] = value;\n }\n });\n return Object.freeze(snap);\n}, proxyCache = /* @__PURE__ */ new WeakMap(), versionHolder = [1, 1], proxyFunction2 = (initialObject) => {\n if (!isObject(initialObject)) {\n throw new Error(\"object required\");\n }\n const found = proxyCache.get(initialObject);\n if (found) {\n return found;\n }\n let version = versionHolder[0];\n const listeners = /* @__PURE__ */ new Set();\n const notifyUpdate = (op, nextVersion = ++versionHolder[0]) => {\n if (version !== nextVersion) {\n version = nextVersion;\n listeners.forEach((listener) => listener(op, nextVersion));\n }\n };\n let checkVersion = versionHolder[1];\n const ensureVersion = (nextCheckVersion = ++versionHolder[1]) => {\n if (checkVersion !== nextCheckVersion && !listeners.size) {\n checkVersion = nextCheckVersion;\n propProxyStates.forEach(([propProxyState]) => {\n const propVersion = propProxyState[1](nextCheckVersion);\n if (propVersion > version) {\n version = propVersion;\n }\n });\n }\n return version;\n };\n const createPropListener = (prop) => (op, nextVersion) => {\n const newOp = [...op];\n newOp[1] = [prop, ...newOp[1]];\n notifyUpdate(newOp, nextVersion);\n };\n const propProxyStates = /* @__PURE__ */ new Map();\n const addPropListener = (prop, propProxyState) => {\n if ((import.meta.env && import.meta.env.MODE) !== \"production\" && propProxyStates.has(prop)) {\n throw new Error(\"prop listener already exists\");\n }\n if (listeners.size) {\n const remove = propProxyState[3](createPropListener(prop));\n propProxyStates.set(prop, [propProxyState, remove]);\n } else {\n propProxyStates.set(prop, [propProxyState]);\n }\n };\n const removePropListener = (prop) => {\n var _a;\n const entry = propProxyStates.get(prop);\n if (entry) {\n propProxyStates.delete(prop);\n (_a = entry[1]) == null ? void 0 : _a.call(entry);\n }\n };\n const addListener = (listener) => {\n listeners.add(listener);\n if (listeners.size === 1) {\n propProxyStates.forEach(([propProxyState, prevRemove], prop) => {\n if ((import.meta.env && import.meta.env.MODE) !== \"production\" && prevRemove) {\n throw new Error(\"remove already exists\");\n }\n const remove = propProxyState[3](createPropListener(prop));\n propProxyStates.set(prop, [propProxyState, remove]);\n });\n }\n const removeListener = () => {\n listeners.delete(listener);\n if (listeners.size === 0) {\n propProxyStates.forEach(([propProxyState, remove], prop) => {\n if (remove) {\n remove();\n propProxyStates.set(prop, [propProxyState]);\n }\n });\n }\n };\n return removeListener;\n };\n const baseObject = Array.isArray(initialObject) ? [] : Object.create(Object.getPrototypeOf(initialObject));\n const handler = {\n deleteProperty(target, prop) {\n const prevValue = Reflect.get(target, prop);\n removePropListener(prop);\n const deleted = Reflect.deleteProperty(target, prop);\n if (deleted) {\n notifyUpdate([\"delete\", [prop], prevValue]);\n }\n return deleted;\n },\n set(target, prop, value, receiver) {\n var _a;\n const hasPrevValue = Reflect.has(target, prop);\n const prevValue = Reflect.get(target, prop, receiver);\n if (hasPrevValue && objectIs(prevValue, value)) {\n return true;\n }\n removePropListener(prop);\n if (isObject(value)) {\n value = getUntracked(value) || value;\n }\n let nextValue = value;\n if ((_a = Object.getOwnPropertyDescriptor(target, prop)) == null ? void 0 : _a.set) ; else if (value instanceof Promise) {\n value.then((v) => {\n value.status = \"fulfilled\";\n value.value = v;\n notifyUpdate([\"resolve\", [prop], v]);\n }).catch((e) => {\n value.status = \"rejected\";\n value.reason = e;\n notifyUpdate([\"reject\", [prop], e]);\n });\n } else {\n if (!proxyStateMap.has(value) && canProxy(value)) {\n nextValue = proxy(value);\n }\n const childProxyState = !refSet.has(nextValue) && proxyStateMap.get(nextValue);\n if (childProxyState) {\n addPropListener(prop, childProxyState);\n }\n }\n Reflect.set(target, prop, nextValue, receiver);\n notifyUpdate([\"set\", [prop], value, prevValue]);\n return true;\n }\n };\n const proxyObject = newProxy(baseObject, handler);\n proxyCache.set(initialObject, proxyObject);\n const proxyState = [\n baseObject,\n ensureVersion,\n createSnapshot,\n addListener\n ];\n proxyStateMap.set(proxyObject, proxyState);\n Reflect.ownKeys(initialObject).forEach((key) => {\n const desc = Object.getOwnPropertyDescriptor(\n initialObject,\n key\n );\n if (desc.get || desc.set) {\n Object.defineProperty(baseObject, key, desc);\n } else {\n proxyObject[key] = initialObject[key];\n }\n });\n return proxyObject;\n}) => [\n // public functions\n proxyFunction2,\n // shared state\n proxyStateMap,\n refSet,\n // internal things\n objectIs,\n newProxy,\n canProxy,\n defaultHandlePromise,\n snapCache,\n createSnapshot,\n proxyCache,\n versionHolder\n];\nconst [proxyFunction] = buildProxyFunction();\nfunction proxy(initialObject = {}) {\n return proxyFunction(initialObject);\n}\nfunction getVersion(proxyObject) {\n const proxyState = proxyStateMap.get(proxyObject);\n return proxyState == null ? void 0 : proxyState[1]();\n}\nfunction subscribe(proxyObject, callback, notifyInSync) {\n const proxyState = proxyStateMap.get(proxyObject);\n if ((import.meta.env && import.meta.env.MODE) !== \"production\" && !proxyState) {\n console.warn(\"Please use proxy object\");\n }\n let promise;\n const ops = [];\n const addListener = proxyState[3];\n let isListenerActive = false;\n const listener = (op) => {\n ops.push(op);\n if (notifyInSync) {\n callback(ops.splice(0));\n return;\n }\n if (!promise) {\n promise = Promise.resolve().then(() => {\n promise = void 0;\n if (isListenerActive) {\n callback(ops.splice(0));\n }\n });\n }\n };\n const removeListener = addListener(listener);\n isListenerActive = true;\n return () => {\n isListenerActive = false;\n removeListener();\n };\n}\nfunction snapshot(proxyObject, handlePromise) {\n const proxyState = proxyStateMap.get(proxyObject);\n if ((import.meta.env && import.meta.env.MODE) !== \"production\" && !proxyState) {\n console.warn(\"Please use proxy object\");\n }\n const [target, ensureVersion, createSnapshot] = proxyState;\n return createSnapshot(target, ensureVersion(), handlePromise);\n}\nfunction ref(obj) {\n refSet.add(obj);\n return obj;\n}\nconst unstable_buildProxyFunction = buildProxyFunction;\n\nexport { getVersion, proxy, ref, snapshot, subscribe, unstable_buildProxyFunction };\n","/**\n * @license React\n * use-sync-external-store-shim.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var e=require(\"react\");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}\nfunction 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;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim.production.min.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim.development.js');\n}\n","import ReactExports, { useRef, useCallback, useEffect, useMemo, useDebugValue } from 'react';\nimport { isChanged, createProxy, affectedToPathList } from 'proxy-compare';\nimport useSyncExternalStoreExports from 'use-sync-external-store/shim/index.js';\nimport { subscribe, snapshot } from 'valtio/vanilla';\n\nconst { use } = ReactExports;\nconst { useSyncExternalStore } = useSyncExternalStoreExports;\nconst useAffectedDebugValue = (state, affected) => {\n const pathList = useRef();\n useEffect(() => {\n pathList.current = affectedToPathList(state, affected, true);\n });\n useDebugValue(pathList.current);\n};\nfunction useSnapshot(proxyObject, options) {\n const notifyInSync = options == null ? void 0 : options.sync;\n const lastSnapshot = useRef();\n const lastAffected = useRef();\n let inRender = true;\n const currSnapshot = useSyncExternalStore(\n useCallback(\n (callback) => {\n const unsub = subscribe(proxyObject, callback, notifyInSync);\n callback();\n return unsub;\n },\n [proxyObject, notifyInSync]\n ),\n () => {\n const nextSnapshot = snapshot(proxyObject, use);\n try {\n if (!inRender && lastSnapshot.current && lastAffected.current && !isChanged(\n lastSnapshot.current,\n nextSnapshot,\n lastAffected.current,\n /* @__PURE__ */ new WeakMap()\n )) {\n return lastSnapshot.current;\n }\n } catch (e) {\n }\n return nextSnapshot;\n },\n () => snapshot(proxyObject, use)\n );\n inRender = false;\n const currAffected = /* @__PURE__ */ new WeakMap();\n useEffect(() => {\n lastSnapshot.current = currSnapshot;\n lastAffected.current = currAffected;\n });\n if ((import.meta.env && import.meta.env.MODE) !== \"production\") {\n useAffectedDebugValue(currSnapshot, currAffected);\n }\n const proxyCache = useMemo(() => /* @__PURE__ */ new WeakMap(), []);\n return createProxy(currSnapshot, currAffected, proxyCache);\n}\n\nexport { useSnapshot };\n","import{options as r,Fragment as e}from\"preact\";export{Fragment}from\"preact\";var t=/[\"&<]/;function n(r){if(0===r.length||!1===t.test(r))return r;for(var e=0,n=0,o=\"\",f=\"\";n<r.length;n++){switch(r.charCodeAt(n)){case 34:f=\"&quot;\";break;case 38:f=\"&amp;\";break;case 60:f=\"&lt;\";break;default:continue}n!==e&&(o+=r.slice(e,n)),o+=f,e=n+1}return n!==e&&(o+=r.slice(e,n)),o}var o=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,f=0,i=Array.isArray;function u(e,t,n,o,i,u){var a,c,p={};for(c in t)\"ref\"==c?a=t[c]:p[c]=t[c];var l={type:e,props:p,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--f,__i:-1,__u:0,__source:i,__self:u};if(\"function\"==typeof e&&(a=e.defaultProps))for(c in a)void 0===p[c]&&(p[c]=a[c]);return r.vnode&&r.vnode(l),l}function a(r){var t=u(e,{tpl:r,exprs:[].slice.call(arguments,1)});return t.key=t.__v,t}var c={},p=/[A-Z]/g;function l(e,t){if(r.attr){var f=r.attr(e,t);if(\"string\"==typeof f)return f}if(\"ref\"===e||\"key\"===e)return\"\";if(\"style\"===e&&\"object\"==typeof t){var i=\"\";for(var u in t){var a=t[u];if(null!=a&&\"\"!==a){var l=\"-\"==u[0]?u:c[u]||(c[u]=u.replace(p,\"-$&\").toLowerCase()),_=\";\";\"number\"!=typeof a||l.startsWith(\"--\")||o.test(l)||(_=\"px;\"),i=i+l+\":\"+a+_}}return e+'=\"'+i+'\"'}return null==t||!1===t||\"function\"==typeof t||\"object\"==typeof t?\"\":!0===t?e:e+'=\"'+n(t)+'\"'}function _(r){if(null==r||\"boolean\"==typeof r||\"function\"==typeof r)return null;if(\"object\"==typeof r){if(void 0===r.constructor)return r;if(i(r)){for(var e=0;e<r.length;e++)r[e]=_(r[e]);return r}}return n(\"\"+r)}export{u as jsx,l as jsxAttr,u as jsxDEV,_ as jsxEscape,a as jsxTemplate,u as jsxs};\n//# sourceMappingURL=jsxRuntime.module.js.map\n","import { useContext, createContext, useState, useCallback, useRef, useLayoutEffect, useEffect } from 'react';\nimport { jsx } from 'react/jsx-runtime';\n\nfunction _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\nvar reservedModifierKeywords = ['shift', 'alt', 'meta', 'mod', 'ctrl'];\nvar mappedKeys = {\n esc: 'escape',\n \"return\": 'enter',\n '.': 'period',\n ',': 'comma',\n '-': 'slash',\n ' ': 'space',\n '`': 'backquote',\n '#': 'backslash',\n '+': 'bracketright',\n ShiftLeft: 'shift',\n ShiftRight: 'shift',\n AltLeft: 'alt',\n AltRight: 'alt',\n MetaLeft: 'meta',\n MetaRight: 'meta',\n OSLeft: 'meta',\n OSRight: 'meta',\n ControlLeft: 'ctrl',\n ControlRight: 'ctrl'\n};\nfunction mapKey(key) {\n return (mappedKeys[key] || key).trim().toLowerCase().replace(/key|digit|numpad|arrow/, '');\n}\nfunction isHotkeyModifier(key) {\n return reservedModifierKeywords.includes(key);\n}\nfunction parseKeysHookInput(keys, splitKey) {\n if (splitKey === void 0) {\n splitKey = ',';\n }\n return keys.split(splitKey);\n}\nfunction parseHotkey(hotkey, combinationKey, description) {\n if (combinationKey === void 0) {\n combinationKey = '+';\n }\n var keys = hotkey.toLocaleLowerCase().split(combinationKey).map(function (k) {\n return mapKey(k);\n });\n var modifiers = {\n alt: keys.includes('alt'),\n ctrl: keys.includes('ctrl') || keys.includes('control'),\n shift: keys.includes('shift'),\n meta: keys.includes('meta'),\n mod: keys.includes('mod')\n };\n var singleCharKeys = keys.filter(function (k) {\n return !reservedModifierKeywords.includes(k);\n });\n return _extends({}, modifiers, {\n keys: singleCharKeys,\n description: description\n });\n}\n\n(function () {\n if (typeof document !== 'undefined') {\n document.addEventListener('keydown', function (e) {\n if (e.key === undefined) {\n // Synthetic event (e.g., Chrome autofill). Ignore.\n return;\n }\n pushToCurrentlyPressedKeys([mapKey(e.key), mapKey(e.code)]);\n });\n document.addEventListener('keyup', function (e) {\n if (e.key === undefined) {\n // Synthetic event (e.g., Chrome autofill). Ignore.\n return;\n }\n removeFromCurrentlyPressedKeys([mapKey(e.key), mapKey(e.code)]);\n });\n }\n if (typeof window !== 'undefined') {\n window.addEventListener('blur', function () {\n currentlyPressedKeys.clear();\n });\n }\n})();\nvar currentlyPressedKeys = /*#__PURE__*/new Set();\n// https://github.com/microsoft/TypeScript/issues/17002\nfunction isReadonlyArray(value) {\n return Array.isArray(value);\n}\nfunction isHotkeyPressed(key, splitKey) {\n if (splitKey === void 0) {\n splitKey = ',';\n }\n var hotkeyArray = isReadonlyArray(key) ? key : key.split(splitKey);\n return hotkeyArray.every(function (hotkey) {\n return currentlyPressedKeys.has(hotkey.trim().toLowerCase());\n });\n}\nfunction pushToCurrentlyPressedKeys(key) {\n var hotkeyArray = Array.isArray(key) ? key : [key];\n /*\r\n Due to a weird behavior on macOS we need to clear the set if the user pressed down the meta key and presses another key.\r\n https://stackoverflow.com/questions/11818637/why-does-javascript-drop-keyup-events-when-the-metakey-is-pressed-on-mac-browser\r\n Otherwise the set will hold all ever pressed keys while the meta key is down which leads to wrong results.\r\n */\n if (currentlyPressedKeys.has('meta')) {\n currentlyPressedKeys.forEach(function (key) {\n return !isHotkeyModifier(key) && currentlyPressedKeys[\"delete\"](key.toLowerCase());\n });\n }\n hotkeyArray.forEach(function (hotkey) {\n return currentlyPressedKeys.add(hotkey.toLowerCase());\n });\n}\nfunction removeFromCurrentlyPressedKeys(key) {\n var hotkeyArray = Array.isArray(key) ? key : [key];\n /*\r\n Due to a weird behavior on macOS we need to clear the set if the user pressed down the meta key and presses another key.\r\n https://stackoverflow.com/questions/11818637/why-does-javascript-drop-keyup-events-when-the-metakey-is-pressed-on-mac-browser\r\n Otherwise the set will hold all ever pressed keys while the meta key is down which leads to wrong results.\r\n */\n if (key === 'meta') {\n currentlyPressedKeys.clear();\n } else {\n hotkeyArray.forEach(function (hotkey) {\n return currentlyPressedKeys[\"delete\"](hotkey.toLowerCase());\n });\n }\n}\n\nfunction maybePreventDefault(e, hotkey, preventDefault) {\n if (typeof preventDefault === 'function' && preventDefault(e, hotkey) || preventDefault === true) {\n e.preventDefault();\n }\n}\nfunction isHotkeyEnabled(e, hotkey, enabled) {\n if (typeof enabled === 'function') {\n return enabled(e, hotkey);\n }\n return enabled === true || enabled === undefined;\n}\nfunction isKeyboardEventTriggeredByInput(ev) {\n return isHotkeyEnabledOnTag(ev, ['input', 'textarea', 'select']);\n}\nfunction isHotkeyEnabledOnTag(_ref, enabledOnTags) {\n var target = _ref.target;\n if (enabledOnTags === void 0) {\n enabledOnTags = false;\n }\n var targetTagName = target && target.tagName;\n if (isReadonlyArray(enabledOnTags)) {\n return Boolean(targetTagName && enabledOnTags && enabledOnTags.some(function (tag) {\n return tag.toLowerCase() === targetTagName.toLowerCase();\n }));\n }\n return Boolean(targetTagName && enabledOnTags && enabledOnTags === true);\n}\nfunction isScopeActive(activeScopes, scopes) {\n if (activeScopes.length === 0 && scopes) {\n console.warn('A hotkey has the \"scopes\" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a <HotkeysProvider>');\n return true;\n }\n if (!scopes) {\n return true;\n }\n return activeScopes.some(function (scope) {\n return scopes.includes(scope);\n }) || activeScopes.includes('*');\n}\nvar isHotkeyMatchingKeyboardEvent = function isHotkeyMatchingKeyboardEvent(e, hotkey, ignoreModifiers) {\n if (ignoreModifiers === void 0) {\n ignoreModifiers = false;\n }\n var alt = hotkey.alt,\n meta = hotkey.meta,\n mod = hotkey.mod,\n shift = hotkey.shift,\n ctrl = hotkey.ctrl,\n keys = hotkey.keys;\n var pressedKeyUppercase = e.key,\n code = e.code,\n ctrlKey = e.ctrlKey,\n metaKey = e.metaKey,\n shiftKey = e.shiftKey,\n altKey = e.altKey;\n var keyCode = mapKey(code);\n var pressedKey = pressedKeyUppercase.toLowerCase();\n if (!ignoreModifiers) {\n // We check the pressed keys for compatibility with the keyup event. In keyup events the modifier flags are not set.\n if (alt === !altKey && pressedKey !== 'alt') {\n return false;\n }\n if (shift === !shiftKey && pressedKey !== 'shift') {\n return false;\n }\n // Mod is a special key name that is checking for meta on macOS and ctrl on other platforms\n if (mod) {\n if (!metaKey && !ctrlKey) {\n return false;\n }\n } else {\n if (meta === !metaKey && pressedKey !== 'meta' && pressedKey !== 'os') {\n return false;\n }\n if (ctrl === !ctrlKey && pressedKey !== 'ctrl' && pressedKey !== 'control') {\n return false;\n }\n }\n }\n // All modifiers are correct, now check the key\n // If the key is set, we check for the key\n if (keys && keys.length === 1 && (keys.includes(pressedKey) || keys.includes(keyCode))) {\n return true;\n } else if (keys) {\n // Check if all keys are present in pressedDownKeys set\n return isHotkeyPressed(keys);\n } else if (!keys) {\n // If the key is not set, we only listen for modifiers, that check went alright, so we return true\n return true;\n }\n // There is nothing that matches.\n return false;\n};\n\nvar BoundHotkeysProxyProvider = /*#__PURE__*/createContext(undefined);\nvar useBoundHotkeysProxy = function useBoundHotkeysProxy() {\n return useContext(BoundHotkeysProxyProvider);\n};\nfunction BoundHotkeysProxyProviderProvider(_ref) {\n var addHotkey = _ref.addHotkey,\n removeHotkey = _ref.removeHotkey,\n children = _ref.children;\n return /*#__PURE__*/jsx(BoundHotkeysProxyProvider.Provider, {\n value: {\n addHotkey: addHotkey,\n removeHotkey: removeHotkey\n },\n children: children\n });\n}\n\nfunction deepEqual(x, y) {\n //@ts-ignore\n return x && y && typeof x === 'object' && typeof y === 'object' ? Object.keys(x).length === Object.keys(y).length &&\n //@ts-ignore\n Object.keys(x).reduce(function (isEqual, key) {\n return isEqual && deepEqual(x[key], y[key]);\n }, true) : x === y;\n}\n\nvar HotkeysContext = /*#__PURE__*/createContext({\n hotkeys: [],\n enabledScopes: [],\n toggleScope: function toggleScope() {},\n enableScope: function enableScope() {},\n disableScope: function disableScope() {}\n});\nvar useHotkeysContext = function useHotkeysContext() {\n return useContext(HotkeysContext);\n};\nvar HotkeysProvider = function HotkeysProvider(_ref) {\n var _ref$initiallyActiveS = _ref.initiallyActiveScopes,\n initiallyActiveScopes = _ref$initiallyActiveS === void 0 ? ['*'] : _ref$initiallyActiveS,\n children = _ref.children;\n var _useState = useState((initiallyActiveScopes == null ? void 0 : initiallyActiveScopes.length) > 0 ? initiallyActiveScopes : ['*']),\n internalActiveScopes = _useState[0],\n setInternalActiveScopes = _useState[1];\n var _useState2 = useState([]),\n boundHotkeys = _useState2[0],\n setBoundHotkeys = _useState2[1];\n var enableScope = useCallback(function (scope) {\n setInternalActiveScopes(function (prev) {\n if (prev.includes('*')) {\n return [scope];\n }\n return Array.from(new Set([].concat(prev, [scope])));\n });\n }, []);\n var disableScope = useCallback(function (scope) {\n setInternalActiveScopes(function (prev) {\n if (prev.filter(function (s) {\n return s !== scope;\n }).length === 0) {\n return ['*'];\n } else {\n return prev.filter(function (s) {\n return s !== scope;\n });\n }\n });\n }, []);\n var toggleScope = useCallback(function (scope) {\n setInternalActiveScopes(function (prev) {\n if (prev.includes(scope)) {\n if (prev.filter(function (s) {\n return s !== scope;\n }).length === 0) {\n return ['*'];\n } else {\n return prev.filter(function (s) {\n return s !== scope;\n });\n }\n } else {\n if (prev.includes('*')) {\n return [scope];\n }\n return Array.from(new Set([].concat(prev, [scope])));\n }\n });\n }, []);\n var addBoundHotkey = useCallback(function (hotkey) {\n setBoundHotkeys(function (prev) {\n return [].concat(prev, [hotkey]);\n });\n }, []);\n var removeBoundHotkey = useCallback(function (hotkey) {\n setBoundHotkeys(function (prev) {\n return prev.filter(function (h) {\n return !deepEqual(h, hotkey);\n });\n });\n }, []);\n return /*#__PURE__*/jsx(HotkeysContext.Provider, {\n value: {\n enabledScopes: internalActiveScopes,\n hotkeys: boundHotkeys,\n enableScope: enableScope,\n disableScope: disableScope,\n toggleScope: toggleScope\n },\n children: /*#__PURE__*/jsx(BoundHotkeysProxyProviderProvider, {\n addHotkey: addBoundHotkey,\n removeHotkey: removeBoundHotkey,\n children: children\n })\n });\n};\n\nfunction useDeepEqualMemo(value) {\n var ref = useRef(undefined);\n if (!deepEqual(ref.current, value)) {\n ref.current = value;\n }\n return ref.current;\n}\n\nvar stopPropagation = function stopPropagation(e) {\n e.stopPropagation();\n e.preventDefault();\n e.stopImmediatePropagation();\n};\nvar useSafeLayoutEffect = typeof window !== 'undefined' ? useLayoutEffect : useEffect;\nfunction useHotkeys(keys, callback, options, dependencies) {\n var ref = useRef(null);\n var hasTriggeredRef = useRef(false);\n var _options = !(options instanceof Array) ? options : !(dependencies instanceof Array) ? dependencies : undefined;\n var _keys = isReadonlyArray(keys) ? keys.join(_options == null ? void 0 : _options.splitKey) : keys;\n var _deps = options instanceof Array ? options : dependencies instanceof Array ? dependencies : undefined;\n var memoisedCB = useCallback(callback, _deps != null ? _deps : []);\n var cbRef = useRef(memoisedCB);\n if (_deps) {\n cbRef.current = memoisedCB;\n } else {\n cbRef.current = callback;\n }\n var memoisedOptions = useDeepEqualMemo(_options);\n var _useHotkeysContext = useHotkeysContext(),\n enabledScopes = _useHotkeysContext.enabledScopes;\n var proxy = useBoundHotkeysProxy();\n useSafeLayoutEffect(function () {\n if ((memoisedOptions == null ? void 0 : memoisedOptions.enabled) === false || !isScopeActive(enabledScopes, memoisedOptions == null ? void 0 : memoisedOptions.scopes)) {\n return;\n }\n var listener = function listener(e, isKeyUp) {\n var _e$target;\n if (isKeyUp === void 0) {\n isKeyUp = false;\n }\n if (isKeyboardEventTriggeredByInput(e) && !isHotkeyEnabledOnTag(e, memoisedOptions == null ? void 0 : memoisedOptions.enableOnFormTags)) {\n return;\n }\n if (memoisedOptions != null && memoisedOptions.ignoreEventWhen != null && memoisedOptions.ignoreEventWhen(e)) {\n return;\n }\n // TODO: SINCE THE EVENT IS NOW ATTACHED TO THE REF, THE ACTIVE ELEMENT CAN NEVER BE INSIDE THE REF. THE HOTKEY ONLY TRIGGERS IF THE\n // REF IS THE ACTIVE ELEMENT. THIS IS A PROBLEM SINCE FOCUSED SUB COMPONENTS WON'T TRIGGER THE HOTKEY.\n if (ref.current !== null && document.activeElement !== ref.current && !ref.current.contains(document.activeElement)) {\n stopPropagation(e);\n return;\n }\n if ((_e$target = e.target) != null && _e$target.isContentEditable && !(memoisedOptions != null && memoisedOptions.enableOnContentEditable)) {\n return;\n }\n parseKeysHookInput(_keys, memoisedOptions == null ? void 0 : memoisedOptions.splitKey).forEach(function (key) {\n var _hotkey$keys;\n var hotkey = parseHotkey(key, memoisedOptions == null ? void 0 : memoisedOptions.combinationKey);\n if (isHotkeyMatchingKeyboardEvent(e, hotkey, memoisedOptions == null ? void 0 : memoisedOptions.ignoreModifiers) || (_hotkey$keys = hotkey.keys) != null && _hotkey$keys.includes('*')) {\n if (isKeyUp && hasTriggeredRef.current) {\n return;\n }\n maybePreventDefault(e, hotkey, memoisedOptions == null ? void 0 : memoisedOptions.preventDefault);\n if (!isHotkeyEnabled(e, hotkey, memoisedOptions == null ? void 0 : memoisedOptions.enabled)) {\n stopPropagation(e);\n return;\n }\n // Execute the user callback for that hotkey\n cbRef.current(e, hotkey);\n if (!isKeyUp) {\n hasTriggeredRef.current = true;\n }\n }\n });\n };\n var handleKeyDown = function handleKeyDown(event) {\n if (event.key === undefined) {\n // Synthetic event (e.g., Chrome autofill). Ignore.\n return;\n }\n pushToCurrentlyPressedKeys(mapKey(event.code));\n if ((memoisedOptions == null ? void 0 : memoisedOptions.keydown) === undefined && (memoisedOptions == null ? void 0 : memoisedOptions.keyup) !== true || memoisedOptions != null && memoisedOptions.keydown) {\n listener(event);\n }\n };\n var handleKeyUp = function handleKeyUp(event) {\n if (event.key === undefined) {\n // Synthetic event (e.g., Chrome autofill). Ignore.\n return;\n }\n removeFromCurrentlyPressedKeys(mapKey(event.code));\n hasTriggeredRef.current = false;\n if (memoisedOptions != null && memoisedOptions.keyup) {\n listener(event, true);\n }\n };\n var domNode = ref.current || (_options == null ? void 0 : _options.document) || document;\n // @ts-ignore\n domNode.addEventListener('keyup', handleKeyUp);\n // @ts-ignore\n domNode.addEventListener('keydown', handleKeyDown);\n if (proxy) {\n parseKeysHookInput(_keys, memoisedOptions == null ? void 0 : memoisedOptions.splitKey).forEach(function (key) {\n return proxy.addHotkey(parseHotkey(key, memoisedOptions == null ? void 0 : memoisedOptions.combinationKey, memoisedOptions == null ? void 0 : memoisedOptions.description));\n });\n }\n return function () {\n // @ts-ignore\n domNode.removeEventListener('keyup', handleKeyUp);\n // @ts-ignore\n domNode.removeEventListener('keydown', handleKeyDown);\n if (proxy) {\n parseKeysHookInput(_keys, memoisedOptions == null ? void 0 : memoisedOptions.splitKey).forEach(function (key) {\n return proxy.removeHotkey(parseHotkey(key, memoisedOptions == null ? void 0 : memoisedOptions.combinationKey, memoisedOptions == null ? void 0 : memoisedOptions.description));\n });\n }\n };\n }, [_keys, memoisedOptions, enabledScopes]);\n return ref;\n}\n\nfunction useRecordHotkeys() {\n var _useState = useState(new Set()),\n keys = _useState[0],\n setKeys = _useState[1];\n var _useState2 = useState(false),\n isRecording = _useState2[0],\n setIsRecording = _useState2[1];\n var handler = useCallback(function (event) {\n if (event.key === undefined) {\n // Synthetic event (e.g., Chrome autofill). Ignore.\n return;\n }\n event.preventDefault();\n event.stopPropagation();\n setKeys(function (prev) {\n var newKeys = new Set(prev);\n newKeys.add(mapKey(event.code));\n return newKeys;\n });\n }, []);\n var stop = useCallback(function () {\n if (typeof document !== 'undefined') {\n document.removeEventListener('keydown', handler);\n setIsRecording(false);\n }\n }, [handler]);\n var start = useCallback(function () {\n setKeys(new Set());\n if (typeof document !== 'undefined') {\n stop();\n document.addEventListener('keydown', handler);\n setIsRecording(true);\n }\n }, [handler, stop]);\n return [keys, {\n start: start,\n stop: stop,\n isRecording: isRecording\n }];\n}\n\nexport { HotkeysProvider, isHotkeyPressed, useHotkeys, useHotkeysContext, useRecordHotkeys };\n//# sourceMappingURL=react-hotkeys-hook.esm.js.map\n","function fixProto(target, prototype) {\n var setPrototypeOf = Object.setPrototypeOf;\n setPrototypeOf ? setPrototypeOf(target, prototype) : target.__proto__ = prototype;\n}\nfunction fixStack(target, fn) {\n if (fn === void 0) {\n fn = target.constructor;\n }\n\n var captureStackTrace = Error.captureStackTrace;\n captureStackTrace && captureStackTrace(target, fn);\n}\n\nvar __extends = undefined && undefined.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n }\n };\n\n return _extendStatics(d, b);\n };\n\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n\n _extendStatics(d, b);\n\n function __() {\n this.constructor = d;\n }\n\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n\nvar CustomError = function (_super) {\n __extends(CustomError, _super);\n\n function CustomError(message, options) {\n var _newTarget = this.constructor;\n\n var _this = _super.call(this, message, options) || this;\n\n Object.defineProperty(_this, 'name', {\n value: _newTarget.name,\n enumerable: false,\n configurable: true\n });\n fixProto(_this, _newTarget.prototype);\n fixStack(_this);\n return _this;\n }\n\n return CustomError;\n}(Error);\n\nvar __spreadArray = undefined && undefined.__spreadArray || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nfunction customErrorFactory(fn, parent) {\n if (parent === void 0) {\n parent = Error;\n }\n\n function CustomError() {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n if (!(this instanceof CustomError)) return new (CustomError.bind.apply(CustomError, __spreadArray([void 0], args, false)))();\n parent.apply(this, args);\n Object.defineProperty(this, 'name', {\n value: fn.name || parent.name,\n enumerable: false,\n configurable: true\n });\n fn.apply(this, args);\n fixStack(this, CustomError);\n }\n\n return Object.defineProperties(CustomError, {\n prototype: {\n value: Object.create(parent.prototype, {\n constructor: {\n value: CustomError,\n writable: true,\n configurable: true\n }\n })\n }\n });\n}\n\nexport { CustomError, customErrorFactory };\n//# sourceMappingURL=custom-error.mjs.map\n","/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n","/**\n * Source: ftp://ftp.unicode.org/Public/UCD/latest/ucd/SpecialCasing.txt\n */\nvar SUPPORTED_LOCALE = {\n tr: {\n regexp: /\\u0130|\\u0049|\\u0049\\u0307/g,\n map: {\n İ: \"\\u0069\",\n I: \"\\u0131\",\n İ: \"\\u0069\",\n },\n },\n az: {\n regexp: /\\u0130/g,\n map: {\n İ: \"\\u0069\",\n I: \"\\u0131\",\n İ: \"\\u0069\",\n },\n },\n lt: {\n regexp: /\\u0049|\\u004A|\\u012E|\\u00CC|\\u00CD|\\u0128/g,\n map: {\n I: \"\\u0069\\u0307\",\n J: \"\\u006A\\u0307\",\n Į: \"\\u012F\\u0307\",\n Ì: \"\\u0069\\u0307\\u0300\",\n Í: \"\\u0069\\u0307\\u0301\",\n Ĩ: \"\\u0069\\u0307\\u0303\",\n },\n },\n};\n/**\n * Localized lower case.\n */\nexport function localeLowerCase(str, locale) {\n var lang = SUPPORTED_LOCALE[locale.toLowerCase()];\n if (lang)\n return lowerCase(str.replace(lang.regexp, function (m) { return lang.map[m]; }));\n return lowerCase(str);\n}\n/**\n * Lower case as a function.\n */\nexport function lowerCase(str) {\n return str.toLowerCase();\n}\n//# sourceMappingURL=index.js.map","import { lowerCase } from \"lower-case\";\n// Support camel case (\"camelCase\" -> \"camel Case\" and \"CAMELCase\" -> \"CAMEL Case\").\nvar DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g];\n// Remove all non-word characters.\nvar DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi;\n/**\n * Normalize the string into something other libraries can manipulate easier.\n */\nexport function noCase(input, options) {\n if (options === void 0) { options = {}; }\n var _a = options.splitRegexp, splitRegexp = _a === void 0 ? DEFAULT_SPLIT_REGEXP : _a, _b = options.stripRegexp, stripRegexp = _b === void 0 ? DEFAULT_STRIP_REGEXP : _b, _c = options.transform, transform = _c === void 0 ? lowerCase : _c, _d = options.delimiter, delimiter = _d === void 0 ? \" \" : _d;\n var result = replace(replace(input, splitRegexp, \"$1\\0$2\"), stripRegexp, \"\\0\");\n var start = 0;\n var end = result.length;\n // Trim the delimiter from around the output string.\n while (result.charAt(start) === \"\\0\")\n start++;\n while (result.charAt(end - 1) === \"\\0\")\n end--;\n // Transform each token independently.\n return result.slice(start, end).split(\"\\0\").map(transform).join(delimiter);\n}\n/**\n * Replace `re` in the input string with the replacement value.\n */\nfunction replace(input, re, value) {\n if (re instanceof RegExp)\n return input.replace(re, value);\n return re.reduce(function (input, re) { return input.replace(re, value); }, input);\n}\n//# sourceMappingURL=index.js.map","import { __assign } from \"tslib\";\nimport { noCase } from \"no-case\";\nexport function pascalCaseTransform(input, index) {\n var firstChar = input.charAt(0);\n var lowerChars = input.substr(1).toLowerCase();\n if (index > 0 && firstChar >= \"0\" && firstChar <= \"9\") {\n return \"_\" + firstChar + lowerChars;\n }\n return \"\" + firstChar.toUpperCase() + lowerChars;\n}\nexport function pascalCaseTransformMerge(input) {\n return input.charAt(0).toUpperCase() + input.slice(1).toLowerCase();\n}\nexport function pascalCase(input, options) {\n if (options === void 0) { options = {}; }\n return noCase(input, __assign({ delimiter: \"\", transform: pascalCaseTransform }, options));\n}\n//# sourceMappingURL=index.js.map","import { __assign } from \"tslib\";\nimport { pascalCase, pascalCaseTransform, pascalCaseTransformMerge, } from \"pascal-case\";\nexport function camelCaseTransform(input, index) {\n if (index === 0)\n return input.toLowerCase();\n return pascalCaseTransform(input, index);\n}\nexport function camelCaseTransformMerge(input, index) {\n if (index === 0)\n return input.toLowerCase();\n return pascalCaseTransformMerge(input);\n}\nexport function camelCase(input, options) {\n if (options === void 0) { options = {}; }\n return pascalCase(input, __assign({ transform: camelCaseTransform }, options));\n}\n//# sourceMappingURL=index.js.map","import { __assign } from \"tslib\";\nimport { noCase } from \"no-case\";\nexport function dotCase(input, options) {\n if (options === void 0) { options = {}; }\n return noCase(input, __assign({ delimiter: \".\" }, options));\n}\n//# sourceMappingURL=index.js.map","import { __assign } from \"tslib\";\nimport { dotCase } from \"dot-case\";\nexport function snakeCase(input, options) {\n if (options === void 0) { options = {}; }\n return dotCase(input, __assign({ delimiter: \"_\" }, options));\n}\n//# sourceMappingURL=index.js.map","'use strict';\n\nmodule.exports = function () {\n throw new Error(\n 'ws does not work in the browser. Browser clients must use the native ' +\n 'WebSocket object'\n );\n};\n","function createDeferred() {\n let resolve;\n let reject;\n const promise = new Promise((...args) => ([resolve, reject] = args));\n return Object.freeze({\n resolve: resolve,\n reject: reject,\n promise\n });\n}\nexport function on(onHandler, options) {\n const comEvents = [];\n const unconsumedDeferred = [];\n const unHandle = onHandler((...args) => {\n const deferred = unconsumedDeferred.shift();\n if (deferred) {\n deferred.resolve({\n value: args,\n done: false\n });\n }\n else {\n comEvents.push(args);\n }\n });\n const abortSignal = options === null || options === void 0 ? void 0 : options.signal;\n let finished = false;\n let error = null;\n const onAbort = () => {\n error = new Error(\"Abort Error\");\n };\n const offListener = () => {\n unHandle === null || unHandle === void 0 ? void 0 : unHandle();\n abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.removeEventListener(\"abort\", onAbort);\n };\n abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.addEventListener(\"abort\", onAbort, { once: true });\n return {\n async next() {\n const lastEvent = comEvents.shift();\n if (lastEvent) {\n return {\n value: lastEvent,\n done: false\n };\n }\n if (finished) {\n return {\n value: undefined,\n done: true\n };\n }\n if (error) {\n return Promise.reject(error);\n }\n const deferred = createDeferred();\n unconsumedDeferred.push(deferred);\n return deferred.promise;\n },\n async return() {\n finished = true;\n offListener();\n for (const deferred of unconsumedDeferred) {\n deferred.resolve({\n value: undefined,\n done: true\n });\n }\n return {\n value: undefined,\n done: true\n };\n },\n async throw(thrownError) {\n error = thrownError;\n offListener();\n return {\n value: undefined,\n done: true\n };\n },\n [Symbol.asyncIterator]() {\n return this;\n }\n };\n}\nexport function once(onHandler, options) {\n var _a;\n const unconsumedDeferred = createDeferred();\n const unEvent = onHandler((...args) => {\n unconsumedDeferred.resolve(args);\n });\n const onAbort = () => {\n unconsumedDeferred.reject(new Error(\"Abort Error\"));\n };\n const offListener = () => {\n var _a;\n unEvent === null || unEvent === void 0 ? void 0 : unEvent();\n (_a = options === null || options === void 0 ? void 0 : options.signal) === null || _a === void 0 ? void 0 : _a.removeEventListener(\"abort\", onAbort);\n };\n (_a = options === null || options === void 0 ? void 0 : options.signal) === null || _a === void 0 ? void 0 : _a.addEventListener(\"abort\", onAbort, { once: true });\n return unconsumedDeferred.promise.finally(() => {\n offListener();\n });\n}\n//# sourceMappingURL=events-to-async.js.map","import { CustomError } from 'ts-custom-error';\nimport { snakeCase, camelCase } from 'change-case';\nimport WebSocket from 'ws';\nimport { on } from 'events-to-async';\n\nclass MastoUnexpectedError extends CustomError {\n}\n\nclass MastoDeserializeError extends CustomError {\n constructor(message, contentType, data, options) {\n super(message, options);\n this.contentType = contentType;\n this.data = data;\n }\n}\n\nclass MastoHttpError extends CustomError {\n constructor(props, errorOptions) {\n super(props.message, errorOptions);\n this.statusCode = props.statusCode;\n this.message = props.message;\n this.description = props.description;\n this.additionalProperties = props.additionalProperties;\n this.details = props.details;\n }\n}\n\nclass MastoInvalidArgumentError extends CustomError {\n}\n\nclass MastoTimeoutError extends CustomError {\n}\n\nclass MastoWebSocketError extends CustomError {\n constructor(message, options) {\n super(message, options);\n this.message = message;\n }\n}\n\n/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol */\r\n\r\n\r\nfunction __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nfunction __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nfunction __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nfunction __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nfunction __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nfunction __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\ntypeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\n\nconst sleep = (ms) => new Promise((resolve) => setTimeout(() => resolve(), ms));\n\nfunction noop() {\n //\n}\n\nclass ExponentialBackoffError extends CustomError {\n constructor(attempts, options) {\n super(`Maximum number of attempts reached: ${attempts}`, options);\n }\n}\n// https://en.wikipedia.org/wiki/Exponential_backoff\nclass ExponentialBackoff {\n constructor(props = {}) {\n this.props = props;\n this.attempts = 0;\n }\n sleep() {\n return __awaiter(this, void 0, void 0, function* () {\n if (this.attempts >= this.maxAttempts) {\n throw new ExponentialBackoffError(this.attempts);\n }\n yield sleep(this.getTimeout());\n this.attempts++;\n });\n }\n clear() {\n this.attempts = 0;\n }\n get factor() {\n var _a;\n return (_a = this.props.factor) !== null && _a !== void 0 ? _a : 1000;\n }\n get base() {\n var _a;\n return (_a = this.props.base) !== null && _a !== void 0 ? _a : 2;\n }\n get maxAttempts() {\n var _a;\n return (_a = this.props.maxAttempts) !== null && _a !== void 0 ? _a : Number.POSITIVE_INFINITY;\n }\n getTimeout() {\n return this.factor * Math.pow(this.base, this.attempts);\n }\n values() {\n return __asyncGenerator(this, arguments, function* values_1() {\n while (this.attempts < this.maxAttempts) {\n yield yield __await(this.sleep());\n }\n });\n }\n [Symbol.asyncIterator]() {\n return this.values();\n }\n}\n\n// https://github.com/tc39/proposal-promise-with-resolvers\nconst createPromiseWithResolvers = () => {\n let resolve;\n let reject;\n const promise = new Promise((res, rej) => {\n resolve = res;\n reject = rej;\n });\n return { promise, resolve, reject };\n};\n\nconst parseLinkHeader = (linkHeader) => {\n const links = new Map();\n for (const link of linkHeader.split(\",\")) {\n const match = link.match(/<([^>]+)>;\\s*rel=\"([^\"]+)\"/);\n if (match) {\n links.set(match[2], match[1]);\n }\n }\n return links;\n};\n\nclass PaginatorHttp {\n constructor(http, nextPath, nextParams, meta, direction = \"next\") {\n this.http = http;\n this.nextPath = nextPath;\n this.nextParams = nextParams;\n this.meta = meta;\n this.direction = direction;\n }\n next() {\n return __awaiter(this, void 0, void 0, function* () {\n if (this.nextPath == undefined) {\n return { done: true, value: undefined };\n }\n const response = yield this.http.request(Object.assign({ method: \"GET\", path: this.nextPath, search: this.nextParams }, this.meta));\n const nextUrl = this.getLink(response.headers.get(\"link\"));\n this.nextPath = nextUrl === null || nextUrl === void 0 ? void 0 : nextUrl.pathname;\n this.nextParams = nextUrl === null || nextUrl === void 0 ? void 0 : nextUrl.search.replace(/^\\?/, \"\");\n const data = (yield response.data);\n return {\n done: false,\n value: data,\n };\n });\n }\n return(value) {\n return __awaiter(this, void 0, void 0, function* () {\n this.clear();\n return {\n done: true,\n value: yield value,\n };\n });\n }\n throw(e) {\n return __awaiter(this, void 0, void 0, function* () {\n this.clear();\n throw e;\n });\n }\n then(onfulfilled = Promise.resolve.bind(Promise), onrejected = Promise.reject.bind(Promise)) {\n // we assume the first item won't be undefined\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return this.next().then((value) => onfulfilled(value.value), onrejected);\n }\n values() {\n return this[Symbol.asyncIterator]();\n }\n getDirection() {\n return this.direction;\n }\n setDirection(direction) {\n return new PaginatorHttp(this.http, this.nextPath, this.nextParams, this.meta, direction);\n }\n [Symbol.asyncIterator]() {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return this;\n }\n getLink(value) {\n if (value == undefined) {\n return;\n }\n const parsed = parseLinkHeader(value).get(this.direction);\n if (parsed == undefined) {\n return;\n }\n return new URL(parsed);\n }\n clear() {\n this.nextPath = undefined;\n this.nextParams = undefined;\n }\n clone() {\n return new PaginatorHttp(this.http, this.nextPath, this.nextParams, this.meta, this.direction);\n }\n}\n\nclass HttpActionDispatcher {\n constructor(http, params = {}) {\n this.http = http;\n this.params = params;\n this.waitForMediaAttachment = (id) => __awaiter(this, void 0, void 0, function* () {\n let media;\n const signal = AbortSignal.timeout(this.mediaTimeout);\n while (media == undefined) {\n if (signal.aborted) {\n throw new MastoTimeoutError(`Media processing timed out of ${this.mediaTimeout}ms`);\n }\n try {\n yield sleep(1000);\n const processing = yield this.http.get(`/api/v1/media/${id}`);\n if (processing.url != undefined) {\n media = processing;\n }\n }\n catch (error) {\n if (error instanceof MastoHttpError && error.statusCode === 404) {\n continue;\n }\n throw error;\n }\n }\n return media;\n });\n }\n dispatch(action) {\n const actionType = this.toPrimitiveAction(action.type);\n const path = this.isPrimitiveAction(action.type)\n ? action.path\n : action.path + \"/\" + snakeCase(action.type);\n const encoding = this.inferEncoding(actionType, path);\n const meta = Object.assign(Object.assign({}, action.meta), { encoding });\n switch (actionType) {\n case \"fetch\": {\n return this.http.get(path, action.data, meta);\n }\n case \"create\": {\n if (path === \"/api/v2/media\") {\n return this.http\n .post(path, action.data, meta)\n .then((media) => {\n return this.waitForMediaAttachment(media.id);\n });\n }\n return this.http.post(path, action.data, meta);\n }\n case \"update\": {\n return this.http.patch(path, action.data, meta);\n }\n case \"remove\": {\n return this.http.delete(path, action.data, meta);\n }\n case \"list\": {\n return new PaginatorHttp(this.http, path, action.data);\n }\n }\n }\n isPrimitiveAction(action) {\n switch (action) {\n case \"fetch\":\n case \"create\":\n case \"update\":\n case \"remove\":\n case \"list\": {\n return true;\n }\n default: {\n return false;\n }\n }\n }\n toPrimitiveAction(action) {\n if (this.isPrimitiveAction(action)) {\n return action;\n }\n switch (action) {\n case \"lookup\":\n case \"verify_credentials\": {\n return \"fetch\";\n }\n case \"update_credentials\": {\n return \"update\";\n }\n default: {\n return \"create\";\n }\n }\n }\n inferEncoding(action, path) {\n if ((action === \"create\" && path === \"/api/v1/accounts\") ||\n (action === \"update\" && path === \"/api/v1/accounts/update_credentials\") ||\n (action === \"create\" && path === \"/api/v1/email\") ||\n (action === \"create\" && path === \"/api/v1/featured_tag\") ||\n (action === \"create\" && path === \"/api/v1/media\") ||\n (action === \"create\" && path === \"/api/v2/media\")) {\n return \"multipart-form\";\n }\n return \"json\";\n }\n get mediaTimeout() {\n var _a;\n return (_a = this.params.mediaTimeout) !== null && _a !== void 0 ? _a : 60 * 1000;\n }\n}\n\nfunction waitForOpen(ws) {\n if (ws.readyState === WebSocket.OPEN) {\n return Promise.resolve();\n }\n return new Promise((resolve, reject) => {\n const handleError = (error) => {\n reject(error);\n };\n const handleClose = () => {\n reject(new Error(\"WebSocket closed\"));\n };\n const handleOpen = () => {\n resolve();\n };\n ws.addEventListener(\"error\", handleError, { once: true });\n ws.addEventListener(\"close\", handleClose, { once: true });\n ws.addEventListener(\"open\", handleOpen, { once: true });\n });\n}\nfunction waitForClose(ws) {\n if (ws.readyState === WebSocket.CLOSED) {\n return Promise.resolve();\n }\n return new Promise((resolve) => {\n const handleClose = () => {\n resolve();\n };\n ws.addEventListener(\"error\", handleClose, { once: true });\n ws.addEventListener(\"close\", handleClose, { once: true });\n });\n}\n\nclass WebSocketConnectorImpl {\n constructor(props, logger) {\n this.props = props;\n this.logger = logger;\n this.queue = [];\n this.disableRetry = false;\n this.initialized = false;\n this.init = () => __awaiter(this, void 0, void 0, function* () {\n var _a, e_1, _b, _c;\n var _d, _e, _f, _g, _h, _j;\n if (this.initialized) {\n return;\n }\n this.initialized = true;\n try {\n for (var _k = true, _l = __asyncValues(this.backoff), _m; _m = yield _l.next(), _a = _m.done, !_a; _k = true) {\n _c = _m.value;\n _k = false;\n const _ = _c;\n (_d = this.ws) === null || _d === void 0 ? void 0 : _d.close();\n try {\n (_e = this.logger) === null || _e === void 0 ? void 0 : _e.log(\"info\", \"Connecting to WebSocket...\");\n {\n const ctor = ((_f = this.props.implementation) !== null && _f !== void 0 ? _f : WebSocket);\n const ws = new ctor(...this.props.constructorParameters);\n yield waitForOpen(ws);\n this.ws = ws;\n }\n (_g = this.logger) === null || _g === void 0 ? void 0 : _g.log(\"info\", \"Connected to WebSocket\");\n for (const { resolve } of this.queue) {\n resolve(this.ws);\n }\n this.queue = [];\n yield waitForClose(this.ws);\n (_h = this.logger) === null || _h === void 0 ? void 0 : _h.log(\"info\", \"WebSocket closed\");\n this.backoff.clear();\n }\n catch (error) {\n (_j = this.logger) === null || _j === void 0 ? void 0 : _j.log(\"error\", \"WebSocket error:\", error);\n }\n if (this.disableRetry) {\n break;\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (!_k && !_a && (_b = _l.return)) yield _b.call(_l);\n }\n finally { if (e_1) throw e_1.error; }\n }\n for (const { reject } of this.queue) {\n reject(new MastoWebSocketError(`Failed to connect to WebSocket after ${this.props.maxAttempts} attempts`));\n }\n this.queue = [];\n });\n this.backoff = new ExponentialBackoff({\n maxAttempts: this.props.maxAttempts,\n });\n }\n canAcquire() {\n return !this.disableRetry;\n }\n acquire() {\n return __awaiter(this, void 0, void 0, function* () {\n this.init();\n if (this.ws != undefined) {\n return this.ws;\n }\n const promiseWithResolvers = createPromiseWithResolvers();\n this.queue.push(promiseWithResolvers);\n return yield promiseWithResolvers.promise;\n });\n }\n close() {\n var _a;\n this.disableRetry = true;\n (_a = this.ws) === null || _a === void 0 ? void 0 : _a.close();\n this.backoff.clear();\n for (const { reject } of this.queue) {\n reject(new MastoWebSocketError(\"WebSocket closed\"));\n }\n this.queue = [];\n }\n}\n\nfunction toAsyncIterable(ws) {\n return __asyncGenerator(this, arguments, function* toAsyncIterable_1() {\n var _a, e_1, _b, _c;\n const handleClose = (e) => __awaiter(this, void 0, void 0, function* () {\n /* istanbul ignore next */\n if (events.return == undefined) {\n throw new MastoUnexpectedError(\"events.return is undefined\");\n }\n yield events.return(e);\n });\n const handleError = (e) => __awaiter(this, void 0, void 0, function* () {\n /* istanbul ignore next */\n if (events.return == undefined) {\n throw new MastoUnexpectedError(\"events.return is undefined\");\n }\n yield events.return(e);\n });\n const events = on((handler) => {\n ws.addEventListener(\"message\", handler);\n ws.addEventListener(\"error\", handleError);\n ws.addEventListener(\"close\", handleClose);\n return () => {\n ws.removeEventListener(\"message\", handler);\n ws.removeEventListener(\"error\", handleError);\n ws.removeEventListener(\"close\", handleClose);\n };\n });\n try {\n for (var _d = true, events_1 = __asyncValues(events), events_1_1; events_1_1 = yield __await(events_1.next()), _a = events_1_1.done, !_a; _d = true) {\n _c = events_1_1.value;\n _d = false;\n const [event] = _c;\n yield yield __await(event);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (!_d && !_a && (_b = events_1.return)) yield __await(_b.call(events_1));\n }\n finally { if (e_1) throw e_1.error; }\n }\n });\n}\n\nclass WebSocketSubscription {\n constructor(connector, serializer, stream, logger, params) {\n this.connector = connector;\n this.serializer = serializer;\n this.stream = stream;\n this.logger = logger;\n this.params = params;\n }\n values() {\n var _a, _b, _c;\n return __asyncGenerator(this, arguments, function* values_1() {\n var _d, e_1, _e, _f;\n (_a = this.logger) === null || _a === void 0 ? void 0 : _a.log(\"info\", \"Subscribing to stream\", this.stream);\n while (this.connector.canAcquire()) {\n this.connection = yield __await(this.connector.acquire());\n const messages = toAsyncIterable(this.connection);\n const data = this.serializer.serialize(\"json\", Object.assign({ type: \"subscribe\", stream: this.stream }, this.params));\n (_b = this.logger) === null || _b === void 0 ? void 0 : _b.log(\"debug\", \"↑ WEBSOCKET\", data);\n this.connection.send(data);\n try {\n for (var _g = true, _h = (e_1 = void 0, __asyncValues(this.transformIntoEvents(messages))), _j; _j = yield __await(_h.next()), _d = _j.done, !_d; _g = true) {\n _f = _j.value;\n _g = false;\n const event = _f;\n if (!this.matches(event))\n continue;\n (_c = this.logger) === null || _c === void 0 ? void 0 : _c.log(\"debug\", \"↓ WEBSOCKET\", event);\n yield yield __await(event);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (!_g && !_d && (_e = _h.return)) yield __await(_e.call(_h));\n }\n finally { if (e_1) throw e_1.error; }\n }\n }\n });\n }\n unsubscribe() {\n if (this.connection == undefined) {\n return;\n }\n const data = this.serializer.serialize(\"json\", Object.assign({ type: \"unsubscribe\", stream: this.stream }, this.params));\n this.connection.send(data);\n }\n [Symbol.asyncIterator]() {\n return this.values();\n }\n /**\n * @experimental This is an experimental API.\n */\n [Symbol.dispose]() {\n this.unsubscribe();\n }\n matches(event) {\n var _a;\n // subscribe(\"hashtag\", { tag: \"foo\" }) -> [\"hashtag\", \"foo\"]\n // subscribe(\"list\", { list: \"foo\" }) -> [\"list\", \"foo\"]\n const params = (_a = this.params) !== null && _a !== void 0 ? _a : {};\n const extra = Object.values(params);\n const stream = [this.stream, ...extra];\n return stream.every((s) => event.stream.includes(s));\n }\n transformIntoEvents(messages) {\n return __asyncGenerator(this, arguments, function* transformIntoEvents_1() {\n var _a, e_2, _b, _c;\n try {\n for (var _d = true, messages_1 = __asyncValues(messages), messages_1_1; messages_1_1 = yield __await(messages_1.next()), _a = messages_1_1.done, !_a; _d = true) {\n _c = messages_1_1.value;\n _d = false;\n const message = _c;\n const event = yield __await(this.parseMessage(message.data));\n yield yield __await(event);\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (!_d && !_a && (_b = messages_1.return)) yield __await(_b.call(messages_1));\n }\n finally { if (e_2) throw e_2.error; }\n }\n });\n }\n parseMessage(rawEvent) {\n return __awaiter(this, void 0, void 0, function* () {\n const data = this.serializer.deserialize(\"json\", rawEvent);\n if (\"error\" in data) {\n throw new MastoUnexpectedError(data.error);\n }\n const payload = data.event === \"delete\" || data.payload == undefined\n ? data.payload\n : this.serializer.deserialize(\"json\", data.payload);\n return {\n stream: data.stream,\n event: data.event,\n payload: payload,\n };\n });\n }\n}\n\nclass WebSocketActionDispatcher {\n constructor(connector, serializer, logger) {\n this.connector = connector;\n this.serializer = serializer;\n this.logger = logger;\n }\n dispatch(action) {\n var _a;\n if (action.type === \"close\") {\n this.connector.close();\n return {};\n }\n if (action.type === \"prepare\") {\n return this.connector.acquire();\n }\n if (action.type !== \"subscribe\") {\n throw new MastoUnexpectedError(\"Unknown action type\");\n }\n const data = (_a = action.data) !== null && _a !== void 0 ? _a : {};\n const stream = action.path.replace(/^\\//, \"\").replaceAll(\"/\", \":\");\n return new WebSocketSubscription(this.connector, this.serializer, stream, this.logger, Object.assign({}, data));\n }\n}\n\nconst createActionProxy = (actionDispatcher, context = []) => {\n return new Proxy(noop, {\n get: get(actionDispatcher, context),\n apply: apply(actionDispatcher, context),\n });\n};\nconst SPECIAL_PROPERTIES = new Set([\n \"then\",\n \"catch\",\n \"finally\",\n \"inspect\",\n \"toString\",\n \"valueOf\",\n \"toJSON\",\n \"constructor\",\n \"prototype\",\n \"length\",\n \"name\",\n \"caller\",\n \"callee\",\n \"arguments\",\n \"bind\",\n \"apply\",\n \"call\",\n]);\nconst get = (actionDispatcher, context) => (_, property) => {\n if (typeof property === \"string\" && SPECIAL_PROPERTIES.has(property)) {\n return;\n }\n if (typeof property === \"symbol\") {\n return;\n }\n if (property === \"$select\") {\n return createActionProxy(actionDispatcher, [...context, property]);\n }\n return createActionProxy(actionDispatcher, [\n ...context,\n snakeCase(property),\n ]);\n};\nconst apply = (actionDispatcher, context) => (_1, _2, args) => {\n const action = context.pop();\n if (action == undefined) {\n throw new Error(\"No action specified\");\n }\n if (action === \"$select\") {\n return createActionProxy(actionDispatcher, [\n ...context,\n ...args,\n ]);\n }\n const path = \"/\" + context.join(\"/\");\n const [data, meta] = args;\n return actionDispatcher.dispatch({\n type: action,\n path,\n data,\n meta: meta,\n });\n};\n\nconst mergeAbortSignals = (signals) => {\n const abortController = new AbortController();\n for (const signal of signals) {\n signal.addEventListener(\"abort\", () => abortController.abort(), {\n once: true,\n });\n }\n return abortController.signal;\n};\n\nconst mergeHeadersInit = ([head, ...tail]) => {\n const headers = new Headers(head);\n for (const entry of tail) {\n for (const [key, value] of new Headers(entry).entries()) {\n headers.set(key, value);\n }\n }\n return headers;\n};\n\nconst DEFAULT_TIMEOUT_MS = 1000 * 300;\nclass HttpConfigImpl {\n constructor(props, serializer) {\n this.props = props;\n this.serializer = serializer;\n }\n mergeRequestInitWithDefaults(override = {}) {\n const requestInit = Object.assign({}, this.props.requestInit);\n // Merge\n {\n const { headers, signal } = override, rest = __rest(override, [\"headers\", \"signal\"]);\n Object.assign(requestInit, rest);\n requestInit.headers = this.mergeHeadersWithDefaults(headers);\n requestInit.signal = this.mergeAbortSignalWithDefaults(signal);\n }\n return requestInit;\n }\n resolvePath(path, params) {\n const url = new URL(path, this.props.url);\n if (typeof params === \"string\") {\n url.search = params;\n }\n else if (params != undefined) {\n url.search = this.serializer.serialize(\"querystring\", params);\n }\n return url;\n }\n createTimeout() {\n var _a;\n return AbortSignal.timeout((_a = this.props.timeout) !== null && _a !== void 0 ? _a : DEFAULT_TIMEOUT_MS);\n }\n mergeHeadersWithDefaults(override = {}) {\n var _a, _b;\n const headersInit = mergeHeadersInit([\n (_b = (_a = this.props.requestInit) === null || _a === void 0 ? void 0 : _a.headers) !== null && _b !== void 0 ? _b : {},\n override,\n ]);\n const headers = new Headers(headersInit);\n if (this.props.accessToken) {\n headers.set(\"Authorization\", `Bearer ${this.props.accessToken}`);\n }\n return new Headers(headers);\n }\n mergeAbortSignalWithDefaults(signal) {\n var _a;\n const timeout = this.createTimeout();\n const signals = [timeout];\n if ((_a = this.props.requestInit) === null || _a === void 0 ? void 0 : _a.signal) {\n signals.push(this.props.requestInit.signal);\n }\n if (signal != undefined) {\n signals.push(signal);\n }\n return mergeAbortSignals(signals);\n }\n}\n\nclass WebSocketConfigImpl {\n constructor(props, serializer) {\n this.props = props;\n this.serializer = serializer;\n }\n getProtocols(protocols = []) {\n if (this.props.useInsecureAccessToken ||\n this.props.accessToken == undefined) {\n return [...protocols];\n }\n return [this.props.accessToken, ...protocols];\n }\n resolvePath(path, params = {}) {\n const url = new URL(path, this.props.streamingApiUrl);\n if (this.props.useInsecureAccessToken) {\n params.accessToken = this.props.accessToken;\n }\n url.search = this.serializer.serialize(\"querystring\", params);\n return url;\n }\n getMaxAttempts() {\n if (this.props.retry === true || this.props.retry == undefined) {\n return Number.POSITIVE_INFINITY;\n }\n if (this.props.retry === false) {\n return 1;\n }\n return this.props.retry;\n }\n}\n\nclass BaseHttp {\n get(path, data, meta = {}) {\n return this.request(Object.assign({ method: \"GET\", path, search: data }, meta)).then((response) => response.data);\n }\n post(path, data, meta = {}) {\n return this.request(Object.assign({ method: \"POST\", path, body: data }, meta)).then((response) => response.data);\n }\n delete(path, data, meta = {}) {\n return this.request(Object.assign({ method: \"DELETE\", path, body: data }, meta)).then((response) => response.data);\n }\n /* istanbul ignore next */\n put(path, data, meta = {}) {\n return this.request(Object.assign({ method: \"PUT\", path, body: data }, meta)).then((response) => response.data);\n }\n patch(path, data, meta = {}) {\n return this.request(Object.assign({ method: \"PATCH\", path, body: data }, meta)).then((response) => response.data);\n }\n}\n\nconst getEncoding = (headers) => {\n var _a;\n const contentType = (_a = headers.get(\"Content-Type\")) === null || _a === void 0 ? void 0 : _a.replace(/\\s*;.*$/, \"\");\n if (typeof contentType !== \"string\") {\n return;\n }\n switch (contentType) {\n case \"application/json\": {\n return \"json\";\n }\n case \"multipart/form-data\": {\n return \"multipart-form\";\n }\n default: {\n return;\n }\n }\n};\n\nclass HttpNativeImpl extends BaseHttp {\n constructor(serializer, config, logger) {\n super();\n this.serializer = serializer;\n this.config = config;\n this.logger = logger;\n }\n request(params) {\n var _a, _b, _c, _d, _e;\n return __awaiter(this, void 0, void 0, function* () {\n const request = this.createRequest(params);\n try {\n (_a = this.logger) === null || _a === void 0 ? void 0 : _a.log(\"info\", `↑ ${request.method} ${request.url}`);\n (_b = this.logger) === null || _b === void 0 ? void 0 : _b.log(\"debug\", \"\\tbody\", {\n encoding: params.encoding,\n body: params.body,\n });\n const response = yield fetch(request);\n if (!response.ok) {\n throw response;\n }\n const text = yield response.text();\n const encoding = getEncoding(response.headers);\n if (encoding == undefined) {\n throw new MastoUnexpectedError(\"The server returned data with an unknown encoding.\");\n }\n const data = this.serializer.deserialize(encoding, text);\n (_c = this.logger) === null || _c === void 0 ? void 0 : _c.log(\"info\", `↓ ${request.method} ${request.url}`);\n (_d = this.logger) === null || _d === void 0 ? void 0 : _d.log(\"debug\", \"\\tbody\", text);\n return {\n headers: response.headers,\n data,\n };\n }\n catch (error) {\n (_e = this.logger) === null || _e === void 0 ? void 0 : _e.log(\"debug\", `HTTP failed`, error);\n throw yield this.createError(error);\n }\n });\n }\n createRequest(params) {\n const { method, path, search, encoding = \"json\", requestInit = {}, } = params;\n const url = this.config.resolvePath(path, search);\n const body = this.serializer.serialize(encoding, params.body);\n const init = this.config.mergeRequestInitWithDefaults(requestInit);\n const request = new Request(url, Object.assign({ method,\n body }, init));\n if (typeof body === \"string\" && encoding === \"json\") {\n request.headers.set(\"Content-Type\", \"application/json\");\n }\n return request;\n }\n createError(error) {\n return __awaiter(this, void 0, void 0, function* () {\n if (error instanceof Response) {\n const encoding = getEncoding(error.headers);\n if (encoding == undefined) {\n throw new MastoUnexpectedError(\"The server returned data with an unknown encoding. The server may be down.\");\n }\n const data = this.serializer.deserialize(encoding, yield error.text());\n const { error: message, errorDescription, details } = data, additionalProperties = __rest(data, [\"error\", \"errorDescription\", \"details\"]);\n return new MastoHttpError({\n statusCode: error.status,\n message: message,\n description: errorDescription,\n details: details,\n additionalProperties,\n }, { cause: error });\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (error != undefined && error.name === \"AbortError\") {\n return new MastoTimeoutError(`Request timed out`, { cause: error });\n }\n /* istanbul ignore next */\n return error;\n });\n }\n}\n\nclass LoggerConsoleImpl {\n constructor(level) {\n this.level = level;\n }\n log(type, message, meta) {\n if (!this.level.satisfies(type)) {\n return;\n }\n const args = meta == undefined ? [message] : [message, meta];\n switch (type) {\n case \"debug\": {\n console.debug(...args);\n return;\n }\n case \"info\": {\n console.info(...args);\n return;\n }\n case \"warn\": {\n console.warn(...args);\n return;\n }\n case \"error\": {\n console.error(...args);\n return;\n }\n }\n }\n}\n\n/* eslint-disable unicorn/prefer-math-trunc */\nconst LOG_TYPES = Object.freeze({\n DEBUG: 1 << 0,\n INFO: 1 << 1,\n WARN: 1 << 2,\n ERROR: 1 << 3,\n});\nclass LogLevel {\n constructor(level) {\n this.level = level;\n }\n satisfies(type) {\n switch (type) {\n case \"debug\": {\n return Boolean(this.level & LOG_TYPES.DEBUG);\n }\n case \"info\": {\n return Boolean(this.level & LOG_TYPES.INFO);\n }\n case \"warn\": {\n return Boolean(this.level & LOG_TYPES.WARN);\n }\n case \"error\": {\n return Boolean(this.level & LOG_TYPES.ERROR);\n }\n }\n }\n static from(type) {\n switch (type) {\n case \"debug\": {\n return new LogLevel(LOG_TYPES.DEBUG | LOG_TYPES.INFO | LOG_TYPES.WARN | LOG_TYPES.ERROR);\n }\n case \"info\": {\n return new LogLevel(LOG_TYPES.INFO | LOG_TYPES.WARN | LOG_TYPES.ERROR);\n }\n case \"warn\": {\n return new LogLevel(LOG_TYPES.WARN | LOG_TYPES.ERROR);\n }\n case \"error\": {\n return new LogLevel(LOG_TYPES.ERROR);\n }\n }\n }\n}\n\nconst createLogger = (type) => {\n const level = LogLevel.from(type !== null && type !== void 0 ? type : \"warn\");\n return new LoggerConsoleImpl(level);\n};\n\nconst isRecord = (x) => typeof x === \"object\" && x !== null && x.constructor.name === \"Object\";\n\nconst flattenRecord = (object, parent = \"\") => {\n if (Array.isArray(object)) {\n return object\n .map((value, i) => flattenRecord(value, parent == \"\" ? i.toString() : `${parent}[${i}]`))\n .reduce((prev, curr) => Object.assign(prev, curr), {});\n }\n if (isRecord(object)) {\n return Object.entries(object)\n .map(([key, value]) => flattenRecord(value, parent === \"\" ? key : `${parent}[${key}]`))\n .reduce((prev, curr) => Object.assign(prev, curr), {});\n }\n // Unit of the monoid is always an object\n return parent === \"\"\n ? object\n : { [parent]: object };\n};\n\nconst flatten = (object, parent = \"\") => {\n if (Array.isArray(object)) {\n return object.flatMap((value, i) => flatten(value, parent == \"\" ? i.toString() : `${parent}[]`));\n }\n if (isRecord(object)) {\n return Object.entries(object).flatMap(([key, value]) => flatten(value, parent === \"\" ? key : `${parent}[${key}]`));\n }\n return [[parent, object]];\n};\nconst stringify = (object) => {\n return flatten(object)\n .filter(([, v]) => v != undefined)\n .map(([k, v]) => `${k}=${encodeURIComponent(v)}`)\n .join(\"&\");\n};\nconst railsQueryString = { stringify };\n\nconst _transformKeys = (data, transform) => {\n if (Array.isArray(data)) {\n return data.map((value) => _transformKeys(value, transform));\n }\n if (isRecord(data)) {\n return Object.fromEntries(Object.entries(data).map(([key, value]) => [\n transform(key),\n _transformKeys(value, transform),\n ]));\n }\n return data;\n};\nconst transformKeys = (data, transform) => {\n const f = (key) => {\n // `PATCH /v1/preferences` uses `:` as a delimiter\n if (key.includes(\":\"))\n return key;\n // `PATCH /v2/filters` uses _destroy as a special key\n if (key.startsWith(\"_\"))\n return key;\n return transform(key);\n };\n return _transformKeys(data, f);\n};\n\nclass SerializerNativeImpl {\n serialize(type, rawData) {\n const data = transformKeys(rawData, snakeCase);\n switch (type) {\n case \"json\": {\n return JSON.stringify(data);\n }\n case \"multipart-form\": {\n const formData = new FormData();\n for (const [key, value] of Object.entries(flattenRecord(data))) {\n formData.append(key, value);\n }\n return formData;\n }\n case \"querystring\": {\n return railsQueryString.stringify(data);\n }\n default: {\n throw new MastoUnexpectedError(`Unknown content type ${type} to serialize.`);\n }\n }\n }\n deserialize(type, data) {\n switch (type) {\n case \"json\": {\n try {\n return transformKeys(JSON.parse(data), camelCase);\n }\n catch (_a) {\n throw new MastoDeserializeError(`Malformed JSON ${data} returned from the server.`, type, data);\n }\n }\n default: {\n throw new MastoDeserializeError(`Unknown content type ${type} returned from the server.`, type, data);\n }\n }\n }\n}\n\nconst createRestAPIClient = (props) => {\n const serializer = new SerializerNativeImpl();\n const config = new HttpConfigImpl(props, serializer);\n const logger = createLogger(props.log);\n const http = new HttpNativeImpl(serializer, config, logger);\n const actionDispatcher = new HttpActionDispatcher(http);\n const actionProxy = createActionProxy(actionDispatcher, [\n \"api\",\n ]);\n return actionProxy;\n};\nconst createOAuthAPIClient = (props) => {\n const serializer = new SerializerNativeImpl();\n const config = new HttpConfigImpl(props, serializer);\n const logger = createLogger(props.log);\n const http = new HttpNativeImpl(serializer, config, logger);\n const actionDispatcher = new HttpActionDispatcher(http);\n const actionProxy = createActionProxy(actionDispatcher, [\n \"oauth\",\n ]);\n return actionProxy;\n};\nfunction createStreamingAPIClient(props) {\n const serializer = new SerializerNativeImpl();\n const config = new WebSocketConfigImpl(props, serializer);\n const logger = createLogger(props.log);\n const connector = new WebSocketConnectorImpl({\n constructorParameters: [\n config.resolvePath(\"/api/v1/streaming\"),\n config.getProtocols(),\n ],\n implementation: props.implementation,\n maxAttempts: config.getMaxAttempts(),\n }, logger);\n const actionDispatcher = new WebSocketActionDispatcher(connector, serializer, logger);\n const actionProxy = createActionProxy(actionDispatcher);\n return actionProxy;\n}\n\nvar index$7 = /*#__PURE__*/Object.freeze({\n __proto__: null\n});\n\nvar index$6 = /*#__PURE__*/Object.freeze({\n __proto__: null,\n Admin: index$7\n});\n\nvar index$5 = /*#__PURE__*/Object.freeze({\n __proto__: null\n});\n\nvar index$4 = /*#__PURE__*/Object.freeze({\n __proto__: null\n});\n\nvar index$3 = /*#__PURE__*/Object.freeze({\n __proto__: null\n});\n\nvar index$2 = /*#__PURE__*/Object.freeze({\n __proto__: null,\n v1: index$4,\n v2: index$3\n});\n\nvar index$1 = /*#__PURE__*/Object.freeze({\n __proto__: null\n});\n\nvar index = /*#__PURE__*/Object.freeze({\n __proto__: null\n});\n\nvar mastodon = /*#__PURE__*/Object.freeze({\n __proto__: null,\n oauth: index,\n rest: index$2,\n streaming: index$1,\n v1: index$6,\n v2: index$5\n});\n\nexport { MastoDeserializeError, MastoHttpError, MastoInvalidArgumentError, MastoTimeoutError, MastoUnexpectedError, MastoWebSocketError, createOAuthAPIClient, createRestAPIClient, createStreamingAPIClient, mastodon };\n","/*!\n * Toastify js 1.12.0\n * https://github.com/apvarun/toastify-js\n * @license MIT licensed\n *\n * Copyright (C) 2018 Varun A P\n */\n(function(root, factory) {\n if (typeof module === \"object\" && module.exports) {\n module.exports = factory();\n } else {\n root.Toastify = factory();\n }\n})(this, function(global) {\n // Object initialization\n var Toastify = function(options) {\n // Returning a new init object\n return new Toastify.lib.init(options);\n },\n // Library version\n version = \"1.12.0\";\n\n // Set the default global options\n Toastify.defaults = {\n oldestFirst: true,\n text: \"Toastify is awesome!\",\n node: undefined,\n duration: 3000,\n selector: undefined,\n callback: function () {\n },\n destination: undefined,\n newWindow: false,\n close: false,\n gravity: \"toastify-top\",\n positionLeft: false,\n position: '',\n backgroundColor: '',\n avatar: \"\",\n className: \"\",\n stopOnFocus: true,\n onClick: function () {\n },\n offset: {x: 0, y: 0},\n escapeMarkup: true,\n ariaLive: 'polite',\n style: {background: ''}\n };\n\n // Defining the prototype of the object\n Toastify.lib = Toastify.prototype = {\n toastify: version,\n\n constructor: Toastify,\n\n // Initializing the object with required parameters\n init: function(options) {\n // Verifying and validating the input object\n if (!options) {\n options = {};\n }\n\n // Creating the options object\n this.options = {};\n\n this.toastElement = null;\n\n // Validating the options\n this.options.text = options.text || Toastify.defaults.text; // Display message\n this.options.node = options.node || Toastify.defaults.node; // Display content as node\n this.options.duration = options.duration === 0 ? 0 : options.duration || Toastify.defaults.duration; // Display duration\n this.options.selector = options.selector || Toastify.defaults.selector; // Parent selector\n this.options.callback = options.callback || Toastify.defaults.callback; // Callback after display\n this.options.destination = options.destination || Toastify.defaults.destination; // On-click destination\n this.options.newWindow = options.newWindow || Toastify.defaults.newWindow; // Open destination in new window\n this.options.close = options.close || Toastify.defaults.close; // Show toast close icon\n this.options.gravity = options.gravity === \"bottom\" ? \"toastify-bottom\" : Toastify.defaults.gravity; // toast position - top or bottom\n this.options.positionLeft = options.positionLeft || Toastify.defaults.positionLeft; // toast position - left or right\n this.options.position = options.position || Toastify.defaults.position; // toast position - left or right\n this.options.backgroundColor = options.backgroundColor || Toastify.defaults.backgroundColor; // toast background color\n this.options.avatar = options.avatar || Toastify.defaults.avatar; // img element src - url or a path\n this.options.className = options.className || Toastify.defaults.className; // additional class names for the toast\n this.options.stopOnFocus = options.stopOnFocus === undefined ? Toastify.defaults.stopOnFocus : options.stopOnFocus; // stop timeout on focus\n this.options.onClick = options.onClick || Toastify.defaults.onClick; // Callback after click\n this.options.offset = options.offset || Toastify.defaults.offset; // toast offset\n this.options.escapeMarkup = options.escapeMarkup !== undefined ? options.escapeMarkup : Toastify.defaults.escapeMarkup;\n this.options.ariaLive = options.ariaLive || Toastify.defaults.ariaLive;\n this.options.style = options.style || Toastify.defaults.style;\n if(options.backgroundColor) {\n this.options.style.background = options.backgroundColor;\n }\n\n // Returning the current object for chaining functions\n return this;\n },\n\n // Building the DOM element\n buildToast: function() {\n // Validating if the options are defined\n if (!this.options) {\n throw \"Toastify is not initialized\";\n }\n\n // Creating the DOM object\n var divElement = document.createElement(\"div\");\n divElement.className = \"toastify on \" + this.options.className;\n\n // Positioning toast to left or right or center\n if (!!this.options.position) {\n divElement.className += \" toastify-\" + this.options.position;\n } else {\n // To be depreciated in further versions\n if (this.options.positionLeft === true) {\n divElement.className += \" toastify-left\";\n console.warn('Property `positionLeft` will be depreciated in further versions. Please use `position` instead.')\n } else {\n // Default position\n divElement.className += \" toastify-right\";\n }\n }\n\n // Assigning gravity of element\n divElement.className += \" \" + this.options.gravity;\n\n if (this.options.backgroundColor) {\n // This is being deprecated in favor of using the style HTML DOM property\n console.warn('DEPRECATION NOTICE: \"backgroundColor\" is being deprecated. Please use the \"style.background\" property.');\n }\n\n // Loop through our style object and apply styles to divElement\n for (var property in this.options.style) {\n divElement.style[property] = this.options.style[property];\n }\n\n // Announce the toast to screen readers\n if (this.options.ariaLive) {\n divElement.setAttribute('aria-live', this.options.ariaLive)\n }\n\n // Adding the toast message/node\n if (this.options.node && this.options.node.nodeType === Node.ELEMENT_NODE) {\n // If we have a valid node, we insert it\n divElement.appendChild(this.options.node)\n } else {\n if (this.options.escapeMarkup) {\n divElement.innerText = this.options.text;\n } else {\n divElement.innerHTML = this.options.text;\n }\n\n if (this.options.avatar !== \"\") {\n var avatarElement = document.createElement(\"img\");\n avatarElement.src = this.options.avatar;\n\n avatarElement.className = \"toastify-avatar\";\n\n if (this.options.position == \"left\" || this.options.positionLeft === true) {\n // Adding close icon on the left of content\n divElement.appendChild(avatarElement);\n } else {\n // Adding close icon on the right of content\n divElement.insertAdjacentElement(\"afterbegin\", avatarElement);\n }\n }\n }\n\n // Adding a close icon to the toast\n if (this.options.close === true) {\n // Create a span for close element\n var closeElement = document.createElement(\"button\");\n closeElement.type = \"button\";\n closeElement.setAttribute(\"aria-label\", \"Close\");\n closeElement.className = \"toast-close\";\n closeElement.innerHTML = \"&#10006;\";\n\n // Triggering the removal of toast from DOM on close click\n closeElement.addEventListener(\n \"click\",\n function(event) {\n event.stopPropagation();\n this.removeElement(this.toastElement);\n window.clearTimeout(this.toastElement.timeOutValue);\n }.bind(this)\n );\n\n //Calculating screen width\n var width = window.innerWidth > 0 ? window.innerWidth : screen.width;\n\n // Adding the close icon to the toast element\n // Display on the right if screen width is less than or equal to 360px\n if ((this.options.position == \"left\" || this.options.positionLeft === true) && width > 360) {\n // Adding close icon on the left of content\n divElement.insertAdjacentElement(\"afterbegin\", closeElement);\n } else {\n // Adding close icon on the right of content\n divElement.appendChild(closeElement);\n }\n }\n\n // Clear timeout while toast is focused\n if (this.options.stopOnFocus && this.options.duration > 0) {\n var self = this;\n // stop countdown\n divElement.addEventListener(\n \"mouseover\",\n function(event) {\n window.clearTimeout(divElement.timeOutValue);\n }\n )\n // add back the timeout\n divElement.addEventListener(\n \"mouseleave\",\n function() {\n divElement.timeOutValue = window.setTimeout(\n function() {\n // Remove the toast from DOM\n self.removeElement(divElement);\n },\n self.options.duration\n )\n }\n )\n }\n\n // Adding an on-click destination path\n if (typeof this.options.destination !== \"undefined\") {\n divElement.addEventListener(\n \"click\",\n function(event) {\n event.stopPropagation();\n if (this.options.newWindow === true) {\n window.open(this.options.destination, \"_blank\");\n } else {\n window.location = this.options.destination;\n }\n }.bind(this)\n );\n }\n\n if (typeof this.options.onClick === \"function\" && typeof this.options.destination === \"undefined\") {\n divElement.addEventListener(\n \"click\",\n function(event) {\n event.stopPropagation();\n this.options.onClick();\n }.bind(this)\n );\n }\n\n // Adding offset\n if(typeof this.options.offset === \"object\") {\n\n var x = getAxisOffsetAValue(\"x\", this.options);\n var y = getAxisOffsetAValue(\"y\", this.options);\n\n var xOffset = this.options.position == \"left\" ? x : \"-\" + x;\n var yOffset = this.options.gravity == \"toastify-top\" ? y : \"-\" + y;\n\n divElement.style.transform = \"translate(\" + xOffset + \",\" + yOffset + \")\";\n\n }\n\n // Returning the generated element\n return divElement;\n },\n\n // Displaying the toast\n showToast: function() {\n // Creating the DOM object for the toast\n this.toastElement = this.buildToast();\n\n // Getting the root element to with the toast needs to be added\n var rootElement;\n if (typeof this.options.selector === \"string\") {\n rootElement = document.getElementById(this.options.selector);\n } else if (this.options.selector instanceof HTMLElement || (typeof ShadowRoot !== 'undefined' && this.options.selector instanceof ShadowRoot)) {\n rootElement = this.options.selector;\n } else {\n rootElement = document.body;\n }\n\n // Validating if root element is present in DOM\n if (!rootElement) {\n throw \"Root element is not defined\";\n }\n\n // Adding the DOM element\n var elementToInsert = Toastify.defaults.oldestFirst ? rootElement.firstChild : rootElement.lastChild;\n rootElement.insertBefore(this.toastElement, elementToInsert);\n\n // Repositioning the toasts in case multiple toasts are present\n Toastify.reposition();\n\n if (this.options.duration > 0) {\n this.toastElement.timeOutValue = window.setTimeout(\n function() {\n // Remove the toast from DOM\n this.removeElement(this.toastElement);\n }.bind(this),\n this.options.duration\n ); // Binding `this` for function invocation\n }\n\n // Supporting function chaining\n return this;\n },\n\n hideToast: function() {\n if (this.toastElement.timeOutValue) {\n clearTimeout(this.toastElement.timeOutValue);\n }\n this.removeElement(this.toastElement);\n },\n\n // Removing the element from the DOM\n removeElement: function(toastElement) {\n // Hiding the element\n // toastElement.classList.remove(\"on\");\n toastElement.className = toastElement.className.replace(\" on\", \"\");\n\n // Removing the element from DOM after transition end\n window.setTimeout(\n function() {\n // remove options node if any\n if (this.options.node && this.options.node.parentNode) {\n this.options.node.parentNode.removeChild(this.options.node);\n }\n\n // Remove the element from the DOM, only when the parent node was not removed before.\n if (toastElement.parentNode) {\n toastElement.parentNode.removeChild(toastElement);\n }\n\n // Calling the callback function\n this.options.callback.call(toastElement);\n\n // Repositioning the toasts again\n Toastify.reposition();\n }.bind(this),\n 400\n ); // Binding `this` for function invocation\n },\n };\n\n // Positioning the toasts on the DOM\n Toastify.reposition = function() {\n\n // Top margins with gravity\n var topLeftOffsetSize = {\n top: 15,\n bottom: 15,\n };\n var topRightOffsetSize = {\n top: 15,\n bottom: 15,\n };\n var offsetSize = {\n top: 15,\n bottom: 15,\n };\n\n // Get all toast messages on the DOM\n var allToasts = document.getElementsByClassName(\"toastify\");\n\n var classUsed;\n\n // Modifying the position of each toast element\n for (var i = 0; i < allToasts.length; i++) {\n // Getting the applied gravity\n if (containsClass(allToasts[i], \"toastify-top\") === true) {\n classUsed = \"toastify-top\";\n } else {\n classUsed = \"toastify-bottom\";\n }\n\n var height = allToasts[i].offsetHeight;\n classUsed = classUsed.substr(9, classUsed.length-1)\n // Spacing between toasts\n var offset = 15;\n\n var width = window.innerWidth > 0 ? window.innerWidth : screen.width;\n\n // Show toast in center if screen with less than or equal to 360px\n if (width <= 360) {\n // Setting the position\n allToasts[i].style[classUsed] = offsetSize[classUsed] + \"px\";\n\n offsetSize[classUsed] += height + offset;\n } else {\n if (containsClass(allToasts[i], \"toastify-left\") === true) {\n // Setting the position\n allToasts[i].style[classUsed] = topLeftOffsetSize[classUsed] + \"px\";\n\n topLeftOffsetSize[classUsed] += height + offset;\n } else {\n // Setting the position\n allToasts[i].style[classUsed] = topRightOffsetSize[classUsed] + \"px\";\n\n topRightOffsetSize[classUsed] += height + offset;\n }\n }\n }\n\n // Supporting function chaining\n return this;\n };\n\n // Helper function to get offset.\n function getAxisOffsetAValue(axis, options) {\n\n if(options.offset[axis]) {\n if(isNaN(options.offset[axis])) {\n return options.offset[axis];\n }\n else {\n return options.offset[axis] + 'px';\n }\n }\n\n return '0px';\n\n }\n\n function containsClass(elem, yourClass) {\n if (!elem || typeof yourClass !== \"string\") {\n return false;\n } else if (\n elem.className &&\n elem.className\n .trim()\n .split(/\\s+/gi)\n .indexOf(yourClass) > -1\n ) {\n return true;\n } else {\n return false;\n }\n }\n\n // Setting up the prototype for the init object\n Toastify.lib.init.prototype = Toastify.lib;\n\n // Returning the Toastify function to be assigned to the window object/module\n return Toastify;\n});\n","(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global[\"micro-memoize\"] = factory());\n})(this, (function () { 'use strict';\n\n /**\n * @constant DEFAULT_OPTIONS_KEYS the default options keys\n */\n var DEFAULT_OPTIONS_KEYS = {\n isEqual: true,\n isMatchingKey: true,\n isPromise: true,\n maxSize: true,\n onCacheAdd: true,\n onCacheChange: true,\n onCacheHit: true,\n transformKey: true,\n };\n /**\n * @function slice\n *\n * @description\n * slice.call() pre-bound\n */\n var slice = Array.prototype.slice;\n /**\n * @function cloneArray\n *\n * @description\n * clone the array-like object and return the new array\n *\n * @param arrayLike the array-like object to clone\n * @returns the clone as an array\n */\n function cloneArray(arrayLike) {\n var length = arrayLike.length;\n if (!length) {\n return [];\n }\n if (length === 1) {\n return [arrayLike[0]];\n }\n if (length === 2) {\n return [arrayLike[0], arrayLike[1]];\n }\n if (length === 3) {\n return [arrayLike[0], arrayLike[1], arrayLike[2]];\n }\n return slice.call(arrayLike, 0);\n }\n /**\n * @function getCustomOptions\n *\n * @description\n * get the custom options on the object passed\n *\n * @param options the memoization options passed\n * @returns the custom options passed\n */\n function getCustomOptions(options) {\n var customOptions = {};\n /* eslint-disable no-restricted-syntax */\n for (var key in options) {\n if (!DEFAULT_OPTIONS_KEYS[key]) {\n customOptions[key] = options[key];\n }\n }\n /* eslint-enable */\n return customOptions;\n }\n /**\n * @function isMemoized\n *\n * @description\n * is the function passed already memoized\n *\n * @param fn the function to test\n * @returns is the function already memoized\n */\n function isMemoized(fn) {\n return typeof fn === 'function' && fn.isMemoized;\n }\n /**\n * @function isSameValueZero\n *\n * @description\n * are the objects equal based on SameValueZero equality\n *\n * @param object1 the first object to compare\n * @param object2 the second object to compare\n * @returns are the two objects equal\n */\n function isSameValueZero(object1, object2) {\n // eslint-disable-next-line no-self-compare\n return object1 === object2 || (object1 !== object1 && object2 !== object2);\n }\n /**\n * @function mergeOptions\n *\n * @description\n * merge the options into the target\n *\n * @param existingOptions the options provided\n * @param newOptions the options to include\n * @returns the merged options\n */\n function mergeOptions(existingOptions, newOptions) {\n var target = {};\n /* eslint-disable no-restricted-syntax */\n for (var key in existingOptions) {\n target[key] = existingOptions[key];\n }\n for (var key in newOptions) {\n target[key] = newOptions[key];\n }\n /* eslint-enable */\n return target;\n }\n\n // utils\n var Cache = /** @class */ (function () {\n function Cache(options) {\n this.keys = [];\n this.values = [];\n this.options = options;\n var isMatchingKeyFunction = typeof options.isMatchingKey === 'function';\n if (isMatchingKeyFunction) {\n this.getKeyIndex = this._getKeyIndexFromMatchingKey;\n }\n else if (options.maxSize > 1) {\n this.getKeyIndex = this._getKeyIndexForMany;\n }\n else {\n this.getKeyIndex = this._getKeyIndexForSingle;\n }\n this.canTransformKey = typeof options.transformKey === 'function';\n this.shouldCloneArguments = this.canTransformKey || isMatchingKeyFunction;\n this.shouldUpdateOnAdd = typeof options.onCacheAdd === 'function';\n this.shouldUpdateOnChange = typeof options.onCacheChange === 'function';\n this.shouldUpdateOnHit = typeof options.onCacheHit === 'function';\n }\n Object.defineProperty(Cache.prototype, \"size\", {\n /**\n * The number of cached [key,value] results.\n */\n get: function () {\n return this.keys.length;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Cache.prototype, \"snapshot\", {\n /**\n * A copy of the cache at a moment in time. This is useful\n * to compare changes over time, since the cache mutates\n * internally for performance reasons.\n */\n get: function () {\n return {\n keys: cloneArray(this.keys),\n size: this.size,\n values: cloneArray(this.values),\n };\n },\n enumerable: false,\n configurable: true\n });\n /**\n * Gets the matching key index when a custom key matcher is used.\n */\n Cache.prototype._getKeyIndexFromMatchingKey = function (keyToMatch) {\n var _a = this.options, isMatchingKey = _a.isMatchingKey, maxSize = _a.maxSize;\n var keys = this.keys;\n var keysLength = keys.length;\n if (!keysLength) {\n return -1;\n }\n if (isMatchingKey(keys[0], keyToMatch)) {\n return 0;\n }\n if (maxSize > 1) {\n for (var index = 1; index < keysLength; index++) {\n if (isMatchingKey(keys[index], keyToMatch)) {\n return index;\n }\n }\n }\n return -1;\n };\n /**\n * Gets the matching key index when multiple keys are used.\n */\n Cache.prototype._getKeyIndexForMany = function (keyToMatch) {\n var isEqual = this.options.isEqual;\n var keys = this.keys;\n var keysLength = keys.length;\n if (!keysLength) {\n return -1;\n }\n if (keysLength === 1) {\n return this._getKeyIndexForSingle(keyToMatch);\n }\n var keyLength = keyToMatch.length;\n var existingKey;\n var argIndex;\n if (keyLength > 1) {\n for (var index = 0; index < keysLength; index++) {\n existingKey = keys[index];\n if (existingKey.length === keyLength) {\n argIndex = 0;\n for (; argIndex < keyLength; argIndex++) {\n if (!isEqual(existingKey[argIndex], keyToMatch[argIndex])) {\n break;\n }\n }\n if (argIndex === keyLength) {\n return index;\n }\n }\n }\n }\n else {\n for (var index = 0; index < keysLength; index++) {\n existingKey = keys[index];\n if (existingKey.length === keyLength &&\n isEqual(existingKey[0], keyToMatch[0])) {\n return index;\n }\n }\n }\n return -1;\n };\n /**\n * Gets the matching key index when a single key is used.\n */\n Cache.prototype._getKeyIndexForSingle = function (keyToMatch) {\n var keys = this.keys;\n if (!keys.length) {\n return -1;\n }\n var existingKey = keys[0];\n var length = existingKey.length;\n if (keyToMatch.length !== length) {\n return -1;\n }\n var isEqual = this.options.isEqual;\n if (length > 1) {\n for (var index = 0; index < length; index++) {\n if (!isEqual(existingKey[index], keyToMatch[index])) {\n return -1;\n }\n }\n return 0;\n }\n return isEqual(existingKey[0], keyToMatch[0]) ? 0 : -1;\n };\n /**\n * Order the array based on a Least-Recently-Used basis.\n */\n Cache.prototype.orderByLru = function (key, value, startingIndex) {\n var keys = this.keys;\n var values = this.values;\n var currentLength = keys.length;\n var index = startingIndex;\n while (index--) {\n keys[index + 1] = keys[index];\n values[index + 1] = values[index];\n }\n keys[0] = key;\n values[0] = value;\n var maxSize = this.options.maxSize;\n if (currentLength === maxSize && startingIndex === currentLength) {\n keys.pop();\n values.pop();\n }\n else if (startingIndex >= maxSize) {\n // eslint-disable-next-line no-multi-assign\n keys.length = values.length = maxSize;\n }\n };\n /**\n * Update the promise method to auto-remove from cache if rejected, and\n * if resolved then fire cache hit / changed.\n */\n Cache.prototype.updateAsyncCache = function (memoized) {\n var _this = this;\n var _a = this.options, onCacheChange = _a.onCacheChange, onCacheHit = _a.onCacheHit;\n var firstKey = this.keys[0];\n var firstValue = this.values[0];\n this.values[0] = firstValue.then(function (value) {\n if (_this.shouldUpdateOnHit) {\n onCacheHit(_this, _this.options, memoized);\n }\n if (_this.shouldUpdateOnChange) {\n onCacheChange(_this, _this.options, memoized);\n }\n return value;\n }, function (error) {\n var keyIndex = _this.getKeyIndex(firstKey);\n if (keyIndex !== -1) {\n _this.keys.splice(keyIndex, 1);\n _this.values.splice(keyIndex, 1);\n }\n throw error;\n });\n };\n return Cache;\n }());\n\n function createMemoizedFunction(fn, options) {\n if (options === void 0) { options = {}; }\n if (isMemoized(fn)) {\n return createMemoizedFunction(fn.fn, mergeOptions(fn.options, options));\n }\n if (typeof fn !== 'function') {\n throw new TypeError('You must pass a function to `memoize`.');\n }\n var _a = options.isEqual, isEqual = _a === void 0 ? isSameValueZero : _a, isMatchingKey = options.isMatchingKey, _b = options.isPromise, isPromise = _b === void 0 ? false : _b, _c = options.maxSize, maxSize = _c === void 0 ? 1 : _c, onCacheAdd = options.onCacheAdd, onCacheChange = options.onCacheChange, onCacheHit = options.onCacheHit, transformKey = options.transformKey;\n var normalizedOptions = mergeOptions({\n isEqual: isEqual,\n isMatchingKey: isMatchingKey,\n isPromise: isPromise,\n maxSize: maxSize,\n onCacheAdd: onCacheAdd,\n onCacheChange: onCacheChange,\n onCacheHit: onCacheHit,\n transformKey: transformKey,\n }, getCustomOptions(options));\n var cache = new Cache(normalizedOptions);\n var keys = cache.keys, values = cache.values, canTransformKey = cache.canTransformKey, shouldCloneArguments = cache.shouldCloneArguments, shouldUpdateOnAdd = cache.shouldUpdateOnAdd, shouldUpdateOnChange = cache.shouldUpdateOnChange, shouldUpdateOnHit = cache.shouldUpdateOnHit;\n var memoized = function () {\n var key = shouldCloneArguments\n ? cloneArray(arguments)\n : arguments;\n if (canTransformKey) {\n key = transformKey(key);\n }\n var keyIndex = keys.length ? cache.getKeyIndex(key) : -1;\n if (keyIndex !== -1) {\n if (shouldUpdateOnHit) {\n onCacheHit(cache, normalizedOptions, memoized);\n }\n if (keyIndex) {\n cache.orderByLru(keys[keyIndex], values[keyIndex], keyIndex);\n if (shouldUpdateOnChange) {\n onCacheChange(cache, normalizedOptions, memoized);\n }\n }\n }\n else {\n var newValue = fn.apply(this, arguments);\n var newKey = shouldCloneArguments\n ? key\n : cloneArray(arguments);\n cache.orderByLru(newKey, newValue, keys.length);\n if (isPromise) {\n cache.updateAsyncCache(memoized);\n }\n if (shouldUpdateOnAdd) {\n onCacheAdd(cache, normalizedOptions, memoized);\n }\n if (shouldUpdateOnChange) {\n onCacheChange(cache, normalizedOptions, memoized);\n }\n }\n return values[0];\n };\n memoized.cache = cache;\n memoized.fn = fn;\n memoized.isMemoized = true;\n memoized.options = normalizedOptions;\n return memoized;\n }\n\n return createMemoizedFunction;\n\n}));\n//# sourceMappingURL=micro-memoize.js.map\n","(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n typeof define === 'function' && define.amd ? define(['exports'], factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global[\"fast-equals\"] = {}));\n})(this, (function (exports) { 'use strict';\n\n var HAS_WEAK_MAP_SUPPORT = typeof WeakMap === 'function';\r\n var keys = Object.keys;\r\n /**\r\n * are the values passed strictly equal or both NaN\r\n *\r\n * @param a the value to compare against\r\n * @param b the value to test\r\n * @returns are the values equal by the SameValueZero principle\r\n */\r\n function sameValueZeroEqual(a, b) {\r\n return a === b || (a !== a && b !== b);\r\n }\r\n /**\r\n * is the value a plain object\r\n *\r\n * @param value the value to test\r\n * @returns is the value a plain object\r\n */\r\n function isPlainObject(value) {\r\n return value.constructor === Object || value.constructor == null;\r\n }\r\n /**\r\n * is the value promise-like (meaning it is thenable)\r\n *\r\n * @param value the value to test\r\n * @returns is the value promise-like\r\n */\r\n function isPromiseLike(value) {\r\n return !!value && typeof value.then === 'function';\r\n }\r\n /**\r\n * is the value passed a react element\r\n *\r\n * @param value the value to test\r\n * @returns is the value a react element\r\n */\r\n function isReactElement(value) {\r\n return !!(value && value.$$typeof);\r\n }\r\n /**\r\n * in cases where WeakMap is not supported, creates a new custom\r\n * object that mimics the necessary API aspects for cache purposes\r\n *\r\n * @returns the new cache object\r\n */\r\n function getNewCacheFallback() {\r\n var entries = [];\r\n return {\r\n delete: function (key) {\r\n for (var index = 0; index < entries.length; ++index) {\r\n if (entries[index][0] === key) {\r\n entries.splice(index, 1);\r\n return;\r\n }\r\n }\r\n },\r\n get: function (key) {\r\n for (var index = 0; index < entries.length; ++index) {\r\n if (entries[index][0] === key) {\r\n return entries[index][1];\r\n }\r\n }\r\n },\r\n set: function (key, value) {\r\n for (var index = 0; index < entries.length; ++index) {\r\n if (entries[index][0] === key) {\r\n entries[index][1] = value;\r\n return;\r\n }\r\n }\r\n entries.push([key, value]);\r\n }\r\n };\r\n }\r\n /**\r\n * get a new cache object to prevent circular references\r\n *\r\n * @returns the new cache object\r\n */\r\n var getNewCache = (function (canUseWeakMap) {\r\n if (canUseWeakMap) {\r\n return function _getNewCache() {\r\n return new WeakMap();\r\n };\r\n }\r\n return getNewCacheFallback;\r\n })(HAS_WEAK_MAP_SUPPORT);\r\n /**\r\n * create a custom isEqual handler specific to circular objects\r\n *\r\n * @param [isEqual] the isEqual comparator to use instead of isDeepEqual\r\n * @returns the method to create the `isEqual` function\r\n */\r\n function createCircularEqualCreator(isEqual) {\r\n return function createCircularEqual(comparator) {\r\n var _comparator = isEqual || comparator;\r\n return function circularEqual(a, b, indexOrKeyA, indexOrKeyB, parentA, parentB, cache) {\r\n if (cache === void 0) { cache = getNewCache(); }\r\n var isCacheableA = !!a && typeof a === 'object';\r\n var isCacheableB = !!b && typeof b === 'object';\r\n if (isCacheableA !== isCacheableB) {\r\n return false;\r\n }\r\n if (!isCacheableA && !isCacheableB) {\r\n return _comparator(a, b, cache);\r\n }\r\n var cachedA = cache.get(a);\r\n if (cachedA && cache.get(b)) {\r\n return cachedA === b;\r\n }\r\n cache.set(a, b);\r\n cache.set(b, a);\r\n var result = _comparator(a, b, cache);\r\n cache.delete(a);\r\n cache.delete(b);\r\n return result;\r\n };\r\n };\r\n }\r\n /**\r\n * are the arrays equal in value\r\n *\r\n * @param a the array to test\r\n * @param b the array to test against\r\n * @param isEqual the comparator to determine equality\r\n * @param meta the meta object to pass through\r\n * @returns are the arrays equal\r\n */\r\n function areArraysEqual(a, b, isEqual, meta) {\r\n var index = a.length;\r\n if (b.length !== index) {\r\n return false;\r\n }\r\n while (index-- > 0) {\r\n if (!isEqual(a[index], b[index], index, index, a, b, meta)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n /**\r\n * are the maps equal in value\r\n *\r\n * @param a the map to test\r\n * @param b the map to test against\r\n * @param isEqual the comparator to determine equality\r\n * @param meta the meta map to pass through\r\n * @returns are the maps equal\r\n */\r\n function areMapsEqual(a, b, isEqual, meta) {\r\n var isValueEqual = a.size === b.size;\r\n if (isValueEqual && a.size) {\r\n var matchedIndices_1 = {};\r\n var indexA_1 = 0;\r\n a.forEach(function (aValue, aKey) {\r\n if (isValueEqual) {\r\n var hasMatch_1 = false;\r\n var matchIndexB_1 = 0;\r\n b.forEach(function (bValue, bKey) {\r\n if (!hasMatch_1 && !matchedIndices_1[matchIndexB_1]) {\r\n hasMatch_1 =\r\n isEqual(aKey, bKey, indexA_1, matchIndexB_1, a, b, meta) &&\r\n isEqual(aValue, bValue, aKey, bKey, a, b, meta);\r\n if (hasMatch_1) {\r\n matchedIndices_1[matchIndexB_1] = true;\r\n }\r\n }\r\n matchIndexB_1++;\r\n });\r\n indexA_1++;\r\n isValueEqual = hasMatch_1;\r\n }\r\n });\r\n }\r\n return isValueEqual;\r\n }\r\n var OWNER = '_owner';\r\n var hasOwnProperty = Function.prototype.bind.call(Function.prototype.call, Object.prototype.hasOwnProperty);\r\n /**\r\n * are the objects equal in value\r\n *\r\n * @param a the object to test\r\n * @param b the object to test against\r\n * @param isEqual the comparator to determine equality\r\n * @param meta the meta object to pass through\r\n * @returns are the objects equal\r\n */\r\n function areObjectsEqual(a, b, isEqual, meta) {\r\n var keysA = keys(a);\r\n var index = keysA.length;\r\n if (keys(b).length !== index) {\r\n return false;\r\n }\r\n if (index) {\r\n var key = void 0;\r\n while (index-- > 0) {\r\n key = keysA[index];\r\n if (key === OWNER) {\r\n var reactElementA = isReactElement(a);\r\n var reactElementB = isReactElement(b);\r\n if ((reactElementA || reactElementB) &&\r\n reactElementA !== reactElementB) {\r\n return false;\r\n }\r\n }\r\n if (!hasOwnProperty(b, key) ||\r\n !isEqual(a[key], b[key], key, key, a, b, meta)) {\r\n return false;\r\n }\r\n }\r\n }\r\n return true;\r\n }\r\n /**\r\n * are the regExps equal in value\r\n *\r\n * @param a the regExp to test\r\n * @param b the regExp to test agains\r\n * @returns are the regExps equal\r\n */\r\n var areRegExpsEqual = (function () {\r\n if (/foo/g.flags === 'g') {\r\n return function areRegExpsEqual(a, b) {\r\n return a.source === b.source && a.flags === b.flags;\r\n };\r\n }\r\n return function areRegExpsEqualFallback(a, b) {\r\n return (a.source === b.source &&\r\n a.global === b.global &&\r\n a.ignoreCase === b.ignoreCase &&\r\n a.multiline === b.multiline &&\r\n a.unicode === b.unicode &&\r\n a.sticky === b.sticky &&\r\n a.lastIndex === b.lastIndex);\r\n };\r\n })();\r\n /**\r\n * are the sets equal in value\r\n *\r\n * @param a the set to test\r\n * @param b the set to test against\r\n * @param isEqual the comparator to determine equality\r\n * @param meta the meta set to pass through\r\n * @returns are the sets equal\r\n */\r\n function areSetsEqual(a, b, isEqual, meta) {\r\n var isValueEqual = a.size === b.size;\r\n if (isValueEqual && a.size) {\r\n var matchedIndices_2 = {};\r\n a.forEach(function (aValue, aKey) {\r\n if (isValueEqual) {\r\n var hasMatch_2 = false;\r\n var matchIndex_1 = 0;\r\n b.forEach(function (bValue, bKey) {\r\n if (!hasMatch_2 && !matchedIndices_2[matchIndex_1]) {\r\n hasMatch_2 = isEqual(aValue, bValue, aKey, bKey, a, b, meta);\r\n if (hasMatch_2) {\r\n matchedIndices_2[matchIndex_1] = true;\r\n }\r\n }\r\n matchIndex_1++;\r\n });\r\n isValueEqual = hasMatch_2;\r\n }\r\n });\r\n }\r\n return isValueEqual;\r\n }\n\n var HAS_MAP_SUPPORT = typeof Map === 'function';\r\n var HAS_SET_SUPPORT = typeof Set === 'function';\r\n var valueOf = Object.prototype.valueOf;\r\n function createComparator(createIsEqual) {\r\n var isEqual = \r\n /* eslint-disable no-use-before-define */\r\n typeof createIsEqual === 'function'\r\n ? createIsEqual(comparator)\r\n : function (a, b, indexOrKeyA, indexOrKeyB, parentA, parentB, meta) { return comparator(a, b, meta); };\r\n /* eslint-enable */\r\n /**\r\n * compare the value of the two objects and return true if they are equivalent in values\r\n *\r\n * @param a the value to test against\r\n * @param b the value to test\r\n * @param [meta] an optional meta object that is passed through to all equality test calls\r\n * @returns are a and b equivalent in value\r\n */\r\n function comparator(a, b, meta) {\r\n if (a === b) {\r\n return true;\r\n }\r\n if (a && b && typeof a === 'object' && typeof b === 'object') {\r\n if (isPlainObject(a) && isPlainObject(b)) {\r\n return areObjectsEqual(a, b, isEqual, meta);\r\n }\r\n var aShape = Array.isArray(a);\r\n var bShape = Array.isArray(b);\r\n if (aShape || bShape) {\r\n return aShape === bShape && areArraysEqual(a, b, isEqual, meta);\r\n }\r\n aShape = a instanceof Date;\r\n bShape = b instanceof Date;\r\n if (aShape || bShape) {\r\n return (aShape === bShape && sameValueZeroEqual(a.getTime(), b.getTime()));\r\n }\r\n aShape = a instanceof RegExp;\r\n bShape = b instanceof RegExp;\r\n if (aShape || bShape) {\r\n return aShape === bShape && areRegExpsEqual(a, b);\r\n }\r\n if (isPromiseLike(a) || isPromiseLike(b)) {\r\n return a === b;\r\n }\r\n if (HAS_MAP_SUPPORT) {\r\n aShape = a instanceof Map;\r\n bShape = b instanceof Map;\r\n if (aShape || bShape) {\r\n return aShape === bShape && areMapsEqual(a, b, isEqual, meta);\r\n }\r\n }\r\n if (HAS_SET_SUPPORT) {\r\n aShape = a instanceof Set;\r\n bShape = b instanceof Set;\r\n if (aShape || bShape) {\r\n return aShape === bShape && areSetsEqual(a, b, isEqual, meta);\r\n }\r\n }\r\n if (a.valueOf !== valueOf || b.valueOf !== valueOf) {\r\n return sameValueZeroEqual(a.valueOf(), b.valueOf());\r\n }\r\n return areObjectsEqual(a, b, isEqual, meta);\r\n }\r\n return a !== a && b !== b;\r\n }\r\n return comparator;\r\n }\n\n var deepEqual = createComparator();\r\n var shallowEqual = createComparator(function () { return sameValueZeroEqual; });\r\n var circularDeepEqual = createComparator(createCircularEqualCreator());\r\n var circularShallowEqual = createComparator(createCircularEqualCreator(sameValueZeroEqual));\n\n exports.circularDeepEqual = circularDeepEqual;\n exports.circularShallowEqual = circularShallowEqual;\n exports.createCustomEqual = createComparator;\n exports.deepEqual = deepEqual;\n exports.sameValueZeroEqual = sameValueZeroEqual;\n exports.shallowEqual = shallowEqual;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n}));\n//# sourceMappingURL=fast-equals.js.map\n","(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('micro-memoize'), require('fast-equals')) :\n typeof define === 'function' && define.amd ? define(['micro-memoize', 'fast-equals'], factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.moize = factory(global.memoize, global.fe));\n})(this, (function (memoize, fastEquals) { 'use strict';\n\n function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n }\n function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n }\n\n /**\n * @private\n *\n * @constant DEFAULT_OPTIONS\n */\n var DEFAULT_OPTIONS = {\n isDeepEqual: false,\n isPromise: false,\n isReact: false,\n isSerialized: false,\n isShallowEqual: false,\n matchesArg: undefined,\n matchesKey: undefined,\n maxAge: undefined,\n maxArgs: undefined,\n maxSize: 1,\n onExpire: undefined,\n profileName: undefined,\n serializer: undefined,\n updateCacheForKey: undefined,\n transformArgs: undefined,\n updateExpire: false\n };\n\n /**\n * @private\n *\n * @description\n * method to combine functions and return a single function that fires them all\n *\n * @param functions the functions to compose\n * @returns the composed function\n */\n function combine() {\n for (var _len = arguments.length, functions = new Array(_len), _key = 0; _key < _len; _key++) {\n functions[_key] = arguments[_key];\n }\n return functions.reduce(function (f, g) {\n if (typeof f === 'function') {\n return typeof g === 'function' ? function () {\n f.apply(this, arguments);\n g.apply(this, arguments);\n } : f;\n }\n if (typeof g === 'function') {\n return g;\n }\n });\n }\n\n /**\n * @private\n *\n * @description\n * method to compose functions and return a single function\n *\n * @param functions the functions to compose\n * @returns the composed function\n */\n function compose() {\n for (var _len2 = arguments.length, functions = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n functions[_key2] = arguments[_key2];\n }\n return functions.reduce(function (f, g) {\n if (typeof f === 'function') {\n return typeof g === 'function' ? function () {\n return f(g.apply(this, arguments));\n } : f;\n }\n if (typeof g === 'function') {\n return g;\n }\n });\n }\n\n /**\n * @private\n *\n * @description\n * find the index of the expiration based on the key\n *\n * @param expirations the list of expirations\n * @param key the key to match\n * @returns the index of the expiration\n */\n function findExpirationIndex(expirations, key) {\n for (var index = 0; index < expirations.length; index++) {\n if (expirations[index].key === key) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * @private\n *\n * @description\n * create function that finds the index of the key in the list of cache keys\n *\n * @param isEqual the function to test individual argument equality\n * @param isMatchingKey the function to test full key equality\n * @returns the function that finds the index of the key\n */\n function createFindKeyIndex(isEqual, isMatchingKey) {\n var areKeysEqual = typeof isMatchingKey === 'function' ? isMatchingKey : function (cacheKey, key) {\n for (var index = 0; index < key.length; index++) {\n if (!isEqual(cacheKey[index], key[index])) {\n return false;\n }\n }\n return true;\n };\n return function (keys, key) {\n for (var keysIndex = 0; keysIndex < keys.length; keysIndex++) {\n if (keys[keysIndex].length === key.length && areKeysEqual(keys[keysIndex], key)) {\n return keysIndex;\n }\n }\n return -1;\n };\n }\n /**\n * @private\n *\n * @description\n * merge two options objects, combining or composing functions as necessary\n *\n * @param originalOptions the options that already exist on the method\n * @param newOptions the new options to merge\n * @returns the merged options\n */\n function mergeOptions(originalOptions, newOptions) {\n if (!newOptions || newOptions === DEFAULT_OPTIONS) {\n return originalOptions;\n }\n return _extends({}, originalOptions, newOptions, {\n onCacheAdd: combine(originalOptions.onCacheAdd, newOptions.onCacheAdd),\n onCacheChange: combine(originalOptions.onCacheChange, newOptions.onCacheChange),\n onCacheHit: combine(originalOptions.onCacheHit, newOptions.onCacheHit),\n transformArgs: compose(originalOptions.transformArgs, newOptions.transformArgs)\n });\n }\n function isMoized(fn) {\n return typeof fn === 'function' && fn.isMoized;\n }\n function setName(fn, originalFunctionName, profileName) {\n try {\n var name = profileName || originalFunctionName || 'anonymous';\n Object.defineProperty(fn, 'name', {\n configurable: true,\n enumerable: false,\n value: \"moized(\" + name + \")\",\n writable: true\n });\n } catch (_unused) {\n // For engines where `function.name` is not configurable, do nothing.\n }\n }\n\n /**\n * @private\n *\n * @description\n * clear an active expiration and remove it from the list if applicable\n *\n * @param expirations the list of expirations\n * @param key the key to clear\n * @param shouldRemove should the expiration be removed from the list\n */\n function clearExpiration(expirations, key, shouldRemove) {\n var expirationIndex = findExpirationIndex(expirations, key);\n if (expirationIndex !== -1) {\n clearTimeout(expirations[expirationIndex].timeoutId);\n if (shouldRemove) {\n expirations.splice(expirationIndex, 1);\n }\n }\n }\n\n /**\n * @private\n *\n * @description\n * Create the timeout for the given expiration method. If the ability to `unref`\n * exists, then apply it to avoid process locks in NodeJS.\n *\n * @param expirationMethod the method to fire upon expiration\n * @param maxAge the time to expire after\n * @returns the timeout ID\n */\n function createTimeout(expirationMethod, maxAge) {\n var timeoutId = setTimeout(expirationMethod, maxAge);\n if (typeof timeoutId.unref === 'function') {\n timeoutId.unref();\n }\n return timeoutId;\n }\n\n /**\n * @private\n *\n * @description\n * create a function that, when an item is added to the cache, adds an expiration for it\n *\n * @param expirations the mutable expirations array\n * @param options the options passed on initialization\n * @param isEqual the function to check argument equality\n * @param isMatchingKey the function to check complete key equality\n * @returns the onCacheAdd function to handle expirations\n */\n function createOnCacheAddSetExpiration(expirations, options, isEqual, isMatchingKey) {\n var maxAge = options.maxAge;\n return function onCacheAdd(cache, moizedOptions, moized) {\n var key = cache.keys[0];\n if (findExpirationIndex(expirations, key) === -1) {\n var expirationMethod = function expirationMethod() {\n var findKeyIndex = createFindKeyIndex(isEqual, isMatchingKey);\n var keyIndex = findKeyIndex(cache.keys, key);\n var value = cache.values[keyIndex];\n if (~keyIndex) {\n cache.keys.splice(keyIndex, 1);\n cache.values.splice(keyIndex, 1);\n if (typeof options.onCacheChange === 'function') {\n options.onCacheChange(cache, moizedOptions, moized);\n }\n }\n clearExpiration(expirations, key, true);\n if (typeof options.onExpire === 'function' && options.onExpire(key) === false) {\n cache.keys.unshift(key);\n cache.values.unshift(value);\n onCacheAdd(cache, moizedOptions, moized);\n if (typeof options.onCacheChange === 'function') {\n options.onCacheChange(cache, moizedOptions, moized);\n }\n }\n };\n expirations.push({\n expirationMethod: expirationMethod,\n key: key,\n timeoutId: createTimeout(expirationMethod, maxAge)\n });\n }\n };\n }\n\n /**\n * @private\n *\n * @description\n * creates a function that, when a cache item is hit, reset the expiration\n *\n * @param expirations the mutable expirations array\n * @param options the options passed on initialization\n * @returns the onCacheAdd function to handle expirations\n */\n function createOnCacheHitResetExpiration(expirations, options) {\n return function onCacheHit(cache) {\n var key = cache.keys[0];\n var expirationIndex = findExpirationIndex(expirations, key);\n if (~expirationIndex) {\n clearExpiration(expirations, key, false);\n expirations[expirationIndex].timeoutId = createTimeout(expirations[expirationIndex].expirationMethod, options.maxAge);\n }\n };\n }\n\n /**\n * @private\n *\n * @description\n * get the micro-memoize options specific to the maxAge option\n *\n * @param expirations the expirations for the memoized function\n * @param options the options passed to the moizer\n * @param isEqual the function to test equality of the key on a per-argument basis\n * @param isMatchingKey the function to test equality of the whole key\n * @returns the object of options based on the entries passed\n */\n function getMaxAgeOptions(expirations, options, isEqual, isMatchingKey) {\n var onCacheAdd = typeof options.maxAge === 'number' && isFinite(options.maxAge) ? createOnCacheAddSetExpiration(expirations, options, isEqual, isMatchingKey) : undefined;\n return {\n onCacheAdd: onCacheAdd,\n onCacheHit: onCacheAdd && options.updateExpire ? createOnCacheHitResetExpiration(expirations, options) : undefined\n };\n }\n\n var statsCache = {\n anonymousProfileNameCounter: 1,\n isCollectingStats: false,\n profiles: {}\n };\n var hasWarningDisplayed = false;\n function clearStats(profileName) {\n if (profileName) {\n delete statsCache.profiles[profileName];\n } else {\n statsCache.profiles = {};\n }\n }\n\n /**\n * @private\n *\n * @description\n * activate stats collection\n *\n * @param isCollectingStats should stats be collected\n */\n function collectStats(isCollectingStats) {\n if (isCollectingStats === void 0) {\n isCollectingStats = true;\n }\n statsCache.isCollectingStats = isCollectingStats;\n }\n\n /**\n * @private\n *\n * @description\n * create a function that increments the number of calls for the specific profile\n */\n function createOnCacheAddIncrementCalls(options) {\n var profileName = options.profileName;\n return function () {\n if (profileName && !statsCache.profiles[profileName]) {\n statsCache.profiles[profileName] = {\n calls: 0,\n hits: 0\n };\n }\n statsCache.profiles[profileName].calls++;\n };\n }\n\n /**\n * @private\n *\n * @description\n * create a function that increments the number of calls and cache hits for the specific profile\n */\n function createOnCacheHitIncrementCallsAndHits(options) {\n return function () {\n var profiles = statsCache.profiles;\n var profileName = options.profileName;\n if (!profiles[profileName]) {\n profiles[profileName] = {\n calls: 0,\n hits: 0\n };\n }\n profiles[profileName].calls++;\n profiles[profileName].hits++;\n };\n }\n\n /**\n * @private\n *\n * @description\n * get the profileName for the function when one is not provided\n *\n * @param fn the function to be memoized\n * @returns the derived profileName for the function\n */\n function getDefaultProfileName(fn) {\n return fn.displayName || fn.name || \"Anonymous \" + statsCache.anonymousProfileNameCounter++;\n }\n\n /**\n * @private\n *\n * @description\n * get the usage percentage based on the number of hits and total calls\n *\n * @param calls the number of calls made\n * @param hits the number of cache hits when called\n * @returns the usage as a percentage string\n */\n function getUsagePercentage(calls, hits) {\n return calls ? (hits / calls * 100).toFixed(4) + \"%\" : '0.0000%';\n }\n\n /**\n * @private\n *\n * @description\n * get the statistics for a given method or all methods\n *\n * @param [profileName] the profileName to get the statistics for (get all when not provided)\n * @returns the object with stats information\n */\n function getStats(profileName) {\n if (!statsCache.isCollectingStats && !hasWarningDisplayed) {\n console.warn('Stats are not currently being collected, please run \"collectStats\" to enable them.'); // eslint-disable-line no-console\n\n hasWarningDisplayed = true;\n }\n var profiles = statsCache.profiles;\n if (profileName) {\n if (!profiles[profileName]) {\n return {\n calls: 0,\n hits: 0,\n usage: '0.0000%'\n };\n }\n var profile = profiles[profileName];\n return _extends({}, profile, {\n usage: getUsagePercentage(profile.calls, profile.hits)\n });\n }\n var completeStats = Object.keys(statsCache.profiles).reduce(function (completeProfiles, profileName) {\n completeProfiles.calls += profiles[profileName].calls;\n completeProfiles.hits += profiles[profileName].hits;\n return completeProfiles;\n }, {\n calls: 0,\n hits: 0\n });\n return _extends({}, completeStats, {\n profiles: Object.keys(profiles).reduce(function (computedProfiles, profileName) {\n computedProfiles[profileName] = getStats(profileName);\n return computedProfiles;\n }, {}),\n usage: getUsagePercentage(completeStats.calls, completeStats.hits)\n });\n }\n\n /**\n * @private\n *\n * @function getStatsOptions\n *\n * @description\n * get the options specific to storing statistics\n *\n * @param {Options} options the options passed to the moizer\n * @returns {Object} the options specific to keeping stats\n */\n function getStatsOptions(options) {\n return statsCache.isCollectingStats ? {\n onCacheAdd: createOnCacheAddIncrementCalls(options),\n onCacheHit: createOnCacheHitIncrementCallsAndHits(options)\n } : {};\n }\n\n var ALWAYS_SKIPPED_PROPERTIES = {\n arguments: true,\n callee: true,\n caller: true,\n constructor: true,\n length: true,\n name: true,\n prototype: true\n };\n\n /**\n * @private\n *\n * @description\n * copy the static properties from the original function to the moized\n * function\n *\n * @param originalFn the function copying from\n * @param newFn the function copying to\n * @param skippedProperties the list of skipped properties, if any\n */\n function copyStaticProperties(originalFn, newFn, skippedProperties) {\n if (skippedProperties === void 0) {\n skippedProperties = [];\n }\n Object.getOwnPropertyNames(originalFn).forEach(function (property) {\n if (!ALWAYS_SKIPPED_PROPERTIES[property] && skippedProperties.indexOf(property) === -1) {\n var descriptor = Object.getOwnPropertyDescriptor(originalFn, property);\n if (descriptor.get || descriptor.set) {\n Object.defineProperty(newFn, property, descriptor);\n } else {\n // @ts-expect-error - properites may not align\n newFn[property] = originalFn[property];\n }\n }\n });\n }\n\n /**\n * @private\n *\n * @description\n * add methods to the moized fuction object that allow extra features\n *\n * @param memoized the memoized function from micro-memoize\n */\n function addInstanceMethods(memoized, _ref) {\n var expirations = _ref.expirations;\n var options = memoized.options;\n var findKeyIndex = createFindKeyIndex(options.isEqual, options.isMatchingKey);\n var moized = memoized;\n moized.clear = function () {\n var onCacheChange = moized._microMemoizeOptions.onCacheChange,\n cache = moized.cache;\n cache.keys.length = 0;\n cache.values.length = 0;\n if (onCacheChange) {\n onCacheChange(cache, moized.options, moized);\n }\n return true;\n };\n moized.clearStats = function () {\n clearStats(moized.options.profileName);\n };\n moized.get = function (key) {\n var transformKey = moized._microMemoizeOptions.transformKey,\n cache = moized.cache;\n var cacheKey = transformKey ? transformKey(key) : key;\n var keyIndex = findKeyIndex(cache.keys, cacheKey);\n return keyIndex !== -1 ? moized.apply(this, key) : undefined;\n };\n moized.getStats = function () {\n return getStats(moized.options.profileName);\n };\n moized.has = function (key) {\n var transformKey = moized._microMemoizeOptions.transformKey;\n var cacheKey = transformKey ? transformKey(key) : key;\n return findKeyIndex(moized.cache.keys, cacheKey) !== -1;\n };\n moized.keys = function () {\n return moized.cacheSnapshot.keys;\n };\n moized.remove = function (key) {\n var _moized$_microMemoize = moized._microMemoizeOptions,\n onCacheChange = _moized$_microMemoize.onCacheChange,\n transformKey = _moized$_microMemoize.transformKey,\n cache = moized.cache;\n var keyIndex = findKeyIndex(cache.keys, transformKey ? transformKey(key) : key);\n if (keyIndex === -1) {\n return false;\n }\n var existingKey = cache.keys[keyIndex];\n cache.keys.splice(keyIndex, 1);\n cache.values.splice(keyIndex, 1);\n if (onCacheChange) {\n onCacheChange(cache, moized.options, moized);\n }\n clearExpiration(expirations, existingKey, true);\n return true;\n };\n moized.set = function (key, value) {\n var _microMemoizeOptions = moized._microMemoizeOptions,\n cache = moized.cache,\n options = moized.options;\n var onCacheAdd = _microMemoizeOptions.onCacheAdd,\n onCacheChange = _microMemoizeOptions.onCacheChange,\n transformKey = _microMemoizeOptions.transformKey;\n var cacheKey = transformKey ? transformKey(key) : key;\n var keyIndex = findKeyIndex(cache.keys, cacheKey);\n if (keyIndex === -1) {\n var cutoff = options.maxSize - 1;\n if (cache.size > cutoff) {\n cache.keys.length = cutoff;\n cache.values.length = cutoff;\n }\n cache.keys.unshift(cacheKey);\n cache.values.unshift(value);\n if (options.isPromise) {\n cache.updateAsyncCache(moized);\n }\n if (onCacheAdd) {\n onCacheAdd(cache, options, moized);\n }\n if (onCacheChange) {\n onCacheChange(cache, options, moized);\n }\n } else {\n var existingKey = cache.keys[keyIndex];\n cache.values[keyIndex] = value;\n if (keyIndex > 0) {\n cache.orderByLru(existingKey, value, keyIndex);\n }\n if (options.isPromise) {\n cache.updateAsyncCache(moized);\n }\n if (typeof onCacheChange === 'function') {\n onCacheChange(cache, options, moized);\n }\n }\n };\n moized.values = function () {\n return moized.cacheSnapshot.values;\n };\n }\n\n /**\n * @private\n *\n * @description\n * add propeties to the moized fuction object that surfaces extra information\n *\n * @param memoized the memoized function\n * @param expirations the list of expirations for cache items\n * @param options the options passed to the moizer\n * @param originalFunction the function that is being memoized\n */\n function addInstanceProperties(memoized, _ref2) {\n var expirations = _ref2.expirations,\n moizeOptions = _ref2.options,\n originalFunction = _ref2.originalFunction;\n var microMemoizeOptions = memoized.options;\n Object.defineProperties(memoized, {\n _microMemoizeOptions: {\n configurable: true,\n get: function get() {\n return microMemoizeOptions;\n }\n },\n cacheSnapshot: {\n configurable: true,\n get: function get() {\n var currentCache = memoized.cache;\n return {\n keys: currentCache.keys.slice(0),\n size: currentCache.size,\n values: currentCache.values.slice(0)\n };\n }\n },\n expirations: {\n configurable: true,\n get: function get() {\n return expirations;\n }\n },\n expirationsSnapshot: {\n configurable: true,\n get: function get() {\n return expirations.slice(0);\n }\n },\n isMoized: {\n configurable: true,\n get: function get() {\n return true;\n }\n },\n options: {\n configurable: true,\n get: function get() {\n return moizeOptions;\n }\n },\n originalFunction: {\n configurable: true,\n get: function get() {\n return originalFunction;\n }\n }\n });\n var moized = memoized;\n copyStaticProperties(originalFunction, moized);\n }\n\n /**\n * @private\n *\n * @description\n * add methods and properties to the memoized function for more features\n *\n * @param memoized the memoized function\n * @param configuration the configuration object for the instance\n * @returns the memoized function passed\n */\n function createMoizeInstance(memoized, configuration) {\n addInstanceMethods(memoized, configuration);\n addInstanceProperties(memoized, configuration);\n return memoized;\n }\n\n // This was stolen from React internals, which allows us to create React elements without needing\n // a dependency on the React library itself.\n var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol.for ? Symbol.for('react.element') : 0xeac7;\n\n /**\n * @private\n *\n * @description\n * Create a component that memoizes based on `props` and legacy `context`\n * on a per-instance basis. This requires creating a component class to\n * store the memoized function. The cost is quite low, and avoids the\n * need to have access to the React dependency by basically re-creating\n * the basic essentials for a component class and the results of the\n * `createElement` function.\n *\n * @param moizer the top-level moize method\n * @param fn the component to memoize\n * @param options the memoization options\n * @returns the memoized component\n */\n function createMoizedComponent(moizer, fn, options) {\n /**\n * This is a hack override setting the necessary options\n * for a React component to be memoized. In the main `moize`\n * method, if the `isReact` option is set it is short-circuited\n * to call this function, and these overrides allow the\n * necessary transformKey method to be derived.\n *\n * The order is based on:\n * 1) Set the necessary aspects of transformKey for React components.\n * 2) Allow setting of other options and overrides of those aspects\n * if desired (for example, `isDeepEqual` will use deep equality).\n * 3) Always set `isReact` to false to prevent infinite loop.\n */\n var reactMoizer = moizer(_extends({\n maxArgs: 2,\n isShallowEqual: true\n }, options, {\n isReact: false\n }));\n if (!fn.displayName) {\n // @ts-ignore - allow setting of displayName\n fn.displayName = fn.name || 'Component';\n }\n function Moized(props, context, updater) {\n this.props = props;\n this.context = context;\n this.updater = updater;\n this.MoizedComponent = reactMoizer(fn);\n }\n Moized.prototype.isReactComponent = {};\n Moized.prototype.render = function () {\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: this.MoizedComponent,\n props: this.props,\n ref: null,\n key: null,\n _owner: null\n };\n };\n copyStaticProperties(fn, Moized, ['contextType', 'contextTypes']);\n Moized.displayName = \"Moized(\" + (fn.displayName || fn.name || 'Component') + \")\";\n setName(Moized, fn.name, options.profileName);\n return Moized;\n }\n\n function createGetInitialArgs(size) {\n /**\n * @private\n *\n * @description\n * take the first N number of items from the array (faster than slice)\n *\n * @param args the args to take from\n * @returns the shortened list of args as an array\n */\n return function (args) {\n if (size >= args.length) {\n return args;\n }\n if (size === 0) {\n return [];\n }\n if (size === 1) {\n return [args[0]];\n }\n if (size === 2) {\n return [args[0], args[1]];\n }\n if (size === 3) {\n return [args[0], args[1], args[2]];\n }\n var clone = [];\n for (var index = 0; index < size; index++) {\n clone[index] = args[index];\n }\n return clone;\n };\n }\n\n /**\n * @function getCutoff\n *\n * @description\n * faster `Array.prototype.indexOf` implementation build for slicing / splicing\n *\n * @param array the array to match the value in\n * @param value the value to match\n * @returns the matching index, or -1\n */\n function getCutoff(array, value) {\n var length = array.length;\n for (var index = 0; index < length; ++index) {\n if (array[index] === value) {\n return index + 1;\n }\n }\n return 0;\n }\n\n /**\n * @private\n *\n * @description\n * custom replacer for the stringify function\n *\n * @returns if function then toString of it, else the value itself\n */\n function createDefaultReplacer() {\n var cache = [];\n var keys = [];\n return function defaultReplacer(key, value) {\n var type = typeof value;\n if (type === 'function' || type === 'symbol') {\n return value.toString();\n }\n if (typeof value === 'object') {\n if (cache.length) {\n var thisCutoff = getCutoff(cache, this);\n if (thisCutoff === 0) {\n cache[cache.length] = this;\n } else {\n cache.splice(thisCutoff);\n keys.splice(thisCutoff);\n }\n keys[keys.length] = key;\n var valueCutoff = getCutoff(cache, value);\n if (valueCutoff !== 0) {\n return \"[ref=\" + (keys.slice(0, valueCutoff).join('.') || '.') + \"]\";\n }\n } else {\n cache[0] = value;\n keys[0] = key;\n }\n return value;\n }\n return '' + value;\n };\n }\n\n /**\n * @private\n *\n * @description\n * get the stringified version of the argument passed\n *\n * @param arg argument to stringify\n * @returns the stringified argument\n */\n function getStringifiedArgument(arg) {\n var typeOfArg = typeof arg;\n return arg && (typeOfArg === 'object' || typeOfArg === 'function') ? JSON.stringify(arg, createDefaultReplacer()) : arg;\n }\n\n /**\n * @private\n *\n * @description\n * serialize the arguments passed\n *\n * @param options the options passed to the moizer\n * @param options.maxArgs the cap on the number of arguments used in serialization\n * @returns argument serialization method\n */\n function defaultArgumentSerializer(args) {\n var key = '|';\n for (var index = 0; index < args.length; index++) {\n key += getStringifiedArgument(args[index]) + '|';\n }\n return [key];\n }\n\n /**\n * @private\n *\n * @description\n * based on the options passed, either use the serializer passed or generate the internal one\n *\n * @param options the options passed to the moized function\n * @returns the function to use in serializing the arguments\n */\n function getSerializerFunction(options) {\n return typeof options.serializer === 'function' ? options.serializer : defaultArgumentSerializer;\n }\n\n /**\n * @private\n *\n * @description\n * are the serialized keys equal to one another\n *\n * @param cacheKey the cache key to compare\n * @param key the key to test\n * @returns are the keys equal\n */\n function getIsSerializedKeyEqual(cacheKey, key) {\n return cacheKey[0] === key[0];\n }\n\n function createOnCacheOperation(fn) {\n if (typeof fn === 'function') {\n return function (_cacheIgnored, _microMemoizeOptionsIgnored, memoized) {\n return fn(memoized.cache, memoized.options, memoized);\n };\n }\n }\n\n /**\n * @private\n *\n * @description\n * get the isEqual method passed to micro-memoize\n *\n * @param options the options passed to the moizer\n * @returns the isEqual method to apply\n */\n function getIsEqual(options) {\n return options.matchesArg || options.isDeepEqual && fastEquals.deepEqual || options.isShallowEqual && fastEquals.shallowEqual || fastEquals.sameValueZeroEqual;\n }\n\n /**\n * @private\n *\n * @description\n * get the isEqual method passed to micro-memoize\n *\n * @param options the options passed to the moizer\n * @returns the isEqual method to apply\n */\n function getIsMatchingKey(options) {\n return options.matchesKey || options.isSerialized && getIsSerializedKeyEqual || undefined;\n }\n\n /**\n * @private\n *\n * @description\n * get the function that will transform the key based on the arguments passed\n *\n * @param options the options passed to the moizer\n * @returns the function to transform the key with\n */\n function getTransformKey(options) {\n return compose(options.isSerialized && getSerializerFunction(options), typeof options.transformArgs === 'function' && options.transformArgs, typeof options.maxArgs === 'number' && createGetInitialArgs(options.maxArgs));\n }\n\n function createRefreshableMoized(moized) {\n var updateCacheForKey = moized.options.updateCacheForKey;\n\n /**\n * @private\n *\n * @description\n * Wrapper around already-`moize`d function which will intercept the memoization\n * and call the underlying function directly with the purpose of updating the cache\n * for the given key.\n *\n * Promise values use a tweak of the logic that exists at cache.updateAsyncCache, which\n * reverts to the original value if the promise is rejected and there was already a cached\n * value.\n */\n var refreshableMoized = function refreshableMoized() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n if (!updateCacheForKey(args)) {\n return moized.apply(this, args);\n }\n var result = moized.fn.apply(this, args);\n moized.set(args, result);\n return result;\n };\n copyStaticProperties(moized, refreshableMoized);\n return refreshableMoized;\n }\n\n var _excluded = [\"matchesArg\", \"isDeepEqual\", \"isPromise\", \"isReact\", \"isSerialized\", \"isShallowEqual\", \"matchesKey\", \"maxAge\", \"maxArgs\", \"maxSize\", \"onCacheAdd\", \"onCacheChange\", \"onCacheHit\", \"onExpire\", \"profileName\", \"serializer\", \"updateCacheForKey\", \"transformArgs\", \"updateExpire\"];\n /**\n * @module moize\n */\n /**\n * @description\n * memoize a function based its arguments passed, potentially improving runtime performance\n *\n * @example\n * import moize from 'moize';\n *\n * // standard implementation\n * const fn = (foo, bar) => `${foo} ${bar}`;\n * const memoizedFn = moize(fn);\n *\n * // implementation with options\n * const fn = async (id) => get(`http://foo.com/${id}`);\n * const memoizedFn = moize(fn, {isPromise: true, maxSize: 5});\n *\n * // implementation with convenience methods\n * const Foo = ({foo}) => <div>{foo}</div>;\n * const MemoizedFoo = moize.react(Foo);\n *\n * @param fn the function to memoized, or a list of options when currying\n * @param [options=DEFAULT_OPTIONS] the options to apply\n * @returns the memoized function\n */\n var moize = function moize(fn, passedOptions) {\n var options = passedOptions || DEFAULT_OPTIONS;\n if (isMoized(fn)) {\n var moizeable = fn.originalFunction;\n var mergedOptions = mergeOptions(fn.options, options);\n return moize(moizeable, mergedOptions);\n }\n if (typeof fn === 'object') {\n return function (curriedFn, curriedOptions) {\n if (typeof curriedFn === 'function') {\n var _mergedOptions = mergeOptions(fn, curriedOptions);\n return moize(curriedFn, _mergedOptions);\n }\n var mergedOptions = mergeOptions(fn, curriedFn);\n return moize(mergedOptions);\n };\n }\n if (options.isReact) {\n return createMoizedComponent(moize, fn, options);\n }\n var coalescedOptions = _extends({}, DEFAULT_OPTIONS, options, {\n maxAge: typeof options.maxAge === 'number' && options.maxAge >= 0 ? options.maxAge : DEFAULT_OPTIONS.maxAge,\n maxArgs: typeof options.maxArgs === 'number' && options.maxArgs >= 0 ? options.maxArgs : DEFAULT_OPTIONS.maxArgs,\n maxSize: typeof options.maxSize === 'number' && options.maxSize >= 0 ? options.maxSize : DEFAULT_OPTIONS.maxSize,\n profileName: options.profileName || getDefaultProfileName(fn)\n });\n var expirations = [];\n coalescedOptions.matchesArg;\n coalescedOptions.isDeepEqual;\n var isPromise = coalescedOptions.isPromise;\n coalescedOptions.isReact;\n coalescedOptions.isSerialized;\n coalescedOptions.isShallowEqual;\n coalescedOptions.matchesKey;\n coalescedOptions.maxAge;\n coalescedOptions.maxArgs;\n var maxSize = coalescedOptions.maxSize,\n onCacheAdd = coalescedOptions.onCacheAdd,\n onCacheChange = coalescedOptions.onCacheChange,\n onCacheHit = coalescedOptions.onCacheHit;\n coalescedOptions.onExpire;\n coalescedOptions.profileName;\n coalescedOptions.serializer;\n var updateCacheForKey = coalescedOptions.updateCacheForKey;\n coalescedOptions.transformArgs;\n coalescedOptions.updateExpire;\n var customOptions = _objectWithoutPropertiesLoose(coalescedOptions, _excluded);\n var isEqual = getIsEqual(coalescedOptions);\n var isMatchingKey = getIsMatchingKey(coalescedOptions);\n var maxAgeOptions = getMaxAgeOptions(expirations, coalescedOptions, isEqual, isMatchingKey);\n var statsOptions = getStatsOptions(coalescedOptions);\n var transformKey = getTransformKey(coalescedOptions);\n var microMemoizeOptions = _extends({}, customOptions, {\n isEqual: isEqual,\n isMatchingKey: isMatchingKey,\n isPromise: isPromise,\n maxSize: maxSize,\n onCacheAdd: createOnCacheOperation(combine(onCacheAdd, maxAgeOptions.onCacheAdd, statsOptions.onCacheAdd)),\n onCacheChange: createOnCacheOperation(onCacheChange),\n onCacheHit: createOnCacheOperation(combine(onCacheHit, maxAgeOptions.onCacheHit, statsOptions.onCacheHit)),\n transformKey: transformKey\n });\n var memoized = memoize(fn, microMemoizeOptions);\n var moized = createMoizeInstance(memoized, {\n expirations: expirations,\n options: coalescedOptions,\n originalFunction: fn\n });\n if (updateCacheForKey) {\n moized = createRefreshableMoized(moized);\n }\n setName(moized, fn.name, options.profileName);\n return moized;\n };\n\n /**\n * @function\n * @name clearStats\n * @memberof module:moize\n * @alias moize.clearStats\n *\n * @description\n * clear all existing stats stored\n */\n moize.clearStats = clearStats;\n\n /**\n * @function\n * @name collectStats\n * @memberof module:moize\n * @alias moize.collectStats\n *\n * @description\n * start collecting statistics\n */\n moize.collectStats = collectStats;\n\n /**\n * @function\n * @name compose\n * @memberof module:moize\n * @alias moize.compose\n *\n * @description\n * method to compose moized methods and return a single moized function\n *\n * @param moized the functions to compose\n * @returns the composed function\n */\n moize.compose = function () {\n return compose.apply(void 0, arguments) || moize;\n };\n\n /**\n * @function\n * @name deep\n * @memberof module:moize\n * @alias moize.deep\n *\n * @description\n * should deep equality check be used\n *\n * @returns the moizer function\n */\n moize.deep = moize({\n isDeepEqual: true\n });\n\n /**\n * @function\n * @name getStats\n * @memberof module:moize\n * @alias moize.getStats\n *\n * @description\n * get the statistics of a given profile, or overall usage\n *\n * @returns statistics for a given profile or overall usage\n */\n moize.getStats = getStats;\n\n /**\n * @function\n * @name infinite\n * @memberof module:moize\n * @alias moize.infinite\n *\n * @description\n * a moized method that will remove all limits from the cache size\n *\n * @returns the moizer function\n */\n moize.infinite = moize({\n maxSize: Infinity\n });\n\n /**\n * @function\n * @name isCollectingStats\n * @memberof module:moize\n * @alias moize.isCollectingStats\n *\n * @description\n * are stats being collected\n *\n * @returns are stats being collected\n */\n moize.isCollectingStats = function isCollectingStats() {\n return statsCache.isCollectingStats;\n };\n\n /**\n * @function\n * @name isMoized\n * @memberof module:moize\n * @alias moize.isMoized\n *\n * @description\n * is the fn passed a moized function\n *\n * @param fn the object to test\n * @returns is fn a moized function\n */\n moize.isMoized = function isMoized(fn) {\n return typeof fn === 'function' && !!fn.isMoized;\n };\n\n /**\n * @function\n * @name matchesArg\n * @memberof module:moize\n * @alias moize.matchesArg\n *\n * @description\n * a moized method where the arg matching method is the custom one passed\n *\n * @param keyMatcher the method to compare against those in cache\n * @returns the moizer function\n */\n moize.matchesArg = function (argMatcher) {\n return moize({\n matchesArg: argMatcher\n });\n };\n\n /**\n * @function\n * @name matchesKey\n * @memberof module:moize\n * @alias moize.matchesKey\n *\n * @description\n * a moized method where the key matching method is the custom one passed\n *\n * @param keyMatcher the method to compare against those in cache\n * @returns the moizer function\n */\n moize.matchesKey = function (keyMatcher) {\n return moize({\n matchesKey: keyMatcher\n });\n };\n function maxAge(maxAge, expireOptions) {\n if (expireOptions === true) {\n return moize({\n maxAge: maxAge,\n updateExpire: expireOptions\n });\n }\n if (typeof expireOptions === 'object') {\n var onExpire = expireOptions.onExpire,\n updateExpire = expireOptions.updateExpire;\n return moize({\n maxAge: maxAge,\n onExpire: onExpire,\n updateExpire: updateExpire\n });\n }\n if (typeof expireOptions === 'function') {\n return moize({\n maxAge: maxAge,\n onExpire: expireOptions,\n updateExpire: true\n });\n }\n return moize({\n maxAge: maxAge\n });\n }\n\n /**\n * @function\n * @name maxAge\n * @memberof module:moize\n * @alias moize.maxAge\n *\n * @description\n * a moized method where the age of the cache is limited to the number of milliseconds passed\n *\n * @param maxAge the TTL of the value in cache\n * @returns the moizer function\n */\n moize.maxAge = maxAge;\n\n /**\n * @function\n * @name maxArgs\n * @memberof module:moize\n * @alias moize.maxArgs\n *\n * @description\n * a moized method where the number of arguments used for determining cache is limited to the value passed\n *\n * @param maxArgs the number of args to base the key on\n * @returns the moizer function\n */\n moize.maxArgs = function maxArgs(maxArgs) {\n return moize({\n maxArgs: maxArgs\n });\n };\n\n /**\n * @function\n * @name maxSize\n * @memberof module:moize\n * @alias moize.maxSize\n *\n * @description\n * a moized method where the total size of the cache is limited to the value passed\n *\n * @param maxSize the maximum size of the cache\n * @returns the moizer function\n */\n moize.maxSize = function maxSize(maxSize) {\n return moize({\n maxSize: maxSize\n });\n };\n\n /**\n * @function\n * @name profile\n * @memberof module:moize\n * @alias moize.profile\n *\n * @description\n * a moized method with a profile name\n *\n * @returns the moizer function\n */\n moize.profile = function (profileName) {\n return moize({\n profileName: profileName\n });\n };\n\n /**\n * @function\n * @name promise\n * @memberof module:moize\n * @alias moize.promise\n *\n * @description\n * a moized method specific to caching resolved promise / async values\n *\n * @returns the moizer function\n */\n moize.promise = moize({\n isPromise: true,\n updateExpire: true\n });\n\n /**\n * @function\n * @name react\n * @memberof module:moize\n * @alias moize.react\n *\n * @description\n * a moized method specific to caching React element values\n *\n * @returns the moizer function\n */\n moize.react = moize({\n isReact: true\n });\n\n /**\n * @function\n * @name serialize\n * @memberof module:moize\n * @alias moize.serialize\n *\n * @description\n * a moized method that will serialize the arguments passed to use as the cache key\n *\n * @returns the moizer function\n */\n moize.serialize = moize({\n isSerialized: true\n });\n\n /**\n * @function\n * @name serializeWith\n * @memberof module:moize\n * @alias moize.serializeWith\n *\n * @description\n * a moized method that will serialize the arguments passed to use as the cache key\n * based on the serializer passed\n *\n * @returns the moizer function\n */\n moize.serializeWith = function (serializer) {\n return moize({\n isSerialized: true,\n serializer: serializer\n });\n };\n\n /**\n * @function\n * @name shallow\n * @memberof module:moize\n * @alias moize.shallow\n *\n * @description\n * should shallow equality check be used\n *\n * @returns the moizer function\n */\n moize.shallow = moize({\n isShallowEqual: true\n });\n\n /**\n * @function\n * @name transformArgs\n * @memberof module:moize\n * @alias moize.transformArgs\n *\n * @description\n * transform the args to allow for specific cache key comparison\n *\n * @param transformArgs the args transformer\n * @returns the moizer function\n */\n moize.transformArgs = function (transformArgs) {\n return moize({\n transformArgs: transformArgs\n });\n };\n\n /**\n * @function\n * @name updateCacheForKey\n * @memberof module:moize\n * @alias moize.updateCacheForKey\n *\n * @description\n * update the cache for a given key when the method passed returns truthy\n *\n * @param updateCacheForKey the method to determine when to update cache\n * @returns the moizer function\n */\n moize.updateCacheForKey = function (updateCacheForKey) {\n return moize({\n updateCacheForKey: updateCacheForKey\n });\n };\n\n // Add self-referring `default` property for edge-case cross-compatibility of mixed ESM/CommonJS usage.\n // This property is frozen and non-enumerable to avoid visibility on iteration or accidental overrides.\n Object.defineProperty(moize, 'default', {\n configurable: false,\n enumerable: false,\n value: moize,\n writable: false\n });\n\n return moize;\n\n}));\n//# sourceMappingURL=moize.js.map\n","export class AbortError extends Error {\n\tconstructor() {\n\t\tsuper('Throttled function aborted');\n\t\tthis.name = 'AbortError';\n\t}\n}\n\nexport default function pThrottle({limit, interval, strict, onDelay}) {\n\tif (!Number.isFinite(limit)) {\n\t\tthrow new TypeError('Expected `limit` to be a finite number');\n\t}\n\n\tif (!Number.isFinite(interval)) {\n\t\tthrow new TypeError('Expected `interval` to be a finite number');\n\t}\n\n\tconst queue = new Map();\n\n\tlet currentTick = 0;\n\tlet activeCount = 0;\n\n\tfunction windowedDelay() {\n\t\tconst now = Date.now();\n\n\t\tif ((now - currentTick) > interval) {\n\t\t\tactiveCount = 1;\n\t\t\tcurrentTick = now;\n\t\t\treturn 0;\n\t\t}\n\n\t\tif (activeCount < limit) {\n\t\t\tactiveCount++;\n\t\t} else {\n\t\t\tcurrentTick += interval;\n\t\t\tactiveCount = 1;\n\t\t}\n\n\t\treturn currentTick - now;\n\t}\n\n\tconst strictTicks = [];\n\n\tfunction strictDelay() {\n\t\tconst now = Date.now();\n\n\t\t// Clear the queue if there's a significant delay since the last execution\n\t\tif (strictTicks.length > 0 && now - strictTicks.at(-1) > interval) {\n\t\t\tstrictTicks.length = 0;\n\t\t}\n\n\t\t// If the queue is not full, add the current time and execute immediately\n\t\tif (strictTicks.length < limit) {\n\t\t\tstrictTicks.push(now);\n\t\t\treturn 0;\n\t\t}\n\n\t\t// Calculate the next execution time based on the first item in the queue\n\t\tconst nextExecutionTime = strictTicks[0] + interval;\n\n\t\t// Shift the queue and add the new execution time\n\t\tstrictTicks.shift();\n\t\tstrictTicks.push(nextExecutionTime);\n\n\t\t// Calculate the delay for the current execution\n\t\treturn Math.max(0, nextExecutionTime - now);\n\t}\n\n\tconst getDelay = strict ? strictDelay : windowedDelay;\n\n\treturn function_ => {\n\t\tconst throttled = function (...arguments_) {\n\t\t\tif (!throttled.isEnabled) {\n\t\t\t\treturn (async () => function_.apply(this, arguments_))();\n\t\t\t}\n\n\t\t\tlet timeoutId;\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\tconst execute = () => {\n\t\t\t\t\tresolve(function_.apply(this, arguments_));\n\t\t\t\t\tqueue.delete(timeoutId);\n\t\t\t\t};\n\n\t\t\t\tconst delay = getDelay();\n\t\t\t\tif (delay > 0) {\n\t\t\t\t\ttimeoutId = setTimeout(execute, delay);\n\t\t\t\t\tqueue.set(timeoutId, reject);\n\t\t\t\t\tonDelay?.();\n\t\t\t\t} else {\n\t\t\t\t\texecute();\n\t\t\t\t}\n\t\t\t});\n\t\t};\n\n\t\tthrottled.abort = () => {\n\t\t\tfor (const timeout of queue.keys()) {\n\t\t\t\tclearTimeout(timeout);\n\t\t\t\tqueue.get(timeout)(new AbortError());\n\t\t\t}\n\n\t\t\tqueue.clear();\n\t\t\tstrictTicks.splice(0, strictTicks.length);\n\t\t};\n\n\t\tthrottled.isEnabled = true;\n\n\t\tObject.defineProperty(throttled, 'queueSize', {\n\t\t\tget() {\n\t\t\t\treturn queue.size;\n\t\t\t},\n\t\t});\n\n\t\treturn throttled;\n\t};\n}\n","/**\n * A set of all the parents currently being observe. This is the only non weak\n * registry.\n */\nconst parents = new Set();\n/**\n * Element coordinates that is constantly kept up to date.\n */\nconst coords = new WeakMap();\n/**\n * Siblings of elements that have been removed from the dom.\n */\nconst siblings = new WeakMap();\n/**\n * Animations that are currently running.\n */\nconst animations = new WeakMap();\n/**\n * A map of existing intersection observers used to track element movements.\n */\nconst intersections = new WeakMap();\n/**\n * Intervals for automatically checking the position of elements occasionally.\n */\nconst intervals = new WeakMap();\n/**\n * The configuration options for each group of elements.\n */\nconst options = new WeakMap();\n/**\n * Debounce counters by id, used to debounce calls to update positions.\n */\nconst debounces = new WeakMap();\n/**\n * All parents that are currently enabled are tracked here.\n */\nconst enabled = new WeakSet();\n/**\n * The document used to calculate transitions.\n */\nlet root;\n/**\n * The roots XY scroll positions.\n */\nlet scrollX = 0;\nlet scrollY = 0;\n/**\n * Used to sign an element as the target.\n */\nconst TGT = \"__aa_tgt\";\n/**\n * Used to sign an element as being part of a removal.\n */\nconst DEL = \"__aa_del\";\n/**\n * Used to sign an element as being \"new\". When an element is removed from the\n * dom, but may cycle back in we can sign it with new to ensure the next time\n * it is recognized we consider it new.\n */\nconst NEW = \"__aa_new\";\n/**\n * Callback for handling all mutations.\n * @param mutations - A mutation list\n */\nconst handleMutations = (mutations) => {\n const elements = getElements(mutations);\n // If elements is \"false\" that means this mutation that should be ignored.\n if (elements) {\n elements.forEach((el) => animate(el));\n }\n};\n/**\n *\n * @param entries - Elements that have been resized.\n */\nconst handleResizes = (entries) => {\n entries.forEach((entry) => {\n if (entry.target === root)\n updateAllPos();\n if (coords.has(entry.target))\n updatePos(entry.target);\n });\n};\n/**\n * Observe this elements position.\n * @param el - The element to observe the position of.\n */\nfunction observePosition(el) {\n const oldObserver = intersections.get(el);\n oldObserver === null || oldObserver === void 0 ? void 0 : oldObserver.disconnect();\n let rect = coords.get(el);\n let invocations = 0;\n const buffer = 5;\n if (!rect) {\n rect = getCoords(el);\n coords.set(el, rect);\n }\n const { offsetWidth, offsetHeight } = root;\n const rootMargins = [\n rect.top - buffer,\n offsetWidth - (rect.left + buffer + rect.width),\n offsetHeight - (rect.top + buffer + rect.height),\n rect.left - buffer,\n ];\n const rootMargin = rootMargins\n .map((px) => `${-1 * Math.floor(px)}px`)\n .join(\" \");\n const observer = new IntersectionObserver(() => {\n ++invocations > 1 && updatePos(el);\n }, {\n root,\n threshold: 1,\n rootMargin,\n });\n observer.observe(el);\n intersections.set(el, observer);\n}\n/**\n * Update the exact position of a given element.\n * @param el - An element to update the position of.\n */\nfunction updatePos(el) {\n clearTimeout(debounces.get(el));\n const optionsOrPlugin = getOptions(el);\n const delay = isPlugin(optionsOrPlugin) ? 500 : optionsOrPlugin.duration;\n debounces.set(el, setTimeout(async () => {\n const currentAnimation = animations.get(el);\n try {\n await (currentAnimation === null || currentAnimation === void 0 ? void 0 : currentAnimation.finished);\n coords.set(el, getCoords(el));\n observePosition(el);\n }\n catch {\n // ignore errors as the `.finished` promise is rejected when animations were cancelled\n }\n }, delay));\n}\n/**\n * Updates all positions that are currently being tracked.\n */\nfunction updateAllPos() {\n clearTimeout(debounces.get(root));\n debounces.set(root, setTimeout(() => {\n parents.forEach((parent) => forEach(parent, (el) => lowPriority(() => updatePos(el))));\n }, 100));\n}\n/**\n * Its possible for a quick scroll or other fast events to get past the\n * intersection observer, so occasionally we need want \"cold-poll\" for the\n * latests and greatest position. We try to do this in the most non-disruptive\n * fashion possible. First we only do this ever couple seconds, staggard by a\n * random offset.\n * @param el - Element\n */\nfunction poll(el) {\n setTimeout(() => {\n intervals.set(el, setInterval(() => lowPriority(updatePos.bind(null, el)), 2000));\n }, Math.round(2000 * Math.random()));\n}\n/**\n * Perform some operation that is non critical at some point.\n * @param callback\n */\nfunction lowPriority(callback) {\n if (typeof requestIdleCallback === \"function\") {\n requestIdleCallback(() => callback());\n }\n else {\n requestAnimationFrame(() => callback());\n }\n}\n/**\n * The mutation observer responsible for watching each root element.\n */\nlet mutations;\n/**\n * A resize observer, responsible for recalculating elements on resize.\n */\nlet resize;\n/**\n * If this is in a browser, initialize our Web APIs\n */\nif (typeof window !== \"undefined\") {\n root = document.documentElement;\n mutations = new MutationObserver(handleMutations);\n resize = new ResizeObserver(handleResizes);\n window.addEventListener(\"scroll\", () => {\n scrollY = window.scrollY;\n scrollX = window.scrollX;\n });\n resize.observe(root);\n}\n/**\n * Retrieves all the elements that may have been affected by the last mutation\n * including ones that have been removed and are no longer in the DOM.\n * @param mutations - A mutation list.\n * @returns\n */\nfunction getElements(mutations) {\n const observedNodes = mutations.reduce((nodes, mutation) => {\n return [\n ...nodes,\n ...Array.from(mutation.addedNodes),\n ...Array.from(mutation.removedNodes),\n ];\n }, []);\n // Short circuit if _only_ comment nodes are observed\n const onlyCommentNodesObserved = observedNodes.every((node) => node.nodeName === \"#comment\");\n if (onlyCommentNodesObserved)\n return false;\n return mutations.reduce((elements, mutation) => {\n // Short circuit if we find a purposefully deleted node.\n if (elements === false)\n return false;\n if (mutation.target instanceof Element) {\n target(mutation.target);\n if (!elements.has(mutation.target)) {\n elements.add(mutation.target);\n for (let i = 0; i < mutation.target.children.length; i++) {\n const child = mutation.target.children.item(i);\n if (!child)\n continue;\n if (DEL in child) {\n return false;\n }\n target(mutation.target, child);\n elements.add(child);\n }\n }\n if (mutation.removedNodes.length) {\n for (let i = 0; i < mutation.removedNodes.length; i++) {\n const child = mutation.removedNodes[i];\n if (DEL in child) {\n return false;\n }\n if (child instanceof Element) {\n elements.add(child);\n target(mutation.target, child);\n siblings.set(child, [\n mutation.previousSibling,\n mutation.nextSibling,\n ]);\n }\n }\n }\n }\n return elements;\n }, new Set());\n}\n/**\n * Assign the target to an element.\n * @param el - The root element\n * @param child\n */\nfunction target(el, child) {\n if (!child && !(TGT in el))\n Object.defineProperty(el, TGT, { value: el });\n else if (child && !(TGT in child))\n Object.defineProperty(child, TGT, { value: el });\n}\n/**\n * Determines what kind of change took place on the given element and then\n * performs the proper animation based on that.\n * @param el - The specific element to animate.\n */\nfunction animate(el) {\n var _a;\n const isMounted = el.isConnected;\n const preExisting = coords.has(el);\n if (isMounted && siblings.has(el))\n siblings.delete(el);\n if (animations.has(el)) {\n (_a = animations.get(el)) === null || _a === void 0 ? void 0 : _a.cancel();\n }\n if (NEW in el) {\n add(el);\n }\n else if (preExisting && isMounted) {\n remain(el);\n }\n else if (preExisting && !isMounted) {\n remove(el);\n }\n else {\n add(el);\n }\n}\n/**\n * Removes all non-digits from a string and casts to a number.\n * @param str - A string containing a pixel value.\n * @returns\n */\nfunction raw(str) {\n return Number(str.replace(/[^0-9.\\-]/g, \"\"));\n}\n/**\n * Get the scroll offset of elements\n * @param el - Element\n * @returns\n */\nfunction getScrollOffset(el) {\n let p = el.parentElement;\n while (p) {\n if (p.scrollLeft || p.scrollTop) {\n return { x: p.scrollLeft, y: p.scrollTop };\n }\n p = p.parentElement;\n }\n return { x: 0, y: 0 };\n}\n/**\n * Get the coordinates of elements adjusted for scroll position.\n * @param el - Element\n * @returns\n */\nfunction getCoords(el) {\n const rect = el.getBoundingClientRect();\n const { x, y } = getScrollOffset(el);\n return {\n top: rect.top + y,\n left: rect.left + x,\n width: rect.width,\n height: rect.height,\n };\n}\n/**\n * Returns the width/height that the element should be transitioned between.\n * This takes into account box-sizing.\n * @param el - Element being animated\n * @param oldCoords - Old set of Coordinates coordinates\n * @param newCoords - New set of Coordinates coordinates\n * @returns\n */\nfunction getTransitionSizes(el, oldCoords, newCoords) {\n let widthFrom = oldCoords.width;\n let heightFrom = oldCoords.height;\n let widthTo = newCoords.width;\n let heightTo = newCoords.height;\n const styles = getComputedStyle(el);\n const sizing = styles.getPropertyValue(\"box-sizing\");\n if (sizing === \"content-box\") {\n const paddingY = raw(styles.paddingTop) +\n raw(styles.paddingBottom) +\n raw(styles.borderTopWidth) +\n raw(styles.borderBottomWidth);\n const paddingX = raw(styles.paddingLeft) +\n raw(styles.paddingRight) +\n raw(styles.borderRightWidth) +\n raw(styles.borderLeftWidth);\n widthFrom -= paddingX;\n widthTo -= paddingX;\n heightFrom -= paddingY;\n heightTo -= paddingY;\n }\n return [widthFrom, widthTo, heightFrom, heightTo].map(Math.round);\n}\n/**\n * Retrieves animation options for the current element.\n * @param el - Element to retrieve options for.\n * @returns\n */\nfunction getOptions(el) {\n return TGT in el && options.has(el[TGT])\n ? options.get(el[TGT])\n : { duration: 250, easing: \"ease-in-out\" };\n}\n/**\n * Returns the target of a given animation (generally the parent).\n * @param el - An element to check for a target\n * @returns\n */\nfunction getTarget(el) {\n if (TGT in el)\n return el[TGT];\n return undefined;\n}\n/**\n * Checks if animations are enabled or disabled for a given element.\n * @param el - Any element\n * @returns\n */\nfunction isEnabled(el) {\n const target = getTarget(el);\n return target ? enabled.has(target) : false;\n}\n/**\n * Iterate over the children of a given parent.\n * @param parent - A parent element\n * @param callback - A callback\n */\nfunction forEach(parent, ...callbacks) {\n callbacks.forEach((callback) => callback(parent, options.has(parent)));\n for (let i = 0; i < parent.children.length; i++) {\n const child = parent.children.item(i);\n if (child) {\n callbacks.forEach((callback) => callback(child, options.has(child)));\n }\n }\n}\n/**\n * Always return tuple to provide consistent interface\n */\nfunction getPluginTuple(pluginReturn) {\n if (Array.isArray(pluginReturn))\n return pluginReturn;\n return [pluginReturn];\n}\n/**\n * Determine if config is plugin\n */\nfunction isPlugin(config) {\n return typeof config === \"function\";\n}\n/**\n * The element in question is remaining in the DOM.\n * @param el - Element to flip\n * @returns\n */\nfunction remain(el) {\n const oldCoords = coords.get(el);\n const newCoords = getCoords(el);\n if (!isEnabled(el))\n return coords.set(el, newCoords);\n let animation;\n if (!oldCoords)\n return;\n const pluginOrOptions = getOptions(el);\n if (typeof pluginOrOptions !== \"function\") {\n const deltaX = oldCoords.left - newCoords.left;\n const deltaY = oldCoords.top - newCoords.top;\n const [widthFrom, widthTo, heightFrom, heightTo] = getTransitionSizes(el, oldCoords, newCoords);\n const start = {\n transform: `translate(${deltaX}px, ${deltaY}px)`,\n };\n const end = {\n transform: `translate(0, 0)`,\n };\n if (widthFrom !== widthTo) {\n start.width = `${widthFrom}px`;\n end.width = `${widthTo}px`;\n }\n if (heightFrom !== heightTo) {\n start.height = `${heightFrom}px`;\n end.height = `${heightTo}px`;\n }\n animation = el.animate([start, end], {\n duration: pluginOrOptions.duration,\n easing: pluginOrOptions.easing,\n });\n }\n else {\n const [keyframes] = getPluginTuple(pluginOrOptions(el, \"remain\", oldCoords, newCoords));\n animation = new Animation(keyframes);\n animation.play();\n }\n animations.set(el, animation);\n coords.set(el, newCoords);\n animation.addEventListener(\"finish\", updatePos.bind(null, el));\n}\n/**\n * Adds the element with a transition.\n * @param el - Animates the element being added.\n */\nfunction add(el) {\n if (NEW in el)\n delete el[NEW];\n const newCoords = getCoords(el);\n coords.set(el, newCoords);\n const pluginOrOptions = getOptions(el);\n if (!isEnabled(el))\n return;\n let animation;\n if (typeof pluginOrOptions !== \"function\") {\n animation = el.animate([\n { transform: \"scale(.98)\", opacity: 0 },\n { transform: \"scale(0.98)\", opacity: 0, offset: 0.5 },\n { transform: \"scale(1)\", opacity: 1 },\n ], {\n duration: pluginOrOptions.duration * 1.5,\n easing: \"ease-in\",\n });\n }\n else {\n const [keyframes] = getPluginTuple(pluginOrOptions(el, \"add\", newCoords));\n animation = new Animation(keyframes);\n animation.play();\n }\n animations.set(el, animation);\n animation.addEventListener(\"finish\", updatePos.bind(null, el));\n}\n/**\n * Clean up after removing an element from the dom.\n * @param el - Element being removed\n * @param styles - Optional styles that should be removed from the element.\n */\nfunction cleanUp(el, styles) {\n var _a;\n el.remove();\n coords.delete(el);\n siblings.delete(el);\n animations.delete(el);\n (_a = intersections.get(el)) === null || _a === void 0 ? void 0 : _a.disconnect();\n setTimeout(() => {\n if (DEL in el)\n delete el[DEL];\n Object.defineProperty(el, NEW, { value: true, configurable: true });\n if (styles && el instanceof HTMLElement) {\n for (const style in styles) {\n el.style[style] = \"\";\n }\n }\n }, 0);\n}\n/**\n * Animates the removal of an element.\n * @param el - Element to remove\n */\nfunction remove(el) {\n var _a;\n if (!siblings.has(el) || !coords.has(el))\n return;\n const [prev, next] = siblings.get(el);\n Object.defineProperty(el, DEL, { value: true, configurable: true });\n const finalX = window.scrollX;\n const finalY = window.scrollY;\n if (next && next.parentNode && next.parentNode instanceof Element) {\n next.parentNode.insertBefore(el, next);\n }\n else if (prev && prev.parentNode) {\n prev.parentNode.appendChild(el);\n }\n else {\n (_a = getTarget(el)) === null || _a === void 0 ? void 0 : _a.appendChild(el);\n }\n if (!isEnabled(el))\n return cleanUp(el);\n const [top, left, width, height] = deletePosition(el);\n const optionsOrPlugin = getOptions(el);\n const oldCoords = coords.get(el);\n if (finalX !== scrollX || finalY !== scrollY) {\n adjustScroll(el, finalX, finalY, optionsOrPlugin);\n }\n let animation;\n let styleReset = {\n position: \"absolute\",\n top: `${top}px`,\n left: `${left}px`,\n width: `${width}px`,\n height: `${height}px`,\n margin: \"0\",\n pointerEvents: \"none\",\n transformOrigin: \"center\",\n zIndex: \"100\",\n };\n if (!isPlugin(optionsOrPlugin)) {\n Object.assign(el.style, styleReset);\n animation = el.animate([\n {\n transform: \"scale(1)\",\n opacity: 1,\n },\n {\n transform: \"scale(.98)\",\n opacity: 0,\n },\n ], { duration: optionsOrPlugin.duration, easing: \"ease-out\" });\n }\n else {\n const [keyframes, options] = getPluginTuple(optionsOrPlugin(el, \"remove\", oldCoords));\n if ((options === null || options === void 0 ? void 0 : options.styleReset) !== false) {\n styleReset = (options === null || options === void 0 ? void 0 : options.styleReset) || styleReset;\n Object.assign(el.style, styleReset);\n }\n animation = new Animation(keyframes);\n animation.play();\n }\n animations.set(el, animation);\n animation.addEventListener(\"finish\", cleanUp.bind(null, el, styleReset));\n}\n/**\n * If the element being removed is at the very bottom of the page, and the\n * the page was scrolled into a space being \"made available\" by the element\n * that was removed, the page scroll will have jumped up some amount. We need\n * to offset the jump by the amount that the page was \"automatically\" scrolled\n * up. We can do this by comparing the scroll position before and after the\n * element was removed, and then offsetting by that amount.\n *\n * @param el - The element being deleted\n * @param finalX - The final X scroll position\n * @param finalY - The final Y scroll position\n * @param optionsOrPlugin - The options or plugin\n * @returns\n */\nfunction adjustScroll(el, finalX, finalY, optionsOrPlugin) {\n const scrollDeltaX = scrollX - finalX;\n const scrollDeltaY = scrollY - finalY;\n const scrollBefore = document.documentElement.style.scrollBehavior;\n const scrollBehavior = getComputedStyle(root).scrollBehavior;\n if (scrollBehavior === \"smooth\") {\n document.documentElement.style.scrollBehavior = \"auto\";\n }\n window.scrollTo(window.scrollX + scrollDeltaX, window.scrollY + scrollDeltaY);\n if (!el.parentElement)\n return;\n const parent = el.parentElement;\n let lastHeight = parent.clientHeight;\n let lastWidth = parent.clientWidth;\n const startScroll = performance.now();\n // Here we use a manual scroll animation to keep the element using the same\n // easing and timing as the parents scroll animation.\n function smoothScroll() {\n requestAnimationFrame(() => {\n if (!isPlugin(optionsOrPlugin)) {\n const deltaY = lastHeight - parent.clientHeight;\n const deltaX = lastWidth - parent.clientWidth;\n if (startScroll + optionsOrPlugin.duration > performance.now()) {\n window.scrollTo({\n left: window.scrollX - deltaX,\n top: window.scrollY - deltaY,\n });\n lastHeight = parent.clientHeight;\n lastWidth = parent.clientWidth;\n smoothScroll();\n }\n else {\n document.documentElement.style.scrollBehavior = scrollBefore;\n }\n }\n });\n }\n smoothScroll();\n}\n/**\n * Determines the position of the element being removed.\n * @param el - The element being deleted\n * @returns\n */\nfunction deletePosition(el) {\n const oldCoords = coords.get(el);\n const [width, , height] = getTransitionSizes(el, oldCoords, getCoords(el));\n let offsetParent = el.parentElement;\n while (offsetParent &&\n (getComputedStyle(offsetParent).position === \"static\" ||\n offsetParent instanceof HTMLBodyElement)) {\n offsetParent = offsetParent.parentElement;\n }\n if (!offsetParent)\n offsetParent = document.body;\n const parentStyles = getComputedStyle(offsetParent);\n const parentCoords = coords.get(offsetParent) || getCoords(offsetParent);\n const top = Math.round(oldCoords.top - parentCoords.top) -\n raw(parentStyles.borderTopWidth);\n const left = Math.round(oldCoords.left - parentCoords.left) -\n raw(parentStyles.borderLeftWidth);\n return [top, left, width, height];\n}\n/**\n * A function that automatically adds animation effects to itself and its\n * immediate children. Specifically it adds effects for adding, moving, and\n * removing DOM elements.\n * @param el - A parent element to add animations to.\n * @param options - An optional object of options.\n */\nfunction autoAnimate(el, config = {}) {\n if (mutations && resize) {\n const mediaQuery = window.matchMedia(\"(prefers-reduced-motion: reduce)\");\n const isDisabledDueToReduceMotion = mediaQuery.matches &&\n !isPlugin(config) &&\n !config.disrespectUserMotionPreference;\n if (!isDisabledDueToReduceMotion) {\n enabled.add(el);\n if (getComputedStyle(el).position === \"static\") {\n Object.assign(el.style, { position: \"relative\" });\n }\n forEach(el, updatePos, poll, (element) => resize === null || resize === void 0 ? void 0 : resize.observe(element));\n if (isPlugin(config)) {\n options.set(el, config);\n }\n else {\n options.set(el, { duration: 250, easing: \"ease-in-out\", ...config });\n }\n mutations.observe(el, { childList: true });\n parents.add(el);\n }\n }\n return Object.freeze({\n parent: el,\n enable: () => {\n enabled.add(el);\n },\n disable: () => {\n enabled.delete(el);\n },\n isEnabled: () => enabled.has(el),\n });\n}\n/**\n * The vue directive.\n */\nconst vAutoAnimate = {\n mounted: (el, binding) => {\n autoAnimate(el, binding.value || {});\n },\n // ignore ssr see #96:\n getSSRProps: () => ({}),\n};\n\nexport { autoAnimate as default, getTransitionSizes, vAutoAnimate };\n","import { useRef, useState, useEffect } from 'preact/hooks';\nimport autoAnimate from '../index.mjs';\n\n/**\n * AutoAnimate hook for adding dead-simple transitions and animations to preact.\n * @param options - Auto animate options or a plugin\n * @returns\n */\nfunction useAutoAnimate(options) {\n const element = useRef(null);\n const [controller, setController] = useState();\n const setEnabled = (enabled) => {\n if (controller) {\n enabled ? controller.enable() : controller.disable();\n }\n };\n useEffect(() => {\n if (element.current instanceof HTMLElement)\n setController(autoAnimate(element.current, options || {}));\n }, []);\n return [element, setEnabled];\n}\n\nexport { useAutoAnimate };\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","import { unstable_batchedUpdates } from 'react-dom';\n\nconst isMenuOpen = state => !!state && state[0] === 'o';\nconst batchedUpdates = unstable_batchedUpdates || (callback => callback());\nconst values = Object.values || (obj => Object.keys(obj).map(key => obj[key]));\nconst floatEqual = (a, b, diff = 0.0001) => Math.abs(a - b) < diff;\nconst getTransition = (transition, name) => transition === true || !!(transition && transition[name]);\nconst safeCall = (fn, arg) => typeof fn === 'function' ? fn(arg) : fn;\nconst internalKey = '_szhsinMenu';\nconst getName = component => component[internalKey];\nconst defineName = (name, component) => Object.defineProperty(component, internalKey, {\n value: name\n});\nconst mergeProps = (target, source) => {\n source && Object.keys(source).forEach(key => {\n const targetProp = target[key];\n const sourceProp = source[key];\n if (typeof sourceProp === 'function' && targetProp) {\n target[key] = (...arg) => {\n sourceProp(...arg);\n targetProp(...arg);\n };\n } else {\n target[key] = sourceProp;\n }\n });\n return target;\n};\nconst parsePadding = paddingStr => {\n if (typeof paddingStr !== 'string') return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n const padding = paddingStr.trim().split(/\\s+/, 4).map(parseFloat);\n const top = !isNaN(padding[0]) ? padding[0] : 0;\n const right = !isNaN(padding[1]) ? padding[1] : top;\n return {\n top,\n right,\n bottom: !isNaN(padding[2]) ? padding[2] : top,\n left: !isNaN(padding[3]) ? padding[3] : right\n };\n};\nconst getScrollAncestor = node => {\n while (node) {\n node = node.parentNode;\n if (!node || node === document.body || !node.parentNode) return;\n const {\n overflow,\n overflowX,\n overflowY\n } = getComputedStyle(node);\n if (/auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX)) return node;\n }\n};\nfunction commonProps(isDisabled, isHovering) {\n return {\n 'aria-disabled': isDisabled || undefined,\n tabIndex: isHovering ? 0 : -1\n };\n}\nfunction indexOfNode(nodeList, node) {\n for (let i = 0; i < nodeList.length; i++) {\n if (nodeList[i] === node) return i;\n }\n return -1;\n}\n\nexport { batchedUpdates, commonProps, defineName, floatEqual, getName, getScrollAncestor, getTransition, indexOfNode, isMenuOpen, mergeProps, parsePadding, safeCall, values };\n","import { oneOfType, string, func, object, bool, number, oneOf, exact } from 'prop-types';\n\nconst stylePropTypes = name => ({\n [name ? `${name}ClassName` : 'className']: oneOfType([string, func])\n});\nconst menuPropTypes = {\n className: string,\n ...stylePropTypes('menu'),\n arrowProps: object,\n focusProps: object,\n menuStyle: object,\n arrow: bool,\n setDownOverflow: bool,\n gap: number,\n shift: number,\n align: /*#__PURE__*/oneOf(['start', 'center', 'end']),\n direction: /*#__PURE__*/oneOf(['left', 'right', 'top', 'bottom']),\n position: /*#__PURE__*/oneOf(['auto', 'anchor', 'initial']),\n overflow: /*#__PURE__*/oneOf(['auto', 'visible', 'hidden'])\n};\nconst rootMenuPropTypes = {\n ...menuPropTypes,\n containerProps: object,\n initialMounted: bool,\n unmountOnClose: bool,\n transition: /*#__PURE__*/oneOfType([bool, /*#__PURE__*/exact({\n open: bool,\n close: bool,\n item: bool\n })]),\n transitionTimeout: number,\n boundingBoxRef: object,\n boundingBoxPadding: string,\n reposition: /*#__PURE__*/oneOf(['auto', 'initial']),\n repositionFlag: /*#__PURE__*/oneOfType([string, number]),\n viewScroll: /*#__PURE__*/oneOf(['auto', 'close', 'initial']),\n submenuOpenDelay: number,\n submenuCloseDelay: number,\n portal: /*#__PURE__*/oneOfType([bool, /*#__PURE__*/exact({\n target: object,\n stablePosition: bool\n })]),\n theming: string,\n onItemClick: func\n};\nconst uncontrolledMenuPropTypes = {\n instanceRef: /*#__PURE__*/oneOfType([object, func]),\n onMenuChange: func\n};\n\nexport { menuPropTypes, rootMenuPropTypes, stylePropTypes, uncontrolledMenuPropTypes };\n","import { useMemo } from 'react';\n\nconst useBEM = ({\n block,\n element,\n modifiers,\n className\n}) => useMemo(() => {\n const blockElement = element ? `${block}__${element}` : block;\n let classString = blockElement;\n modifiers && Object.keys(modifiers).forEach(name => {\n const value = modifiers[name];\n if (value) classString += ` ${blockElement}--${value === true ? name : `${name}-${value}`}`;\n });\n let expandedClassName = typeof className === 'function' ? className(modifiers) : className;\n if (typeof expandedClassName === 'string') {\n expandedClassName = expandedClassName.trim();\n if (expandedClassName) classString += ` ${expandedClassName}`;\n }\n return classString;\n}, [block, element, modifiers, className]);\n\nexport { useBEM };\n","import { createContext } from 'react';\n\nconst menuContainerClass = 'szh-menu-container';\nconst menuClass = 'szh-menu';\nconst menuButtonClass = 'szh-menu-button';\nconst menuArrowClass = 'arrow';\nconst menuItemClass = 'item';\nconst menuDividerClass = 'divider';\nconst menuHeaderClass = 'header';\nconst menuGroupClass = 'group';\nconst subMenuClass = 'submenu';\nconst radioGroupClass = 'radio-group';\nconst HoverItemContext = /*#__PURE__*/createContext();\nconst MenuListItemContext = /*#__PURE__*/createContext({});\nconst MenuListContext = /*#__PURE__*/createContext({});\nconst EventHandlersContext = /*#__PURE__*/createContext({});\nconst RadioGroupContext = /*#__PURE__*/createContext({});\nconst SettingsContext = /*#__PURE__*/createContext({});\nconst Keys = /*#__PURE__*/Object.freeze({\n ENTER: 'Enter',\n ESC: 'Escape',\n SPACE: ' ',\n HOME: 'Home',\n END: 'End',\n LEFT: 'ArrowLeft',\n RIGHT: 'ArrowRight',\n UP: 'ArrowUp',\n DOWN: 'ArrowDown'\n});\nconst HoverActionTypes = /*#__PURE__*/Object.freeze({\n RESET: 0,\n SET: 1,\n UNSET: 2,\n INCREASE: 3,\n DECREASE: 4,\n FIRST: 5,\n LAST: 6,\n SET_INDEX: 7\n});\nconst CloseReason = /*#__PURE__*/Object.freeze({\n CLICK: 'click',\n CANCEL: 'cancel',\n BLUR: 'blur',\n SCROLL: 'scroll'\n});\nconst FocusPositions = /*#__PURE__*/Object.freeze({\n FIRST: 'first',\n LAST: 'last'\n});\nconst MenuStateMap = /*#__PURE__*/Object.freeze({\n entering: 'opening',\n entered: 'open',\n exiting: 'closing',\n exited: 'closed'\n});\nconst positionAbsolute = 'absolute';\nconst roleNone = 'presentation';\nconst roleMenuitem = 'menuitem';\nconst dummyItemProps = {\n 'aria-hidden': true,\n role: roleMenuitem\n};\n\nexport { CloseReason, EventHandlersContext, FocusPositions, HoverActionTypes, HoverItemContext, Keys, MenuListContext, MenuListItemContext, MenuStateMap, RadioGroupContext, SettingsContext, dummyItemProps, menuArrowClass, menuButtonClass, menuClass, menuContainerClass, menuDividerClass, menuGroupClass, menuHeaderClass, menuItemClass, positionAbsolute, radioGroupClass, roleMenuitem, roleNone, subMenuClass };\n","import { useMemo } from 'react';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps, getTransition, safeCall } from '../utils/utils.js';\nimport { useBEM } from '../hooks/useBEM.js';\nimport { menuContainerClass, Keys, CloseReason } from '../utils/constants.js';\n\nconst MenuContainer = ({\n className,\n containerRef,\n containerProps,\n children,\n isOpen,\n theming,\n transition,\n onClose\n}) => {\n const itemTransition = getTransition(transition, 'item');\n const onKeyDown = ({\n key\n }) => {\n switch (key) {\n case Keys.ESC:\n safeCall(onClose, {\n key,\n reason: CloseReason.CANCEL\n });\n break;\n }\n };\n const onBlur = e => {\n if (isOpen && !e.currentTarget.contains(e.relatedTarget)) {\n safeCall(onClose, {\n reason: CloseReason.BLUR\n });\n }\n };\n return /*#__PURE__*/jsx(\"div\", {\n ...mergeProps({\n onKeyDown,\n onBlur\n }, containerProps),\n className: useBEM({\n block: menuContainerClass,\n modifiers: useMemo(() => ({\n theme: theming,\n itemTransition\n }), [theming, itemTransition]),\n className\n }),\n style: {\n position: 'absolute',\n ...(containerProps == null ? void 0 : containerProps.style)\n },\n ref: containerRef,\n children: children\n });\n};\n\nexport { MenuContainer };\n","const createSubmenuCtx = () => {\n let timer,\n count = 0;\n return {\n toggle: isOpen => {\n isOpen ? count++ : count--;\n count = Math.max(count, 0);\n },\n on: (closeDelay, pending, settled) => {\n if (count) {\n if (!timer) timer = setTimeout(() => {\n timer = 0;\n pending();\n }, closeDelay);\n } else {\n settled == null || settled();\n }\n },\n off: () => {\n if (timer) {\n clearTimeout(timer);\n timer = 0;\n }\n }\n };\n};\n\nexport { createSubmenuCtx };\n","import { useState, useRef, useCallback } from 'react';\nimport { HoverActionTypes } from '../utils/constants.js';\nimport { indexOfNode } from '../utils/utils.js';\n\nconst useItems = (menuRef, focusRef) => {\n const [hoverItem, setHoverItem] = useState();\n const stateRef = useRef({\n items: [],\n hoverIndex: -1,\n sorted: false\n });\n const mutableState = stateRef.current;\n const updateItems = useCallback((item, isMounted) => {\n const {\n items\n } = mutableState;\n if (!item) {\n mutableState.items = [];\n } else if (isMounted) {\n items.push(item);\n } else {\n const index = items.indexOf(item);\n if (index > -1) {\n items.splice(index, 1);\n if (item.contains(document.activeElement)) {\n focusRef.current.focus();\n setHoverItem();\n }\n }\n }\n mutableState.hoverIndex = -1;\n mutableState.sorted = false;\n }, [mutableState, focusRef]);\n const dispatch = useCallback((actionType, item, nextIndex) => {\n const {\n items,\n hoverIndex\n } = mutableState;\n const sortItems = () => {\n if (mutableState.sorted) return;\n const orderedNodes = menuRef.current.querySelectorAll('.szh-menu__item');\n items.sort((a, b) => indexOfNode(orderedNodes, a) - indexOfNode(orderedNodes, b));\n mutableState.sorted = true;\n };\n let index = -1,\n newItem = undefined;\n switch (actionType) {\n case HoverActionTypes.RESET:\n break;\n case HoverActionTypes.SET:\n newItem = item;\n break;\n case HoverActionTypes.UNSET:\n newItem = prevItem => prevItem === item ? undefined : prevItem;\n break;\n case HoverActionTypes.FIRST:\n sortItems();\n index = 0;\n newItem = items[index];\n break;\n case HoverActionTypes.LAST:\n sortItems();\n index = items.length - 1;\n newItem = items[index];\n break;\n case HoverActionTypes.SET_INDEX:\n sortItems();\n index = nextIndex;\n newItem = items[index];\n break;\n case HoverActionTypes.INCREASE:\n sortItems();\n index = hoverIndex;\n if (index < 0) index = items.indexOf(item);\n index++;\n if (index >= items.length) index = 0;\n newItem = items[index];\n break;\n case HoverActionTypes.DECREASE:\n sortItems();\n index = hoverIndex;\n if (index < 0) index = items.indexOf(item);\n index--;\n if (index < 0) index = items.length - 1;\n newItem = items[index];\n break;\n default:\n if (process.env.NODE_ENV !== 'production') throw new Error(`[React-Menu] Unknown hover action type: ${actionType}`);\n }\n if (!newItem) index = -1;\n setHoverItem(newItem);\n mutableState.hoverIndex = index;\n }, [menuRef, mutableState]);\n return {\n hoverItem,\n dispatch,\n updateItems\n };\n};\n\nexport { useItems };\n","import { parsePadding } from '../utils/utils.js';\n\nconst getPositionHelpers = (containerRef, menuRef, menuScroll, boundingBoxPadding) => {\n const menuRect = menuRef.current.getBoundingClientRect();\n const containerRect = containerRef.current.getBoundingClientRect();\n const boundingRect = menuScroll === window ? {\n left: 0,\n top: 0,\n right: document.documentElement.clientWidth,\n bottom: window.innerHeight\n } : menuScroll.getBoundingClientRect();\n const padding = parsePadding(boundingBoxPadding);\n const getLeftOverflow = x => x + containerRect.left - boundingRect.left - padding.left;\n const getRightOverflow = x => x + containerRect.left + menuRect.width - boundingRect.right + padding.right;\n const getTopOverflow = y => y + containerRect.top - boundingRect.top - padding.top;\n const getBottomOverflow = y => y + containerRect.top + menuRect.height - boundingRect.bottom + padding.bottom;\n const confineHorizontally = x => {\n let leftOverflow = getLeftOverflow(x);\n if (leftOverflow < 0) {\n x -= leftOverflow;\n } else {\n const rightOverflow = getRightOverflow(x);\n if (rightOverflow > 0) {\n x -= rightOverflow;\n leftOverflow = getLeftOverflow(x);\n if (leftOverflow < 0) x -= leftOverflow;\n }\n }\n return x;\n };\n const confineVertically = y => {\n let topOverflow = getTopOverflow(y);\n if (topOverflow < 0) {\n y -= topOverflow;\n } else {\n const bottomOverflow = getBottomOverflow(y);\n if (bottomOverflow > 0) {\n y -= bottomOverflow;\n topOverflow = getTopOverflow(y);\n if (topOverflow < 0) y -= topOverflow;\n }\n }\n return y;\n };\n return {\n menuRect,\n containerRect,\n getLeftOverflow,\n getRightOverflow,\n getTopOverflow,\n getBottomOverflow,\n confineHorizontally,\n confineVertically\n };\n};\n\nexport { getPositionHelpers };\n","const placeArrowVertical = ({\n arrowRef,\n menuY,\n anchorRect,\n containerRect,\n menuRect\n}) => {\n let y = anchorRect.top - containerRect.top - menuY + anchorRect.height / 2;\n const offset = arrowRef.current.offsetHeight * 1.25;\n y = Math.max(offset, y);\n y = Math.min(y, menuRect.height - offset);\n return y;\n};\n\nexport { placeArrowVertical };\n","import { placeArrowVertical } from './placeArrowVertical.js';\n\nconst placeLeftorRight = ({\n anchorRect,\n containerRect,\n menuRect,\n placeLeftorRightY,\n placeLeftX,\n placeRightX,\n getLeftOverflow,\n getRightOverflow,\n confineHorizontally,\n confineVertically,\n arrowRef,\n arrow,\n direction,\n position\n}) => {\n let computedDirection = direction;\n let y = placeLeftorRightY;\n if (position !== 'initial') {\n y = confineVertically(y);\n if (position === 'anchor') {\n y = Math.min(y, anchorRect.bottom - containerRect.top);\n y = Math.max(y, anchorRect.top - containerRect.top - menuRect.height);\n }\n }\n let x, leftOverflow, rightOverflow;\n if (computedDirection === 'left') {\n x = placeLeftX;\n if (position !== 'initial') {\n leftOverflow = getLeftOverflow(x);\n if (leftOverflow < 0) {\n rightOverflow = getRightOverflow(placeRightX);\n if (rightOverflow <= 0 || -leftOverflow > rightOverflow) {\n x = placeRightX;\n computedDirection = 'right';\n }\n }\n }\n } else {\n x = placeRightX;\n if (position !== 'initial') {\n rightOverflow = getRightOverflow(x);\n if (rightOverflow > 0) {\n leftOverflow = getLeftOverflow(placeLeftX);\n if (leftOverflow >= 0 || -leftOverflow < rightOverflow) {\n x = placeLeftX;\n computedDirection = 'left';\n }\n }\n }\n }\n if (position === 'auto') x = confineHorizontally(x);\n const arrowY = arrow ? placeArrowVertical({\n menuY: y,\n arrowRef,\n anchorRect,\n containerRect,\n menuRect\n }) : undefined;\n return {\n arrowY,\n x,\n y,\n computedDirection\n };\n};\n\nexport { placeLeftorRight };\n","const placeArrowHorizontal = ({\n arrowRef,\n menuX,\n anchorRect,\n containerRect,\n menuRect\n}) => {\n let x = anchorRect.left - containerRect.left - menuX + anchorRect.width / 2;\n const offset = arrowRef.current.offsetWidth * 1.25;\n x = Math.max(offset, x);\n x = Math.min(x, menuRect.width - offset);\n return x;\n};\n\nexport { placeArrowHorizontal };\n","import { placeArrowHorizontal } from './placeArrowHorizontal.js';\n\nconst placeToporBottom = ({\n anchorRect,\n containerRect,\n menuRect,\n placeToporBottomX,\n placeTopY,\n placeBottomY,\n getTopOverflow,\n getBottomOverflow,\n confineHorizontally,\n confineVertically,\n arrowRef,\n arrow,\n direction,\n position\n}) => {\n let computedDirection = direction === 'top' ? 'top' : 'bottom';\n let x = placeToporBottomX;\n if (position !== 'initial') {\n x = confineHorizontally(x);\n if (position === 'anchor') {\n x = Math.min(x, anchorRect.right - containerRect.left);\n x = Math.max(x, anchorRect.left - containerRect.left - menuRect.width);\n }\n }\n let y, topOverflow, bottomOverflow;\n if (computedDirection === 'top') {\n y = placeTopY;\n if (position !== 'initial') {\n topOverflow = getTopOverflow(y);\n if (topOverflow < 0) {\n bottomOverflow = getBottomOverflow(placeBottomY);\n if (bottomOverflow <= 0 || -topOverflow > bottomOverflow) {\n y = placeBottomY;\n computedDirection = 'bottom';\n }\n }\n }\n } else {\n y = placeBottomY;\n if (position !== 'initial') {\n bottomOverflow = getBottomOverflow(y);\n if (bottomOverflow > 0) {\n topOverflow = getTopOverflow(placeTopY);\n if (topOverflow >= 0 || -topOverflow < bottomOverflow) {\n y = placeTopY;\n computedDirection = 'top';\n }\n }\n }\n }\n if (position === 'auto') y = confineVertically(y);\n const arrowX = arrow ? placeArrowHorizontal({\n menuX: x,\n arrowRef,\n anchorRect,\n containerRect,\n menuRect\n }) : undefined;\n return {\n arrowX,\n x,\n y,\n computedDirection\n };\n};\n\nexport { placeToporBottom };\n","import { placeLeftorRight } from './placeLeftorRight.js';\nimport { placeToporBottom } from './placeToporBottom.js';\n\nconst positionMenu = ({\n arrow,\n align,\n direction,\n gap,\n shift,\n position,\n anchorRect,\n arrowRef,\n positionHelpers\n}) => {\n const {\n menuRect,\n containerRect\n } = positionHelpers;\n const isHorizontal = direction === 'left' || direction === 'right';\n let horizontalOffset = isHorizontal ? gap : shift;\n let verticalOffset = isHorizontal ? shift : gap;\n if (arrow) {\n const arrowElt = arrowRef.current;\n if (isHorizontal) {\n horizontalOffset += arrowElt.offsetWidth;\n } else {\n verticalOffset += arrowElt.offsetHeight;\n }\n }\n const placeLeftX = anchorRect.left - containerRect.left - menuRect.width - horizontalOffset;\n const placeRightX = anchorRect.right - containerRect.left + horizontalOffset;\n const placeTopY = anchorRect.top - containerRect.top - menuRect.height - verticalOffset;\n const placeBottomY = anchorRect.bottom - containerRect.top + verticalOffset;\n let placeToporBottomX, placeLeftorRightY;\n if (align === 'end') {\n placeToporBottomX = anchorRect.right - containerRect.left - menuRect.width;\n placeLeftorRightY = anchorRect.bottom - containerRect.top - menuRect.height;\n } else if (align === 'center') {\n placeToporBottomX = anchorRect.left - containerRect.left - (menuRect.width - anchorRect.width) / 2;\n placeLeftorRightY = anchorRect.top - containerRect.top - (menuRect.height - anchorRect.height) / 2;\n } else {\n placeToporBottomX = anchorRect.left - containerRect.left;\n placeLeftorRightY = anchorRect.top - containerRect.top;\n }\n placeToporBottomX += horizontalOffset;\n placeLeftorRightY += verticalOffset;\n const options = {\n ...positionHelpers,\n anchorRect,\n placeLeftX,\n placeRightX,\n placeLeftorRightY,\n placeTopY,\n placeBottomY,\n placeToporBottomX,\n arrowRef,\n arrow,\n direction,\n position\n };\n switch (direction) {\n case 'left':\n case 'right':\n return placeLeftorRight(options);\n case 'top':\n case 'bottom':\n default:\n return placeToporBottom(options);\n }\n};\n\nexport { positionMenu };\n","import { useLayoutEffect, useEffect } from 'react';\n\nconst useIsomorphicLayoutEffect = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined' ? useLayoutEffect : useEffect;\n\nexport { useIsomorphicLayoutEffect as useLayoutEffect };\n","import { useMemo } from 'react';\n\nfunction setRef(ref, instance) {\n typeof ref === 'function' ? ref(instance) : ref.current = instance;\n}\nconst useCombinedRef = (refA, refB) => useMemo(() => {\n if (!refA) return refB;\n if (!refB) return refA;\n return instance => {\n setRef(refA, instance);\n setRef(refB, instance);\n };\n}, [refA, refB]);\n\nexport { useCombinedRef };\n","import { useState, useReducer, useContext, useRef, useCallback, useEffect, useMemo } from 'react';\nimport { flushSync } from 'react-dom';\nimport { MenuContainer } from './MenuContainer.js';\nimport { jsxs, jsx } from 'react/jsx-runtime';\nimport { createSubmenuCtx } from '../utils/submenuCtx.js';\nimport { SettingsContext, MenuListContext, HoverActionTypes, menuClass, menuArrowClass, positionAbsolute, dummyItemProps, MenuListItemContext, HoverItemContext, Keys, CloseReason, FocusPositions } from '../utils/constants.js';\nimport { useItems } from '../hooks/useItems.js';\nimport { getScrollAncestor, floatEqual, commonProps, mergeProps, safeCall, isMenuOpen, getTransition, batchedUpdates } from '../utils/utils.js';\nimport { getPositionHelpers } from '../positionUtils/getPositionHelpers.js';\nimport { positionMenu } from '../positionUtils/positionMenu.js';\nimport { useLayoutEffect as useIsomorphicLayoutEffect } from '../hooks/useIsomorphicLayoutEffect.js';\nimport { useBEM } from '../hooks/useBEM.js';\nimport { useCombinedRef } from '../hooks/useCombinedRef.js';\n\nconst offScreen = -9999;\nconst MenuList = ({\n ariaLabel,\n menuClassName,\n menuStyle,\n arrow,\n arrowProps = {},\n anchorPoint,\n anchorRef,\n containerRef,\n containerProps,\n focusProps,\n externalRef,\n parentScrollingRef,\n align = 'start',\n direction = 'bottom',\n position = 'auto',\n overflow = 'visible',\n setDownOverflow,\n repositionFlag,\n captureFocus = true,\n state,\n endTransition,\n isDisabled,\n menuItemFocus,\n gap = 0,\n shift = 0,\n children,\n onClose,\n ...restProps\n}) => {\n const [menuPosition, setMenuPosition] = useState({\n x: offScreen,\n y: offScreen\n });\n const [arrowPosition, setArrowPosition] = useState({});\n const [overflowData, setOverflowData] = useState();\n const [expandedDirection, setExpandedDirection] = useState(direction);\n const [submenuCtx] = useState(createSubmenuCtx);\n const [reposSubmenu, forceReposSubmenu] = useReducer(c => c + 1, 1);\n const {\n transition,\n boundingBoxRef,\n boundingBoxPadding,\n rootMenuRef,\n rootAnchorRef,\n scrollNodesRef,\n reposition,\n viewScroll,\n submenuCloseDelay\n } = useContext(SettingsContext);\n const {\n submenuCtx: parentSubmenuCtx,\n reposSubmenu: reposFlag = repositionFlag\n } = useContext(MenuListContext);\n const menuRef = useRef(null);\n const focusRef = useRef();\n const arrowRef = useRef();\n const prevOpen = useRef(false);\n const latestMenuSize = useRef({\n width: 0,\n height: 0\n });\n const latestHandlePosition = useRef(() => {});\n const {\n hoverItem,\n dispatch,\n updateItems\n } = useItems(menuRef, focusRef);\n const isOpen = isMenuOpen(state);\n const openTransition = getTransition(transition, 'open');\n const closeTransition = getTransition(transition, 'close');\n const scrollNodes = scrollNodesRef.current;\n const onKeyDown = e => {\n switch (e.key) {\n case Keys.HOME:\n dispatch(HoverActionTypes.FIRST);\n break;\n case Keys.END:\n dispatch(HoverActionTypes.LAST);\n break;\n case Keys.UP:\n dispatch(HoverActionTypes.DECREASE, hoverItem);\n break;\n case Keys.DOWN:\n dispatch(HoverActionTypes.INCREASE, hoverItem);\n break;\n case Keys.SPACE:\n if (e.target && e.target.className.indexOf(menuClass) !== -1) {\n e.preventDefault();\n }\n return;\n default:\n return;\n }\n e.preventDefault();\n e.stopPropagation();\n };\n const onAnimationEnd = () => {\n if (state === 'closing') {\n setOverflowData();\n }\n safeCall(endTransition);\n };\n const onPointerMove = e => {\n e.stopPropagation();\n submenuCtx.on(submenuCloseDelay, () => {\n dispatch(HoverActionTypes.RESET);\n focusRef.current.focus();\n });\n };\n const onPointerLeave = e => {\n if (e.target === e.currentTarget) submenuCtx.off();\n };\n const handlePosition = useCallback(noOverflowCheck => {\n var _anchorRef$current;\n const anchorRect = anchorRef ? (_anchorRef$current = anchorRef.current) == null ? void 0 : _anchorRef$current.getBoundingClientRect() : anchorPoint ? {\n left: anchorPoint.x,\n right: anchorPoint.x,\n top: anchorPoint.y,\n bottom: anchorPoint.y,\n width: 0,\n height: 0\n } : null;\n if (!anchorRect) {\n if (process.env.NODE_ENV !== 'production') {\n console.warn('[React-Menu] Menu might not be positioned properly as one of the anchorRef or anchorPoint prop should be provided. If `anchorRef` is provided, the anchor must be mounted before menu is open.');\n }\n return;\n }\n if (!scrollNodes.menu) {\n scrollNodes.menu = (boundingBoxRef ? boundingBoxRef.current : getScrollAncestor(rootMenuRef.current)) || window;\n }\n const positionHelpers = getPositionHelpers(containerRef, menuRef, scrollNodes.menu, boundingBoxPadding);\n let {\n arrowX,\n arrowY,\n x,\n y,\n computedDirection\n } = positionMenu({\n arrow,\n align,\n direction,\n gap,\n shift,\n position,\n anchorRect,\n arrowRef,\n positionHelpers\n });\n const {\n menuRect\n } = positionHelpers;\n let menuHeight = menuRect.height;\n if (!noOverflowCheck && overflow !== 'visible') {\n const {\n getTopOverflow,\n getBottomOverflow\n } = positionHelpers;\n let height, overflowAmt;\n const prevHeight = latestMenuSize.current.height;\n const bottomOverflow = getBottomOverflow(y);\n if (bottomOverflow > 0 || floatEqual(bottomOverflow, 0) && floatEqual(menuHeight, prevHeight)) {\n height = menuHeight - bottomOverflow;\n overflowAmt = bottomOverflow;\n } else {\n const topOverflow = getTopOverflow(y);\n if (topOverflow < 0 || floatEqual(topOverflow, 0) && floatEqual(menuHeight, prevHeight)) {\n height = menuHeight + topOverflow;\n overflowAmt = 0 - topOverflow;\n if (height >= 0) y -= topOverflow;\n }\n }\n if (height >= 0) {\n menuHeight = height;\n setOverflowData({\n height,\n overflowAmt\n });\n } else {\n setOverflowData();\n }\n }\n if (arrow) setArrowPosition({\n x: arrowX,\n y: arrowY\n });\n setMenuPosition({\n x,\n y\n });\n setExpandedDirection(computedDirection);\n latestMenuSize.current = {\n width: menuRect.width,\n height: menuHeight\n };\n }, [arrow, align, boundingBoxPadding, direction, gap, shift, position, overflow, anchorPoint, anchorRef, containerRef, boundingBoxRef, rootMenuRef, scrollNodes]);\n useIsomorphicLayoutEffect(() => {\n if (isOpen) {\n handlePosition();\n if (prevOpen.current) forceReposSubmenu();\n }\n prevOpen.current = isOpen;\n latestHandlePosition.current = handlePosition;\n }, [isOpen, handlePosition, reposFlag]);\n useIsomorphicLayoutEffect(() => {\n if (overflowData && !setDownOverflow) menuRef.current.scrollTop = 0;\n }, [overflowData, setDownOverflow]);\n useIsomorphicLayoutEffect(() => updateItems, [updateItems]);\n useEffect(() => {\n let {\n menu: menuScroll\n } = scrollNodes;\n if (!isOpen || !menuScroll) return;\n menuScroll = menuScroll.addEventListener ? menuScroll : window;\n if (!scrollNodes.anchors) {\n scrollNodes.anchors = [];\n let anchorScroll = getScrollAncestor(rootAnchorRef && rootAnchorRef.current);\n while (anchorScroll && anchorScroll !== menuScroll) {\n scrollNodes.anchors.push(anchorScroll);\n anchorScroll = getScrollAncestor(anchorScroll);\n }\n }\n let scroll = viewScroll;\n if (scrollNodes.anchors.length && scroll === 'initial') scroll = 'auto';\n if (scroll === 'initial') return;\n const handleScroll = () => {\n if (scroll === 'auto') {\n batchedUpdates(() => handlePosition(true));\n } else {\n safeCall(onClose, {\n reason: CloseReason.SCROLL\n });\n }\n };\n const scrollObservers = scrollNodes.anchors.concat(viewScroll !== 'initial' ? menuScroll : []);\n scrollObservers.forEach(o => o.addEventListener('scroll', handleScroll));\n return () => scrollObservers.forEach(o => o.removeEventListener('scroll', handleScroll));\n }, [rootAnchorRef, scrollNodes, isOpen, onClose, viewScroll, handlePosition]);\n const hasOverflow = !!overflowData && overflowData.overflowAmt > 0;\n useEffect(() => {\n if (hasOverflow || !isOpen || !parentScrollingRef) return;\n const handleScroll = () => batchedUpdates(handlePosition);\n const parentScroll = parentScrollingRef.current;\n parentScroll.addEventListener('scroll', handleScroll);\n return () => parentScroll.removeEventListener('scroll', handleScroll);\n }, [isOpen, hasOverflow, parentScrollingRef, handlePosition]);\n useEffect(() => {\n if (typeof ResizeObserver !== 'function' || reposition === 'initial') return;\n const resizeObserver = new ResizeObserver(([entry]) => {\n const {\n borderBoxSize,\n target\n } = entry;\n let width, height;\n if (borderBoxSize) {\n const {\n inlineSize,\n blockSize\n } = borderBoxSize[0] || borderBoxSize;\n width = inlineSize;\n height = blockSize;\n } else {\n const borderRect = target.getBoundingClientRect();\n width = borderRect.width;\n height = borderRect.height;\n }\n if (width === 0 || height === 0) return;\n if (floatEqual(width, latestMenuSize.current.width, 1) && floatEqual(height, latestMenuSize.current.height, 1)) return;\n flushSync(() => {\n latestHandlePosition.current();\n forceReposSubmenu();\n });\n });\n const observeTarget = menuRef.current;\n resizeObserver.observe(observeTarget, {\n box: 'border-box'\n });\n return () => resizeObserver.unobserve(observeTarget);\n }, [reposition]);\n useEffect(() => {\n if (!isOpen) {\n dispatch(HoverActionTypes.RESET);\n if (!closeTransition) setOverflowData();\n return;\n }\n const {\n position,\n alwaysUpdate\n } = menuItemFocus || {};\n const setItemFocus = () => {\n if (position === FocusPositions.FIRST) {\n dispatch(HoverActionTypes.FIRST);\n } else if (position === FocusPositions.LAST) {\n dispatch(HoverActionTypes.LAST);\n } else if (position >= -1) {\n dispatch(HoverActionTypes.SET_INDEX, undefined, position);\n }\n };\n if (alwaysUpdate) {\n setItemFocus();\n } else if (captureFocus) {\n const id = setTimeout(() => {\n const menuElt = menuRef.current;\n if (menuElt && !menuElt.contains(document.activeElement)) {\n focusRef.current.focus();\n setItemFocus();\n }\n }, openTransition ? 170 : 100);\n return () => clearTimeout(id);\n }\n }, [isOpen, openTransition, closeTransition, captureFocus, menuItemFocus, dispatch]);\n const itemContext = useMemo(() => ({\n isParentOpen: isOpen,\n submenuCtx,\n dispatch,\n updateItems\n }), [isOpen, submenuCtx, dispatch, updateItems]);\n let maxHeight, overflowAmt;\n if (overflowData) {\n setDownOverflow ? overflowAmt = overflowData.overflowAmt : maxHeight = overflowData.height;\n }\n const listContext = useMemo(() => ({\n reposSubmenu,\n submenuCtx,\n overflow,\n overflowAmt,\n parentMenuRef: menuRef,\n parentDir: expandedDirection\n }), [reposSubmenu, submenuCtx, overflow, overflowAmt, expandedDirection]);\n const overflowStyle = maxHeight >= 0 ? {\n maxHeight,\n overflow\n } : undefined;\n const modifiers = useMemo(() => ({\n state,\n dir: expandedDirection\n }), [state, expandedDirection]);\n const arrowModifiers = useMemo(() => ({\n dir: expandedDirection\n }), [expandedDirection]);\n const _arrowClassName = useBEM({\n block: menuClass,\n element: menuArrowClass,\n modifiers: arrowModifiers,\n className: arrowProps.className\n });\n const menu = /*#__PURE__*/jsxs(\"ul\", {\n role: \"menu\",\n \"aria-label\": ariaLabel,\n ...commonProps(isDisabled),\n ...mergeProps({\n onPointerEnter: parentSubmenuCtx == null ? void 0 : parentSubmenuCtx.off,\n onPointerMove,\n onPointerLeave,\n onKeyDown,\n onAnimationEnd\n }, restProps),\n ref: useCombinedRef(externalRef, menuRef),\n className: useBEM({\n block: menuClass,\n modifiers,\n className: menuClassName\n }),\n style: {\n ...menuStyle,\n ...overflowStyle,\n margin: 0,\n display: state === 'closed' ? 'none' : undefined,\n position: positionAbsolute,\n left: menuPosition.x,\n top: menuPosition.y\n },\n children: [/*#__PURE__*/jsx(\"li\", {\n tabIndex: -1,\n style: {\n position: positionAbsolute,\n left: 0,\n top: 0,\n display: 'block',\n outline: 'none'\n },\n ref: focusRef,\n ...dummyItemProps,\n ...focusProps\n }), arrow && /*#__PURE__*/jsx(\"li\", {\n ...dummyItemProps,\n ...arrowProps,\n className: _arrowClassName,\n style: {\n display: 'block',\n position: positionAbsolute,\n left: arrowPosition.x,\n top: arrowPosition.y,\n ...arrowProps.style\n },\n ref: arrowRef\n }), /*#__PURE__*/jsx(MenuListContext.Provider, {\n value: listContext,\n children: /*#__PURE__*/jsx(MenuListItemContext.Provider, {\n value: itemContext,\n children: /*#__PURE__*/jsx(HoverItemContext.Provider, {\n value: hoverItem,\n children: safeCall(children, modifiers)\n })\n })\n })]\n });\n return containerProps ? /*#__PURE__*/jsx(MenuContainer, {\n ...containerProps,\n isOpen: isOpen,\n children: menu\n }) : menu;\n};\n\nexport { MenuList };\n","import { forwardRef, useRef, useMemo } from 'react';\nimport { createPortal } from 'react-dom';\nimport { oneOf, exact, number, object, bool, oneOfType, string, func } from 'prop-types';\nimport { MenuList } from './MenuList.js';\nimport { jsx } from 'react/jsx-runtime';\nimport { rootMenuPropTypes } from '../utils/propTypes.js';\nimport { safeCall, values } from '../utils/utils.js';\nimport { MenuStateMap, Keys, CloseReason, SettingsContext, EventHandlersContext } from '../utils/constants.js';\n\nconst ControlledMenu = /*#__PURE__*/forwardRef(function ControlledMenu({\n 'aria-label': ariaLabel,\n className,\n containerProps,\n initialMounted,\n unmountOnClose,\n transition,\n transitionTimeout,\n boundingBoxRef,\n boundingBoxPadding,\n reposition = 'auto',\n submenuOpenDelay = 300,\n submenuCloseDelay = 150,\n viewScroll = 'initial',\n portal,\n theming,\n onItemClick,\n ...restProps\n}, externalRef) {\n const containerRef = useRef(null);\n const scrollNodesRef = useRef({});\n const {\n anchorRef,\n state,\n onClose\n } = restProps;\n const settings = useMemo(() => ({\n initialMounted,\n unmountOnClose,\n transition,\n transitionTimeout,\n boundingBoxRef,\n boundingBoxPadding,\n rootMenuRef: containerRef,\n rootAnchorRef: anchorRef,\n scrollNodesRef,\n reposition,\n viewScroll,\n submenuOpenDelay,\n submenuCloseDelay\n }), [initialMounted, unmountOnClose, transition, transitionTimeout, anchorRef, boundingBoxRef, boundingBoxPadding, reposition, viewScroll, submenuOpenDelay, submenuCloseDelay]);\n const eventHandlers = useMemo(() => ({\n handleClick(event, isCheckorRadio) {\n if (!event.stopPropagation) safeCall(onItemClick, event);\n let keepOpen = event.keepOpen;\n if (keepOpen === undefined) {\n keepOpen = isCheckorRadio && event.key === Keys.SPACE;\n }\n if (!keepOpen) {\n safeCall(onClose, {\n value: event.value,\n key: event.key,\n reason: CloseReason.CLICK\n });\n }\n },\n handleClose(key) {\n safeCall(onClose, {\n key,\n reason: CloseReason.CLICK\n });\n }\n }), [onItemClick, onClose]);\n if (!state) return null;\n const menuList = /*#__PURE__*/jsx(SettingsContext.Provider, {\n value: settings,\n children: /*#__PURE__*/jsx(EventHandlersContext.Provider, {\n value: eventHandlers,\n children: /*#__PURE__*/jsx(MenuList, {\n ...restProps,\n ariaLabel: ariaLabel || 'Menu',\n externalRef: externalRef,\n containerRef: containerRef,\n containerProps: {\n className,\n containerRef,\n containerProps,\n theming,\n transition,\n onClose\n }\n })\n })\n });\n if (portal === true && typeof document !== 'undefined') {\n return /*#__PURE__*/createPortal(menuList, document.body);\n } else if (portal) {\n return portal.target ? /*#__PURE__*/createPortal(menuList, portal.target) : portal.stablePosition ? null : menuList;\n }\n return menuList;\n});\nprocess.env.NODE_ENV !== \"production\" ? ControlledMenu.propTypes = {\n ...rootMenuPropTypes,\n state: /*#__PURE__*/oneOf( /*#__PURE__*/values(MenuStateMap)),\n anchorPoint: /*#__PURE__*/exact({\n x: number,\n y: number\n }),\n anchorRef: object,\n captureFocus: bool,\n menuItemFocus: /*#__PURE__*/exact({\n position: /*#__PURE__*/oneOfType([string, number]),\n alwaysUpdate: bool\n }),\n onClose: func\n} : void 0;\n\nexport { ControlledMenu };\n","const PRE_ENTER = 0;\nconst ENTERING = 1;\nconst ENTERED = 2;\nconst PRE_EXIT = 3;\nconst EXITING = 4;\nconst EXITED = 5;\nconst UNMOUNTED = 6;\nconst STATUS = ['preEnter', 'entering', 'entered', 'preExit', 'exiting', 'exited', 'unmounted'];\nconst getState = status => ({\n _s: status,\n status: STATUS[status],\n isEnter: status < PRE_EXIT,\n isMounted: status !== UNMOUNTED,\n isResolved: status === ENTERED || status > EXITING\n});\nconst startOrEnd = unmounted => unmounted ? UNMOUNTED : EXITED;\nconst getEndStatus = (status, unmountOnExit) => {\n switch (status) {\n case ENTERING:\n case PRE_ENTER:\n return ENTERED;\n case EXITING:\n case PRE_EXIT:\n return startOrEnd(unmountOnExit);\n }\n};\nconst getTimeout = timeout => typeof timeout === 'object' ? [timeout.enter, timeout.exit] : [timeout, timeout];\n\nexport { ENTERED, ENTERING, EXITED, EXITING, PRE_ENTER, PRE_EXIT, STATUS, UNMOUNTED, getEndStatus, getState, getTimeout, startOrEnd };\n","import { useState, useRef, useCallback, useEffect } from 'react';\nimport { getState, ENTERED, startOrEnd, getTimeout, getEndStatus, PRE_ENTER, ENTERING, PRE_EXIT, EXITING } from './utils.js';\n\nconst updateState = (status, setState, latestState, timeoutId, onChange) => {\n clearTimeout(timeoutId.current);\n const state = getState(status);\n setState(state);\n latestState.current = state;\n onChange && onChange({\n current: state\n });\n};\nconst useTransition = ({\n enter = true,\n exit = true,\n preEnter,\n preExit,\n timeout,\n initialEntered,\n mountOnEnter,\n unmountOnExit,\n onStateChange: onChange\n} = {}) => {\n const [state, setState] = useState(() => getState(initialEntered ? ENTERED : startOrEnd(mountOnEnter)));\n const latestState = useRef(state);\n const timeoutId = useRef();\n const [enterTimeout, exitTimeout] = getTimeout(timeout);\n const endTransition = useCallback(() => {\n const status = getEndStatus(latestState.current._s, unmountOnExit);\n status && updateState(status, setState, latestState, timeoutId, onChange);\n }, [onChange, unmountOnExit]);\n const toggle = useCallback(toEnter => {\n const transitState = status => {\n updateState(status, setState, latestState, timeoutId, onChange);\n switch (status) {\n case ENTERING:\n if (enterTimeout >= 0) timeoutId.current = setTimeout(endTransition, enterTimeout);\n break;\n case EXITING:\n if (exitTimeout >= 0) timeoutId.current = setTimeout(endTransition, exitTimeout);\n break;\n case PRE_ENTER:\n case PRE_EXIT:\n timeoutId.current = setTimeout(() => transitState(status + 1), 0);\n break;\n }\n };\n const enterStage = latestState.current.isEnter;\n if (typeof toEnter !== 'boolean') toEnter = !enterStage;\n if (toEnter) {\n !enterStage && transitState(enter ? preEnter ? PRE_ENTER : ENTERING : ENTERED);\n } else {\n enterStage && transitState(exit ? preExit ? PRE_EXIT : EXITING : startOrEnd(unmountOnExit));\n }\n }, [endTransition, onChange, enter, exit, preEnter, preExit, enterTimeout, exitTimeout, unmountOnExit]);\n useEffect(() => () => clearTimeout(timeoutId.current), []);\n return [state, toggle, endTransition];\n};\n\nexport { useTransition };\n","import { useTransition } from 'react-transition-state';\nimport { getTransition } from '../utils/utils.js';\nimport { MenuStateMap } from '../utils/constants.js';\n\nconst useMenuState = ({\n initialOpen,\n initialMounted,\n unmountOnClose,\n transition,\n transitionTimeout = 500\n} = {}) => {\n const [{\n status\n }, toggleMenu, endTransition] = useTransition({\n initialEntered: initialOpen,\n mountOnEnter: !initialMounted,\n unmountOnExit: unmountOnClose,\n timeout: transitionTimeout,\n enter: getTransition(transition, 'open'),\n exit: getTransition(transition, 'close')\n });\n return [{\n state: MenuStateMap[status],\n endTransition\n }, toggleMenu];\n};\n\nexport { useMenuState };\n","import { useState } from 'react';\nimport { useMenuState } from './useMenuState.js';\n\nconst useMenuStateAndFocus = options => {\n const [menuProps, toggleMenu] = useMenuState(options);\n const [menuItemFocus, setMenuItemFocus] = useState();\n const openMenu = (position, alwaysUpdate) => {\n setMenuItemFocus({\n position,\n alwaysUpdate\n });\n toggleMenu(true);\n };\n return [{\n menuItemFocus,\n ...menuProps\n }, toggleMenu, openMenu];\n};\n\nexport { useMenuStateAndFocus };\n","import { useState } from 'react';\n\nconst useClick = (state, onToggle) => {\n if (process.env.NODE_ENV !== 'production' && typeof onToggle !== 'function') {\n throw new Error('[React-Menu] useClick/useHover requires a function in the second parameter.');\n }\n const [skipOpen] = useState({});\n return {\n onMouseDown: () => {\n skipOpen.v = state && state !== 'closed';\n },\n onClick: e => skipOpen.v ? skipOpen.v = false : onToggle(true, e)\n };\n};\n\nexport { useClick };\n","import { useRef, useEffect } from 'react';\nimport { safeCall } from '../utils/utils.js';\n\nconst useMenuChange = (onMenuChange, isOpen) => {\n const prevOpen = useRef(isOpen);\n useEffect(() => {\n if (prevOpen.current !== isOpen) safeCall(onMenuChange, {\n open: isOpen\n });\n prevOpen.current = isOpen;\n }, [onMenuChange, isOpen]);\n};\n\nexport { useMenuChange };\n","import { forwardRef, useRef, useCallback, useImperativeHandle, Fragment, cloneElement } from 'react';\nimport { oneOfType, element, func } from 'prop-types';\nimport { ControlledMenu } from './ControlledMenu.js';\nimport { jsxs, jsx } from 'react/jsx-runtime';\nimport { useMenuStateAndFocus } from '../hooks/useMenuStateAndFocus.js';\nimport { useClick } from '../hooks/useClick.js';\nimport { useCombinedRef } from '../hooks/useCombinedRef.js';\nimport { safeCall, mergeProps, getName, isMenuOpen } from '../utils/utils.js';\nimport { useMenuChange } from '../hooks/useMenuChange.js';\nimport { rootMenuPropTypes, uncontrolledMenuPropTypes } from '../utils/propTypes.js';\nimport { FocusPositions, Keys } from '../utils/constants.js';\n\nconst Menu = /*#__PURE__*/forwardRef(function Menu({\n 'aria-label': ariaLabel,\n captureFocus: _,\n initialOpen: _1,\n menuButton,\n instanceRef,\n onMenuChange,\n ...restProps\n}, externalRef) {\n const [stateProps, toggleMenu, openMenu] = useMenuStateAndFocus(restProps);\n const {\n state\n } = stateProps;\n const isOpen = isMenuOpen(state);\n const buttonRef = useRef(null);\n const anchorProps = useClick(state, (_, e) => openMenu(!e.detail ? FocusPositions.FIRST : undefined));\n const handleClose = useCallback(e => {\n toggleMenu(false);\n if (e.key) buttonRef.current.focus();\n }, [toggleMenu]);\n const onKeyDown = e => {\n switch (e.key) {\n case Keys.UP:\n openMenu(FocusPositions.LAST);\n break;\n case Keys.DOWN:\n openMenu(FocusPositions.FIRST);\n break;\n default:\n return;\n }\n e.preventDefault();\n };\n const button = safeCall(menuButton, {\n open: isOpen\n });\n if (!button || !button.type) throw new Error('Menu requires a menuButton prop.');\n const buttonProps = {\n ref: useCombinedRef(button.ref, buttonRef),\n ...mergeProps({\n onKeyDown,\n ...anchorProps\n }, button.props)\n };\n if (getName(button.type) === 'MenuButton') {\n buttonProps.isOpen = isOpen;\n }\n const renderButton = /*#__PURE__*/cloneElement(button, buttonProps);\n useMenuChange(onMenuChange, isOpen);\n useImperativeHandle(instanceRef, () => ({\n openMenu,\n closeMenu: () => toggleMenu(false)\n }));\n return /*#__PURE__*/jsxs(Fragment, {\n children: [renderButton, /*#__PURE__*/jsx(ControlledMenu, {\n ...restProps,\n ...stateProps,\n \"aria-label\": ariaLabel || (typeof button.props.children === 'string' ? button.props.children : 'Menu'),\n anchorRef: buttonRef,\n ref: externalRef,\n onClose: handleClose\n })]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Menu.propTypes = {\n ...rootMenuPropTypes,\n ...uncontrolledMenuPropTypes,\n menuButton: oneOfType([element, func]).isRequired\n} : void 0;\n\nexport { Menu };\n","import { forwardRef, useRef, useContext, memo } from 'react';\nimport { HoverItemContext } from './constants.js';\nimport { jsx } from 'react/jsx-runtime';\n\nconst withHovering = (name, WrappedComponent) => {\n const Component = /*#__PURE__*/memo(WrappedComponent);\n const WithHovering = /*#__PURE__*/forwardRef((props, ref) => {\n const itemRef = useRef(null);\n return /*#__PURE__*/jsx(Component, {\n ...props,\n itemRef: itemRef,\n externalRef: ref,\n isHovering: useContext(HoverItemContext) === itemRef.current\n });\n });\n WithHovering.displayName = `WithHovering(${name})`;\n return WithHovering;\n};\n\nexport { withHovering };\n","import { useLayoutEffect as useIsomorphicLayoutEffect } from './useIsomorphicLayoutEffect.js';\n\nconst useItemEffect = (isDisabled, itemRef, updateItems) => {\n useIsomorphicLayoutEffect(() => {\n if (process.env.NODE_ENV !== 'production' && !updateItems) {\n throw new Error(`[React-Menu] This menu item or submenu should be rendered under a menu: ${itemRef.current.outerHTML}`);\n }\n if (isDisabled) return;\n const item = itemRef.current;\n updateItems(item, true);\n return () => {\n updateItems(item);\n };\n }, [isDisabled, itemRef, updateItems]);\n};\n\nexport { useItemEffect };\n","import { useContext, useRef, useState, useEffect, useImperativeHandle, useMemo } from 'react';\nimport { createPortal } from 'react-dom';\nimport { bool, oneOf, oneOfType, node, func, shape } from 'prop-types';\nimport { MenuList } from './MenuList.js';\nimport { jsxs, jsx } from 'react/jsx-runtime';\nimport { withHovering } from '../utils/withHovering.js';\nimport { menuPropTypes, uncontrolledMenuPropTypes, stylePropTypes } from '../utils/propTypes.js';\nimport { useMenuStateAndFocus } from '../hooks/useMenuStateAndFocus.js';\nimport { useItemEffect } from '../hooks/useItemEffect.js';\nimport { useMenuChange } from '../hooks/useMenuChange.js';\nimport { useBEM } from '../hooks/useBEM.js';\nimport { SettingsContext, MenuListContext, MenuListItemContext, menuClass, subMenuClass, roleNone, roleMenuitem, menuItemClass, HoverActionTypes, Keys, FocusPositions } from '../utils/constants.js';\nimport { useCombinedRef } from '../hooks/useCombinedRef.js';\nimport { mergeProps, commonProps, safeCall, isMenuOpen, batchedUpdates } from '../utils/utils.js';\n\nconst SubMenu = /*#__PURE__*/withHovering('SubMenu', function SubMenu({\n 'aria-label': ariaLabel,\n className,\n disabled,\n direction,\n label,\n openTrigger,\n onMenuChange,\n isHovering,\n instanceRef,\n itemRef,\n captureFocus: _1,\n repositionFlag: _2,\n itemProps = {},\n ...restProps\n}) {\n const settings = useContext(SettingsContext);\n const {\n rootMenuRef,\n submenuOpenDelay,\n submenuCloseDelay\n } = settings;\n const {\n parentMenuRef,\n parentDir,\n overflow: parentOverflow\n } = useContext(MenuListContext);\n const {\n isParentOpen,\n submenuCtx,\n dispatch,\n updateItems\n } = useContext(MenuListItemContext);\n const isPortal = parentOverflow !== 'visible';\n const [stateProps, toggleMenu, _openMenu] = useMenuStateAndFocus(settings);\n const {\n state\n } = stateProps;\n const isDisabled = !!disabled;\n const isOpen = isMenuOpen(state);\n const containerRef = useRef(null);\n const [timerId] = useState({\n v: 0\n });\n const stopTimer = () => {\n submenuCtx.off();\n if (timerId.v) {\n clearTimeout(timerId.v);\n timerId.v = 0;\n }\n };\n const openMenu = (...args) => {\n stopTimer();\n setHover();\n !isDisabled && _openMenu(...args);\n };\n const setHover = () => !isHovering && !isDisabled && dispatch(HoverActionTypes.SET, itemRef.current);\n const delayOpen = delay => {\n setHover();\n if (!openTrigger) timerId.v = setTimeout(() => batchedUpdates(openMenu), Math.max(delay, 0));\n };\n const onPointerMove = e => {\n if (isDisabled) return;\n e.stopPropagation();\n if (timerId.v || isOpen) return;\n submenuCtx.on(submenuCloseDelay, () => delayOpen(submenuOpenDelay - submenuCloseDelay), () => delayOpen(submenuOpenDelay));\n };\n const onPointerLeave = () => {\n stopTimer();\n if (!isOpen) dispatch(HoverActionTypes.UNSET, itemRef.current);\n };\n const onKeyDown = e => {\n if (!isHovering) return;\n switch (e.key) {\n case Keys.ENTER:\n e.preventDefault();\n case Keys.SPACE:\n case Keys.RIGHT:\n openTrigger !== 'none' && openMenu(FocusPositions.FIRST);\n }\n };\n const onKeyDownOfRoot = e => {\n let handled = false;\n switch (e.key) {\n case Keys.LEFT:\n if (isOpen) {\n itemRef.current.focus();\n toggleMenu(false);\n handled = true;\n }\n break;\n case Keys.RIGHT:\n if (!isOpen) handled = true;\n break;\n }\n if (handled) {\n e.preventDefault();\n e.stopPropagation();\n }\n };\n useItemEffect(isDisabled, itemRef, updateItems);\n useMenuChange(onMenuChange, isOpen);\n useEffect(() => submenuCtx.toggle(isOpen), [submenuCtx, isOpen]);\n useEffect(() => () => clearTimeout(timerId.v), [timerId]);\n useEffect(() => {\n if (isHovering && isParentOpen) {\n itemRef.current.focus();\n } else {\n toggleMenu(false);\n }\n }, [isHovering, isParentOpen, toggleMenu, itemRef]);\n useImperativeHandle(instanceRef, () => ({\n openMenu: (...args) => {\n isParentOpen && openMenu(...args);\n },\n closeMenu: () => {\n if (isOpen) {\n itemRef.current.focus();\n toggleMenu(false);\n }\n }\n }));\n const modifiers = useMemo(() => ({\n open: isOpen,\n hover: isHovering,\n disabled: isDisabled,\n submenu: true\n }), [isOpen, isHovering, isDisabled]);\n const {\n ref: externalItemRef,\n className: itemClassName,\n ...restItemProps\n } = itemProps;\n const mergedItemProps = mergeProps({\n onPointerEnter: submenuCtx.off,\n onPointerMove,\n onPointerLeave,\n onKeyDown,\n onClick: () => openTrigger !== 'none' && openMenu()\n }, restItemProps);\n const getMenuList = () => {\n const menuList = /*#__PURE__*/jsx(MenuList, {\n ...restProps,\n ...stateProps,\n ariaLabel: ariaLabel || (typeof label === 'string' ? label : 'Submenu'),\n anchorRef: itemRef,\n containerRef: isPortal ? rootMenuRef : containerRef,\n direction: direction || (parentDir === 'right' || parentDir === 'left' ? parentDir : 'right'),\n parentScrollingRef: isPortal && parentMenuRef,\n isDisabled: isDisabled\n });\n const container = rootMenuRef.current;\n return isPortal && container ? /*#__PURE__*/createPortal(menuList, container) : menuList;\n };\n return /*#__PURE__*/jsxs(\"li\", {\n className: useBEM({\n block: menuClass,\n element: subMenuClass,\n className\n }),\n style: {\n position: 'relative'\n },\n role: roleNone,\n ref: containerRef,\n onKeyDown: onKeyDownOfRoot,\n children: [/*#__PURE__*/jsx(\"div\", {\n role: roleMenuitem,\n \"aria-haspopup\": true,\n \"aria-expanded\": isOpen,\n ...commonProps(isDisabled, isHovering),\n ...mergedItemProps,\n ref: useCombinedRef(externalItemRef, itemRef),\n className: useBEM({\n block: menuClass,\n element: menuItemClass,\n modifiers,\n className: itemClassName\n }),\n children: useMemo(() => safeCall(label, modifiers), [label, modifiers])\n }), state && getMenuList()]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? SubMenu.propTypes = {\n ...menuPropTypes,\n ...uncontrolledMenuPropTypes,\n disabled: bool,\n openTrigger: /*#__PURE__*/oneOf(['none', 'clickOnly']),\n label: /*#__PURE__*/oneOfType([node, func]),\n itemProps: /*#__PURE__*/shape({\n ...stylePropTypes()\n })\n} : void 0;\n\nexport { SubMenu };\n","import { useContext, useEffect } from 'react';\nimport { useItemEffect } from './useItemEffect.js';\nimport { SettingsContext, MenuListItemContext, HoverActionTypes } from '../utils/constants.js';\n\nconst useItemState = (itemRef, focusRef, isHovering, isDisabled) => {\n const {\n submenuCloseDelay\n } = useContext(SettingsContext);\n const {\n isParentOpen,\n submenuCtx,\n dispatch,\n updateItems\n } = useContext(MenuListItemContext);\n const setHover = () => {\n !isHovering && !isDisabled && dispatch(HoverActionTypes.SET, itemRef.current);\n };\n const unsetHover = () => {\n !isDisabled && dispatch(HoverActionTypes.UNSET, itemRef.current);\n };\n const onBlur = e => {\n if (isHovering && !e.currentTarget.contains(e.relatedTarget)) unsetHover();\n };\n const onPointerMove = e => {\n if (!isDisabled) {\n e.stopPropagation();\n submenuCtx.on(submenuCloseDelay, setHover, setHover);\n }\n };\n const onPointerLeave = (_, keepHover) => {\n submenuCtx.off();\n !keepHover && unsetHover();\n };\n useItemEffect(isDisabled, itemRef, updateItems);\n useEffect(() => {\n if (isHovering && isParentOpen) {\n focusRef.current && focusRef.current.focus();\n }\n }, [focusRef, isHovering, isParentOpen]);\n return {\n setHover,\n onBlur,\n onPointerMove,\n onPointerLeave\n };\n};\n\nexport { useItemState };\n","import { useContext, useMemo } from 'react';\nimport { any, string, oneOf, bool, oneOfType, node, func } from 'prop-types';\nimport { jsx } from 'react/jsx-runtime';\nimport { useItemState } from '../hooks/useItemState.js';\nimport { EventHandlersContext, RadioGroupContext, roleMenuitem, menuClass, menuItemClass, roleNone, Keys } from '../utils/constants.js';\nimport { useCombinedRef } from '../hooks/useCombinedRef.js';\nimport { useBEM } from '../hooks/useBEM.js';\nimport { withHovering } from '../utils/withHovering.js';\nimport { stylePropTypes } from '../utils/propTypes.js';\nimport { mergeProps, commonProps, safeCall } from '../utils/utils.js';\n\nconst MenuItem = /*#__PURE__*/withHovering('MenuItem', function MenuItem({\n className,\n value,\n href,\n type,\n checked,\n disabled,\n children,\n onClick,\n isHovering,\n itemRef,\n externalRef,\n ...restProps\n}) {\n const isDisabled = !!disabled;\n const {\n setHover,\n ...restStateProps\n } = useItemState(itemRef, itemRef, isHovering, isDisabled);\n const eventHandlers = useContext(EventHandlersContext);\n const radioGroup = useContext(RadioGroupContext);\n const isRadio = type === 'radio';\n const isCheckBox = type === 'checkbox';\n const isAnchor = !!href && !isDisabled && !isRadio && !isCheckBox;\n const isChecked = isRadio ? radioGroup.value === value : isCheckBox ? !!checked : false;\n const handleClick = e => {\n if (isDisabled) {\n e.stopPropagation();\n e.preventDefault();\n return;\n }\n const event = {\n value,\n syntheticEvent: e\n };\n if (e.key !== undefined) event.key = e.key;\n if (isCheckBox) event.checked = !isChecked;\n if (isRadio) event.name = radioGroup.name;\n safeCall(onClick, event);\n if (isRadio) safeCall(radioGroup.onRadioChange, event);\n eventHandlers.handleClick(event, isCheckBox || isRadio);\n };\n const handleKeyDown = e => {\n if (!isHovering) return;\n switch (e.key) {\n case Keys.ENTER:\n e.preventDefault();\n case Keys.SPACE:\n isAnchor ? itemRef.current.click() : handleClick(e);\n }\n };\n const modifiers = useMemo(() => ({\n type,\n disabled: isDisabled,\n hover: isHovering,\n checked: isChecked,\n anchor: isAnchor\n }), [type, isDisabled, isHovering, isChecked, isAnchor]);\n const mergedProps = mergeProps({\n ...restStateProps,\n onPointerDown: setHover,\n onKeyDown: handleKeyDown,\n onClick: handleClick\n }, restProps);\n const menuItemProps = {\n role: isRadio ? 'menuitemradio' : isCheckBox ? 'menuitemcheckbox' : roleMenuitem,\n 'aria-checked': isRadio || isCheckBox ? isChecked : undefined,\n ...commonProps(isDisabled, isHovering),\n ...mergedProps,\n ref: useCombinedRef(externalRef, itemRef),\n className: useBEM({\n block: menuClass,\n element: menuItemClass,\n modifiers,\n className\n }),\n children: useMemo(() => safeCall(children, modifiers), [children, modifiers])\n };\n return isAnchor ? /*#__PURE__*/jsx(\"li\", {\n role: roleNone,\n children: /*#__PURE__*/jsx(\"a\", {\n href: href,\n ...menuItemProps\n })\n }) : /*#__PURE__*/jsx(\"li\", {\n ...menuItemProps\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? MenuItem.propTypes = {\n ...stylePropTypes(),\n value: any,\n href: string,\n type: /*#__PURE__*/oneOf(['checkbox', 'radio']),\n checked: bool,\n disabled: bool,\n children: /*#__PURE__*/oneOfType([node, func]),\n onClick: func\n} : void 0;\n\nexport { MenuItem };\n","import { useRef, useContext, useMemo } from 'react';\nimport { bool, func } from 'prop-types';\nimport { jsx } from 'react/jsx-runtime';\nimport { useItemState } from '../hooks/useItemState.js';\nimport { useCombinedRef } from '../hooks/useCombinedRef.js';\nimport { useBEM } from '../hooks/useBEM.js';\nimport { withHovering } from '../utils/withHovering.js';\nimport { stylePropTypes } from '../utils/propTypes.js';\nimport { EventHandlersContext, roleMenuitem, menuClass, menuItemClass } from '../utils/constants.js';\nimport { safeCall, mergeProps, commonProps } from '../utils/utils.js';\n\nconst FocusableItem = /*#__PURE__*/withHovering('FocusableItem', function FocusableItem({\n className,\n disabled,\n children,\n isHovering,\n itemRef,\n externalRef,\n ...restProps\n}) {\n const isDisabled = !!disabled;\n const ref = useRef(null);\n const {\n setHover,\n onPointerLeave,\n ...restStateProps\n } = useItemState(itemRef, ref, isHovering, isDisabled);\n const {\n handleClose\n } = useContext(EventHandlersContext);\n const modifiers = useMemo(() => ({\n disabled: isDisabled,\n hover: isHovering,\n focusable: true\n }), [isDisabled, isHovering]);\n const renderChildren = useMemo(() => safeCall(children, {\n ...modifiers,\n ref,\n closeMenu: handleClose\n }), [children, modifiers, handleClose]);\n const mergedProps = mergeProps({\n ...restStateProps,\n onPointerLeave: e => onPointerLeave(e, true),\n onFocus: setHover\n }, restProps);\n return /*#__PURE__*/jsx(\"li\", {\n role: roleMenuitem,\n ...commonProps(isDisabled),\n ...mergedProps,\n ref: useCombinedRef(externalRef, itemRef),\n className: useBEM({\n block: menuClass,\n element: menuItemClass,\n modifiers,\n className\n }),\n children: renderChildren\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? FocusableItem.propTypes = {\n ...stylePropTypes(),\n disabled: bool,\n children: func\n} : void 0;\n\nexport { FocusableItem };\n","import { memo, forwardRef } from 'react';\nimport { jsx } from 'react/jsx-runtime';\nimport { useBEM } from '../hooks/useBEM.js';\nimport { menuClass, menuDividerClass } from '../utils/constants.js';\nimport { stylePropTypes } from '../utils/propTypes.js';\n\nconst MenuDivider = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function MenuDivider({\n className,\n ...restProps\n}, externalRef) {\n return /*#__PURE__*/jsx(\"li\", {\n role: \"separator\",\n ...restProps,\n ref: externalRef,\n className: useBEM({\n block: menuClass,\n element: menuDividerClass,\n className\n })\n });\n}));\nprocess.env.NODE_ENV !== \"production\" ? MenuDivider.propTypes = {\n ...stylePropTypes()\n} : void 0;\n\nexport { MenuDivider };\n","import { memo, forwardRef } from 'react';\nimport { jsx } from 'react/jsx-runtime';\nimport { useBEM } from '../hooks/useBEM.js';\nimport { roleNone, menuClass, menuHeaderClass } from '../utils/constants.js';\nimport { stylePropTypes } from '../utils/propTypes.js';\n\nconst MenuHeader = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function MenuHeader({\n className,\n ...restProps\n}, externalRef) {\n return /*#__PURE__*/jsx(\"li\", {\n role: roleNone,\n ...restProps,\n ref: externalRef,\n className: useBEM({\n block: menuClass,\n element: menuHeaderClass,\n className\n })\n });\n}));\nprocess.env.NODE_ENV !== \"production\" ? MenuHeader.propTypes = {\n ...stylePropTypes()\n} : void 0;\n\nexport { MenuHeader };\n","import { forwardRef, useRef, useState, useContext } from 'react';\nimport { bool } from 'prop-types';\nimport { jsx } from 'react/jsx-runtime';\nimport { useLayoutEffect as useIsomorphicLayoutEffect } from '../hooks/useIsomorphicLayoutEffect.js';\nimport { useCombinedRef } from '../hooks/useCombinedRef.js';\nimport { useBEM } from '../hooks/useBEM.js';\nimport { MenuListContext, menuClass, menuGroupClass } from '../utils/constants.js';\nimport { stylePropTypes } from '../utils/propTypes.js';\n\nconst MenuGroup = /*#__PURE__*/forwardRef(function MenuGroup({\n className,\n style,\n takeOverflow,\n ...restProps\n}, externalRef) {\n const ref = useRef(null);\n const [overflowStyle, setOverflowStyle] = useState();\n const {\n overflow,\n overflowAmt\n } = useContext(MenuListContext);\n useIsomorphicLayoutEffect(() => {\n let maxHeight;\n if (takeOverflow && overflowAmt >= 0) {\n maxHeight = ref.current.getBoundingClientRect().height - overflowAmt;\n if (maxHeight < 0) maxHeight = 0;\n }\n setOverflowStyle(maxHeight >= 0 ? {\n maxHeight,\n overflow\n } : undefined);\n }, [takeOverflow, overflow, overflowAmt]);\n useIsomorphicLayoutEffect(() => {\n if (overflowStyle) ref.current.scrollTop = 0;\n }, [overflowStyle]);\n return /*#__PURE__*/jsx(\"div\", {\n ...restProps,\n ref: useCombinedRef(externalRef, ref),\n className: useBEM({\n block: menuClass,\n element: menuGroupClass,\n className\n }),\n style: {\n ...style,\n ...overflowStyle\n }\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? MenuGroup.propTypes = {\n ...stylePropTypes(),\n takeOverflow: bool\n} : void 0;\n\nexport { MenuGroup };\n","import * as React from \"react\";\n\nfunction isShallowEqual(object1, object2) {\n const keys1 = Object.keys(object1);\n const keys2 = Object.keys(object2);\n\n if (keys1.length !== keys2.length) {\n return false;\n }\n\n for (let key of keys1) {\n if (object1[key] !== object2[key]) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction isTouchEvent({ nativeEvent }) {\n return window.TouchEvent\n ? nativeEvent instanceof TouchEvent\n : \"touches\" in nativeEvent;\n}\n\nfunction isMouseEvent(event) {\n return event.nativeEvent instanceof MouseEvent;\n}\n\nfunction throttle(cb, ms) {\n let lastTime = 0;\n return () => {\n const now = Date.now();\n if (now - lastTime >= ms) {\n cb();\n lastTime = now;\n }\n };\n}\n\nfunction isPlainObject(value) {\n return Object.prototype.toString.call(value) === \"[object Object]\";\n}\n\nfunction dispatchStorageEvent(key, newValue) {\n window.dispatchEvent(new StorageEvent(\"storage\", { key, newValue }));\n}\n\nexport function useBattery() {\n const [state, setState] = React.useState({\n supported: true,\n loading: true,\n level: null,\n charging: null,\n chargingTime: null,\n dischargingTime: null,\n });\n\n React.useEffect(() => {\n if (!navigator.getBattery) {\n setState((s) => ({\n ...s,\n supported: false,\n loading: false,\n }));\n return;\n }\n\n let battery = null;\n\n const handleChange = () => {\n setState({\n supported: true,\n loading: false,\n level: battery.level,\n charging: battery.charging,\n chargingTime: battery.chargingTime,\n dischargingTime: battery.dischargingTime,\n });\n };\n\n navigator.getBattery().then((b) => {\n battery = b;\n handleChange();\n\n b.addEventListener(\"levelchange\", handleChange);\n b.addEventListener(\"chargingchange\", handleChange);\n b.addEventListener(\"chargingtimechange\", handleChange);\n b.addEventListener(\"dischargingtimechange\", handleChange);\n });\n\n return () => {\n if (battery) {\n battery.removeEventListener(\"levelchange\", handleChange);\n battery.removeEventListener(\"chargingchange\", handleChange);\n battery.removeEventListener(\"chargingtimechange\", handleChange);\n battery.removeEventListener(\"dischargingtimechange\", handleChange);\n }\n };\n }, []);\n\n return state;\n}\n\nexport function useClickAway(cb) {\n const ref = React.useRef(null);\n const refCb = React.useRef(cb);\n\n React.useLayoutEffect(() => {\n refCb.current = cb;\n });\n\n React.useEffect(() => {\n const handler = (e) => {\n const element = ref.current;\n if (element && !element.contains(e.target)) {\n refCb.current(e);\n }\n };\n\n document.addEventListener(\"mousedown\", handler);\n document.addEventListener(\"touchstart\", handler);\n\n return () => {\n document.removeEventListener(\"mousedown\", handler);\n document.removeEventListener(\"touchstart\", handler);\n };\n }, []);\n\n return ref;\n}\n\nfunction oldSchoolCopy(text) {\n const tempTextArea = document.createElement(\"textarea\");\n tempTextArea.value = text;\n document.body.appendChild(tempTextArea);\n tempTextArea.select();\n document.execCommand(\"copy\");\n document.body.removeChild(tempTextArea);\n}\n\nexport function useCopyToClipboard() {\n const [state, setState] = React.useState(null);\n\n const copyToClipboard = React.useCallback((value) => {\n const handleCopy = async () => {\n try {\n if (navigator?.clipboard?.writeText) {\n await navigator.clipboard.writeText(value);\n setState(value);\n } else {\n throw new Error(\"writeText not supported\");\n }\n } catch (e) {\n oldSchoolCopy(value);\n setState(value);\n }\n };\n\n handleCopy();\n }, []);\n\n return [state, copyToClipboard];\n}\n\nexport function useCounter(startingValue = 0, options = {}) {\n const { min, max } = options;\n\n if (typeof min === \"number\" && startingValue < min) {\n throw new Error(\n `Your starting value of ${startingValue} is less than your min of ${min}.`\n );\n }\n\n if (typeof max === \"number\" && startingValue > max) {\n throw new Error(\n `Your starting value of ${startingValue} is greater than your max of ${max}.`\n );\n }\n\n const [count, setCount] = React.useState(startingValue);\n\n const increment = React.useCallback(() => {\n setCount((c) => {\n const nextCount = c + 1;\n\n if (typeof max === \"number\" && nextCount > max) {\n return c;\n }\n\n return nextCount;\n });\n }, [max]);\n\n const decrement = React.useCallback(() => {\n setCount((c) => {\n const nextCount = c - 1;\n\n if (typeof min === \"number\" && nextCount < min) {\n return c;\n }\n\n return nextCount;\n });\n }, [min]);\n\n const set = React.useCallback(\n (nextCount) => {\n setCount((c) => {\n if (typeof max === \"number\" && nextCount > max) {\n return c;\n }\n\n if (typeof min === \"number\" && nextCount < min) {\n return c;\n }\n\n return nextCount;\n });\n },\n [max, min]\n );\n\n const reset = React.useCallback(() => {\n setCount(startingValue);\n }, [startingValue]);\n\n return [\n count,\n {\n increment,\n decrement,\n set,\n reset,\n },\n ];\n}\n\nexport function useDebounce(value, delay) {\n const [debouncedValue, setDebouncedValue] = React.useState(value);\n\n React.useEffect(() => {\n const handler = setTimeout(() => {\n setDebouncedValue(value);\n }, delay);\n\n return () => {\n clearTimeout(handler);\n };\n }, [value, delay]);\n\n return debouncedValue;\n}\n\nexport function useDefault(initialValue, defaultValue) {\n const [state, setState] = React.useState(initialValue);\n\n if (typeof state === \"undefined\" || state === null) {\n return [defaultValue, setState];\n }\n\n return [state, setState];\n}\n\nexport function useDocumentTitle(title) {\n React.useEffect(() => {\n document.title = title;\n }, [title]);\n}\n\nexport function useFavicon(url) {\n React.useEffect(() => {\n let link = document.querySelector(`link[rel~=\"icon\"]`);\n\n if (!link) {\n link = document.createElement(\"link\");\n link.type = \"image/x-icon\";\n link.rel = \"icon\";\n link.href = url;\n document.head.appendChild(link);\n } else {\n link.href = url;\n }\n }, [url]);\n}\n\nexport function useGeolocation(options = {}) {\n const [state, setState] = React.useState({\n loading: true,\n accuracy: null,\n altitude: null,\n altitudeAccuracy: null,\n heading: null,\n latitude: null,\n longitude: null,\n speed: null,\n timestamp: null,\n error: null,\n });\n\n const optionsRef = React.useRef(options);\n\n React.useEffect(() => {\n const onEvent = ({ coords, timestamp }) => {\n setState({\n loading: false,\n timestamp,\n latitude: coords.latitude,\n longitude: coords.longitude,\n altitude: coords.altitude,\n accuracy: coords.accuracy,\n altitudeAccuracy: coords.altitudeAccuracy,\n heading: coords.heading,\n speed: coords.speed,\n });\n };\n\n const onEventError = (error) => {\n setState((s) => ({\n ...s,\n loading: false,\n error,\n }));\n };\n\n navigator.geolocation.getCurrentPosition(\n onEvent,\n onEventError,\n optionsRef.current\n );\n\n const watchId = navigator.geolocation.watchPosition(\n onEvent,\n onEventError,\n optionsRef.current\n );\n\n return () => {\n navigator.geolocation.clearWatch(watchId);\n };\n }, []);\n\n return state;\n}\n\nconst initialUseHistoryStateState = {\n past: [],\n present: null,\n future: [],\n};\n\nconst useHistoryStateReducer = (state, action) => {\n const { past, present, future } = state;\n\n if (action.type === \"UNDO\") {\n return {\n past: past.slice(0, past.length - 1),\n present: past[past.length - 1],\n future: [present, ...future],\n };\n } else if (action.type === \"REDO\") {\n return {\n past: [...past, present],\n present: future[0],\n future: future.slice(1),\n };\n } else if (action.type === \"SET\") {\n const { newPresent } = action;\n\n if (action.newPresent === present) {\n return state;\n }\n\n return {\n past: [...past, present],\n present: newPresent,\n future: [],\n };\n } else if (action.type === \"CLEAR\") {\n return {\n ...initialUseHistoryStateState,\n present: action.initialPresent,\n };\n } else {\n throw new Error(\"Unsupported action type\");\n }\n};\n\nexport function useHistoryState(initialPresent = {}) {\n const initialPresentRef = React.useRef(initialPresent);\n\n const [state, dispatch] = React.useReducer(useHistoryStateReducer, {\n ...initialUseHistoryStateState,\n present: initialPresentRef.current,\n });\n\n const canUndo = state.past.length !== 0;\n const canRedo = state.future.length !== 0;\n\n const undo = React.useCallback(() => {\n if (canUndo) {\n dispatch({ type: \"UNDO\" });\n }\n }, [canUndo]);\n\n const redo = React.useCallback(() => {\n if (canRedo) {\n dispatch({ type: \"REDO\" });\n }\n }, [canRedo]);\n\n const set = React.useCallback(\n (newPresent) => dispatch({ type: \"SET\", newPresent }),\n []\n );\n\n const clear = React.useCallback(\n () =>\n dispatch({ type: \"CLEAR\", initialPresent: initialPresentRef.current }),\n []\n );\n\n return { state: state.present, set, undo, redo, clear, canUndo, canRedo };\n}\n\nexport function useHover() {\n const [hovering, setHovering] = React.useState(false);\n const previousNode = React.useRef(null);\n\n const handleMouseEnter = React.useCallback(() => {\n setHovering(true);\n }, []);\n\n const handleMouseLeave = React.useCallback(() => {\n setHovering(false);\n }, []);\n\n const customRef = React.useCallback(\n (node) => {\n if (previousNode.current?.nodeType === Node.ELEMENT_NODE) {\n previousNode.current.removeEventListener(\n \"mouseenter\",\n handleMouseEnter\n );\n previousNode.current.removeEventListener(\n \"mouseleave\",\n handleMouseLeave\n );\n }\n\n if (node?.nodeType === Node.ELEMENT_NODE) {\n node.addEventListener(\"mouseenter\", handleMouseEnter);\n node.addEventListener(\"mouseleave\", handleMouseLeave);\n }\n\n previousNode.current = node;\n },\n [handleMouseEnter, handleMouseLeave]\n );\n\n return [customRef, hovering];\n}\n\nexport function useIdle(ms = 1000 * 60) {\n const [idle, setIdle] = React.useState(false);\n\n React.useEffect(() => {\n let timeoutId;\n\n const handleTimeout = () => {\n setIdle(true);\n };\n\n const handleEvent = throttle((e) => {\n setIdle(false);\n\n window.clearTimeout(timeoutId);\n timeoutId = window.setTimeout(handleTimeout, ms);\n }, 500);\n\n const handleVisibilityChange = () => {\n if (!document.hidden) {\n handleEvent();\n }\n };\n\n timeoutId = window.setTimeout(handleTimeout, ms);\n\n window.addEventListener(\"mousemove\", handleEvent);\n window.addEventListener(\"mousedown\", handleEvent);\n window.addEventListener(\"resize\", handleEvent);\n window.addEventListener(\"keydown\", handleEvent);\n window.addEventListener(\"touchstart\", handleEvent);\n window.addEventListener(\"wheel\", handleEvent);\n document.addEventListener(\"visibilitychange\", handleVisibilityChange);\n\n return () => {\n window.removeEventListener(\"mousemove\", handleEvent);\n window.removeEventListener(\"mousedown\", handleEvent);\n window.removeEventListener(\"resize\", handleEvent);\n window.removeEventListener(\"keydown\", handleEvent);\n window.removeEventListener(\"touchstart\", handleEvent);\n window.removeEventListener(\"wheel\", handleEvent);\n document.removeEventListener(\"visibilitychange\", handleVisibilityChange);\n window.clearTimeout(timeoutId);\n };\n }, [ms]);\n\n return idle;\n}\n\nexport function useIntersectionObserver(options = {}) {\n const { threshold = 1, root = null, rootMargin = \"0px\" } = options;\n const [entry, setEntry] = React.useState(null);\n\n const previousObserver = React.useRef(null);\n\n const customRef = React.useCallback(\n (node) => {\n if (previousObserver.current) {\n previousObserver.current.disconnect();\n previousObserver.current = null;\n }\n\n if (node?.nodeType === Node.ELEMENT_NODE) {\n const observer = new IntersectionObserver(\n ([entry]) => {\n setEntry(entry);\n },\n { threshold, root, rootMargin }\n );\n\n observer.observe(node);\n previousObserver.current = observer;\n }\n },\n [threshold, root, rootMargin]\n );\n\n return [customRef, entry];\n}\n\nexport function useIsClient() {\n const [isClient, setIsClient] = React.useState(false);\n\n React.useEffect(() => {\n setIsClient(true);\n }, []);\n\n return isClient;\n}\n\nexport function useIsFirstRender() {\n const renderRef = React.useRef(true);\n\n if (renderRef.current === true) {\n renderRef.current = false;\n return true;\n }\n\n return renderRef.current;\n}\n\nexport function useList(defaultList = []) {\n const [list, setList] = React.useState(defaultList);\n\n const set = React.useCallback((l) => {\n setList(l);\n }, []);\n\n const push = React.useCallback((element) => {\n setList((l) => [...l, element]);\n }, []);\n\n const removeAt = React.useCallback((index) => {\n setList((l) => [...l.slice(0, index), ...l.slice(index + 1)]);\n }, []);\n\n const insertAt = React.useCallback((index, element) => {\n setList((l) => [...l.slice(0, index), element, ...l.slice(index)]);\n }, []);\n\n const updateAt = React.useCallback((index, element) => {\n setList((l) => l.map((e, i) => (i === index ? element : e)));\n }, []);\n\n const clear = React.useCallback(() => setList([]), []);\n\n return [list, { set, push, removeAt, insertAt, updateAt, clear }];\n}\n\nconst setLocalStorageItem = (key, value) => {\n const stringifiedValue = JSON.stringify(value);\n window.localStorage.setItem(key, stringifiedValue);\n dispatchStorageEvent(key, stringifiedValue);\n};\n\nconst removeLocalStorageItem = (key) => {\n window.localStorage.removeItem(key);\n dispatchStorageEvent(key, null);\n};\n\nconst getLocalStorageItem = (key) => {\n return window.localStorage.getItem(key);\n};\n\nconst useLocalStorageSubscribe = (callback) => {\n window.addEventListener(\"storage\", callback);\n return () => window.removeEventListener(\"storage\", callback);\n};\n\nconst getLocalStorageServerSnapshot = () => {\n throw Error(\"useLocalStorage is a client-only hook\");\n};\n\nexport function useLocalStorage(key, initialValue) {\n const getSnapshot = () => getLocalStorageItem(key);\n\n const store = React.useSyncExternalStore(\n useLocalStorageSubscribe,\n getSnapshot,\n getLocalStorageServerSnapshot\n );\n\n const setState = React.useCallback(\n (v) => {\n try {\n const nextState = typeof v === \"function\" ? v(JSON.parse(store)) : v;\n\n if (nextState === undefined || nextState === null) {\n removeLocalStorageItem(key);\n } else {\n setLocalStorageItem(key, nextState);\n }\n } catch (e) {\n console.warn(e);\n }\n },\n [key, store]\n );\n\n React.useEffect(() => {\n if (\n getLocalStorageItem(key) === null &&\n typeof initialValue !== \"undefined\"\n ) {\n setLocalStorageItem(key, initialValue);\n }\n }, [key, initialValue]);\n\n return [store ? JSON.parse(store) : initialValue, setState];\n}\n\nexport function useLockBodyScroll() {\n React.useLayoutEffect(() => {\n const originalStyle = window.getComputedStyle(document.body).overflow;\n document.body.style.overflow = \"hidden\";\n return () => {\n document.body.style.overflow = originalStyle;\n };\n }, []);\n}\n\nexport function useLongPress(callback, options = {}) {\n const { threshold = 400, onStart, onFinish, onCancel } = options;\n const isLongPressActive = React.useRef(false);\n const isPressed = React.useRef(false);\n const timerId = React.useRef();\n\n return React.useMemo(() => {\n if (typeof callback !== \"function\") {\n return {};\n }\n\n const start = (event) => {\n if (!isMouseEvent(event) && !isTouchEvent(event)) return;\n\n if (onStart) {\n onStart(event);\n }\n\n isPressed.current = true;\n timerId.current = setTimeout(() => {\n callback(event);\n isLongPressActive.current = true;\n }, threshold);\n };\n\n const cancel = (event) => {\n if (!isMouseEvent(event) && !isTouchEvent(event)) return;\n\n if (isLongPressActive.current) {\n if (onFinish) {\n onFinish(event);\n }\n } else if (isPressed.current) {\n if (onCancel) {\n onCancel(event);\n }\n }\n\n isLongPressActive.current = false;\n isPressed.current = false;\n\n if (timerId.current) {\n window.clearTimeout(timerId.current);\n }\n };\n\n const mouseHandlers = {\n onMouseDown: start,\n onMouseUp: cancel,\n onMouseLeave: cancel,\n };\n\n const touchHandlers = {\n onTouchStart: start,\n onTouchEnd: cancel,\n };\n\n return {\n ...mouseHandlers,\n ...touchHandlers,\n };\n }, [callback, threshold, onCancel, onFinish, onStart]);\n}\n\nexport function useMap(initialState) {\n const mapRef = React.useRef(new Map(initialState));\n const [, reRender] = React.useReducer((x) => x + 1, 0);\n\n mapRef.current.set = (...args) => {\n Map.prototype.set.apply(mapRef.current, args);\n reRender();\n return mapRef.current;\n };\n\n mapRef.current.clear = (...args) => {\n Map.prototype.clear.apply(mapRef.current, args);\n reRender();\n };\n\n mapRef.current.delete = (...args) => {\n const res = Map.prototype.delete.apply(mapRef.current, args);\n reRender();\n\n return res;\n };\n\n return mapRef.current;\n}\n\nexport function useMeasure() {\n const [dimensions, setDimensions] = React.useState({\n width: null,\n height: null,\n });\n\n const previousObserver = React.useRef(null);\n\n const customRef = React.useCallback((node) => {\n if (previousObserver.current) {\n previousObserver.current.disconnect();\n previousObserver.current = null;\n }\n\n if (node?.nodeType === Node.ELEMENT_NODE) {\n const observer = new ResizeObserver(([entry]) => {\n if (entry && entry.borderBoxSize) {\n const { inlineSize: width, blockSize: height } =\n entry.borderBoxSize[0];\n\n setDimensions({ width, height });\n }\n });\n\n observer.observe(node);\n previousObserver.current = observer;\n }\n }, []);\n\n return [customRef, dimensions];\n}\n\nexport function useMediaQuery(query) {\n const subscribe = React.useCallback(\n (callback) => {\n const matchMedia = window.matchMedia(query);\n\n matchMedia.addEventListener(\"change\", callback);\n return () => {\n matchMedia.removeEventListener(\"change\", callback);\n };\n },\n [query]\n );\n\n const getSnapshot = () => {\n return window.matchMedia(query).matches;\n };\n\n const getServerSnapshot = () => {\n throw Error(\"useMediaQuery is a client-only hook\");\n };\n\n return React.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n}\n\nexport function useMouse() {\n const [state, setState] = React.useState({\n x: 0,\n y: 0,\n elementX: 0,\n elementY: 0,\n elementPositionX: 0,\n elementPositionY: 0,\n });\n\n const ref = React.useRef(null);\n\n React.useLayoutEffect(() => {\n const handleMouseMove = (event) => {\n let newState = {\n x: event.pageX,\n y: event.pageY,\n };\n\n if (ref.current?.nodeType === Node.ELEMENT_NODE) {\n const { left, top } = ref.current.getBoundingClientRect();\n const elementPositionX = left + window.scrollX;\n const elementPositionY = top + window.scrollY;\n const elementX = event.pageX - elementPositionX;\n const elementY = event.pageY - elementPositionY;\n\n newState.elementX = elementX;\n newState.elementY = elementY;\n newState.elementPositionX = elementPositionX;\n newState.elementPositionY = elementPositionY;\n }\n\n setState((s) => {\n return {\n ...s,\n ...newState,\n };\n });\n };\n\n document.addEventListener(\"mousemove\", handleMouseMove);\n\n return () => {\n document.removeEventListener(\"mousemove\", handleMouseMove);\n };\n }, []);\n\n return [state, ref];\n}\n\nconst getConnection = () => {\n return (\n navigator?.connection ||\n navigator?.mozConnection ||\n navigator?.webkitConnection\n );\n};\n\nconst useNetworkStateSubscribe = (callback) => {\n window.addEventListener(\"online\", callback, { passive: true });\n window.addEventListener(\"offline\", callback, { passive: true });\n\n const connection = getConnection();\n\n if (connection) {\n connection.addEventListener(\"change\", callback, { passive: true });\n }\n\n return () => {\n window.removeEventListener(\"online\", callback);\n window.removeEventListener(\"offline\", callback);\n\n if (connection) {\n connection.removeEventListener(\"change\", callback);\n }\n };\n};\n\nconst getNetworkStateServerSnapshot = () => {\n throw Error(\"useNetworkState is a client-only hook\");\n};\n\nexport function useNetworkState() {\n const cache = React.useRef({});\n\n const getSnapshot = () => {\n const online = navigator.onLine;\n const connection = getConnection();\n\n const nextState = {\n online,\n downlink: connection?.downlink,\n downlinkMax: connection?.downlinkMax,\n effectiveType: connection?.effectiveType,\n rtt: connection?.rtt,\n saveData: connection?.saveData,\n type: connection?.type,\n };\n\n if (isShallowEqual(cache.current, nextState)) {\n return cache.current;\n } else {\n cache.current = nextState;\n return nextState;\n }\n };\n\n return React.useSyncExternalStore(\n useNetworkStateSubscribe,\n getSnapshot,\n getNetworkStateServerSnapshot\n );\n}\n\nexport function useObjectState(initialValue) {\n const [state, setState] = React.useState(initialValue);\n\n const handleUpdate = React.useCallback((arg) => {\n if (typeof arg === \"function\") {\n setState((s) => {\n const newState = arg(s);\n\n if (isPlainObject(newState)) {\n return {\n ...s,\n ...newState,\n };\n }\n });\n }\n\n if (isPlainObject(arg)) {\n setState((s) => ({\n ...s,\n ...arg,\n }));\n }\n }, []);\n\n return [state, handleUpdate];\n}\n\nexport function useOrientation() {\n const [orientation, setOrientation] = React.useState({\n angle: 0,\n type: \"landscape-primary\",\n });\n\n React.useLayoutEffect(() => {\n const handleChange = () => {\n const { angle, type } = window.screen.orientation;\n setOrientation({\n angle,\n type,\n });\n };\n\n const handle_orientationchange = () => {\n setOrientation({\n type: \"UNKNOWN\",\n angle: window.orientation,\n });\n };\n\n if (window.screen?.orientation) {\n handleChange();\n window.screen.orientation.addEventListener(\"change\", handleChange);\n } else {\n handle_orientationchange();\n window.addEventListener(\"orientationchange\", handle_orientationchange);\n }\n\n return () => {\n if (window.screen?.orientation) {\n window.screen.orientation.removeEventListener(\"change\", handleChange);\n } else {\n window.removeEventListener(\n \"orientationchange\",\n handle_orientationchange\n );\n }\n };\n }, []);\n\n return orientation;\n}\n\nconst usePreferredLanguageSubscribe = (cb) => {\n window.addEventListener(\"languagechange\", cb);\n return () => window.removeEventListener(\"languagechange\", cb);\n};\n\nconst getPreferredLanguageSnapshot = () => {\n return navigator.language;\n};\n\nconst getPreferredLanguageServerSnapshot = () => {\n throw Error(\"usePreferredLanguage is a client-only hook\");\n};\n\nexport function usePreferredLanguage() {\n return React.useSyncExternalStore(\n usePreferredLanguageSubscribe,\n getPreferredLanguageSnapshot,\n getPreferredLanguageServerSnapshot\n );\n}\n\nexport function usePrevious(value) {\n const [current, setCurrent] = React.useState(value);\n const [previous, setPrevious] = React.useState(null);\n\n if (value !== current) {\n setPrevious(current);\n setCurrent(value);\n }\n\n return previous;\n}\n\nexport function useQueue(initialValue = []) {\n const [queue, setQueue] = React.useState(initialValue);\n\n const add = React.useCallback((element) => {\n setQueue((q) => [...q, element]);\n }, []);\n\n const remove = React.useCallback(() => {\n let removedElement;\n\n setQueue(([first, ...q]) => {\n removedElement = first;\n return q;\n });\n\n return removedElement;\n }, []);\n\n const clear = React.useCallback(() => {\n setQueue([]);\n }, []);\n\n return {\n add,\n remove,\n clear,\n first: queue[0],\n last: queue[queue.length - 1],\n size: queue.length,\n queue,\n };\n}\n\nexport function useRenderCount() {\n const count = React.useRef(0);\n\n count.current++;\n\n return count.current;\n}\n\nexport function useRenderInfo(name = \"Unknown\") {\n const count = React.useRef(0);\n const lastRender = React.useRef();\n const now = Date.now();\n\n count.current++;\n\n React.useEffect(() => {\n lastRender.current = Date.now();\n });\n\n const sinceLastRender = lastRender.current ? now - lastRender.current : 0;\n\n if (process.env.NODE_ENV !== \"production\") {\n const info = {\n name,\n renders: count.current,\n sinceLastRender,\n timestamp: now,\n };\n\n console.log(info);\n\n return info;\n }\n}\n\nexport function useScript(src, options = {}) {\n const [status, setStatus] = React.useState(\"loading\");\n const optionsRef = React.useRef(options);\n\n React.useEffect(() => {\n let script = document.querySelector(`script[src=\"${src}\"]`);\n\n const domStatus = script?.getAttribute(\"data-status\");\n if (domStatus) {\n setStatus(domStatus);\n return;\n }\n\n if (script === null) {\n script = document.createElement(\"script\");\n script.src = src;\n script.async = true;\n script.setAttribute(\"data-status\", \"loading\");\n document.body.appendChild(script);\n\n const handleScriptLoad = () => {\n script.setAttribute(\"data-status\", \"ready\");\n setStatus(\"ready\");\n removeEventListeners();\n };\n\n const handleScriptError = () => {\n script.setAttribute(\"data-status\", \"error\");\n setStatus(\"error\");\n removeEventListeners();\n };\n\n const removeEventListeners = () => {\n script.removeEventListener(\"load\", handleScriptLoad);\n script.removeEventListener(\"error\", handleScriptError);\n };\n\n script.addEventListener(\"load\", handleScriptLoad);\n script.addEventListener(\"error\", handleScriptError);\n\n const removeOnUnmount = optionsRef.current.removeOnUnmount;\n\n return () => {\n if (removeOnUnmount === true) {\n script.remove();\n removeEventListeners();\n }\n };\n } else {\n setStatus(\"unknown\");\n }\n }, [src]);\n\n return status;\n}\n\nconst setSessionStorageItem = (key, value) => {\n const stringifiedValue = JSON.stringify(value);\n window.sessionStorage.setItem(key, stringifiedValue);\n dispatchStorageEvent(key, stringifiedValue);\n};\n\nconst removeSessionStorageItem = (key) => {\n window.sessionStorage.removeItem(key);\n dispatchStorageEvent(key, null);\n};\n\nconst getSessionStorageItem = (key) => {\n return window.sessionStorage.getItem(key);\n};\n\nconst useSessionStorageSubscribe = (callback) => {\n window.addEventListener(\"storage\", callback);\n return () => window.removeEventListener(\"storage\", callback);\n};\n\nconst getSessionStorageServerSnapshot = () => {\n throw Error(\"useSessionStorage is a client-only hook\");\n};\n\nexport function useSessionStorage(key, initialValue) {\n const getSnapshot = () => getSessionStorageItem(key);\n\n const store = React.useSyncExternalStore(\n useSessionStorageSubscribe,\n getSnapshot,\n getSessionStorageServerSnapshot\n );\n\n const setState = React.useCallback(\n (v) => {\n try {\n const nextState = typeof v === \"function\" ? v(JSON.parse(store)) : v;\n\n if (nextState === undefined || nextState === null) {\n removeSessionStorageItem(key);\n } else {\n setSessionStorageItem(key, nextState);\n }\n } catch (e) {\n console.warn(e);\n }\n },\n [key, store]\n );\n\n React.useEffect(() => {\n if (\n getSessionStorageItem(key) === null &&\n typeof initialValue !== \"undefined\"\n ) {\n setSessionStorageItem(key, initialValue);\n }\n }, [key, initialValue]);\n\n return [store ? JSON.parse(store) : initialValue, setState];\n}\n\nexport function useSet(values) {\n const setRef = React.useRef(new Set(values));\n const [, reRender] = React.useReducer((x) => x + 1, 0);\n\n setRef.current.add = (...args) => {\n const res = Set.prototype.add.apply(setRef.current, args);\n reRender();\n\n return res;\n };\n\n setRef.current.clear = (...args) => {\n Set.prototype.clear.apply(setRef.current, args);\n reRender();\n };\n\n setRef.current.delete = (...args) => {\n const res = Set.prototype.delete.apply(setRef.current, args);\n reRender();\n\n return res;\n };\n\n return setRef.current;\n}\n\nexport function useThrottle(value, interval = 500) {\n const [throttledValue, setThrottledValue] = React.useState(value);\n const lastUpdated = React.useRef(null);\n\n React.useEffect(() => {\n const now = Date.now();\n\n if (lastUpdated.current && now >= lastUpdated.current + interval) {\n lastUpdated.current = now;\n setThrottledValue(value);\n } else {\n const id = window.setTimeout(() => {\n lastUpdated.current = now;\n setThrottledValue(value);\n }, interval);\n\n return () => window.clearTimeout(id);\n }\n }, [value, interval]);\n\n return throttledValue;\n}\n\nexport function useToggle(initialValue) {\n const [on, setOn] = React.useState(() => {\n if (typeof initialValue === \"boolean\") {\n return initialValue;\n }\n\n return Boolean(initialValue);\n });\n\n const handleToggle = React.useCallback((value) => {\n if (typeof value === \"boolean\") {\n return setOn(value);\n }\n\n return setOn((v) => !v);\n }, []);\n\n return [on, handleToggle];\n}\n\nconst useVisibilityChangeSubscribe = (callback) => {\n document.addEventListener(\"visibilitychange\", callback);\n\n return () => {\n document.removeEventListener(\"visibilitychange\", callback);\n };\n};\n\nconst getVisibilityChangeSnapshot = () => {\n return document.visibilityState;\n};\n\nconst getVisibilityChangeServerSnapshot = () => {\n throw Error(\"useVisibilityChange is a client-only hook\");\n};\n\nexport function useVisibilityChange() {\n const visibilityState = React.useSyncExternalStore(\n useVisibilityChangeSubscribe,\n getVisibilityChangeSnapshot,\n getVisibilityChangeServerSnapshot\n );\n\n return visibilityState === \"visible\";\n}\n\nexport function useWindowScroll() {\n const [state, setState] = React.useState({\n x: null,\n y: null,\n });\n\n const scrollTo = React.useCallback((...args) => {\n if (typeof args[0] === \"object\") {\n window.scrollTo(args[0]);\n } else if (typeof args[0] === \"number\" && typeof args[1] === \"number\") {\n window.scrollTo(args[0], args[1]);\n } else {\n throw new Error(\n `Invalid arguments passed to scrollTo. See here for more info. https://developer.mozilla.org/en-US/docs/Web/API/Window/scrollTo`\n );\n }\n }, []);\n\n React.useLayoutEffect(() => {\n const handleScroll = () => {\n setState({ x: window.scrollX, y: window.scrollY });\n };\n\n handleScroll();\n window.addEventListener(\"scroll\", handleScroll);\n\n return () => {\n window.removeEventListener(\"scroll\", handleScroll);\n };\n }, []);\n\n return [state, scrollTo];\n}\n\nexport function useWindowSize() {\n const [size, setSize] = React.useState({\n width: null,\n height: null,\n });\n\n React.useLayoutEffect(() => {\n const handleResize = () => {\n setSize({\n width: window.innerWidth,\n height: window.innerHeight,\n });\n };\n\n handleResize();\n window.addEventListener(\"resize\", handleResize);\n\n return () => {\n window.removeEventListener(\"resize\", handleResize);\n };\n }, []);\n\n return size;\n}\n","!function(t,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(t=\"undefined\"!=typeof globalThis?globalThis:t||self).dayjs=e()}(this,(function(){\"use strict\";var t=1e3,e=6e4,n=36e5,r=\"millisecond\",i=\"second\",s=\"minute\",u=\"hour\",a=\"day\",o=\"week\",c=\"month\",f=\"quarter\",h=\"year\",d=\"date\",l=\"Invalid Date\",$=/^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/,y=/\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:\"en\",weekdays:\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),months:\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\"),ordinal:function(t){var e=[\"th\",\"st\",\"nd\",\"rd\"],n=t%100;return\"[\"+t+(e[(n-20)%10]||e[n]||e[0])+\"]\"}},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:\"\"+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?\"+\":\"-\")+m(r,2,\"0\")+\":\"+m(i,2,\"0\")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return+(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||\"\").toLowerCase().replace(/s$/,\"\")},u:function(t){return void 0===t}},g=\"en\",D={};D[g]=M;var p=\"$isDayjsObject\",S=function(t){return t instanceof _||!(!t||!t[p])},w=function t(e,n,r){var i;if(!e)return g;if(\"string\"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split(\"-\");if(!i&&u.length>1)return t(u[0])}else{var a=e.name;D[a]=e,i=a}return!r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n=\"object\"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[p]=!0}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if(\"string\"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||\"0\").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return b},m.isValid=function(){return!(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<O(t)},m.$g=function(t,e,n){return b.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!b.u(e)||e,f=b.p(t),l=function(t,e){var i=b.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return b.w(n.toDate()[t].apply(n.toDate(\"s\"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v=\"set\"+(this.$u?\"UTC\":\"\");switch(f){case h:return r?l(1,0):l(31,11);case c:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+\"Hours\",0);case u:return $(v+\"Minutes\",1);case s:return $(v+\"Seconds\",2);case i:return $(v+\"Milliseconds\",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=b.p(t),f=\"set\"+(this.$u?\"UTC\":\"\"),l=(n={},n[a]=f+\"Date\",n[d]=f+\"Date\",n[c]=f+\"Month\",n[h]=f+\"FullYear\",n[u]=f+\"Hours\",n[s]=f+\"Minutes\",n[i]=f+\"Seconds\",n[r]=f+\"Milliseconds\",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===c||o===h){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[b.p(t)]()},m.add=function(r,f){var d,l=this;r=Number(r);var $=b.p(f),y=function(t){var e=O(l);return b.w(e.date(e.date()+Math.round(t*r)),l)};if($===c)return this.set(c,this.$M+r);if($===h)return this.set(h,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return b.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||\"YYYY-MM-DDTHH:mm:ssZ\",i=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,c=n.months,f=n.meridiem,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},d=function(t){return b.s(s%12||12,t,\"0\")},$=f||function(t,e,n){var r=t<12?\"AM\":\"PM\";return n?r.toLowerCase():r};return r.replace(y,(function(t,r){return r||function(t){switch(t){case\"YY\":return String(e.$y).slice(-2);case\"YYYY\":return b.s(e.$y,4,\"0\");case\"M\":return a+1;case\"MM\":return b.s(a+1,2,\"0\");case\"MMM\":return h(n.monthsShort,a,c,3);case\"MMMM\":return h(c,a);case\"D\":return e.$D;case\"DD\":return b.s(e.$D,2,\"0\");case\"d\":return String(e.$W);case\"dd\":return h(n.weekdaysMin,e.$W,o,2);case\"ddd\":return h(n.weekdaysShort,e.$W,o,3);case\"dddd\":return o[e.$W];case\"H\":return String(s);case\"HH\":return b.s(s,2,\"0\");case\"h\":return d(1);case\"hh\":return d(2);case\"a\":return $(s,u,!0);case\"A\":return $(s,u,!1);case\"m\":return String(u);case\"mm\":return b.s(u,2,\"0\");case\"s\":return String(e.$s);case\"ss\":return b.s(e.$s,2,\"0\");case\"SSS\":return b.s(e.$ms,3,\"0\");case\"Z\":return i}return null}(t)||i.replace(\":\",\"\")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=this,M=b.p(d),m=O(r),v=(m.utcOffset()-this.utcOffset())*e,g=this-m,D=function(){return b.m(y,m)};switch(M){case h:$=D()/12;break;case c:$=D();break;case f:$=D()/3;break;case o:$=(g-v)/6048e5;break;case a:$=(g-v)/864e5;break;case u:$=g/n;break;case s:$=g/e;break;case i:$=g/t;break;default:$=g}return l?$:b.a($)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=w(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return b.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),k=_.prototype;return O.prototype=k,[[\"$ms\",r],[\"$s\",i],[\"$m\",s],[\"$H\",u],[\"$W\",a],[\"$M\",c],[\"$y\",h],[\"$D\",d]].forEach((function(t){k[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),O.extend=function(t,e){return t.$i||(t(e,_,O),t.$i=!0),O},O.locale=w,O.isDayjs=S,O.unix=function(t){return O(1e3*t)},O.en=D[g],O.Ls=D,O.p={},O}));","!function(e,n){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=n():\"function\"==typeof define&&define.amd?define([],n):\"object\"==typeof exports?exports.dayjsTwitter=n():e.dayjsTwitter=n()}(this,function(){return function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&\"object\"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,\"default\",{enumerable:!0,value:e}),2&n&&\"string\"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,\"a\",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p=\"\",t(t.s=1)}([function(e,n,t){var r,o=function(){var e={ns:1e-6,us:.001,\"µs\":.001,\"μs\":.001,ms:1,s:1e3,m:6e4,h:36e5,d:864e5,w:6048e5},n=function(e){if(e instanceof n)return e;switch(typeof e){case\"number\":if(!isFinite(e))throw new Error(\"invalid duration: \"+e);this._milliseconds=e;break;case\"string\":this._milliseconds=n.parse(e).valueOf();break;case\"undefined\":this._milliseconds=0;break;default:throw new Error(\"invalid duration: \"+e)}};return n.millisecond=new n(1),n.second=new n(1e3),n.minute=new n(6e4),n.hour=new n(36e5),n.day=new n(864e5),n.week=new n(6048e5),n.prototype.nanoseconds=function(){return Math.floor(this._milliseconds/1e-6)},n.prototype.microseconds=function(){return Math.floor(this._milliseconds/.001)},n.prototype.milliseconds=function(){return this._milliseconds},n.prototype.seconds=function(){return Math.floor(this._milliseconds/1e3)},n.prototype.minutes=function(){return Math.floor(this._milliseconds/6e4)},n.prototype.hours=function(){return Math.floor(this._milliseconds/36e5)},n.prototype.days=function(){return Math.floor(this._milliseconds/864e5)},n.prototype.weeks=function(){return Math.floor(this._milliseconds/6048e5)},n.prototype.toString=function(){var e=\"\",n=Math.abs(this._milliseconds),t=this._milliseconds<0?\"-\":\"\";if(0===n)return\"0\";var r=Math.floor(n/36e5);0!==r&&(n-=36e5*r,e+=r.toString()+\"h\");var o=Math.floor(n/6e4);0!==o&&(n-=6e4*o,e+=o.toString()+\"m\");var i=Math.floor(n/1e3);return 0!==i&&(n-=1e3*i,e+=i.toString()+\"s\"),0!==n&&(e+=n.toString()+\"ms\"),t+e},n.prototype.valueOf=function(){return this._milliseconds},n.parse=function(t){if(\"0\"===t||\"+0\"===t||\"-0\"===t)return new n(0);for(var r,o,i,s=/([\\-\\+\\d\\.]+)([a-zµμ]+)/g,u=0,a=0,f=\"-\"===t[0]?-1:1;i=s.exec(t);){if(r=i[2],o=Math.abs(parseFloat(i[1])),a++,isNaN(o))throw new Error(\"invalid duration\");if(void 0===e[r])throw new Error(\"invalid unit: \"+r);u+=o*e[r]}if(0===a)throw new Error(\"invalid duration\");return new n(Math.floor(u)*f)},n.prototype.roundTo=function(e){var t=new n(e).valueOf();this._milliseconds=t*Math.round(this._milliseconds/t)},n.prototype.isGreaterThan=function(e){return this.valueOf()>new n(e).valueOf()},n.prototype.isLessThan=function(e){return this.valueOf()<new n(e).valueOf()},n.prototype.isEqualTo=function(e){return this.valueOf()===new n(e).valueOf()},n.prototype.after=function(e){return new Date(e.valueOf()+this._milliseconds)},n.since=function(e){return new n((new Date).valueOf()-e.valueOf())},n.until=function(e){return new n(e.valueOf()-(new Date).valueOf())},n.fromMicroseconds=function(e){var t=Math.floor(e/1e3);return new n(t)},n.fromNanoseconds=function(e){var t=Math.floor(e/1e6);return new n(t)},n.between=function(e,t){return new n(t.valueOf()-e.valueOf())},n.add=function(e,t){return new n(e+t)},n.subtract=function(e,t){return new n(e-t)},n.multiply=function(e,t){return new n(e*t)},n.divide=function(e,n){return e/n},n}.call(this);void 0===(r=function(){return o}.apply(n,[]))||(e.exports=r)},function(e,n,t){\"use strict\";t.r(n);var r=t(0),o=t.n(r),i={en:{now:\"Now\",seconds:\"%ds\",minutes:\"%dm\",hours:\"%dh\",days:\"MMM D\",years:\"MMM D, YYYY\"},es:{now:\"Ahora\",seconds:\"%ds\",minutes:\"%dmin\",hours:\"%dh\",days:\"D MMM.\",years:\"D MMM. YYYY\"},ru:{now:\"1 с\",seconds:\"%d с\",minutes:\"%d мин\",hours:\"%d ч\",days:\"D MMM.\",years:\"D MMM. YYYY\"},fr:{now:\"Μaintenant\",seconds:\"%ds\",minutes:\"%dm\",hours:\"%dh\",days:\"MMM D\",years:\"MMM D, YYYY\"},el:{now:\"Τώρα\",seconds:\"%dδ\",minutes:\"%dλ\",hours:\"%dω\",days:\"MMM D\",years:\"MMM D, YYYY\"}};n.default=function(e,n,t){n.prototype.twitter=function(){return function(e){var n=e.$locale(),t=n?n.name:\"en\",r=Math.abs(e.diff(new Date)),s=null,u=null;(s=r<=1e3?\"now\":r<6e4?\"seconds\":r<36e5?\"minutes\":r<864e5?\"hours\":r<31536e6?\"days\":\"years\",u&&s||!([\"seconds\",\"minutes\",\"hours\"].indexOf(s)>-1))||(u=new o.a(r)[s]());if(\"days\"===s||\"years\"===s){var a=i[t][s];return e.format(a)}return i[t][s].replace(\"%d\",u)}(this)}}}])});","!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_localizedFormat=t()}(this,(function(){\"use strict\";var e={LTS:\"h:mm:ss A\",LT:\"h:mm A\",L:\"MM/DD/YYYY\",LL:\"MMMM D, YYYY\",LLL:\"MMMM D, YYYY h:mm A\",LLLL:\"dddd, MMMM D, YYYY h:mm A\"};return function(t,o,n){var r=o.prototype,i=r.format;n.en.formats=e,r.format=function(t){void 0===t&&(t=\"YYYY-MM-DDTHH:mm:ssZ\");var o=this.$locale().formats,n=function(t,o){return t.replace(/(\\[[^\\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var i=r&&r.toUpperCase();return n||o[r]||e[r]||o[i].replace(/(\\[[^\\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,o){return t||o.slice(1)}))}))}(t,void 0===o?{}:o);return i.call(this,n)}}}));","!function(r,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(r=\"undefined\"!=typeof globalThis?globalThis:r||self).dayjs_plugin_relativeTime=e()}(this,(function(){\"use strict\";return function(r,e,t){r=r||{};var n=e.prototype,o={future:\"in %s\",past:\"%s ago\",s:\"a few seconds\",m:\"a minute\",mm:\"%d minutes\",h:\"an hour\",hh:\"%d hours\",d:\"a day\",dd:\"%d days\",M:\"a month\",MM:\"%d months\",y:\"a year\",yy:\"%d years\"};function i(r,e,t,o){return n.fromToBase(r,e,t,o)}t.en.relativeTime=o,n.fromToBase=function(e,n,i,d,u){for(var f,a,s,l=i.$locale().relativeTime||o,h=r.thresholds||[{l:\"s\",r:44,d:\"second\"},{l:\"m\",r:89},{l:\"mm\",r:44,d:\"minute\"},{l:\"h\",r:89},{l:\"hh\",r:21,d:\"hour\"},{l:\"d\",r:35},{l:\"dd\",r:25,d:\"day\"},{l:\"M\",r:45},{l:\"MM\",r:10,d:\"month\"},{l:\"y\",r:17},{l:\"yy\",d:\"year\"}],m=h.length,c=0;c<m;c+=1){var y=h[c];y.d&&(f=d?t(e).diff(i,y.d,!0):i.diff(e,y.d,!0));var p=(r.rounding||Math.round)(Math.abs(f));if(s=f>0,p<=y.r||!y.r){p<=1&&c>0&&(y=h[c-1]);var v=l[y.l];u&&(p=u(\"\"+p)),a=\"string\"==typeof v?v.replace(\"%d\",p):v(p,n,y.l,s);break}}if(n)return a;var M=s?l.future:l.past;return\"function\"==typeof M?M(a):M.replace(\"%s\",a)},n.to=function(r,e){return i(r,e,this,!0)},n.from=function(r,e){return i(r,e,this)};var d=function(r){return r.$u?t.utc():t()};n.toNow=function(r){return this.to(d(this),r)},n.fromNow=function(r){return this.from(d(this),r)}}}));","/**\n * http://ecma-international.org/ecma-402/7.0/index.html#sec-canonicalizelocalelist\n * @param locales\n */\nexport function CanonicalizeLocaleList(locales) {\n // TODO\n return Intl.getCanonicalLocales(locales);\n}\n","export var data = {\n supplemental: {\n languageMatching: {\n 'written-new': [\n {\n paradigmLocales: {\n _locales: 'en en_GB es es_419 pt_BR pt_PT',\n },\n },\n {\n $enUS: {\n _value: 'AS+CA+GU+MH+MP+PH+PR+UM+US+VI',\n },\n },\n {\n $cnsar: {\n _value: 'HK+MO',\n },\n },\n {\n $americas: {\n _value: '019',\n },\n },\n {\n $maghreb: {\n _value: 'MA+DZ+TN+LY+MR+EH',\n },\n },\n {\n no: {\n _desired: 'nb',\n _distance: '1',\n },\n },\n {\n bs: {\n _desired: 'hr',\n _distance: '4',\n },\n },\n {\n bs: {\n _desired: 'sh',\n _distance: '4',\n },\n },\n {\n hr: {\n _desired: 'sh',\n _distance: '4',\n },\n },\n {\n sr: {\n _desired: 'sh',\n _distance: '4',\n },\n },\n {\n aa: {\n _desired: 'ssy',\n _distance: '4',\n },\n },\n {\n de: {\n _desired: 'gsw',\n _distance: '4',\n _oneway: 'true',\n },\n },\n {\n de: {\n _desired: 'lb',\n _distance: '4',\n _oneway: 'true',\n },\n },\n {\n no: {\n _desired: 'da',\n _distance: '8',\n },\n },\n {\n nb: {\n _desired: 'da',\n _distance: '8',\n },\n },\n {\n ru: {\n _desired: 'ab',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n en: {\n _desired: 'ach',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n nl: {\n _desired: 'af',\n _distance: '20',\n _oneway: 'true',\n },\n },\n {\n en: {\n _desired: 'ak',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n en: {\n _desired: 'am',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n es: {\n _desired: 'ay',\n _distance: '20',\n _oneway: 'true',\n },\n },\n {\n ru: {\n _desired: 'az',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n ur: {\n _desired: 'bal',\n _distance: '20',\n _oneway: 'true',\n },\n },\n {\n ru: {\n _desired: 'be',\n _distance: '20',\n _oneway: 'true',\n },\n },\n {\n en: {\n _desired: 'bem',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n hi: {\n _desired: 'bh',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n en: {\n _desired: 'bn',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n zh: {\n _desired: 'bo',\n _distance: '20',\n _oneway: 'true',\n },\n },\n {\n fr: {\n _desired: 'br',\n _distance: '20',\n _oneway: 'true',\n },\n },\n {\n es: {\n _desired: 'ca',\n _distance: '20',\n _oneway: 'true',\n },\n },\n {\n fil: {\n _desired: 'ceb',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n en: {\n _desired: 'chr',\n _distance: '20',\n _oneway: 'true',\n },\n },\n {\n ar: {\n _desired: 'ckb',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n fr: {\n _desired: 'co',\n _distance: '20',\n _oneway: 'true',\n },\n },\n {\n fr: {\n _desired: 'crs',\n _distance: '20',\n _oneway: 'true',\n },\n },\n {\n sk: {\n _desired: 'cs',\n _distance: '20',\n },\n },\n {\n en: {\n _desired: 'cy',\n _distance: '20',\n _oneway: 'true',\n },\n },\n {\n en: {\n _desired: 'ee',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n en: {\n _desired: 'eo',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n es: {\n _desired: 'eu',\n _distance: '20',\n _oneway: 'true',\n },\n },\n {\n da: {\n _desired: 'fo',\n _distance: '20',\n _oneway: 'true',\n },\n },\n {\n nl: {\n _desired: 'fy',\n _distance: '20',\n _oneway: 'true',\n },\n },\n {\n en: {\n _desired: 'ga',\n _distance: '20',\n _oneway: 'true',\n },\n },\n {\n en: {\n _desired: 'gaa',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n en: {\n _desired: 'gd',\n _distance: '20',\n _oneway: 'true',\n },\n },\n {\n es: {\n _desired: 'gl',\n _distance: '20',\n _oneway: 'true',\n },\n },\n {\n es: {\n _desired: 'gn',\n _distance: '20',\n _oneway: 'true',\n },\n },\n {\n hi: {\n _desired: 'gu',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n en: {\n _desired: 'ha',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n en: {\n _desired: 'haw',\n _distance: '20',\n _oneway: 'true',\n },\n },\n {\n fr: {\n _desired: 'ht',\n _distance: '20',\n _oneway: 'true',\n },\n },\n {\n ru: {\n _desired: 'hy',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n en: {\n _desired: 'ia',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n en: {\n _desired: 'ig',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n en: {\n _desired: 'is',\n _distance: '20',\n _oneway: 'true',\n },\n },\n {\n id: {\n _desired: 'jv',\n _distance: '20',\n _oneway: 'true',\n },\n },\n {\n en: {\n _desired: 'ka',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n fr: {\n _desired: 'kg',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n ru: {\n _desired: 'kk',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n en: {\n _desired: 'km',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n en: {\n _desired: 'kn',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n en: {\n _desired: 'kri',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n tr: {\n _desired: 'ku',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n ru: {\n _desired: 'ky',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n it: {\n _desired: 'la',\n _distance: '20',\n _oneway: 'true',\n },\n },\n {\n en: {\n _desired: 'lg',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n fr: {\n _desired: 'ln',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n en: {\n _desired: 'lo',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n en: {\n _desired: 'loz',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n fr: {\n _desired: 'lua',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n hi: {\n _desired: 'mai',\n _distance: '20',\n _oneway: 'true',\n },\n },\n {\n en: {\n _desired: 'mfe',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n fr: {\n _desired: 'mg',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n en: {\n _desired: 'mi',\n _distance: '20',\n _oneway: 'true',\n },\n },\n {\n en: {\n _desired: 'ml',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n ru: {\n _desired: 'mn',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n hi: {\n _desired: 'mr',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n id: {\n _desired: 'ms',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n en: {\n _desired: 'mt',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n en: {\n _desired: 'my',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n en: {\n _desired: 'ne',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n nb: {\n _desired: 'nn',\n _distance: '20',\n },\n },\n {\n no: {\n _desired: 'nn',\n _distance: '20',\n },\n },\n {\n en: {\n _desired: 'nso',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n en: {\n _desired: 'ny',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n en: {\n _desired: 'nyn',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n fr: {\n _desired: 'oc',\n _distance: '20',\n _oneway: 'true',\n },\n },\n {\n en: {\n _desired: 'om',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n en: {\n _desired: 'or',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n en: {\n _desired: 'pa',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n en: {\n _desired: 'pcm',\n _distance: '20',\n _oneway: 'true',\n },\n },\n {\n en: {\n _desired: 'ps',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n es: {\n _desired: 'qu',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n de: {\n _desired: 'rm',\n _distance: '20',\n _oneway: 'true',\n },\n },\n {\n en: {\n _desired: 'rn',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n fr: {\n _desired: 'rw',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n hi: {\n _desired: 'sa',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n en: {\n _desired: 'sd',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n en: {\n _desired: 'si',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n en: {\n _desired: 'sn',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n en: {\n _desired: 'so',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n en: {\n _desired: 'sq',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n en: {\n _desired: 'st',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n id: {\n _desired: 'su',\n _distance: '20',\n _oneway: 'true',\n },\n },\n {\n en: {\n _desired: 'sw',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n en: {\n _desired: 'ta',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n en: {\n _desired: 'te',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n ru: {\n _desired: 'tg',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n en: {\n _desired: 'ti',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n ru: {\n _desired: 'tk',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n en: {\n _desired: 'tlh',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n en: {\n _desired: 'tn',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n en: {\n _desired: 'to',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n ru: {\n _desired: 'tt',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n en: {\n _desired: 'tum',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n zh: {\n _desired: 'ug',\n _distance: '20',\n _oneway: 'true',\n },\n },\n {\n ru: {\n _desired: 'uk',\n _distance: '20',\n _oneway: 'true',\n },\n },\n {\n en: {\n _desired: 'ur',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n ru: {\n _desired: 'uz',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n fr: {\n _desired: 'wo',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n en: {\n _desired: 'xh',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n en: {\n _desired: 'yi',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n en: {\n _desired: 'yo',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n zh: {\n _desired: 'za',\n _distance: '20',\n _oneway: 'true',\n },\n },\n {\n en: {\n _desired: 'zu',\n _distance: '30',\n _oneway: 'true',\n },\n },\n {\n ar: {\n _desired: 'aao',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ar: {\n _desired: 'abh',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ar: {\n _desired: 'abv',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ar: {\n _desired: 'acm',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ar: {\n _desired: 'acq',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ar: {\n _desired: 'acw',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ar: {\n _desired: 'acx',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ar: {\n _desired: 'acy',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ar: {\n _desired: 'adf',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ar: {\n _desired: 'aeb',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ar: {\n _desired: 'aec',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ar: {\n _desired: 'afb',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ar: {\n _desired: 'ajp',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ar: {\n _desired: 'apc',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ar: {\n _desired: 'apd',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ar: {\n _desired: 'arq',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ar: {\n _desired: 'ars',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ar: {\n _desired: 'ary',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ar: {\n _desired: 'arz',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ar: {\n _desired: 'auz',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ar: {\n _desired: 'avl',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ar: {\n _desired: 'ayh',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ar: {\n _desired: 'ayl',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ar: {\n _desired: 'ayn',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ar: {\n _desired: 'ayp',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ar: {\n _desired: 'bbz',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ar: {\n _desired: 'pga',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ar: {\n _desired: 'shu',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ar: {\n _desired: 'ssh',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n az: {\n _desired: 'azb',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n et: {\n _desired: 'vro',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ff: {\n _desired: 'ffm',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ff: {\n _desired: 'fub',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ff: {\n _desired: 'fue',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ff: {\n _desired: 'fuf',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ff: {\n _desired: 'fuh',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ff: {\n _desired: 'fui',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ff: {\n _desired: 'fuq',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ff: {\n _desired: 'fuv',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n gn: {\n _desired: 'gnw',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n gn: {\n _desired: 'gui',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n gn: {\n _desired: 'gun',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n gn: {\n _desired: 'nhd',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n iu: {\n _desired: 'ikt',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n kln: {\n _desired: 'enb',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n kln: {\n _desired: 'eyo',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n kln: {\n _desired: 'niq',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n kln: {\n _desired: 'oki',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n kln: {\n _desired: 'pko',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n kln: {\n _desired: 'sgc',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n kln: {\n _desired: 'tec',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n kln: {\n _desired: 'tuy',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n kok: {\n _desired: 'gom',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n kpe: {\n _desired: 'gkp',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n luy: {\n _desired: 'ida',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n luy: {\n _desired: 'lkb',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n luy: {\n _desired: 'lko',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n luy: {\n _desired: 'lks',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n luy: {\n _desired: 'lri',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n luy: {\n _desired: 'lrm',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n luy: {\n _desired: 'lsm',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n luy: {\n _desired: 'lto',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n luy: {\n _desired: 'lts',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n luy: {\n _desired: 'lwg',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n luy: {\n _desired: 'nle',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n luy: {\n _desired: 'nyd',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n luy: {\n _desired: 'rag',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n lv: {\n _desired: 'ltg',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n mg: {\n _desired: 'bhr',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n mg: {\n _desired: 'bjq',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n mg: {\n _desired: 'bmm',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n mg: {\n _desired: 'bzc',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n mg: {\n _desired: 'msh',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n mg: {\n _desired: 'skg',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n mg: {\n _desired: 'tdx',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n mg: {\n _desired: 'tkg',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n mg: {\n _desired: 'txy',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n mg: {\n _desired: 'xmv',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n mg: {\n _desired: 'xmw',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n mn: {\n _desired: 'mvf',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ms: {\n _desired: 'bjn',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ms: {\n _desired: 'btj',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ms: {\n _desired: 'bve',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ms: {\n _desired: 'bvu',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ms: {\n _desired: 'coa',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ms: {\n _desired: 'dup',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ms: {\n _desired: 'hji',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ms: {\n _desired: 'id',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ms: {\n _desired: 'jak',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ms: {\n _desired: 'jax',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ms: {\n _desired: 'kvb',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ms: {\n _desired: 'kvr',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ms: {\n _desired: 'kxd',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ms: {\n _desired: 'lce',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ms: {\n _desired: 'lcf',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ms: {\n _desired: 'liw',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ms: {\n _desired: 'max',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ms: {\n _desired: 'meo',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ms: {\n _desired: 'mfa',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ms: {\n _desired: 'mfb',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ms: {\n _desired: 'min',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ms: {\n _desired: 'mqg',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ms: {\n _desired: 'msi',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ms: {\n _desired: 'mui',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ms: {\n _desired: 'orn',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ms: {\n _desired: 'ors',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ms: {\n _desired: 'pel',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ms: {\n _desired: 'pse',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ms: {\n _desired: 'tmw',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ms: {\n _desired: 'urk',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ms: {\n _desired: 'vkk',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ms: {\n _desired: 'vkt',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ms: {\n _desired: 'xmm',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ms: {\n _desired: 'zlm',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ms: {\n _desired: 'zmi',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ne: {\n _desired: 'dty',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n om: {\n _desired: 'gax',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n om: {\n _desired: 'hae',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n om: {\n _desired: 'orc',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n or: {\n _desired: 'spv',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ps: {\n _desired: 'pbt',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n ps: {\n _desired: 'pst',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n qu: {\n _desired: 'qub',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n qu: {\n _desired: 'qud',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n qu: {\n _desired: 'quf',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n qu: {\n _desired: 'qug',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n qu: {\n _desired: 'quh',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n qu: {\n _desired: 'quk',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n qu: {\n _desired: 'qul',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n qu: {\n _desired: 'qup',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n qu: {\n _desired: 'qur',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n qu: {\n _desired: 'qus',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n qu: {\n _desired: 'quw',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n qu: {\n _desired: 'qux',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n qu: {\n _desired: 'quy',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n qu: {\n _desired: 'qva',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n qu: {\n _desired: 'qvc',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n qu: {\n _desired: 'qve',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n qu: {\n _desired: 'qvh',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n qu: {\n _desired: 'qvi',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n qu: {\n _desired: 'qvj',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n qu: {\n _desired: 'qvl',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n qu: {\n _desired: 'qvm',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n qu: {\n _desired: 'qvn',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n qu: {\n _desired: 'qvo',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n qu: {\n _desired: 'qvp',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n qu: {\n _desired: 'qvs',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n qu: {\n _desired: 'qvw',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n qu: {\n _desired: 'qvz',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n qu: {\n _desired: 'qwa',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n qu: {\n _desired: 'qwc',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n qu: {\n _desired: 'qwh',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n qu: {\n _desired: 'qws',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n qu: {\n _desired: 'qxa',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n qu: {\n _desired: 'qxc',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n qu: {\n _desired: 'qxh',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n qu: {\n _desired: 'qxl',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n qu: {\n _desired: 'qxn',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n qu: {\n _desired: 'qxo',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n qu: {\n _desired: 'qxp',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n qu: {\n _desired: 'qxr',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n qu: {\n _desired: 'qxt',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n qu: {\n _desired: 'qxu',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n qu: {\n _desired: 'qxw',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n sc: {\n _desired: 'sdc',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n sc: {\n _desired: 'sdn',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n sc: {\n _desired: 'sro',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n sq: {\n _desired: 'aae',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n sq: {\n _desired: 'aat',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n sq: {\n _desired: 'aln',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n syr: {\n _desired: 'aii',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n uz: {\n _desired: 'uzs',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n yi: {\n _desired: 'yih',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n zh: {\n _desired: 'cdo',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n zh: {\n _desired: 'cjy',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n zh: {\n _desired: 'cpx',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n zh: {\n _desired: 'czh',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n zh: {\n _desired: 'czo',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n zh: {\n _desired: 'gan',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n zh: {\n _desired: 'hak',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n zh: {\n _desired: 'hsn',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n zh: {\n _desired: 'lzh',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n zh: {\n _desired: 'mnp',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n zh: {\n _desired: 'nan',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n zh: {\n _desired: 'wuu',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n zh: {\n _desired: 'yue',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n '*': {\n _desired: '*',\n _distance: '80',\n },\n },\n {\n 'en-Latn': {\n _desired: 'am-Ethi',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n 'ru-Cyrl': {\n _desired: 'az-Latn',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n 'en-Latn': {\n _desired: 'bn-Beng',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n 'zh-Hans': {\n _desired: 'bo-Tibt',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n 'ru-Cyrl': {\n _desired: 'hy-Armn',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n 'en-Latn': {\n _desired: 'ka-Geor',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n 'en-Latn': {\n _desired: 'km-Khmr',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n 'en-Latn': {\n _desired: 'kn-Knda',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n 'en-Latn': {\n _desired: 'lo-Laoo',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n 'en-Latn': {\n _desired: 'ml-Mlym',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n 'en-Latn': {\n _desired: 'my-Mymr',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n 'en-Latn': {\n _desired: 'ne-Deva',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n 'en-Latn': {\n _desired: 'or-Orya',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n 'en-Latn': {\n _desired: 'pa-Guru',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n 'en-Latn': {\n _desired: 'ps-Arab',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n 'en-Latn': {\n _desired: 'sd-Arab',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n 'en-Latn': {\n _desired: 'si-Sinh',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n 'en-Latn': {\n _desired: 'ta-Taml',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n 'en-Latn': {\n _desired: 'te-Telu',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n 'en-Latn': {\n _desired: 'ti-Ethi',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n 'ru-Cyrl': {\n _desired: 'tk-Latn',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n 'en-Latn': {\n _desired: 'ur-Arab',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n 'ru-Cyrl': {\n _desired: 'uz-Latn',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n 'en-Latn': {\n _desired: 'yi-Hebr',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n 'sr-Cyrl': {\n _desired: 'sr-Latn',\n _distance: '5',\n },\n },\n {\n 'zh-Hans': {\n _desired: 'za-Latn',\n _distance: '10',\n _oneway: 'true',\n },\n },\n {\n 'zh-Hans': {\n _desired: 'zh-Hani',\n _distance: '20',\n _oneway: 'true',\n },\n },\n {\n 'zh-Hant': {\n _desired: 'zh-Hani',\n _distance: '20',\n _oneway: 'true',\n },\n },\n {\n 'ar-Arab': {\n _desired: 'ar-Latn',\n _distance: '20',\n _oneway: 'true',\n },\n },\n {\n 'bn-Beng': {\n _desired: 'bn-Latn',\n _distance: '20',\n _oneway: 'true',\n },\n },\n {\n 'gu-Gujr': {\n _desired: 'gu-Latn',\n _distance: '20',\n _oneway: 'true',\n },\n },\n {\n 'hi-Deva': {\n _desired: 'hi-Latn',\n _distance: '20',\n _oneway: 'true',\n },\n },\n {\n 'kn-Knda': {\n _desired: 'kn-Latn',\n _distance: '20',\n _oneway: 'true',\n },\n },\n {\n 'ml-Mlym': {\n _desired: 'ml-Latn',\n _distance: '20',\n _oneway: 'true',\n },\n },\n {\n 'mr-Deva': {\n _desired: 'mr-Latn',\n _distance: '20',\n _oneway: 'true',\n },\n },\n {\n 'ta-Taml': {\n _desired: 'ta-Latn',\n _distance: '20',\n _oneway: 'true',\n },\n },\n {\n 'te-Telu': {\n _desired: 'te-Latn',\n _distance: '20',\n _oneway: 'true',\n },\n },\n {\n 'zh-Hans': {\n _desired: 'zh-Latn',\n _distance: '20',\n _oneway: 'true',\n },\n },\n {\n 'ja-Jpan': {\n _desired: 'ja-Latn',\n _distance: '5',\n _oneway: 'true',\n },\n },\n {\n 'ja-Jpan': {\n _desired: 'ja-Hani',\n _distance: '5',\n _oneway: 'true',\n },\n },\n {\n 'ja-Jpan': {\n _desired: 'ja-Hira',\n _distance: '5',\n _oneway: 'true',\n },\n },\n {\n 'ja-Jpan': {\n _desired: 'ja-Kana',\n _distance: '5',\n _oneway: 'true',\n },\n },\n {\n 'ja-Jpan': {\n _desired: 'ja-Hrkt',\n _distance: '5',\n _oneway: 'true',\n },\n },\n {\n 'ja-Hrkt': {\n _desired: 'ja-Hira',\n _distance: '5',\n _oneway: 'true',\n },\n },\n {\n 'ja-Hrkt': {\n _desired: 'ja-Kana',\n _distance: '5',\n _oneway: 'true',\n },\n },\n {\n 'ko-Kore': {\n _desired: 'ko-Hani',\n _distance: '5',\n _oneway: 'true',\n },\n },\n {\n 'ko-Kore': {\n _desired: 'ko-Hang',\n _distance: '5',\n _oneway: 'true',\n },\n },\n {\n 'ko-Kore': {\n _desired: 'ko-Jamo',\n _distance: '5',\n _oneway: 'true',\n },\n },\n {\n 'ko-Hang': {\n _desired: 'ko-Jamo',\n _distance: '5',\n _oneway: 'true',\n },\n },\n {\n '*-*': {\n _desired: '*-*',\n _distance: '50',\n },\n },\n {\n 'ar-*-$maghreb': {\n _desired: 'ar-*-$maghreb',\n _distance: '4',\n },\n },\n {\n 'ar-*-$!maghreb': {\n _desired: 'ar-*-$!maghreb',\n _distance: '4',\n },\n },\n {\n 'ar-*-*': {\n _desired: 'ar-*-*',\n _distance: '5',\n },\n },\n {\n 'en-*-$enUS': {\n _desired: 'en-*-$enUS',\n _distance: '4',\n },\n },\n {\n 'en-*-GB': {\n _desired: 'en-*-$!enUS',\n _distance: '3',\n },\n },\n {\n 'en-*-$!enUS': {\n _desired: 'en-*-$!enUS',\n _distance: '4',\n },\n },\n {\n 'en-*-*': {\n _desired: 'en-*-*',\n _distance: '5',\n },\n },\n {\n 'es-*-$americas': {\n _desired: 'es-*-$americas',\n _distance: '4',\n },\n },\n {\n 'es-*-$!americas': {\n _desired: 'es-*-$!americas',\n _distance: '4',\n },\n },\n {\n 'es-*-*': {\n _desired: 'es-*-*',\n _distance: '5',\n },\n },\n {\n 'pt-*-$americas': {\n _desired: 'pt-*-$americas',\n _distance: '4',\n },\n },\n {\n 'pt-*-$!americas': {\n _desired: 'pt-*-$!americas',\n _distance: '4',\n },\n },\n {\n 'pt-*-*': {\n _desired: 'pt-*-*',\n _distance: '5',\n },\n },\n {\n 'zh-Hant-$cnsar': {\n _desired: 'zh-Hant-$cnsar',\n _distance: '4',\n },\n },\n {\n 'zh-Hant-$!cnsar': {\n _desired: 'zh-Hant-$!cnsar',\n _distance: '4',\n },\n },\n {\n 'zh-Hant-*': {\n _desired: 'zh-Hant-*',\n _distance: '5',\n },\n },\n {\n '*-*-*': {\n _desired: '*-*-*',\n _distance: '4',\n },\n },\n ],\n },\n },\n};\n","// This file is generated from regions-gen.ts\nexport var regions = {\n \"001\": [\n \"001\",\n \"001-status-grouping\",\n \"002\",\n \"005\",\n \"009\",\n \"011\",\n \"013\",\n \"014\",\n \"015\",\n \"017\",\n \"018\",\n \"019\",\n \"021\",\n \"029\",\n \"030\",\n \"034\",\n \"035\",\n \"039\",\n \"053\",\n \"054\",\n \"057\",\n \"061\",\n \"142\",\n \"143\",\n \"145\",\n \"150\",\n \"151\",\n \"154\",\n \"155\",\n \"AC\",\n \"AD\",\n \"AE\",\n \"AF\",\n \"AG\",\n \"AI\",\n \"AL\",\n \"AM\",\n \"AO\",\n \"AQ\",\n \"AR\",\n \"AS\",\n \"AT\",\n \"AU\",\n \"AW\",\n \"AX\",\n \"AZ\",\n \"BA\",\n \"BB\",\n \"BD\",\n \"BE\",\n \"BF\",\n \"BG\",\n \"BH\",\n \"BI\",\n \"BJ\",\n \"BL\",\n \"BM\",\n \"BN\",\n \"BO\",\n \"BQ\",\n \"BR\",\n \"BS\",\n \"BT\",\n \"BV\",\n \"BW\",\n \"BY\",\n \"BZ\",\n \"CA\",\n \"CC\",\n \"CD\",\n \"CF\",\n \"CG\",\n \"CH\",\n \"CI\",\n \"CK\",\n \"CL\",\n \"CM\",\n \"CN\",\n \"CO\",\n \"CP\",\n \"CQ\",\n \"CR\",\n \"CU\",\n \"CV\",\n \"CW\",\n \"CX\",\n \"CY\",\n \"CZ\",\n \"DE\",\n \"DG\",\n \"DJ\",\n \"DK\",\n \"DM\",\n \"DO\",\n \"DZ\",\n \"EA\",\n \"EC\",\n \"EE\",\n \"EG\",\n \"EH\",\n \"ER\",\n \"ES\",\n \"ET\",\n \"EU\",\n \"EZ\",\n \"FI\",\n \"FJ\",\n \"FK\",\n \"FM\",\n \"FO\",\n \"FR\",\n \"GA\",\n \"GB\",\n \"GD\",\n \"GE\",\n \"GF\",\n \"GG\",\n \"GH\",\n \"GI\",\n \"GL\",\n \"GM\",\n \"GN\",\n \"GP\",\n \"GQ\",\n \"GR\",\n \"GS\",\n \"GT\",\n \"GU\",\n \"GW\",\n \"GY\",\n \"HK\",\n \"HM\",\n \"HN\",\n \"HR\",\n \"HT\",\n \"HU\",\n \"IC\",\n \"ID\",\n \"IE\",\n \"IL\",\n \"IM\",\n \"IN\",\n \"IO\",\n \"IQ\",\n \"IR\",\n \"IS\",\n \"IT\",\n \"JE\",\n \"JM\",\n \"JO\",\n \"JP\",\n \"KE\",\n \"KG\",\n \"KH\",\n \"KI\",\n \"KM\",\n \"KN\",\n \"KP\",\n \"KR\",\n \"KW\",\n \"KY\",\n \"KZ\",\n \"LA\",\n \"LB\",\n \"LC\",\n \"LI\",\n \"LK\",\n \"LR\",\n \"LS\",\n \"LT\",\n \"LU\",\n \"LV\",\n \"LY\",\n \"MA\",\n \"MC\",\n \"MD\",\n \"ME\",\n \"MF\",\n \"MG\",\n \"MH\",\n \"MK\",\n \"ML\",\n \"MM\",\n \"MN\",\n \"MO\",\n \"MP\",\n \"MQ\",\n \"MR\",\n \"MS\",\n \"MT\",\n \"MU\",\n \"MV\",\n \"MW\",\n \"MX\",\n \"MY\",\n \"MZ\",\n \"NA\",\n \"NC\",\n \"NE\",\n \"NF\",\n \"NG\",\n \"NI\",\n \"NL\",\n \"NO\",\n \"NP\",\n \"NR\",\n \"NU\",\n \"NZ\",\n \"OM\",\n \"PA\",\n \"PE\",\n \"PF\",\n \"PG\",\n \"PH\",\n \"PK\",\n \"PL\",\n \"PM\",\n \"PN\",\n \"PR\",\n \"PS\",\n \"PT\",\n \"PW\",\n \"PY\",\n \"QA\",\n \"QO\",\n \"RE\",\n \"RO\",\n \"RS\",\n \"RU\",\n \"RW\",\n \"SA\",\n \"SB\",\n \"SC\",\n \"SD\",\n \"SE\",\n \"SG\",\n \"SH\",\n \"SI\",\n \"SJ\",\n \"SK\",\n \"SL\",\n \"SM\",\n \"SN\",\n \"SO\",\n \"SR\",\n \"SS\",\n \"ST\",\n \"SV\",\n \"SX\",\n \"SY\",\n \"SZ\",\n \"TA\",\n \"TC\",\n \"TD\",\n \"TF\",\n \"TG\",\n \"TH\",\n \"TJ\",\n \"TK\",\n \"TL\",\n \"TM\",\n \"TN\",\n \"TO\",\n \"TR\",\n \"TT\",\n \"TV\",\n \"TW\",\n \"TZ\",\n \"UA\",\n \"UG\",\n \"UM\",\n \"UN\",\n \"US\",\n \"UY\",\n \"UZ\",\n \"VA\",\n \"VC\",\n \"VE\",\n \"VG\",\n \"VI\",\n \"VN\",\n \"VU\",\n \"WF\",\n \"WS\",\n \"XK\",\n \"YE\",\n \"YT\",\n \"ZA\",\n \"ZM\",\n \"ZW\"\n ],\n \"002\": [\n \"002\",\n \"002-status-grouping\",\n \"011\",\n \"014\",\n \"015\",\n \"017\",\n \"018\",\n \"202\",\n \"AO\",\n \"BF\",\n \"BI\",\n \"BJ\",\n \"BW\",\n \"CD\",\n \"CF\",\n \"CG\",\n \"CI\",\n \"CM\",\n \"CV\",\n \"DJ\",\n \"DZ\",\n \"EA\",\n \"EG\",\n \"EH\",\n \"ER\",\n \"ET\",\n \"GA\",\n \"GH\",\n \"GM\",\n \"GN\",\n \"GQ\",\n \"GW\",\n \"IC\",\n \"IO\",\n \"KE\",\n \"KM\",\n \"LR\",\n \"LS\",\n \"LY\",\n \"MA\",\n \"MG\",\n \"ML\",\n \"MR\",\n \"MU\",\n \"MW\",\n \"MZ\",\n \"NA\",\n \"NE\",\n \"NG\",\n \"RE\",\n \"RW\",\n \"SC\",\n \"SD\",\n \"SH\",\n \"SL\",\n \"SN\",\n \"SO\",\n \"SS\",\n \"ST\",\n \"SZ\",\n \"TD\",\n \"TF\",\n \"TG\",\n \"TN\",\n \"TZ\",\n \"UG\",\n \"YT\",\n \"ZA\",\n \"ZM\",\n \"ZW\"\n ],\n \"003\": [\n \"003\",\n \"013\",\n \"021\",\n \"029\",\n \"AG\",\n \"AI\",\n \"AW\",\n \"BB\",\n \"BL\",\n \"BM\",\n \"BQ\",\n \"BS\",\n \"BZ\",\n \"CA\",\n \"CR\",\n \"CU\",\n \"CW\",\n \"DM\",\n \"DO\",\n \"GD\",\n \"GL\",\n \"GP\",\n \"GT\",\n \"HN\",\n \"HT\",\n \"JM\",\n \"KN\",\n \"KY\",\n \"LC\",\n \"MF\",\n \"MQ\",\n \"MS\",\n \"MX\",\n \"NI\",\n \"PA\",\n \"PM\",\n \"PR\",\n \"SV\",\n \"SX\",\n \"TC\",\n \"TT\",\n \"US\",\n \"VC\",\n \"VG\",\n \"VI\"\n ],\n \"005\": [\n \"005\",\n \"AR\",\n \"BO\",\n \"BR\",\n \"BV\",\n \"CL\",\n \"CO\",\n \"EC\",\n \"FK\",\n \"GF\",\n \"GS\",\n \"GY\",\n \"PE\",\n \"PY\",\n \"SR\",\n \"UY\",\n \"VE\"\n ],\n \"009\": [\n \"009\",\n \"053\",\n \"054\",\n \"057\",\n \"061\",\n \"AC\",\n \"AQ\",\n \"AS\",\n \"AU\",\n \"CC\",\n \"CK\",\n \"CP\",\n \"CX\",\n \"DG\",\n \"FJ\",\n \"FM\",\n \"GU\",\n \"HM\",\n \"KI\",\n \"MH\",\n \"MP\",\n \"NC\",\n \"NF\",\n \"NR\",\n \"NU\",\n \"NZ\",\n \"PF\",\n \"PG\",\n \"PN\",\n \"PW\",\n \"QO\",\n \"SB\",\n \"TA\",\n \"TK\",\n \"TO\",\n \"TV\",\n \"UM\",\n \"VU\",\n \"WF\",\n \"WS\"\n ],\n \"011\": [\n \"011\",\n \"BF\",\n \"BJ\",\n \"CI\",\n \"CV\",\n \"GH\",\n \"GM\",\n \"GN\",\n \"GW\",\n \"LR\",\n \"ML\",\n \"MR\",\n \"NE\",\n \"NG\",\n \"SH\",\n \"SL\",\n \"SN\",\n \"TG\"\n ],\n \"013\": [\n \"013\",\n \"BZ\",\n \"CR\",\n \"GT\",\n \"HN\",\n \"MX\",\n \"NI\",\n \"PA\",\n \"SV\"\n ],\n \"014\": [\n \"014\",\n \"BI\",\n \"DJ\",\n \"ER\",\n \"ET\",\n \"IO\",\n \"KE\",\n \"KM\",\n \"MG\",\n \"MU\",\n \"MW\",\n \"MZ\",\n \"RE\",\n \"RW\",\n \"SC\",\n \"SO\",\n \"SS\",\n \"TF\",\n \"TZ\",\n \"UG\",\n \"YT\",\n \"ZM\",\n \"ZW\"\n ],\n \"015\": [\n \"015\",\n \"DZ\",\n \"EA\",\n \"EG\",\n \"EH\",\n \"IC\",\n \"LY\",\n \"MA\",\n \"SD\",\n \"TN\"\n ],\n \"017\": [\n \"017\",\n \"AO\",\n \"CD\",\n \"CF\",\n \"CG\",\n \"CM\",\n \"GA\",\n \"GQ\",\n \"ST\",\n \"TD\"\n ],\n \"018\": [\n \"018\",\n \"BW\",\n \"LS\",\n \"NA\",\n \"SZ\",\n \"ZA\"\n ],\n \"019\": [\n \"003\",\n \"005\",\n \"013\",\n \"019\",\n \"019-status-grouping\",\n \"021\",\n \"029\",\n \"419\",\n \"AG\",\n \"AI\",\n \"AR\",\n \"AW\",\n \"BB\",\n \"BL\",\n \"BM\",\n \"BO\",\n \"BQ\",\n \"BR\",\n \"BS\",\n \"BV\",\n \"BZ\",\n \"CA\",\n \"CL\",\n \"CO\",\n \"CR\",\n \"CU\",\n \"CW\",\n \"DM\",\n \"DO\",\n \"EC\",\n \"FK\",\n \"GD\",\n \"GF\",\n \"GL\",\n \"GP\",\n \"GS\",\n \"GT\",\n \"GY\",\n \"HN\",\n \"HT\",\n \"JM\",\n \"KN\",\n \"KY\",\n \"LC\",\n \"MF\",\n \"MQ\",\n \"MS\",\n \"MX\",\n \"NI\",\n \"PA\",\n \"PE\",\n \"PM\",\n \"PR\",\n \"PY\",\n \"SR\",\n \"SV\",\n \"SX\",\n \"TC\",\n \"TT\",\n \"US\",\n \"UY\",\n \"VC\",\n \"VE\",\n \"VG\",\n \"VI\"\n ],\n \"021\": [\n \"021\",\n \"BM\",\n \"CA\",\n \"GL\",\n \"PM\",\n \"US\"\n ],\n \"029\": [\n \"029\",\n \"AG\",\n \"AI\",\n \"AW\",\n \"BB\",\n \"BL\",\n \"BQ\",\n \"BS\",\n \"CU\",\n \"CW\",\n \"DM\",\n \"DO\",\n \"GD\",\n \"GP\",\n \"HT\",\n \"JM\",\n \"KN\",\n \"KY\",\n \"LC\",\n \"MF\",\n \"MQ\",\n \"MS\",\n \"PR\",\n \"SX\",\n \"TC\",\n \"TT\",\n \"VC\",\n \"VG\",\n \"VI\"\n ],\n \"030\": [\n \"030\",\n \"CN\",\n \"HK\",\n \"JP\",\n \"KP\",\n \"KR\",\n \"MN\",\n \"MO\",\n \"TW\"\n ],\n \"034\": [\n \"034\",\n \"AF\",\n \"BD\",\n \"BT\",\n \"IN\",\n \"IR\",\n \"LK\",\n \"MV\",\n \"NP\",\n \"PK\"\n ],\n \"035\": [\n \"035\",\n \"BN\",\n \"ID\",\n \"KH\",\n \"LA\",\n \"MM\",\n \"MY\",\n \"PH\",\n \"SG\",\n \"TH\",\n \"TL\",\n \"VN\"\n ],\n \"039\": [\n \"039\",\n \"AD\",\n \"AL\",\n \"BA\",\n \"ES\",\n \"GI\",\n \"GR\",\n \"HR\",\n \"IT\",\n \"ME\",\n \"MK\",\n \"MT\",\n \"PT\",\n \"RS\",\n \"SI\",\n \"SM\",\n \"VA\",\n \"XK\"\n ],\n \"053\": [\n \"053\",\n \"AU\",\n \"CC\",\n \"CX\",\n \"HM\",\n \"NF\",\n \"NZ\"\n ],\n \"054\": [\n \"054\",\n \"FJ\",\n \"NC\",\n \"PG\",\n \"SB\",\n \"VU\"\n ],\n \"057\": [\n \"057\",\n \"FM\",\n \"GU\",\n \"KI\",\n \"MH\",\n \"MP\",\n \"NR\",\n \"PW\",\n \"UM\"\n ],\n \"061\": [\n \"061\",\n \"AS\",\n \"CK\",\n \"NU\",\n \"PF\",\n \"PN\",\n \"TK\",\n \"TO\",\n \"TV\",\n \"WF\",\n \"WS\"\n ],\n \"142\": [\n \"030\",\n \"034\",\n \"035\",\n \"142\",\n \"143\",\n \"145\",\n \"AE\",\n \"AF\",\n \"AM\",\n \"AZ\",\n \"BD\",\n \"BH\",\n \"BN\",\n \"BT\",\n \"CN\",\n \"CY\",\n \"GE\",\n \"HK\",\n \"ID\",\n \"IL\",\n \"IN\",\n \"IQ\",\n \"IR\",\n \"JO\",\n \"JP\",\n \"KG\",\n \"KH\",\n \"KP\",\n \"KR\",\n \"KW\",\n \"KZ\",\n \"LA\",\n \"LB\",\n \"LK\",\n \"MM\",\n \"MN\",\n \"MO\",\n \"MV\",\n \"MY\",\n \"NP\",\n \"OM\",\n \"PH\",\n \"PK\",\n \"PS\",\n \"QA\",\n \"SA\",\n \"SG\",\n \"SY\",\n \"TH\",\n \"TJ\",\n \"TL\",\n \"TM\",\n \"TR\",\n \"TW\",\n \"UZ\",\n \"VN\",\n \"YE\"\n ],\n \"143\": [\n \"143\",\n \"KG\",\n \"KZ\",\n \"TJ\",\n \"TM\",\n \"UZ\"\n ],\n \"145\": [\n \"145\",\n \"AE\",\n \"AM\",\n \"AZ\",\n \"BH\",\n \"CY\",\n \"GE\",\n \"IL\",\n \"IQ\",\n \"JO\",\n \"KW\",\n \"LB\",\n \"OM\",\n \"PS\",\n \"QA\",\n \"SA\",\n \"SY\",\n \"TR\",\n \"YE\"\n ],\n \"150\": [\n \"039\",\n \"150\",\n \"151\",\n \"154\",\n \"155\",\n \"AD\",\n \"AL\",\n \"AT\",\n \"AX\",\n \"BA\",\n \"BE\",\n \"BG\",\n \"BY\",\n \"CH\",\n \"CQ\",\n \"CZ\",\n \"DE\",\n \"DK\",\n \"EE\",\n \"ES\",\n \"FI\",\n \"FO\",\n \"FR\",\n \"GB\",\n \"GG\",\n \"GI\",\n \"GR\",\n \"HR\",\n \"HU\",\n \"IE\",\n \"IM\",\n \"IS\",\n \"IT\",\n \"JE\",\n \"LI\",\n \"LT\",\n \"LU\",\n \"LV\",\n \"MC\",\n \"MD\",\n \"ME\",\n \"MK\",\n \"MT\",\n \"NL\",\n \"NO\",\n \"PL\",\n \"PT\",\n \"RO\",\n \"RS\",\n \"RU\",\n \"SE\",\n \"SI\",\n \"SJ\",\n \"SK\",\n \"SM\",\n \"UA\",\n \"VA\",\n \"XK\"\n ],\n \"151\": [\n \"151\",\n \"BG\",\n \"BY\",\n \"CZ\",\n \"HU\",\n \"MD\",\n \"PL\",\n \"RO\",\n \"RU\",\n \"SK\",\n \"UA\"\n ],\n \"154\": [\n \"154\",\n \"AX\",\n \"CQ\",\n \"DK\",\n \"EE\",\n \"FI\",\n \"FO\",\n \"GB\",\n \"GG\",\n \"IE\",\n \"IM\",\n \"IS\",\n \"JE\",\n \"LT\",\n \"LV\",\n \"NO\",\n \"SE\",\n \"SJ\"\n ],\n \"155\": [\n \"155\",\n \"AT\",\n \"BE\",\n \"CH\",\n \"DE\",\n \"FR\",\n \"LI\",\n \"LU\",\n \"MC\",\n \"NL\"\n ],\n \"202\": [\n \"011\",\n \"014\",\n \"017\",\n \"018\",\n \"202\",\n \"AO\",\n \"BF\",\n \"BI\",\n \"BJ\",\n \"BW\",\n \"CD\",\n \"CF\",\n \"CG\",\n \"CI\",\n \"CM\",\n \"CV\",\n \"DJ\",\n \"ER\",\n \"ET\",\n \"GA\",\n \"GH\",\n \"GM\",\n \"GN\",\n \"GQ\",\n \"GW\",\n \"IO\",\n \"KE\",\n \"KM\",\n \"LR\",\n \"LS\",\n \"MG\",\n \"ML\",\n \"MR\",\n \"MU\",\n \"MW\",\n \"MZ\",\n \"NA\",\n \"NE\",\n \"NG\",\n \"RE\",\n \"RW\",\n \"SC\",\n \"SH\",\n \"SL\",\n \"SN\",\n \"SO\",\n \"SS\",\n \"ST\",\n \"SZ\",\n \"TD\",\n \"TF\",\n \"TG\",\n \"TZ\",\n \"UG\",\n \"YT\",\n \"ZA\",\n \"ZM\",\n \"ZW\"\n ],\n \"419\": [\n \"005\",\n \"013\",\n \"029\",\n \"419\",\n \"AG\",\n \"AI\",\n \"AR\",\n \"AW\",\n \"BB\",\n \"BL\",\n \"BO\",\n \"BQ\",\n \"BR\",\n \"BS\",\n \"BV\",\n \"BZ\",\n \"CL\",\n \"CO\",\n \"CR\",\n \"CU\",\n \"CW\",\n \"DM\",\n \"DO\",\n \"EC\",\n \"FK\",\n \"GD\",\n \"GF\",\n \"GP\",\n \"GS\",\n \"GT\",\n \"GY\",\n \"HN\",\n \"HT\",\n \"JM\",\n \"KN\",\n \"KY\",\n \"LC\",\n \"MF\",\n \"MQ\",\n \"MS\",\n \"MX\",\n \"NI\",\n \"PA\",\n \"PE\",\n \"PR\",\n \"PY\",\n \"SR\",\n \"SV\",\n \"SX\",\n \"TC\",\n \"TT\",\n \"UY\",\n \"VC\",\n \"VE\",\n \"VG\",\n \"VI\"\n ],\n \"EU\": [\n \"AT\",\n \"BE\",\n \"BG\",\n \"CY\",\n \"CZ\",\n \"DE\",\n \"DK\",\n \"EE\",\n \"ES\",\n \"EU\",\n \"FI\",\n \"FR\",\n \"GR\",\n \"HR\",\n \"HU\",\n \"IE\",\n \"IT\",\n \"LT\",\n \"LU\",\n \"LV\",\n \"MT\",\n \"NL\",\n \"PL\",\n \"PT\",\n \"RO\",\n \"SE\",\n \"SI\",\n \"SK\"\n ],\n \"EZ\": [\n \"AT\",\n \"BE\",\n \"CY\",\n \"DE\",\n \"EE\",\n \"ES\",\n \"EZ\",\n \"FI\",\n \"FR\",\n \"GR\",\n \"IE\",\n \"IT\",\n \"LT\",\n \"LU\",\n \"LV\",\n \"MT\",\n \"NL\",\n \"PT\",\n \"SI\",\n \"SK\"\n ],\n \"QO\": [\n \"AC\",\n \"AQ\",\n \"CP\",\n \"DG\",\n \"QO\",\n \"TA\"\n ],\n \"UN\": [\n \"AD\",\n \"AE\",\n \"AF\",\n \"AG\",\n \"AL\",\n \"AM\",\n \"AO\",\n \"AR\",\n \"AT\",\n \"AU\",\n \"AZ\",\n \"BA\",\n \"BB\",\n \"BD\",\n \"BE\",\n \"BF\",\n \"BG\",\n \"BH\",\n \"BI\",\n \"BJ\",\n \"BN\",\n \"BO\",\n \"BR\",\n \"BS\",\n \"BT\",\n \"BW\",\n \"BY\",\n \"BZ\",\n \"CA\",\n \"CD\",\n \"CF\",\n \"CG\",\n \"CH\",\n \"CI\",\n \"CL\",\n \"CM\",\n \"CN\",\n \"CO\",\n \"CR\",\n \"CU\",\n \"CV\",\n \"CY\",\n \"CZ\",\n \"DE\",\n \"DJ\",\n \"DK\",\n \"DM\",\n \"DO\",\n \"DZ\",\n \"EC\",\n \"EE\",\n \"EG\",\n \"ER\",\n \"ES\",\n \"ET\",\n \"FI\",\n \"FJ\",\n \"FM\",\n \"FR\",\n \"GA\",\n \"GB\",\n \"GD\",\n \"GE\",\n \"GH\",\n \"GM\",\n \"GN\",\n \"GQ\",\n \"GR\",\n \"GT\",\n \"GW\",\n \"GY\",\n \"HN\",\n \"HR\",\n \"HT\",\n \"HU\",\n \"ID\",\n \"IE\",\n \"IL\",\n \"IN\",\n \"IQ\",\n \"IR\",\n \"IS\",\n \"IT\",\n \"JM\",\n \"JO\",\n \"JP\",\n \"KE\",\n \"KG\",\n \"KH\",\n \"KI\",\n \"KM\",\n \"KN\",\n \"KP\",\n \"KR\",\n \"KW\",\n \"KZ\",\n \"LA\",\n \"LB\",\n \"LC\",\n \"LI\",\n \"LK\",\n \"LR\",\n \"LS\",\n \"LT\",\n \"LU\",\n \"LV\",\n \"LY\",\n \"MA\",\n \"MC\",\n \"MD\",\n \"ME\",\n \"MG\",\n \"MH\",\n \"MK\",\n \"ML\",\n \"MM\",\n \"MN\",\n \"MR\",\n \"MT\",\n \"MU\",\n \"MV\",\n \"MW\",\n \"MX\",\n \"MY\",\n \"MZ\",\n \"NA\",\n \"NE\",\n \"NG\",\n \"NI\",\n \"NL\",\n \"NO\",\n \"NP\",\n \"NR\",\n \"NZ\",\n \"OM\",\n \"PA\",\n \"PE\",\n \"PG\",\n \"PH\",\n \"PK\",\n \"PL\",\n \"PT\",\n \"PW\",\n \"PY\",\n \"QA\",\n \"RO\",\n \"RS\",\n \"RU\",\n \"RW\",\n \"SA\",\n \"SB\",\n \"SC\",\n \"SD\",\n \"SE\",\n \"SG\",\n \"SI\",\n \"SK\",\n \"SL\",\n \"SM\",\n \"SN\",\n \"SO\",\n \"SR\",\n \"SS\",\n \"ST\",\n \"SV\",\n \"SY\",\n \"SZ\",\n \"TD\",\n \"TG\",\n \"TH\",\n \"TJ\",\n \"TL\",\n \"TM\",\n \"TN\",\n \"TO\",\n \"TR\",\n \"TT\",\n \"TV\",\n \"TZ\",\n \"UA\",\n \"UG\",\n \"UN\",\n \"US\",\n \"UY\",\n \"UZ\",\n \"VC\",\n \"VE\",\n \"VN\",\n \"VU\",\n \"WS\",\n \"YE\",\n \"ZA\",\n \"ZM\",\n \"ZW\"\n ]\n};\n","import { __spreadArray } from \"tslib\";\nimport { data as jsonData } from './languageMatching';\nimport { regions } from './regions.generated';\nexport var UNICODE_EXTENSION_SEQUENCE_REGEX = /-u(?:-[0-9a-z]{2,8})+/gi;\nexport function invariant(condition, message, Err) {\n if (Err === void 0) { Err = Error; }\n if (!condition) {\n throw new Err(message);\n }\n}\n// This is effectively 2 languages in 2 different regions not even in the same cluster\nvar DEFAULT_MATCHING_THRESHOLD = 840;\nvar PROCESSED_DATA;\nfunction processData() {\n var _a, _b;\n if (!PROCESSED_DATA) {\n var paradigmLocales = (_b = (_a = jsonData.supplemental.languageMatching['written-new'][0]) === null || _a === void 0 ? void 0 : _a.paradigmLocales) === null || _b === void 0 ? void 0 : _b._locales.split(' ');\n var matchVariables = jsonData.supplemental.languageMatching['written-new'].slice(1, 5);\n var data = jsonData.supplemental.languageMatching['written-new'].slice(5);\n var matches = data.map(function (d) {\n var key = Object.keys(d)[0];\n var value = d[key];\n return {\n supported: key,\n desired: value._desired,\n distance: +value._distance,\n oneway: value.oneway === 'true' ? true : false,\n };\n }, {});\n PROCESSED_DATA = {\n matches: matches,\n matchVariables: matchVariables.reduce(function (all, d) {\n var key = Object.keys(d)[0];\n var value = d[key];\n all[key.slice(1)] = value._value.split('+');\n return all;\n }, {}),\n paradigmLocales: __spreadArray(__spreadArray([], paradigmLocales, true), paradigmLocales.map(function (l) {\n return new Intl.Locale(l.replace(/_/g, '-')).maximize().toString();\n }), true),\n };\n }\n return PROCESSED_DATA;\n}\nfunction isMatched(locale, languageMatchInfoLocale, matchVariables) {\n var _a = languageMatchInfoLocale.split('-'), language = _a[0], script = _a[1], region = _a[2];\n var matches = true;\n if (region && region[0] === '$') {\n var shouldInclude = region[1] !== '!';\n var matchRegions = shouldInclude\n ? matchVariables[region.slice(1)]\n : matchVariables[region.slice(2)];\n var expandedMatchedRegions = matchRegions\n .map(function (r) { return regions[r] || [r]; })\n .reduce(function (all, list) { return __spreadArray(__spreadArray([], all, true), list, true); }, []);\n matches && (matches = !(expandedMatchedRegions.indexOf(locale.region || '') > 1 !=\n shouldInclude));\n }\n else {\n matches && (matches = locale.region\n ? region === '*' || region === locale.region\n : true);\n }\n matches && (matches = locale.script ? script === '*' || script === locale.script : true);\n matches && (matches = locale.language\n ? language === '*' || language === locale.language\n : true);\n return matches;\n}\nfunction serializeLSR(lsr) {\n return [lsr.language, lsr.script, lsr.region].filter(Boolean).join('-');\n}\nfunction findMatchingDistanceForLSR(desired, supported, data) {\n for (var _i = 0, _a = data.matches; _i < _a.length; _i++) {\n var d = _a[_i];\n var matches = isMatched(desired, d.desired, data.matchVariables) &&\n isMatched(supported, d.supported, data.matchVariables);\n if (!d.oneway && !matches) {\n matches =\n isMatched(desired, d.supported, data.matchVariables) &&\n isMatched(supported, d.desired, data.matchVariables);\n }\n if (matches) {\n var distance = d.distance * 10;\n if (data.paradigmLocales.indexOf(serializeLSR(desired)) > -1 !=\n data.paradigmLocales.indexOf(serializeLSR(supported)) > -1) {\n return distance - 1;\n }\n return distance;\n }\n }\n throw new Error('No matching distance found');\n}\nexport function findMatchingDistance(desired, supported) {\n var desiredLocale = new Intl.Locale(desired).maximize();\n var supportedLocale = new Intl.Locale(supported).maximize();\n var desiredLSR = {\n language: desiredLocale.language,\n script: desiredLocale.script || '',\n region: desiredLocale.region || '',\n };\n var supportedLSR = {\n language: supportedLocale.language,\n script: supportedLocale.script || '',\n region: supportedLocale.region || '',\n };\n var matchingDistance = 0;\n var data = processData();\n if (desiredLSR.language !== supportedLSR.language) {\n matchingDistance += findMatchingDistanceForLSR({\n language: desiredLocale.language,\n script: '',\n region: '',\n }, {\n language: supportedLocale.language,\n script: '',\n region: '',\n }, data);\n }\n if (desiredLSR.script !== supportedLSR.script) {\n matchingDistance += findMatchingDistanceForLSR({\n language: desiredLocale.language,\n script: desiredLSR.script,\n region: '',\n }, {\n language: supportedLocale.language,\n script: desiredLSR.script,\n region: '',\n }, data);\n }\n if (desiredLSR.region !== supportedLSR.region) {\n matchingDistance += findMatchingDistanceForLSR(desiredLSR, supportedLSR, data);\n }\n return matchingDistance;\n}\nexport function findBestMatch(requestedLocales, supportedLocales, threshold) {\n if (threshold === void 0) { threshold = DEFAULT_MATCHING_THRESHOLD; }\n var lowestDistance = Infinity;\n var result = {\n matchedDesiredLocale: '',\n distances: {},\n };\n requestedLocales.forEach(function (desired, i) {\n if (!result.distances[desired]) {\n result.distances[desired] = {};\n }\n supportedLocales.forEach(function (supported, j) {\n // Add some weight to the distance based on the order of the supported locales\n // Add penalty for the order of the requested locales\n var distance = findMatchingDistance(desired, supported) + j + i * 40;\n result.distances[desired][supported] = distance;\n if (distance < lowestDistance) {\n lowestDistance = distance;\n result.matchedDesiredLocale = desired;\n result.matchedSupportedLocale = supported;\n }\n });\n });\n if (lowestDistance >= threshold) {\n result.matchedDesiredLocale = undefined;\n result.matchedSupportedLocale = undefined;\n }\n return result;\n}\n","import { UNICODE_EXTENSION_SEQUENCE_REGEX, findBestMatch } from './utils';\n/**\n * https://tc39.es/ecma402/#sec-bestfitmatcher\n * @param availableLocales\n * @param requestedLocales\n * @param getDefaultLocale\n */\nexport function BestFitMatcher(availableLocales, requestedLocales, getDefaultLocale) {\n var foundLocale;\n var extension;\n var noExtensionLocales = [];\n var noExtensionLocaleMap = requestedLocales.reduce(function (all, l) {\n var noExtensionLocale = l.replace(UNICODE_EXTENSION_SEQUENCE_REGEX, '');\n noExtensionLocales.push(noExtensionLocale);\n all[noExtensionLocale] = l;\n return all;\n }, {});\n var result = findBestMatch(noExtensionLocales, availableLocales);\n if (result.matchedSupportedLocale && result.matchedDesiredLocale) {\n foundLocale = result.matchedSupportedLocale;\n extension =\n noExtensionLocaleMap[result.matchedDesiredLocale].slice(result.matchedDesiredLocale.length) || undefined;\n }\n if (!foundLocale) {\n return { locale: getDefaultLocale() };\n }\n return {\n locale: foundLocale,\n extension: extension,\n };\n}\n","/**\n * https://tc39.es/ecma402/#sec-bestavailablelocale\n * @param availableLocales\n * @param locale\n */\nexport function BestAvailableLocale(availableLocales, locale) {\n var candidate = locale;\n while (true) {\n if (availableLocales.indexOf(candidate) > -1) {\n return candidate;\n }\n var pos = candidate.lastIndexOf('-');\n if (!~pos) {\n return undefined;\n }\n if (pos >= 2 && candidate[pos - 2] === '-') {\n pos -= 2;\n }\n candidate = candidate.slice(0, pos);\n }\n}\n","import { BestAvailableLocale } from './BestAvailableLocale';\nimport { UNICODE_EXTENSION_SEQUENCE_REGEX } from './utils';\n/**\n * https://tc39.es/ecma402/#sec-lookupmatcher\n * @param availableLocales\n * @param requestedLocales\n * @param getDefaultLocale\n */\nexport function LookupMatcher(availableLocales, requestedLocales, getDefaultLocale) {\n var result = { locale: '' };\n for (var _i = 0, requestedLocales_1 = requestedLocales; _i < requestedLocales_1.length; _i++) {\n var locale = requestedLocales_1[_i];\n var noExtensionLocale = locale.replace(UNICODE_EXTENSION_SEQUENCE_REGEX, '');\n var availableLocale = BestAvailableLocale(availableLocales, noExtensionLocale);\n if (availableLocale) {\n result.locale = availableLocale;\n if (locale !== noExtensionLocale) {\n result.extension = locale.slice(noExtensionLocale.length, locale.length);\n }\n return result;\n }\n }\n result.locale = getDefaultLocale();\n return result;\n}\n","import { invariant } from './utils';\n/**\n * https://tc39.es/ecma402/#sec-unicodeextensionvalue\n * @param extension\n * @param key\n */\nexport function UnicodeExtensionValue(extension, key) {\n invariant(key.length === 2, 'key must have 2 elements');\n var size = extension.length;\n var searchValue = \"-\".concat(key, \"-\");\n var pos = extension.indexOf(searchValue);\n if (pos !== -1) {\n var start = pos + 4;\n var end = start;\n var k = start;\n var done = false;\n while (!done) {\n var e = extension.indexOf('-', k);\n var len = void 0;\n if (e === -1) {\n len = size - k;\n }\n else {\n len = e - k;\n }\n if (len === 2) {\n done = true;\n }\n else if (e === -1) {\n end = size;\n done = true;\n }\n else {\n end = e;\n k = e + 1;\n }\n }\n return extension.slice(start, end);\n }\n searchValue = \"-\".concat(key);\n pos = extension.indexOf(searchValue);\n if (pos !== -1 && pos + 3 === size) {\n return '';\n }\n return undefined;\n}\n","import { BestFitMatcher } from './BestFitMatcher';\nimport { LookupMatcher } from './LookupMatcher';\nimport { UnicodeExtensionValue } from './UnicodeExtensionValue';\nimport { invariant } from './utils';\n/**\n * https://tc39.es/ecma402/#sec-resolvelocale\n */\nexport function ResolveLocale(availableLocales, requestedLocales, options, relevantExtensionKeys, localeData, getDefaultLocale) {\n var matcher = options.localeMatcher;\n var r;\n if (matcher === 'lookup') {\n r = LookupMatcher(Array.from(availableLocales), requestedLocales, getDefaultLocale);\n }\n else {\n r = BestFitMatcher(Array.from(availableLocales), requestedLocales, getDefaultLocale);\n }\n var foundLocale = r.locale;\n var result = { locale: '', dataLocale: foundLocale };\n var supportedExtension = '-u';\n for (var _i = 0, relevantExtensionKeys_1 = relevantExtensionKeys; _i < relevantExtensionKeys_1.length; _i++) {\n var key = relevantExtensionKeys_1[_i];\n invariant(foundLocale in localeData, \"Missing locale data for \".concat(foundLocale));\n var foundLocaleData = localeData[foundLocale];\n invariant(typeof foundLocaleData === 'object' && foundLocaleData !== null, \"locale data \".concat(key, \" must be an object\"));\n var keyLocaleData = foundLocaleData[key];\n invariant(Array.isArray(keyLocaleData), \"keyLocaleData for \".concat(key, \" must be an array\"));\n var value = keyLocaleData[0];\n invariant(typeof value === 'string' || value === null, \"value must be string or null but got \".concat(typeof value, \" in key \").concat(key));\n var supportedExtensionAddition = '';\n if (r.extension) {\n var requestedValue = UnicodeExtensionValue(r.extension, key);\n if (requestedValue !== undefined) {\n if (requestedValue !== '') {\n if (~keyLocaleData.indexOf(requestedValue)) {\n value = requestedValue;\n supportedExtensionAddition = \"-\".concat(key, \"-\").concat(value);\n }\n }\n else if (~requestedValue.indexOf('true')) {\n value = 'true';\n supportedExtensionAddition = \"-\".concat(key);\n }\n }\n }\n if (key in options) {\n var optionsValue = options[key];\n invariant(typeof optionsValue === 'string' ||\n typeof optionsValue === 'undefined' ||\n optionsValue === null, 'optionsValue must be String, Undefined or Null');\n if (~keyLocaleData.indexOf(optionsValue)) {\n if (optionsValue !== value) {\n value = optionsValue;\n supportedExtensionAddition = '';\n }\n }\n }\n result[key] = value;\n supportedExtension += supportedExtensionAddition;\n }\n if (supportedExtension.length > 2) {\n var privateIndex = foundLocale.indexOf('-x-');\n if (privateIndex === -1) {\n foundLocale = foundLocale + supportedExtension;\n }\n else {\n var preExtension = foundLocale.slice(0, privateIndex);\n var postExtension = foundLocale.slice(privateIndex, foundLocale.length);\n foundLocale = preExtension + supportedExtension + postExtension;\n }\n foundLocale = Intl.getCanonicalLocales(foundLocale)[0];\n }\n result.locale = foundLocale;\n return result;\n}\n","import { CanonicalizeLocaleList } from './abstract/CanonicalizeLocaleList';\nimport { ResolveLocale } from './abstract/ResolveLocale';\nexport function match(requestedLocales, availableLocales, defaultLocale, opts) {\n return ResolveLocale(availableLocales, CanonicalizeLocaleList(requestedLocales), {\n localeMatcher: (opts === null || opts === void 0 ? void 0 : opts.algorithm) || 'best fit',\n }, [], {}, function () { return defaultLocale; }).locale;\n}\nexport { LookupSupportedLocales } from './abstract/LookupSupportedLocales';\nexport { ResolveLocale } from './abstract/ResolveLocale';\n","export const semver = /^[v^~<>=]*?(\\d+)(?:\\.([x*]|\\d+)(?:\\.([x*]|\\d+)(?:\\.([x*]|\\d+))?(?:-([\\da-z\\-]+(?:\\.[\\da-z\\-]+)*))?(?:\\+[\\da-z\\-]+(?:\\.[\\da-z\\-]+)*)?)?)?$/i;\nexport const validateAndParse = (version) => {\n if (typeof version !== 'string') {\n throw new TypeError('Invalid argument expected string');\n }\n const match = version.match(semver);\n if (!match) {\n throw new Error(`Invalid argument not valid semver ('${version}' received)`);\n }\n match.shift();\n return match;\n};\nconst isWildcard = (s) => s === '*' || s === 'x' || s === 'X';\nconst tryParse = (v) => {\n const n = parseInt(v, 10);\n return isNaN(n) ? v : n;\n};\nconst forceType = (a, b) => typeof a !== typeof b ? [String(a), String(b)] : [a, b];\nconst compareStrings = (a, b) => {\n if (isWildcard(a) || isWildcard(b))\n return 0;\n const [ap, bp] = forceType(tryParse(a), tryParse(b));\n if (ap > bp)\n return 1;\n if (ap < bp)\n return -1;\n return 0;\n};\nexport const compareSegments = (a, b) => {\n for (let i = 0; i < Math.max(a.length, b.length); i++) {\n const r = compareStrings(a[i] || '0', b[i] || '0');\n if (r !== 0)\n return r;\n }\n return 0;\n};\n//# sourceMappingURL=utils.js.map","import { compareSegments, validateAndParse } from './utils';\n/**\n * Compare [semver](https://semver.org/) version strings to find greater, equal or lesser.\n * This library supports the full semver specification, including comparing versions with different number of digits like `1.0.0`, `1.0`, `1`, and pre-release versions like `1.0.0-alpha`.\n * @param v1 - First version to compare\n * @param v2 - Second version to compare\n * @returns Numeric value compatible with the [Array.sort(fn) interface](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#Parameters).\n */\nexport const compareVersions = (v1, v2) => {\n // validate input and split into segments\n const n1 = validateAndParse(v1);\n const n2 = validateAndParse(v2);\n // pop off the patch\n const p1 = n1.pop();\n const p2 = n2.pop();\n // validate numbers\n const r = compareSegments(n1, n2);\n if (r !== 0)\n return r;\n // validate pre-release\n if (p1 && p2) {\n return compareSegments(p1.split('.'), p2.split('.'));\n }\n else if (p1 || p2) {\n return p1 ? -1 : 1;\n }\n return 0;\n};\n//# sourceMappingURL=compareVersions.js.map","import { compareVersions } from './compareVersions';\n/**\n * Compare [semver](https://semver.org/) version strings using the specified operator.\n *\n * @param v1 First version to compare\n * @param v2 Second version to compare\n * @param operator Allowed arithmetic operator to use\n * @returns `true` if the comparison between the firstVersion and the secondVersion satisfies the operator, `false` otherwise.\n *\n * @example\n * ```\n * compare('10.1.8', '10.0.4', '>'); // return true\n * compare('10.0.1', '10.0.1', '='); // return true\n * compare('10.1.1', '10.2.2', '<'); // return true\n * compare('10.1.1', '10.2.2', '<='); // return true\n * compare('10.1.1', '10.2.2', '>='); // return false\n * ```\n */\nexport const compare = (v1, v2, operator) => {\n // validate input operator\n assertValidOperator(operator);\n // since result of compareVersions can only be -1 or 0 or 1\n // a simple map can be used to replace switch\n const res = compareVersions(v1, v2);\n return operatorResMap[operator].includes(res);\n};\nconst operatorResMap = {\n '>': [1],\n '>=': [0, 1],\n '=': [0],\n '<=': [-1, 0],\n '<': [-1],\n '!=': [-1, 1],\n};\nconst allowedOperators = Object.keys(operatorResMap);\nconst assertValidOperator = (op) => {\n if (typeof op !== 'string') {\n throw new TypeError(`Invalid operator type, expected string but got ${typeof op}`);\n }\n if (allowedOperators.indexOf(op) === -1) {\n throw new Error(`Invalid operator, expected one of ${allowedOperators.join('|')}`);\n }\n};\n//# sourceMappingURL=compare.js.map","import { compare } from './compare';\nimport { compareSegments, validateAndParse } from './utils';\n/**\n * Match [npm semver](https://docs.npmjs.com/cli/v6/using-npm/semver) version range.\n *\n * @param version Version number to match\n * @param range Range pattern for version\n * @returns `true` if the version number is within the range, `false` otherwise.\n *\n * @example\n * ```\n * satisfies('1.1.0', '^1.0.0'); // return true\n * satisfies('1.1.0', '~1.0.0'); // return false\n * ```\n */\nexport const satisfies = (version, range) => {\n // clean input\n range = range.replace(/([><=]+)\\s+/g, '$1');\n // handle multiple comparators\n if (range.includes('||')) {\n return range.split('||').some((r) => satisfies(version, r));\n }\n else if (range.includes(' - ')) {\n const [a, b] = range.split(' - ', 2);\n return satisfies(version, `>=${a} <=${b}`);\n }\n else if (range.includes(' ')) {\n return range\n .trim()\n .replace(/\\s{2,}/g, ' ')\n .split(' ')\n .every((r) => satisfies(version, r));\n }\n // if no range operator then \"=\"\n const m = range.match(/^([<>=~^]+)/);\n const op = m ? m[1] : '=';\n // if gt/lt/eq then operator compare\n if (op !== '^' && op !== '~')\n return compare(version, range, op);\n // else range of either \"~\" or \"^\" is assumed\n const [v1, v2, v3, , vp] = validateAndParse(version);\n const [r1, r2, r3, , rp] = validateAndParse(range);\n const v = [v1, v2, v3];\n const r = [r1, r2 !== null && r2 !== void 0 ? r2 : 'x', r3 !== null && r3 !== void 0 ? r3 : 'x'];\n // validate pre-release\n if (rp) {\n if (!vp)\n return false;\n if (compareSegments(v, r) !== 0)\n return false;\n if (compareSegments(vp.split('.'), rp.split('.')) === -1)\n return false;\n }\n // first non-zero number\n const nonZero = r.findIndex((v) => v !== '0') + 1;\n // pointer to where segments can be >=\n const i = op === '~' ? 2 : nonZero > 1 ? nonZero : 1;\n // before pointer must be equal\n if (compareSegments(v.slice(0, i), r.slice(0, i)) !== 0)\n return false;\n // after pointer must be >=\n if (compareSegments(v.slice(i), r.slice(i)) === -1)\n return false;\n return true;\n};\n//# sourceMappingURL=satisfies.js.map","function RetryOperation(timeouts, options) {\n // Compatibility for the old (timeouts, retryForever) signature\n if (typeof options === 'boolean') {\n options = { forever: options };\n }\n\n this._originalTimeouts = JSON.parse(JSON.stringify(timeouts));\n this._timeouts = timeouts;\n this._options = options || {};\n this._maxRetryTime = options && options.maxRetryTime || Infinity;\n this._fn = null;\n this._errors = [];\n this._attempts = 1;\n this._operationTimeout = null;\n this._operationTimeoutCb = null;\n this._timeout = null;\n this._operationStart = null;\n this._timer = null;\n\n if (this._options.forever) {\n this._cachedTimeouts = this._timeouts.slice(0);\n }\n}\nmodule.exports = RetryOperation;\n\nRetryOperation.prototype.reset = function() {\n this._attempts = 1;\n this._timeouts = this._originalTimeouts.slice(0);\n}\n\nRetryOperation.prototype.stop = function() {\n if (this._timeout) {\n clearTimeout(this._timeout);\n }\n if (this._timer) {\n clearTimeout(this._timer);\n }\n\n this._timeouts = [];\n this._cachedTimeouts = null;\n};\n\nRetryOperation.prototype.retry = function(err) {\n if (this._timeout) {\n clearTimeout(this._timeout);\n }\n\n if (!err) {\n return false;\n }\n var currentTime = new Date().getTime();\n if (err && currentTime - this._operationStart >= this._maxRetryTime) {\n this._errors.push(err);\n this._errors.unshift(new Error('RetryOperation timeout occurred'));\n return false;\n }\n\n this._errors.push(err);\n\n var timeout = this._timeouts.shift();\n if (timeout === undefined) {\n if (this._cachedTimeouts) {\n // retry forever, only keep last error\n this._errors.splice(0, this._errors.length - 1);\n timeout = this._cachedTimeouts.slice(-1);\n } else {\n return false;\n }\n }\n\n var self = this;\n this._timer = setTimeout(function() {\n self._attempts++;\n\n if (self._operationTimeoutCb) {\n self._timeout = setTimeout(function() {\n self._operationTimeoutCb(self._attempts);\n }, self._operationTimeout);\n\n if (self._options.unref) {\n self._timeout.unref();\n }\n }\n\n self._fn(self._attempts);\n }, timeout);\n\n if (this._options.unref) {\n this._timer.unref();\n }\n\n return true;\n};\n\nRetryOperation.prototype.attempt = function(fn, timeoutOps) {\n this._fn = fn;\n\n if (timeoutOps) {\n if (timeoutOps.timeout) {\n this._operationTimeout = timeoutOps.timeout;\n }\n if (timeoutOps.cb) {\n this._operationTimeoutCb = timeoutOps.cb;\n }\n }\n\n var self = this;\n if (this._operationTimeoutCb) {\n this._timeout = setTimeout(function() {\n self._operationTimeoutCb();\n }, self._operationTimeout);\n }\n\n this._operationStart = new Date().getTime();\n\n this._fn(this._attempts);\n};\n\nRetryOperation.prototype.try = function(fn) {\n console.log('Using RetryOperation.try() is deprecated');\n this.attempt(fn);\n};\n\nRetryOperation.prototype.start = function(fn) {\n console.log('Using RetryOperation.start() is deprecated');\n this.attempt(fn);\n};\n\nRetryOperation.prototype.start = RetryOperation.prototype.try;\n\nRetryOperation.prototype.errors = function() {\n return this._errors;\n};\n\nRetryOperation.prototype.attempts = function() {\n return this._attempts;\n};\n\nRetryOperation.prototype.mainError = function() {\n if (this._errors.length === 0) {\n return null;\n }\n\n var counts = {};\n var mainError = null;\n var mainErrorCount = 0;\n\n for (var i = 0; i < this._errors.length; i++) {\n var error = this._errors[i];\n var message = error.message;\n var count = (counts[message] || 0) + 1;\n\n counts[message] = count;\n\n if (count >= mainErrorCount) {\n mainError = error;\n mainErrorCount = count;\n }\n }\n\n return mainError;\n};\n","var RetryOperation = require('./retry_operation');\n\nexports.operation = function(options) {\n var timeouts = exports.timeouts(options);\n return new RetryOperation(timeouts, {\n forever: options && (options.forever || options.retries === Infinity),\n unref: options && options.unref,\n maxRetryTime: options && options.maxRetryTime\n });\n};\n\nexports.timeouts = function(options) {\n if (options instanceof Array) {\n return [].concat(options);\n }\n\n var opts = {\n retries: 10,\n factor: 2,\n minTimeout: 1 * 1000,\n maxTimeout: Infinity,\n randomize: false\n };\n for (var key in options) {\n opts[key] = options[key];\n }\n\n if (opts.minTimeout > opts.maxTimeout) {\n throw new Error('minTimeout is greater than maxTimeout');\n }\n\n var timeouts = [];\n for (var i = 0; i < opts.retries; i++) {\n timeouts.push(this.createTimeout(i, opts));\n }\n\n if (options && options.forever && !timeouts.length) {\n timeouts.push(this.createTimeout(i, opts));\n }\n\n // sort the array numerically ascending\n timeouts.sort(function(a,b) {\n return a - b;\n });\n\n return timeouts;\n};\n\nexports.createTimeout = function(attempt, opts) {\n var random = (opts.randomize)\n ? (Math.random() + 1)\n : 1;\n\n var timeout = Math.round(random * Math.max(opts.minTimeout, 1) * Math.pow(opts.factor, attempt));\n timeout = Math.min(timeout, opts.maxTimeout);\n\n return timeout;\n};\n\nexports.wrap = function(obj, options, methods) {\n if (options instanceof Array) {\n methods = options;\n options = null;\n }\n\n if (!methods) {\n methods = [];\n for (var key in obj) {\n if (typeof obj[key] === 'function') {\n methods.push(key);\n }\n }\n }\n\n for (var i = 0; i < methods.length; i++) {\n var method = methods[i];\n var original = obj[method];\n\n obj[method] = function retryWrapper(original) {\n var op = exports.operation(options);\n var args = Array.prototype.slice.call(arguments, 1);\n var callback = args.pop();\n\n args.push(function(err) {\n if (op.retry(err)) {\n return;\n }\n if (err) {\n arguments[0] = op.mainError();\n }\n callback.apply(this, arguments);\n });\n\n op.attempt(function() {\n original.apply(obj, args);\n });\n }.bind(obj, original);\n obj[method].options = options;\n }\n};\n","module.exports = require('./lib/retry');","const objectToString = Object.prototype.toString;\n\nconst isError = value => objectToString.call(value) === '[object Error]';\n\nconst errorMessages = new Set([\n\t'Failed to fetch', // Chrome\n\t'NetworkError when attempting to fetch resource.', // Firefox\n\t'The Internet connection appears to be offline.', // Safari 16\n\t'Load failed', // Safari 17+\n\t'Network request failed', // `cross-fetch`\n\t'fetch failed', // Undici (Node.js)\n]);\n\nexport default function isNetworkError(error) {\n\tconst isValid = error\n\t\t&& isError(error)\n\t\t&& error.name === 'TypeError'\n\t\t&& typeof error.message === 'string';\n\n\tif (!isValid) {\n\t\treturn false;\n\t}\n\n\t// We do an extra check for Safari 17+ as it has a very generic error message.\n\t// Network errors in Safari have no stack.\n\tif (error.message === 'Load failed') {\n\t\treturn error.stack === undefined;\n\t}\n\n\treturn errorMessages.has(error.message);\n}\n","import retry from 'retry';\nimport isNetworkError from 'is-network-error';\n\nexport class AbortError extends Error {\n\tconstructor(message) {\n\t\tsuper();\n\n\t\tif (message instanceof Error) {\n\t\t\tthis.originalError = message;\n\t\t\t({message} = message);\n\t\t} else {\n\t\t\tthis.originalError = new Error(message);\n\t\t\tthis.originalError.stack = this.stack;\n\t\t}\n\n\t\tthis.name = 'AbortError';\n\t\tthis.message = message;\n\t}\n}\n\nconst decorateErrorWithCounts = (error, attemptNumber, options) => {\n\t// Minus 1 from attemptNumber because the first attempt does not count as a retry\n\tconst retriesLeft = options.retries - (attemptNumber - 1);\n\n\terror.attemptNumber = attemptNumber;\n\terror.retriesLeft = retriesLeft;\n\treturn error;\n};\n\nexport default async function pRetry(input, options) {\n\treturn new Promise((resolve, reject) => {\n\t\toptions = {\n\t\t\tonFailedAttempt() {},\n\t\t\tretries: 10,\n\t\t\tshouldRetry: () => true,\n\t\t\t...options,\n\t\t};\n\n\t\tconst operation = retry.operation(options);\n\n\t\tconst abortHandler = () => {\n\t\t\toperation.stop();\n\t\t\treject(options.signal?.reason);\n\t\t};\n\n\t\tif (options.signal && !options.signal.aborted) {\n\t\t\toptions.signal.addEventListener('abort', abortHandler, {once: true});\n\t\t}\n\n\t\tconst cleanUp = () => {\n\t\t\toptions.signal?.removeEventListener('abort', abortHandler);\n\t\t\toperation.stop();\n\t\t};\n\n\t\toperation.attempt(async attemptNumber => {\n\t\t\ttry {\n\t\t\t\tconst result = await input(attemptNumber);\n\t\t\t\tcleanUp();\n\t\t\t\tresolve(result);\n\t\t\t} catch (error) {\n\t\t\t\ttry {\n\t\t\t\t\tif (!(error instanceof Error)) {\n\t\t\t\t\t\tthrow new TypeError(`Non-error was thrown: \"${error}\". You should only throw errors.`);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (error instanceof AbortError) {\n\t\t\t\t\t\tthrow error.originalError;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (error instanceof TypeError && !isNetworkError(error)) {\n\t\t\t\t\t\tthrow error;\n\t\t\t\t\t}\n\n\t\t\t\t\tdecorateErrorWithCounts(error, attemptNumber, options);\n\n\t\t\t\t\tif (!(await options.shouldRetry(error))) {\n\t\t\t\t\t\toperation.stop();\n\t\t\t\t\t\treject(error);\n\t\t\t\t\t}\n\n\t\t\t\t\tawait options.onFailedAttempt(error);\n\n\t\t\t\t\tif (!operation.retry(error)) {\n\t\t\t\t\t\tthrow operation.mainError();\n\t\t\t\t\t}\n\t\t\t\t} catch (finalError) {\n\t\t\t\t\tdecorateErrorWithCounts(finalError, attemptNumber, options);\n\t\t\t\t\tcleanUp();\n\t\t\t\t\treject(finalError);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t});\n}\n","export default class Combobox {\n constructor(input, list, { tabInsertsSuggestions, defaultFirstOption } = {}) {\n this.input = input;\n this.list = list;\n this.tabInsertsSuggestions = tabInsertsSuggestions !== null && tabInsertsSuggestions !== void 0 ? tabInsertsSuggestions : true;\n this.defaultFirstOption = defaultFirstOption !== null && defaultFirstOption !== void 0 ? defaultFirstOption : false;\n this.isComposing = false;\n if (!list.id) {\n list.id = `combobox-${Math.random().toString().slice(2, 6)}`;\n }\n this.ctrlBindings = !!navigator.userAgent.match(/Macintosh/);\n this.keyboardEventHandler = event => keyboardBindings(event, this);\n this.compositionEventHandler = event => trackComposition(event, this);\n this.inputHandler = this.clearSelection.bind(this);\n input.setAttribute('role', 'combobox');\n input.setAttribute('aria-controls', list.id);\n input.setAttribute('aria-expanded', 'false');\n input.setAttribute('aria-autocomplete', 'list');\n input.setAttribute('aria-haspopup', 'listbox');\n }\n destroy() {\n this.clearSelection();\n this.stop();\n this.input.removeAttribute('role');\n this.input.removeAttribute('aria-controls');\n this.input.removeAttribute('aria-expanded');\n this.input.removeAttribute('aria-autocomplete');\n this.input.removeAttribute('aria-haspopup');\n }\n start() {\n this.input.setAttribute('aria-expanded', 'true');\n this.input.addEventListener('compositionstart', this.compositionEventHandler);\n this.input.addEventListener('compositionend', this.compositionEventHandler);\n this.input.addEventListener('input', this.inputHandler);\n this.input.addEventListener('keydown', this.keyboardEventHandler);\n this.list.addEventListener('click', commitWithElement);\n this.indicateDefaultOption();\n }\n stop() {\n this.clearSelection();\n this.input.setAttribute('aria-expanded', 'false');\n this.input.removeEventListener('compositionstart', this.compositionEventHandler);\n this.input.removeEventListener('compositionend', this.compositionEventHandler);\n this.input.removeEventListener('input', this.inputHandler);\n this.input.removeEventListener('keydown', this.keyboardEventHandler);\n this.list.removeEventListener('click', commitWithElement);\n }\n indicateDefaultOption() {\n var _a;\n if (this.defaultFirstOption) {\n (_a = Array.from(this.list.querySelectorAll('[role=\"option\"]:not([aria-disabled=\"true\"])'))\n .filter(visible)[0]) === null || _a === void 0 ? void 0 : _a.setAttribute('data-combobox-option-default', 'true');\n }\n }\n navigate(indexDiff = 1) {\n const focusEl = Array.from(this.list.querySelectorAll('[aria-selected=\"true\"]')).filter(visible)[0];\n const els = Array.from(this.list.querySelectorAll('[role=\"option\"]')).filter(visible);\n const focusIndex = els.indexOf(focusEl);\n if ((focusIndex === els.length - 1 && indexDiff === 1) || (focusIndex === 0 && indexDiff === -1)) {\n this.clearSelection();\n this.input.focus();\n return;\n }\n let indexOfItem = indexDiff === 1 ? 0 : els.length - 1;\n if (focusEl && focusIndex >= 0) {\n const newIndex = focusIndex + indexDiff;\n if (newIndex >= 0 && newIndex < els.length)\n indexOfItem = newIndex;\n }\n const target = els[indexOfItem];\n if (!target)\n return;\n for (const el of els) {\n el.removeAttribute('data-combobox-option-default');\n if (target === el) {\n this.input.setAttribute('aria-activedescendant', target.id);\n target.setAttribute('aria-selected', 'true');\n scrollTo(this.list, target);\n }\n else {\n el.removeAttribute('aria-selected');\n }\n }\n }\n clearSelection() {\n this.input.removeAttribute('aria-activedescendant');\n for (const el of this.list.querySelectorAll('[aria-selected=\"true\"]')) {\n el.removeAttribute('aria-selected');\n }\n this.indicateDefaultOption();\n }\n}\nfunction keyboardBindings(event, combobox) {\n if (event.shiftKey || event.metaKey || event.altKey)\n return;\n if (!combobox.ctrlBindings && event.ctrlKey)\n return;\n if (combobox.isComposing)\n return;\n switch (event.key) {\n case 'Enter':\n if (commit(combobox.input, combobox.list)) {\n event.preventDefault();\n }\n break;\n case 'Tab':\n if (combobox.tabInsertsSuggestions && commit(combobox.input, combobox.list)) {\n event.preventDefault();\n }\n break;\n case 'Escape':\n combobox.clearSelection();\n break;\n case 'ArrowDown':\n combobox.navigate(1);\n event.preventDefault();\n break;\n case 'ArrowUp':\n combobox.navigate(-1);\n event.preventDefault();\n break;\n case 'n':\n if (combobox.ctrlBindings && event.ctrlKey) {\n combobox.navigate(1);\n event.preventDefault();\n }\n break;\n case 'p':\n if (combobox.ctrlBindings && event.ctrlKey) {\n combobox.navigate(-1);\n event.preventDefault();\n }\n break;\n default:\n if (event.ctrlKey)\n break;\n combobox.clearSelection();\n }\n}\nfunction commitWithElement(event) {\n if (!(event.target instanceof Element))\n return;\n const target = event.target.closest('[role=\"option\"]');\n if (!target)\n return;\n if (target.getAttribute('aria-disabled') === 'true')\n return;\n fireCommitEvent(target);\n}\nfunction commit(input, list) {\n const target = list.querySelector('[aria-selected=\"true\"], [data-combobox-option-default=\"true\"]');\n if (!target)\n return false;\n if (target.getAttribute('aria-disabled') === 'true')\n return true;\n target.click();\n return true;\n}\nfunction fireCommitEvent(target) {\n target.dispatchEvent(new CustomEvent('combobox-commit', { bubbles: true }));\n}\nfunction visible(el) {\n return (!el.hidden &&\n !(el instanceof HTMLInputElement && el.type === 'hidden') &&\n (el.offsetWidth > 0 || el.offsetHeight > 0));\n}\nfunction trackComposition(event, combobox) {\n combobox.isComposing = event.type === 'compositionstart';\n const list = document.getElementById(combobox.input.getAttribute('aria-controls') || '');\n if (!list)\n return;\n combobox.clearSelection();\n}\nfunction scrollTo(container, target) {\n if (!inViewport(container, target)) {\n container.scrollTop = target.offsetTop;\n }\n}\nfunction inViewport(container, element) {\n const scrollTop = container.scrollTop;\n const containerBottom = scrollTop + container.clientHeight;\n const top = element.offsetTop;\n const bottom = top + element.clientHeight;\n return top >= scrollTop && bottom <= containerBottom;\n}\n","import Combobox from '@github/combobox-nav';\n\nconst boundary = /\\s|\\(|\\[/;\nfunction query(text, key, cursor, { multiWord, lookBackIndex, lastMatchPosition } = {\n multiWord: false,\n lookBackIndex: 0,\n lastMatchPosition: null\n}) {\n let keyIndex = text.lastIndexOf(key, cursor - 1);\n if (keyIndex === -1)\n return;\n if (keyIndex < lookBackIndex)\n return;\n if (multiWord) {\n if (lastMatchPosition != null) {\n if (lastMatchPosition === keyIndex)\n return;\n keyIndex = lastMatchPosition - key.length;\n }\n const charAfterKey = text[keyIndex + 1];\n if (charAfterKey === ' ' && cursor >= keyIndex + key.length + 1)\n return;\n const newLineIndex = text.lastIndexOf('\\n', cursor - 1);\n if (newLineIndex > keyIndex)\n return;\n const dotIndex = text.lastIndexOf('.', cursor - 1);\n if (dotIndex > keyIndex)\n return;\n }\n else {\n const spaceIndex = text.lastIndexOf(' ', cursor - 1);\n if (spaceIndex > keyIndex)\n return;\n }\n const pre = text[keyIndex - 1];\n if (pre && !boundary.test(pre))\n return;\n const queryString = text.substring(keyIndex + key.length, cursor);\n return {\n text: queryString,\n position: keyIndex + key.length\n };\n}\n\nconst properties = ['position:absolute;', 'overflow:auto;', 'word-wrap:break-word;', 'top:0px;', 'left:-9999px;'];\nconst propertyNamesToCopy = [\n 'box-sizing',\n 'font-family',\n 'font-size',\n 'font-style',\n 'font-variant',\n 'font-weight',\n 'height',\n 'letter-spacing',\n 'line-height',\n 'max-height',\n 'min-height',\n 'padding-bottom',\n 'padding-left',\n 'padding-right',\n 'padding-top',\n 'border-bottom',\n 'border-left',\n 'border-right',\n 'border-top',\n 'text-decoration',\n 'text-indent',\n 'text-transform',\n 'width',\n 'word-spacing'\n];\nconst mirrorMap = new WeakMap();\nfunction textFieldMirror(textField, markerPosition) {\n const nodeName = textField.nodeName.toLowerCase();\n if (nodeName !== 'textarea' && nodeName !== 'input') {\n throw new Error('expected textField to a textarea or input');\n }\n let mirror = mirrorMap.get(textField);\n if (mirror && mirror.parentElement === textField.parentElement) {\n mirror.innerHTML = '';\n }\n else {\n mirror = document.createElement('div');\n mirrorMap.set(textField, mirror);\n const style = window.getComputedStyle(textField);\n const props = properties.slice(0);\n if (nodeName === 'textarea') {\n props.push('white-space:pre-wrap;');\n }\n else {\n props.push('white-space:nowrap;');\n }\n for (let i = 0, len = propertyNamesToCopy.length; i < len; i++) {\n const name = propertyNamesToCopy[i];\n props.push(`${name}:${style.getPropertyValue(name)};`);\n }\n mirror.style.cssText = props.join(' ');\n }\n const marker = document.createElement('span');\n marker.style.cssText = 'position: absolute;';\n marker.innerHTML = '&nbsp;';\n let before;\n let after;\n if (typeof markerPosition === 'number') {\n let text = textField.value.substring(0, markerPosition);\n if (text) {\n before = document.createTextNode(text);\n }\n text = textField.value.substring(markerPosition);\n if (text) {\n after = document.createTextNode(text);\n }\n }\n else {\n const text = textField.value;\n if (text) {\n before = document.createTextNode(text);\n }\n }\n if (before) {\n mirror.appendChild(before);\n }\n mirror.appendChild(marker);\n if (after) {\n mirror.appendChild(after);\n }\n if (!mirror.parentElement) {\n if (!textField.parentElement) {\n throw new Error('textField must have a parentElement to mirror');\n }\n textField.parentElement.insertBefore(mirror, textField);\n }\n mirror.scrollTop = textField.scrollTop;\n mirror.scrollLeft = textField.scrollLeft;\n return { mirror, marker };\n}\n\nfunction textFieldSelectionPosition(field, index = field.selectionEnd) {\n const { mirror, marker } = textFieldMirror(field, index);\n const mirrorRect = mirror.getBoundingClientRect();\n const markerRect = marker.getBoundingClientRect();\n setTimeout(() => {\n mirror.remove();\n }, 5000);\n return {\n top: markerRect.top - mirrorRect.top,\n left: markerRect.left - mirrorRect.left\n };\n}\n\nconst states = new WeakMap();\nfunction isTopLayer(el) {\n try {\n if (el.matches(':popover-open'))\n return true;\n }\n catch (_a) {\n }\n try {\n if (el.matches('dialog:modal'))\n return true;\n }\n catch (_b) {\n }\n try {\n if (el.matches(':fullscreen'))\n return true;\n }\n catch (_c) {\n }\n return false;\n}\nclass TextExpander {\n constructor(expander, input) {\n this.expander = expander;\n this.input = input;\n this.combobox = null;\n this.menu = null;\n this.match = null;\n this.justPasted = false;\n this.lookBackIndex = 0;\n this.oninput = this.onInput.bind(this);\n this.onpaste = this.onPaste.bind(this);\n this.onkeydown = this.onKeydown.bind(this);\n this.oncommit = this.onCommit.bind(this);\n this.onmousedown = this.onMousedown.bind(this);\n this.onblur = this.onBlur.bind(this);\n this.interactingWithList = false;\n input.addEventListener('paste', this.onpaste);\n input.addEventListener('input', this.oninput);\n input.addEventListener('keydown', this.onkeydown);\n input.addEventListener('blur', this.onblur);\n }\n destroy() {\n this.input.removeEventListener('paste', this.onpaste);\n this.input.removeEventListener('input', this.oninput);\n this.input.removeEventListener('keydown', this.onkeydown);\n this.input.removeEventListener('blur', this.onblur);\n }\n dismissMenu() {\n if (this.deactivate()) {\n this.lookBackIndex = this.input.selectionEnd || this.lookBackIndex;\n }\n }\n activate(match, menu) {\n var _a, _b;\n if (this.input !== document.activeElement && this.input !== ((_b = (_a = document.activeElement) === null || _a === void 0 ? void 0 : _a.shadowRoot) === null || _b === void 0 ? void 0 : _b.activeElement)) {\n return;\n }\n this.deactivate();\n this.menu = menu;\n if (!menu.id)\n menu.id = `text-expander-${Math.floor(Math.random() * 100000).toString()}`;\n this.expander.append(menu);\n this.combobox = new Combobox(this.input, menu);\n this.expander.dispatchEvent(new Event('text-expander-activate'));\n let { top, left } = textFieldSelectionPosition(this.input, match.position);\n if (isTopLayer(menu)) {\n const rect = this.input.getBoundingClientRect();\n top += rect.top;\n left += rect.left;\n if (getComputedStyle(menu).position === 'absolute') {\n top += window.scrollY;\n left += window.scrollX;\n }\n }\n menu.style.top = `${top}px`;\n menu.style.left = `${left}px`;\n this.combobox.start();\n menu.addEventListener('combobox-commit', this.oncommit);\n menu.addEventListener('mousedown', this.onmousedown);\n this.combobox.navigate(1);\n }\n deactivate() {\n const menu = this.menu;\n if (!menu || !this.combobox)\n return false;\n this.expander.dispatchEvent(new Event('text-expander-deactivate'));\n this.menu = null;\n menu.removeEventListener('combobox-commit', this.oncommit);\n menu.removeEventListener('mousedown', this.onmousedown);\n this.combobox.destroy();\n this.combobox = null;\n menu.remove();\n return true;\n }\n onCommit({ target }) {\n var _a;\n const item = target;\n if (!(item instanceof HTMLElement))\n return;\n if (!this.combobox)\n return;\n const match = this.match;\n if (!match)\n return;\n const beginning = this.input.value.substring(0, match.position - match.key.length);\n const remaining = this.input.value.substring(match.position + match.text.length);\n const detail = { item, key: match.key, value: null, continue: false };\n const canceled = !this.expander.dispatchEvent(new CustomEvent('text-expander-value', { cancelable: true, detail }));\n if (canceled)\n return;\n if (!detail.value)\n return;\n let suffix = (_a = this.expander.getAttribute('suffix')) !== null && _a !== void 0 ? _a : ' ';\n if (detail.continue) {\n suffix = '';\n }\n const value = `${detail.value}${suffix}`;\n this.input.value = beginning + value + remaining;\n const cursor = beginning.length + value.length;\n this.deactivate();\n this.input.focus({\n preventScroll: true\n });\n this.input.selectionStart = cursor;\n this.input.selectionEnd = cursor;\n if (!detail.continue) {\n this.lookBackIndex = cursor;\n this.match = null;\n }\n this.expander.dispatchEvent(new CustomEvent('text-expander-committed', { cancelable: false, detail: { input: this.input } }));\n }\n onBlur() {\n if (this.interactingWithList) {\n this.interactingWithList = false;\n return;\n }\n this.deactivate();\n }\n onPaste() {\n this.justPasted = true;\n }\n async onInput() {\n if (this.justPasted) {\n this.justPasted = false;\n return;\n }\n const match = this.findMatch();\n if (match) {\n this.match = match;\n const menu = await this.notifyProviders(match);\n if (!this.match)\n return;\n if (menu) {\n this.activate(match, menu);\n }\n else {\n this.deactivate();\n }\n }\n else {\n this.match = null;\n this.deactivate();\n }\n }\n findMatch() {\n const cursor = this.input.selectionEnd || 0;\n const text = this.input.value;\n if (cursor <= this.lookBackIndex) {\n this.lookBackIndex = cursor - 1;\n }\n for (const { key, multiWord } of this.expander.keys) {\n const found = query(text, key, cursor, {\n multiWord,\n lookBackIndex: this.lookBackIndex,\n lastMatchPosition: this.match ? this.match.position : null\n });\n if (found) {\n return { text: found.text, key, position: found.position };\n }\n }\n }\n async notifyProviders(match) {\n const providers = [];\n const provide = (result) => providers.push(result);\n const canceled = !this.expander.dispatchEvent(new CustomEvent('text-expander-change', { cancelable: true, detail: { provide, text: match.text, key: match.key } }));\n if (canceled)\n return;\n const all = await Promise.all(providers);\n const fragments = all.filter(x => x.matched).map(x => x.fragment);\n return fragments[0];\n }\n onMousedown() {\n this.interactingWithList = true;\n }\n onKeydown(event) {\n if (event.key === 'Escape') {\n this.match = null;\n if (this.deactivate()) {\n this.lookBackIndex = this.input.selectionEnd || this.lookBackIndex;\n event.stopImmediatePropagation();\n event.preventDefault();\n }\n }\n }\n}\nclass TextExpanderElement extends HTMLElement {\n get keys() {\n const keysAttr = this.getAttribute('keys');\n const keys = keysAttr ? keysAttr.split(' ') : [];\n const multiWordAttr = this.getAttribute('multiword');\n const multiWord = multiWordAttr ? multiWordAttr.split(' ') : [];\n const globalMultiWord = multiWord.length === 0 && this.hasAttribute('multiword');\n return keys.map(key => ({ key, multiWord: globalMultiWord || multiWord.includes(key) }));\n }\n connectedCallback() {\n const input = this.querySelector('input[type=\"text\"], textarea');\n if (!(input instanceof HTMLInputElement || input instanceof HTMLTextAreaElement))\n return;\n const state = new TextExpander(this, input);\n states.set(this, state);\n }\n disconnectedCallback() {\n const state = states.get(this);\n if (!state)\n return;\n state.destroy();\n states.delete(this);\n }\n dismiss() {\n const state = states.get(this);\n if (!state)\n return;\n state.dismissMenu();\n }\n}\n\nif (!window.customElements.get('text-expander')) {\n window.TextExpanderElement = TextExpanderElement;\n window.customElements.define('text-expander', TextExpanderElement);\n}\n\nexport default TextExpanderElement;\n","'use strict';\n\n// do not edit .js files directly - edit src/index.jst\n\n\n\nmodule.exports = function equal(a, b) {\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n\n for (i = length; i-- !== 0;) {\n var key = keys[i];\n\n if (!equal(a[key], b[key])) return false;\n }\n\n return true;\n }\n\n // true if both NaN, false otherwise\n return a!==a && b!==b;\n};\n","var i;\n\n!function(i) {\n i[i.HIGH_SURROGATE_START = 55296] = \"HIGH_SURROGATE_START\", i[i.HIGH_SURROGATE_END = 56319] = \"HIGH_SURROGATE_END\", \n i[i.LOW_SURROGATE_START = 56320] = \"LOW_SURROGATE_START\", i[i.REGIONAL_INDICATOR_START = 127462] = \"REGIONAL_INDICATOR_START\", \n i[i.REGIONAL_INDICATOR_END = 127487] = \"REGIONAL_INDICATOR_END\", i[i.FITZPATRICK_MODIFIER_START = 127995] = \"FITZPATRICK_MODIFIER_START\", \n i[i.FITZPATRICK_MODIFIER_END = 127999] = \"FITZPATRICK_MODIFIER_END\", i[i.VARIATION_MODIFIER_START = 65024] = \"VARIATION_MODIFIER_START\", \n i[i.VARIATION_MODIFIER_END = 65039] = \"VARIATION_MODIFIER_END\", i[i.DIACRITICAL_MARKS_START = 8400] = \"DIACRITICAL_MARKS_START\", \n i[i.DIACRITICAL_MARKS_END = 8447] = \"DIACRITICAL_MARKS_END\", i[i.SUBDIVISION_INDICATOR_START = 127988] = \"SUBDIVISION_INDICATOR_START\", \n i[i.TAGS_START = 917504] = \"TAGS_START\", i[i.TAGS_END = 917631] = \"TAGS_END\", i[i.ZWJ = 8205] = \"ZWJ\";\n}(i || (i = {}));\n\nconst e = Object.freeze([ 0x0308, 0x0937, 0x093F, 0x0BA8, 0x0BBF, 0x0BCD, 0x0E31, 0x0E33, 0x0E40, 0x0E49, 0x1100, 0x1161, 0x11A8 ]);\n\nvar n;\n\nfunction runes(i) {\n if (\"string\" != typeof i) throw new TypeError(\"string cannot be undefined or null\");\n const e = [];\n let n = 0, t = 0;\n for (;n < i.length; ) t += nextUnits(n + t, i), isGrapheme(i[n + t]) && t++, isVariationSelector(i[n + t]) && t++, \n isDiacriticalMark(i[n + t]) && t++, isZeroWidthJoiner(i[n + t]) ? t++ : (e.push(i.substring(n, n + t)), \n n += t, t = 0);\n return e;\n}\n\nfunction nextUnits(i, e) {\n const n = e[i];\n if (!isFirstOfSurrogatePair(n) || i === e.length - 1) return 1;\n const t = n + e[i + 1];\n let r = e.substring(i + 2, i + 5);\n return isRegionalIndicator(t) && isRegionalIndicator(r) ? 4 : isSubdivisionFlag(t) && isSupplementarySpecialpurposePlane(r) ? e.slice(i).indexOf(String.fromCodePoint(917631)) + 2 : isFitzpatrickModifier(r) ? 4 : 2;\n}\n\nfunction isFirstOfSurrogatePair(i) {\n return i && betweenInclusive(i[0].charCodeAt(0), 55296, 56319);\n}\n\nfunction isRegionalIndicator(i) {\n return betweenInclusive(codePointFromSurrogatePair(i), 127462, 127487);\n}\n\nfunction isSubdivisionFlag(i) {\n return betweenInclusive(codePointFromSurrogatePair(i), 127988, 127988);\n}\n\nfunction isFitzpatrickModifier(i) {\n return betweenInclusive(codePointFromSurrogatePair(i), 127995, 127999);\n}\n\nfunction isVariationSelector(i) {\n return \"string\" == typeof i && betweenInclusive(i.charCodeAt(0), 65024, 65039);\n}\n\nfunction isDiacriticalMark(i) {\n return \"string\" == typeof i && betweenInclusive(i.charCodeAt(0), 8400, 8447);\n}\n\nfunction isSupplementarySpecialpurposePlane(i) {\n const e = i.codePointAt(0);\n return \"string\" == typeof i && \"number\" == typeof e && betweenInclusive(e, 917504, 917631);\n}\n\nfunction isGrapheme(i) {\n return \"string\" == typeof i && e.includes(i.charCodeAt(0));\n}\n\nfunction isZeroWidthJoiner(i) {\n return \"string\" == typeof i && 8205 === i.charCodeAt(0);\n}\n\nfunction codePointFromSurrogatePair(i) {\n return (i.charCodeAt(0) - 55296 << 10) + (i.charCodeAt(1) - 56320) + 0x10000;\n}\n\nfunction betweenInclusive(i, e, n) {\n return i >= e && i <= n;\n}\n\nfunction substring(i, e, n) {\n const t = runes(i);\n if (void 0 === e) return i;\n if (e >= t.length) return \"\";\n const r = t.length - e;\n let o = e + (void 0 === n ? r : n);\n return o > e + r && (o = void 0), t.slice(e, o).join(\"\");\n}\n\n!function(i) {\n i[i.unit_1 = 1] = \"unit_1\", i[i.unit_2 = 2] = \"unit_2\", i[i.unit_4 = 4] = \"unit_4\";\n}(n || (n = {}));\n\nexport { n as EnumCodeUnits, i as EnumRunesCode, e as GRAPHEMES, betweenInclusive, codePointFromSurrogatePair, runes as default, isDiacriticalMark, isFirstOfSurrogatePair, isFitzpatrickModifier, isGrapheme, isRegionalIndicator, isSubdivisionFlag, isSupplementarySpecialpurposePlane, isVariationSelector, isZeroWidthJoiner, nextUnits, runes, substring as substr, substring };\n//# sourceMappingURL=index.esm.mjs.map\n","export default function ansiRegex({onlyFirst = false} = {}) {\n\tconst pattern = [\n\t '[\\\\u001B\\\\u009B][[\\\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]+)*|[a-zA-Z\\\\d]+(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]*)*)?\\\\u0007)',\n\t\t'(?:(?:\\\\d{1,4}(?:;\\\\d{0,4})*)?[\\\\dA-PR-TZcf-ntqry=><~]))'\n\t].join('|');\n\n\treturn new RegExp(pattern, onlyFirst ? undefined : 'g');\n}\n","import ansiRegex from 'ansi-regex';\n\nconst regex = ansiRegex();\n\nexport default function stripAnsi(string) {\n\tif (typeof string !== 'string') {\n\t\tthrow new TypeError(`Expected a \\`string\\`, got \\`${typeof string}\\``);\n\t}\n\n\t// Even though the regex is global, we don't need to reset the `.lastIndex`\n\t// because unlike `.exec()` and `.test()`, `.replace()` does it automatically\n\t// and doing it manually has a performance penalty.\n\treturn string.replace(regex, '');\n}\n","// Based on https://github.com/lodash/lodash/blob/6018350ac10d5ce6a5b7db625140b82aeab804df/.internal/unicodeSize.js\r\n\r\nexport default function charRegex() {\r\n\t// Unicode character classes\r\n\tconst astralRange = '\\\\ud800-\\\\udfff';\r\n\tconst comboMarksRange = '\\\\u0300-\\\\u036f';\r\n\tconst comboHalfMarksRange = '\\\\ufe20-\\\\ufe2f';\r\n\tconst comboSymbolsRange = '\\\\u20d0-\\\\u20ff';\r\n\tconst comboMarksExtendedRange = '\\\\u1ab0-\\\\u1aff';\r\n\tconst comboMarksSupplementRange = '\\\\u1dc0-\\\\u1dff';\r\n\tconst comboRange = comboMarksRange + comboHalfMarksRange + comboSymbolsRange + comboMarksExtendedRange + comboMarksSupplementRange;\r\n\tconst varRange = '\\\\ufe0e\\\\ufe0f';\r\n\r\n\t// Telugu characters\r\n\tconst teluguVowels = '\\\\u0c05-\\\\u0c0c\\\\u0c0e-\\\\u0c10\\\\u0c12-\\\\u0c14\\\\u0c60-\\\\u0c61';\r\n\tconst teluguVowelsDiacritic = '\\\\u0c3e-\\\\u0c44\\\\u0c46-\\\\u0c48\\\\u0c4a-\\\\u0c4c\\\\u0c62-\\\\u0c63';\r\n\tconst teluguConsonants = '\\\\u0c15-\\\\u0c28\\\\u0c2a-\\\\u0c39';\r\n\tconst teluguConsonantsRare = '\\\\u0c58-\\\\u0c5a';\r\n\tconst teluguModifiers = '\\\\u0c01-\\\\u0c03\\\\u0c4d\\\\u0c55\\\\u0c56';\r\n\tconst teluguNumerals = '\\\\u0c66-\\\\u0c6f\\\\u0c78-\\\\u0c7e';\r\n\tconst teluguSingle = `[${teluguVowels}(?:${teluguConsonants}(?!\\\\u0c4d))${teluguNumerals}${teluguConsonantsRare}]`;\r\n\tconst teluguDouble = `[${teluguConsonants}${teluguConsonantsRare}][${teluguVowelsDiacritic}]|[${teluguConsonants}${teluguConsonantsRare}][${teluguModifiers}`;\r\n\tconst teluguTriple = `[${teluguConsonants}]\\\\u0c4d[${teluguConsonants}]`;\r\n\tconst telugu = `(?:${teluguTriple}|${teluguDouble}|${teluguSingle})`;\r\n\r\n\t// Unicode capture groups\r\n\tconst astral = `[${astralRange}]`;\r\n\tconst combo = `[${comboRange}]`;\r\n\tconst fitz = '\\\\ud83c[\\\\udffb-\\\\udfff]';\r\n\tconst modifier = `(?:${combo}|${fitz})`;\r\n\tconst nonAstral = `[^${astralRange}]`;\r\n\tconst regional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}';\r\n\tconst surrogatePair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]';\r\n\tconst zeroWidthJoiner = '\\\\u200d';\r\n\tconst blackFlag = '(?:\\\\ud83c\\\\udff4\\\\udb40\\\\udc67\\\\udb40\\\\udc62\\\\udb40(?:\\\\udc65|\\\\udc73|\\\\udc77)\\\\udb40(?:\\\\udc6e|\\\\udc63|\\\\udc6c)\\\\udb40(?:\\\\udc67|\\\\udc74|\\\\udc73)\\\\udb40\\\\udc7f)';\r\n\r\n\t// Unicode regexes\r\n\tconst optModifier = `${modifier}?`;\r\n\tconst optVar = `[${varRange}]?`;\r\n\tconst optJoin = `(?:${zeroWidthJoiner}(?:${[nonAstral, regional, surrogatePair].join('|')})${optVar + optModifier})*`;\r\n\tconst seq = optVar + optModifier + optJoin;\r\n\tconst nonAstralCombo = `${nonAstral}${combo}?`;\r\n\tconst symbol = `(?:${[blackFlag, nonAstralCombo, combo, regional, surrogatePair, astral].join('|')})`;\r\n\r\n\t// Match string symbols (https://mathiasbynens.be/notes/javascript-unicode)\r\n\treturn new RegExp(`${fitz}(?=${fitz})|${telugu}|${symbol + seq}`, 'g');\r\n}\r\n","import stripAnsi from 'strip-ansi';\nimport charRegex from 'char-regex';\n\nexport default function stringLength(string, {countAnsiEscapeCodes = false} = {}) {\n\tif (string === '') {\n\t\treturn 0;\n\t}\n\n\tif (!countAnsiEscapeCodes) {\n\t\tstring = stripAnsi(string);\n\t}\n\n\tif (string === '') {\n\t\treturn 0;\n\t}\n\n\treturn string.match(charRegex()).length;\n}\n","var IDX=36, HEX='';\nwhile (IDX--) HEX += IDX.toString(36);\n\nexport function uid(len) {\n\tvar str='', num = len || 11;\n\twhile (num--) str += HEX[Math.random() * 36 | 0];\n\treturn str;\n}\n","import{useRef as r,useEffect as n,useMemo as t,useReducer as e,useCallback as u}from\"react\";function c(e,u,c){var i=this,a=r(null),o=r(0),f=r(null),l=r([]),v=r(),m=r(),d=r(e),g=r(!0);d.current=e;var p=\"undefined\"!=typeof window,w=!u&&0!==u&&p;if(\"function\"!=typeof e)throw new TypeError(\"Expected a function\");u=+u||0;var s=!!(c=c||{}).leading,x=!(\"trailing\"in c)||!!c.trailing,h=\"maxWait\"in c,y=\"debounceOnServer\"in c&&!!c.debounceOnServer,F=h?Math.max(+c.maxWait||0,u):null;n(function(){return g.current=!0,function(){g.current=!1}},[]);var A=t(function(){var r=function(r){var n=l.current,t=v.current;return l.current=v.current=null,o.current=r,m.current=d.current.apply(t,n)},n=function(r,n){w&&cancelAnimationFrame(f.current),f.current=w?requestAnimationFrame(r):setTimeout(r,n)},t=function(r){if(!g.current)return!1;var n=r-a.current;return!a.current||n>=u||n<0||h&&r-o.current>=F},e=function(n){return f.current=null,x&&l.current?r(n):(l.current=v.current=null,m.current)},c=function r(){var c=Date.now();if(t(c))return e(c);if(g.current){var i=u-(c-a.current),f=h?Math.min(i,F-(c-o.current)):i;n(r,f)}},A=function(){if(p||y){var e=Date.now(),d=t(e);if(l.current=[].slice.call(arguments),v.current=i,a.current=e,d){if(!f.current&&g.current)return o.current=a.current,n(c,u),s?r(a.current):m.current;if(h)return n(c,u),r(a.current)}return f.current||n(c,u),m.current}};return A.cancel=function(){f.current&&(w?cancelAnimationFrame(f.current):clearTimeout(f.current)),o.current=0,l.current=a.current=v.current=f.current=null},A.isPending=function(){return!!f.current},A.flush=function(){return f.current?e(Date.now()):m.current},A},[s,h,u,F,x,w,p,y]);return A}function i(r,n){return r===n}function a(r,n){return n}function o(n,t,o){var f=o&&o.equalityFn||i,l=e(a,n),v=l[0],m=l[1],d=c(u(function(r){return m(r)},[m]),t,o),g=r(n);return f(g.current,n)||(d(n),g.current=n),[v,d]}function f(r,n,t){var e=void 0===t?{}:t,u=e.leading,i=e.trailing;return c(r,n,{maxWait:n,leading:void 0===u||u,trailing:void 0===i||i})}export{o as useDebounce,c as useDebouncedCallback,f as useThrottledCallback};\n//# sourceMappingURL=index.module.js.map\n","function promisifyRequest(request) {\n return new Promise((resolve, reject) => {\n // @ts-ignore - file size hacks\n request.oncomplete = request.onsuccess = () => resolve(request.result);\n // @ts-ignore - file size hacks\n request.onabort = request.onerror = () => reject(request.error);\n });\n}\nfunction createStore(dbName, storeName) {\n const request = indexedDB.open(dbName);\n request.onupgradeneeded = () => request.result.createObjectStore(storeName);\n const dbp = promisifyRequest(request);\n return (txMode, callback) => dbp.then((db) => callback(db.transaction(storeName, txMode).objectStore(storeName)));\n}\nlet defaultGetStoreFunc;\nfunction defaultGetStore() {\n if (!defaultGetStoreFunc) {\n defaultGetStoreFunc = createStore('keyval-store', 'keyval');\n }\n return defaultGetStoreFunc;\n}\n/**\n * Get a value by its key.\n *\n * @param key\n * @param customStore Method to get a custom store. Use with caution (see the docs).\n */\nfunction get(key, customStore = defaultGetStore()) {\n return customStore('readonly', (store) => promisifyRequest(store.get(key)));\n}\n/**\n * Set a value with a key.\n *\n * @param key\n * @param value\n * @param customStore Method to get a custom store. Use with caution (see the docs).\n */\nfunction set(key, value, customStore = defaultGetStore()) {\n return customStore('readwrite', (store) => {\n store.put(value, key);\n return promisifyRequest(store.transaction);\n });\n}\n/**\n * Set multiple values at once. This is faster than calling set() multiple times.\n * It's also atomic if one of the pairs can't be added, none will be added.\n *\n * @param entries Array of entries, where each entry is an array of `[key, value]`.\n * @param customStore Method to get a custom store. Use with caution (see the docs).\n */\nfunction setMany(entries, customStore = defaultGetStore()) {\n return customStore('readwrite', (store) => {\n entries.forEach((entry) => store.put(entry[1], entry[0]));\n return promisifyRequest(store.transaction);\n });\n}\n/**\n * Get multiple values by their keys\n *\n * @param keys\n * @param customStore Method to get a custom store. Use with caution (see the docs).\n */\nfunction getMany(keys, customStore = defaultGetStore()) {\n return customStore('readonly', (store) => Promise.all(keys.map((key) => promisifyRequest(store.get(key)))));\n}\n/**\n * Update a value. This lets you see the old value and update it as an atomic operation.\n *\n * @param key\n * @param updater A callback that takes the old value and returns a new value.\n * @param customStore Method to get a custom store. Use with caution (see the docs).\n */\nfunction update(key, updater, customStore = defaultGetStore()) {\n return customStore('readwrite', (store) => \n // Need to create the promise manually.\n // If I try to chain promises, the transaction closes in browsers\n // that use a promise polyfill (IE10/11).\n new Promise((resolve, reject) => {\n store.get(key).onsuccess = function () {\n try {\n store.put(updater(this.result), key);\n resolve(promisifyRequest(store.transaction));\n }\n catch (err) {\n reject(err);\n }\n };\n }));\n}\n/**\n * Delete a particular key from the store.\n *\n * @param key\n * @param customStore Method to get a custom store. Use with caution (see the docs).\n */\nfunction del(key, customStore = defaultGetStore()) {\n return customStore('readwrite', (store) => {\n store.delete(key);\n return promisifyRequest(store.transaction);\n });\n}\n/**\n * Delete multiple keys at once.\n *\n * @param keys List of keys to delete.\n * @param customStore Method to get a custom store. Use with caution (see the docs).\n */\nfunction delMany(keys, customStore = defaultGetStore()) {\n return customStore('readwrite', (store) => {\n keys.forEach((key) => store.delete(key));\n return promisifyRequest(store.transaction);\n });\n}\n/**\n * Clear all values in the store.\n *\n * @param customStore Method to get a custom store. Use with caution (see the docs).\n */\nfunction clear(customStore = defaultGetStore()) {\n return customStore('readwrite', (store) => {\n store.clear();\n return promisifyRequest(store.transaction);\n });\n}\nfunction eachCursor(store, callback) {\n store.openCursor().onsuccess = function () {\n if (!this.result)\n return;\n callback(this.result);\n this.result.continue();\n };\n return promisifyRequest(store.transaction);\n}\n/**\n * Get all keys in the store.\n *\n * @param customStore Method to get a custom store. Use with caution (see the docs).\n */\nfunction keys(customStore = defaultGetStore()) {\n return customStore('readonly', (store) => {\n // Fast path for modern browsers\n if (store.getAllKeys) {\n return promisifyRequest(store.getAllKeys());\n }\n const items = [];\n return eachCursor(store, (cursor) => items.push(cursor.key)).then(() => items);\n });\n}\n/**\n * Get all values in the store.\n *\n * @param customStore Method to get a custom store. Use with caution (see the docs).\n */\nfunction values(customStore = defaultGetStore()) {\n return customStore('readonly', (store) => {\n // Fast path for modern browsers\n if (store.getAll) {\n return promisifyRequest(store.getAll());\n }\n const items = [];\n return eachCursor(store, (cursor) => items.push(cursor.value)).then(() => items);\n });\n}\n/**\n * Get all entries in the store. Each entry is an array of `[key, value]`.\n *\n * @param customStore Method to get a custom store. Use with caution (see the docs).\n */\nfunction entries(customStore = defaultGetStore()) {\n return customStore('readonly', (store) => {\n // Fast path for modern browsers\n // (although, hopefully we'll get a simpler path some day)\n if (store.getAll && store.getAllKeys) {\n return Promise.all([\n promisifyRequest(store.getAllKeys()),\n promisifyRequest(store.getAll()),\n ]).then(([keys, values]) => keys.map((key, i) => [key, values[i]]));\n }\n const items = [];\n return customStore('readonly', (store) => eachCursor(store, (cursor) => items.push([cursor.key, cursor.value])).then(() => items));\n });\n}\n\nexport { clear, createStore, del, delMany, entries, get, getMany, keys, promisifyRequest, set, setMany, update, values };\n","export class LiteYTEmbed extends HTMLElement {\n constructor() {\n super();\n this.isIframeLoaded = false;\n this.setupDom();\n }\n static get observedAttributes() {\n return ['videoid', 'playlistid'];\n }\n connectedCallback() {\n this.addEventListener('pointerover', LiteYTEmbed.warmConnections, {\n once: true,\n });\n this.addEventListener('click', () => this.addIframe());\n }\n get videoId() {\n return encodeURIComponent(this.getAttribute('videoid') || '');\n }\n set videoId(id) {\n this.setAttribute('videoid', id);\n }\n get playlistId() {\n return encodeURIComponent(this.getAttribute('playlistid') || '');\n }\n set playlistId(id) {\n this.setAttribute('playlistid', id);\n }\n get videoTitle() {\n return this.getAttribute('videotitle') || 'Video';\n }\n set videoTitle(title) {\n this.setAttribute('videotitle', title);\n }\n get videoPlay() {\n return this.getAttribute('videoPlay') || 'Play';\n }\n set videoPlay(name) {\n this.setAttribute('videoPlay', name);\n }\n get videoStartAt() {\n return this.getAttribute('videoStartAt') || '0';\n }\n get autoLoad() {\n return this.hasAttribute('autoload');\n }\n get noCookie() {\n return this.hasAttribute('nocookie');\n }\n get posterQuality() {\n return this.getAttribute('posterquality') || 'hqdefault';\n }\n get posterLoading() {\n return (this.getAttribute('posterloading') ||\n 'lazy');\n }\n get params() {\n return `start=${this.videoStartAt}&${this.getAttribute('params')}`;\n }\n set params(opts) {\n this.setAttribute('params', opts);\n }\n setupDom() {\n const shadowDom = this.attachShadow({ mode: 'open' });\n let nonce = '';\n if (window.liteYouTubeNonce) {\n nonce = `nonce=\"${window.liteYouTubeNonce}\"`;\n }\n shadowDom.innerHTML = `\n <style ${nonce}>\n :host {\n contain: content;\n display: block;\n position: relative;\n width: 100%;\n padding-bottom: calc(100% / (16 / 9));\n }\n\n @media (max-width: 40em) {\n :host([short]) {\n padding-bottom: calc(100% / (9 / 16));\n }\n }\n\n #frame, #fallbackPlaceholder, iframe {\n position: absolute;\n width: 100%;\n height: 100%;\n left: 0;\n }\n\n #frame {\n cursor: pointer;\n }\n\n #fallbackPlaceholder {\n object-fit: cover;\n }\n\n #frame::before {\n content: '';\n display: block;\n position: absolute;\n top: 0;\n background-image: linear-gradient(180deg, #111 -20%, transparent 90%);\n height: 60px;\n width: 100%;\n z-index: 1;\n }\n\n #playButton {\n width: 68px;\n height: 48px;\n background-color: transparent;\n background-image: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 68 48\"><path d=\"M66.52 7.74c-.78-2.93-2.49-5.41-5.42-6.19C55.79.13 34 0 34 0S12.21.13 6.9 1.55c-2.93.78-4.63 3.26-5.42 6.19C.06 13.05 0 24 0 24s.06 10.95 1.48 16.26c.78 2.93 2.49 5.41 5.42 6.19C12.21 47.87 34 48 34 48s21.79-.13 27.1-1.55c2.93-.78 4.64-3.26 5.42-6.19C67.94 34.95 68 24 68 24s-.06-10.95-1.48-16.26z\" fill=\"red\"/><path d=\"M45 24 27 14v20\" fill=\"white\"/></svg>');\n z-index: 1;\n border: 0;\n border-radius: inherit;\n }\n\n #playButton:before {\n content: '';\n border-style: solid;\n border-width: 11px 0 11px 19px;\n border-color: transparent transparent transparent #fff;\n }\n\n #playButton,\n #playButton:before {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate3d(-50%, -50%, 0);\n cursor: inherit;\n }\n\n /* Post-click styles */\n .activated {\n cursor: unset;\n }\n\n #frame.activated::before,\n #frame.activated > #playButton {\n display: none;\n }\n </style>\n <div id=\"frame\">\n <picture>\n <source id=\"webpPlaceholder\" type=\"image/webp\">\n <source id=\"jpegPlaceholder\" type=\"image/jpeg\">\n <img id=\"fallbackPlaceholder\" referrerpolicy=\"origin\" loading=\"lazy\">\n </picture>\n <button id=\"playButton\"></button>\n </div>\n `;\n this.domRefFrame = shadowDom.querySelector('#frame');\n this.domRefImg = {\n fallback: shadowDom.querySelector('#fallbackPlaceholder'),\n webp: shadowDom.querySelector('#webpPlaceholder'),\n jpeg: shadowDom.querySelector('#jpegPlaceholder'),\n };\n this.domRefPlayButton = shadowDom.querySelector('#playButton');\n }\n setupComponent() {\n this.initImagePlaceholder();\n this.domRefPlayButton.setAttribute('aria-label', `${this.videoPlay}: ${this.videoTitle}`);\n this.setAttribute('title', `${this.videoPlay}: ${this.videoTitle}`);\n if (this.autoLoad || this.isYouTubeShort()) {\n this.initIntersectionObserver();\n }\n }\n attributeChangedCallback(name, oldVal, newVal) {\n switch (name) {\n case 'videoid':\n case 'playlistid':\n case 'videoTitle':\n case 'videoPlay': {\n if (oldVal !== newVal) {\n this.setupComponent();\n if (this.domRefFrame.classList.contains('activated')) {\n this.domRefFrame.classList.remove('activated');\n this.shadowRoot.querySelector('iframe').remove();\n this.isIframeLoaded = false;\n }\n }\n break;\n }\n default:\n break;\n }\n }\n addIframe(isIntersectionObserver = false) {\n if (!this.isIframeLoaded) {\n let autoplay = isIntersectionObserver ? 0 : 1;\n const wantsNoCookie = this.noCookie ? '-nocookie' : '';\n let embedTarget;\n if (this.playlistId) {\n embedTarget = `?listType=playlist&list=${this.playlistId}&`;\n }\n else {\n embedTarget = `${this.videoId}?`;\n }\n if (this.isYouTubeShort()) {\n this.params = `loop=1&mute=1&modestbranding=1&playsinline=1&rel=0&enablejsapi=1&playlist=${this.videoId}`;\n autoplay = 1;\n }\n const iframeHTML = `\n<iframe frameborder=\"0\" title=\"${this.videoTitle}\"\n allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen\n src=\"https://www.youtube${wantsNoCookie}.com/embed/${embedTarget}autoplay=${autoplay}&${this.params}\"\n></iframe>`;\n this.domRefFrame.insertAdjacentHTML('beforeend', iframeHTML);\n this.domRefFrame.classList.add('activated');\n this.isIframeLoaded = true;\n this.attemptShortAutoPlay();\n this.dispatchEvent(new CustomEvent('liteYoutubeIframeLoaded', {\n detail: {\n videoId: this.videoId,\n },\n bubbles: true,\n cancelable: true,\n }));\n }\n }\n initImagePlaceholder() {\n const posterUrlWebp = `https://i.ytimg.com/vi_webp/${this.videoId}/${this.posterQuality}.webp`;\n const posterUrlJpeg = `https://i.ytimg.com/vi/${this.videoId}/${this.posterQuality}.jpg`;\n this.domRefImg.fallback.loading = this.posterLoading;\n this.domRefImg.webp.srcset = posterUrlWebp;\n this.domRefImg.jpeg.srcset = posterUrlJpeg;\n this.domRefImg.fallback.src = posterUrlJpeg;\n this.domRefImg.fallback.setAttribute('aria-label', `${this.videoPlay}: ${this.videoTitle}`);\n this.domRefImg?.fallback?.setAttribute('alt', `${this.videoPlay}: ${this.videoTitle}`);\n }\n initIntersectionObserver() {\n const options = {\n root: null,\n rootMargin: '0px',\n threshold: 0,\n };\n const observer = new IntersectionObserver((entries, observer) => {\n entries.forEach(entry => {\n if (entry.isIntersecting && !this.isIframeLoaded) {\n LiteYTEmbed.warmConnections();\n this.addIframe(true);\n observer.unobserve(this);\n }\n });\n }, options);\n observer.observe(this);\n }\n attemptShortAutoPlay() {\n if (this.isYouTubeShort()) {\n setTimeout(() => {\n this.shadowRoot\n .querySelector('iframe')\n ?.contentWindow?.postMessage('{\"event\":\"command\",\"func\":\"' + 'playVideo' + '\",\"args\":\"\"}', '*');\n }, 2000);\n }\n }\n isYouTubeShort() {\n return (this.getAttribute('short') === '' &&\n window.matchMedia('(max-width: 40em)').matches);\n }\n static addPrefetch(kind, url) {\n const linkElem = document.createElement('link');\n linkElem.rel = kind;\n linkElem.href = url;\n linkElem.crossOrigin = 'true';\n document.head.append(linkElem);\n }\n static warmConnections() {\n if (LiteYTEmbed.isPreconnected || window.liteYouTubeIsPreconnected)\n return;\n LiteYTEmbed.addPrefetch('preconnect', 'https://i.ytimg.com/');\n LiteYTEmbed.addPrefetch('preconnect', 'https://s.ytimg.com');\n LiteYTEmbed.addPrefetch('preconnect', 'https://www.youtube.com');\n LiteYTEmbed.addPrefetch('preconnect', 'https://www.google.com');\n LiteYTEmbed.addPrefetch('preconnect', 'https://googleads.g.doubleclick.net');\n LiteYTEmbed.addPrefetch('preconnect', 'https://static.doubleclick.net');\n LiteYTEmbed.isPreconnected = true;\n window.liteYouTubeIsPreconnected = true;\n }\n}\nLiteYTEmbed.isPreconnected = false;\ncustomElements.define('lite-youtube', LiteYTEmbed);\n//# sourceMappingURL=lite-youtube.js.map","const digit =\n '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz#$%*+,-.:;=?@[]^_{|}~';\nconst decode83 = (str, start, end) => {\n let value = 0;\n while (start < end) {\n value *= 83;\n value += digit.indexOf(str[start++]);\n }\n return value;\n};\n\nconst pow = Math.pow;\nconst PI = Math.PI;\nconst PI2 = PI * 2;\n\nconst d = 3294.6;\nconst e = 269.025;\nconst sRGBToLinear = (value) =>\n value > 10.31475 ? pow(value / e + 0.052132, 2.4) : value / d;\n\nconst linearTosRGB = (v) =>\n ~~(v > 0.00001227 ? e * pow(v, 0.416666) - 13.025 : v * d + 1);\n\nconst signSqr = (x) => (x < 0 ? -1 : 1) * x * x;\n\n/**\n * Fast approximate cosine implementation\n * Based on FTrig https://github.com/netcell/FTrig\n */\nconst fastCos = (x) => {\n x += PI / 2;\n while (x > PI) {\n x -= PI2;\n }\n const cos = 1.27323954 * x - 0.405284735 * signSqr(x);\n return 0.225 * (signSqr(cos) - cos) + cos;\n};\n\n/**\n * Extracts average color from BlurHash image\n * @param {string} blurHash BlurHash image string\n * @returns {[number, number, number]}\n */\nexport function getBlurHashAverageColor(blurHash) {\n const val = decode83(blurHash, 2, 6);\n return [val >> 16, (val >> 8) & 255, val & 255];\n}\n\n/**\n * Decodes BlurHash image\n * @param {string} blurHash BlurHash image string\n * @param {number} width Output image width\n * @param {number} height Output image height\n * @param {?number} punch\n * @returns {Uint8ClampedArray}\n */\nexport function decodeBlurHash(blurHash, width, height, punch) {\n const sizeFlag = decode83(blurHash, 0, 1);\n const numX = (sizeFlag % 9) + 1;\n const numY = ~~(sizeFlag / 9) + 1;\n const size = numX * numY;\n\n let i = 0,\n j = 0,\n x = 0,\n y = 0,\n r = 0,\n g = 0,\n b = 0,\n basis = 0,\n basisY = 0,\n colorIndex = 0,\n pixelIndex = 0,\n yh = 0,\n xw = 0,\n value = 0;\n\n const maximumValue = ((decode83(blurHash, 1, 2) + 1) / 13446) * (punch | 1);\n\n const colors = new Float64Array(size * 3);\n\n const averageColor = getBlurHashAverageColor(blurHash);\n for (i = 0; i < 3; i++) {\n colors[i] = sRGBToLinear(averageColor[i]);\n }\n\n for (i = 1; i < size; i++) {\n value = decode83(blurHash, 4 + i * 2, 6 + i * 2);\n colors[i * 3] = signSqr(~~(value / (19 * 19)) - 9) * maximumValue;\n colors[i * 3 + 1] = signSqr((~~(value / 19) % 19) - 9) * maximumValue;\n colors[i * 3 + 2] = signSqr((value % 19) - 9) * maximumValue;\n }\n\n const bytesPerRow = width * 4;\n const pixels = new Uint8ClampedArray(bytesPerRow * height);\n\n for (y = 0; y < height; y++) {\n yh = (PI * y) / height;\n for (x = 0; x < width; x++) {\n r = 0;\n g = 0;\n b = 0;\n xw = (PI * x) / width;\n\n for (j = 0; j < numY; j++) {\n basisY = fastCos(yh * j);\n for (i = 0; i < numX; i++) {\n basis = fastCos(xw * i) * basisY;\n colorIndex = (i + j * numX) * 3;\n r += colors[colorIndex] * basis;\n g += colors[colorIndex + 1] * basis;\n b += colors[colorIndex + 2] * basis;\n }\n }\n\n pixelIndex = 4 * x + y * bytesPerRow;\n pixels[pixelIndex] = linearTosRGB(r);\n pixels[pixelIndex + 1] = linearTosRGB(g);\n pixels[pixelIndex + 2] = linearTosRGB(b);\n pixels[pixelIndex + 3] = 255; // alpha\n }\n }\n return pixels;\n}\n","import { useRef as s, useCallback as h, useEffect as g } from \"react\";\nvar l = /* @__PURE__ */ ((e) => (e.Mouse = \"mouse\", e.Touch = \"touch\", e.Pointer = \"pointer\", e))(l || {}), d = /* @__PURE__ */ ((e) => (e.CancelledByMovement = \"cancelled-by-movement\", e.CancelledByRelease = \"cancelled-by-release\", e.CancelledOutsideElement = \"cancelled-outside-element\", e))(d || {});\nconst A = () => typeof window == \"object\" ? window?.PointerEvent ?? null : null, z = () => typeof window == \"object\" ? window?.TouchEvent ?? null : null;\nfunction U(e) {\n const { nativeEvent: t } = e, u = z();\n return u && t instanceof u || \"touches\" in e;\n}\nfunction X(e) {\n const t = A();\n return e.nativeEvent instanceof MouseEvent && !(t && e.nativeEvent instanceof t);\n}\nfunction Y(e) {\n const { nativeEvent: t } = e;\n if (!t)\n return !1;\n const u = A();\n return u && t instanceof u || \"pointerId\" in t;\n}\nfunction R(e) {\n return X(e) || U(e) || Y(e);\n}\nfunction j(e) {\n return U(e) ? {\n x: e.touches[0].pageX,\n y: e.touches[0].pageY\n } : X(e) || Y(e) ? {\n x: e.pageX,\n y: e.pageY\n } : null;\n}\nfunction G(e) {\n return {\n target: e.target,\n currentTarget: e.currentTarget,\n nativeEvent: e,\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n persist: () => {\n }\n };\n}\nfunction J(e, {\n threshold: t = 400,\n captureEvent: u = !1,\n detect: y = l.Pointer,\n cancelOnMovement: w = !1,\n cancelOutsideElement: v = !0,\n filterEvents: p,\n onStart: M,\n onMove: C,\n onFinish: L,\n onCancel: b\n} = {}) {\n const P = s(!1), c = s(!1), I = s(), a = s(), T = s(e), f = s(null), E = h(\n (n) => (r) => {\n c.current || R(r) && (p !== void 0 && !p(r) || (u && r.persist(), M?.(r, { context: n }), f.current = j(r), c.current = !0, I.current = r.currentTarget, a.current = setTimeout(() => {\n T.current && (T.current(r, { context: n }), P.current = !0);\n }, t)));\n },\n [u, p, M, t]\n ), i = h(\n (n) => (r, o) => {\n R(r) && c.current && (f.current = null, u && r.persist(), P.current ? L?.(r, { context: n }) : c.current && b?.(r, { context: n, reason: o ?? d.CancelledByRelease }), P.current = !1, c.current = !1, a.current !== void 0 && clearTimeout(a.current));\n },\n [u, L, b]\n ), m = h(\n (n) => (r) => {\n if (C?.(r, { context: n }), w !== !1 && f.current) {\n const o = j(r);\n if (o) {\n const B = w === !0 ? 25 : w, D = {\n x: Math.abs(o.x - f.current.x),\n y: Math.abs(o.y - f.current.y)\n };\n (D.x > B || D.y > B) && i(n)(r, d.CancelledByMovement);\n }\n }\n },\n [i, w, C]\n ), q = h(\n (n) => {\n if (e === null)\n return {};\n switch (y) {\n case l.Mouse: {\n const r = {\n onMouseDown: E(n),\n onMouseMove: m(n),\n onMouseUp: i(n)\n };\n return v && (r.onMouseLeave = (o) => {\n i(n)(o, d.CancelledOutsideElement);\n }), r;\n }\n case l.Touch:\n return {\n onTouchStart: E(n),\n onTouchMove: m(n),\n onTouchEnd: i(n)\n };\n case l.Pointer: {\n const r = {\n onPointerDown: E(n),\n onPointerMove: m(n),\n onPointerUp: i(n)\n };\n return v && (r.onPointerLeave = (o) => i(n)(o, d.CancelledOutsideElement)), r;\n }\n }\n },\n [e, i, v, y, m, E]\n );\n return g(() => {\n if (!window)\n return;\n function n(r) {\n const o = G(r);\n i()(o);\n }\n return window.addEventListener(\"mouseup\", n), window.addEventListener(\"touchend\", n), window.addEventListener(\"pointerup\", n), () => {\n window.removeEventListener(\"mouseup\", n), window.removeEventListener(\"touchend\", n), window.removeEventListener(\"pointerup\", n);\n };\n }, [i]), g(\n () => () => {\n a.current !== void 0 && clearTimeout(a.current);\n },\n []\n ), g(() => {\n T.current = e;\n }, [e]), q;\n}\nexport {\n d as LongPressCallbackReason,\n l as LongPressEventType,\n J as useLongPress\n};\n","import { useRef, useEffect, useCallback, useState, useMemo } from 'react';\n\n// This could've been more streamlined with internal state instead of abusing\n// refs to such extent, but then composing hooks and components could not opt out of unnecessary renders.\nfunction useResolvedElement(subscriber, refOrElement) {\n var lastReportRef = useRef(null);\n var refOrElementRef = useRef(null);\n refOrElementRef.current = refOrElement;\n var cbElementRef = useRef(null); // Calling re-evaluation after each render without using a dep array,\n // as the ref object's current value could've changed since the last render.\n\n useEffect(function () {\n evaluateSubscription();\n });\n var evaluateSubscription = useCallback(function () {\n var cbElement = cbElementRef.current;\n var refOrElement = refOrElementRef.current; // Ugly ternary. But smaller than an if-else block.\n\n var element = cbElement ? cbElement : refOrElement ? refOrElement instanceof Element ? refOrElement : refOrElement.current : null;\n\n if (lastReportRef.current && lastReportRef.current.element === element && lastReportRef.current.subscriber === subscriber) {\n return;\n }\n\n if (lastReportRef.current && lastReportRef.current.cleanup) {\n lastReportRef.current.cleanup();\n }\n\n lastReportRef.current = {\n element: element,\n subscriber: subscriber,\n // Only calling the subscriber, if there's an actual element to report.\n // Setting cleanup to undefined unless a subscriber returns one, as an existing cleanup function would've been just called.\n cleanup: element ? subscriber(element) : undefined\n };\n }, [subscriber]); // making sure we call the cleanup function on unmount\n\n useEffect(function () {\n return function () {\n if (lastReportRef.current && lastReportRef.current.cleanup) {\n lastReportRef.current.cleanup();\n lastReportRef.current = null;\n }\n };\n }, []);\n return useCallback(function (element) {\n cbElementRef.current = element;\n evaluateSubscription();\n }, [evaluateSubscription]);\n}\n\n// We're only using the first element of the size sequences, until future versions of the spec solidify on how\n// exactly it'll be used for fragments in multi-column scenarios:\n// From the spec:\n// > The box size properties are exposed as FrozenArray in order to support elements that have multiple fragments,\n// > which occur in multi-column scenarios. However the current definitions of content rect and border box do not\n// > mention how those boxes are affected by multi-column layout. In this spec, there will only be a single\n// > ResizeObserverSize returned in the FrozenArray, which will correspond to the dimensions of the first column.\n// > A future version of this spec will extend the returned FrozenArray to contain the per-fragment size information.\n// (https://drafts.csswg.org/resize-observer/#resize-observer-entry-interface)\n//\n// Also, testing these new box options revealed that in both Chrome and FF everything is returned in the callback,\n// regardless of the \"box\" option.\n// The spec states the following on this:\n// > This does not have any impact on which box dimensions are returned to the defined callback when the event\n// > is fired, it solely defines which box the author wishes to observe layout changes on.\n// (https://drafts.csswg.org/resize-observer/#resize-observer-interface)\n// I'm not exactly clear on what this means, especially when you consider a later section stating the following:\n// > This section is non-normative. An author may desire to observe more than one CSS box.\n// > In this case, author will need to use multiple ResizeObservers.\n// (https://drafts.csswg.org/resize-observer/#resize-observer-interface)\n// Which is clearly not how current browser implementations behave, and seems to contradict the previous quote.\n// For this reason I decided to only return the requested size,\n// even though it seems we have access to results for all box types.\n// This also means that we get to keep the current api, being able to return a simple { width, height } pair,\n// regardless of box option.\nfunction extractSize(entry, boxProp, sizeType) {\n if (!entry[boxProp]) {\n if (boxProp === \"contentBoxSize\") {\n // The dimensions in `contentBoxSize` and `contentRect` are equivalent according to the spec.\n // See the 6th step in the description for the RO algorithm:\n // https://drafts.csswg.org/resize-observer/#create-and-populate-resizeobserverentry-h\n // > Set this.contentRect to logical this.contentBoxSize given target and observedBox of \"content-box\".\n // In real browser implementations of course these objects differ, but the width/height values should be equivalent.\n return entry.contentRect[sizeType === \"inlineSize\" ? \"width\" : \"height\"];\n }\n\n return undefined;\n } // A couple bytes smaller than calling Array.isArray() and just as effective here.\n\n\n return entry[boxProp][0] ? entry[boxProp][0][sizeType] : // TS complains about this, because the RO entry type follows the spec and does not reflect Firefox's current\n // behaviour of returning objects instead of arrays for `borderBoxSize` and `contentBoxSize`.\n // @ts-ignore\n entry[boxProp][sizeType];\n}\n\nfunction useResizeObserver(opts) {\n if (opts === void 0) {\n opts = {};\n }\n\n // Saving the callback as a ref. With this, I don't need to put onResize in the\n // effect dep array, and just passing in an anonymous function without memoising\n // will not reinstantiate the hook's ResizeObserver.\n var onResize = opts.onResize;\n var onResizeRef = useRef(undefined);\n onResizeRef.current = onResize;\n var round = opts.round || Math.round; // Using a single instance throughout the hook's lifetime\n\n var resizeObserverRef = useRef();\n\n var _useState = useState({\n width: undefined,\n height: undefined\n }),\n size = _useState[0],\n setSize = _useState[1]; // In certain edge cases the RO might want to report a size change just after\n // the component unmounted.\n\n\n var didUnmount = useRef(false);\n useEffect(function () {\n didUnmount.current = false;\n return function () {\n didUnmount.current = true;\n };\n }, []); // Using a ref to track the previous width / height to avoid unnecessary renders.\n\n var previous = useRef({\n width: undefined,\n height: undefined\n }); // This block is kinda like a useEffect, only it's called whenever a new\n // element could be resolved based on the ref option. It also has a cleanup\n // function.\n\n var refCallback = useResolvedElement(useCallback(function (element) {\n // We only use a single Resize Observer instance, and we're instantiating it on demand, only once there's something to observe.\n // This instance is also recreated when the `box` option changes, so that a new observation is fired if there was a previously observed element with a different box option.\n if (!resizeObserverRef.current || resizeObserverRef.current.box !== opts.box || resizeObserverRef.current.round !== round) {\n resizeObserverRef.current = {\n box: opts.box,\n round: round,\n instance: new ResizeObserver(function (entries) {\n var entry = entries[0];\n var boxProp = opts.box === \"border-box\" ? \"borderBoxSize\" : opts.box === \"device-pixel-content-box\" ? \"devicePixelContentBoxSize\" : \"contentBoxSize\";\n var reportedWidth = extractSize(entry, boxProp, \"inlineSize\");\n var reportedHeight = extractSize(entry, boxProp, \"blockSize\");\n var newWidth = reportedWidth ? round(reportedWidth) : undefined;\n var newHeight = reportedHeight ? round(reportedHeight) : undefined;\n\n if (previous.current.width !== newWidth || previous.current.height !== newHeight) {\n var newSize = {\n width: newWidth,\n height: newHeight\n };\n previous.current.width = newWidth;\n previous.current.height = newHeight;\n\n if (onResizeRef.current) {\n onResizeRef.current(newSize);\n } else {\n if (!didUnmount.current) {\n setSize(newSize);\n }\n }\n }\n })\n };\n }\n\n resizeObserverRef.current.instance.observe(element, {\n box: opts.box\n });\n return function () {\n if (resizeObserverRef.current) {\n resizeObserverRef.current.instance.unobserve(element);\n }\n };\n }, [opts.box, round]), opts.ref);\n return useMemo(function () {\n return {\n ref: refCallback,\n width: size.width,\n height: size.height\n };\n }, [refCallback, size.width, size.height]);\n}\n\nexport { useResizeObserver as default };\n","export var styleRoot = 'kvfysmfp';\nexport var styleChild = 'ufhsfnkm';\nexport var styles = \".\".concat(styleRoot, \"{overflow:hidden;touch-action:none}.\").concat(styleChild, \"{transform-origin: 0 0}\");\n","var isSsr = typeof window === 'undefined';\nexport var isTouch = function () {\n return !isSsr && ('ontouchstart' in window || navigator.maxTouchPoints > 0);\n};\nexport var make2dTransformValue = function (_a) {\n var x = _a.x, y = _a.y, scale = _a.scale;\n return \"scale(\".concat(scale, \") translate(\").concat(x, \"px, \").concat(y, \"px)\");\n};\nexport var make3dTransformValue = function (_a) {\n var x = _a.x, y = _a.y, scale = _a.scale;\n return \"scale3d(\".concat(scale, \",\").concat(scale, \", 1) translate3d(\").concat(x, \"px, \").concat(y, \"px, 0)\");\n};\nexport var hasTranslate3DSupport = function () {\n var css = !isSsr && window.CSS;\n return css && css.supports && css.supports('transform', 'translate3d(0,0,0)');\n};\n","var min = Math.min, max = Math.max;\nexport function getOffsetBounds(_a) {\n var containerDimension = _a.containerDimension, childDimension = _a.childDimension, padding = _a.padding, centerContained = _a.centerContained;\n var diff = childDimension - containerDimension;\n if (diff + 2 * padding <= 0 && centerContained) {\n return [diff / 2, diff / 2];\n }\n else {\n return [min(diff + padding, 0) - padding, max(0, diff + padding)];\n }\n}\n","import { __assign, __extends } from \"tslib\";\nimport React, { Component, createRef, Children, cloneElement } from 'react';\nimport { styleRoot, styleChild, styles } from './styles.css';\nimport { isTouch } from '../utils';\nimport { getOffsetBounds } from './getOffsetBounds';\nvar classnames = function (base, other) {\n return other ? \"\".concat(base, \" \").concat(other) : base;\n};\nvar abs = Math.abs, min = Math.min, sqrt = Math.sqrt;\nvar isSsr = typeof window === 'undefined';\nvar isMac = isSsr ? false : /(Mac)/i.test(navigator.platform);\nvar isDragInteraction = function (i) { return i === 'drag'; };\nvar isZoomInteraction = function (i) { return i === 'zoom'; };\nvar isZoomGesture = function (wheelEvent) { return isMac && wheelEvent.ctrlKey; };\nvar cancelEvent = function (event) {\n event.stopPropagation();\n event.preventDefault();\n};\nvar getDistance = function (a, b) {\n var x = a.x - b.x;\n var y = a.y - b.y;\n return sqrt(x * x + y * y);\n};\nvar calculateScale = function (startTouches, endTouches) {\n var startDistance = getDistance(startTouches[0], startTouches[1]);\n var endDistance = getDistance(endTouches[0], endTouches[1]);\n return endDistance / startDistance;\n};\nvar isCloseTo = function (value, expected) {\n return value > expected - 0.01 && value < expected + 0.01;\n};\nvar swing = function (p) { return -Math.cos(p * Math.PI) / 2 + 0.5; };\nvar getPointByPageCoordinates = function (touch) { return ({\n x: touch.pageX,\n y: touch.pageY,\n}); };\nvar getPageCoordinatesByTouches = function (touches) {\n return Array.from(touches).map(getPointByPageCoordinates);\n};\nvar sum = function (a, b) { return a + b; };\nvar getVectorAvg = function (vectors) { return ({\n x: vectors.map(function (_a) {\n var x = _a.x;\n return x;\n }).reduce(sum, 0) / vectors.length,\n y: vectors.map(function (_a) {\n var y = _a.y;\n return y;\n }).reduce(sum, 0) / vectors.length,\n}); };\nvar clamp = function (min, max, value) {\n return value < min ? min : value > max ? max : value;\n};\nvar shouldInterceptWheel = function (event) {\n return !(event.ctrlKey || event.metaKey);\n};\nvar getElementSize = function (element) {\n if (element) {\n var offsetWidth = element.offsetWidth, offsetHeight = element.offsetHeight;\n // Any DOMElement\n if (offsetWidth && offsetHeight) {\n return { width: offsetWidth, height: offsetHeight };\n }\n // Svg support\n var style = getComputedStyle(element);\n var width = parseFloat(style.width);\n var height = parseFloat(style.height);\n if (height && width) {\n return { width: width, height: height };\n }\n }\n return { width: 0, height: 0 };\n};\nvar calculateVelocity = function (startPoint, endPoint) { return ({\n x: endPoint.x - startPoint.x,\n y: endPoint.y - startPoint.y,\n}); };\nvar comparePoints = function (p1, p2) { return p1.x === p2.x && p1.y === p2.y; };\nvar noup = function () { };\nvar zeroPoint = { x: 0, y: 0 };\nvar PinchZoom = /** @class */ (function (_super) {\n __extends(PinchZoom, _super);\n function PinchZoom() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this._prevDragMovePoint = null;\n _this._containerObserver = null;\n _this._fingers = 0;\n _this._firstMove = true;\n _this._initialOffset = __assign({}, zeroPoint);\n _this._interaction = null;\n _this._isDoubleTap = false;\n _this._isOffsetsSet = false;\n _this._lastDragPosition = null;\n _this._lastScale = 1;\n _this._lastTouchStart = 0;\n _this._lastZoomCenter = null;\n _this._listenMouseMove = false;\n _this._nthZoom = 0;\n _this._offset = __assign({}, zeroPoint);\n _this._startOffset = __assign({}, zeroPoint);\n _this._startTouches = null;\n _this._updatePlaned = false;\n _this._wheelTimeOut = null;\n _this._zoomFactor = 1;\n _this._initialZoomFactor = 1;\n _this._draggingPoint = __assign({}, zeroPoint);\n // It help reduce behavior difference between touch and mouse events\n _this._ignoreNextClick = false;\n // @ts-ignore\n _this._containerRef = createRef();\n _this._handleClick = function (clickEvent) {\n if (_this._ignoreNextClick) {\n _this._ignoreNextClick = false;\n clickEvent.stopPropagation();\n }\n };\n _this._onResize = function () {\n var _a;\n if ((_a = _this._containerRef) === null || _a === void 0 ? void 0 : _a.current) {\n _this._updateInitialZoomFactor();\n _this._setupOffsets();\n _this._update();\n }\n };\n _this._handlerOnTouchEnd = _this._handlerIfEnable(function (touchEndEvent) {\n _this._fingers = touchEndEvent.touches.length;\n if (_this.props.shouldCancelHandledTouchEndEvents &&\n (isZoomInteraction(_this._interaction) ||\n (isDragInteraction(_this._interaction) &&\n (_this._startOffset.x !== _this._offset.x ||\n _this._startOffset.y !== _this._offset.y)))) {\n cancelEvent(touchEndEvent);\n }\n if (isDragInteraction(_this._interaction) && !_this._enoughToDrag()) {\n _this._handleClick(touchEndEvent);\n }\n _this._updateInteraction(touchEndEvent);\n });\n _this._handlerOnTouchStart = _this._handlerIfEnable(function (touchStartEvent) {\n _this._firstMove = true;\n _this._fingers = touchStartEvent.touches.length;\n _this._detectDoubleTap(touchStartEvent);\n });\n _this._handlerOnTouchMove = _this._handlerIfEnable(function (touchMoveEvent) {\n if (_this._isDoubleTap) {\n return;\n }\n _this._collectInertia(touchMoveEvent);\n if (_this._firstMove) {\n _this._updateInteraction(touchMoveEvent);\n if (_this._interaction) {\n cancelEvent(touchMoveEvent);\n }\n _this._startOffset = __assign({}, _this._offset);\n _this._startTouches = getPageCoordinatesByTouches(touchMoveEvent.touches);\n }\n else {\n if (isZoomInteraction(_this._interaction)) {\n if (_this._startTouches &&\n _this._startTouches.length === 2 &&\n touchMoveEvent.touches.length === 2) {\n _this._handleZoom(touchMoveEvent, calculateScale(_this._startTouches, getPageCoordinatesByTouches(touchMoveEvent.touches)));\n }\n }\n else if (isDragInteraction(_this._interaction)) {\n _this._handleDrag(touchMoveEvent);\n }\n if (_this._interaction) {\n cancelEvent(touchMoveEvent);\n _this._update();\n }\n }\n _this._firstMove = false;\n });\n _this._handlerWheel = function (wheelEvent) {\n if (_this.props.shouldInterceptWheel(wheelEvent)) {\n return;\n }\n cancelEvent(wheelEvent);\n var pageX = wheelEvent.pageX, pageY = wheelEvent.pageY, deltaY = wheelEvent.deltaY, deltaMode = wheelEvent.deltaMode;\n var scaleDelta = 1;\n if (isZoomGesture(wheelEvent) || deltaMode === 1) {\n scaleDelta = 15;\n }\n var likeTouchEvent = {\n touches: [\n // @ts-ignore\n { pageX: pageX, pageY: pageY },\n ],\n };\n var center = _this._getOffsetByFirstTouch(likeTouchEvent);\n var dScale = deltaY * scaleDelta;\n _this._stopAnimation();\n _this._scaleTo(_this._zoomFactor - dScale / _this.props.wheelScaleFactor, center);\n _this._update();\n clearTimeout(\n // @ts-ignore\n _this._wheelTimeOut);\n _this._wheelTimeOut = setTimeout(function () { return _this._sanitize(); }, 100);\n };\n // @ts-ignore\n _this._handlers = _this.props.isTouch()\n ? [\n ['touchstart', _this._handlerOnTouchStart],\n ['touchend', _this._handlerOnTouchEnd],\n ['touchmove', _this._handlerOnTouchMove],\n ]\n : [\n [\n 'mousemove',\n _this.simulate(_this._handlerOnTouchMove),\n _this.props._document,\n ],\n [\n 'mouseup',\n _this.simulate(_this._handlerOnTouchEnd),\n _this.props._document,\n ],\n ['mousedown', _this.simulate(_this._handlerOnTouchStart)],\n ['click', _this._handleClick],\n ['wheel', _this._handlerWheel],\n ];\n return _this;\n }\n PinchZoom.prototype._handleDragStart = function (event) {\n this._ignoreNextClick = true;\n this.props.onDragStart();\n this._stopAnimation();\n this._resetInertia();\n this._lastDragPosition = null;\n this._hasInteraction = true;\n this._draggingPoint = this._offset;\n this._handleDrag(event);\n };\n PinchZoom.prototype._handleDrag = function (event) {\n var touch = this._getOffsetByFirstTouch(event);\n if (this._enoughToDrag()) {\n this._drag(touch, this._lastDragPosition);\n }\n else {\n this._virtualDrag(touch, this._lastDragPosition);\n }\n this._offset = this._sanitizeOffset(this._offset);\n this._lastDragPosition = touch;\n };\n PinchZoom.prototype._resetInertia = function () {\n this._velocity = null;\n this._prevDragMovePoint = null;\n };\n PinchZoom.prototype._realizeInertia = function () {\n var _this = this;\n var _a = this.props, inertiaFriction = _a.inertiaFriction, inertia = _a.inertia;\n if (!inertia || !this._velocity) {\n return;\n }\n var _b = this._velocity, x = _b.x, y = _b.y;\n if (x || y) {\n this._stopAnimation();\n this._resetInertia();\n var renderFrame = function () {\n x *= inertiaFriction;\n y *= inertiaFriction;\n if (!x && !y) {\n return _this._stopAnimation();\n }\n var prevOffset = __assign({}, _this._offset);\n _this._addOffset({ x: x, y: y });\n _this._offset = _this._sanitizeOffset(_this._offset);\n if (comparePoints(prevOffset, _this._offset)) {\n return _this._stopAnimation();\n }\n _this._update({ isAnimation: true });\n };\n this._animate(renderFrame, { duration: 9999 });\n }\n };\n PinchZoom.prototype._collectInertia = function (_a) {\n var touches = _a.touches;\n if (!this.props.inertia) {\n return;\n }\n var currentCoordinates = getPageCoordinatesByTouches(touches)[0];\n var prevPoint = this._prevDragMovePoint;\n if (prevPoint) {\n this._velocity = calculateVelocity(currentCoordinates, prevPoint);\n }\n this._prevDragMovePoint = currentCoordinates;\n };\n PinchZoom.prototype._handleDragEnd = function () {\n this.props.onDragEnd();\n this._end();\n this._realizeInertia();\n };\n PinchZoom.prototype._handleZoomStart = function () {\n this.props.onZoomStart();\n this._stopAnimation();\n this._lastScale = 1;\n this._nthZoom = 0;\n this._lastZoomCenter = null;\n this._hasInteraction = true;\n };\n PinchZoom.prototype._handleZoom = function (event, newScale) {\n var touchCenter = getVectorAvg(this._getOffsetTouches(event));\n var scale = newScale / this._lastScale;\n this._lastScale = newScale;\n // The first touch events are thrown away since they are not precise\n this._nthZoom += 1;\n if (this._nthZoom > 3) {\n this._scale(scale, touchCenter);\n this._drag(touchCenter, this._lastZoomCenter);\n if (this.props.enforceBoundsDuringZoom) {\n this._offset = this._sanitizeOffset(this._offset);\n }\n }\n this._lastZoomCenter = touchCenter;\n };\n PinchZoom.prototype._handleZoomEnd = function () {\n this.props.onZoomEnd();\n this._end();\n };\n PinchZoom.prototype._handleDoubleTap = function (event) {\n var _this = this;\n if (this._hasInteraction || this.props.tapZoomFactor === 0) {\n return;\n }\n var needZoomOut = (this.props.doubleTapZoomOutOnMaxScale &&\n this._zoomFactor === this.props.maxZoom) ||\n (this.props.doubleTapToggleZoom && this._zoomFactor > 1);\n this.props.onDoubleTap();\n this._ignoreNextClick = true;\n var zoomFactor = this._zoomFactor + this.props.tapZoomFactor;\n var startZoomFactor = this._zoomFactor;\n var updateProgress = function (progress) {\n _this._scaleTo(startZoomFactor + progress * (zoomFactor - startZoomFactor), center);\n };\n var center = this._getOffsetByFirstTouch(event);\n this._isDoubleTap = true;\n if (startZoomFactor > zoomFactor) {\n center = this._getCurrentZoomCenter();\n }\n needZoomOut ? this._zoomOutAnimation() : this._animate(updateProgress);\n };\n PinchZoom.prototype._computeInitialOffset = function () {\n var rect = this._getContainerRect();\n var _a = this._getChildSize(), width = _a.width, height = _a.height;\n var x = -abs(width * this._getInitialZoomFactor() - rect.width) / 2;\n var y = -abs(height * this._getInitialZoomFactor() - rect.height) / 2;\n this._initialOffset = { x: x, y: y };\n };\n PinchZoom.prototype._resetOffset = function () {\n this._offset = __assign({}, this._initialOffset);\n };\n PinchZoom.prototype._setupOffsets = function () {\n if (this.props.setOffsetsOnce && this._isOffsetsSet) {\n return;\n }\n this._isOffsetsSet = true;\n this._computeInitialOffset();\n this._resetOffset();\n };\n PinchZoom.prototype._sanitizeOffset = function (offset) {\n var rect = this._getContainerRect();\n var _a = this._getChildSize(), width = _a.width, height = _a.height;\n var elWidth = width * this._getInitialZoomFactor() * this._zoomFactor;\n var elHeight = height * this._getInitialZoomFactor() * this._zoomFactor;\n var _b = getOffsetBounds({\n containerDimension: rect.width,\n childDimension: elWidth,\n padding: this.props.horizontalPadding,\n centerContained: this.props.centerContained,\n }), minOffsetX = _b[0], maxOffsetX = _b[1];\n var _c = getOffsetBounds({\n containerDimension: rect.height,\n childDimension: elHeight,\n padding: this.props.verticalPadding,\n centerContained: this.props.centerContained,\n }), minOffsetY = _c[0], maxOffsetY = _c[1];\n return {\n x: clamp(minOffsetX, maxOffsetX, offset.x),\n y: clamp(minOffsetY, maxOffsetY, offset.y),\n };\n };\n PinchZoom.prototype.alignCenter = function (options) {\n var _this = this;\n var _a = __assign({ duration: 250, animated: true }, options), __x = _a.x, __y = _a.y, scale = _a.scale, animated = _a.animated, duration = _a.duration;\n // Bug-Fix: https://github.com/retyui/react-quick-pinch-zoom/issues/58\n var x = __x * this._initialZoomFactor;\n var y = __y * this._initialZoomFactor;\n var startZoomFactor = this._zoomFactor;\n var startOffset = __assign({}, this._offset);\n var rect = this._getContainerRect();\n var containerCenter = { x: rect.width / 2, y: rect.height / 2 };\n this._zoomFactor = 1;\n this._offset = { x: -(containerCenter.x - x), y: -(containerCenter.y - y) };\n this._scaleTo(scale, containerCenter);\n this._stopAnimation();\n if (!animated) {\n return this._update();\n }\n var diffZoomFactor = this._zoomFactor - startZoomFactor;\n var diffOffset = {\n x: this._offset.x - startOffset.x,\n y: this._offset.y - startOffset.y,\n };\n this._zoomFactor = startZoomFactor;\n this._offset = __assign({}, startOffset);\n var updateFrame = function (progress) {\n var x = startOffset.x + diffOffset.x * progress;\n var y = startOffset.y + diffOffset.y * progress;\n _this._zoomFactor = startZoomFactor + diffZoomFactor * progress;\n _this._offset = _this._sanitizeOffset({ x: x, y: y });\n _this._update();\n };\n this._animate(updateFrame, {\n callback: function () { return _this._sanitize(); },\n duration: duration,\n });\n };\n PinchZoom.prototype.scaleTo = function (options) {\n var _this = this;\n var _a = __assign({ duration: 250, animated: true }, options), x = _a.x, y = _a.y, scale = _a.scale, animated = _a.animated, duration = _a.duration;\n var startZoomFactor = this._zoomFactor;\n var startOffset = __assign({}, this._offset);\n this._zoomFactor = 1;\n this._offset = { x: 0, y: 0 };\n this._scaleTo(scale, { x: x, y: y });\n this._stopAnimation();\n if (!animated) {\n return this._update();\n }\n var diffZoomFactor = this._zoomFactor - startZoomFactor;\n var diffOffset = {\n x: this._offset.x - startOffset.x,\n y: this._offset.y - startOffset.y,\n };\n this._zoomFactor = startZoomFactor;\n this._offset = __assign({}, startOffset);\n var updateFrame = function (progress) {\n var x = startOffset.x + diffOffset.x * progress;\n var y = startOffset.y + diffOffset.y * progress;\n _this._zoomFactor = startZoomFactor + diffZoomFactor * progress;\n _this._offset = { x: x, y: y };\n _this._update();\n };\n this._animate(updateFrame, { callback: function () { return _this._sanitize(); }, duration: duration });\n };\n PinchZoom.prototype._scaleTo = function (zoomFactor, center) {\n this._scale(zoomFactor / this._zoomFactor, center);\n this._offset = this._sanitizeOffset(this._offset);\n };\n PinchZoom.prototype._scale = function (scale, center) {\n scale = this._scaleZoomFactor(scale);\n this._addOffset({\n x: (scale - 1) * (center.x + this._offset.x),\n y: (scale - 1) * (center.y + this._offset.y),\n });\n this.props.onZoomUpdate();\n };\n PinchZoom.prototype._scaleZoomFactor = function (scale) {\n var originalZoomFactor = this._zoomFactor;\n this._zoomFactor *= scale;\n this._zoomFactor = clamp(this.props.minZoom, this.props.maxZoom, this._zoomFactor);\n return this._zoomFactor / originalZoomFactor;\n };\n PinchZoom.prototype._canDrag = function () {\n return this.props.draggableUnZoomed || !isCloseTo(this._zoomFactor, 1);\n };\n PinchZoom.prototype._drag = function (center, lastCenter) {\n if (lastCenter) {\n var y = -(center.y - lastCenter.y);\n var x = -(center.x - lastCenter.x);\n if (!this.props.lockDragAxis) {\n this._addOffset({\n x: x,\n y: y,\n });\n }\n else {\n // lock scroll to position that was changed the most\n if (abs(x) > abs(y)) {\n this._addOffset({\n x: x,\n y: 0,\n });\n }\n else {\n this._addOffset({\n y: y,\n x: 0,\n });\n }\n }\n this.props.onDragUpdate();\n }\n };\n PinchZoom.prototype._virtualDrag = function (center, lastCenter) {\n if (lastCenter) {\n var y = -(center.y - lastCenter.y);\n var x = -(center.x - lastCenter.x);\n this._draggingPoint = {\n x: x + this._draggingPoint.x,\n y: y + this._draggingPoint.y,\n };\n }\n };\n PinchZoom.prototype._addOffset = function (offset) {\n var _a = this._offset, x = _a.x, y = _a.y;\n this._offset = {\n x: x + offset.x,\n y: y + offset.y,\n };\n };\n PinchZoom.prototype._sanitize = function () {\n if (this._zoomFactor < this.props.zoomOutFactor) {\n this._resetInertia();\n this._zoomOutAnimation();\n }\n else if (this._isInsaneOffset()) {\n this._sanitizeOffsetAnimation();\n }\n };\n PinchZoom.prototype._isInsaneOffset = function () {\n var offset = this._offset;\n var sanitizedOffset = this._sanitizeOffset(offset);\n return sanitizedOffset.x !== offset.x || sanitizedOffset.y !== offset.y;\n };\n PinchZoom.prototype._sanitizeOffsetAnimation = function () {\n var _this = this;\n var targetOffset = this._sanitizeOffset(this._offset);\n var startOffset = __assign({}, this._offset);\n var updateProgress = function (progress) {\n var x = startOffset.x + progress * (targetOffset.x - startOffset.x);\n var y = startOffset.y + progress * (targetOffset.y - startOffset.y);\n _this._offset = { x: x, y: y };\n _this._update();\n };\n this._animate(updateProgress);\n };\n PinchZoom.prototype._zoomOutAnimation = function () {\n var _this = this;\n if (this._zoomFactor === 1) {\n return;\n }\n var startZoomFactor = this._zoomFactor;\n var zoomFactor = 1;\n var center = this._getCurrentZoomCenter();\n var updateProgress = function (progress) {\n var scaleFactor = startZoomFactor + progress * (zoomFactor - startZoomFactor);\n _this._scaleTo(scaleFactor, center);\n };\n this._animate(updateProgress);\n };\n PinchZoom.prototype._getInitialZoomFactor = function () {\n return this._initialZoomFactor;\n };\n PinchZoom.prototype._getCurrentZoomCenter = function () {\n var _a = this._offset, x = _a.x, y = _a.y;\n var offsetLeft = x - this._initialOffset.x;\n var offsetTop = y - this._initialOffset.y;\n return {\n x: -1 * x - offsetLeft / (1 / this._zoomFactor - 1),\n y: -1 * y - offsetTop / (1 / this._zoomFactor - 1),\n };\n };\n PinchZoom.prototype._getOffsetByFirstTouch = function (event) {\n return this._getOffsetTouches(event)[0];\n };\n PinchZoom.prototype._getOffsetTouches = function (event) {\n var _document = this.props._document;\n var _html = _document.documentElement;\n var _body = _document.body;\n var _a = this._getContainerRect(), top = _a.top, left = _a.left;\n var scrollTop = _html.scrollTop || _body.scrollTop;\n var scrollLeft = _html.scrollLeft || _body.scrollLeft;\n var posTop = top + scrollTop;\n var posLeft = left + scrollLeft;\n return getPageCoordinatesByTouches(event.touches).map(function (_a) {\n var x = _a.x, y = _a.y;\n return ({\n x: x - posLeft,\n y: y - posTop,\n });\n });\n };\n PinchZoom.prototype._animate = function (frameFn, options) {\n var _this = this;\n var startTime = new Date().getTime();\n var _a = __assign({ timeFn: swing, callback: function () { }, duration: this.props.animationDuration }, options), timeFn = _a.timeFn, callback = _a.callback, duration = _a.duration;\n var renderFrame = function () {\n if (!_this._inAnimation) {\n return;\n }\n var frameTime = new Date().getTime() - startTime;\n var progress = frameTime / duration;\n if (frameTime >= duration) {\n frameFn(1);\n _this._stopAnimation();\n callback();\n _this._update();\n }\n else {\n progress = timeFn(progress);\n frameFn(progress);\n _this._update({ isAnimation: true });\n requestAnimationFrame(renderFrame);\n }\n };\n this._inAnimation = true;\n requestAnimationFrame(renderFrame);\n };\n PinchZoom.prototype._stopAnimation = function () {\n this._inAnimation = false;\n };\n PinchZoom.prototype._end = function () {\n this._hasInteraction = false;\n this._sanitize();\n this._update();\n };\n PinchZoom.prototype._getContainerRect = function () {\n var div = this._containerRef.current;\n return div.getBoundingClientRect();\n };\n PinchZoom.prototype._getChildSize = function () {\n var div = this._containerRef.current;\n return getElementSize(div === null || div === void 0 ? void 0 : div.firstElementChild);\n };\n PinchZoom.prototype._updateInitialZoomFactor = function () {\n var rect = this._getContainerRect();\n var size = this._getChildSize();\n var xZoomFactor = rect.width / size.width;\n var yZoomFactor = rect.height / size.height;\n this._initialZoomFactor = min(xZoomFactor, yZoomFactor);\n };\n PinchZoom.prototype._bindEvents = function () {\n var _this = this;\n var div = this._containerRef.current;\n if (window.ResizeObserver) {\n this._containerObserver = new ResizeObserver(this._onResize);\n this._containerObserver.observe(div);\n }\n else {\n window.addEventListener('resize', this._onResize);\n }\n this._handlers.forEach(function (_a) {\n var eventName = _a[0], fn = _a[1], target = _a[2];\n (target || div).addEventListener(eventName, fn, true);\n });\n Array.from(div.querySelectorAll('img')).forEach(function (img) {\n return img.addEventListener('load', _this._onResize);\n });\n };\n PinchZoom.prototype._unSubscribe = function () {\n var _this = this;\n var div = this._containerRef.current;\n if (this._containerObserver) {\n this._containerObserver.disconnect();\n this._containerObserver = null;\n }\n window.removeEventListener('resize', this._onResize);\n this._handlers.forEach(function (_a) {\n var eventName = _a[0], fn = _a[1], target = _a[2];\n (target || div).removeEventListener(eventName, fn, true);\n });\n Array.from(div.querySelectorAll('img')).forEach(function (img) {\n return img.removeEventListener('load', _this._onResize);\n });\n };\n PinchZoom.prototype._update = function (options) {\n var _this = this;\n if (this._updatePlaned) {\n return;\n }\n var updateFrame = function () {\n var scale = _this._getInitialZoomFactor() * _this._zoomFactor;\n var x = -_this._offset.x / scale;\n var y = -_this._offset.y / scale;\n _this.props.onUpdate({ scale: scale, x: x, y: y });\n };\n if (options === null || options === void 0 ? void 0 : options.isAnimation) {\n return updateFrame();\n }\n this._updatePlaned = true;\n requestAnimationFrame(function () {\n _this._updatePlaned = false;\n updateFrame();\n });\n };\n PinchZoom.prototype._handlerIfEnable = function (fn) {\n var _this = this;\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (_this.props.enabled) {\n fn.apply(void 0, args);\n }\n };\n };\n PinchZoom.prototype._setInteraction = function (newInteraction, event) {\n var interaction = this._interaction;\n if (interaction !== newInteraction) {\n if (interaction && !newInteraction) {\n if (isZoomInteraction(interaction)) {\n this._handleZoomEnd();\n }\n else if (isDragInteraction(interaction)) {\n this._handleDragEnd();\n }\n }\n if (isZoomInteraction(newInteraction)) {\n this._handleZoomStart();\n }\n else if (isDragInteraction(newInteraction)) {\n this._handleDragStart(event);\n }\n }\n this._interaction = newInteraction;\n };\n PinchZoom.prototype._distanceBetweenNumbers = function (a, b) {\n return a > b ? a - b : b - a;\n };\n PinchZoom.prototype._enoughToDrag = function () {\n if (this._distanceBetweenNumbers(this._startOffset.x, this._draggingPoint.x) >\n 5 ||\n this._distanceBetweenNumbers(this._startOffset.y, this._draggingPoint.y) >\n 5)\n return true;\n return false;\n };\n PinchZoom.prototype._updateInteraction = function (event) {\n var fingers = this._fingers;\n if (fingers === 2) {\n return this._setInteraction('zoom', event);\n }\n if (fingers === 1 && this._canDrag()) {\n return this._setInteraction('drag', event);\n }\n this._setInteraction(null, event);\n };\n PinchZoom.prototype._detectDoubleTap = function (event) {\n var time = new Date().getTime();\n if (this._fingers > 1) {\n this._lastTouchStart = 0;\n }\n if (time - this._lastTouchStart < 300) {\n cancelEvent(event);\n this._handleDoubleTap(event);\n if (isZoomInteraction(this._interaction)) {\n this._handleZoomEnd();\n }\n else if (isDragInteraction(this._interaction)) {\n this._handleDragEnd();\n }\n }\n else {\n this._isDoubleTap = false;\n }\n if (this._fingers === 1) {\n this._lastTouchStart = time;\n }\n };\n PinchZoom.prototype.simulate = function (fn) {\n var _this = this;\n return function (mouseEvent) {\n var pageX = mouseEvent.pageX, pageY = mouseEvent.pageY, type = mouseEvent.type;\n var isEnd = type === 'mouseup';\n var isStart = type === 'mousedown';\n if (isStart) {\n mouseEvent.preventDefault();\n _this._listenMouseMove = true;\n }\n if (_this._listenMouseMove) {\n // @ts-ignore\n mouseEvent.touches = isEnd ? [] : [{ pageX: pageX, pageY: pageY }];\n fn(\n // @ts-ignore\n mouseEvent);\n }\n if (isEnd) {\n _this._listenMouseMove = false;\n }\n };\n };\n PinchZoom.prototype.componentDidMount = function () {\n this._bindEvents();\n this._update();\n };\n PinchZoom.prototype.componentWillUnmount = function () {\n this._stopAnimation();\n this._unSubscribe();\n };\n PinchZoom.prototype.render = function () {\n var _a = this.props, children = _a.children, containerProps = _a.containerProps;\n var child = Children.only(children);\n var props = containerProps || {};\n return (React.createElement(React.Fragment, null,\n React.createElement(\"style\", null, styles),\n React.createElement(\"div\", __assign({}, props, { ref: this._containerRef, className: classnames(styleRoot, props.className) }), cloneElement(child, {\n className: classnames(styleChild, child.props.className),\n }))));\n };\n PinchZoom.defaultProps = {\n animationDuration: 250,\n draggableUnZoomed: true,\n enforceBoundsDuringZoom: false,\n centerContained: false,\n enabled: true,\n inertia: true,\n inertiaFriction: 0.96,\n horizontalPadding: 0,\n isTouch: isTouch,\n lockDragAxis: false,\n maxZoom: 5,\n minZoom: 0.5,\n onDoubleTap: noup,\n onDragEnd: noup,\n onDragStart: noup,\n onDragUpdate: noup,\n onZoomEnd: noup,\n onZoomStart: noup,\n onZoomUpdate: noup,\n setOffsetsOnce: false,\n shouldInterceptWheel: shouldInterceptWheel,\n shouldCancelHandledTouchEndEvents: false,\n tapZoomFactor: 1,\n verticalPadding: 0,\n wheelScaleFactor: 1500,\n zoomOutFactor: 1.3,\n doubleTapZoomOutOnMaxScale: false,\n doubleTapToggleZoom: false,\n // @ts-expect-error\n _document: isSsr ? null : window.document,\n };\n return PinchZoom;\n}(Component));\nif (process.env.NODE_ENV !== 'production') {\n var _a = require('prop-types'), any = _a.any, element = _a.element, object = _a.object, number = _a.number, func = _a.func, bool = _a.bool;\n // @ts-ignore\n PinchZoom.propTypes = {\n children: element,\n containerProps: object,\n wheelScaleFactor: number,\n animationDuration: number,\n draggableUnZoomed: bool,\n enforceBoundsDuringZoom: bool,\n centerContained: bool,\n enabled: bool,\n horizontalPadding: number,\n lockDragAxis: bool,\n onUpdate: func.isRequired,\n maxZoom: number,\n minZoom: number,\n onDoubleTap: func,\n onDragEnd: func,\n onDragStart: func,\n onDragUpdate: func,\n onZoomEnd: func,\n onZoomStart: func,\n onZoomUpdate: func,\n setOffsetsOnce: bool,\n tapZoomFactor: number,\n verticalPadding: number,\n zoomOutFactor: number,\n doubleTapZoomOutOnMaxScale: bool,\n doubleTapToggleZoom: bool,\n isTouch: func,\n _document: any,\n };\n}\nexport default PinchZoom;\n","\"use client\";\nvar __defProp = Object.defineProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField = (obj, key, value) => {\n __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\n return value;\n};\n\n// src/InView.tsx\nimport * as React from \"react\";\n\n// src/observe.ts\nvar observerMap = /* @__PURE__ */ new Map();\nvar RootIds = /* @__PURE__ */ new WeakMap();\nvar rootId = 0;\nvar unsupportedValue = void 0;\nfunction defaultFallbackInView(inView) {\n unsupportedValue = inView;\n}\nfunction getRootId(root) {\n if (!root)\n return \"0\";\n if (RootIds.has(root))\n return RootIds.get(root);\n rootId += 1;\n RootIds.set(root, rootId.toString());\n return RootIds.get(root);\n}\nfunction optionsToId(options) {\n return Object.keys(options).sort().filter(\n (key) => options[key] !== void 0\n ).map((key) => {\n return `${key}_${key === \"root\" ? getRootId(options.root) : options[key]}`;\n }).toString();\n}\nfunction createObserver(options) {\n let id = optionsToId(options);\n let instance = observerMap.get(id);\n if (!instance) {\n const elements = /* @__PURE__ */ new Map();\n let thresholds;\n const observer = new IntersectionObserver((entries) => {\n entries.forEach((entry) => {\n var _a;\n const inView = entry.isIntersecting && thresholds.some((threshold) => entry.intersectionRatio >= threshold);\n if (options.trackVisibility && typeof entry.isVisible === \"undefined\") {\n entry.isVisible = inView;\n }\n (_a = elements.get(entry.target)) == null ? void 0 : _a.forEach((callback) => {\n callback(inView, entry);\n });\n });\n }, options);\n thresholds = observer.thresholds || (Array.isArray(options.threshold) ? options.threshold : [options.threshold || 0]);\n instance = {\n id,\n observer,\n elements\n };\n observerMap.set(id, instance);\n }\n return instance;\n}\nfunction observe(element, callback, options = {}, fallbackInView = unsupportedValue) {\n if (typeof window.IntersectionObserver === \"undefined\" && fallbackInView !== void 0) {\n const bounds = element.getBoundingClientRect();\n callback(fallbackInView, {\n isIntersecting: fallbackInView,\n target: element,\n intersectionRatio: typeof options.threshold === \"number\" ? options.threshold : 0,\n time: 0,\n boundingClientRect: bounds,\n intersectionRect: bounds,\n rootBounds: bounds\n });\n return () => {\n };\n }\n const { id, observer, elements } = createObserver(options);\n let callbacks = elements.get(element) || [];\n if (!elements.has(element)) {\n elements.set(element, callbacks);\n }\n callbacks.push(callback);\n observer.observe(element);\n return function unobserve() {\n callbacks.splice(callbacks.indexOf(callback), 1);\n if (callbacks.length === 0) {\n elements.delete(element);\n observer.unobserve(element);\n }\n if (elements.size === 0) {\n observer.disconnect();\n observerMap.delete(id);\n }\n };\n}\n\n// src/InView.tsx\nfunction isPlainChildren(props) {\n return typeof props.children !== \"function\";\n}\nvar InView = class extends React.Component {\n constructor(props) {\n super(props);\n __publicField(this, \"node\", null);\n __publicField(this, \"_unobserveCb\", null);\n __publicField(this, \"handleNode\", (node) => {\n if (this.node) {\n this.unobserve();\n if (!node && !this.props.triggerOnce && !this.props.skip) {\n this.setState({ inView: !!this.props.initialInView, entry: void 0 });\n }\n }\n this.node = node ? node : null;\n this.observeNode();\n });\n __publicField(this, \"handleChange\", (inView, entry) => {\n if (inView && this.props.triggerOnce) {\n this.unobserve();\n }\n if (!isPlainChildren(this.props)) {\n this.setState({ inView, entry });\n }\n if (this.props.onChange) {\n this.props.onChange(inView, entry);\n }\n });\n this.state = {\n inView: !!props.initialInView,\n entry: void 0\n };\n }\n componentDidMount() {\n this.unobserve();\n this.observeNode();\n }\n componentDidUpdate(prevProps) {\n if (prevProps.rootMargin !== this.props.rootMargin || prevProps.root !== this.props.root || prevProps.threshold !== this.props.threshold || prevProps.skip !== this.props.skip || prevProps.trackVisibility !== this.props.trackVisibility || prevProps.delay !== this.props.delay) {\n this.unobserve();\n this.observeNode();\n }\n }\n componentWillUnmount() {\n this.unobserve();\n }\n observeNode() {\n if (!this.node || this.props.skip)\n return;\n const {\n threshold,\n root,\n rootMargin,\n trackVisibility,\n delay,\n fallbackInView\n } = this.props;\n this._unobserveCb = observe(\n this.node,\n this.handleChange,\n {\n threshold,\n root,\n rootMargin,\n // @ts-ignore\n trackVisibility,\n // @ts-ignore\n delay\n },\n fallbackInView\n );\n }\n unobserve() {\n if (this._unobserveCb) {\n this._unobserveCb();\n this._unobserveCb = null;\n }\n }\n render() {\n const { children } = this.props;\n if (typeof children === \"function\") {\n const { inView, entry } = this.state;\n return children({ inView, entry, ref: this.handleNode });\n }\n const {\n as,\n triggerOnce,\n threshold,\n root,\n rootMargin,\n onChange,\n skip,\n trackVisibility,\n delay,\n initialInView,\n fallbackInView,\n ...props\n } = this.props;\n return React.createElement(\n as || \"div\",\n { ref: this.handleNode, ...props },\n children\n );\n }\n};\n\n// src/useInView.tsx\nimport * as React2 from \"react\";\nfunction useInView({\n threshold,\n delay,\n trackVisibility,\n rootMargin,\n root,\n triggerOnce,\n skip,\n initialInView,\n fallbackInView,\n onChange\n} = {}) {\n var _a;\n const [ref, setRef] = React2.useState(null);\n const callback = React2.useRef();\n const [state, setState] = React2.useState({\n inView: !!initialInView,\n entry: void 0\n });\n callback.current = onChange;\n React2.useEffect(\n () => {\n if (skip || !ref)\n return;\n let unobserve;\n unobserve = observe(\n ref,\n (inView, entry) => {\n setState({\n inView,\n entry\n });\n if (callback.current)\n callback.current(inView, entry);\n if (entry.isIntersecting && triggerOnce && unobserve) {\n unobserve();\n unobserve = void 0;\n }\n },\n {\n root,\n rootMargin,\n threshold,\n // @ts-ignore\n trackVisibility,\n // @ts-ignore\n delay\n },\n fallbackInView\n );\n return () => {\n if (unobserve) {\n unobserve();\n }\n };\n },\n // We break the rule here, because we aren't including the actual `threshold` variable\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [\n // If the threshold is an array, convert it to a string, so it won't change between renders.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n Array.isArray(threshold) ? threshold.toString() : threshold,\n ref,\n root,\n rootMargin,\n triggerOnce,\n skip,\n trackVisibility,\n fallbackInView,\n delay\n ]\n );\n const entryTarget = (_a = state.entry) == null ? void 0 : _a.target;\n const previousEntryTarget = React2.useRef();\n if (!ref && entryTarget && !triggerOnce && !skip && previousEntryTarget.current !== entryTarget) {\n previousEntryTarget.current = entryTarget;\n setState({\n inView: !!initialInView,\n entry: void 0\n });\n }\n const result = [setRef, state.inView, state.entry];\n result.ref = result[0];\n result.inView = result[1];\n result.entry = result[2];\n return result;\n}\nexport {\n InView,\n defaultFallbackInView,\n observe,\n useInView\n};\n//# sourceMappingURL=index.mjs.map","// Copyright (c) 2013 Pieroxy <pieroxy@pieroxy.net>\n// This work is free. You can redistribute it and/or modify it\n// under the terms of the WTFPL, Version 2\n// For more information see LICENSE.txt or http://www.wtfpl.net/\n//\n// For more information, the home page:\n// http://pieroxy.net/blog/pages/lz-string/testing.html\n//\n// LZ-based compression algorithm, version 1.4.5\nvar LZString = (function() {\n\n// private property\nvar f = String.fromCharCode;\nvar keyStrBase64 = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\nvar keyStrUriSafe = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$\";\nvar baseReverseDic = {};\n\nfunction getBaseValue(alphabet, character) {\n if (!baseReverseDic[alphabet]) {\n baseReverseDic[alphabet] = {};\n for (var i=0 ; i<alphabet.length ; i++) {\n baseReverseDic[alphabet][alphabet.charAt(i)] = i;\n }\n }\n return baseReverseDic[alphabet][character];\n}\n\nvar LZString = {\n compressToBase64 : function (input) {\n if (input == null) return \"\";\n var res = LZString._compress(input, 6, function(a){return keyStrBase64.charAt(a);});\n switch (res.length % 4) { // To produce valid Base64\n default: // When could this happen ?\n case 0 : return res;\n case 1 : return res+\"===\";\n case 2 : return res+\"==\";\n case 3 : return res+\"=\";\n }\n },\n\n decompressFromBase64 : function (input) {\n if (input == null) return \"\";\n if (input == \"\") return null;\n return LZString._decompress(input.length, 32, function(index) { return getBaseValue(keyStrBase64, input.charAt(index)); });\n },\n\n compressToUTF16 : function (input) {\n if (input == null) return \"\";\n return LZString._compress(input, 15, function(a){return f(a+32);}) + \" \";\n },\n\n decompressFromUTF16: function (compressed) {\n if (compressed == null) return \"\";\n if (compressed == \"\") return null;\n return LZString._decompress(compressed.length, 16384, function(index) { return compressed.charCodeAt(index) - 32; });\n },\n\n //compress into uint8array (UCS-2 big endian format)\n compressToUint8Array: function (uncompressed) {\n var compressed = LZString.compress(uncompressed);\n var buf=new Uint8Array(compressed.length*2); // 2 bytes per character\n\n for (var i=0, TotalLen=compressed.length; i<TotalLen; i++) {\n var current_value = compressed.charCodeAt(i);\n buf[i*2] = current_value >>> 8;\n buf[i*2+1] = current_value % 256;\n }\n return buf;\n },\n\n //decompress from uint8array (UCS-2 big endian format)\n decompressFromUint8Array:function (compressed) {\n if (compressed===null || compressed===undefined){\n return LZString.decompress(compressed);\n } else {\n var buf=new Array(compressed.length/2); // 2 bytes per character\n for (var i=0, TotalLen=buf.length; i<TotalLen; i++) {\n buf[i]=compressed[i*2]*256+compressed[i*2+1];\n }\n\n var result = [];\n buf.forEach(function (c) {\n result.push(f(c));\n });\n return LZString.decompress(result.join(''));\n\n }\n\n },\n\n\n //compress into a string that is already URI encoded\n compressToEncodedURIComponent: function (input) {\n if (input == null) return \"\";\n return LZString._compress(input, 6, function(a){return keyStrUriSafe.charAt(a);});\n },\n\n //decompress from an output of compressToEncodedURIComponent\n decompressFromEncodedURIComponent:function (input) {\n if (input == null) return \"\";\n if (input == \"\") return null;\n input = input.replace(/ /g, \"+\");\n return LZString._decompress(input.length, 32, function(index) { return getBaseValue(keyStrUriSafe, input.charAt(index)); });\n },\n\n compress: function (uncompressed) {\n return LZString._compress(uncompressed, 16, function(a){return f(a);});\n },\n _compress: function (uncompressed, bitsPerChar, getCharFromInt) {\n if (uncompressed == null) return \"\";\n var i, value,\n context_dictionary= {},\n context_dictionaryToCreate= {},\n context_c=\"\",\n context_wc=\"\",\n context_w=\"\",\n context_enlargeIn= 2, // Compensate for the first entry which should not count\n context_dictSize= 3,\n context_numBits= 2,\n context_data=[],\n context_data_val=0,\n context_data_position=0,\n ii;\n\n for (ii = 0; ii < uncompressed.length; ii += 1) {\n context_c = uncompressed.charAt(ii);\n if (!Object.prototype.hasOwnProperty.call(context_dictionary,context_c)) {\n context_dictionary[context_c] = context_dictSize++;\n context_dictionaryToCreate[context_c] = true;\n }\n\n context_wc = context_w + context_c;\n if (Object.prototype.hasOwnProperty.call(context_dictionary,context_wc)) {\n context_w = context_wc;\n } else {\n if (Object.prototype.hasOwnProperty.call(context_dictionaryToCreate,context_w)) {\n if (context_w.charCodeAt(0)<256) {\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n }\n value = context_w.charCodeAt(0);\n for (i=0 ; i<8 ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n } else {\n value = 1;\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1) | value;\n if (context_data_position ==bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = 0;\n }\n value = context_w.charCodeAt(0);\n for (i=0 ; i<16 ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n }\n context_enlargeIn--;\n if (context_enlargeIn == 0) {\n context_enlargeIn = Math.pow(2, context_numBits);\n context_numBits++;\n }\n delete context_dictionaryToCreate[context_w];\n } else {\n value = context_dictionary[context_w];\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n\n\n }\n context_enlargeIn--;\n if (context_enlargeIn == 0) {\n context_enlargeIn = Math.pow(2, context_numBits);\n context_numBits++;\n }\n // Add wc to the dictionary.\n context_dictionary[context_wc] = context_dictSize++;\n context_w = String(context_c);\n }\n }\n\n // Output the code for w.\n if (context_w !== \"\") {\n if (Object.prototype.hasOwnProperty.call(context_dictionaryToCreate,context_w)) {\n if (context_w.charCodeAt(0)<256) {\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n }\n value = context_w.charCodeAt(0);\n for (i=0 ; i<8 ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n } else {\n value = 1;\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1) | value;\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = 0;\n }\n value = context_w.charCodeAt(0);\n for (i=0 ; i<16 ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n }\n context_enlargeIn--;\n if (context_enlargeIn == 0) {\n context_enlargeIn = Math.pow(2, context_numBits);\n context_numBits++;\n }\n delete context_dictionaryToCreate[context_w];\n } else {\n value = context_dictionary[context_w];\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n\n\n }\n context_enlargeIn--;\n if (context_enlargeIn == 0) {\n context_enlargeIn = Math.pow(2, context_numBits);\n context_numBits++;\n }\n }\n\n // Mark the end of the stream\n value = 2;\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n\n // Flush the last char\n while (true) {\n context_data_val = (context_data_val << 1);\n if (context_data_position == bitsPerChar-1) {\n context_data.push(getCharFromInt(context_data_val));\n break;\n }\n else context_data_position++;\n }\n return context_data.join('');\n },\n\n decompress: function (compressed) {\n if (compressed == null) return \"\";\n if (compressed == \"\") return null;\n return LZString._decompress(compressed.length, 32768, function(index) { return compressed.charCodeAt(index); });\n },\n\n _decompress: function (length, resetValue, getNextValue) {\n var dictionary = [],\n next,\n enlargeIn = 4,\n dictSize = 4,\n numBits = 3,\n entry = \"\",\n result = [],\n i,\n w,\n bits, resb, maxpower, power,\n c,\n data = {val:getNextValue(0), position:resetValue, index:1};\n\n for (i = 0; i < 3; i += 1) {\n dictionary[i] = i;\n }\n\n bits = 0;\n maxpower = Math.pow(2,2);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n\n switch (next = bits) {\n case 0:\n bits = 0;\n maxpower = Math.pow(2,8);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n c = f(bits);\n break;\n case 1:\n bits = 0;\n maxpower = Math.pow(2,16);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n c = f(bits);\n break;\n case 2:\n return \"\";\n }\n dictionary[3] = c;\n w = c;\n result.push(c);\n while (true) {\n if (data.index > length) {\n return \"\";\n }\n\n bits = 0;\n maxpower = Math.pow(2,numBits);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n\n switch (c = bits) {\n case 0:\n bits = 0;\n maxpower = Math.pow(2,8);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n\n dictionary[dictSize++] = f(bits);\n c = dictSize-1;\n enlargeIn--;\n break;\n case 1:\n bits = 0;\n maxpower = Math.pow(2,16);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n dictionary[dictSize++] = f(bits);\n c = dictSize-1;\n enlargeIn--;\n break;\n case 2:\n return result.join('');\n }\n\n if (enlargeIn == 0) {\n enlargeIn = Math.pow(2, numBits);\n numBits++;\n }\n\n if (dictionary[c]) {\n entry = dictionary[c];\n } else {\n if (c === dictSize) {\n entry = w + w.charAt(0);\n } else {\n return null;\n }\n }\n result.push(entry);\n\n // Add w+entry[0] to the dictionary.\n dictionary[dictSize++] = w + entry.charAt(0);\n enlargeIn--;\n\n w = entry;\n\n if (enlargeIn == 0) {\n enlargeIn = Math.pow(2, numBits);\n numBits++;\n }\n\n }\n }\n};\n return LZString;\n})();\n\nif (typeof define === 'function' && define.amd) {\n define(function () { return LZString; });\n} else if( typeof module !== 'undefined' && module != null ) {\n module.exports = LZString\n} else if( typeof angular !== 'undefined' && angular != null ) {\n angular.module('LZString', [])\n .factory('LZString', function () {\n return LZString;\n });\n}\n"],"names":["n","l","u","t","i","o","r","f","e","c","s","a","h","v","p","y","d","_","g","b","m","k","w","x","L","M","C","P","z","S","H","N","$","I","T","D","A","O","j","q","B","E","F","V","R","U","W","Z","Y","G","J","K","Q","X","nn","tn","en","rn","un","on","ln","cn","fn","an","sn","hn","vn","dn","pn","mn","yn","_n","bn","Sn","gn","Cn","En","wn","_extends","target","source","key","Action","PopStateEventType","createHashHistory","options","createHashLocation","window","globalHistory","pathname","search","hash","parsePath","createLocation","createHashHref","to","base","href","url","hashIndex","createPath","validateHashLocation","location","warning$1","getUrlBasedHistory","invariant","value","message","cond","createKey","getHistoryState","current","state","_ref","path","parsedPath","searchIndex","createClientSideURL","getLocation","createHref","validateLocation","v5Compat","action","listener","handlePop","history","push","historyState","replace","ResultType","matchRoutes","routes","locationArg","basename","stripBasename","branches","flattenRoutes","rankRouteBranches","matches","matchRouteBranch","safelyDecodeURI","parentsMeta","parentPath","flattenRoute","route","index","relativePath","meta","joinPaths","routesMeta","computeScore","_route$path","exploded","explodeOptionalSegments","segments","first","rest","isOptional","required","restExploded","result","subpath","compareIndexes","paramRe","dynamicSegmentValue","indexRouteValue","emptySegmentValue","staticSegmentValue","splatPenalty","isSplat","initialScore","score","segment","branch","matchedParams","matchedPathname","end","remainingPathname","match","matchPath","normalizePathname","pattern","matcher","paramNames","compilePath","pathnameBase","captureGroups","memo","paramName","splatValue","safelyDecodeURIComponent","caseSensitive","warning","regexpSource","error","startIndex","nextChar","resolvePath","fromPathname","toPathname","resolvePathname","normalizeSearch","normalizeHash","getInvalidPathError","char","field","dest","getPathContributingMatches","resolveTo","toArg","routePathnames","locationPathname","isPathRelative","isEmptyPath","from","routePathnameIndex","toSegments","hasExplicitTrailingSlash","hasCurrentTrailingSlash","paths","ErrorResponse","status","statusText","data","internal","isRouteErrorResponse","validMutationMethodsArr","validMutationMethods","validRequestMethodsArr","validRequestMethods","isBrowser","isPolyfill","is","useState","useEffect","useLayoutEffect","useDebugValue","React","useSyncExternalStore$2","subscribe","getSnapshot","getServerSnapshot","inst","forceUpdate","checkIfSnapshotChanged","latestGetSnapshot","prevValue","nextValue","useSyncExternalStore$1","canUseDOM","isServerEnvironment","shim","useSyncExternalStore","module","DataRouterContext","React.createContext","DataRouterStateContext","NavigationContext","LocationContext","RouteContext","RouteErrorContext","useInRouterContext","React.useContext","useLocation","useNavigate","navigator","routePathnamesJson","UNSAFE_getPathContributingMatches","activeRef","React.useRef","React.useEffect","React.useCallback","useParams","routeMatch","useRoutes","dataRouterStateContext","parentMatches","parentParams","parentPathname","parentPathnameBase","parentRoute","locationFromContext","_parsedLocationArg$pa","parsedLocationArg","renderedMatches","_renderMatches","React.createElement","DefaultErrorElement","useRouteError","stack","lightgrey","preStyles","codeStyles","React.Fragment","RenderErrorBoundary","React.Component","props","errorInfo","RenderedRoute","routeContext","children","dataRouterContext","dataRouterState","errors","errorIndex","outlet","errorElement","getChildren","DataRouterHook","DataRouterStateHook","useDataRouterState","hookName","useRouteContext","useCurrentRouteId","thisRoute","_state$errors","routeId","Route","_props","Router","_ref4","basenameProp","locationProp","navigationType","staticProp","navigationContext","React.useMemo","trailingPathname","Routes","_ref5","createRoutesFromChildren","AwaitRenderStatus","neverSettledPromise","React.Children","element","React.isValidElement","treePath","createSearchParams","init","getSearchParamsForLocation","locationSearch","defaultSearchParams","searchParams","HashRouter","_ref2","historyRef","setState","React.useState","React.useLayoutEffect","useSearchParams","defaultInit","defaultSearchParamsRef","navigate","setSearchParams","nextInit","navigateOptions","newSearchParams","functionDebounce","debounce","wait","callFirst","timeout","debouncedFn","clear","flush","call","debounceWrapper","context","args","callNow","document","event","params","evt","handleTouchStart","handleTouchMove","handleTouchEnd","xDown","yDown","xDiff","yDiff","timeDown","startEl","touchCount","swipeThreshold","getNearestAttribute","swipeUnit","swipeTimeout","timeDiff","eventType","changedTouches","eventData","xUp","yUp","el","attributeName","defaultValue","attributeValue","define_import_meta_env_default","require$$0","useSyncExternalStoreShim_production_min","shimModule","reservedModifierKeywords","mappedKeys","mapKey","isHotkeyModifier","parseKeysHookInput","keys","splitKey","parseHotkey","hotkey","combinationKey","description","modifiers","singleCharKeys","pushToCurrentlyPressedKeys","removeFromCurrentlyPressedKeys","currentlyPressedKeys","isReadonlyArray","isHotkeyPressed","hotkeyArray","maybePreventDefault","preventDefault","isHotkeyEnabled","enabled","isKeyboardEventTriggeredByInput","ev","isHotkeyEnabledOnTag","enabledOnTags","targetTagName","tag","isScopeActive","activeScopes","scopes","scope","isHotkeyMatchingKeyboardEvent","ignoreModifiers","alt","mod","shift","ctrl","pressedKeyUppercase","code","ctrlKey","metaKey","shiftKey","altKey","keyCode","pressedKey","BoundHotkeysProxyProvider","createContext","useBoundHotkeysProxy","useContext","deepEqual","isEqual","HotkeysContext","useHotkeysContext","useDeepEqualMemo","ref","useRef","stopPropagation","useSafeLayoutEffect","useHotkeys","callback","dependencies","hasTriggeredRef","_options","_keys","_deps","memoisedCB","useCallback","cbRef","memoisedOptions","_useHotkeysContext","enabledScopes","proxy","isKeyUp","_e$target","_hotkey$keys","handleKeyDown","handleKeyUp","domNode","fixProto","prototype","setPrototypeOf","fixStack","captureStackTrace","__extends","_extendStatics","__","CustomError","_super","_newTarget","_this","extendStatics","__assign","__spreadArray","pack","ar","lowerCase","str","DEFAULT_SPLIT_REGEXP","DEFAULT_STRIP_REGEXP","noCase","input","_a","splitRegexp","_b","stripRegexp","_c","transform","_d","delimiter","start","re","pascalCaseTransform","firstChar","lowerChars","pascalCase","camelCaseTransform","camelCase","dotCase","snakeCase","browser","createDeferred","resolve","reject","promise","onHandler","comEvents","unconsumedDeferred","unHandle","deferred","abortSignal","finished","onAbort","offListener","lastEvent","thrownError","MastoUnexpectedError","MastoDeserializeError","contentType","MastoHttpError","errorOptions","MastoTimeoutError","MastoWebSocketError","__rest","__awaiter","thisArg","_arguments","generator","adopt","fulfilled","step","rejected","__values","__await","__asyncGenerator","verb","resume","settle","fulfill","__asyncValues","sleep","ms","noop","ExponentialBackoffError","attempts","ExponentialBackoff","createPromiseWithResolvers","res","rej","parseLinkHeader","linkHeader","links","link","PaginatorHttp","http","nextPath","nextParams","direction","response","nextUrl","onfulfilled","onrejected","parsed","HttpActionDispatcher","id","media","signal","processing","actionType","encoding","waitForOpen","ws","WebSocket","handleError","handleClose","handleOpen","waitForClose","WebSocketConnectorImpl","logger","e_1","_e","_f","_g","_h","_j","_k","_l","_m","ctor","e_1_1","promiseWithResolvers","toAsyncIterable","events","handler","events_1","events_1_1","WebSocketSubscription","connector","serializer","stream","messages","extra","e_2","messages_1","messages_1_1","e_2_1","rawEvent","payload","WebSocketActionDispatcher","createActionProxy","actionDispatcher","get","apply","SPECIAL_PROPERTIES","property","_1","_2","mergeAbortSignals","signals","abortController","mergeHeadersInit","head","tail","headers","entry","DEFAULT_TIMEOUT_MS","HttpConfigImpl","override","requestInit","headersInit","WebSocketConfigImpl","protocols","BaseHttp","getEncoding","HttpNativeImpl","config","request","text","method","body","errorDescription","details","additionalProperties","LoggerConsoleImpl","level","type","LOG_TYPES","LogLevel","createLogger","isRecord","flattenRecord","object","parent","prev","curr","flatten","stringify","railsQueryString","_transformKeys","transformKeys","SerializerNativeImpl","rawData","formData","createRestAPIClient","createStreamingAPIClient","root","factory","this","global","Toastify","version","divElement","avatarElement","closeElement","width","self","getAxisOffsetAValue","xOffset","yOffset","rootElement","elementToInsert","toastElement","topLeftOffsetSize","topRightOffsetSize","offsetSize","allToasts","classUsed","containsClass","height","offset","axis","elem","yourClass","DEFAULT_OPTIONS_KEYS","slice","cloneArray","arrayLike","length","getCustomOptions","customOptions","isMemoized","isSameValueZero","object1","object2","mergeOptions","existingOptions","newOptions","Cache","isMatchingKeyFunction","keyToMatch","isMatchingKey","maxSize","keysLength","keyLength","existingKey","argIndex","startingIndex","values","currentLength","memoized","onCacheChange","onCacheHit","firstKey","firstValue","keyIndex","createMemoizedFunction","isPromise","onCacheAdd","transformKey","normalizedOptions","cache","canTransformKey","shouldCloneArguments","shouldUpdateOnAdd","shouldUpdateOnChange","shouldUpdateOnHit","newValue","newKey","exports","HAS_WEAK_MAP_SUPPORT","sameValueZeroEqual","isPlainObject","isPromiseLike","isReactElement","getNewCacheFallback","entries","getNewCache","canUseWeakMap","createCircularEqualCreator","comparator","_comparator","indexOrKeyA","indexOrKeyB","parentA","parentB","isCacheableA","isCacheableB","cachedA","areArraysEqual","areMapsEqual","isValueEqual","matchedIndices_1","indexA_1","aValue","aKey","hasMatch_1","matchIndexB_1","bValue","bKey","OWNER","hasOwnProperty","areObjectsEqual","keysA","reactElementA","reactElementB","areRegExpsEqual","areSetsEqual","matchedIndices_2","hasMatch_2","matchIndex_1","HAS_MAP_SUPPORT","HAS_SET_SUPPORT","valueOf","createComparator","createIsEqual","aShape","bShape","shallowEqual","circularDeepEqual","circularShallowEqual","require$$1","memoize","fastEquals","_objectWithoutPropertiesLoose","excluded","sourceKeys","DEFAULT_OPTIONS","combine","_len","functions","_key","compose","_len2","_key2","findExpirationIndex","expirations","createFindKeyIndex","areKeysEqual","cacheKey","keysIndex","originalOptions","isMoized","setName","originalFunctionName","profileName","name","clearExpiration","shouldRemove","expirationIndex","createTimeout","expirationMethod","maxAge","timeoutId","createOnCacheAddSetExpiration","moizedOptions","moized","findKeyIndex","createOnCacheHitResetExpiration","getMaxAgeOptions","statsCache","hasWarningDisplayed","clearStats","collectStats","isCollectingStats","createOnCacheAddIncrementCalls","createOnCacheHitIncrementCallsAndHits","profiles","getDefaultProfileName","getUsagePercentage","calls","hits","getStats","profile","completeStats","completeProfiles","computedProfiles","getStatsOptions","ALWAYS_SKIPPED_PROPERTIES","copyStaticProperties","originalFn","newFn","skippedProperties","descriptor","addInstanceMethods","_moized$_microMemoize","_microMemoizeOptions","cutoff","addInstanceProperties","moizeOptions","originalFunction","microMemoizeOptions","currentCache","createMoizeInstance","configuration","REACT_ELEMENT_TYPE","createMoizedComponent","moizer","reactMoizer","Moized","updater","createGetInitialArgs","size","clone","getCutoff","array","createDefaultReplacer","thisCutoff","valueCutoff","getStringifiedArgument","arg","typeOfArg","defaultArgumentSerializer","getSerializerFunction","getIsSerializedKeyEqual","createOnCacheOperation","_cacheIgnored","_microMemoizeOptionsIgnored","getIsEqual","getIsMatchingKey","getTransformKey","createRefreshableMoized","updateCacheForKey","refreshableMoized","_excluded","moize","passedOptions","moizeable","mergedOptions","curriedFn","curriedOptions","_mergedOptions","coalescedOptions","maxAgeOptions","statsOptions","argMatcher","keyMatcher","expireOptions","onExpire","updateExpire","maxArgs","transformArgs","pThrottle","limit","interval","strict","onDelay","queue","currentTick","activeCount","windowedDelay","now","strictTicks","strictDelay","nextExecutionTime","getDelay","function_","throttled","arguments_","execute","delay","AbortError","parents","coords","siblings","animations","intersections","intervals","debounces","scrollX","scrollY","TGT","DEL","NEW","handleMutations","mutations","elements","getElements","animate","handleResizes","updateAllPos","updatePos","observePosition","oldObserver","rect","invocations","buffer","getCoords","offsetWidth","offsetHeight","rootMargin","px","observer","optionsOrPlugin","getOptions","isPlugin","currentAnimation","forEach","lowPriority","poll","resize","nodes","mutation","node","child","isMounted","preExisting","add","remain","remove","raw","getScrollOffset","getTransitionSizes","oldCoords","newCoords","widthFrom","heightFrom","widthTo","heightTo","styles","paddingY","paddingX","getTarget","isEnabled","callbacks","getPluginTuple","pluginReturn","animation","pluginOrOptions","deltaX","deltaY","keyframes","cleanUp","style","next","finalX","finalY","top","left","deletePosition","adjustScroll","styleReset","scrollDeltaX","scrollDeltaY","scrollBefore","lastHeight","lastWidth","startScroll","smoothScroll","offsetParent","parentStyles","parentCoords","autoAnimate","useAutoAnimate","controller","setController","setEnabled","ReactPropTypesSecret","ReactPropTypesSecret_1","emptyFunction","emptyFunctionWithReset","factoryWithThrowingShims","propName","componentName","propFullName","secret","err","getShim","ReactPropTypes","ReactIs","throwOnDirectAccess","propTypesModule","isMenuOpen","batchedUpdates","unstable_batchedUpdates","floatEqual","diff","getTransition","transition","safeCall","internalKey","getName","component","mergeProps","targetProp","sourceProp","parsePadding","paddingStr","padding","right","getScrollAncestor","overflow","overflowX","overflowY","commonProps","isDisabled","isHovering","indexOfNode","nodeList","stylePropTypes","oneOfType","string","func","menuPropTypes","bool","number","oneOf","rootMenuPropTypes","exact","uncontrolledMenuPropTypes","useBEM","block","className","useMemo","blockElement","classString","expandedClassName","menuContainerClass","menuClass","menuArrowClass","menuItemClass","menuDividerClass","menuHeaderClass","menuGroupClass","subMenuClass","HoverItemContext","MenuListItemContext","MenuListContext","EventHandlersContext","RadioGroupContext","SettingsContext","Keys","HoverActionTypes","CloseReason","FocusPositions","MenuStateMap","positionAbsolute","roleNone","roleMenuitem","dummyItemProps","MenuContainer","containerRef","containerProps","isOpen","theming","onClose","itemTransition","jsx","createSubmenuCtx","timer","count","closeDelay","pending","settled","useItems","menuRef","focusRef","hoverItem","setHoverItem","mutableState","updateItems","item","items","dispatch","nextIndex","hoverIndex","sortItems","orderedNodes","newItem","prevItem","getPositionHelpers","menuScroll","boundingBoxPadding","menuRect","containerRect","boundingRect","getLeftOverflow","getRightOverflow","getTopOverflow","getBottomOverflow","leftOverflow","rightOverflow","topOverflow","bottomOverflow","placeArrowVertical","arrowRef","menuY","anchorRect","placeLeftorRight","placeLeftorRightY","placeLeftX","placeRightX","confineHorizontally","confineVertically","arrow","position","computedDirection","placeArrowHorizontal","menuX","placeToporBottom","placeToporBottomX","placeTopY","placeBottomY","positionMenu","align","gap","positionHelpers","isHorizontal","horizontalOffset","verticalOffset","arrowElt","useIsomorphicLayoutEffect","setRef","instance","useCombinedRef","refA","refB","offScreen","MenuList","ariaLabel","menuClassName","menuStyle","arrowProps","anchorPoint","anchorRef","focusProps","externalRef","parentScrollingRef","setDownOverflow","repositionFlag","captureFocus","endTransition","menuItemFocus","restProps","menuPosition","setMenuPosition","arrowPosition","setArrowPosition","overflowData","setOverflowData","expandedDirection","setExpandedDirection","submenuCtx","reposSubmenu","forceReposSubmenu","useReducer","boundingBoxRef","rootMenuRef","rootAnchorRef","scrollNodesRef","reposition","viewScroll","submenuCloseDelay","parentSubmenuCtx","reposFlag","prevOpen","latestMenuSize","latestHandlePosition","openTransition","closeTransition","scrollNodes","onKeyDown","onAnimationEnd","onPointerMove","onPointerLeave","handlePosition","noOverflowCheck","_anchorRef$current","arrowX","arrowY","menuHeight","overflowAmt","prevHeight","anchorScroll","scroll","handleScroll","scrollObservers","hasOverflow","parentScroll","resizeObserver","borderBoxSize","inlineSize","blockSize","borderRect","flushSync","observeTarget","alwaysUpdate","setItemFocus","menuElt","itemContext","maxHeight","listContext","overflowStyle","arrowModifiers","_arrowClassName","menu","ControlledMenu","forwardRef","initialMounted","unmountOnClose","transitionTimeout","submenuOpenDelay","portal","onItemClick","settings","eventHandlers","isCheckorRadio","keepOpen","menuList","createPortal","PRE_ENTER","ENTERING","ENTERED","PRE_EXIT","EXITING","EXITED","UNMOUNTED","STATUS","getState","startOrEnd","unmounted","getEndStatus","unmountOnExit","getTimeout","updateState","latestState","onChange","useTransition","enter","exit","preEnter","preExit","initialEntered","mountOnEnter","enterTimeout","exitTimeout","toggle","toEnter","transitState","enterStage","useMenuState","initialOpen","toggleMenu","useMenuStateAndFocus","menuProps","setMenuItemFocus","openMenu","useClick","onToggle","skipOpen","useMenuChange","onMenuChange","Menu","menuButton","instanceRef","stateProps","buttonRef","anchorProps","button","buttonProps","renderButton","cloneElement","useImperativeHandle","Fragment","withHovering","WrappedComponent","Component","WithHovering","itemRef","useItemEffect","SubMenu","disabled","label","openTrigger","itemProps","parentMenuRef","parentDir","parentOverflow","isParentOpen","isPortal","_openMenu","timerId","stopTimer","setHover","delayOpen","onKeyDownOfRoot","handled","externalItemRef","itemClassName","restItemProps","mergedItemProps","getMenuList","container","useItemState","unsetHover","onBlur","keepHover","MenuItem","checked","onClick","restStateProps","radioGroup","isRadio","isCheckBox","isAnchor","isChecked","handleClick","mergedProps","menuItemProps","FocusableItem","renderChildren","MenuDivider","MenuHeader","MenuGroup","takeOverflow","setOverflowStyle","useWindowSize","setSize","handleResize","CanonicalizeLocaleList","locales","regions","UNICODE_EXTENSION_SEQUENCE_REGEX","condition","Err","DEFAULT_MATCHING_THRESHOLD","PROCESSED_DATA","processData","paradigmLocales","jsonData","matchVariables","all","isMatched","locale","languageMatchInfoLocale","language","script","region","shouldInclude","matchRegions","expandedMatchedRegions","list","serializeLSR","lsr","findMatchingDistanceForLSR","desired","supported","_i","distance","findMatchingDistance","desiredLocale","supportedLocale","desiredLSR","supportedLSR","matchingDistance","findBestMatch","requestedLocales","supportedLocales","threshold","lowestDistance","BestFitMatcher","availableLocales","getDefaultLocale","foundLocale","extension","noExtensionLocales","noExtensionLocaleMap","noExtensionLocale","BestAvailableLocale","candidate","pos","LookupMatcher","requestedLocales_1","availableLocale","UnicodeExtensionValue","searchValue","done","len","ResolveLocale","relevantExtensionKeys","localeData","supportedExtension","relevantExtensionKeys_1","foundLocaleData","keyLocaleData","supportedExtensionAddition","requestedValue","optionsValue","privateIndex","preExtension","postExtension","defaultLocale","opts","semver","validateAndParse","isWildcard","tryParse","forceType","compareStrings","ap","bp","compareSegments","compareVersions","v1","v2","n1","n2","p1","p2","compare","operator","assertValidOperator","operatorResMap","allowedOperators","op","satisfies","range","v3","vp","r1","r2","r3","rp","nonZero","RetryOperation","timeouts","retry_operation","currentTime","timeoutOps","counts","mainError","mainErrorCount","attempt","random","obj","methods","original","retry","objectToString","isError","errorMessages","isNetworkError","decorateErrorWithCounts","attemptNumber","retriesLeft","pRetry","operation","abortHandler","finalError","Combobox","tabInsertsSuggestions","defaultFirstOption","keyboardBindings","trackComposition","commitWithElement","visible","indexDiff","focusEl","els","focusIndex","indexOfItem","newIndex","scrollTo","combobox","commit","fireCommitEvent","inViewport","scrollTop","containerBottom","bottom","boundary","query","cursor","multiWord","lookBackIndex","lastMatchPosition","pre","properties","propertyNamesToCopy","mirrorMap","textFieldMirror","textField","markerPosition","nodeName","mirror","marker","before","after","textFieldSelectionPosition","mirrorRect","markerRect","states","isTopLayer","TextExpander","expander","beginning","remaining","detail","suffix","found","providers","provide","TextExpanderElement","keysAttr","multiWordAttr","globalMultiWord","fastDeepEqual","equal","runes","nextUnits","isGrapheme","isVariationSelector","isDiacriticalMark","isZeroWidthJoiner","isFirstOfSurrogatePair","isRegionalIndicator","isSubdivisionFlag","isSupplementarySpecialpurposePlane","isFitzpatrickModifier","betweenInclusive","codePointFromSurrogatePair","substring","ansiRegex","onlyFirst","regex","stripAnsi","charRegex","astralRange","comboMarksRange","comboHalfMarksRange","comboSymbolsRange","comboMarksExtendedRange","comboMarksSupplementRange","comboRange","varRange","teluguVowels","teluguVowelsDiacritic","teluguConsonants","teluguConsonantsRare","teluguModifiers","teluguSingle","teluguDouble","telugu","astral","combo","fitz","modifier","nonAstral","regional","surrogatePair","zeroWidthJoiner","blackFlag","optModifier","optVar","optJoin","seq","nonAstralCombo","symbol","stringLength","countAnsiEscapeCodes","IDX","HEX","uid","num","promisifyRequest","createStore","dbName","storeName","dbp","txMode","db","defaultGetStoreFunc","defaultGetStore","customStore","store","set","getMany","del","delMany","eachCursor","LiteYTEmbed","title","shadowDom","nonce","oldVal","newVal","isIntersectionObserver","autoplay","wantsNoCookie","embedTarget","iframeHTML","posterUrlWebp","posterUrlJpeg","kind","linkElem","digit","decode83","pow","PI","PI2","sRGBToLinear","linearTosRGB","signSqr","fastCos","cos","getBlurHashAverageColor","blurHash","val","decodeBlurHash","punch","sizeFlag","numX","numY","basis","basisY","colorIndex","pixelIndex","yh","xw","maximumValue","colors","averageColor","bytesPerRow","pixels","useResolvedElement","subscriber","refOrElement","lastReportRef","refOrElementRef","cbElementRef","evaluateSubscription","cbElement","extractSize","boxProp","sizeType","useResizeObserver","onResize","onResizeRef","round","resizeObserverRef","_useState","didUnmount","previous","refCallback","reportedWidth","reportedHeight","newWidth","newHeight","newSize","styleRoot","styleChild","isSsr","isTouch","make3dTransformValue","scale","min","max","getOffsetBounds","containerDimension","childDimension","centerContained","classnames","other","abs","sqrt","isMac","isDragInteraction","isZoomInteraction","isZoomGesture","wheelEvent","cancelEvent","getDistance","calculateScale","startTouches","endTouches","startDistance","endDistance","isCloseTo","expected","swing","getPointByPageCoordinates","touch","getPageCoordinatesByTouches","touches","sum","getVectorAvg","vectors","clamp","shouldInterceptWheel","getElementSize","calculateVelocity","startPoint","endPoint","comparePoints","noup","zeroPoint","PinchZoom","createRef","clickEvent","touchEndEvent","touchStartEvent","touchMoveEvent","pageX","pageY","deltaMode","scaleDelta","likeTouchEvent","center","dScale","inertiaFriction","inertia","renderFrame","prevOffset","currentCoordinates","prevPoint","newScale","touchCenter","needZoomOut","zoomFactor","startZoomFactor","updateProgress","progress","elWidth","elHeight","minOffsetX","maxOffsetX","minOffsetY","maxOffsetY","__x","__y","animated","duration","startOffset","containerCenter","diffZoomFactor","diffOffset","updateFrame","originalZoomFactor","lastCenter","sanitizedOffset","targetOffset","scaleFactor","offsetLeft","offsetTop","_document","_html","_body","scrollLeft","posTop","posLeft","frameFn","startTime","timeFn","frameTime","div","xZoomFactor","yZoomFactor","eventName","img","newInteraction","interaction","fingers","time","mouseEvent","isEnd","isStart","Children","any","__defProp","__defNormalProp","__publicField","observerMap","RootIds","rootId","unsupportedValue","getRootId","optionsToId","createObserver","thresholds","inView","observe","fallbackInView","bounds","isPlainChildren","InView","prevProps","trackVisibility","as","triggerOnce","skip","initialInView","LZString","keyStrBase64","keyStrUriSafe","baseReverseDic","getBaseValue","alphabet","character","compressed","uncompressed","buf","TotalLen","current_value","bitsPerChar","getCharFromInt","context_dictionary","context_dictionaryToCreate","context_c","context_wc","context_w","context_enlargeIn","context_dictSize","context_numBits","context_data","context_data_val","context_data_position","ii","resetValue","getNextValue","dictionary","enlargeIn","dictSize","numBits","bits","resb","maxpower","power"],"mappings":"AAAA,IAAIA,GAAEC,EAAEC,GAAEC,GAAEC,GAAEC,GAAEC,GAAEC,GAAEC,GAAEC,GAAE,CAAA,EAAGC,GAAE,GAAGC,GAAE,oEAAoEC,GAAE,MAAM,QAAQ,SAASC,GAAEb,EAAEC,EAAE,CAAC,QAAQC,KAAKD,EAAED,EAAEE,CAAC,EAAED,EAAEC,CAAC,EAAE,OAAOF,CAAC,CAAC,SAASc,GAAEd,EAAE,CAAC,IAAIC,EAAED,EAAE,WAAWC,GAAGA,EAAE,YAAYD,CAAC,CAAC,CAAC,SAASe,GAAEd,EAAEC,EAAEC,EAAE,CAAC,IAAIC,EAAE,EAAEE,EAAEC,EAAE,CAAA,EAAG,IAAID,KAAKJ,EAASI,GAAP,MAASF,EAAEF,EAAEI,CAAC,EAASA,GAAP,MAAS,EAAEJ,EAAEI,CAAC,EAAEC,EAAED,CAAC,EAAEJ,EAAEI,CAAC,EAAE,GAAG,UAAU,OAAO,IAAIC,EAAE,SAAS,UAAU,OAAO,EAAEP,GAAE,KAAK,UAAU,CAAC,EAAEG,GAAe,OAAOF,GAA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CACI,GAAI,CACA,SAAU,KACV,UAAW,IACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,GACd,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,GACd,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,IAAK,CACD,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,IACd,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,IACd,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,IACd,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,KAC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ACJ,EACD,CACI,IAAK,CACD,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,IAAK,CACD,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,IAAK,CACD,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,IAAK,CACD,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,IAAK,CACD,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,IAAK,CACD,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,IAAK,CACD,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,IAAK,CACD,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,IAAK,CACD,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,IAAK,CACD,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,IAAK,CACD,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,IAAK,CACD,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,IAAK,CACD,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,IAAK,CACD,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,IAAK,CACD,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAA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,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MAC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MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,GAAI,CACA,SAAU,MACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,IAAK,CACD,SAAU,IACV,UAAW,IACd,CACJ,EACD,CACI,UAAW,CACP,SAAU,UACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,UAAW,CACP,SAAU,UACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,UAAW,CACP,SAAU,UACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,UAAW,CACP,SAAU,UACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,UAAW,CACP,SAAU,UACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,UAAW,CACP,SAAU,UACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,UAAW,CACP,SAAU,UACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,UAAW,CACP,SAAU,UACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,UAAW,CACP,SAAU,UACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,UAAW,CACP,SAAU,UACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,UAAW,CACP,SAAU,UACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,UAAW,CACP,SAAU,UACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,UAAW,CACP,SAAU,UACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,UAAW,CACP,SAAU,UACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,UAAW,CACP,SAAU,UACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,UAAW,CACP,SAAU,UACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,UAAW,CACP,SAAU,UACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,UAAW,CACP,SAAU,UACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,UAAW,CACP,SAAU,UACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,UAAW,CACP,SAAU,UACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,UAAW,CACP,SAAU,UACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,UAAW,CACP,SAAU,UACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,UAAW,CACP,SAAU,UACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,UAAW,CACP,SAAU,UACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,UAAW,CACP,SAAU,UACV,UAAW,GACd,CACJ,EACD,CACI,UAAW,CACP,SAAU,UACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,UAAW,CACP,SAAU,UACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,UAAW,CACP,SAAU,UACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,UAAW,CACP,SAAU,UACV,UAAW,KACX,QAAS,MACZ,CACJ,EACD,CACI,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ACd,CACJ,EACD,CACI,gBAAiB,CACb,SAAU,gBACV,UAAW,GACd,CACJ,EACD,CACI,iBAAkB,CACd,SAAU,iBACV,UAAW,GACd,CACJ,EACD,CACI,SAAU,CACN,SAAU,SACV,UAAW,GACd,CACJ,EACD,CACI,aAAc,CACV,SAAU,aACV,UAAW,GACd,CACJ,EACD,CACI,UAAW,CACP,SAAU,cACV,UAAW,GACd,CACJ,EACD,CACI,cAAe,CACX,SAAU,cACV,UAAW,GACd,CACJ,EACD,CACI,SAAU,CACN,SAAU,SACV,UAAW,GACd,CACJ,EACD,CACI,iBAAkB,CACd,SAAU,iBACV,UAAW,GACd,CACJ,EACD,CACI,kBAAmB,CACf,SAAU,kBACV,UAAW,GACd,CACJ,EACD,CACI,SAAU,CACN,SAAU,SACV,UAAW,GACd,CACJ,EACD,CACI,iBAAkB,CACd,SAAU,iBACV,UAAW,GACd,CACJ,EACD,CACI,kBAAmB,CACf,SAAU,kBACV,UAAW,GACd,CACJ,EACD,CACI,SAAU,CACN,SAAU,SACV,UAAW,GACd,CACJ,EACD,CACI,iBAAkB,CACd,SAAU,iBACV,UAAW,GACd,CACJ,EACD,CACI,kBAAmB,CACf,SAAU,kBACV,UAAW,GACd,CACJ,EACD,CACI,YAAa,CACT,SAAU,YACV,UAAW,GACd,CACJ,EACD,CACI,QAAS,CACL,SAAU,QACV,UAAW,GACd,CACJ,CACJ,CACJ,CACJ,CACL,EC1jFWsqC,GAAU,CACjB,MAAO,CACH,MACA,sBACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACH,EACD,MAAO,CACH,MACA,sBACA,MACA,MACA,MACA,MACA,MACA,MACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACH,EACD,MAAO,CACH,MACA,MACA,MACA,MACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACH,EACD,MAAO,CACH,MACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACH,EACD,MAAO,CACH,MACA,MACA,MACA,MACA,MACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACH,EACD,MAAO,CACH,MACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACH,EACD,MAAO,CACH,MACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACH,EACD,MAAO,CACH,MACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACH,EACD,MAAO,CACH,MACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACH,EACD,MAAO,CACH,MACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACH,EACD,MAAO,CACH,MACA,KACA,KACA,KACA,KACA,IACH,EACD,MAAO,CACH,MACA,MACA,MACA,MACA,sBACA,MACA,MACA,MACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACH,EACD,MAAO,CACH,MACA,KACA,KACA,KACA,KACA,IACH,EACD,MAAO,CACH,MACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACH,EACD,MAAO,CACH,MACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACH,EACD,MAAO,CACH,MACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACH,EACD,MAAO,CACH,MACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACH,EACD,MAAO,CACH,MACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACH,EACD,MAAO,CACH,MACA,KACA,KACA,KACA,KACA,KACA,IACH,EACD,MAAO,CACH,MACA,KACA,KACA,KACA,KACA,IACH,EACD,MAAO,CACH,MACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACH,EACD,MAAO,CACH,MACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACH,EACD,IAAO,CACH,MACA,MACA,MACA,MACA,MACA,MACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACH,EACD,IAAO,CACH,MACA,KACA,KACA,KACA,KACA,IACH,EACD,IAAO,CACH,MACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACH,EACD,IAAO,CACH,MACA,MACA,MACA,MACA,MACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACH,EACD,IAAO,CACH,MACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACH,EACD,IAAO,CACH,MACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACH,EACD,IAAO,CACH,MACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACH,EACD,IAAO,CACH,MACA,MACA,MACA,MACA,MACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACH,EACD,IAAO,CACH,MACA,MACA,MACA,MACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACH,EACD,GAAM,CACF,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACH,EACD,GAAM,CACF,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACH,EACD,GAAM,CACF,KACA,KACA,KACA,KACA,KACA,IACH,EACD,GAAM,CACF,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA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,IAAI,EAAGE,CAAO,EAC/BA,IAGH,CACF,CACH,EACE,OAAO/B,CACT,IAI4C9lD,GAAU,KACpDA,UAAiB8lD,EACR,OAAO,QAAY,KAAe,SAAW,MACtD,QAAQ,OAAO,WAAY,EAAE,EAC5B,QAAQ,WAAY,UAAY,CAC/B,OAAOA,CACX,CAAG","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113]}