@worldresources/wri-design-systems 2.139.0 → 2.140.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -2152,7 +2152,24 @@
2152
2152
  justify-content: space-between;
2153
2153
  `,Lr=r.css`
2154
2154
  margin-top: 9px;
2155
- `,Tr=e.Table.Row,_r=e.Table.Cell;function Pr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Mr(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),n}var Dr,Ir={exports:{}},Nr={},Vr={exports:{}},zr={exports:{}},Ar={};var Br,Hr,Fr,Zr,Gr,qr,Wr,Ur,Xr,Yr,Kr,Jr,Qr,ei={};
2155
+ `,Tr=e.Table.Row,_r=e.Table.Cell,Pr=r.css`
2156
+ border: 1px solid ${d("neutral",300)};
2157
+ `,Mr=r.css`
2158
+ padding: 16px;
2159
+ cursor: pointer;
2160
+ &:focus-visible {
2161
+ outline-color: ${d("primary",700)};
2162
+ }
2163
+ &:hover {
2164
+ box-shadow: 0px 2px 4px -2px #0000001a;
2165
+ box-shadow: 0px 4px 6px -1px #0000001a;
2166
+ background-color: color-mix(
2167
+ in srgb,
2168
+ ${d("primary",500)} 20%,
2169
+ transparent
2170
+ );
2171
+ }
2172
+ `;function Dr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ir(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),n}var Nr,Vr={exports:{}},zr={},Ar={exports:{}},Br={exports:{}},Hr={};var Fr,Zr,Gr,qr,Wr,Ur,Xr,Yr,Kr,Jr,Qr,ei,ti,ni={};
2156
2173
  /** @license React v16.13.1
2157
2174
  * react-is.development.js
2158
2175
  *
@@ -2160,7 +2177,7 @@
2160
2177
  *
2161
2178
  * This source code is licensed under the MIT license found in the
2162
2179
  * LICENSE file in the root directory of this source tree.
2163
- */function ti(){return Hr||(Hr=1,"production"===process.env.NODE_ENV?zr.exports=function(){if(Dr)return Ar;Dr=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,x=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,m=e?Symbol.for("react.scope"):60119;function b(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:switch(e=e.type){case l:case c:case r:case o:case i:case d:return e;default:switch(e=e&&e.$$typeof){case s:case u:case f:case h:case a:return e;default:return p}}case n:return p}}}function y(e){return b(e)===c}return Ar.AsyncMode=l,Ar.ConcurrentMode=c,Ar.ContextConsumer=s,Ar.ContextProvider=a,Ar.Element=t,Ar.ForwardRef=u,Ar.Fragment=r,Ar.Lazy=f,Ar.Memo=h,Ar.Portal=n,Ar.Profiler=o,Ar.StrictMode=i,Ar.Suspense=d,Ar.isAsyncMode=function(e){return y(e)||b(e)===l},Ar.isConcurrentMode=y,Ar.isContextConsumer=function(e){return b(e)===s},Ar.isContextProvider=function(e){return b(e)===a},Ar.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Ar.isForwardRef=function(e){return b(e)===u},Ar.isFragment=function(e){return b(e)===r},Ar.isLazy=function(e){return b(e)===f},Ar.isMemo=function(e){return b(e)===h},Ar.isPortal=function(e){return b(e)===n},Ar.isProfiler=function(e){return b(e)===o},Ar.isStrictMode=function(e){return b(e)===i},Ar.isSuspense=function(e){return b(e)===d},Ar.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===o||e===i||e===d||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===h||e.$$typeof===a||e.$$typeof===s||e.$$typeof===u||e.$$typeof===g||e.$$typeof===v||e.$$typeof===m||e.$$typeof===x)},Ar.typeOf=b,Ar}():zr.exports=(Br||(Br=1,"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,x=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,m=e?Symbol.for("react.scope"):60119;function b(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:var x=e.type;switch(x){case l:case c:case r:case o:case i:case d:return x;default:var g=x&&x.$$typeof;switch(g){case s:case u:case f:case h:case a:return g;default:return p}}case n:return p}}}var y=l,C=c,w=s,j=a,k=t,S=u,$=r,E=f,O=h,R=n,L=o,T=i,_=d,P=!1;function M(e){return b(e)===c}ei.AsyncMode=y,ei.ConcurrentMode=C,ei.ContextConsumer=w,ei.ContextProvider=j,ei.Element=k,ei.ForwardRef=S,ei.Fragment=$,ei.Lazy=E,ei.Memo=O,ei.Portal=R,ei.Profiler=L,ei.StrictMode=T,ei.Suspense=_,ei.isAsyncMode=function(e){return P||(P=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),M(e)||b(e)===l},ei.isConcurrentMode=M,ei.isContextConsumer=function(e){return b(e)===s},ei.isContextProvider=function(e){return b(e)===a},ei.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},ei.isForwardRef=function(e){return b(e)===u},ei.isFragment=function(e){return b(e)===r},ei.isLazy=function(e){return b(e)===f},ei.isMemo=function(e){return b(e)===h},ei.isPortal=function(e){return b(e)===n},ei.isProfiler=function(e){return b(e)===o},ei.isStrictMode=function(e){return b(e)===i},ei.isSuspense=function(e){return b(e)===d},ei.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===o||e===i||e===d||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===h||e.$$typeof===a||e.$$typeof===s||e.$$typeof===u||e.$$typeof===g||e.$$typeof===v||e.$$typeof===m||e.$$typeof===x)},ei.typeOf=b}()),ei)),zr.exports}function ni(){if(Zr)return Fr;Zr=1;return Fr="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function ri(){return qr?Gr:(qr=1,Gr=Function.call.bind(Object.prototype.hasOwnProperty))}function ii(){if(Yr)return Xr;Yr=1;var e=ti(),t=o,n=ni(),r=ri(),i=function(){if(Ur)return Wr;Ur=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=ni(),n={},r=ri();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function i(i,o,a,s,l){if("production"!==process.env.NODE_ENV)for(var c in i)if(r(i,c)){var u;try{if("function"!=typeof i[c]){var d=Error((s||"React class")+": "+a+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}u=i[c](o,c,s,a,null,t)}catch(e){u=e}if(!u||u instanceof Error||e((s||"React class")+": type specification of "+a+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof u+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),u instanceof Error&&!(u.message in n)){n[u.message]=!0;var p=l?l():"";e("Failed "+a+" type: "+u.message+(null!=p?p:""))}}}return i.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(n={})},Wr=i}(),a=function(){};function s(){return null}return"production"!==process.env.NODE_ENV&&(a=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),Xr=function(o,l){var c="function"==typeof Symbol&&Symbol.iterator;var u="<<anonymous>>",d={array:x("array"),bigint:x("bigint"),bool:x("boolean"),func:x("function"),number:x("number"),object:x("object"),string:x("string"),symbol:x("symbol"),any:f(s),arrayOf:function(e){return f((function(t,r,i,o,a){if("function"!=typeof e)return new h("Property `"+a+"` of component `"+i+"` has invalid PropType notation inside arrayOf.");var s=t[r];if(!Array.isArray(s))return new h("Invalid "+o+" `"+a+"` of type `"+m(s)+"` supplied to `"+i+"`, expected an array.");for(var l=0;l<s.length;l++){var c=e(s,l,i,o,a+"["+l+"]",n);if(c instanceof Error)return c}return null}))},element:f((function(e,t,n,r,i){var a=e[t];return o(a)?null:new h("Invalid "+r+" `"+i+"` of type `"+m(a)+"` supplied to `"+n+"`, expected a single ReactElement.")})),elementType:f((function(t,n,r,i,o){var a=t[n];return e.isValidElementType(a)?null:new h("Invalid "+i+" `"+o+"` of type `"+m(a)+"` supplied to `"+r+"`, expected a single ReactElement type.")})),instanceOf:function(e){return f((function(t,n,r,i,o){if(!(t[n]instanceof e)){var a=e.name||u;return new h("Invalid "+i+" `"+o+"` of type `"+(((s=t[n]).constructor&&s.constructor.name?s.constructor.name:u)+"` supplied to `")+r+"`, expected instance of `"+a+"`.")}var s;return null}))},node:f((function(e,t,n,r,i){return v(e[t])?null:new h("Invalid "+r+" `"+i+"` supplied to `"+n+"`, expected a ReactNode.")})),objectOf:function(e){return f((function(t,i,o,a,s){if("function"!=typeof e)return new h("Property `"+s+"` of component `"+o+"` has invalid PropType notation inside objectOf.");var l=t[i],c=m(l);if("object"!==c)return new h("Invalid "+a+" `"+s+"` of type `"+c+"` supplied to `"+o+"`, expected an object.");for(var u in l)if(r(l,u)){var d=e(l,u,o,a,s+"."+u,n);if(d instanceof Error)return d}return null}))},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&a(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),s;return f((function(t,n,r,i,o){for(var a=t[n],s=0;s<e.length;s++)if(p(a,e[s]))return null;var l=JSON.stringify(e,(function(e,t){return"symbol"===b(t)?String(t):t}));return new h("Invalid "+i+" `"+o+"` of value `"+String(a)+"` supplied to `"+r+"`, expected one of "+l+".")}))},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&a("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var t=0;t<e.length;t++){var i=e[t];if("function"!=typeof i)return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+y(i)+" at index "+t+"."),s}return f((function(t,i,o,a,s){for(var l=[],c=0;c<e.length;c++){var u=(0,e[c])(t,i,o,a,s,n);if(null==u)return null;u.data&&r(u.data,"expectedType")&&l.push(u.data.expectedType)}return new h("Invalid "+a+" `"+s+"` supplied to `"+o+"`"+(l.length>0?", expected one of type ["+l.join(", ")+"]":"")+".")}))},shape:function(e){return f((function(t,r,i,o,a){var s=t[r],l=m(s);if("object"!==l)return new h("Invalid "+o+" `"+a+"` of type `"+l+"` supplied to `"+i+"`, expected `object`.");for(var c in e){var u=e[c];if("function"!=typeof u)return g(i,o,a,c,b(u));var d=u(s,c,i,o,a+"."+c,n);if(d)return d}return null}))},exact:function(e){return f((function(i,o,a,s,l){var c=i[o],u=m(c);if("object"!==u)return new h("Invalid "+s+" `"+l+"` of type `"+u+"` supplied to `"+a+"`, expected `object`.");var d=t({},i[o],e);for(var p in d){var f=e[p];if(r(e,p)&&"function"!=typeof f)return g(a,s,l,p,b(f));if(!f)return new h("Invalid "+s+" `"+l+"` key `"+p+"` supplied to `"+a+"`.\nBad object: "+JSON.stringify(i[o],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var x=f(c,p,a,s,l+"."+p,n);if(x)return x}return null}))}};function p(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function h(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function f(e){if("production"!==process.env.NODE_ENV)var t={},r=0;function i(i,o,s,c,d,p,f){if(c=c||u,p=p||s,f!==n){if(l){var x=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw x.name="Invariant Violation",x}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var g=c+":"+s;!t[g]&&r<3&&(a("You are manually calling a React.PropTypes validation function for the `"+p+"` prop on `"+c+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[g]=!0,r++)}}return null==o[s]?i?null===o[s]?new h("The "+d+" `"+p+"` is marked as required in `"+c+"`, but its value is `null`."):new h("The "+d+" `"+p+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(o,s,c,d,p)}var o=i.bind(null,!1);return o.isRequired=i.bind(null,!0),o}function x(e){return f((function(t,n,r,i,o,a){var s=t[n];return m(s)!==e?new h("Invalid "+i+" `"+o+"` of type `"+b(s)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null}))}function g(e,t,n,r,i){return new h((e||"React class")+": "+t+" type `"+n+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+i+"`.")}function v(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(v);if(null===e||o(e))return!0;var t=function(e){var t=e&&(c&&e[c]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(!t)return!1;var n,r=t.call(e);if(t!==e.entries){for(;!(n=r.next()).done;)if(!v(n.value))return!1}else for(;!(n=r.next()).done;){var i=n.value;if(i&&!v(i[1]))return!1}return!0;default:return!1}}function m(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function b(e){if(null==e)return""+e;var t=m(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function y(e){var t=b(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return h.prototype=Error.prototype,d.checkPropTypes=i,d.resetWarningCache=i.resetWarningCache,d.PropTypes=d,d},Xr}function oi(){if(Qr)return Vr.exports;if(Qr=1,"production"!==process.env.NODE_ENV){var e=ti();Vr.exports=ii()(e.isElement,!0)}else Vr.exports=function(){if(Jr)return Kr;Jr=1;var e=ni();function t(){}function n(){}return n.resetWarningCache=t,Kr=function(){function r(t,n,r,i,o,a){if(a!==e){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function i(){return r}r.isRequired=r;var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o}}()();return Vr.exports}function ai(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=ai(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function si(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=ai(e))&&(r&&(r+=" "),r+=t);return r}var li,ci=Mr(Object.freeze({__proto__:null,clsx:si,default:si})),ui={},di={};function pi(){if(li)return di;return li=1,Object.defineProperty(di,"__esModule",{value:!0}),di.dontSetMe=function(e,t,n){if(e[t])return new Error("Invalid prop ".concat(t," passed to ").concat(n," - do not set this, set it on the child."))},di.findInArray=function(e,t){for(let n=0,r=e.length;n<r;n++)if(t.apply(t,[e[n],n,e]))return e[n]},di.int=function(e){return parseInt(e,10)},di.isFunction=function(e){return"function"==typeof e||"[object Function]"===Object.prototype.toString.call(e)},di.isNum=function(e){return"number"==typeof e&&!isNaN(e)},di}var hi,fi,xi={};function gi(){if(fi)return ui;fi=1,Object.defineProperty(ui,"__esModule",{value:!0}),ui.addClassName=a,ui.addEvent=function(e,t,n,r){if(!e)return;const i={capture:!0,...r};e.addEventListener?e.addEventListener(t,n,i):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n},ui.addUserSelectStyles=function(e){if(!e)return;let t=e.getElementById("react-draggable-style-el");t||(t=e.createElement("style"),t.type="text/css",t.id="react-draggable-style-el",t.innerHTML=".react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n",t.innerHTML+=".react-draggable-transparent-selection *::selection {all: inherit;}\n",e.getElementsByTagName("head")[0].appendChild(t));e.body&&a(e.body,"react-draggable-transparent-selection")},ui.createCSSTransform=function(e,n){const r=o(e,n,"px");return{[(0,t.browserPrefixToKey)("transform",t.default)]:r}},ui.createSVGTransform=function(e,t){return o(e,t,"")},ui.getTouch=function(t,n){return t.targetTouches&&(0,e.findInArray)(t.targetTouches,(e=>n===e.identifier))||t.changedTouches&&(0,e.findInArray)(t.changedTouches,(e=>n===e.identifier))},ui.getTouchIdentifier=function(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier},ui.getTranslation=o,ui.innerHeight=function(t){let n=t.clientHeight;const r=t.ownerDocument.defaultView.getComputedStyle(t);return n-=(0,e.int)(r.paddingTop),n-=(0,e.int)(r.paddingBottom),n},ui.innerWidth=function(t){let n=t.clientWidth;const r=t.ownerDocument.defaultView.getComputedStyle(t);return n-=(0,e.int)(r.paddingLeft),n-=(0,e.int)(r.paddingRight),n},ui.matchesSelector=i,ui.matchesSelectorAndParentsTo=function(e,t,n){let r=e;do{if(i(r,t))return!0;if(r===n)return!1;r=r.parentNode}while(r);return!1},ui.offsetXYFromParent=function(e,t,n){const r=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect(),i=(e.clientX+t.scrollLeft-r.left)/n,o=(e.clientY+t.scrollTop-r.top)/n;return{x:i,y:o}},ui.outerHeight=function(t){let n=t.clientHeight;const r=t.ownerDocument.defaultView.getComputedStyle(t);return n+=(0,e.int)(r.borderTopWidth),n+=(0,e.int)(r.borderBottomWidth),n},ui.outerWidth=function(t){let n=t.clientWidth;const r=t.ownerDocument.defaultView.getComputedStyle(t);return n+=(0,e.int)(r.borderLeftWidth),n+=(0,e.int)(r.borderRightWidth),n},ui.removeClassName=s,ui.removeEvent=function(e,t,n,r){if(!e)return;const i={capture:!0,...r};e.removeEventListener?e.removeEventListener(t,n,i):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null},ui.removeUserSelectStyles=function(e){if(!e)return;try{if(e.body&&s(e.body,"react-draggable-transparent-selection"),e.selection)e.selection.empty();else{const t=(e.defaultView||window).getSelection();t&&"Caret"!==t.type&&t.removeAllRanges()}}catch(e){}};var e=pi(),t=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=n(t);if(r&&r.has(e))return r.get(e);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(i,a,s):i[a]=e[a]}i.default=e,r&&r.set(e,i);return i}(function(){if(hi)return xi;hi=1,Object.defineProperty(xi,"__esModule",{value:!0}),xi.browserPrefixToKey=n,xi.browserPrefixToStyle=function(e,t){return t?"-".concat(t.toLowerCase(),"-").concat(e):e},xi.default=void 0,xi.getPrefix=t;const e=["Moz","Webkit","O","ms"];function t(){var t;let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"==typeof window)return"";const i=null===(t=window.document)||void 0===t||null===(t=t.documentElement)||void 0===t?void 0:t.style;if(!i)return"";if(r in i)return"";for(let t=0;t<e.length;t++)if(n(r,e[t])in i)return e[t];return""}function n(e,t){return t?"".concat(t).concat(function(e){let t="",n=!0;for(let r=0;r<e.length;r++)n?(t+=e[r].toUpperCase(),n=!1):"-"===e[r]?n=!0:t+=e[r];return t}(e)):e}return xi.default=t(),xi}());function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(n=function(e){return e?r:t})(e)}let r="";function i(t,n){return r||(r=(0,e.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],(function(n){return(0,e.isFunction)(t[n])}))),!!(0,e.isFunction)(t[r])&&t[r](n)}function o(e,t,n){let{x:r,y:i}=e,o="translate(".concat(r).concat(n,",").concat(i).concat(n,")");if(t){const e="".concat("string"==typeof t.x?t.x:t.x+n),r="".concat("string"==typeof t.y?t.y:t.y+n);o="translate(".concat(e,", ").concat(r,")")+o}return o}function a(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)")))||(e.className+=" ".concat(t))}function s(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)"),"g"),"")}return ui}var vi,mi={};function bi(){if(vi)return mi;vi=1,Object.defineProperty(mi,"__esModule",{value:!0}),mi.canDragX=function(e){return"both"===e.props.axis||"x"===e.props.axis},mi.canDragY=function(e){return"both"===e.props.axis||"y"===e.props.axis},mi.createCoreData=function(t,r,i){const o=!(0,e.isNum)(t.lastX),a=n(t);return o?{node:a,deltaX:0,deltaY:0,lastX:r,lastY:i,x:r,y:i}:{node:a,deltaX:r-t.lastX,deltaY:i-t.lastY,lastX:t.lastX,lastY:t.lastY,x:r,y:i}},mi.createDraggableData=function(e,t){const n=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/n,y:e.state.y+t.deltaY/n,deltaX:t.deltaX/n,deltaY:t.deltaY/n,lastX:e.state.x,lastY:e.state.y}},mi.getBoundPosition=function(r,i,o){if(!r.props.bounds)return[i,o];let{bounds:a}=r.props;a="string"==typeof a?a:function(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}(a);const s=n(r);if("string"==typeof a){const{ownerDocument:n}=s,r=n.defaultView;let i;if(i="parent"===a?s.parentNode:n.querySelector(a),!(i instanceof r.HTMLElement))throw new Error('Bounds selector "'+a+'" could not find an element.');const o=i,l=r.getComputedStyle(s),c=r.getComputedStyle(o);a={left:-s.offsetLeft+(0,e.int)(c.paddingLeft)+(0,e.int)(l.marginLeft),top:-s.offsetTop+(0,e.int)(c.paddingTop)+(0,e.int)(l.marginTop),right:(0,t.innerWidth)(o)-(0,t.outerWidth)(s)-s.offsetLeft+(0,e.int)(c.paddingRight)-(0,e.int)(l.marginRight),bottom:(0,t.innerHeight)(o)-(0,t.outerHeight)(s)-s.offsetTop+(0,e.int)(c.paddingBottom)-(0,e.int)(l.marginBottom)}}(0,e.isNum)(a.right)&&(i=Math.min(i,a.right));(0,e.isNum)(a.bottom)&&(o=Math.min(o,a.bottom));(0,e.isNum)(a.left)&&(i=Math.max(i,a.left));(0,e.isNum)(a.top)&&(o=Math.max(o,a.top));return[i,o]},mi.getControlPosition=function(e,r,i){const o="number"==typeof r?(0,t.getTouch)(e,r):null;if("number"==typeof r&&!o)return null;const a=n(i),s=i.props.offsetParent||a.offsetParent||a.ownerDocument.body;return(0,t.offsetXYFromParent)(o||e,s,i.props.scale)},mi.snapToGrid=function(e,t,n){const r=Math.round(t/e[0])*e[0],i=Math.round(n/e[1])*e[1];return[r,i]};var e=pi(),t=gi();function n(e){const t=e.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}return mi}var yi,Ci,wi,ji,ki={},Si={};function $i(){if(yi)return Si;return yi=1,Object.defineProperty(Si,"__esModule",{value:!0}),Si.default=function(){},Si}function Ei(){if(Ci)return ki;Ci=1,Object.defineProperty(ki,"__esModule",{value:!0}),ki.default=void 0;var e=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}r.default=e,n&&n.set(e,r);return r}(n),t=c(oi()),r=c(a),i=gi(),o=bi(),s=pi(),l=c($i());function c(e){return e&&e.__esModule?e:{default:e}}function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}function d(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const p={start:"touchstart",move:"touchmove",stop:"touchend"},h={start:"mousedown",move:"mousemove",stop:"mouseup"};let f=h,x=class extends e.Component{constructor(){super(...arguments),d(this,"dragging",!1),d(this,"lastX",NaN),d(this,"lastY",NaN),d(this,"touchIdentifier",null),d(this,"mounted",!1),d(this,"handleDragStart",(e=>{if(this.props.onMouseDown(e),!this.props.allowAnyClick&&"number"==typeof e.button&&0!==e.button)return!1;const t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:n}=t;if(this.props.disabled||!(e.target instanceof n.defaultView.Node)||this.props.handle&&!(0,i.matchesSelectorAndParentsTo)(e.target,this.props.handle,t)||this.props.cancel&&(0,i.matchesSelectorAndParentsTo)(e.target,this.props.cancel,t))return;"touchstart"===e.type&&e.preventDefault();const r=(0,i.getTouchIdentifier)(e);this.touchIdentifier=r;const a=(0,o.getControlPosition)(e,r,this);if(null==a)return;const{x:s,y:c}=a,u=(0,o.createCoreData)(this,s,c);(0,l.default)("DraggableCore: handleDragStart: %j",u),(0,l.default)("calling",this.props.onStart);!1!==this.props.onStart(e,u)&&!1!==this.mounted&&(this.props.enableUserSelectHack&&(0,i.addUserSelectStyles)(n),this.dragging=!0,this.lastX=s,this.lastY=c,(0,i.addEvent)(n,f.move,this.handleDrag),(0,i.addEvent)(n,f.stop,this.handleDragStop))})),d(this,"handleDrag",(e=>{const t=(0,o.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX,t=r-this.lastY;if([e,t]=(0,o.snapToGrid)(this.props.grid,e,t),!e&&!t)return;n=this.lastX+e,r=this.lastY+t}const i=(0,o.createCoreData)(this,n,r);(0,l.default)("DraggableCore: handleDrag: %j",i);if(!1!==this.props.onDrag(e,i)&&!1!==this.mounted)this.lastX=n,this.lastY=r;else try{this.handleDragStop(new MouseEvent("mouseup"))}catch(e){const t=document.createEvent("MouseEvents");t.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(t)}})),d(this,"handleDragStop",(e=>{if(!this.dragging)return;const t=(0,o.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX||0,t=r-this.lastY||0;[e,t]=(0,o.snapToGrid)(this.props.grid,e,t),n=this.lastX+e,r=this.lastY+t}const a=(0,o.createCoreData)(this,n,r);if(!1===this.props.onStop(e,a)||!1===this.mounted)return!1;const s=this.findDOMNode();s&&this.props.enableUserSelectHack&&(0,i.removeUserSelectStyles)(s.ownerDocument),(0,l.default)("DraggableCore: handleDragStop: %j",a),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,s&&((0,l.default)("DraggableCore: Removing handlers"),(0,i.removeEvent)(s.ownerDocument,f.move,this.handleDrag),(0,i.removeEvent)(s.ownerDocument,f.stop,this.handleDragStop))})),d(this,"onMouseDown",(e=>(f=h,this.handleDragStart(e)))),d(this,"onMouseUp",(e=>(f=h,this.handleDragStop(e)))),d(this,"onTouchStart",(e=>(f=p,this.handleDragStart(e)))),d(this,"onTouchEnd",(e=>(f=p,this.handleDragStop(e))))}componentDidMount(){this.mounted=!0;const e=this.findDOMNode();e&&(0,i.addEvent)(e,p.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const e=this.findDOMNode();if(e){const{ownerDocument:t}=e;(0,i.removeEvent)(t,h.move,this.handleDrag),(0,i.removeEvent)(t,p.move,this.handleDrag),(0,i.removeEvent)(t,h.stop,this.handleDragStop),(0,i.removeEvent)(t,p.stop,this.handleDragStop),(0,i.removeEvent)(e,p.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,i.removeUserSelectStyles)(t)}}findDOMNode(){var e,t;return null!==(e=this.props)&&void 0!==e&&e.nodeRef?null===(t=this.props)||void 0===t||null===(t=t.nodeRef)||void 0===t?void 0:t.current:r.default.findDOMNode(this)}render(){return e.cloneElement(e.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};return ki.default=x,d(x,"displayName","DraggableCore"),d(x,"propTypes",{allowAnyClick:t.default.bool,children:t.default.node.isRequired,disabled:t.default.bool,enableUserSelectHack:t.default.bool,offsetParent:function(e,t){if(e[t]&&1!==e[t].nodeType)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:t.default.arrayOf(t.default.number),handle:t.default.string,cancel:t.default.string,nodeRef:t.default.object,onStart:t.default.func,onDrag:t.default.func,onStop:t.default.func,onMouseDown:t.default.func,scale:t.default.number,className:s.dontSetMe,style:s.dontSetMe,transform:s.dontSetMe}),d(x,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),ki}function Oi(){return wi||(wi=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return u.default}}),e.default=void 0;var t=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=h(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}r.default=e,n&&n.set(e,r);return r}(n),r=p(oi()),i=p(a),o=p(ci),s=gi(),l=bi(),c=pi(),u=p(Ei()),d=p($i());function p(e){return e&&e.__esModule?e:{default:e}}function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(h=function(e){return e?n:t})(e)}function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f.apply(this,arguments)}function x(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class g extends t.Component{static getDerivedStateFromProps(e,t){let{position:n}=e,{prevPropsPosition:r}=t;return!n||r&&n.x===r.x&&n.y===r.y?null:((0,d.default)("Draggable: getDerivedStateFromProps %j",{position:n,prevPropsPosition:r}),{x:n.x,y:n.y,prevPropsPosition:{...n}})}constructor(e){super(e),x(this,"onDragStart",((e,t)=>{(0,d.default)("Draggable: onDragStart: %j",t);if(!1===this.props.onStart(e,(0,l.createDraggableData)(this,t)))return!1;this.setState({dragging:!0,dragged:!0})})),x(this,"onDrag",((e,t)=>{if(!this.state.dragging)return!1;(0,d.default)("Draggable: onDrag: %j",t);const n=(0,l.createDraggableData)(this,t),r={x:n.x,y:n.y,slackX:0,slackY:0};if(this.props.bounds){const{x:e,y:t}=r;r.x+=this.state.slackX,r.y+=this.state.slackY;const[i,o]=(0,l.getBoundPosition)(this,r.x,r.y);r.x=i,r.y=o,r.slackX=this.state.slackX+(e-r.x),r.slackY=this.state.slackY+(t-r.y),n.x=r.x,n.y=r.y,n.deltaX=r.x-this.state.x,n.deltaY=r.y-this.state.y}if(!1===this.props.onDrag(e,n))return!1;this.setState(r)})),x(this,"onDragStop",((e,t)=>{if(!this.state.dragging)return!1;if(!1===this.props.onStop(e,(0,l.createDraggableData)(this,t)))return!1;(0,d.default)("Draggable: onDragStop: %j",t);const n={dragging:!1,slackX:0,slackY:0};if(Boolean(this.props.position)){const{x:e,y:t}=this.props.position;n.x=e,n.y=t}this.setState(n)})),this.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:{...e.position},slackX:0,slackY:0,isElementSVG:!1},!e.position||e.onDrag||e.onStop||console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){void 0!==window.SVGElement&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.setState({dragging:!1})}findDOMNode(){var e,t;return null!==(e=null===(t=this.props)||void 0===t||null===(t=t.nodeRef)||void 0===t?void 0:t.current)&&void 0!==e?e:i.default.findDOMNode(this)}render(){const{axis:e,bounds:n,children:r,defaultPosition:i,defaultClassName:a,defaultClassNameDragging:c,defaultClassNameDragged:d,position:p,positionOffset:h,scale:x,...g}=this.props;let v={},m=null;const b=!Boolean(p)||this.state.dragging,y=p||i,C={x:(0,l.canDragX)(this)&&b?this.state.x:y.x,y:(0,l.canDragY)(this)&&b?this.state.y:y.y};this.state.isElementSVG?m=(0,s.createSVGTransform)(C,h):v=(0,s.createCSSTransform)(C,h);const w=(0,o.default)(r.props.className||"",a,{[c]:this.state.dragging,[d]:this.state.dragged});return t.createElement(u.default,f({},g,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),t.cloneElement(t.Children.only(r),{className:w,style:{...r.props.style,...v},transform:m}))}}e.default=g,x(g,"displayName","Draggable"),x(g,"propTypes",{...u.default.propTypes,axis:r.default.oneOf(["both","x","y","none"]),bounds:r.default.oneOfType([r.default.shape({left:r.default.number,right:r.default.number,top:r.default.number,bottom:r.default.number}),r.default.string,r.default.oneOf([!1])]),defaultClassName:r.default.string,defaultClassNameDragging:r.default.string,defaultClassNameDragged:r.default.string,defaultPosition:r.default.shape({x:r.default.number,y:r.default.number}),positionOffset:r.default.shape({x:r.default.oneOfType([r.default.number,r.default.string]),y:r.default.oneOfType([r.default.number,r.default.string])}),position:r.default.shape({x:r.default.number,y:r.default.number}),className:c.dontSetMe,style:c.dontSetMe,transform:c.dontSetMe}),x(g,"defaultProps",{...u.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})}(Nr)),Nr}var Ri=function(){if(ji)return Ir.exports;ji=1;const{default:e,DraggableCore:t}=Oi();return Ir.exports=e,Ir.exports.default=e,Ir.exports.DraggableCore=t,Ir.exports}(),Li=Pr(Ri);const Ti=e=>r.css`
2180
+ */function ri(){return Zr||(Zr=1,"production"===process.env.NODE_ENV?Br.exports=function(){if(Nr)return Hr;Nr=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,x=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,m=e?Symbol.for("react.scope"):60119;function b(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:switch(e=e.type){case l:case c:case r:case o:case i:case d:return e;default:switch(e=e&&e.$$typeof){case s:case u:case f:case h:case a:return e;default:return p}}case n:return p}}}function y(e){return b(e)===c}return Hr.AsyncMode=l,Hr.ConcurrentMode=c,Hr.ContextConsumer=s,Hr.ContextProvider=a,Hr.Element=t,Hr.ForwardRef=u,Hr.Fragment=r,Hr.Lazy=f,Hr.Memo=h,Hr.Portal=n,Hr.Profiler=o,Hr.StrictMode=i,Hr.Suspense=d,Hr.isAsyncMode=function(e){return y(e)||b(e)===l},Hr.isConcurrentMode=y,Hr.isContextConsumer=function(e){return b(e)===s},Hr.isContextProvider=function(e){return b(e)===a},Hr.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Hr.isForwardRef=function(e){return b(e)===u},Hr.isFragment=function(e){return b(e)===r},Hr.isLazy=function(e){return b(e)===f},Hr.isMemo=function(e){return b(e)===h},Hr.isPortal=function(e){return b(e)===n},Hr.isProfiler=function(e){return b(e)===o},Hr.isStrictMode=function(e){return b(e)===i},Hr.isSuspense=function(e){return b(e)===d},Hr.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===o||e===i||e===d||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===h||e.$$typeof===a||e.$$typeof===s||e.$$typeof===u||e.$$typeof===g||e.$$typeof===v||e.$$typeof===m||e.$$typeof===x)},Hr.typeOf=b,Hr}():Br.exports=(Fr||(Fr=1,"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,x=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,m=e?Symbol.for("react.scope"):60119;function b(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:var x=e.type;switch(x){case l:case c:case r:case o:case i:case d:return x;default:var g=x&&x.$$typeof;switch(g){case s:case u:case f:case h:case a:return g;default:return p}}case n:return p}}}var y=l,C=c,w=s,j=a,k=t,S=u,$=r,E=f,O=h,R=n,L=o,T=i,_=d,P=!1;function M(e){return b(e)===c}ni.AsyncMode=y,ni.ConcurrentMode=C,ni.ContextConsumer=w,ni.ContextProvider=j,ni.Element=k,ni.ForwardRef=S,ni.Fragment=$,ni.Lazy=E,ni.Memo=O,ni.Portal=R,ni.Profiler=L,ni.StrictMode=T,ni.Suspense=_,ni.isAsyncMode=function(e){return P||(P=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),M(e)||b(e)===l},ni.isConcurrentMode=M,ni.isContextConsumer=function(e){return b(e)===s},ni.isContextProvider=function(e){return b(e)===a},ni.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},ni.isForwardRef=function(e){return b(e)===u},ni.isFragment=function(e){return b(e)===r},ni.isLazy=function(e){return b(e)===f},ni.isMemo=function(e){return b(e)===h},ni.isPortal=function(e){return b(e)===n},ni.isProfiler=function(e){return b(e)===o},ni.isStrictMode=function(e){return b(e)===i},ni.isSuspense=function(e){return b(e)===d},ni.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===o||e===i||e===d||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===h||e.$$typeof===a||e.$$typeof===s||e.$$typeof===u||e.$$typeof===g||e.$$typeof===v||e.$$typeof===m||e.$$typeof===x)},ni.typeOf=b}()),ni)),Br.exports}function ii(){if(qr)return Gr;qr=1;return Gr="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function oi(){return Ur?Wr:(Ur=1,Wr=Function.call.bind(Object.prototype.hasOwnProperty))}function ai(){if(Jr)return Kr;Jr=1;var e=ri(),t=o,n=ii(),r=oi(),i=function(){if(Yr)return Xr;Yr=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=ii(),n={},r=oi();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function i(i,o,a,s,l){if("production"!==process.env.NODE_ENV)for(var c in i)if(r(i,c)){var u;try{if("function"!=typeof i[c]){var d=Error((s||"React class")+": "+a+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}u=i[c](o,c,s,a,null,t)}catch(e){u=e}if(!u||u instanceof Error||e((s||"React class")+": type specification of "+a+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof u+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),u instanceof Error&&!(u.message in n)){n[u.message]=!0;var p=l?l():"";e("Failed "+a+" type: "+u.message+(null!=p?p:""))}}}return i.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(n={})},Xr=i}(),a=function(){};function s(){return null}return"production"!==process.env.NODE_ENV&&(a=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),Kr=function(o,l){var c="function"==typeof Symbol&&Symbol.iterator;var u="<<anonymous>>",d={array:x("array"),bigint:x("bigint"),bool:x("boolean"),func:x("function"),number:x("number"),object:x("object"),string:x("string"),symbol:x("symbol"),any:f(s),arrayOf:function(e){return f((function(t,r,i,o,a){if("function"!=typeof e)return new h("Property `"+a+"` of component `"+i+"` has invalid PropType notation inside arrayOf.");var s=t[r];if(!Array.isArray(s))return new h("Invalid "+o+" `"+a+"` of type `"+m(s)+"` supplied to `"+i+"`, expected an array.");for(var l=0;l<s.length;l++){var c=e(s,l,i,o,a+"["+l+"]",n);if(c instanceof Error)return c}return null}))},element:f((function(e,t,n,r,i){var a=e[t];return o(a)?null:new h("Invalid "+r+" `"+i+"` of type `"+m(a)+"` supplied to `"+n+"`, expected a single ReactElement.")})),elementType:f((function(t,n,r,i,o){var a=t[n];return e.isValidElementType(a)?null:new h("Invalid "+i+" `"+o+"` of type `"+m(a)+"` supplied to `"+r+"`, expected a single ReactElement type.")})),instanceOf:function(e){return f((function(t,n,r,i,o){if(!(t[n]instanceof e)){var a=e.name||u;return new h("Invalid "+i+" `"+o+"` of type `"+(((s=t[n]).constructor&&s.constructor.name?s.constructor.name:u)+"` supplied to `")+r+"`, expected instance of `"+a+"`.")}var s;return null}))},node:f((function(e,t,n,r,i){return v(e[t])?null:new h("Invalid "+r+" `"+i+"` supplied to `"+n+"`, expected a ReactNode.")})),objectOf:function(e){return f((function(t,i,o,a,s){if("function"!=typeof e)return new h("Property `"+s+"` of component `"+o+"` has invalid PropType notation inside objectOf.");var l=t[i],c=m(l);if("object"!==c)return new h("Invalid "+a+" `"+s+"` of type `"+c+"` supplied to `"+o+"`, expected an object.");for(var u in l)if(r(l,u)){var d=e(l,u,o,a,s+"."+u,n);if(d instanceof Error)return d}return null}))},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&a(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),s;return f((function(t,n,r,i,o){for(var a=t[n],s=0;s<e.length;s++)if(p(a,e[s]))return null;var l=JSON.stringify(e,(function(e,t){return"symbol"===b(t)?String(t):t}));return new h("Invalid "+i+" `"+o+"` of value `"+String(a)+"` supplied to `"+r+"`, expected one of "+l+".")}))},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&a("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var t=0;t<e.length;t++){var i=e[t];if("function"!=typeof i)return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+y(i)+" at index "+t+"."),s}return f((function(t,i,o,a,s){for(var l=[],c=0;c<e.length;c++){var u=(0,e[c])(t,i,o,a,s,n);if(null==u)return null;u.data&&r(u.data,"expectedType")&&l.push(u.data.expectedType)}return new h("Invalid "+a+" `"+s+"` supplied to `"+o+"`"+(l.length>0?", expected one of type ["+l.join(", ")+"]":"")+".")}))},shape:function(e){return f((function(t,r,i,o,a){var s=t[r],l=m(s);if("object"!==l)return new h("Invalid "+o+" `"+a+"` of type `"+l+"` supplied to `"+i+"`, expected `object`.");for(var c in e){var u=e[c];if("function"!=typeof u)return g(i,o,a,c,b(u));var d=u(s,c,i,o,a+"."+c,n);if(d)return d}return null}))},exact:function(e){return f((function(i,o,a,s,l){var c=i[o],u=m(c);if("object"!==u)return new h("Invalid "+s+" `"+l+"` of type `"+u+"` supplied to `"+a+"`, expected `object`.");var d=t({},i[o],e);for(var p in d){var f=e[p];if(r(e,p)&&"function"!=typeof f)return g(a,s,l,p,b(f));if(!f)return new h("Invalid "+s+" `"+l+"` key `"+p+"` supplied to `"+a+"`.\nBad object: "+JSON.stringify(i[o],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var x=f(c,p,a,s,l+"."+p,n);if(x)return x}return null}))}};function p(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function h(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function f(e){if("production"!==process.env.NODE_ENV)var t={},r=0;function i(i,o,s,c,d,p,f){if(c=c||u,p=p||s,f!==n){if(l){var x=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw x.name="Invariant Violation",x}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var g=c+":"+s;!t[g]&&r<3&&(a("You are manually calling a React.PropTypes validation function for the `"+p+"` prop on `"+c+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[g]=!0,r++)}}return null==o[s]?i?null===o[s]?new h("The "+d+" `"+p+"` is marked as required in `"+c+"`, but its value is `null`."):new h("The "+d+" `"+p+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(o,s,c,d,p)}var o=i.bind(null,!1);return o.isRequired=i.bind(null,!0),o}function x(e){return f((function(t,n,r,i,o,a){var s=t[n];return m(s)!==e?new h("Invalid "+i+" `"+o+"` of type `"+b(s)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null}))}function g(e,t,n,r,i){return new h((e||"React class")+": "+t+" type `"+n+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+i+"`.")}function v(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(v);if(null===e||o(e))return!0;var t=function(e){var t=e&&(c&&e[c]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(!t)return!1;var n,r=t.call(e);if(t!==e.entries){for(;!(n=r.next()).done;)if(!v(n.value))return!1}else for(;!(n=r.next()).done;){var i=n.value;if(i&&!v(i[1]))return!1}return!0;default:return!1}}function m(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function b(e){if(null==e)return""+e;var t=m(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function y(e){var t=b(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return h.prototype=Error.prototype,d.checkPropTypes=i,d.resetWarningCache=i.resetWarningCache,d.PropTypes=d,d},Kr}function si(){if(ti)return Ar.exports;if(ti=1,"production"!==process.env.NODE_ENV){var e=ri();Ar.exports=ai()(e.isElement,!0)}else Ar.exports=function(){if(ei)return Qr;ei=1;var e=ii();function t(){}function n(){}return n.resetWarningCache=t,Qr=function(){function r(t,n,r,i,o,a){if(a!==e){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function i(){return r}r.isRequired=r;var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o}}()();return Ar.exports}function li(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=li(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function ci(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=li(e))&&(r&&(r+=" "),r+=t);return r}var ui,di=Ir(Object.freeze({__proto__:null,clsx:ci,default:ci})),pi={},hi={};function fi(){if(ui)return hi;return ui=1,Object.defineProperty(hi,"__esModule",{value:!0}),hi.dontSetMe=function(e,t,n){if(e[t])return new Error("Invalid prop ".concat(t," passed to ").concat(n," - do not set this, set it on the child."))},hi.findInArray=function(e,t){for(let n=0,r=e.length;n<r;n++)if(t.apply(t,[e[n],n,e]))return e[n]},hi.int=function(e){return parseInt(e,10)},hi.isFunction=function(e){return"function"==typeof e||"[object Function]"===Object.prototype.toString.call(e)},hi.isNum=function(e){return"number"==typeof e&&!isNaN(e)},hi}var xi,gi,vi={};function mi(){if(gi)return pi;gi=1,Object.defineProperty(pi,"__esModule",{value:!0}),pi.addClassName=a,pi.addEvent=function(e,t,n,r){if(!e)return;const i={capture:!0,...r};e.addEventListener?e.addEventListener(t,n,i):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n},pi.addUserSelectStyles=function(e){if(!e)return;let t=e.getElementById("react-draggable-style-el");t||(t=e.createElement("style"),t.type="text/css",t.id="react-draggable-style-el",t.innerHTML=".react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n",t.innerHTML+=".react-draggable-transparent-selection *::selection {all: inherit;}\n",e.getElementsByTagName("head")[0].appendChild(t));e.body&&a(e.body,"react-draggable-transparent-selection")},pi.createCSSTransform=function(e,n){const r=o(e,n,"px");return{[(0,t.browserPrefixToKey)("transform",t.default)]:r}},pi.createSVGTransform=function(e,t){return o(e,t,"")},pi.getTouch=function(t,n){return t.targetTouches&&(0,e.findInArray)(t.targetTouches,(e=>n===e.identifier))||t.changedTouches&&(0,e.findInArray)(t.changedTouches,(e=>n===e.identifier))},pi.getTouchIdentifier=function(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier},pi.getTranslation=o,pi.innerHeight=function(t){let n=t.clientHeight;const r=t.ownerDocument.defaultView.getComputedStyle(t);return n-=(0,e.int)(r.paddingTop),n-=(0,e.int)(r.paddingBottom),n},pi.innerWidth=function(t){let n=t.clientWidth;const r=t.ownerDocument.defaultView.getComputedStyle(t);return n-=(0,e.int)(r.paddingLeft),n-=(0,e.int)(r.paddingRight),n},pi.matchesSelector=i,pi.matchesSelectorAndParentsTo=function(e,t,n){let r=e;do{if(i(r,t))return!0;if(r===n)return!1;r=r.parentNode}while(r);return!1},pi.offsetXYFromParent=function(e,t,n){const r=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect(),i=(e.clientX+t.scrollLeft-r.left)/n,o=(e.clientY+t.scrollTop-r.top)/n;return{x:i,y:o}},pi.outerHeight=function(t){let n=t.clientHeight;const r=t.ownerDocument.defaultView.getComputedStyle(t);return n+=(0,e.int)(r.borderTopWidth),n+=(0,e.int)(r.borderBottomWidth),n},pi.outerWidth=function(t){let n=t.clientWidth;const r=t.ownerDocument.defaultView.getComputedStyle(t);return n+=(0,e.int)(r.borderLeftWidth),n+=(0,e.int)(r.borderRightWidth),n},pi.removeClassName=s,pi.removeEvent=function(e,t,n,r){if(!e)return;const i={capture:!0,...r};e.removeEventListener?e.removeEventListener(t,n,i):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null},pi.removeUserSelectStyles=function(e){if(!e)return;try{if(e.body&&s(e.body,"react-draggable-transparent-selection"),e.selection)e.selection.empty();else{const t=(e.defaultView||window).getSelection();t&&"Caret"!==t.type&&t.removeAllRanges()}}catch(e){}};var e=fi(),t=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=n(t);if(r&&r.has(e))return r.get(e);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(i,a,s):i[a]=e[a]}i.default=e,r&&r.set(e,i);return i}(function(){if(xi)return vi;xi=1,Object.defineProperty(vi,"__esModule",{value:!0}),vi.browserPrefixToKey=n,vi.browserPrefixToStyle=function(e,t){return t?"-".concat(t.toLowerCase(),"-").concat(e):e},vi.default=void 0,vi.getPrefix=t;const e=["Moz","Webkit","O","ms"];function t(){var t;let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"==typeof window)return"";const i=null===(t=window.document)||void 0===t||null===(t=t.documentElement)||void 0===t?void 0:t.style;if(!i)return"";if(r in i)return"";for(let t=0;t<e.length;t++)if(n(r,e[t])in i)return e[t];return""}function n(e,t){return t?"".concat(t).concat(function(e){let t="",n=!0;for(let r=0;r<e.length;r++)n?(t+=e[r].toUpperCase(),n=!1):"-"===e[r]?n=!0:t+=e[r];return t}(e)):e}return vi.default=t(),vi}());function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(n=function(e){return e?r:t})(e)}let r="";function i(t,n){return r||(r=(0,e.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],(function(n){return(0,e.isFunction)(t[n])}))),!!(0,e.isFunction)(t[r])&&t[r](n)}function o(e,t,n){let{x:r,y:i}=e,o="translate(".concat(r).concat(n,",").concat(i).concat(n,")");if(t){const e="".concat("string"==typeof t.x?t.x:t.x+n),r="".concat("string"==typeof t.y?t.y:t.y+n);o="translate(".concat(e,", ").concat(r,")")+o}return o}function a(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)")))||(e.className+=" ".concat(t))}function s(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)"),"g"),"")}return pi}var bi,yi={};function Ci(){if(bi)return yi;bi=1,Object.defineProperty(yi,"__esModule",{value:!0}),yi.canDragX=function(e){return"both"===e.props.axis||"x"===e.props.axis},yi.canDragY=function(e){return"both"===e.props.axis||"y"===e.props.axis},yi.createCoreData=function(t,r,i){const o=!(0,e.isNum)(t.lastX),a=n(t);return o?{node:a,deltaX:0,deltaY:0,lastX:r,lastY:i,x:r,y:i}:{node:a,deltaX:r-t.lastX,deltaY:i-t.lastY,lastX:t.lastX,lastY:t.lastY,x:r,y:i}},yi.createDraggableData=function(e,t){const n=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/n,y:e.state.y+t.deltaY/n,deltaX:t.deltaX/n,deltaY:t.deltaY/n,lastX:e.state.x,lastY:e.state.y}},yi.getBoundPosition=function(r,i,o){if(!r.props.bounds)return[i,o];let{bounds:a}=r.props;a="string"==typeof a?a:function(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}(a);const s=n(r);if("string"==typeof a){const{ownerDocument:n}=s,r=n.defaultView;let i;if(i="parent"===a?s.parentNode:n.querySelector(a),!(i instanceof r.HTMLElement))throw new Error('Bounds selector "'+a+'" could not find an element.');const o=i,l=r.getComputedStyle(s),c=r.getComputedStyle(o);a={left:-s.offsetLeft+(0,e.int)(c.paddingLeft)+(0,e.int)(l.marginLeft),top:-s.offsetTop+(0,e.int)(c.paddingTop)+(0,e.int)(l.marginTop),right:(0,t.innerWidth)(o)-(0,t.outerWidth)(s)-s.offsetLeft+(0,e.int)(c.paddingRight)-(0,e.int)(l.marginRight),bottom:(0,t.innerHeight)(o)-(0,t.outerHeight)(s)-s.offsetTop+(0,e.int)(c.paddingBottom)-(0,e.int)(l.marginBottom)}}(0,e.isNum)(a.right)&&(i=Math.min(i,a.right));(0,e.isNum)(a.bottom)&&(o=Math.min(o,a.bottom));(0,e.isNum)(a.left)&&(i=Math.max(i,a.left));(0,e.isNum)(a.top)&&(o=Math.max(o,a.top));return[i,o]},yi.getControlPosition=function(e,r,i){const o="number"==typeof r?(0,t.getTouch)(e,r):null;if("number"==typeof r&&!o)return null;const a=n(i),s=i.props.offsetParent||a.offsetParent||a.ownerDocument.body;return(0,t.offsetXYFromParent)(o||e,s,i.props.scale)},yi.snapToGrid=function(e,t,n){const r=Math.round(t/e[0])*e[0],i=Math.round(n/e[1])*e[1];return[r,i]};var e=fi(),t=mi();function n(e){const t=e.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}return yi}var wi,ji,ki,Si,$i={},Ei={};function Oi(){if(wi)return Ei;return wi=1,Object.defineProperty(Ei,"__esModule",{value:!0}),Ei.default=function(){},Ei}function Ri(){if(ji)return $i;ji=1,Object.defineProperty($i,"__esModule",{value:!0}),$i.default=void 0;var e=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}r.default=e,n&&n.set(e,r);return r}(n),t=c(si()),r=c(a),i=mi(),o=Ci(),s=fi(),l=c(Oi());function c(e){return e&&e.__esModule?e:{default:e}}function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}function d(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const p={start:"touchstart",move:"touchmove",stop:"touchend"},h={start:"mousedown",move:"mousemove",stop:"mouseup"};let f=h,x=class extends e.Component{constructor(){super(...arguments),d(this,"dragging",!1),d(this,"lastX",NaN),d(this,"lastY",NaN),d(this,"touchIdentifier",null),d(this,"mounted",!1),d(this,"handleDragStart",(e=>{if(this.props.onMouseDown(e),!this.props.allowAnyClick&&"number"==typeof e.button&&0!==e.button)return!1;const t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:n}=t;if(this.props.disabled||!(e.target instanceof n.defaultView.Node)||this.props.handle&&!(0,i.matchesSelectorAndParentsTo)(e.target,this.props.handle,t)||this.props.cancel&&(0,i.matchesSelectorAndParentsTo)(e.target,this.props.cancel,t))return;"touchstart"===e.type&&e.preventDefault();const r=(0,i.getTouchIdentifier)(e);this.touchIdentifier=r;const a=(0,o.getControlPosition)(e,r,this);if(null==a)return;const{x:s,y:c}=a,u=(0,o.createCoreData)(this,s,c);(0,l.default)("DraggableCore: handleDragStart: %j",u),(0,l.default)("calling",this.props.onStart);!1!==this.props.onStart(e,u)&&!1!==this.mounted&&(this.props.enableUserSelectHack&&(0,i.addUserSelectStyles)(n),this.dragging=!0,this.lastX=s,this.lastY=c,(0,i.addEvent)(n,f.move,this.handleDrag),(0,i.addEvent)(n,f.stop,this.handleDragStop))})),d(this,"handleDrag",(e=>{const t=(0,o.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX,t=r-this.lastY;if([e,t]=(0,o.snapToGrid)(this.props.grid,e,t),!e&&!t)return;n=this.lastX+e,r=this.lastY+t}const i=(0,o.createCoreData)(this,n,r);(0,l.default)("DraggableCore: handleDrag: %j",i);if(!1!==this.props.onDrag(e,i)&&!1!==this.mounted)this.lastX=n,this.lastY=r;else try{this.handleDragStop(new MouseEvent("mouseup"))}catch(e){const t=document.createEvent("MouseEvents");t.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(t)}})),d(this,"handleDragStop",(e=>{if(!this.dragging)return;const t=(0,o.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX||0,t=r-this.lastY||0;[e,t]=(0,o.snapToGrid)(this.props.grid,e,t),n=this.lastX+e,r=this.lastY+t}const a=(0,o.createCoreData)(this,n,r);if(!1===this.props.onStop(e,a)||!1===this.mounted)return!1;const s=this.findDOMNode();s&&this.props.enableUserSelectHack&&(0,i.removeUserSelectStyles)(s.ownerDocument),(0,l.default)("DraggableCore: handleDragStop: %j",a),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,s&&((0,l.default)("DraggableCore: Removing handlers"),(0,i.removeEvent)(s.ownerDocument,f.move,this.handleDrag),(0,i.removeEvent)(s.ownerDocument,f.stop,this.handleDragStop))})),d(this,"onMouseDown",(e=>(f=h,this.handleDragStart(e)))),d(this,"onMouseUp",(e=>(f=h,this.handleDragStop(e)))),d(this,"onTouchStart",(e=>(f=p,this.handleDragStart(e)))),d(this,"onTouchEnd",(e=>(f=p,this.handleDragStop(e))))}componentDidMount(){this.mounted=!0;const e=this.findDOMNode();e&&(0,i.addEvent)(e,p.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const e=this.findDOMNode();if(e){const{ownerDocument:t}=e;(0,i.removeEvent)(t,h.move,this.handleDrag),(0,i.removeEvent)(t,p.move,this.handleDrag),(0,i.removeEvent)(t,h.stop,this.handleDragStop),(0,i.removeEvent)(t,p.stop,this.handleDragStop),(0,i.removeEvent)(e,p.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,i.removeUserSelectStyles)(t)}}findDOMNode(){var e,t;return null!==(e=this.props)&&void 0!==e&&e.nodeRef?null===(t=this.props)||void 0===t||null===(t=t.nodeRef)||void 0===t?void 0:t.current:r.default.findDOMNode(this)}render(){return e.cloneElement(e.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};return $i.default=x,d(x,"displayName","DraggableCore"),d(x,"propTypes",{allowAnyClick:t.default.bool,children:t.default.node.isRequired,disabled:t.default.bool,enableUserSelectHack:t.default.bool,offsetParent:function(e,t){if(e[t]&&1!==e[t].nodeType)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:t.default.arrayOf(t.default.number),handle:t.default.string,cancel:t.default.string,nodeRef:t.default.object,onStart:t.default.func,onDrag:t.default.func,onStop:t.default.func,onMouseDown:t.default.func,scale:t.default.number,className:s.dontSetMe,style:s.dontSetMe,transform:s.dontSetMe}),d(x,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),$i}function Li(){return ki||(ki=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return u.default}}),e.default=void 0;var t=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=h(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}r.default=e,n&&n.set(e,r);return r}(n),r=p(si()),i=p(a),o=p(di),s=mi(),l=Ci(),c=fi(),u=p(Ri()),d=p(Oi());function p(e){return e&&e.__esModule?e:{default:e}}function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(h=function(e){return e?n:t})(e)}function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f.apply(this,arguments)}function x(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class g extends t.Component{static getDerivedStateFromProps(e,t){let{position:n}=e,{prevPropsPosition:r}=t;return!n||r&&n.x===r.x&&n.y===r.y?null:((0,d.default)("Draggable: getDerivedStateFromProps %j",{position:n,prevPropsPosition:r}),{x:n.x,y:n.y,prevPropsPosition:{...n}})}constructor(e){super(e),x(this,"onDragStart",((e,t)=>{(0,d.default)("Draggable: onDragStart: %j",t);if(!1===this.props.onStart(e,(0,l.createDraggableData)(this,t)))return!1;this.setState({dragging:!0,dragged:!0})})),x(this,"onDrag",((e,t)=>{if(!this.state.dragging)return!1;(0,d.default)("Draggable: onDrag: %j",t);const n=(0,l.createDraggableData)(this,t),r={x:n.x,y:n.y,slackX:0,slackY:0};if(this.props.bounds){const{x:e,y:t}=r;r.x+=this.state.slackX,r.y+=this.state.slackY;const[i,o]=(0,l.getBoundPosition)(this,r.x,r.y);r.x=i,r.y=o,r.slackX=this.state.slackX+(e-r.x),r.slackY=this.state.slackY+(t-r.y),n.x=r.x,n.y=r.y,n.deltaX=r.x-this.state.x,n.deltaY=r.y-this.state.y}if(!1===this.props.onDrag(e,n))return!1;this.setState(r)})),x(this,"onDragStop",((e,t)=>{if(!this.state.dragging)return!1;if(!1===this.props.onStop(e,(0,l.createDraggableData)(this,t)))return!1;(0,d.default)("Draggable: onDragStop: %j",t);const n={dragging:!1,slackX:0,slackY:0};if(Boolean(this.props.position)){const{x:e,y:t}=this.props.position;n.x=e,n.y=t}this.setState(n)})),this.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:{...e.position},slackX:0,slackY:0,isElementSVG:!1},!e.position||e.onDrag||e.onStop||console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){void 0!==window.SVGElement&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.setState({dragging:!1})}findDOMNode(){var e,t;return null!==(e=null===(t=this.props)||void 0===t||null===(t=t.nodeRef)||void 0===t?void 0:t.current)&&void 0!==e?e:i.default.findDOMNode(this)}render(){const{axis:e,bounds:n,children:r,defaultPosition:i,defaultClassName:a,defaultClassNameDragging:c,defaultClassNameDragged:d,position:p,positionOffset:h,scale:x,...g}=this.props;let v={},m=null;const b=!Boolean(p)||this.state.dragging,y=p||i,C={x:(0,l.canDragX)(this)&&b?this.state.x:y.x,y:(0,l.canDragY)(this)&&b?this.state.y:y.y};this.state.isElementSVG?m=(0,s.createSVGTransform)(C,h):v=(0,s.createCSSTransform)(C,h);const w=(0,o.default)(r.props.className||"",a,{[c]:this.state.dragging,[d]:this.state.dragged});return t.createElement(u.default,f({},g,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),t.cloneElement(t.Children.only(r),{className:w,style:{...r.props.style,...v},transform:m}))}}e.default=g,x(g,"displayName","Draggable"),x(g,"propTypes",{...u.default.propTypes,axis:r.default.oneOf(["both","x","y","none"]),bounds:r.default.oneOfType([r.default.shape({left:r.default.number,right:r.default.number,top:r.default.number,bottom:r.default.number}),r.default.string,r.default.oneOf([!1])]),defaultClassName:r.default.string,defaultClassNameDragging:r.default.string,defaultClassNameDragged:r.default.string,defaultPosition:r.default.shape({x:r.default.number,y:r.default.number}),positionOffset:r.default.shape({x:r.default.oneOfType([r.default.number,r.default.string]),y:r.default.oneOfType([r.default.number,r.default.string])}),position:r.default.shape({x:r.default.number,y:r.default.number}),className:c.dontSetMe,style:c.dontSetMe,transform:c.dontSetMe}),x(g,"defaultProps",{...u.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})}(zr)),zr}var Ti=function(){if(Si)return Vr.exports;Si=1;const{default:e,DraggableCore:t}=Li();return Vr.exports=e,Vr.exports.default=e,Vr.exports.DraggableCore=t,Vr.exports}(),_i=Dr(Ti);const Pi=e=>r.css`
2164
2181
  width: 240px;
2165
2182
  ${"medium"===e&&"width: 320px;"}
2166
2183
  ${"large"===e&&"width: 440px;"}
@@ -2171,7 +2188,7 @@
2171
2188
  border-radius: 4px;
2172
2189
  box-shadow: 0px 4px 6px -4px #0000001a;
2173
2190
  box-shadow: 0px 10px 15px -3px #0000001a;
2174
- `,_i=r.css`
2191
+ `,Mi=r.css`
2175
2192
  height: 100%;
2176
2193
  min-height: 40px;
2177
2194
  display: flex;
@@ -2179,31 +2196,31 @@
2179
2196
  justify-content: space-between;
2180
2197
  padding: 8px;
2181
2198
  border-bottom: 1px solid ${d("neutral",300)};
2182
- `,Pi=r.css`
2199
+ `,Di=r.css`
2183
2200
  top: 10px;
2184
- `,Mi=r.css`
2201
+ `,Ii=r.css`
2185
2202
  padding: 12px;
2186
- `,Di=e=>r.css`
2203
+ `,Ni=e=>r.css`
2187
2204
  height: 100%;
2188
2205
  width: ${e||"320px"};
2189
2206
  background-color: ${d("neutral",100)};
2190
2207
  box-shadow: 0px 1px 2px -1px #0000001a;
2191
2208
  box-shadow: 0px 1px 3px 0px #0000001a;
2192
2209
  position: relative;
2193
- `,Ii=r.css`
2210
+ `,Vi=r.css`
2194
2211
  border-right: 1px solid ${d("neutral",300)};
2195
- `,Ni=r.css`
2212
+ `,zi=r.css`
2196
2213
  border: 1px solid ${d("neutral",300)};
2197
2214
  border-radius: 4px;
2198
- `,Vi=r.css`
2215
+ `,Ai=r.css`
2199
2216
  min-height: 48px;
2200
2217
  width: 100%;
2201
2218
  border-bottom: 1px solid ${d("neutral",300)};
2202
- `,zi=(e,t)=>r.css`
2219
+ `,Bi=(e,t)=>r.css`
2203
2220
  height: ${((e,t)=>e&&t?`calc(100% - ${e+t}px)`:e?`calc(100% - ${e}px)`:t?`calc(100% - ${t}px)`:"100%")(e,t)};
2204
2221
  width: 100%;
2205
2222
  overflow-y: auto;
2206
- `,Ai=r.css`
2223
+ `,Hi=r.css`
2207
2224
  min-height: 64px;
2208
2225
  width: 100%;
2209
2226
  display: flex;
@@ -2213,7 +2230,7 @@
2213
2230
  bottom: 0;
2214
2231
  left: 0;
2215
2232
  border-top: 1px solid ${d("neutral",300)};
2216
- `;var Bi,Hi;!function(){if(Hi)return Bi;Hi=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=function(e,t){var n=arguments.length;t=new Array(n>1?n-1:0);for(var r=1;r<n;r++)t[r-1]=arguments[r];var i=0,o="Warning: "+e.replace(/%s/g,(function(){return t[i++]}));"undefined"!=typeof console&&console.error(o);try{throw new Error(o)}catch(e){}};e=function(e,n,r){var i=arguments.length;r=new Array(i>2?i-2:0);for(var o=2;o<i;o++)r[o-2]=arguments[o];if(void 0===n)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");e||t.apply(null,[n].concat(r))}}Bi=e}();var Fi=Zi()?n.useLayoutEffect:n.useEffect;"production"!==process.env.NODE_ENV&&("undefined"!=typeof process?process:{env:{NODE_ENV:"development"}}).env;function Zi(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}process.env.NODE_ENV,process.env.NODE_ENV,process.env.NODE_ENV;var Gi=function(e){var t,r=e.children,i=e.type,o=void 0===i?"reach-portal":i,s=n.useRef(null),l=n.useRef(null),c=(t=n.useState(Object.create(null))[1],n.useCallback((function(){t(Object.create(null))}),[]));return Fi((function(){if(s.current){var e=s.current.ownerDocument;return l.current=null==e?void 0:e.createElement(o),e.body.appendChild(l.current),c(),function(){l.current&&l.current.ownerDocument&&l.current.ownerDocument.body.removeChild(l.current)}}}),[o,c]),l.current?a.createPortal(r,l.current):n.createElement("span",{ref:s})};"production"!==process.env.NODE_ENV&&(Gi.displayName="Portal");
2233
+ `;var Fi,Zi;!function(){if(Zi)return Fi;Zi=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=function(e,t){var n=arguments.length;t=new Array(n>1?n-1:0);for(var r=1;r<n;r++)t[r-1]=arguments[r];var i=0,o="Warning: "+e.replace(/%s/g,(function(){return t[i++]}));"undefined"!=typeof console&&console.error(o);try{throw new Error(o)}catch(e){}};e=function(e,n,r){var i=arguments.length;r=new Array(i>2?i-2:0);for(var o=2;o<i;o++)r[o-2]=arguments[o];if(void 0===n)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");e||t.apply(null,[n].concat(r))}}Fi=e}();var Gi=qi()?n.useLayoutEffect:n.useEffect;"production"!==process.env.NODE_ENV&&("undefined"!=typeof process?process:{env:{NODE_ENV:"development"}}).env;function qi(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}process.env.NODE_ENV,process.env.NODE_ENV,process.env.NODE_ENV;var Wi=function(e){var t,r=e.children,i=e.type,o=void 0===i?"reach-portal":i,s=n.useRef(null),l=n.useRef(null),c=(t=n.useState(Object.create(null))[1],n.useCallback((function(){t(Object.create(null))}),[]));return Gi((function(){if(s.current){var e=s.current.ownerDocument;return l.current=null==e?void 0:e.createElement(o),e.body.appendChild(l.current),c(),function(){l.current&&l.current.ownerDocument&&l.current.ownerDocument.body.removeChild(l.current)}}}),[o,c]),l.current?a.createPortal(r,l.current):n.createElement("span",{ref:s})};"production"!==process.env.NODE_ENV&&(Wi.displayName="Portal");
2217
2234
  /*! *****************************************************************************
2218
2235
  Copyright (c) Microsoft Corporation.
2219
2236
 
@@ -2227,16 +2244,16 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
2227
2244
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
2228
2245
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
2229
2246
  PERFORMANCE OF THIS SOFTWARE.
2230
- ***************************************************************************** */var qi,Wi,Ui=function(){return Ui=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ui.apply(this,arguments)};function Xi(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function Yi(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ki(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function Ji(e,t,n){if(2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}!function(e){e.Start="xstate.start",e.Stop="xstate.stop",e.Raise="xstate.raise",e.Send="xstate.send",e.Cancel="xstate.cancel",e.NullEvent="",e.Assign="xstate.assign",e.After="xstate.after",e.DoneState="done.state",e.DoneInvoke="done.invoke",e.Log="xstate.log",e.Init="xstate.init",e.Invoke="xstate.invoke",e.ErrorExecution="error.execution",e.ErrorCommunication="error.communication",e.ErrorPlatform="error.platform",e.ErrorCustom="xstate.error",e.Update="xstate.update",e.Pure="xstate.pure",e.Choose="xstate.choose"}(qi||(qi={})),function(e){e.Parent="#_parent",e.Internal="#_internal"}(Wi||(Wi={}));var Qi=qi.Start,eo=qi.Stop,to=qi.Raise,no=qi.Send,ro=qi.Cancel,io=qi.NullEvent,oo=qi.Assign;qi.After,qi.DoneState;var ao=qi.Log,so=qi.Init,lo=qi.Invoke;qi.ErrorExecution;var co,uo=qi.ErrorPlatform,po=qi.ErrorCustom,ho=qi.Update,fo=qi.Choose,xo=qi.Pure,go={},vo="xstate.guard",mo="production"===process.env.NODE_ENV;function bo(e,t,n){void 0===n&&(n=".");var r=wo(e,n),i=wo(t,n);return Vo(i)?!!Vo(r)&&i===r:Vo(r)?r in i:Object.keys(r).every((function(e){return e in i&&bo(r[e],i[e])}))}function yo(e){try{return Vo(e)||"number"==typeof e?"".concat(e):e.type}catch(e){throw new Error("Events must be strings or objects with a string event.type property.")}}function Co(e,t){try{return Io(e)?e:e.toString().split(t)}catch(t){throw new Error("'".concat(e,"' is not a valid state path."))}}function wo(e,t){return"object"==typeof(n=e)&&"value"in n&&"context"in n&&"event"in n&&"_event"in n?e.value:Io(e)?jo(e):"string"!=typeof e?e:jo(Co(e,t));var n}function jo(e){if(1===e.length)return e[0];for(var t={},n=t,r=0;r<e.length-1;r++)r===e.length-2?n[e[r]]=e[r+1]:(n[e[r]]={},n=n[e[r]]);return t}function ko(e,t){for(var n={},r=Object.keys(e),i=0;i<r.length;i++){var o=r[i];n[o]=t(e[o],o,e,i)}return n}function So(e,t,n){var r,i,o={};try{for(var a=Yi(Object.keys(e)),s=a.next();!s.done;s=a.next()){var l=s.value,c=e[l];n(c)&&(o[l]=t(c,l,e))}}catch(e){r={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return o}var $o=function(e){return function(t){var n,r,i=t;try{for(var o=Yi(e),a=o.next();!a.done;a=o.next()){i=i[a.value]}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i}};function Eo(e){return e?Vo(e)?[[e]]:Oo(Object.keys(e).map((function(t){var n=e[t];return"string"==typeof n||n&&Object.keys(n).length?Eo(e[t]).map((function(e){return[t].concat(e)})):[[t]]}))):[[]]}function Oo(e){var t;return(t=[]).concat.apply(t,Ji([],Ki(e),!1))}function Ro(e){return Io(e)?e:[e]}function Lo(e){return void 0===e?[]:Ro(e)}function To(e,t,n){var r,i;if(No(e))return e(t,n.data);var o={};try{for(var a=Yi(Object.keys(e)),s=a.next();!s.done;s=a.next()){var l=s.value,c=e[l];No(c)?o[l]=c(t,n.data):o[l]=c}}catch(e){r={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return o}function _o(e){return e instanceof Promise||!(null===e||!No(e)&&"object"!=typeof e||!No(e.then))}function Po(e,t){return ko(e.states,(function(e,n){if(e){var r=(Vo(t)?void 0:t[n])||(e?e.current:void 0);if(r)return{current:r,states:Po(e,r)}}}))}function Mo(e,t,n,r){mo||Do(!!e,"Attempting to update undefined context");var i=e?n.reduce((function(e,n){var i,o,a=n.assignment,s={state:r,action:n,_event:t},l={};if(No(a))l=a(e,t.data,s);else try{for(var c=Yi(Object.keys(a)),u=c.next();!u.done;u=c.next()){var d=u.value,p=a[d];l[d]=No(p)?p(e,t.data,s):p}}catch(e){i={error:e}}finally{try{u&&!u.done&&(o=c.return)&&o.call(c)}finally{if(i)throw i.error}}return Object.assign({},e,l)}),e):e;return i}var Do=function(){};function Io(e){return Array.isArray(e)}function No(e){return"function"==typeof e}function Vo(e){return"string"==typeof e}function zo(e,t){if(e)return Vo(e)?{type:vo,name:e,predicate:t?t[e]:void 0}:No(e)?{type:vo,name:e.name,predicate:e}:e}mo||(Do=function(e,t){var n=e instanceof Error?e:void 0;if((n||!e)&&void 0!==console){var r=["Warning: ".concat(t)];n&&r.push(n),console.warn.apply(console,r)}});var Ao=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}();function Bo(e){return!!e&&"__xstatenode"in e}function Ho(e,t){return Vo(e)||"number"==typeof e?Ui({type:e},t):e}function Fo(e,t){if(!Vo(e)&&"$$type"in e&&"scxml"===e.$$type)return e;var n=Ho(e);return Ui({name:n.type,data:n,$$type:"scxml",type:"external"},t)}function Zo(e,t){return Ro(t).map((function(t){return void 0===t||"string"==typeof t||Bo(t)?{target:t,event:e}:Ui(Ui({},t),{event:e})}))}function Go(e,t,n,r,i){var o=e.options.guards,a={state:i,cond:t,_event:r};if(t.type===vo)return((null==o?void 0:o[t.name])||t.predicate)(n,r.data,a);var s=null==o?void 0:o[t.type];if(!s)throw new Error("Guard '".concat(t.type,"' is not implemented on machine '").concat(e.id,"'."));return s(n,r.data,a)}function qo(e){return"string"==typeof e?{type:e}:e}function Wo(e,t,n){var r=function(){},i="object"==typeof e,o=i?e:null;return{next:((i?e.next:e)||r).bind(o),error:((i?e.error:t)||r).bind(o),complete:((i?e.complete:n)||r).bind(o)}}function Uo(e,t){return"".concat(e,":invocation[").concat(t,"]")}function Xo(e){return(e.type===to||e.type===no&&e.to===Wi.Internal)&&"number"!=typeof e.delay}(co={})[Ao]=function(){return this},co[Symbol.observable]=function(){return this};var Yo=Fo({type:so});function Ko(e,t){return t&&t[e]||void 0}function Jo(e,t){var n;if(Vo(e)||"number"==typeof e)n=No(r=Ko(e,t))?{type:e,exec:r}:r||{type:e,exec:void 0};else if(No(e))n={type:e.name||e.toString(),exec:e};else{var r;if(No(r=Ko(e.type,t)))n=Ui(Ui({},e),{exec:r});else if(r){var i=r.type||e.type;n=Ui(Ui(Ui({},r),e),{type:i})}else n=e}return n}var Qo=function(e,t){return e?(Io(e)?e:[e]).map((function(e){return Jo(e,t)})):[]};function ea(e){var t=Jo(e);return Ui(Ui({id:Vo(e)?e:t.id},t),{type:t.type})}function ta(e,t){var n="".concat(qi.DoneState,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function na(e,t){var n="".concat(qi.DoneInvoke,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function ra(e,t){var n="".concat(qi.ErrorPlatform,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function ia(e,t,n,r,i,o,a){void 0===a&&(a=!1);var s=a?[]:function(e){var t,n,r=[];try{for(var i=Yi(e),o=i.next();!o.done;o=i.next())for(var a=o.value,s=0;s<a.actions.length;)a.actions[s].type!==oo?s++:(r.push(a.actions[s]),a.actions.splice(s,1))}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}(i),l=s.length?Mo(n,r,s,t):n,c=a?[n]:void 0,u=[];function d(i,s){var d;switch(s.type){case to:var p=function(e,t,n,r){var i,o={_event:n},a=Fo(No(e.event)?e.event(t,n.data,o):e.event);if(Vo(e.delay)){var s=r&&r[e.delay];i=No(s)?s(t,n.data,o):s}else i=No(e.delay)?e.delay(t,n.data,o):e.delay;return Ui(Ui({},e),{type:to,_event:a,delay:i})}(s,l,r,e.options.delays);return o&&"number"==typeof p.delay&&o(p,l,r),p;case no:var h=function(e,t,n,r){var i,o={_event:n},a=Fo(No(e.event)?e.event(t,n.data,o):e.event);if(Vo(e.delay)){var s=r&&r[e.delay];i=No(s)?s(t,n.data,o):s}else i=No(e.delay)?e.delay(t,n.data,o):e.delay;var l=No(e.to)?e.to(t,n.data,o):e.to;return Ui(Ui({},e),{to:l,_event:a,event:a.data,delay:i})}(s,l,r,e.options.delays);if(!mo){var f=s.delay;Do(!Vo(f)||"number"==typeof h.delay,"No delay reference for delay expression '".concat(f,"' was found on machine '").concat(e.id,"'"))}return o&&h.to!==Wi.Internal&&("entry"===i?u.push(h):o(h,l,r)),h;case ao:var x=function(e,t,n){return Ui(Ui({},e),{value:Vo(e.expr)?e.expr:e.expr(t,n.data,{_event:n})})}(s,l,r);return null==o||o(x,l,r),x;case fo:if(!(b=null===(d=s.conds.find((function(n){var i=zo(n.cond,e.options.guards);return!i||Go(e,i,l,r,o?void 0:t)})))||void 0===d?void 0:d.actions))return[];var g=Ki(ia(e,t,l,r,[{type:i,actions:Qo(Lo(b),e.options.actions)}],o,a),2),v=g[0],m=g[1];return l=m,null==c||c.push(l),v;case xo:var b;if(!(b=s.get(l,r.data)))return[];var y=Ki(ia(e,t,l,r,[{type:i,actions:Qo(Lo(b),e.options.actions)}],o,a),2),C=y[0],w=y[1];return l=w,null==c||c.push(l),C;case eo:x=function(e,t,n){var r=No(e.activity)?e.activity(t,n.data):e.activity,i="string"==typeof r?{id:r}:r;return{type:qi.Stop,activity:i}}(s,l,r);return null==o||o(x,n,r),x;case oo:l=Mo(l,r,[s],o?void 0:t),null==c||c.push(l);break;default:var j=Jo(s,e.options.actions),k=j.exec;if(o)o(j,l,r);else if(k&&c){var S=c.length-1,$=Ui(Ui({},j),{exec:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];k.apply(void 0,Ji([c[S]],Ki(t),!1))}});j=$}return j}}var p=Oo(i.map((function(e){var t,n,i=[];try{for(var a=Yi(e.actions),s=a.next();!s.done;s=a.next()){var c=s.value,p=d(e.type,c);p&&(i=i.concat(p))}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return u.forEach((function(e){o(e,l,r)})),u.length=0,i})));return[p,l]}var oa=function(e,t){return t(e)};function aa(e){var t;return(t={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:e}}})[Ao]=function(){return this},t}function sa(e,t,n){var r=aa(t);if(r.deferred=!0,Bo(e)){var i=r.state=oa(void 0,(function(){return(n?e.withContext(n):e).initialState}));r.getSnapshot=function(){return i}}return r}var la=function(e){return"atomic"===e.type||"final"===e.type};function ca(e){return Object.keys(e.states).map((function(t){return e.states[t]}))}function ua(e){return ca(e).filter((function(e){return"history"!==e.type}))}function da(e){var t=[e];return la(e)?t:t.concat(Oo(ua(e).map(da)))}function pa(e,t){var n,r,i,o,a,s,l,c,u=fa(new Set(e)),d=new Set(t);try{for(var p=Yi(d),h=p.next();!h.done;h=p.next())for(var f=(j=h.value).parent;f&&!d.has(f);)d.add(f),f=f.parent}catch(e){n={error:e}}finally{try{h&&!h.done&&(r=p.return)&&r.call(p)}finally{if(n)throw n.error}}var x=fa(d);try{for(var g=Yi(d),v=g.next();!v.done;v=g.next()){if("compound"!==(j=v.value).type||x.get(j)&&x.get(j).length){if("parallel"===j.type)try{for(var m=(a=void 0,Yi(ua(j))),b=m.next();!b.done;b=m.next()){var y=b.value;d.has(y)||(d.add(y),u.get(y)?u.get(y).forEach((function(e){return d.add(e)})):y.initialStateNodes.forEach((function(e){return d.add(e)})))}}catch(e){a={error:e}}finally{try{b&&!b.done&&(s=m.return)&&s.call(m)}finally{if(a)throw a.error}}}else u.get(j)?u.get(j).forEach((function(e){return d.add(e)})):j.initialStateNodes.forEach((function(e){return d.add(e)}))}}catch(e){i={error:e}}finally{try{v&&!v.done&&(o=g.return)&&o.call(g)}finally{if(i)throw i.error}}try{for(var C=Yi(d),w=C.next();!w.done;w=C.next()){var j;for(f=(j=w.value).parent;f&&!d.has(f);)d.add(f),f=f.parent}}catch(e){l={error:e}}finally{try{w&&!w.done&&(c=C.return)&&c.call(C)}finally{if(l)throw l.error}}return d}function ha(e,t){var n=t.get(e);if(!n)return{};if("compound"===e.type){var r=n[0];if(!r)return{};if(la(r))return r.key}var i={};return n.forEach((function(e){i[e.key]=ha(e,t)})),i}function fa(e){var t,n,r=new Map;try{for(var i=Yi(e),o=i.next();!o.done;o=i.next()){var a=o.value;r.has(a)||r.set(a,[]),a.parent&&(r.has(a.parent)||r.set(a.parent,[]),r.get(a.parent).push(a))}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}function xa(e,t){return ha(e,fa(pa([e],t)))}function ga(e,t){return Array.isArray(e)?e.some((function(e){return e===t})):e instanceof Set&&e.has(t)}function va(e,t){return"compound"===t.type?ua(t).some((function(t){return"final"===t.type&&ga(e,t)})):"parallel"===t.type&&ua(t).every((function(t){return va(e,t)}))}function ma(e){return new Set(Oo(e.map((function(e){return e.tags}))))}function ba(e,t){if(e===t)return!0;if(void 0===e||void 0===t)return!1;if(Vo(e)||Vo(t))return e===t;var n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every((function(n){return ba(e[n],t[n])}))}var ya=function(){function e(e){var t,n,r=this;this.actions=[],this.activities=go,this.meta={},this.events=[],this.value=e.value,this.context=e.context,this._event=e._event,this._sessionid=e._sessionid,this.event=this._event.data,this.historyValue=e.historyValue,this.history=e.history,this.actions=e.actions||[],this.activities=e.activities||go,this.meta=(void 0===(n=e.configuration)&&(n=[]),n.reduce((function(e,t){return void 0!==t.meta&&(e[t.id]=t.meta),e}),{})),this.events=e.events||[],this.matches=this.matches.bind(this),this.toStrings=this.toStrings.bind(this),this.configuration=e.configuration,this.transitions=e.transitions,this.children=e.children,this.done=!!e.done,this.tags=null!==(t=Array.isArray(e.tags)?new Set(e.tags):e.tags)&&void 0!==t?t:new Set,this.machine=e.machine,Object.defineProperty(this,"nextEvents",{get:function(){return function(e){return Ji([],Ki(new Set(Oo(Ji([],Ki(e.map((function(e){return e.ownEvents}))),!1)))),!1)}(r.configuration)}})}return e.from=function(t,n){return t instanceof e?t.context!==n?new e({value:t.value,context:n,_event:t._event,_sessionid:null,historyValue:t.historyValue,history:t.history,actions:[],activities:t.activities,events:[],configuration:[],transitions:[],children:{}}):t:new e({value:t,context:n,_event:Yo,_sessionid:null,historyValue:void 0,history:void 0,actions:[],activities:void 0,events:[],configuration:[],transitions:[],children:{}})},e.create=function(t){return new e(t)},e.inert=function(t,n){if(t instanceof e){if(!t.actions.length)return t;var r=Yo;return new e({value:t.value,context:n,_event:r,_sessionid:null,historyValue:t.historyValue,history:t.history,activities:t.activities,configuration:t.configuration,transitions:[],children:{}})}return e.from(t,n)},e.prototype.toStrings=function(e,t){var n=this;if(void 0===e&&(e=this.value),void 0===t&&(t="."),Vo(e))return[e];var r=Object.keys(e);return r.concat.apply(r,Ji([],Ki(r.map((function(r){return n.toStrings(e[r],t).map((function(e){return r+t+e}))}))),!1))},e.prototype.toJSON=function(){var e=this;e.configuration,e.transitions;var t=e.tags;e.machine;var n=Xi(e,["configuration","transitions","tags","machine"]);return Ui(Ui({},n),{tags:Array.from(t)})},e.prototype.matches=function(e){return bo(e,this.value)},e.prototype.hasTag=function(e){return this.tags.has(e)},e.prototype.can=function(e){var t;mo&&Do(!!this.machine,"state.can(...) used outside of a machine-created State object; this will always return false.");var n=null===(t=this.machine)||void 0===t?void 0:t.getTransitionData(this,e);return!!(null==n?void 0:n.transitions.length)&&n.transitions.some((function(e){return void 0!==e.target||e.actions.length}))},e}(),Ca={deferEvents:!1},wa=function(){function e(e){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=Ui(Ui({},Ca),e)}return e.prototype.initialize=function(e){if(this.initialized=!0,e){if(!this.options.deferEvents)return void this.schedule(e);this.process(e)}this.flushEvents()},e.prototype.schedule=function(e){if(this.initialized&&!this.processingEvent){if(0!==this.queue.length)throw new Error("Event queue should be empty when it is not processing events");this.process(e),this.flushEvents()}else this.queue.push(e)},e.prototype.clear=function(){this.queue=[]},e.prototype.flushEvents=function(){for(var e=this.queue.shift();e;)this.process(e),e=this.queue.shift()},e.prototype.process=function(e){this.processingEvent=!0;try{e()}catch(e){throw this.clear(),e}finally{this.processingEvent=!1}},e}(),ja=new Map,ka=0,Sa=function(){return"x:".concat(ka++)},$a=function(e,t){return ja.set(e,t),e},Ea=function(e){return ja.get(e)},Oa=function(e){ja.delete(e)};function Ra(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void(mo||console.warn("XState could not find a global object in this environment. Please let the maintainers know and raise an issue here: https://github.com/statelyai/xstate/issues"))}function La(e){if(Ra()){var t=function(){var e=Ra();if(e&&"__xstate__"in e)return e.__xstate__}();t&&t.register(e)}}function Ta(e,t){void 0===t&&(t={});var n=e.initialState,r=new Set,i=[],o=!1,a=function(e){var t;return Ui(((t={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}})[Ao]=function(){return this},t),e)}({id:t.id,send:function(t){i.push(t),function(){if(!o){for(o=!0;i.length>0;){var t=i.shift();n=e.transition(n,t,s),r.forEach((function(e){return e.next(n)}))}o=!1}}()},getSnapshot:function(){return n},subscribe:function(e,t,i){var o=Wo(e,t,i);return r.add(o),o.next(n),{unsubscribe:function(){r.delete(o)}}}}),s={parent:t.parent,self:a,id:t.id||"anonymous",observers:r};return n=e.start?e.start(s):n,a}var _a,Pa={sync:!1,autoForward:!1};!function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(_a||(_a={}));var Ma=function(){function e(t,n){void 0===n&&(n=e.defaultOptions);var r=this;this.machine=t,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=_a.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(e,t){if(Io(e))return r.batch(e),r.state;var n=Fo(Ho(e,t));if(r.status===_a.Stopped)return mo||Do(!1,'Event "'.concat(n.name,'" was sent to stopped service "').concat(r.machine.id,'". This service has already reached its final state, and will not transition.\nEvent: ').concat(JSON.stringify(n.data))),r.state;if(r.status!==_a.Running&&!r.options.deferEvents)throw new Error('Event "'.concat(n.name,'" was sent to uninitialized service "').concat(r.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.\nEvent: ').concat(JSON.stringify(n.data)));return r.scheduler.schedule((function(){r.forward(n);var e=r._nextState(n);r.update(e,n)})),r._state},this.sendTo=function(e,t,n){var i,o=r.parent&&(t===Wi.Parent||r.parent.id===t),a=o?r.parent:Vo(t)?t===Wi.Internal?r:r.children.get(t)||Ea(t):(i=t)&&"function"==typeof i.send?t:void 0;if(a)if("machine"in a){if(r.status!==_a.Stopped||r.parent!==a||r.state.done){var s=Ui(Ui({},e),{name:e.name===po?"".concat(ra(r.id)):e.name,origin:r.sessionId});!n&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([a,s]):a.send(s)}}else!n&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([a,e.data]):a.send(e.data);else{if(!o)throw new Error("Unable to send event to child '".concat(t,"' from service '").concat(r.id,"'."));mo||Do(!1,"Service '".concat(r.id,"' has no parent: unable to send event ").concat(e.type))}},this._exec=function(e,t,n,i){void 0===i&&(i=r.machine.options.actions);var o=e.exec||Ko(e.type,i),a=No(o)?o:o?o.exec:e.exec;if(a)try{return a(t,n.data,r.machine.config.predictableActionArguments?{action:e,_event:n}:{action:e,state:r.state,_event:n})}catch(e){throw r.parent&&r.parent.send({type:"xstate.error",data:e}),e}switch(e.type){case to:var s=e;r.defer(s);break;case no:var l=e;if("number"==typeof l.delay)return void r.defer(l);l.to?r.sendTo(l._event,l.to,n===Yo):r.send(l._event);break;case ro:r.cancel(e.sendId);break;case Qi:if(r.status!==_a.Running)return;var c=e.activity;if(!r.machine.config.predictableActionArguments&&!r.state.activities[c.id||c.type])break;if(c.type===qi.Invoke){var u=qo(c.src),d=r.machine.options.services?r.machine.options.services[u.type]:void 0,p=c.id,h=c.data;mo||Do(!("forward"in c),"`forward` property is deprecated (found in invocation of '".concat(c.src,"' in in machine '").concat(r.machine.id,"'). ")+"Please use `autoForward` instead.");var f="autoForward"in c?c.autoForward:!!c.forward;if(!d)return void(mo||Do(!1,"No service found for invocation '".concat(c.src,"' in machine '").concat(r.machine.id,"'.")));var x=h?To(h,t,n):void 0;if("string"==typeof d)return;var g=No(d)?d(t,n.data,{data:x,src:u,meta:c.meta}):d;if(!g)return;var v=void 0;Bo(g)&&(g=x?g.withContext(x):g,v={autoForward:f}),r.spawn(g,p,v)}else r.spawnActivity(c);break;case eo:r.stopChild(e.activity.id);break;case ao:var m=e,b=m.label,y=m.value;b?r.logger(b,y):r.logger(y);break;default:mo||Do(!1,"No implementation found for action type '".concat(e.type,"'"))}};var i=Ui(Ui({},e.defaultOptions),n),o=i.clock,a=i.logger,s=i.parent,l=i.id,c=void 0!==l?l:t.id;this.id=c,this.logger=a,this.clock=o,this.parent=s,this.options=i,this.scheduler=new wa({deferEvents:this.options.deferEvents}),this.sessionId=Sa()}return Object.defineProperty(e.prototype,"initialState",{get:function(){var e=this;return this._initialState?this._initialState:oa(this,(function(){return e._initialState=e.machine.initialState,e._initialState}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return mo||Do(this.status!==_a.NotStarted,"Attempted to read state from uninitialized service '".concat(this.id,"'. Make sure the service is started first.")),this._state},enumerable:!1,configurable:!0}),e.prototype.execute=function(e,t){var n,r;try{for(var i=Yi(e.actions),o=i.next();!o.done;o=i.next()){var a=o.value;this.exec(a,e,t)}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},e.prototype.update=function(e,t){var n,r,i,o,a,s,l,c,u=this;if(e._sessionid=this.sessionId,this._state=e,this.machine.config.predictableActionArguments&&t!==Yo||!this.options.execute)for(var d=void 0;d=this._outgoingQueue.shift();)d[0].send(d[1]);else this.execute(this.state);if(this.children.forEach((function(e){u.state.children[e.id]=e})),this.devTools&&this.devTools.send(t.data,e),e.event)try{for(var p=Yi(this.eventListeners),h=p.next();!h.done;h=p.next()){(0,h.value)(e.event)}}catch(e){n={error:e}}finally{try{h&&!h.done&&(r=p.return)&&r.call(p)}finally{if(n)throw n.error}}try{for(var f=Yi(this.listeners),x=f.next();!x.done;x=f.next()){(0,x.value)(e,e.event)}}catch(e){i={error:e}}finally{try{x&&!x.done&&(o=f.return)&&o.call(f)}finally{if(i)throw i.error}}try{for(var g=Yi(this.contextListeners),v=g.next();!v.done;v=g.next()){(0,v.value)(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(e){a={error:e}}finally{try{v&&!v.done&&(s=g.return)&&s.call(g)}finally{if(a)throw a.error}}if(this.state.done){var m=e.configuration.find((function(e){return"final"===e.type&&e.parent===u.machine})),b=m&&m.doneData?To(m.doneData,e.context,t):void 0;this._doneEvent=na(this.id,b);try{for(var y=Yi(this.doneListeners),C=y.next();!C.done;C=y.next()){(0,C.value)(this._doneEvent)}}catch(e){l={error:e}}finally{try{C&&!C.done&&(c=y.return)&&c.call(y)}finally{if(l)throw l.error}}this._stop(),this._stopChildren(),Oa(this.sessionId)}},e.prototype.onTransition=function(e){return this.listeners.add(e),this.status===_a.Running&&e(this.state,this.state.event),this},e.prototype.subscribe=function(e,t,n){var r=this,i=Wo(e,t,n);this.listeners.add(i.next),this.status!==_a.NotStarted&&i.next(this.state);var o=function(){r.doneListeners.delete(o),r.stopListeners.delete(o),i.complete()};return this.status===_a.Stopped?i.complete():(this.onDone(o),this.onStop(o)),{unsubscribe:function(){r.listeners.delete(i.next),r.doneListeners.delete(o),r.stopListeners.delete(o)}}},e.prototype.onEvent=function(e){return this.eventListeners.add(e),this},e.prototype.onSend=function(e){return this.sendListeners.add(e),this},e.prototype.onChange=function(e){return this.contextListeners.add(e),this},e.prototype.onStop=function(e){return this.stopListeners.add(e),this},e.prototype.onDone=function(e){return this.status===_a.Stopped&&this._doneEvent?e(this._doneEvent):this.doneListeners.add(e),this},e.prototype.off=function(e){return this.listeners.delete(e),this.eventListeners.delete(e),this.sendListeners.delete(e),this.stopListeners.delete(e),this.doneListeners.delete(e),this.contextListeners.delete(e),this},e.prototype.start=function(e){var t=this;if(this.status===_a.Running)return this;this.machine._init(),$a(this.sessionId,this),this.initialized=!0,this.status=_a.Running;var n=void 0===e?this.initialState:oa(this,(function(){return"object"==typeof(n=e)&&null!==n&&"value"in n&&"_event"in n?t.machine.resolveState(e):t.machine.resolveState(ya.from(e,t.machine.context));var n}));return this.options.devTools&&this.attachDev(),this.scheduler.initialize((function(){t.update(n,Yo)})),this},e.prototype._stopChildren=function(){this.children.forEach((function(e){No(e.stop)&&e.stop()})),this.children.clear()},e.prototype._stop=function(){var e,t,n,r,i,o,a,s,l,c;try{for(var u=Yi(this.listeners),d=u.next();!d.done;d=u.next()){var p=d.value;this.listeners.delete(p)}}catch(t){e={error:t}}finally{try{d&&!d.done&&(t=u.return)&&t.call(u)}finally{if(e)throw e.error}}try{for(var h=Yi(this.stopListeners),f=h.next();!f.done;f=h.next()){(p=f.value)(),this.stopListeners.delete(p)}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}try{for(var x=Yi(this.contextListeners),g=x.next();!g.done;g=x.next()){p=g.value;this.contextListeners.delete(p)}}catch(e){i={error:e}}finally{try{g&&!g.done&&(o=x.return)&&o.call(x)}finally{if(i)throw i.error}}try{for(var v=Yi(this.doneListeners),m=v.next();!m.done;m=v.next()){p=m.value;this.doneListeners.delete(p)}}catch(e){a={error:e}}finally{try{m&&!m.done&&(s=v.return)&&s.call(v)}finally{if(a)throw a.error}}if(!this.initialized)return this;this.initialized=!1,this.status=_a.Stopped,this._initialState=void 0;try{for(var b=Yi(Object.keys(this.delayedEventsMap)),y=b.next();!y.done;y=b.next()){var C=y.value;this.clock.clearTimeout(this.delayedEventsMap[C])}}catch(e){l={error:e}}finally{try{y&&!y.done&&(c=b.return)&&c.call(b)}finally{if(l)throw l.error}}this.scheduler.clear(),this.scheduler=new wa({deferEvents:this.options.deferEvents})},e.prototype.stop=function(){var e=this,t=this.scheduler;return this._stop(),t.schedule((function(){var t;if(!(null===(t=e._state)||void 0===t?void 0:t.done)){var n=Fo({type:"xstate.stop"}),r=oa(e,(function(){var t=Oo(Ji([],Ki(e.state.configuration),!1).sort((function(e,t){return t.order-e.order})).map((function(t){return Qo(t.onExit,e.machine.options.actions)}))),r=Ki(ia(e.machine,e.state,e.state.context,n,[{type:"exit",actions:t}],e.machine.config.predictableActionArguments?e._exec:void 0,e.machine.config.predictableActionArguments||e.machine.config.preserveActionOrder),2),i=r[0],o=r[1],a=new ya({value:e.state.value,context:o,_event:n,_sessionid:e.sessionId,historyValue:void 0,history:e.state,actions:i.filter((function(e){return!Xo(e)})),activities:{},events:[],configuration:[],transitions:[],children:{},done:e.state.done,tags:e.state.tags,machine:e.machine});return a.changed=!0,a}));e.update(r,n),e._stopChildren(),Oa(e.sessionId)}})),this},e.prototype.batch=function(e){var t=this;if(this.status===_a.NotStarted&&this.options.deferEvents)mo||Do(!1,"".concat(e.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'" and are deferred. Make sure .start() is called for this service.\nEvent: ').concat(JSON.stringify(event)));else if(this.status!==_a.Running)throw new Error("".concat(e.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.'));if(e.length){var n=!!this.machine.config.predictableActionArguments&&this._exec;this.scheduler.schedule((function(){var r,i,o=t.state,a=!1,s=[],l=function(e){var r=Fo(e);t.forward(r),o=oa(t,(function(){return t.machine.transition(o,r,void 0,n||void 0)})),s.push.apply(s,Ji([],Ki(t.machine.config.predictableActionArguments?o.actions:o.actions.map((function(e){return function(e,t){var n=e.exec;return Ui(Ui({},e),{exec:void 0!==n?function(){return n(t.context,t.event,{action:e,state:t,_event:t._event})}:void 0})}(e,o)}))),!1)),a=a||!!o.changed};try{for(var c=Yi(e),u=c.next();!u.done;u=c.next()){l(u.value)}}catch(e){r={error:e}}finally{try{u&&!u.done&&(i=c.return)&&i.call(c)}finally{if(r)throw r.error}}o.changed=a,o.actions=s,t.update(o,Fo(e[e.length-1]))}))}},e.prototype.sender=function(e){return this.send.bind(this,e)},e.prototype._nextState=function(e,t){var n=this;void 0===t&&(t=!!this.machine.config.predictableActionArguments&&this._exec);var r=Fo(e);if(0===r.name.indexOf(uo)&&!this.state.nextEvents.some((function(e){return 0===e.indexOf(uo)})))throw r.data.data;return oa(this,(function(){return n.machine.transition(n.state,r,void 0,t||void 0)}))},e.prototype.nextState=function(e){return this._nextState(e,!1)},e.prototype.forward=function(e){var t,n;try{for(var r=Yi(this.forwardTo),i=r.next();!i.done;i=r.next()){var o=i.value,a=this.children.get(o);if(!a)throw new Error("Unable to forward event '".concat(e,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(o,"'."));a.send(e)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},e.prototype.defer=function(e){var t=this,n=this.clock.setTimeout((function(){"to"in e&&e.to?t.sendTo(e._event,e.to,!0):t.send(e._event)}),e.delay);e.id&&(this.delayedEventsMap[e.id]=n)},e.prototype.cancel=function(e){this.clock.clearTimeout(this.delayedEventsMap[e]),delete this.delayedEventsMap[e]},e.prototype.exec=function(e,t,n){void 0===n&&(n=this.machine.options.actions),this._exec(e,t.context,t._event,n)},e.prototype.removeChild=function(e){var t;this.children.delete(e),this.forwardTo.delete(e),null===(t=this.state)||void 0===t||delete t.children[e]},e.prototype.stopChild=function(e){var t=this.children.get(e);t&&(this.removeChild(e),No(t.stop)&&t.stop())},e.prototype.spawn=function(e,t,n){if(this.status!==_a.Running)return sa(e,t);if(_o(e))return this.spawnPromise(Promise.resolve(e),t);if(No(e))return this.spawnCallback(e,t);if(function(e){try{return"function"==typeof e.send}catch(e){return!1}}(i=e)&&"id"in i)return this.spawnActor(e,t);if(function(e){try{return"subscribe"in e&&No(e.subscribe)}catch(e){return!1}}(e))return this.spawnObservable(e,t);if(Bo(e))return this.spawnMachine(e,Ui(Ui({},n),{id:t}));if(null!==(r=e)&&"object"==typeof r&&"transition"in r&&"function"==typeof r.transition)return this.spawnBehavior(e,t);throw new Error('Unable to spawn entity "'.concat(t,'" of type "').concat(typeof e,'".'));var r,i},e.prototype.spawnMachine=function(t,n){var r=this;void 0===n&&(n={});var i=new e(t,Ui(Ui({},this.options),{parent:this,id:n.id||t.id})),o=Ui(Ui({},Pa),n);o.sync&&i.onTransition((function(e){r.send(ho,{state:e,id:i.id})}));var a=i;return this.children.set(i.id,a),o.autoForward&&this.forwardTo.add(i.id),i.onDone((function(e){r.removeChild(i.id),r.send(Fo(e,{origin:i.id}))})).start(),a},e.prototype.spawnBehavior=function(e,t){var n=Ta(e,{id:t,parent:this});return this.children.set(t,n),n},e.prototype.spawnPromise=function(e,t){var n,r,i=this,o=!1;e.then((function(e){o||(r=e,i.removeChild(t),i.send(Fo(na(t,e),{origin:t})))}),(function(e){if(!o){i.removeChild(t);var n=ra(t,e);try{i.send(Fo(n,{origin:t}))}catch(r){!function(e,t,n){if(!mo){var r=e.stack?" Stacktrace was '".concat(e.stack,"'"):"";if(e===t)console.error("Missing onError handler for invocation '".concat(n,"', error was '").concat(e,"'.").concat(r));else{var i=t.stack?" Stacktrace was '".concat(t.stack,"'"):"";console.error("Missing onError handler and/or unhandled exception/promise rejection for invocation '".concat(n,"'. ")+"Original error: '".concat(e,"'. ").concat(r," Current error is '").concat(t,"'.").concat(i))}}}(e,r,t),i.devTools&&i.devTools.send(n,i.state),i.machine.strict&&i.stop()}}}));var a=((n={id:t,send:function(){},subscribe:function(t,n,r){var i=Wo(t,n,r),o=!1;return e.then((function(e){o||(i.next(e),o||i.complete())}),(function(e){o||i.error(e)})),{unsubscribe:function(){return o=!0}}},stop:function(){o=!0},toJSON:function(){return{id:t}},getSnapshot:function(){return r}})[Ao]=function(){return this},n);return this.children.set(t,a),a},e.prototype.spawnCallback=function(e,t){var n,r,i,o=this,a=!1,s=new Set,l=new Set;try{i=e((function(e){r=e,l.forEach((function(t){return t(e)})),a||o.send(Fo(e,{origin:t}))}),(function(e){s.add(e)}))}catch(e){this.send(ra(t,e))}if(_o(i))return this.spawnPromise(i,t);var c=((n={id:t,send:function(e){return s.forEach((function(t){return t(e)}))},subscribe:function(e){var t=Wo(e);return l.add(t.next),{unsubscribe:function(){l.delete(t.next)}}},stop:function(){a=!0,No(i)&&i()},toJSON:function(){return{id:t}},getSnapshot:function(){return r}})[Ao]=function(){return this},n);return this.children.set(t,c),c},e.prototype.spawnObservable=function(e,t){var n,r,i=this,o=e.subscribe((function(e){r=e,i.send(Fo(e,{origin:t}))}),(function(e){i.removeChild(t),i.send(Fo(ra(t,e),{origin:t}))}),(function(){i.removeChild(t),i.send(Fo(na(t),{origin:t}))})),a=((n={id:t,send:function(){},subscribe:function(t,n,r){return e.subscribe(t,n,r)},stop:function(){return o.unsubscribe()},getSnapshot:function(){return r},toJSON:function(){return{id:t}}})[Ao]=function(){return this},n);return this.children.set(t,a),a},e.prototype.spawnActor=function(e,t){return this.children.set(t,e),e},e.prototype.spawnActivity=function(e){var t=this.machine.options&&this.machine.options.activities?this.machine.options.activities[e.type]:void 0;if(t){var n=t(this.state.context,e);this.spawnEffect(e.id,n)}else mo||Do(!1,"No implementation found for activity '".concat(e.type,"'"))},e.prototype.spawnEffect=function(e,t){var n;this.children.set(e,((n={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:t||void 0,getSnapshot:function(){},toJSON:function(){return{id:e}}})[Ao]=function(){return this},n))},e.prototype.attachDev=function(){var e=Ra();if(this.options.devTools&&e){if(e.__REDUX_DEVTOOLS_EXTENSION__){var t="object"==typeof this.options.devTools?this.options.devTools:void 0;this.devTools=e.__REDUX_DEVTOOLS_EXTENSION__.connect(Ui(Ui({name:this.id,autoPause:!0,stateSanitizer:function(e){return{value:e.value,context:e.context,actions:e.actions}}},t),{features:Ui({jump:!1,skip:!1},t?t.features:void 0)}),this.machine),this.devTools.init(this.state)}La(this)}},e.prototype.toJSON=function(){return{id:this.id}},e.prototype[Ao]=function(){return this},e.prototype.getSnapshot=function(){return this.status===_a.NotStarted?this.initialState:this._state},e.defaultOptions={execute:!0,deferEvents:!0,clock:{setTimeout:function(e,t){return setTimeout(e,t)},clearTimeout:function(e){return clearTimeout(e)}},logger:console.log.bind(console),devTools:!1},e.interpret=Da,e}();function Da(e,t){return new Ma(e,t)}function Ia(e){if("string"==typeof e){var t={type:e,toString:function(){return e}};return t}return e}function Na(e){return Ui(Ui({type:lo},e),{toJSON:function(){e.onDone,e.onError;var t=Xi(e,["onDone","onError"]);return Ui(Ui({},t),{type:lo,src:Ia(e.src)})}})}var Va="",za="*",Aa={},Ba=function(e){return"#"===e[0]},Ha=function(){function e(t,n,r,i){void 0===r&&(r="context"in t?t.context:void 0);var o,a=this;this.config=t,this._context=r,this.order=-1,this.__xstatenode=!0,this.__cache={events:void 0,relativeValue:new Map,initialStateValue:void 0,initialState:void 0,on:void 0,transitions:void 0,candidates:{},delayedTransitions:void 0},this.idMap={},this.tags=[],this.options=Object.assign({actions:{},guards:{},services:{},activities:{},delays:{}},n),this.parent=null==i?void 0:i.parent,this.key=this.config.key||(null==i?void 0:i.key)||this.config.id||"(machine)",this.machine=this.parent?this.parent.machine:this,this.path=this.parent?this.parent.path.concat(this.key):[],this.delimiter=this.config.delimiter||(this.parent?this.parent.delimiter:"."),this.id=this.config.id||Ji([this.machine.key],Ki(this.path),!1).join(this.delimiter),this.version=this.parent?this.parent.version:this.config.version,this.type=this.config.type||(this.config.parallel?"parallel":this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.schema=this.parent?this.machine.schema:null!==(o=this.config.schema)&&void 0!==o?o:{},this.description=this.config.description,mo||Do(!("parallel"in this.config),'The "parallel" property is deprecated and will be removed in version 4.1. '.concat(this.config.parallel?"Replace with `type: 'parallel'`":"Use `type: '".concat(this.type,"'`")," in the config for state node '").concat(this.id,"' instead.")),this.initial=this.config.initial,this.states=this.config.states?ko(this.config.states,(function(t,n){var r,i=new e(t,{},void 0,{parent:a,key:n});return Object.assign(a.idMap,Ui(((r={})[i.id]=i,r),i.idMap)),i})):Aa;var s=0;!function e(t){var n,r;t.order=s++;try{for(var i=Yi(ca(t)),o=i.next();!o.done;o=i.next()){e(o.value)}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}(this),this.history=!0===this.config.history?"shallow":this.config.history||!1,this._transient=!!this.config.always||!!this.config.on&&(Array.isArray(this.config.on)?this.config.on.some((function(e){return e.event===Va})):Va in this.config.on),this.strict=!!this.config.strict,this.onEntry=Lo(this.config.entry||this.config.onEntry).map((function(e){return Jo(e)})),this.onExit=Lo(this.config.exit||this.config.onExit).map((function(e){return Jo(e)})),this.meta=this.config.meta,this.doneData="final"===this.type?this.config.data:void 0,this.invoke=Lo(this.config.invoke).map((function(e,t){var n,r;if(Bo(e)){var i=Uo(a.id,t);return a.machine.options.services=Ui(((n={})[i]=e,n),a.machine.options.services),Na({src:i,id:i})}if(Vo(e.src)){i=e.id||Uo(a.id,t);return Na(Ui(Ui({},e),{id:i,src:e.src}))}if(Bo(e.src)||No(e.src)){i=e.id||Uo(a.id,t);return a.machine.options.services=Ui(((r={})[i]=e.src,r),a.machine.options.services),Na(Ui(Ui({id:i},e),{src:i}))}var o=e.src;return Na(Ui(Ui({id:Uo(a.id,t)},e),{src:o}))})),this.activities=Lo(this.config.activities).concat(this.invoke).map((function(e){return ea(e)})),this.transition=this.transition.bind(this),this.tags=Lo(this.config.tags)}return e.prototype._init=function(){this.__cache.transitions||da(this).forEach((function(e){return e.on}))},e.prototype.withConfig=function(t,n){var r=this.options,i=r.actions,o=r.activities,a=r.guards,s=r.services,l=r.delays;return new e(this.config,{actions:Ui(Ui({},i),t.actions),activities:Ui(Ui({},o),t.activities),guards:Ui(Ui({},a),t.guards),services:Ui(Ui({},s),t.services),delays:Ui(Ui({},l),t.delays)},null!=n?n:this.context)},e.prototype.withContext=function(t){return new e(this.config,this.options,t)},Object.defineProperty(e.prototype,"context",{get:function(){return No(this._context)?this._context():this._context},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"definition",{get:function(){return{id:this.id,key:this.key,version:this.version,context:this.context,type:this.type,initial:this.initial,history:this.history,states:ko(this.states,(function(e){return e.definition})),on:this.on,transitions:this.transitions,entry:this.onEntry,exit:this.onExit,activities:this.activities||[],meta:this.meta,order:this.order||-1,data:this.doneData,invoke:this.invoke,description:this.description,tags:this.tags}},enumerable:!1,configurable:!0}),e.prototype.toJSON=function(){return this.definition},Object.defineProperty(e.prototype,"on",{get:function(){if(this.__cache.on)return this.__cache.on;var e=this.transitions;return this.__cache.on=e.reduce((function(e,t){return e[t.eventType]=e[t.eventType]||[],e[t.eventType].push(t),e}),{})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"after",{get:function(){return this.__cache.delayedTransitions||(this.__cache.delayedTransitions=this.getDelayedTransitions(),this.__cache.delayedTransitions)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"transitions",{get:function(){return this.__cache.transitions||(this.__cache.transitions=this.formatTransitions(),this.__cache.transitions)},enumerable:!1,configurable:!0}),e.prototype.getCandidates=function(e){if(this.__cache.candidates[e])return this.__cache.candidates[e];var t=e===Va,n=this.transitions.filter((function(n){var r=n.eventType===e;return t?r:r||n.eventType===za}));return this.__cache.candidates[e]=n,n},e.prototype.getDelayedTransitions=function(){var e=this,t=this.config.after;if(!t)return[];var n=function(t,n){var r=function(e,t){var n=t?"#".concat(t):"";return"".concat(qi.After,"(").concat(e,")").concat(n)}(No(t)?"".concat(e.id,":delay[").concat(n,"]"):t,e.id);return e.onEntry.push(function(e,t){return{to:t?t.to:void 0,type:no,event:No(e)?e:Ho(e),delay:t?t.delay:void 0,id:t&&void 0!==t.id?t.id:No(e)?e.name:yo(e)}}(r,{delay:t})),e.onExit.push({type:ro,sendId:r}),r},r=Io(t)?t.map((function(e,t){var r=n(e.delay,t);return Ui(Ui({},e),{event:r})})):Oo(Object.keys(t).map((function(e,r){var i=t[e],o=Vo(i)?{target:i}:i,a=isNaN(+e)?e:+e,s=n(a,r);return Lo(o).map((function(e){return Ui(Ui({},e),{event:s,delay:a})}))})));return r.map((function(t){var n=t.delay;return Ui(Ui({},e.formatTransition(t)),{delay:n})}))},e.prototype.getStateNodes=function(e){var t,n=this;if(!e)return[];var r=e instanceof ya?e.value:wo(e,this.delimiter);if(Vo(r)){var i=this.getStateNode(r).initial;return void 0!==i?this.getStateNodes(((t={})[r]=i,t)):[this,this.states[r]]}var o=Object.keys(r),a=[this];return a.push.apply(a,Ji([],Ki(Oo(o.map((function(e){return n.getStateNode(e).getStateNodes(r[e])})))),!1)),a},e.prototype.handles=function(e){var t=yo(e);return this.events.includes(t)},e.prototype.resolveState=function(e){var t=e instanceof ya?e:ya.create(e),n=Array.from(pa([],this.getStateNodes(t.value)));return new ya(Ui(Ui({},t),{value:this.resolve(t.value),configuration:n,done:va(n,this),tags:ma(n),machine:this.machine}))},e.prototype.transitionLeafNode=function(e,t,n){var r=this.getStateNode(e).next(t,n);return r&&r.transitions.length?r:this.next(t,n)},e.prototype.transitionCompoundNode=function(e,t,n){var r=Object.keys(e),i=this.getStateNode(r[0])._transition(e[r[0]],t,n);return i&&i.transitions.length?i:this.next(t,n)},e.prototype.transitionParallelNode=function(e,t,n){var r,i,o={};try{for(var a=Yi(Object.keys(e)),s=a.next();!s.done;s=a.next()){var l=s.value,c=e[l];if(c){var u=this.getStateNode(l)._transition(c,t,n);u&&(o[l]=u)}}}catch(e){r={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}var d=Object.keys(o).map((function(e){return o[e]})),p=Oo(d.map((function(e){return e.transitions})));if(!d.some((function(e){return e.transitions.length>0})))return this.next(t,n);var h=Oo(Object.keys(o).map((function(e){return o[e].configuration})));return{transitions:p,exitSet:Oo(d.map((function(e){return e.exitSet}))),configuration:h,source:t,actions:Oo(Object.keys(o).map((function(e){return o[e].actions})))}},e.prototype._transition=function(e,t,n){return Vo(e)?this.transitionLeafNode(e,t,n):1===Object.keys(e).length?this.transitionCompoundNode(e,t,n):this.transitionParallelNode(e,t,n)},e.prototype.getTransitionData=function(e,t){return this._transition(e.value,e,Fo(t))},e.prototype.next=function(e,t){var n,r,i,o=this,a=t.name,s=[],l=[];try{for(var c=Yi(this.getCandidates(a)),u=c.next();!u.done;u=c.next()){var d=u.value,p=d.cond,h=d.in,f=e.context,x=!h||(Vo(h)&&Ba(h)?e.matches(wo(this.getStateNodeById(h).path,this.delimiter)):bo(wo(h,this.delimiter),$o(this.path.slice(0,-2))(e.value))),g=!1;try{g=!p||Go(this.machine,p,f,t,e)}catch(e){throw new Error("Unable to evaluate guard '".concat(p.name||p.type,"' in transition for event '").concat(a,"' in state node '").concat(this.id,"':\n").concat(e.message))}if(g&&x){void 0!==d.target&&(l=d.target),s.push.apply(s,Ji([],Ki(d.actions),!1)),i=d;break}}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}if(i){if(!l.length)return{transitions:[i],exitSet:[],configuration:e.value?[this]:[],source:e,actions:s};var v=Oo(l.map((function(t){return o.getRelativeStateNodes(t,e.historyValue)})));return{transitions:[i],exitSet:!!i.internal?[]:Oo(l.map((function(e){return o.getPotentiallyReenteringNodes(e)}))),configuration:v,source:e,actions:s}}},e.prototype.getPotentiallyReenteringNodes=function(e){if(this.order<e.order)return[this];for(var t=[],n=this,r=e;n&&n!==r;)t.push(n),n=n.parent;return n!==r?[]:(t.push(r),t)},e.prototype.getActions=function(e,t,n,r,i,o,a){var s,l,c,u,d=this,p=o?pa([],this.getStateNodes(o.value)):[],h=new Set;try{for(var f=Yi(Array.from(e).sort((function(e,t){return e.order-t.order}))),x=f.next();!x.done;x=f.next()){(!ga(p,m=x.value)||ga(n.exitSet,m)||m.parent&&h.has(m.parent))&&h.add(m)}}catch(e){s={error:e}}finally{try{x&&!x.done&&(l=f.return)&&l.call(f)}finally{if(s)throw s.error}}try{for(var g=Yi(p),v=g.next();!v.done;v=g.next()){var m;ga(e,m=v.value)&&!ga(n.exitSet,m.parent)||n.exitSet.push(m)}}catch(e){c={error:e}}finally{try{v&&!v.done&&(u=g.return)&&u.call(g)}finally{if(c)throw c.error}}n.exitSet.sort((function(e,t){return t.order-e.order}));var b=Array.from(h).sort((function(e,t){return e.order-t.order})),y=new Set(n.exitSet),C=Oo(b.map((function(e){var t=[];if("final"!==e.type)return t;var o=e.parent;if(!o.parent)return t;t.push(ta(e.id,e.doneData),ta(o.id,e.doneData?To(e.doneData,r,i):void 0));var a=o.parent;return"parallel"===a.type&&ua(a).every((function(e){return va(n.configuration,e)}))&&t.push(ta(a.id)),t}))),w=b.map((function(e){var t=e.onEntry,n=e.activities.map((function(e){return function(e){var t=ea(e);return{type:qi.Start,activity:t,exec:void 0}}(e)}));return{type:"entry",actions:Qo(a?Ji(Ji([],Ki(t),!1),Ki(n),!1):Ji(Ji([],Ki(n),!1),Ki(t),!1),d.machine.options.actions)}})).concat({type:"state_done",actions:C.map((function(e){return function(e,t){return{type:to,event:"function"==typeof e?e:Ho(e),delay:t?t.delay:void 0,id:null==t?void 0:t.id}}(e)}))}),j=Array.from(y).map((function(e){return{type:"exit",actions:Qo(Ji(Ji([],Ki(e.onExit),!1),Ki(e.activities.map((function(e){return function(e){var t=No(e)?e:ea(e);return{type:qi.Stop,activity:t,exec:void 0}}(e)}))),!1),d.machine.options.actions)}})).concat({type:"transition",actions:Qo(n.actions,this.machine.options.actions)}).concat(w);if(t){var k=Qo(Oo(Ji([],Ki(e),!1).sort((function(e,t){return t.order-e.order})).map((function(e){return e.onExit}))),this.machine.options.actions).filter((function(e){return!Xo(e)}));return j.concat({type:"stop",actions:k})}return j},e.prototype.transition=function(e,t,n,r){void 0===e&&(e=this.initialState);var i,o,a=Fo(t);if(e instanceof ya)i=void 0===n?e:this.resolveState(ya.from(e,n));else{var s=Vo(e)?this.resolve(jo(this.getResolvedPath(e))):this.resolve(e),l=null!=n?n:this.machine.context;i=this.resolveState(ya.from(s,l))}if(!mo&&a.name===za)throw new Error("An event cannot have the wildcard type ('".concat(za,"')"));if(this.strict&&!this.events.includes(a.name)&&(o=a.name,!/^(done|error)\./.test(o)))throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(a.name,"'"));var c=this._transition(i.value,i,a)||{transitions:[],configuration:[],exitSet:[],source:i,actions:[]},u=pa([],this.getStateNodes(i.value)),d=c.configuration.length?pa(u,c.configuration):u;return c.configuration=Ji([],Ki(d),!1),this.resolveTransition(c,i,i.context,r,a)},e.prototype.resolveRaisedTransition=function(e,t,n,r){var i,o=e.actions;return(e=this.transition(e,t,void 0,r))._event=n,e.event=n.data,(i=e.actions).unshift.apply(i,Ji([],Ki(o),!1)),e},e.prototype.resolveTransition=function(e,t,n,r,i){var o,a,s,l,c=this;void 0===i&&(i=Yo);var u=e.configuration,d=!t||e.transitions.length>0,p=d?e.configuration:t?t.configuration:[],h=va(p,this),f=d?xa(this.machine,u):void 0,x=t?t.historyValue?t.historyValue:e.source?this.machine.historyValue(t.value):void 0:void 0,g=this.getActions(new Set(p),h,e,n,i,t,r),v=t?Ui({},t.activities):{};try{for(var m=Yi(g),b=m.next();!b.done;b=m.next()){var y=b.value;try{for(var C=(s=void 0,Yi(y.actions)),w=C.next();!w.done;w=C.next()){var j=w.value;j.type===Qi?v[j.activity.id||j.activity.type]=j:j.type===eo&&(v[j.activity.id||j.activity.type]=!1)}}catch(e){s={error:e}}finally{try{w&&!w.done&&(l=C.return)&&l.call(C)}finally{if(s)throw s.error}}}}catch(e){o={error:e}}finally{try{b&&!b.done&&(a=m.return)&&a.call(m)}finally{if(o)throw o.error}}var k,S,$=Ki(ia(this,t,n,i,g,r,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),E=$[0],O=$[1],R=Ki(function(e,t){var n,r,i=Ki([[],[]],2),o=i[0],a=i[1];try{for(var s=Yi(e),l=s.next();!l.done;l=s.next()){var c=l.value;t(c)?o.push(c):a.push(c)}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return[o,a]}(E,Xo),2),L=R[0],T=R[1],_=E.filter((function(e){var t;return e.type===Qi&&(null===(t=e.activity)||void 0===t?void 0:t.type)===lo})),P=_.reduce((function(e,t){return e[t.activity.id]=function(e,t,n,r){var i,o=qo(e.src),a=null===(i=null==t?void 0:t.options.services)||void 0===i?void 0:i[o.type],s=e.data?To(e.data,n,r):void 0,l=a?sa(a,e.id,s):aa(e.id);return l.meta=e,l}(t.activity,c.machine,O,i),e}),t?Ui({},t.children):{}),M=new ya({value:f||t.value,context:O,_event:i,_sessionid:t?t._sessionid:null,historyValue:f?x?(k=x,S=f,{current:S,states:Po(k,S)}):void 0:t?t.historyValue:void 0,history:!f||e.source?t:void 0,actions:f?T:[],activities:f?v:t?t.activities:{},events:[],configuration:p,transitions:e.transitions,children:P,done:h,tags:ma(p),machine:this}),D=n!==O;M.changed=i.name===ho||D;var I=M.history;I&&delete I.history;var N=!h&&(this._transient||u.some((function(e){return e._transient})));if(!(d||N&&i.name!==Va))return M;var V=M;if(!h)for(N&&(V=this.resolveRaisedTransition(V,{type:io},i,r));L.length;){var z=L.shift();V=this.resolveRaisedTransition(V,z._event,i,r)}var A=V.changed||(I?!!V.actions.length||D||typeof I.value!=typeof V.value||!ba(V.value,I.value):void 0);return V.changed=A,V.history=I,V},e.prototype.getStateNode=function(e){if(Ba(e))return this.machine.getStateNodeById(e);if(!this.states)throw new Error("Unable to retrieve child state '".concat(e,"' from '").concat(this.id,"'; no child states exist."));var t=this.states[e];if(!t)throw new Error("Child state '".concat(e,"' does not exist on '").concat(this.id,"'"));return t},e.prototype.getStateNodeById=function(e){var t=Ba(e)?e.slice(1):e;if(t===this.id)return this;var n=this.machine.idMap[t];if(!n)throw new Error("Child state node '#".concat(t,"' does not exist on machine '").concat(this.id,"'"));return n},e.prototype.getStateNodeByPath=function(e){if("string"==typeof e&&Ba(e))try{return this.getStateNodeById(e.slice(1))}catch(e){}for(var t=Co(e,this.delimiter).slice(),n=this;t.length;){var r=t.shift();if(!r.length)break;n=n.getStateNode(r)}return n},e.prototype.resolve=function(e){var t,n=this;if(!e)return this.initialStateValue||Aa;switch(this.type){case"parallel":return ko(this.initialStateValue,(function(t,r){return t?n.getStateNode(r).resolve(e[r]||t):Aa}));case"compound":if(Vo(e)){var r=this.getStateNode(e);return"parallel"===r.type||"compound"===r.type?((t={})[e]=r.initialStateValue,t):e}return Object.keys(e).length?ko(e,(function(e,t){return e?n.getStateNode(t).resolve(e):Aa})):this.initialStateValue||{};default:return e||Aa}},e.prototype.getResolvedPath=function(e){if(Ba(e)){var t=this.machine.idMap[e.slice(1)];if(!t)throw new Error("Unable to find state node '".concat(e,"'"));return t.path}return Co(e,this.delimiter)},Object.defineProperty(e.prototype,"initialStateValue",{get:function(){var e,t;if(this.__cache.initialStateValue)return this.__cache.initialStateValue;if("parallel"===this.type)t=So(this.states,(function(e){return e.initialStateValue||Aa}),(function(e){return!("history"===e.type)}));else if(void 0!==this.initial){if(!this.states[this.initial])throw new Error("Initial state '".concat(this.initial,"' not found on '").concat(this.key,"'"));t=la(this.states[this.initial])?this.initial:((e={})[this.initial]=this.states[this.initial].initialStateValue,e)}else t={};return this.__cache.initialStateValue=t,this.__cache.initialStateValue},enumerable:!1,configurable:!0}),e.prototype.getInitialState=function(e,t){this._init();var n=this.getStateNodes(e);return this.resolveTransition({configuration:n,exitSet:[],transitions:[],source:void 0,actions:[]},void 0,null!=t?t:this.machine.context,void 0)},Object.defineProperty(e.prototype,"initialState",{get:function(){var e=this.initialStateValue;if(!e)throw new Error("Cannot retrieve initial state from simple state '".concat(this.id,"'."));return this.getInitialState(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){var e;if("history"===this.type){var t=this.config;e=Vo(t.target)&&Ba(t.target)?jo(this.machine.getStateNodeById(t.target).path.slice(this.path.length-1)):t.target}return e},enumerable:!1,configurable:!0}),e.prototype.getRelativeStateNodes=function(e,t,n){return void 0===n&&(n=!0),n?"history"===e.type?e.resolveHistory(t):e.initialStateNodes:[e]},Object.defineProperty(e.prototype,"initialStateNodes",{get:function(){var e=this;return la(this)?[this]:"compound"!==this.type||this.initial?Oo(Eo(this.initialStateValue).map((function(t){return e.getFromRelativePath(t)}))):(mo||Do(!1,"Compound state node '".concat(this.id,"' has no initial state.")),[this])},enumerable:!1,configurable:!0}),e.prototype.getFromRelativePath=function(e){if(!e.length)return[this];var t=Ki(e),n=t[0],r=t.slice(1);if(!this.states)throw new Error("Cannot retrieve subPath '".concat(n,"' from node with no states"));var i=this.getStateNode(n);if("history"===i.type)return i.resolveHistory();if(!this.states[n])throw new Error("Child state '".concat(n,"' does not exist on '").concat(this.id,"'"));return this.states[n].getFromRelativePath(r)},e.prototype.historyValue=function(e){if(Object.keys(this.states).length)return{current:e||this.initialStateValue,states:So(this.states,(function(t,n){if(!e)return t.historyValue();var r=Vo(e)?void 0:e[n];return t.historyValue(r||t.initialStateValue)}),(function(e){return!e.history}))}},e.prototype.resolveHistory=function(e){var t=this;if("history"!==this.type)return[this];var n=this.parent;if(!e){var r=this.target;return r?Oo(Eo(r).map((function(e){return n.getFromRelativePath(e)}))):n.initialStateNodes}var i,o,a=(i=n.path,o="states",function(e){var t,n,r=e;try{for(var a=Yi(i),s=a.next();!s.done;s=a.next()){var l=s.value;r=r[o][l]}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return r})(e).current;return Vo(a)?[n.getStateNode(a)]:Oo(Eo(a).map((function(e){return"deep"===t.history?n.getFromRelativePath(e):[n.states[e[0]]]})))},Object.defineProperty(e.prototype,"stateIds",{get:function(){var e=this,t=Oo(Object.keys(this.states).map((function(t){return e.states[t].stateIds})));return[this.id].concat(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"events",{get:function(){var e,t,n,r;if(this.__cache.events)return this.__cache.events;var i=this.states,o=new Set(this.ownEvents);if(i)try{for(var a=Yi(Object.keys(i)),s=a.next();!s.done;s=a.next()){var l=i[s.value];if(l.states)try{for(var c=(n=void 0,Yi(l.events)),u=c.next();!u.done;u=c.next()){var d=u.value;o.add("".concat(d))}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}return this.__cache.events=Array.from(o)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ownEvents",{get:function(){var e=new Set(this.transitions.filter((function(e){return!(!e.target&&!e.actions.length&&e.internal)})).map((function(e){return e.eventType})));return Array.from(e)},enumerable:!1,configurable:!0}),e.prototype.resolveTarget=function(e){var t=this;if(void 0!==e)return e.map((function(e){if(!Vo(e))return e;var n=e[0]===t.delimiter;if(n&&!t.parent)return t.getStateNodeByPath(e.slice(1));var r=n?t.key+e:e;if(!t.parent)return t.getStateNodeByPath(r);try{return t.parent.getStateNodeByPath(r)}catch(e){throw new Error("Invalid transition definition for state node '".concat(t.id,"':\n").concat(e.message))}}))},e.prototype.formatTransition=function(e){var t=this,n=function(e){if(void 0!==e&&""!==e)return Lo(e)}(e.target),r="internal"in e?e.internal:!n||n.some((function(e){return Vo(e)&&e[0]===t.delimiter})),i=this.machine.options.guards,o=this.resolveTarget(n),a=Ui(Ui({},e),{actions:Qo(Lo(e.actions)),cond:zo(e.cond,i),target:o,source:this,internal:r,eventType:e.event,toJSON:function(){return Ui(Ui({},a),{target:a.target?a.target.map((function(e){return"#".concat(e.id)})):void 0,source:"#".concat(t.id)})}});return a},e.prototype.formatTransitions=function(){var e,t,n,r=this;if(this.config.on)if(Array.isArray(this.config.on))n=this.config.on;else{var i=this.config.on,o=za,a=i[o],s=void 0===a?[]:a,l=Xi(i,["*"]);n=Oo(Object.keys(l).map((function(e){mo||e!==Va||Do(!1,"Empty string transition configs (e.g., `{ on: { '': ... }}`) for transient transitions are deprecated. Specify the transition in the `{ always: ... }` property instead. "+'Please check the `on` configuration for "#'.concat(r.id,'".'));var t=Zo(e,l[e]);return mo||function(e,t,n){var r=n.slice(0,-1).some((function(e){return!("cond"in e)&&!("in"in e)&&(Vo(e.target)||Bo(e.target))})),i=t===Va?"the transient event":"event '".concat(t,"'");Do(!r,"One or more transitions for ".concat(i," on state '").concat(e.id,"' are unreachable. ")+"Make sure that the default transition is the last one defined.")}(r,e,t),t})).concat(Zo(za,s)))}else n=[];var c=this.config.always?Zo("",this.config.always):[],u=this.config.onDone?Zo(String(ta(this.id)),this.config.onDone):[];mo||Do(!(this.config.onDone&&!this.parent),'Root nodes cannot have an ".onDone" transition. Please check the config of "'.concat(this.id,'".'));var d=Oo(this.invoke.map((function(e){var t=[];return e.onDone&&t.push.apply(t,Ji([],Ki(Zo(String(na(e.id)),e.onDone)),!1)),e.onError&&t.push.apply(t,Ji([],Ki(Zo(String(ra(e.id)),e.onError)),!1)),t}))),p=this.after,h=Oo(Ji(Ji(Ji(Ji([],Ki(u),!1),Ki(d),!1),Ki(n),!1),Ki(c),!1).map((function(e){return Lo(e).map((function(e){return r.formatTransition(e)}))})));try{for(var f=Yi(p),x=f.next();!x.done;x=f.next()){var g=x.value;h.push(g)}}catch(t){e={error:t}}finally{try{x&&!x.done&&(t=f.return)&&t.call(f)}finally{if(e)throw e.error}}return h},e}();var Fa,Za=function(e){return{type:oo,assignment:e}};!function(e){e[e.Effect=1]="Effect",e[e.LayoutEffect=2]="LayoutEffect"}(Fa||(Fa={}));var Ga="undefined"!=typeof document?n.useLayoutEffect:function(){};function qa(e){var t=l.useRef();return t.current||(t.current={v:e()}),t.current.v}var Wa=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},Ua=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};var Xa=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},Ya=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))};function Ka(e,t){(0,e.exec)(t.context,t._event.data,{action:e,state:t,_event:t._event})()}function Ja(e){var t=n.useRef([]),r=n.useRef([]);Ga((function(){var n=e.subscribe((function(e){var n,i;if(e.actions.length){var o=e.actions.filter((function(e){return"function"==typeof e.exec&&"__effect"in e.exec})),a=Xa(function(e,t){var n,r,i=Wa([[],[]],2),o=i[0],a=i[1];try{for(var s=Ua(e),l=s.next();!l.done;l=s.next()){var c=l.value;t(c)?o.push(c):a.push(c)}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return[o,a]}(o,(function(e){return e.exec.__effect===Fa.Effect})),2),s=a[0],l=a[1];(n=t.current).push.apply(n,Ya([],Xa(s.map((function(t){return[t,e]}))),!1)),(i=r.current).push.apply(i,Ya([],Xa(l.map((function(t){return[t,e]}))),!1))}}));return function(){n.unsubscribe()}}),[]),Ga((function(){for(;r.current.length;){var e=Xa(r.current.shift(),2);Ka(e[0],e[1])}})),n.useEffect((function(){for(;t.current.length;){var e=Xa(t.current.shift(),2);Ka(e[0],e[1])}}))}var Qa=function(){return Qa=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Qa.apply(this,arguments)},es=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},ts=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a};var ns=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a};function rs(e,t){void 0===t&&(t={});var r=n.useCallback((function(e){var t=void 0===e.changed&&Object.keys(e.children).length;(e.changed||t)&&s(e)}),[]),i=function(e,t,r){void 0===t&&(t={});var i=qa((function(){return"function"==typeof e?e():e}));if("production"!==process.env.NODE_ENV&&"function"!=typeof e){var o=ts(n.useState(i),1)[0];e!==o&&console.warn("Machine given to `useMachine` has changed between renders. This is not supported and might lead to unexpected results.\nPlease make sure that you pass the same Machine as argument each time.")}var a=t.context,s=t.guards,l=t.actions,c=t.activities,u=t.services,d=t.delays,p=t.state,h=es(t,["context","guards","actions","activities","services","delays","state"]),f=qa((function(){var e={context:a,guards:s,actions:l,activities:c,services:u,delays:d};return Da(i.withConfig(e,(function(){return Qa(Qa({},i.context),a)})),Qa({deferEvents:!0},h))}));return Ga((function(){var e;return r&&(e=f.subscribe(function(e){if("object"==typeof e)return e;var t=function(){};return{next:e,error:void 0||t,complete:void 0||t}}(r))),function(){null==e||e.unsubscribe()}}),[r]),Ga((function(){return f.start(p?ya.create(p):void 0),function(){f.stop()}}),[]),Ga((function(){Object.assign(f.machine.options.actions,l),Object.assign(f.machine.options.guards,s),Object.assign(f.machine.options.activities,c),Object.assign(f.machine.options.services,u),Object.assign(f.machine.options.delays,d)}),[l,s,c,u,d]),Ja(f),f}(e,t,r),o=ns(n.useState((function(){var e=i.machine.initialState;return t.state?ya.create(t.state):e})),2),a=o[0],s=o[1];return[a,i.send,i]}function is(){return is=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},is.apply(null,arguments)}function os(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}const as={arr:Array.isArray,obj:e=>"[object Object]"===Object.prototype.toString.call(e),fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,und:e=>void 0===e,nul:e=>null===e,set:e=>e instanceof Set,map:e=>e instanceof Map,equ(e,t){if(typeof e!=typeof t)return!1;if(as.str(e)||as.num(e))return e===t;if(as.obj(e)&&as.obj(t)&&Object.keys(e).length+Object.keys(t).length===0)return!0;let n;for(n in e)if(!(n in t))return!1;for(n in t)if(e[n]!==t[n])return!1;return!as.und(n)||e===t}};function ss(e,t){return as.und(e)||as.nul(e)?t:e}function ls(e){return as.und(e)?[]:as.arr(e)?e:[e]}function cs(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return as.fun(e)?e(...n):e}function us(e){const t=function(e){return e.to,e.from,e.config,e.onStart,e.onRest,e.onFrame,e.children,e.reset,e.reverse,e.force,e.immediate,e.delay,e.attach,e.destroyed,e.interpolateTo,e.ref,e.lazy,os(e,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}(e);if(as.und(t))return is({to:t},e);const n=Object.keys(e).reduce(((n,r)=>as.und(t[r])?is({},n,{[r]:e[r]}):n),{});return is({to:t},n)}class ds{constructor(){this.payload=void 0,this.children=[]}getAnimatedValue(){return this.getValue()}getPayload(){return this.payload||this}attach(){}detach(){}getChildren(){return this.children}addChild(e){0===this.children.length&&this.attach(),this.children.push(e)}removeChild(e){const t=this.children.indexOf(e);this.children.splice(t,1),0===this.children.length&&this.detach()}}class ps extends ds{constructor(){super(...arguments),this.payload=[],this.attach=()=>this.payload.forEach((e=>e instanceof ds&&e.addChild(this))),this.detach=()=>this.payload.forEach((e=>e instanceof ds&&e.removeChild(this)))}}class hs extends ds{constructor(){super(...arguments),this.payload={},this.attach=()=>Object.values(this.payload).forEach((e=>e instanceof ds&&e.addChild(this))),this.detach=()=>Object.values(this.payload).forEach((e=>e instanceof ds&&e.removeChild(this)))}getValue(e){void 0===e&&(e=!1);const t={};for(const n in this.payload){const r=this.payload[n];(!e||r instanceof ds)&&(t[n]=r instanceof ds?r[e?"getAnimatedValue":"getValue"]():r)}return t}getAnimatedValue(){return this.getValue(!0)}}let fs,xs;let gs,vs=e=>"undefined"!=typeof window?window.requestAnimationFrame(e):-1;let ms,bs=()=>Date.now();class ys extends hs{constructor(e,t){super(),this.update=void 0,this.payload=e.style?is({},e,{style:ms(e.style)}):e,this.update=t,this.attach()}}let Cs=!1;const ws=new Set,js=()=>{if(!Cs)return!1;let e=bs();for(let t of ws){let n=!1;for(let r=0;r<t.configs.length;r++){let i,o,a=t.configs[r];for(let t=0;t<a.animatedValues.length;t++){let r=a.animatedValues[t];if(r.done)continue;let s=a.fromValues[t],l=a.toValues[t],c=r.lastPosition,u=l instanceof ds,d=Array.isArray(a.initialVelocity)?a.initialVelocity[t]:a.initialVelocity;if(u&&(l=l.getValue()),a.immediate)r.setValue(l),r.done=!0;else if("string"!=typeof s&&"string"!=typeof l){if(void 0!==a.duration)c=s+a.easing((e-r.startTime)/a.duration)*(l-s),i=e>=r.startTime+a.duration;else if(a.decay)c=s+d/(1-.998)*(1-Math.exp(-.0020000000000000018*(e-r.startTime))),i=Math.abs(r.lastPosition-c)<.1,i&&(l=c);else{o=void 0!==r.lastTime?r.lastTime:e,d=void 0!==r.lastVelocity?r.lastVelocity:a.initialVelocity,e>o+64&&(o=e);let t=Math.floor(e-o);for(let e=0;e<t;++e){d+=1*((-a.tension*(c-l)+-a.friction*d)/a.mass)/1e3,c+=1*d/1e3}let n=!(!a.clamp||0===a.tension)&&(s<l?c>l:c<l),u=Math.abs(d)<=a.precision,p=0===a.tension||Math.abs(l-c)<=a.precision;i=n||u&&p,r.lastVelocity=d,r.lastTime=e}u&&!a.toValues[t].done&&(i=!1),i?(r.value!==l&&(c=l),r.done=!0):n=!0,r.setValue(c),r.lastPosition=c}else r.setValue(l),r.done=!0}t.props.onFrame&&(t.values[a.name]=a.interpolation.getValue())}t.props.onFrame&&t.props.onFrame(t.values),n||(ws.delete(t),t.stop(!0))}return ws.size?vs(js):Cs=!1,Cs};function ks(e,t,n){if("function"==typeof e)return e;if(Array.isArray(e))return ks({range:e,output:t,extrapolate:n});if(gs&&"string"==typeof e.output[0])return gs(e);const r=e,i=r.output,o=r.range||[0,1],a=r.extrapolateLeft||r.extrapolate||"extend",s=r.extrapolateRight||r.extrapolate||"extend",l=r.easing||(e=>e);return e=>{const t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,o);return function(e,t,n,r,i,o,a,s,l){let c=l?l(e):e;if(c<t){if("identity"===a)return c;"clamp"===a&&(c=t)}if(c>n){if("identity"===s)return c;"clamp"===s&&(c=n)}if(r===i)return r;if(t===n)return e<=t?r:i;t===-1/0?c=-c:n===1/0?c-=t:c=(c-t)/(n-t);c=o(c),r===-1/0?c=-c:i===1/0?c+=r:c=c*(i-r)+r;return c}(e,o[t],o[t+1],i[t],i[t+1],l,a,s,r.map)}}class Ss extends ps{constructor(e,t,n,r){super(),this.calc=void 0,this.payload=e instanceof ps&&!(e instanceof Ss)?e.getPayload():Array.isArray(e)?e:[e],this.calc=ks(t,n,r)}getValue(){return this.calc(...this.payload.map((e=>e.getValue())))}updateConfig(e,t,n){this.calc=ks(e,t,n)}interpolate(e,t,n){return new Ss(this,e,t,n)}}const $s=(e,t,n)=>e&&new Ss(e,t,n);function Es(e,t){"update"in e?t.add(e):e.getChildren().forEach((e=>Es(e,t)))}class Os extends ds{constructor(e){var t;super(),t=this,this.animatedStyles=new Set,this.value=void 0,this.startPosition=void 0,this.lastPosition=void 0,this.lastVelocity=void 0,this.startTime=void 0,this.lastTime=void 0,this.done=!1,this.setValue=function(e,n){void 0===n&&(n=!0),t.value=e,n&&t.flush()},this.value=e,this.startPosition=e,this.lastPosition=e}flush(){0===this.animatedStyles.size&&Es(this,this.animatedStyles),this.animatedStyles.forEach((e=>e.update()))}clearStyles(){this.animatedStyles.clear()}getValue(){return this.value}interpolate(e,t,n){return new Ss(this,e,t,n)}}class Rs extends ps{constructor(e){super(),this.payload=e.map((e=>new Os(e)))}setValue(e,t){void 0===t&&(t=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach(((e,n)=>this.payload[n].setValue(e,t))):this.payload.forEach((n=>n.setValue(e,t)))}getValue(){return this.payload.map((e=>e.getValue()))}interpolate(e,t){return new Ss(this,e,t)}}let Ls=0,Ts=class{constructor(){this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=()=>this.interpolations,this.id=Ls++}update(e){if(!e)return this;const t=us(e),n=t.delay,r=void 0===n?0:n,i=t.to,o=os(t,["delay","to"]);if(as.arr(i)||as.fun(i))this.queue.push(is({},o,{delay:r,to:i}));else if(i){let e={};Object.entries(i).forEach((t=>{let n=t[0],i=t[1];const a=is({to:{[n]:i},delay:cs(r,n)},o),s=e[a.delay]&&e[a.delay].to;e[a.delay]=is({},e[a.delay],a,{to:is({},s,a.to)})})),this.queue=Object.values(e)}return this.queue=this.queue.sort(((e,t)=>e.delay-t.delay)),this.diff(o),this}start(e){if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((e=>{let t=e.from,n=void 0===t?{}:t,r=e.to,i=void 0===r?{}:r;as.obj(n)&&(this.merged=is({},n,this.merged)),as.obj(i)&&(this.merged=is({},this.merged,i))}));const t=this.local=++this.guid,n=this.localQueue=this.queue;this.queue=[],n.forEach(((r,i)=>{let o=r.delay,a=os(r,["delay"]);const s=r=>{i===n.length-1&&t===this.guid&&r&&(this.idle=!0,this.props.onRest&&this.props.onRest(this.merged)),e&&e()};let l=as.arr(a.to)||as.fun(a.to);o?setTimeout((()=>{t===this.guid&&(l?this.runAsync(a,s):this.diff(a).start(s))}),o):l?this.runAsync(a,s):this.diff(a).start(s)}))}else as.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),t=this,ws.has(t)||ws.add(t),Cs||(Cs=!0,vs(js));var t;return this}stop(e){return this.listeners.forEach((t=>t(e))),this.listeners=[],this}pause(e){var t;return this.stop(!0),e&&(t=this,ws.has(t)&&ws.delete(t)),this}runAsync(e,t){var n=this;e.delay;let r=os(e,["delay"]);const i=this.local;let o=Promise.resolve(void 0);if(as.arr(r.to))for(let e=0;e<r.to.length;e++){const t=e,n=is({},r,us(r.to[t]));as.arr(n.config)&&(n.config=n.config[t]),o=o.then((()=>{if(i===this.guid)return new Promise((e=>this.diff(n).start(e)))}))}else if(as.fun(r.to)){let e,t=0;o=o.then((()=>r.to((n=>{const o=is({},r,us(n));if(as.arr(o.config)&&(o.config=o.config[t]),t++,i===this.guid)return e=new Promise((e=>this.diff(o).start(e)))}),(function(e){return void 0===e&&(e=!0),n.stop(e)})).then((()=>e))))}o.then(t)}diff(e){this.props=is({},this.props,e);let t=this.props,n=t.from,r=void 0===n?{}:n,i=t.to,o=void 0===i?{}:i,a=t.config,s=void 0===a?{}:a,l=t.reverse,c=t.attach,u=t.reset,d=t.immediate;if(l){var p=[o,r];r=p[0],o=p[1]}this.merged=is({},r,this.merged,o),this.hasChanged=!1;let h=c&&c(this);if(this.animations=Object.entries(this.merged).reduce(((e,t)=>{let n=t[0],i=t[1],o=e[n]||{};const a=as.num(i),l=as.str(i)&&!i.startsWith("#")&&!/\d/.test(i)&&!xs[i],c=as.arr(i),p=!a&&!c&&!l;let f=as.und(r[n])?i:r[n],x=a||c||l?i:1,g=cs(s,n);h&&(x=h.animations[n].parent);let v,m=o.parent,b=o.interpolation,y=ls(h?x.getPayload():x),C=i;p&&(C=gs({range:[0,1],output:[i,i]})(1));let w=b&&b.getValue();const j=!as.und(m)&&o.animatedValues.some((e=>!e.done)),k=!as.equ(C,w),S=!as.equ(C,o.previous),$=!as.equ(g,o.config);if(u||S&&k||$){if(a||l)m=b=o.parent||new Os(f);else if(c)m=b=o.parent||new Rs(f);else if(p){let e=o.interpolation&&o.interpolation.calc(o.parent.value);e=void 0===e||u?f:e,o.parent?(m=o.parent,m.setValue(0,!1)):m=new Os(0);const t={output:[e,i]};o.interpolation?(b=o.interpolation,o.interpolation.updateConfig(t)):b=m.interpolate(t)}return y=ls(h?x.getPayload():x),v=ls(m.getPayload()),u&&!p&&m.setValue(f,!1),this.hasChanged=!0,v.forEach((e=>{e.startPosition=e.value,e.lastPosition=e.value,e.lastVelocity=j?e.lastVelocity:void 0,e.lastTime=j?e.lastTime:void 0,e.startTime=bs(),e.done=!1,e.animatedStyles.clear()})),cs(d,n)&&m.setValue(p?x:i,!1),is({},e,{[n]:is({},o,{name:n,parent:m,interpolation:b,animatedValues:v,toValues:y,previous:C,config:g,fromValues:ls(m.getValue()),immediate:cs(d,n),initialVelocity:ss(g.velocity,0),clamp:ss(g.clamp,!1),precision:ss(g.precision,.01),tension:ss(g.tension,170),friction:ss(g.friction,26),mass:ss(g.mass,1),duration:g.duration,easing:ss(g.easing,(e=>e)),decay:g.decay})})}return k?e:(p&&(m.setValue(1,!1),b.updateConfig({output:[C,C]})),m.done=!0,this.hasChanged=!0,is({},e,{[n]:is({},e[n],{previous:C})}))}),this.animations),this.hasChanged){this.configs=Object.values(this.animations),this.values={},this.interpolations={};for(let e in this.animations)this.interpolations[e]=this.animations[e].interpolation,this.values[e]=this.animations[e].interpolation.getValue()}return this}destroy(){this.stop(),this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.local=0}};const _s=e=>{const t=as.fun(e),r=((e,t)=>{const r=n.useRef(!1),i=n.useRef(),o=as.fun(t),a=n.useMemo((()=>{let n;return i.current&&(i.current.map((e=>e.destroy())),i.current=void 0),[new Array(e).fill().map(((e,r)=>{const i=new Ts,a=o?cs(t,r,i):t[r];return 0===r&&(n=a.ref),i.update(a),n||i.start(),i})),n]}),[e]),s=a[0],l=a[1];i.current=s,n.useImperativeHandle(l,(()=>({start:()=>Promise.all(i.current.map((e=>new Promise((t=>e.start(t)))))),stop:e=>i.current.forEach((t=>t.stop(e))),get controllers(){return i.current}})));const c=n.useMemo((()=>e=>i.current.map(((t,n)=>{t.update(o?cs(e,n,t):e[n]),l||t.start()}))),[e]);n.useEffect((()=>{r.current?o||c(t):l||i.current.forEach((e=>e.start()))})),n.useEffect((()=>(r.current=!0,()=>i.current.forEach((e=>e.destroy())))),[]);const u=i.current.map((e=>e.getValues()));return o?[u,c,e=>i.current.forEach((t=>t.pause(e)))]:u})(1,t?e:[e]),i=r[0],o=r[1],a=r[2];return t?[i[0],o,a]:i};class Ps extends hs{constructor(e){void 0===e&&(e={}),super(),!e.transform||e.transform instanceof ds||(e=fs.transform(e)),this.payload=e}}const Ms={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Ds="[-+]?\\d*\\.?\\d+",Is=Ds+"%";function Ns(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"\\(\\s*("+t.join(")\\s*,\\s*(")+")\\s*\\)"}const Vs=new RegExp("rgb"+Ns(Ds,Ds,Ds)),zs=new RegExp("rgba"+Ns(Ds,Ds,Ds,Ds)),As=new RegExp("hsl"+Ns(Ds,Is,Is)),Bs=new RegExp("hsla"+Ns(Ds,Is,Is,Ds)),Hs=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Fs=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Zs=/^#([0-9a-fA-F]{6})$/,Gs=/^#([0-9a-fA-F]{8})$/;function qs(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Ws(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,o=qs(i,r,e+1/3),a=qs(i,r,e),s=qs(i,r,e-1/3);return Math.round(255*o)<<24|Math.round(255*a)<<16|Math.round(255*s)<<8}function Us(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function Xs(e){return(parseFloat(e)%360+360)%360/360}function Ys(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function Ks(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function Js(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=Zs.exec(e))?parseInt(t[1]+"ff",16)>>>0:Ms.hasOwnProperty(e)?Ms[e]:(t=Vs.exec(e))?(Us(t[1])<<24|Us(t[2])<<16|Us(t[3])<<8|255)>>>0:(t=zs.exec(e))?(Us(t[1])<<24|Us(t[2])<<16|Us(t[3])<<8|Ys(t[4]))>>>0:(t=Hs.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=Gs.exec(e))?parseInt(t[1],16)>>>0:(t=Fs.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=As.exec(e))?(255|Ws(Xs(t[1]),Ks(t[2]),Ks(t[3])))>>>0:(t=Bs.exec(e))?(Ws(Xs(t[1]),Ks(t[2]),Ks(t[3]))|Ys(t[4]))>>>0:null}(e);return null===t?e:(t=t||0,`rgba(${(4278190080&t)>>>24}, ${(16711680&t)>>>16}, ${(65280&t)>>>8}, ${(255&t)/255})`)}const Qs=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,el=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,tl=new RegExp(`(${Object.keys(Ms).join("|")})`,"g");let nl={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};const rl=["Webkit","Ms","Moz","O"];function il(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||nl.hasOwnProperty(e)&&nl[e]?(""+t).trim():t+"px"}nl=Object.keys(nl).reduce(((e,t)=>(rl.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),nl);const ol={};var al;ms=e=>new Ps(e),al=e=>{const t=e.output.map((e=>e.replace(el,Js))).map((e=>e.replace(tl,Js))),n=t[0].match(Qs).map((()=>[]));t.forEach((e=>{e.match(Qs).forEach(((e,t)=>n[t].push(+e)))}));const r=t[0].match(Qs).map(((t,r)=>ks(is({},e,{output:n[r]}))));return e=>{let n=0;return t[0].replace(Qs,(()=>r[n++](e))).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,((e,t,n,r,i)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${i})`))}},gs=al,xs=Ms,function(e,t){fs={fn:e,transform:t}}(((e,t)=>{if(!e.nodeType||void 0===e.setAttribute)return!1;{const i=t.style,o=t.children,a=t.scrollTop,s=t.scrollLeft,l=os(t,["style","children","scrollTop","scrollLeft"]),c="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;void 0!==a&&(e.scrollTop=a),void 0!==s&&(e.scrollLeft=s),void 0!==o&&(e.textContent=o);for(let t in i)if(i.hasOwnProperty(t)){var n=0===t.indexOf("--"),r=il(t,i[t],n);"float"===t&&(t="cssFloat"),n?e.style.setProperty(t,r):e.style[t]=r}for(let t in l){const n=c?t:ol[t]||(ol[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())));void 0!==e.getAttribute(n)&&e.setAttribute(n,l[t])}}}),(e=>e));var sl;const ll=(sl=e=>n.forwardRef(((t,r)=>{const i=function(){const e=n.useState(!1)[1];return n.useCallback((()=>e((e=>!e))),[])}(),o=n.useRef(!0),a=n.useRef(null),s=n.useRef(null),l=n.useCallback((e=>{const t=a.current;a.current=new ys(e,(()=>{let e=!1;s.current&&(e=fs.fn(s.current,a.current.getAnimatedValue())),s.current&&!1!==e||i()})),t&&t.detach()}),[]);n.useEffect((()=>()=>{o.current=!1,a.current&&a.current.detach()}),[]),n.useImperativeHandle(r,(()=>(e=>e.current)(s))),l(t);const c=a.current.getValue();c.scrollTop,c.scrollLeft;const u=os(c,["scrollTop","scrollLeft"]),d=(p=e,!as.fun(p)||p.prototype instanceof n.Component?e=>s.current=function(e,t){return t&&(as.fun(t)?t(e):as.obj(t)&&(t.current=e)),e}(e,r):void 0);var p;return n.createElement(e,is({},u,{ref:d}))})),e=>(as.arr(e)?e:Object.keys(e)).reduce(((e,t)=>{const n=t;return e[n]=sl(n),e}),sl))(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]);function cl(e,t){return e.map((function(e,n){return e+t[n]}))}function ul(e,t){return e.map((function(e,n){return e-t[n]}))}function dl(e){return Math.hypot.apply(Math,e)}function pl(e){return Math.sign?Math.sign(e):Number(e>0)-Number(e<0)||+e}function hl(e,t,n){return 0===t||Math.abs(t)===1/0?function(e,t){return Math.pow(e,5*t)}(e,n):e*t*n/(t+n*e)}function fl(e,t,n,r){return void 0===r&&(r=.15),0===r?function(e,t,n){return Math.max(t,Math.min(e,n))}(e,t,n):e<t?-hl(t-e,n-t,r)+t:e>n?+hl(e-n,n-t,r)+n:e}function xl(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}function gl(){return gl=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gl.apply(this,arguments)}function vl(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function ml(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function bl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function yl(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return bl(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?bl(e,t):void 0}}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function Cl(){}function wl(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?Cl:1===t.length?t[0]:function(){for(var e,n,r=yl(t);!(n=r()).done;){e=n.value.apply(this,arguments)||e}return e}}function jl(e,t){if(void 0===e){if(void 0===t)throw new Error("Must define fallback value if undefined is expected");e=t}return Array.isArray(e)?e:[e,e]}function kl(e){if("function"==typeof e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.apply(void 0,n)}return e}function Sl(e,t){void 0===e&&(e={});for(var n={},r=0,i=Object.entries(t);r<i.length;r++){var o=i[r],a=o[0],s=o[1];switch(typeof s){case"function":n[a]=s.call(n,e[a],a,e);break;case"object":n[a]=Sl(e[a],s);break;case"boolean":s&&(n[a]=e[a])}}return n}var $l=gl({},{threshold:function(e){return void 0===e&&(e=0),jl(e)},rubberband:function(e){switch(void 0===e&&(e=0),e){case!0:return jl(.15);case!1:return jl(0);default:return jl(e)}},enabled:function(e){return void 0===e&&(e=!0),e},triggerAllEvents:function(e){return void 0===e&&(e=!1),e},initial:function(e){return void 0===e&&(e=0),"function"==typeof e?e:jl(e)}},{axis:!0,lockDirection:function(e){return void 0===e&&(e=!1),e},bounds:function(e){if(void 0===e&&(e={}),"function"==typeof e)return function(t){return $l.bounds(e(t))};var t=e,n=t.left,r=void 0===n?-1/0:n,i=t.right,o=void 0===i?1/0:i,a=t.top,s=void 0===a?-1/0:a,l=t.bottom;return[[r,o],[s,void 0===l?1/0:l]]}}),El="undefined"!=typeof window&&window.document&&window.document.createElement,Ol={enabled:function(e){return void 0===e&&(e=!0),e},domTarget:!0,window:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e){return void 0===e&&(e=El?window:void 0),e})),eventOptions:function(e){var t=void 0===e?{}:e,n=t.passive,r=void 0===n||n,i=t.capture;return{passive:r,capture:void 0!==i&&i}}},Rl=gl({},$l,{threshold:function(e,t,n){var r=n.filterTaps,i=void 0!==r&&r,o=n.lockDirection,a=void 0!==o&&o,s=n.axis,l=jl(e,i?3:a||(void 0===s?void 0:s)?1:0);return this.filterTaps=i||l[0]+l[1]>0,l},swipeVelocity:function(e){return void 0===e&&(e=.5),jl(e)},swipeDistance:function(e){return void 0===e&&(e=60),jl(e)},delay:function(e){switch(void 0===e&&(e=0),e){case!0:return 180;case!1:return 0;default:return e}}});function Ll(e){var t=e.domTarget,n=e.eventOptions,r=e.window,i=e.enabled,o=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["domTarget","eventOptions","window","enabled"]),a=function(e){return void 0===e&&(e={}),Sl(e,Ol)}({domTarget:t,eventOptions:n,window:r,enabled:i});return a.drag=function(e){return void 0===e&&(e={}),Sl(e,Rl)}(o),a}function Tl(e){return gl({_active:!1,_blocked:!1,_intentional:[!1,!1],_movement:[0,0],_initial:[0,0],_bounds:[[-1/0,1/0],[-1/0,1/0]],_lastEventType:void 0,event:void 0,intentional:!1,values:[0,0],velocities:[0,0],delta:[0,0],movement:[0,0],offset:[0,0],lastOffset:[0,0],direction:[0,0],initial:[0,0],previous:[0,0],first:!1,last:!1,active:!1,timeStamp:0,startTime:0,elapsedTime:0,cancel:Cl,canceled:!1,memo:void 0,args:void 0},e)}function _l(){return{shared:{hovering:!1,scrolling:!1,wheeling:!1,dragging:!1,moving:!1,pinching:!1,touches:0,buttons:0,down:!1,shiftKey:!1,altKey:!1,metaKey:!1,ctrlKey:!1},drag:Tl({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0,_isTap:!0,_delayedEvent:!1,_pointerId:void 0,tap:!1,swipe:[0,0]}),pinch:Tl({da:[0,0],vdva:[0,0],origin:void 0,turns:0}),wheel:Tl({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),move:Tl({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),scroll:Tl({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0})}}var Pl=new Map,Ml=function(){function e(e,t){var n=this;void 0===t&&(t=[]),this.controller=e,this.args=t,this.debounced=!0,this.setTimeout=function(e,t){var r;void 0===t&&(t=140),clearTimeout(n.controller.timeouts[n.stateKey]);for(var i=arguments.length,o=new Array(i>2?i-2:0),a=2;a<i;a++)o[a-2]=arguments[a];n.controller.timeouts[n.stateKey]=(r=window).setTimeout.apply(r,[e,t].concat(o))},this.clearTimeout=function(){clearTimeout(n.controller.timeouts[n.stateKey])},this.fireGestureHandler=function(e){if(void 0===e&&(e=!1),n.state._blocked)return n.debounced||(n.state._active=!1,n.clean()),null;if(!e&&!n.state.intentional&&!n.config.triggerAllEvents)return null;if(n.state.intentional){var t=n.state.active,r=n.state._active;n.state.active=r,n.state.first=r&&!t,n.state.last=t&&!r,n.controller.state.shared[n.ingKey]=r}var i=gl({},n.controller.state.shared,n.state,n.mapStateValues(n.state)),o=n.handler(i);return n.state.memo=void 0!==o?o:n.state.memo,n.state._active||n.clean(),i}}var t=e.prototype;return t.updateSharedState=function(e){Object.assign(this.controller.state.shared,e)},t.updateGestureState=function(e){Object.assign(this.state,e)},t.checkIntentionality=function(e,t){return{_intentional:e,_blocked:!1}},t.getMovement=function(e){var t=this.config,n=t.initial,r=t.bounds,i=t.rubberband,o=t.threshold,a=this.state,s=a._bounds,l=a._initial,c=a._active,u=a._intentional,d=a.lastOffset,p=a.movement,h=this.getInternalMovement(e,this.state),f=!1===u[0]?Dl(h[0],o[0]):u[0],x=!1===u[1]?Dl(h[1],o[1]):u[1],g=this.checkIntentionality([f,x],h);if(g._blocked)return gl({},g,{_movement:h,delta:[0,0]});var v,m,b,y,C=g._intentional,w=h;(!1!==C[0]&&!1===u[0]&&(m=kl(n,this.state),v=kl(r,this.state),l[0]=m[0],s[0]=v[0]),!1!==C[1]&&!1===u[1])&&(m=null!=(b=m)?b:kl(n,this.state),v=null!=(y=v)?y:kl(r,this.state),l[1]=m[1],s[1]=v[1]);var j=[!1!==C[0]?h[0]-C[0]:l[0],!1!==C[1]?h[1]-C[1]:l[1]],k=cl(j,d),S=c?i:[0,0];return j=Il(s,cl(j,l),S),gl({},g,{intentional:!1!==C[0]||!1!==C[1],_initial:l,_movement:w,movement:j,values:e,offset:Il(s,k,S),delta:ul(j,p)})},t.clean=function(){this.clearTimeout()},xl(e,[{key:"config",get:function(){return this.controller.config[this.stateKey]}},{key:"enabled",get:function(){return this.controller.config.enabled&&this.config.enabled}},{key:"state",get:function(){return this.controller.state[this.stateKey]}},{key:"handler",get:function(){return this.controller.handlers[this.stateKey]}}]),e}();function Dl(e,t){return Math.abs(e)>=t&&pl(e)*t}function Il(e,t,n){var r=t[0],i=t[1],o=n[0],a=n[1],s=e[0],l=s[0],c=s[1],u=e[1],d=u[0],p=u[1];return[fl(r,l,c,o),fl(i,d,p,a)]}function Nl(e,t,n){var r=e.state,i=e.args,o=t.timeStamp,a=t.type,s=r.values;return{_lastEventType:a,event:t,timeStamp:o,elapsedTime:n?0:o-r.startTime,args:i,previous:s}}function Vl(e,t){return function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return e.call.apply(e,[this,gl({},t,{event:n})].concat(i))}}var zl=function(e){var t=this;this.classes=e,this.bind=function(){for(var e={},n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];for(var o,a=yl(t.classes);!(o=a()).done;){new(0,o.value)(t,r).addBindings(e)}for(var s=0,l=Object.entries(t.nativeRefs);s<l.length;s++){var c=l[s];Hl(e,c[0],Vl(c[1],gl({},t.state.shared,{args:r})))}return t.config.domTarget?function(e,t){var n=e.config,r=e.domListeners,i=Bl(n);if(!i)throw new Error("domTarget must be defined");var o=n.eventOptions;Zl(i,Al(r),o);for(var a=0,s=Object.entries(t);a<s.length;a++){var l=s[a],c=l[0],u=l[1],d=c.slice(2).toLowerCase();r.push([d,wl.apply(void 0,u)])}Fl(i,r,o)}(t,e):function(e,t){for(var n=e.config,r={},i=n.eventOptions.capture?"Capture":"",o=0,a=Object.entries(t);o<a.length;o++){var s=a[o],l=s[0],c=s[1],u=Array.isArray(c)?c:[c];r[l+i]=wl.apply(void 0,u)}return r}(t,e)},this.effect=function(){return t.config.domTarget&&t.bind(),t.clean},this.clean=function(){var e=Bl(t.config),n=t.config.eventOptions;e&&Zl(e,Al(t.domListeners),n),Object.values(t.timeouts).forEach(clearTimeout),function(e){var t=e.config,n=t.window,r=t.eventOptions,i=e.windowListeners;if(!n)return;for(var o in i){Zl(n,i[o],r)}e.windowListeners={}}(t)},this.state=_l(),this.timeouts={},this.domListeners=[],this.windowListeners={}};function Al(e){return void 0===e&&(e=[]),e.splice(0,e.length)}function Bl(e){var t=e.domTarget;return t&&"current"in t?t.current:t}function Hl(e,t,n){e[t]||(e[t]=[]),e[t].push(n)}function Fl(e,t,n){void 0===t&&(t=[]),void 0===n&&(n={});for(var r,i=yl(t);!(r=i()).done;){var o=r.value,a=o[0],s=o[1];e.addEventListener(a,s,n)}}function Zl(e,t,n){void 0===t&&(t=[]),void 0===n&&(n={});for(var r,i=yl(t);!(r=i()).done;){var o=r.value,a=o[0],s=o[1];e.removeEventListener(a,s,n)}}function Gl(e,t,r){void 0===r&&(r={});var i=function(e){var t=new Set;e.drag&&t.add(Pl.get("drag"));e.wheel&&t.add(Pl.get("wheel"));e.scroll&&t.add(Pl.get("scroll"));e.move&&t.add(Pl.get("move"));e.pinch&&t.add(Pl.get("pinch"));e.hover&&t.add(Pl.get("hover"));return t}(e),o=n.useMemo((function(){return new zl(i)}),[]);return o.config=t,o.handlers=e,o.nativeRefs=r,n.useEffect(o.effect,[]),o.config.domTarget?ql:o.bind}function ql(){"development"===process.env.NODE_ENV&&console.warn("Deprecation notice: When the `domTarget` option is specified, you don't need to write `useEffect(bind, [bind])` anymore: event binding is now made handled internally to this lib.\n\nNext version won't return anything when `domTarget` is provided, therefore your code will break if you try to call `useEffect`.")}function Wl(e){if("touches"in e){var t=e.targetTouches,n=e.changedTouches;return t.length>0?t:n}return null}function Ul(e){var t="buttons"in e?e.buttons:0,n=Wl(e),r=n&&n.length||0;return{touches:r,down:r>0||t>0,buttons:t,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,ctrlKey:e.ctrlKey}}function Xl(e){var t=Wl(e),n=t?t[0]:e;return[n.clientX,n.clientY]}var Yl=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).ingKey="dragging",t.stateKey="drag",t.onDragStart=function(e){t.enabled&&!t.state._active&&(!function(e,t,n){var r=e.config,i=e.windowListeners;void 0===n&&(n=[]),r.window&&(Zl(r.window,i[t],r.eventOptions),Fl(r.window,i[t]=n,r.eventOptions))}(t.controller,t.stateKey,[["pointermove",t.onDragChange],["pointerup",t.onDragEnd],["pointercancel",t.onDragEnd]]),t.updateGestureState({_pointerId:e.pointerId}),t.config.delay>0?(t.state._delayedEvent=!0,"persist"in e&&"function"==typeof e.persist&&e.persist(),t.setTimeout(t.startDrag.bind(ml(t)),t.config.delay,e)):t.startDrag(e))},t.onDragChange=function(e){if(!t.state.canceled&&e.pointerId===t.state._pointerId)if(t.state._active){var n=Ul(e);if(n.down){t.updateSharedState(n);var r=Xl(e),i=t.getKinematics(r,e),o=Nl(ml(t),e),a=t.state._isTap,s=dl(i._movement);a&&s>=3&&(a=!1),t.updateGestureState(gl({},o,i,{_isTap:a})),t.fireGestureHandler()}else t.onDragEnd(e)}else t.state._delayedEvent&&(t.clearTimeout(),t.startDrag(e))},t.onDragEnd=function(e){if(e.pointerId===t.state._pointerId){t.state._active=!1,t.updateSharedState({down:!1,buttons:0,touches:0});var n=t.state._isTap,r=t.state.velocities,i=r[0],o=r[1],a=t.state.movement,s=a[0],l=a[1],c=t.state._intentional,u=c[0],d=c[1],p=t.config.swipeVelocity,h=p[0],f=p[1],x=t.config.swipeDistance,g=x[0],v=x[1],m=gl({},Nl(ml(t),e),t.getMovement(t.state.values)),b=[0,0];m.elapsedTime<220&&(!1!==u&&Math.abs(i)>h&&Math.abs(s)>g&&(b[0]=pl(i)),!1!==d&&Math.abs(o)>f&&Math.abs(l)>v&&(b[1]=pl(o))),t.updateGestureState(gl({},m,{tap:n,swipe:b})),t.fireGestureHandler(!0===n)}},t.clean=function(){e.prototype.clean.call(ml(t)),t.state._delayedEvent=!1,function(e,t){var n=e.config,r=e.windowListeners;n.window&&(Zl(n.window,r[t],n.eventOptions),delete r[t])}(t.controller,t.stateKey)},t.onCancel=function(){t.state.canceled||(t.updateGestureState({canceled:!0}),t.state._active=!1,t.updateSharedState({down:!1,buttons:0,touches:0}),requestAnimationFrame((function(){return t.fireGestureHandler()})))},t.onClick=function(e){t.state._isTap||e.stopPropagation()},t}vl(t,e);var n=t.prototype;return n.startDrag=function(e){var t=Xl(e);this.updateSharedState(Ul(e)),this.updateGestureState(gl({},function(e,t,n){var r=e.state.offset,i=n.timeStamp;return gl({},_l()[e.stateKey],{_active:!0,values:t,initial:t,offset:r,lastOffset:r,startTime:i})}(this,t,e),Nl(this,e,!0),{_pointerId:e.pointerId,cancel:this.onCancel})),this.updateGestureState(this.getMovement(t)),this.fireGestureHandler()},n.addBindings=function(e){(Hl(e,"onPointerDown",this.onDragStart),this.config.filterTaps)&&Hl(e,this.controller.config.eventOptions.capture?"onClick":"onClickCapture",this.onClick)},t}(function(e){function t(){return e.apply(this,arguments)||this}vl(t,e);var n=t.prototype;return n.getInternalMovement=function(e,t){return ul(e,t.initial)},n.checkIntentionality=function(e,t){if(!1===e[0]&&!1===e[1])return{_intentional:e,axis:this.state.axis};var n=t.map(Math.abs),r=n[0],i=n[1],o=this.state.axis||(r>i?"x":r<i?"y":void 0);return this.config.axis||this.config.lockDirection?o?this.config.axis&&o!==this.config.axis?{_intentional:e,_blocked:!0,axis:o}:(e["x"===o?1:0]=!1,{_intentional:e,_blocked:!1,axis:o}):{_intentional:[!1,!1],_blocked:!1,axis:o}:{_intentional:e,_blocked:!1,axis:o}},n.getKinematics=function(e,t){var n=this.getMovement(e);if(!n._blocked){var r=t.timeStamp-this.state.timeStamp;Object.assign(n,function(e,t,n){var r=dl(t),i=0===r?0:1/r,o=0===n?0:1/n,a=o*r,s=t.map((function(e){return o*e})),l=t.map((function(e){return i*e}));return{velocities:s,velocity:a,distance:dl(e),direction:l}}(n.movement,n.delta,r))}return n},n.mapStateValues=function(e){return{xy:e.values,vxvy:e.velocities}},t}(Ml));function Kl(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;var n,r,i,o;if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(r=n;0!=r--;)if(!Kl(e[r],t[r]))return!1;return!0}if("function"==typeof Map&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!Kl(r.value[1],t.get(r.value[0])))return!1;return!0}if("function"==typeof Set&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if((n=(i=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if("undefined"!=typeof Element&&e instanceof Element)return!1;for(r=n;0!=r--;)if(!("_owner"===i[r]&&e.$$typeof||Kl(e[i[r]],t[i[r]])))return!1;return!0}return e!=e&&t!=t}function Jl(e,t){try{return Kl(e,t)}catch(e){if((e.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw e}}function Ql(e,t){void 0===t&&(t={}),Pl.set("drag",Yl);var r=n.useRef();return r.current||(r.current=function(e,t){var n,r,i=[],o=!1;return function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];return o&&n===this&&t(s,i)||(r=e.apply(this,s),o=!0,n=this,i=s),r}}(Ll,Jl)),Gl({drag:e},r.current(t))}
2247
+ ***************************************************************************** */var Ui,Xi,Yi=function(){return Yi=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Yi.apply(this,arguments)};function Ki(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function Ji(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Qi(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function eo(e,t,n){if(2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}!function(e){e.Start="xstate.start",e.Stop="xstate.stop",e.Raise="xstate.raise",e.Send="xstate.send",e.Cancel="xstate.cancel",e.NullEvent="",e.Assign="xstate.assign",e.After="xstate.after",e.DoneState="done.state",e.DoneInvoke="done.invoke",e.Log="xstate.log",e.Init="xstate.init",e.Invoke="xstate.invoke",e.ErrorExecution="error.execution",e.ErrorCommunication="error.communication",e.ErrorPlatform="error.platform",e.ErrorCustom="xstate.error",e.Update="xstate.update",e.Pure="xstate.pure",e.Choose="xstate.choose"}(Ui||(Ui={})),function(e){e.Parent="#_parent",e.Internal="#_internal"}(Xi||(Xi={}));var to=Ui.Start,no=Ui.Stop,ro=Ui.Raise,io=Ui.Send,oo=Ui.Cancel,ao=Ui.NullEvent,so=Ui.Assign;Ui.After,Ui.DoneState;var lo=Ui.Log,co=Ui.Init,uo=Ui.Invoke;Ui.ErrorExecution;var po,ho=Ui.ErrorPlatform,fo=Ui.ErrorCustom,xo=Ui.Update,go=Ui.Choose,vo=Ui.Pure,mo={},bo="xstate.guard",yo="production"===process.env.NODE_ENV;function Co(e,t,n){void 0===n&&(n=".");var r=ko(e,n),i=ko(t,n);return Ao(i)?!!Ao(r)&&i===r:Ao(r)?r in i:Object.keys(r).every((function(e){return e in i&&Co(r[e],i[e])}))}function wo(e){try{return Ao(e)||"number"==typeof e?"".concat(e):e.type}catch(e){throw new Error("Events must be strings or objects with a string event.type property.")}}function jo(e,t){try{return Vo(e)?e:e.toString().split(t)}catch(t){throw new Error("'".concat(e,"' is not a valid state path."))}}function ko(e,t){return"object"==typeof(n=e)&&"value"in n&&"context"in n&&"event"in n&&"_event"in n?e.value:Vo(e)?So(e):"string"!=typeof e?e:So(jo(e,t));var n}function So(e){if(1===e.length)return e[0];for(var t={},n=t,r=0;r<e.length-1;r++)r===e.length-2?n[e[r]]=e[r+1]:(n[e[r]]={},n=n[e[r]]);return t}function $o(e,t){for(var n={},r=Object.keys(e),i=0;i<r.length;i++){var o=r[i];n[o]=t(e[o],o,e,i)}return n}function Eo(e,t,n){var r,i,o={};try{for(var a=Ji(Object.keys(e)),s=a.next();!s.done;s=a.next()){var l=s.value,c=e[l];n(c)&&(o[l]=t(c,l,e))}}catch(e){r={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return o}var Oo=function(e){return function(t){var n,r,i=t;try{for(var o=Ji(e),a=o.next();!a.done;a=o.next()){i=i[a.value]}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i}};function Ro(e){return e?Ao(e)?[[e]]:Lo(Object.keys(e).map((function(t){var n=e[t];return"string"==typeof n||n&&Object.keys(n).length?Ro(e[t]).map((function(e){return[t].concat(e)})):[[t]]}))):[[]]}function Lo(e){var t;return(t=[]).concat.apply(t,eo([],Qi(e),!1))}function To(e){return Vo(e)?e:[e]}function _o(e){return void 0===e?[]:To(e)}function Po(e,t,n){var r,i;if(zo(e))return e(t,n.data);var o={};try{for(var a=Ji(Object.keys(e)),s=a.next();!s.done;s=a.next()){var l=s.value,c=e[l];zo(c)?o[l]=c(t,n.data):o[l]=c}}catch(e){r={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return o}function Mo(e){return e instanceof Promise||!(null===e||!zo(e)&&"object"!=typeof e||!zo(e.then))}function Do(e,t){return $o(e.states,(function(e,n){if(e){var r=(Ao(t)?void 0:t[n])||(e?e.current:void 0);if(r)return{current:r,states:Do(e,r)}}}))}function Io(e,t,n,r){yo||No(!!e,"Attempting to update undefined context");var i=e?n.reduce((function(e,n){var i,o,a=n.assignment,s={state:r,action:n,_event:t},l={};if(zo(a))l=a(e,t.data,s);else try{for(var c=Ji(Object.keys(a)),u=c.next();!u.done;u=c.next()){var d=u.value,p=a[d];l[d]=zo(p)?p(e,t.data,s):p}}catch(e){i={error:e}}finally{try{u&&!u.done&&(o=c.return)&&o.call(c)}finally{if(i)throw i.error}}return Object.assign({},e,l)}),e):e;return i}var No=function(){};function Vo(e){return Array.isArray(e)}function zo(e){return"function"==typeof e}function Ao(e){return"string"==typeof e}function Bo(e,t){if(e)return Ao(e)?{type:bo,name:e,predicate:t?t[e]:void 0}:zo(e)?{type:bo,name:e.name,predicate:e}:e}yo||(No=function(e,t){var n=e instanceof Error?e:void 0;if((n||!e)&&void 0!==console){var r=["Warning: ".concat(t)];n&&r.push(n),console.warn.apply(console,r)}});var Ho=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}();function Fo(e){return!!e&&"__xstatenode"in e}function Zo(e,t){return Ao(e)||"number"==typeof e?Yi({type:e},t):e}function Go(e,t){if(!Ao(e)&&"$$type"in e&&"scxml"===e.$$type)return e;var n=Zo(e);return Yi({name:n.type,data:n,$$type:"scxml",type:"external"},t)}function qo(e,t){return To(t).map((function(t){return void 0===t||"string"==typeof t||Fo(t)?{target:t,event:e}:Yi(Yi({},t),{event:e})}))}function Wo(e,t,n,r,i){var o=e.options.guards,a={state:i,cond:t,_event:r};if(t.type===bo)return((null==o?void 0:o[t.name])||t.predicate)(n,r.data,a);var s=null==o?void 0:o[t.type];if(!s)throw new Error("Guard '".concat(t.type,"' is not implemented on machine '").concat(e.id,"'."));return s(n,r.data,a)}function Uo(e){return"string"==typeof e?{type:e}:e}function Xo(e,t,n){var r=function(){},i="object"==typeof e,o=i?e:null;return{next:((i?e.next:e)||r).bind(o),error:((i?e.error:t)||r).bind(o),complete:((i?e.complete:n)||r).bind(o)}}function Yo(e,t){return"".concat(e,":invocation[").concat(t,"]")}function Ko(e){return(e.type===ro||e.type===io&&e.to===Xi.Internal)&&"number"!=typeof e.delay}(po={})[Ho]=function(){return this},po[Symbol.observable]=function(){return this};var Jo=Go({type:co});function Qo(e,t){return t&&t[e]||void 0}function ea(e,t){var n;if(Ao(e)||"number"==typeof e)n=zo(r=Qo(e,t))?{type:e,exec:r}:r||{type:e,exec:void 0};else if(zo(e))n={type:e.name||e.toString(),exec:e};else{var r;if(zo(r=Qo(e.type,t)))n=Yi(Yi({},e),{exec:r});else if(r){var i=r.type||e.type;n=Yi(Yi(Yi({},r),e),{type:i})}else n=e}return n}var ta=function(e,t){return e?(Vo(e)?e:[e]).map((function(e){return ea(e,t)})):[]};function na(e){var t=ea(e);return Yi(Yi({id:Ao(e)?e:t.id},t),{type:t.type})}function ra(e,t){var n="".concat(Ui.DoneState,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function ia(e,t){var n="".concat(Ui.DoneInvoke,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function oa(e,t){var n="".concat(Ui.ErrorPlatform,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function aa(e,t,n,r,i,o,a){void 0===a&&(a=!1);var s=a?[]:function(e){var t,n,r=[];try{for(var i=Ji(e),o=i.next();!o.done;o=i.next())for(var a=o.value,s=0;s<a.actions.length;)a.actions[s].type!==so?s++:(r.push(a.actions[s]),a.actions.splice(s,1))}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}(i),l=s.length?Io(n,r,s,t):n,c=a?[n]:void 0,u=[];function d(i,s){var d;switch(s.type){case ro:var p=function(e,t,n,r){var i,o={_event:n},a=Go(zo(e.event)?e.event(t,n.data,o):e.event);if(Ao(e.delay)){var s=r&&r[e.delay];i=zo(s)?s(t,n.data,o):s}else i=zo(e.delay)?e.delay(t,n.data,o):e.delay;return Yi(Yi({},e),{type:ro,_event:a,delay:i})}(s,l,r,e.options.delays);return o&&"number"==typeof p.delay&&o(p,l,r),p;case io:var h=function(e,t,n,r){var i,o={_event:n},a=Go(zo(e.event)?e.event(t,n.data,o):e.event);if(Ao(e.delay)){var s=r&&r[e.delay];i=zo(s)?s(t,n.data,o):s}else i=zo(e.delay)?e.delay(t,n.data,o):e.delay;var l=zo(e.to)?e.to(t,n.data,o):e.to;return Yi(Yi({},e),{to:l,_event:a,event:a.data,delay:i})}(s,l,r,e.options.delays);if(!yo){var f=s.delay;No(!Ao(f)||"number"==typeof h.delay,"No delay reference for delay expression '".concat(f,"' was found on machine '").concat(e.id,"'"))}return o&&h.to!==Xi.Internal&&("entry"===i?u.push(h):o(h,l,r)),h;case lo:var x=function(e,t,n){return Yi(Yi({},e),{value:Ao(e.expr)?e.expr:e.expr(t,n.data,{_event:n})})}(s,l,r);return null==o||o(x,l,r),x;case go:if(!(b=null===(d=s.conds.find((function(n){var i=Bo(n.cond,e.options.guards);return!i||Wo(e,i,l,r,o?void 0:t)})))||void 0===d?void 0:d.actions))return[];var g=Qi(aa(e,t,l,r,[{type:i,actions:ta(_o(b),e.options.actions)}],o,a),2),v=g[0],m=g[1];return l=m,null==c||c.push(l),v;case vo:var b;if(!(b=s.get(l,r.data)))return[];var y=Qi(aa(e,t,l,r,[{type:i,actions:ta(_o(b),e.options.actions)}],o,a),2),C=y[0],w=y[1];return l=w,null==c||c.push(l),C;case no:x=function(e,t,n){var r=zo(e.activity)?e.activity(t,n.data):e.activity,i="string"==typeof r?{id:r}:r;return{type:Ui.Stop,activity:i}}(s,l,r);return null==o||o(x,n,r),x;case so:l=Io(l,r,[s],o?void 0:t),null==c||c.push(l);break;default:var j=ea(s,e.options.actions),k=j.exec;if(o)o(j,l,r);else if(k&&c){var S=c.length-1,$=Yi(Yi({},j),{exec:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];k.apply(void 0,eo([c[S]],Qi(t),!1))}});j=$}return j}}var p=Lo(i.map((function(e){var t,n,i=[];try{for(var a=Ji(e.actions),s=a.next();!s.done;s=a.next()){var c=s.value,p=d(e.type,c);p&&(i=i.concat(p))}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return u.forEach((function(e){o(e,l,r)})),u.length=0,i})));return[p,l]}var sa=function(e,t){return t(e)};function la(e){var t;return(t={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:e}}})[Ho]=function(){return this},t}function ca(e,t,n){var r=la(t);if(r.deferred=!0,Fo(e)){var i=r.state=sa(void 0,(function(){return(n?e.withContext(n):e).initialState}));r.getSnapshot=function(){return i}}return r}var ua=function(e){return"atomic"===e.type||"final"===e.type};function da(e){return Object.keys(e.states).map((function(t){return e.states[t]}))}function pa(e){return da(e).filter((function(e){return"history"!==e.type}))}function ha(e){var t=[e];return ua(e)?t:t.concat(Lo(pa(e).map(ha)))}function fa(e,t){var n,r,i,o,a,s,l,c,u=ga(new Set(e)),d=new Set(t);try{for(var p=Ji(d),h=p.next();!h.done;h=p.next())for(var f=(j=h.value).parent;f&&!d.has(f);)d.add(f),f=f.parent}catch(e){n={error:e}}finally{try{h&&!h.done&&(r=p.return)&&r.call(p)}finally{if(n)throw n.error}}var x=ga(d);try{for(var g=Ji(d),v=g.next();!v.done;v=g.next()){if("compound"!==(j=v.value).type||x.get(j)&&x.get(j).length){if("parallel"===j.type)try{for(var m=(a=void 0,Ji(pa(j))),b=m.next();!b.done;b=m.next()){var y=b.value;d.has(y)||(d.add(y),u.get(y)?u.get(y).forEach((function(e){return d.add(e)})):y.initialStateNodes.forEach((function(e){return d.add(e)})))}}catch(e){a={error:e}}finally{try{b&&!b.done&&(s=m.return)&&s.call(m)}finally{if(a)throw a.error}}}else u.get(j)?u.get(j).forEach((function(e){return d.add(e)})):j.initialStateNodes.forEach((function(e){return d.add(e)}))}}catch(e){i={error:e}}finally{try{v&&!v.done&&(o=g.return)&&o.call(g)}finally{if(i)throw i.error}}try{for(var C=Ji(d),w=C.next();!w.done;w=C.next()){var j;for(f=(j=w.value).parent;f&&!d.has(f);)d.add(f),f=f.parent}}catch(e){l={error:e}}finally{try{w&&!w.done&&(c=C.return)&&c.call(C)}finally{if(l)throw l.error}}return d}function xa(e,t){var n=t.get(e);if(!n)return{};if("compound"===e.type){var r=n[0];if(!r)return{};if(ua(r))return r.key}var i={};return n.forEach((function(e){i[e.key]=xa(e,t)})),i}function ga(e){var t,n,r=new Map;try{for(var i=Ji(e),o=i.next();!o.done;o=i.next()){var a=o.value;r.has(a)||r.set(a,[]),a.parent&&(r.has(a.parent)||r.set(a.parent,[]),r.get(a.parent).push(a))}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}function va(e,t){return xa(e,ga(fa([e],t)))}function ma(e,t){return Array.isArray(e)?e.some((function(e){return e===t})):e instanceof Set&&e.has(t)}function ba(e,t){return"compound"===t.type?pa(t).some((function(t){return"final"===t.type&&ma(e,t)})):"parallel"===t.type&&pa(t).every((function(t){return ba(e,t)}))}function ya(e){return new Set(Lo(e.map((function(e){return e.tags}))))}function Ca(e,t){if(e===t)return!0;if(void 0===e||void 0===t)return!1;if(Ao(e)||Ao(t))return e===t;var n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every((function(n){return Ca(e[n],t[n])}))}var wa=function(){function e(e){var t,n,r=this;this.actions=[],this.activities=mo,this.meta={},this.events=[],this.value=e.value,this.context=e.context,this._event=e._event,this._sessionid=e._sessionid,this.event=this._event.data,this.historyValue=e.historyValue,this.history=e.history,this.actions=e.actions||[],this.activities=e.activities||mo,this.meta=(void 0===(n=e.configuration)&&(n=[]),n.reduce((function(e,t){return void 0!==t.meta&&(e[t.id]=t.meta),e}),{})),this.events=e.events||[],this.matches=this.matches.bind(this),this.toStrings=this.toStrings.bind(this),this.configuration=e.configuration,this.transitions=e.transitions,this.children=e.children,this.done=!!e.done,this.tags=null!==(t=Array.isArray(e.tags)?new Set(e.tags):e.tags)&&void 0!==t?t:new Set,this.machine=e.machine,Object.defineProperty(this,"nextEvents",{get:function(){return function(e){return eo([],Qi(new Set(Lo(eo([],Qi(e.map((function(e){return e.ownEvents}))),!1)))),!1)}(r.configuration)}})}return e.from=function(t,n){return t instanceof e?t.context!==n?new e({value:t.value,context:n,_event:t._event,_sessionid:null,historyValue:t.historyValue,history:t.history,actions:[],activities:t.activities,events:[],configuration:[],transitions:[],children:{}}):t:new e({value:t,context:n,_event:Jo,_sessionid:null,historyValue:void 0,history:void 0,actions:[],activities:void 0,events:[],configuration:[],transitions:[],children:{}})},e.create=function(t){return new e(t)},e.inert=function(t,n){if(t instanceof e){if(!t.actions.length)return t;var r=Jo;return new e({value:t.value,context:n,_event:r,_sessionid:null,historyValue:t.historyValue,history:t.history,activities:t.activities,configuration:t.configuration,transitions:[],children:{}})}return e.from(t,n)},e.prototype.toStrings=function(e,t){var n=this;if(void 0===e&&(e=this.value),void 0===t&&(t="."),Ao(e))return[e];var r=Object.keys(e);return r.concat.apply(r,eo([],Qi(r.map((function(r){return n.toStrings(e[r],t).map((function(e){return r+t+e}))}))),!1))},e.prototype.toJSON=function(){var e=this;e.configuration,e.transitions;var t=e.tags;e.machine;var n=Ki(e,["configuration","transitions","tags","machine"]);return Yi(Yi({},n),{tags:Array.from(t)})},e.prototype.matches=function(e){return Co(e,this.value)},e.prototype.hasTag=function(e){return this.tags.has(e)},e.prototype.can=function(e){var t;yo&&No(!!this.machine,"state.can(...) used outside of a machine-created State object; this will always return false.");var n=null===(t=this.machine)||void 0===t?void 0:t.getTransitionData(this,e);return!!(null==n?void 0:n.transitions.length)&&n.transitions.some((function(e){return void 0!==e.target||e.actions.length}))},e}(),ja={deferEvents:!1},ka=function(){function e(e){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=Yi(Yi({},ja),e)}return e.prototype.initialize=function(e){if(this.initialized=!0,e){if(!this.options.deferEvents)return void this.schedule(e);this.process(e)}this.flushEvents()},e.prototype.schedule=function(e){if(this.initialized&&!this.processingEvent){if(0!==this.queue.length)throw new Error("Event queue should be empty when it is not processing events");this.process(e),this.flushEvents()}else this.queue.push(e)},e.prototype.clear=function(){this.queue=[]},e.prototype.flushEvents=function(){for(var e=this.queue.shift();e;)this.process(e),e=this.queue.shift()},e.prototype.process=function(e){this.processingEvent=!0;try{e()}catch(e){throw this.clear(),e}finally{this.processingEvent=!1}},e}(),Sa=new Map,$a=0,Ea=function(){return"x:".concat($a++)},Oa=function(e,t){return Sa.set(e,t),e},Ra=function(e){return Sa.get(e)},La=function(e){Sa.delete(e)};function Ta(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void(yo||console.warn("XState could not find a global object in this environment. Please let the maintainers know and raise an issue here: https://github.com/statelyai/xstate/issues"))}function _a(e){if(Ta()){var t=function(){var e=Ta();if(e&&"__xstate__"in e)return e.__xstate__}();t&&t.register(e)}}function Pa(e,t){void 0===t&&(t={});var n=e.initialState,r=new Set,i=[],o=!1,a=function(e){var t;return Yi(((t={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}})[Ho]=function(){return this},t),e)}({id:t.id,send:function(t){i.push(t),function(){if(!o){for(o=!0;i.length>0;){var t=i.shift();n=e.transition(n,t,s),r.forEach((function(e){return e.next(n)}))}o=!1}}()},getSnapshot:function(){return n},subscribe:function(e,t,i){var o=Xo(e,t,i);return r.add(o),o.next(n),{unsubscribe:function(){r.delete(o)}}}}),s={parent:t.parent,self:a,id:t.id||"anonymous",observers:r};return n=e.start?e.start(s):n,a}var Ma,Da={sync:!1,autoForward:!1};!function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(Ma||(Ma={}));var Ia=function(){function e(t,n){void 0===n&&(n=e.defaultOptions);var r=this;this.machine=t,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=Ma.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(e,t){if(Vo(e))return r.batch(e),r.state;var n=Go(Zo(e,t));if(r.status===Ma.Stopped)return yo||No(!1,'Event "'.concat(n.name,'" was sent to stopped service "').concat(r.machine.id,'". This service has already reached its final state, and will not transition.\nEvent: ').concat(JSON.stringify(n.data))),r.state;if(r.status!==Ma.Running&&!r.options.deferEvents)throw new Error('Event "'.concat(n.name,'" was sent to uninitialized service "').concat(r.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.\nEvent: ').concat(JSON.stringify(n.data)));return r.scheduler.schedule((function(){r.forward(n);var e=r._nextState(n);r.update(e,n)})),r._state},this.sendTo=function(e,t,n){var i,o=r.parent&&(t===Xi.Parent||r.parent.id===t),a=o?r.parent:Ao(t)?t===Xi.Internal?r:r.children.get(t)||Ra(t):(i=t)&&"function"==typeof i.send?t:void 0;if(a)if("machine"in a){if(r.status!==Ma.Stopped||r.parent!==a||r.state.done){var s=Yi(Yi({},e),{name:e.name===fo?"".concat(oa(r.id)):e.name,origin:r.sessionId});!n&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([a,s]):a.send(s)}}else!n&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([a,e.data]):a.send(e.data);else{if(!o)throw new Error("Unable to send event to child '".concat(t,"' from service '").concat(r.id,"'."));yo||No(!1,"Service '".concat(r.id,"' has no parent: unable to send event ").concat(e.type))}},this._exec=function(e,t,n,i){void 0===i&&(i=r.machine.options.actions);var o=e.exec||Qo(e.type,i),a=zo(o)?o:o?o.exec:e.exec;if(a)try{return a(t,n.data,r.machine.config.predictableActionArguments?{action:e,_event:n}:{action:e,state:r.state,_event:n})}catch(e){throw r.parent&&r.parent.send({type:"xstate.error",data:e}),e}switch(e.type){case ro:var s=e;r.defer(s);break;case io:var l=e;if("number"==typeof l.delay)return void r.defer(l);l.to?r.sendTo(l._event,l.to,n===Jo):r.send(l._event);break;case oo:r.cancel(e.sendId);break;case to:if(r.status!==Ma.Running)return;var c=e.activity;if(!r.machine.config.predictableActionArguments&&!r.state.activities[c.id||c.type])break;if(c.type===Ui.Invoke){var u=Uo(c.src),d=r.machine.options.services?r.machine.options.services[u.type]:void 0,p=c.id,h=c.data;yo||No(!("forward"in c),"`forward` property is deprecated (found in invocation of '".concat(c.src,"' in in machine '").concat(r.machine.id,"'). ")+"Please use `autoForward` instead.");var f="autoForward"in c?c.autoForward:!!c.forward;if(!d)return void(yo||No(!1,"No service found for invocation '".concat(c.src,"' in machine '").concat(r.machine.id,"'.")));var x=h?Po(h,t,n):void 0;if("string"==typeof d)return;var g=zo(d)?d(t,n.data,{data:x,src:u,meta:c.meta}):d;if(!g)return;var v=void 0;Fo(g)&&(g=x?g.withContext(x):g,v={autoForward:f}),r.spawn(g,p,v)}else r.spawnActivity(c);break;case no:r.stopChild(e.activity.id);break;case lo:var m=e,b=m.label,y=m.value;b?r.logger(b,y):r.logger(y);break;default:yo||No(!1,"No implementation found for action type '".concat(e.type,"'"))}};var i=Yi(Yi({},e.defaultOptions),n),o=i.clock,a=i.logger,s=i.parent,l=i.id,c=void 0!==l?l:t.id;this.id=c,this.logger=a,this.clock=o,this.parent=s,this.options=i,this.scheduler=new ka({deferEvents:this.options.deferEvents}),this.sessionId=Ea()}return Object.defineProperty(e.prototype,"initialState",{get:function(){var e=this;return this._initialState?this._initialState:sa(this,(function(){return e._initialState=e.machine.initialState,e._initialState}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return yo||No(this.status!==Ma.NotStarted,"Attempted to read state from uninitialized service '".concat(this.id,"'. Make sure the service is started first.")),this._state},enumerable:!1,configurable:!0}),e.prototype.execute=function(e,t){var n,r;try{for(var i=Ji(e.actions),o=i.next();!o.done;o=i.next()){var a=o.value;this.exec(a,e,t)}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},e.prototype.update=function(e,t){var n,r,i,o,a,s,l,c,u=this;if(e._sessionid=this.sessionId,this._state=e,this.machine.config.predictableActionArguments&&t!==Jo||!this.options.execute)for(var d=void 0;d=this._outgoingQueue.shift();)d[0].send(d[1]);else this.execute(this.state);if(this.children.forEach((function(e){u.state.children[e.id]=e})),this.devTools&&this.devTools.send(t.data,e),e.event)try{for(var p=Ji(this.eventListeners),h=p.next();!h.done;h=p.next()){(0,h.value)(e.event)}}catch(e){n={error:e}}finally{try{h&&!h.done&&(r=p.return)&&r.call(p)}finally{if(n)throw n.error}}try{for(var f=Ji(this.listeners),x=f.next();!x.done;x=f.next()){(0,x.value)(e,e.event)}}catch(e){i={error:e}}finally{try{x&&!x.done&&(o=f.return)&&o.call(f)}finally{if(i)throw i.error}}try{for(var g=Ji(this.contextListeners),v=g.next();!v.done;v=g.next()){(0,v.value)(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(e){a={error:e}}finally{try{v&&!v.done&&(s=g.return)&&s.call(g)}finally{if(a)throw a.error}}if(this.state.done){var m=e.configuration.find((function(e){return"final"===e.type&&e.parent===u.machine})),b=m&&m.doneData?Po(m.doneData,e.context,t):void 0;this._doneEvent=ia(this.id,b);try{for(var y=Ji(this.doneListeners),C=y.next();!C.done;C=y.next()){(0,C.value)(this._doneEvent)}}catch(e){l={error:e}}finally{try{C&&!C.done&&(c=y.return)&&c.call(y)}finally{if(l)throw l.error}}this._stop(),this._stopChildren(),La(this.sessionId)}},e.prototype.onTransition=function(e){return this.listeners.add(e),this.status===Ma.Running&&e(this.state,this.state.event),this},e.prototype.subscribe=function(e,t,n){var r=this,i=Xo(e,t,n);this.listeners.add(i.next),this.status!==Ma.NotStarted&&i.next(this.state);var o=function(){r.doneListeners.delete(o),r.stopListeners.delete(o),i.complete()};return this.status===Ma.Stopped?i.complete():(this.onDone(o),this.onStop(o)),{unsubscribe:function(){r.listeners.delete(i.next),r.doneListeners.delete(o),r.stopListeners.delete(o)}}},e.prototype.onEvent=function(e){return this.eventListeners.add(e),this},e.prototype.onSend=function(e){return this.sendListeners.add(e),this},e.prototype.onChange=function(e){return this.contextListeners.add(e),this},e.prototype.onStop=function(e){return this.stopListeners.add(e),this},e.prototype.onDone=function(e){return this.status===Ma.Stopped&&this._doneEvent?e(this._doneEvent):this.doneListeners.add(e),this},e.prototype.off=function(e){return this.listeners.delete(e),this.eventListeners.delete(e),this.sendListeners.delete(e),this.stopListeners.delete(e),this.doneListeners.delete(e),this.contextListeners.delete(e),this},e.prototype.start=function(e){var t=this;if(this.status===Ma.Running)return this;this.machine._init(),Oa(this.sessionId,this),this.initialized=!0,this.status=Ma.Running;var n=void 0===e?this.initialState:sa(this,(function(){return"object"==typeof(n=e)&&null!==n&&"value"in n&&"_event"in n?t.machine.resolveState(e):t.machine.resolveState(wa.from(e,t.machine.context));var n}));return this.options.devTools&&this.attachDev(),this.scheduler.initialize((function(){t.update(n,Jo)})),this},e.prototype._stopChildren=function(){this.children.forEach((function(e){zo(e.stop)&&e.stop()})),this.children.clear()},e.prototype._stop=function(){var e,t,n,r,i,o,a,s,l,c;try{for(var u=Ji(this.listeners),d=u.next();!d.done;d=u.next()){var p=d.value;this.listeners.delete(p)}}catch(t){e={error:t}}finally{try{d&&!d.done&&(t=u.return)&&t.call(u)}finally{if(e)throw e.error}}try{for(var h=Ji(this.stopListeners),f=h.next();!f.done;f=h.next()){(p=f.value)(),this.stopListeners.delete(p)}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}try{for(var x=Ji(this.contextListeners),g=x.next();!g.done;g=x.next()){p=g.value;this.contextListeners.delete(p)}}catch(e){i={error:e}}finally{try{g&&!g.done&&(o=x.return)&&o.call(x)}finally{if(i)throw i.error}}try{for(var v=Ji(this.doneListeners),m=v.next();!m.done;m=v.next()){p=m.value;this.doneListeners.delete(p)}}catch(e){a={error:e}}finally{try{m&&!m.done&&(s=v.return)&&s.call(v)}finally{if(a)throw a.error}}if(!this.initialized)return this;this.initialized=!1,this.status=Ma.Stopped,this._initialState=void 0;try{for(var b=Ji(Object.keys(this.delayedEventsMap)),y=b.next();!y.done;y=b.next()){var C=y.value;this.clock.clearTimeout(this.delayedEventsMap[C])}}catch(e){l={error:e}}finally{try{y&&!y.done&&(c=b.return)&&c.call(b)}finally{if(l)throw l.error}}this.scheduler.clear(),this.scheduler=new ka({deferEvents:this.options.deferEvents})},e.prototype.stop=function(){var e=this,t=this.scheduler;return this._stop(),t.schedule((function(){var t;if(!(null===(t=e._state)||void 0===t?void 0:t.done)){var n=Go({type:"xstate.stop"}),r=sa(e,(function(){var t=Lo(eo([],Qi(e.state.configuration),!1).sort((function(e,t){return t.order-e.order})).map((function(t){return ta(t.onExit,e.machine.options.actions)}))),r=Qi(aa(e.machine,e.state,e.state.context,n,[{type:"exit",actions:t}],e.machine.config.predictableActionArguments?e._exec:void 0,e.machine.config.predictableActionArguments||e.machine.config.preserveActionOrder),2),i=r[0],o=r[1],a=new wa({value:e.state.value,context:o,_event:n,_sessionid:e.sessionId,historyValue:void 0,history:e.state,actions:i.filter((function(e){return!Ko(e)})),activities:{},events:[],configuration:[],transitions:[],children:{},done:e.state.done,tags:e.state.tags,machine:e.machine});return a.changed=!0,a}));e.update(r,n),e._stopChildren(),La(e.sessionId)}})),this},e.prototype.batch=function(e){var t=this;if(this.status===Ma.NotStarted&&this.options.deferEvents)yo||No(!1,"".concat(e.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'" and are deferred. Make sure .start() is called for this service.\nEvent: ').concat(JSON.stringify(event)));else if(this.status!==Ma.Running)throw new Error("".concat(e.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.'));if(e.length){var n=!!this.machine.config.predictableActionArguments&&this._exec;this.scheduler.schedule((function(){var r,i,o=t.state,a=!1,s=[],l=function(e){var r=Go(e);t.forward(r),o=sa(t,(function(){return t.machine.transition(o,r,void 0,n||void 0)})),s.push.apply(s,eo([],Qi(t.machine.config.predictableActionArguments?o.actions:o.actions.map((function(e){return function(e,t){var n=e.exec;return Yi(Yi({},e),{exec:void 0!==n?function(){return n(t.context,t.event,{action:e,state:t,_event:t._event})}:void 0})}(e,o)}))),!1)),a=a||!!o.changed};try{for(var c=Ji(e),u=c.next();!u.done;u=c.next()){l(u.value)}}catch(e){r={error:e}}finally{try{u&&!u.done&&(i=c.return)&&i.call(c)}finally{if(r)throw r.error}}o.changed=a,o.actions=s,t.update(o,Go(e[e.length-1]))}))}},e.prototype.sender=function(e){return this.send.bind(this,e)},e.prototype._nextState=function(e,t){var n=this;void 0===t&&(t=!!this.machine.config.predictableActionArguments&&this._exec);var r=Go(e);if(0===r.name.indexOf(ho)&&!this.state.nextEvents.some((function(e){return 0===e.indexOf(ho)})))throw r.data.data;return sa(this,(function(){return n.machine.transition(n.state,r,void 0,t||void 0)}))},e.prototype.nextState=function(e){return this._nextState(e,!1)},e.prototype.forward=function(e){var t,n;try{for(var r=Ji(this.forwardTo),i=r.next();!i.done;i=r.next()){var o=i.value,a=this.children.get(o);if(!a)throw new Error("Unable to forward event '".concat(e,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(o,"'."));a.send(e)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},e.prototype.defer=function(e){var t=this,n=this.clock.setTimeout((function(){"to"in e&&e.to?t.sendTo(e._event,e.to,!0):t.send(e._event)}),e.delay);e.id&&(this.delayedEventsMap[e.id]=n)},e.prototype.cancel=function(e){this.clock.clearTimeout(this.delayedEventsMap[e]),delete this.delayedEventsMap[e]},e.prototype.exec=function(e,t,n){void 0===n&&(n=this.machine.options.actions),this._exec(e,t.context,t._event,n)},e.prototype.removeChild=function(e){var t;this.children.delete(e),this.forwardTo.delete(e),null===(t=this.state)||void 0===t||delete t.children[e]},e.prototype.stopChild=function(e){var t=this.children.get(e);t&&(this.removeChild(e),zo(t.stop)&&t.stop())},e.prototype.spawn=function(e,t,n){if(this.status!==Ma.Running)return ca(e,t);if(Mo(e))return this.spawnPromise(Promise.resolve(e),t);if(zo(e))return this.spawnCallback(e,t);if(function(e){try{return"function"==typeof e.send}catch(e){return!1}}(i=e)&&"id"in i)return this.spawnActor(e,t);if(function(e){try{return"subscribe"in e&&zo(e.subscribe)}catch(e){return!1}}(e))return this.spawnObservable(e,t);if(Fo(e))return this.spawnMachine(e,Yi(Yi({},n),{id:t}));if(null!==(r=e)&&"object"==typeof r&&"transition"in r&&"function"==typeof r.transition)return this.spawnBehavior(e,t);throw new Error('Unable to spawn entity "'.concat(t,'" of type "').concat(typeof e,'".'));var r,i},e.prototype.spawnMachine=function(t,n){var r=this;void 0===n&&(n={});var i=new e(t,Yi(Yi({},this.options),{parent:this,id:n.id||t.id})),o=Yi(Yi({},Da),n);o.sync&&i.onTransition((function(e){r.send(xo,{state:e,id:i.id})}));var a=i;return this.children.set(i.id,a),o.autoForward&&this.forwardTo.add(i.id),i.onDone((function(e){r.removeChild(i.id),r.send(Go(e,{origin:i.id}))})).start(),a},e.prototype.spawnBehavior=function(e,t){var n=Pa(e,{id:t,parent:this});return this.children.set(t,n),n},e.prototype.spawnPromise=function(e,t){var n,r,i=this,o=!1;e.then((function(e){o||(r=e,i.removeChild(t),i.send(Go(ia(t,e),{origin:t})))}),(function(e){if(!o){i.removeChild(t);var n=oa(t,e);try{i.send(Go(n,{origin:t}))}catch(r){!function(e,t,n){if(!yo){var r=e.stack?" Stacktrace was '".concat(e.stack,"'"):"";if(e===t)console.error("Missing onError handler for invocation '".concat(n,"', error was '").concat(e,"'.").concat(r));else{var i=t.stack?" Stacktrace was '".concat(t.stack,"'"):"";console.error("Missing onError handler and/or unhandled exception/promise rejection for invocation '".concat(n,"'. ")+"Original error: '".concat(e,"'. ").concat(r," Current error is '").concat(t,"'.").concat(i))}}}(e,r,t),i.devTools&&i.devTools.send(n,i.state),i.machine.strict&&i.stop()}}}));var a=((n={id:t,send:function(){},subscribe:function(t,n,r){var i=Xo(t,n,r),o=!1;return e.then((function(e){o||(i.next(e),o||i.complete())}),(function(e){o||i.error(e)})),{unsubscribe:function(){return o=!0}}},stop:function(){o=!0},toJSON:function(){return{id:t}},getSnapshot:function(){return r}})[Ho]=function(){return this},n);return this.children.set(t,a),a},e.prototype.spawnCallback=function(e,t){var n,r,i,o=this,a=!1,s=new Set,l=new Set;try{i=e((function(e){r=e,l.forEach((function(t){return t(e)})),a||o.send(Go(e,{origin:t}))}),(function(e){s.add(e)}))}catch(e){this.send(oa(t,e))}if(Mo(i))return this.spawnPromise(i,t);var c=((n={id:t,send:function(e){return s.forEach((function(t){return t(e)}))},subscribe:function(e){var t=Xo(e);return l.add(t.next),{unsubscribe:function(){l.delete(t.next)}}},stop:function(){a=!0,zo(i)&&i()},toJSON:function(){return{id:t}},getSnapshot:function(){return r}})[Ho]=function(){return this},n);return this.children.set(t,c),c},e.prototype.spawnObservable=function(e,t){var n,r,i=this,o=e.subscribe((function(e){r=e,i.send(Go(e,{origin:t}))}),(function(e){i.removeChild(t),i.send(Go(oa(t,e),{origin:t}))}),(function(){i.removeChild(t),i.send(Go(ia(t),{origin:t}))})),a=((n={id:t,send:function(){},subscribe:function(t,n,r){return e.subscribe(t,n,r)},stop:function(){return o.unsubscribe()},getSnapshot:function(){return r},toJSON:function(){return{id:t}}})[Ho]=function(){return this},n);return this.children.set(t,a),a},e.prototype.spawnActor=function(e,t){return this.children.set(t,e),e},e.prototype.spawnActivity=function(e){var t=this.machine.options&&this.machine.options.activities?this.machine.options.activities[e.type]:void 0;if(t){var n=t(this.state.context,e);this.spawnEffect(e.id,n)}else yo||No(!1,"No implementation found for activity '".concat(e.type,"'"))},e.prototype.spawnEffect=function(e,t){var n;this.children.set(e,((n={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:t||void 0,getSnapshot:function(){},toJSON:function(){return{id:e}}})[Ho]=function(){return this},n))},e.prototype.attachDev=function(){var e=Ta();if(this.options.devTools&&e){if(e.__REDUX_DEVTOOLS_EXTENSION__){var t="object"==typeof this.options.devTools?this.options.devTools:void 0;this.devTools=e.__REDUX_DEVTOOLS_EXTENSION__.connect(Yi(Yi({name:this.id,autoPause:!0,stateSanitizer:function(e){return{value:e.value,context:e.context,actions:e.actions}}},t),{features:Yi({jump:!1,skip:!1},t?t.features:void 0)}),this.machine),this.devTools.init(this.state)}_a(this)}},e.prototype.toJSON=function(){return{id:this.id}},e.prototype[Ho]=function(){return this},e.prototype.getSnapshot=function(){return this.status===Ma.NotStarted?this.initialState:this._state},e.defaultOptions={execute:!0,deferEvents:!0,clock:{setTimeout:function(e,t){return setTimeout(e,t)},clearTimeout:function(e){return clearTimeout(e)}},logger:console.log.bind(console),devTools:!1},e.interpret=Na,e}();function Na(e,t){return new Ia(e,t)}function Va(e){if("string"==typeof e){var t={type:e,toString:function(){return e}};return t}return e}function za(e){return Yi(Yi({type:uo},e),{toJSON:function(){e.onDone,e.onError;var t=Ki(e,["onDone","onError"]);return Yi(Yi({},t),{type:uo,src:Va(e.src)})}})}var Aa="",Ba="*",Ha={},Fa=function(e){return"#"===e[0]},Za=function(){function e(t,n,r,i){void 0===r&&(r="context"in t?t.context:void 0);var o,a=this;this.config=t,this._context=r,this.order=-1,this.__xstatenode=!0,this.__cache={events:void 0,relativeValue:new Map,initialStateValue:void 0,initialState:void 0,on:void 0,transitions:void 0,candidates:{},delayedTransitions:void 0},this.idMap={},this.tags=[],this.options=Object.assign({actions:{},guards:{},services:{},activities:{},delays:{}},n),this.parent=null==i?void 0:i.parent,this.key=this.config.key||(null==i?void 0:i.key)||this.config.id||"(machine)",this.machine=this.parent?this.parent.machine:this,this.path=this.parent?this.parent.path.concat(this.key):[],this.delimiter=this.config.delimiter||(this.parent?this.parent.delimiter:"."),this.id=this.config.id||eo([this.machine.key],Qi(this.path),!1).join(this.delimiter),this.version=this.parent?this.parent.version:this.config.version,this.type=this.config.type||(this.config.parallel?"parallel":this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.schema=this.parent?this.machine.schema:null!==(o=this.config.schema)&&void 0!==o?o:{},this.description=this.config.description,yo||No(!("parallel"in this.config),'The "parallel" property is deprecated and will be removed in version 4.1. '.concat(this.config.parallel?"Replace with `type: 'parallel'`":"Use `type: '".concat(this.type,"'`")," in the config for state node '").concat(this.id,"' instead.")),this.initial=this.config.initial,this.states=this.config.states?$o(this.config.states,(function(t,n){var r,i=new e(t,{},void 0,{parent:a,key:n});return Object.assign(a.idMap,Yi(((r={})[i.id]=i,r),i.idMap)),i})):Ha;var s=0;!function e(t){var n,r;t.order=s++;try{for(var i=Ji(da(t)),o=i.next();!o.done;o=i.next()){e(o.value)}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}(this),this.history=!0===this.config.history?"shallow":this.config.history||!1,this._transient=!!this.config.always||!!this.config.on&&(Array.isArray(this.config.on)?this.config.on.some((function(e){return e.event===Aa})):Aa in this.config.on),this.strict=!!this.config.strict,this.onEntry=_o(this.config.entry||this.config.onEntry).map((function(e){return ea(e)})),this.onExit=_o(this.config.exit||this.config.onExit).map((function(e){return ea(e)})),this.meta=this.config.meta,this.doneData="final"===this.type?this.config.data:void 0,this.invoke=_o(this.config.invoke).map((function(e,t){var n,r;if(Fo(e)){var i=Yo(a.id,t);return a.machine.options.services=Yi(((n={})[i]=e,n),a.machine.options.services),za({src:i,id:i})}if(Ao(e.src)){i=e.id||Yo(a.id,t);return za(Yi(Yi({},e),{id:i,src:e.src}))}if(Fo(e.src)||zo(e.src)){i=e.id||Yo(a.id,t);return a.machine.options.services=Yi(((r={})[i]=e.src,r),a.machine.options.services),za(Yi(Yi({id:i},e),{src:i}))}var o=e.src;return za(Yi(Yi({id:Yo(a.id,t)},e),{src:o}))})),this.activities=_o(this.config.activities).concat(this.invoke).map((function(e){return na(e)})),this.transition=this.transition.bind(this),this.tags=_o(this.config.tags)}return e.prototype._init=function(){this.__cache.transitions||ha(this).forEach((function(e){return e.on}))},e.prototype.withConfig=function(t,n){var r=this.options,i=r.actions,o=r.activities,a=r.guards,s=r.services,l=r.delays;return new e(this.config,{actions:Yi(Yi({},i),t.actions),activities:Yi(Yi({},o),t.activities),guards:Yi(Yi({},a),t.guards),services:Yi(Yi({},s),t.services),delays:Yi(Yi({},l),t.delays)},null!=n?n:this.context)},e.prototype.withContext=function(t){return new e(this.config,this.options,t)},Object.defineProperty(e.prototype,"context",{get:function(){return zo(this._context)?this._context():this._context},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"definition",{get:function(){return{id:this.id,key:this.key,version:this.version,context:this.context,type:this.type,initial:this.initial,history:this.history,states:$o(this.states,(function(e){return e.definition})),on:this.on,transitions:this.transitions,entry:this.onEntry,exit:this.onExit,activities:this.activities||[],meta:this.meta,order:this.order||-1,data:this.doneData,invoke:this.invoke,description:this.description,tags:this.tags}},enumerable:!1,configurable:!0}),e.prototype.toJSON=function(){return this.definition},Object.defineProperty(e.prototype,"on",{get:function(){if(this.__cache.on)return this.__cache.on;var e=this.transitions;return this.__cache.on=e.reduce((function(e,t){return e[t.eventType]=e[t.eventType]||[],e[t.eventType].push(t),e}),{})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"after",{get:function(){return this.__cache.delayedTransitions||(this.__cache.delayedTransitions=this.getDelayedTransitions(),this.__cache.delayedTransitions)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"transitions",{get:function(){return this.__cache.transitions||(this.__cache.transitions=this.formatTransitions(),this.__cache.transitions)},enumerable:!1,configurable:!0}),e.prototype.getCandidates=function(e){if(this.__cache.candidates[e])return this.__cache.candidates[e];var t=e===Aa,n=this.transitions.filter((function(n){var r=n.eventType===e;return t?r:r||n.eventType===Ba}));return this.__cache.candidates[e]=n,n},e.prototype.getDelayedTransitions=function(){var e=this,t=this.config.after;if(!t)return[];var n=function(t,n){var r=function(e,t){var n=t?"#".concat(t):"";return"".concat(Ui.After,"(").concat(e,")").concat(n)}(zo(t)?"".concat(e.id,":delay[").concat(n,"]"):t,e.id);return e.onEntry.push(function(e,t){return{to:t?t.to:void 0,type:io,event:zo(e)?e:Zo(e),delay:t?t.delay:void 0,id:t&&void 0!==t.id?t.id:zo(e)?e.name:wo(e)}}(r,{delay:t})),e.onExit.push({type:oo,sendId:r}),r},r=Vo(t)?t.map((function(e,t){var r=n(e.delay,t);return Yi(Yi({},e),{event:r})})):Lo(Object.keys(t).map((function(e,r){var i=t[e],o=Ao(i)?{target:i}:i,a=isNaN(+e)?e:+e,s=n(a,r);return _o(o).map((function(e){return Yi(Yi({},e),{event:s,delay:a})}))})));return r.map((function(t){var n=t.delay;return Yi(Yi({},e.formatTransition(t)),{delay:n})}))},e.prototype.getStateNodes=function(e){var t,n=this;if(!e)return[];var r=e instanceof wa?e.value:ko(e,this.delimiter);if(Ao(r)){var i=this.getStateNode(r).initial;return void 0!==i?this.getStateNodes(((t={})[r]=i,t)):[this,this.states[r]]}var o=Object.keys(r),a=[this];return a.push.apply(a,eo([],Qi(Lo(o.map((function(e){return n.getStateNode(e).getStateNodes(r[e])})))),!1)),a},e.prototype.handles=function(e){var t=wo(e);return this.events.includes(t)},e.prototype.resolveState=function(e){var t=e instanceof wa?e:wa.create(e),n=Array.from(fa([],this.getStateNodes(t.value)));return new wa(Yi(Yi({},t),{value:this.resolve(t.value),configuration:n,done:ba(n,this),tags:ya(n),machine:this.machine}))},e.prototype.transitionLeafNode=function(e,t,n){var r=this.getStateNode(e).next(t,n);return r&&r.transitions.length?r:this.next(t,n)},e.prototype.transitionCompoundNode=function(e,t,n){var r=Object.keys(e),i=this.getStateNode(r[0])._transition(e[r[0]],t,n);return i&&i.transitions.length?i:this.next(t,n)},e.prototype.transitionParallelNode=function(e,t,n){var r,i,o={};try{for(var a=Ji(Object.keys(e)),s=a.next();!s.done;s=a.next()){var l=s.value,c=e[l];if(c){var u=this.getStateNode(l)._transition(c,t,n);u&&(o[l]=u)}}}catch(e){r={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}var d=Object.keys(o).map((function(e){return o[e]})),p=Lo(d.map((function(e){return e.transitions})));if(!d.some((function(e){return e.transitions.length>0})))return this.next(t,n);var h=Lo(Object.keys(o).map((function(e){return o[e].configuration})));return{transitions:p,exitSet:Lo(d.map((function(e){return e.exitSet}))),configuration:h,source:t,actions:Lo(Object.keys(o).map((function(e){return o[e].actions})))}},e.prototype._transition=function(e,t,n){return Ao(e)?this.transitionLeafNode(e,t,n):1===Object.keys(e).length?this.transitionCompoundNode(e,t,n):this.transitionParallelNode(e,t,n)},e.prototype.getTransitionData=function(e,t){return this._transition(e.value,e,Go(t))},e.prototype.next=function(e,t){var n,r,i,o=this,a=t.name,s=[],l=[];try{for(var c=Ji(this.getCandidates(a)),u=c.next();!u.done;u=c.next()){var d=u.value,p=d.cond,h=d.in,f=e.context,x=!h||(Ao(h)&&Fa(h)?e.matches(ko(this.getStateNodeById(h).path,this.delimiter)):Co(ko(h,this.delimiter),Oo(this.path.slice(0,-2))(e.value))),g=!1;try{g=!p||Wo(this.machine,p,f,t,e)}catch(e){throw new Error("Unable to evaluate guard '".concat(p.name||p.type,"' in transition for event '").concat(a,"' in state node '").concat(this.id,"':\n").concat(e.message))}if(g&&x){void 0!==d.target&&(l=d.target),s.push.apply(s,eo([],Qi(d.actions),!1)),i=d;break}}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}if(i){if(!l.length)return{transitions:[i],exitSet:[],configuration:e.value?[this]:[],source:e,actions:s};var v=Lo(l.map((function(t){return o.getRelativeStateNodes(t,e.historyValue)})));return{transitions:[i],exitSet:!!i.internal?[]:Lo(l.map((function(e){return o.getPotentiallyReenteringNodes(e)}))),configuration:v,source:e,actions:s}}},e.prototype.getPotentiallyReenteringNodes=function(e){if(this.order<e.order)return[this];for(var t=[],n=this,r=e;n&&n!==r;)t.push(n),n=n.parent;return n!==r?[]:(t.push(r),t)},e.prototype.getActions=function(e,t,n,r,i,o,a){var s,l,c,u,d=this,p=o?fa([],this.getStateNodes(o.value)):[],h=new Set;try{for(var f=Ji(Array.from(e).sort((function(e,t){return e.order-t.order}))),x=f.next();!x.done;x=f.next()){(!ma(p,m=x.value)||ma(n.exitSet,m)||m.parent&&h.has(m.parent))&&h.add(m)}}catch(e){s={error:e}}finally{try{x&&!x.done&&(l=f.return)&&l.call(f)}finally{if(s)throw s.error}}try{for(var g=Ji(p),v=g.next();!v.done;v=g.next()){var m;ma(e,m=v.value)&&!ma(n.exitSet,m.parent)||n.exitSet.push(m)}}catch(e){c={error:e}}finally{try{v&&!v.done&&(u=g.return)&&u.call(g)}finally{if(c)throw c.error}}n.exitSet.sort((function(e,t){return t.order-e.order}));var b=Array.from(h).sort((function(e,t){return e.order-t.order})),y=new Set(n.exitSet),C=Lo(b.map((function(e){var t=[];if("final"!==e.type)return t;var o=e.parent;if(!o.parent)return t;t.push(ra(e.id,e.doneData),ra(o.id,e.doneData?Po(e.doneData,r,i):void 0));var a=o.parent;return"parallel"===a.type&&pa(a).every((function(e){return ba(n.configuration,e)}))&&t.push(ra(a.id)),t}))),w=b.map((function(e){var t=e.onEntry,n=e.activities.map((function(e){return function(e){var t=na(e);return{type:Ui.Start,activity:t,exec:void 0}}(e)}));return{type:"entry",actions:ta(a?eo(eo([],Qi(t),!1),Qi(n),!1):eo(eo([],Qi(n),!1),Qi(t),!1),d.machine.options.actions)}})).concat({type:"state_done",actions:C.map((function(e){return function(e,t){return{type:ro,event:"function"==typeof e?e:Zo(e),delay:t?t.delay:void 0,id:null==t?void 0:t.id}}(e)}))}),j=Array.from(y).map((function(e){return{type:"exit",actions:ta(eo(eo([],Qi(e.onExit),!1),Qi(e.activities.map((function(e){return function(e){var t=zo(e)?e:na(e);return{type:Ui.Stop,activity:t,exec:void 0}}(e)}))),!1),d.machine.options.actions)}})).concat({type:"transition",actions:ta(n.actions,this.machine.options.actions)}).concat(w);if(t){var k=ta(Lo(eo([],Qi(e),!1).sort((function(e,t){return t.order-e.order})).map((function(e){return e.onExit}))),this.machine.options.actions).filter((function(e){return!Ko(e)}));return j.concat({type:"stop",actions:k})}return j},e.prototype.transition=function(e,t,n,r){void 0===e&&(e=this.initialState);var i,o,a=Go(t);if(e instanceof wa)i=void 0===n?e:this.resolveState(wa.from(e,n));else{var s=Ao(e)?this.resolve(So(this.getResolvedPath(e))):this.resolve(e),l=null!=n?n:this.machine.context;i=this.resolveState(wa.from(s,l))}if(!yo&&a.name===Ba)throw new Error("An event cannot have the wildcard type ('".concat(Ba,"')"));if(this.strict&&!this.events.includes(a.name)&&(o=a.name,!/^(done|error)\./.test(o)))throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(a.name,"'"));var c=this._transition(i.value,i,a)||{transitions:[],configuration:[],exitSet:[],source:i,actions:[]},u=fa([],this.getStateNodes(i.value)),d=c.configuration.length?fa(u,c.configuration):u;return c.configuration=eo([],Qi(d),!1),this.resolveTransition(c,i,i.context,r,a)},e.prototype.resolveRaisedTransition=function(e,t,n,r){var i,o=e.actions;return(e=this.transition(e,t,void 0,r))._event=n,e.event=n.data,(i=e.actions).unshift.apply(i,eo([],Qi(o),!1)),e},e.prototype.resolveTransition=function(e,t,n,r,i){var o,a,s,l,c=this;void 0===i&&(i=Jo);var u=e.configuration,d=!t||e.transitions.length>0,p=d?e.configuration:t?t.configuration:[],h=ba(p,this),f=d?va(this.machine,u):void 0,x=t?t.historyValue?t.historyValue:e.source?this.machine.historyValue(t.value):void 0:void 0,g=this.getActions(new Set(p),h,e,n,i,t,r),v=t?Yi({},t.activities):{};try{for(var m=Ji(g),b=m.next();!b.done;b=m.next()){var y=b.value;try{for(var C=(s=void 0,Ji(y.actions)),w=C.next();!w.done;w=C.next()){var j=w.value;j.type===to?v[j.activity.id||j.activity.type]=j:j.type===no&&(v[j.activity.id||j.activity.type]=!1)}}catch(e){s={error:e}}finally{try{w&&!w.done&&(l=C.return)&&l.call(C)}finally{if(s)throw s.error}}}}catch(e){o={error:e}}finally{try{b&&!b.done&&(a=m.return)&&a.call(m)}finally{if(o)throw o.error}}var k,S,$=Qi(aa(this,t,n,i,g,r,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),E=$[0],O=$[1],R=Qi(function(e,t){var n,r,i=Qi([[],[]],2),o=i[0],a=i[1];try{for(var s=Ji(e),l=s.next();!l.done;l=s.next()){var c=l.value;t(c)?o.push(c):a.push(c)}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return[o,a]}(E,Ko),2),L=R[0],T=R[1],_=E.filter((function(e){var t;return e.type===to&&(null===(t=e.activity)||void 0===t?void 0:t.type)===uo})),P=_.reduce((function(e,t){return e[t.activity.id]=function(e,t,n,r){var i,o=Uo(e.src),a=null===(i=null==t?void 0:t.options.services)||void 0===i?void 0:i[o.type],s=e.data?Po(e.data,n,r):void 0,l=a?ca(a,e.id,s):la(e.id);return l.meta=e,l}(t.activity,c.machine,O,i),e}),t?Yi({},t.children):{}),M=new wa({value:f||t.value,context:O,_event:i,_sessionid:t?t._sessionid:null,historyValue:f?x?(k=x,S=f,{current:S,states:Do(k,S)}):void 0:t?t.historyValue:void 0,history:!f||e.source?t:void 0,actions:f?T:[],activities:f?v:t?t.activities:{},events:[],configuration:p,transitions:e.transitions,children:P,done:h,tags:ya(p),machine:this}),D=n!==O;M.changed=i.name===xo||D;var I=M.history;I&&delete I.history;var N=!h&&(this._transient||u.some((function(e){return e._transient})));if(!(d||N&&i.name!==Aa))return M;var V=M;if(!h)for(N&&(V=this.resolveRaisedTransition(V,{type:ao},i,r));L.length;){var z=L.shift();V=this.resolveRaisedTransition(V,z._event,i,r)}var A=V.changed||(I?!!V.actions.length||D||typeof I.value!=typeof V.value||!Ca(V.value,I.value):void 0);return V.changed=A,V.history=I,V},e.prototype.getStateNode=function(e){if(Fa(e))return this.machine.getStateNodeById(e);if(!this.states)throw new Error("Unable to retrieve child state '".concat(e,"' from '").concat(this.id,"'; no child states exist."));var t=this.states[e];if(!t)throw new Error("Child state '".concat(e,"' does not exist on '").concat(this.id,"'"));return t},e.prototype.getStateNodeById=function(e){var t=Fa(e)?e.slice(1):e;if(t===this.id)return this;var n=this.machine.idMap[t];if(!n)throw new Error("Child state node '#".concat(t,"' does not exist on machine '").concat(this.id,"'"));return n},e.prototype.getStateNodeByPath=function(e){if("string"==typeof e&&Fa(e))try{return this.getStateNodeById(e.slice(1))}catch(e){}for(var t=jo(e,this.delimiter).slice(),n=this;t.length;){var r=t.shift();if(!r.length)break;n=n.getStateNode(r)}return n},e.prototype.resolve=function(e){var t,n=this;if(!e)return this.initialStateValue||Ha;switch(this.type){case"parallel":return $o(this.initialStateValue,(function(t,r){return t?n.getStateNode(r).resolve(e[r]||t):Ha}));case"compound":if(Ao(e)){var r=this.getStateNode(e);return"parallel"===r.type||"compound"===r.type?((t={})[e]=r.initialStateValue,t):e}return Object.keys(e).length?$o(e,(function(e,t){return e?n.getStateNode(t).resolve(e):Ha})):this.initialStateValue||{};default:return e||Ha}},e.prototype.getResolvedPath=function(e){if(Fa(e)){var t=this.machine.idMap[e.slice(1)];if(!t)throw new Error("Unable to find state node '".concat(e,"'"));return t.path}return jo(e,this.delimiter)},Object.defineProperty(e.prototype,"initialStateValue",{get:function(){var e,t;if(this.__cache.initialStateValue)return this.__cache.initialStateValue;if("parallel"===this.type)t=Eo(this.states,(function(e){return e.initialStateValue||Ha}),(function(e){return!("history"===e.type)}));else if(void 0!==this.initial){if(!this.states[this.initial])throw new Error("Initial state '".concat(this.initial,"' not found on '").concat(this.key,"'"));t=ua(this.states[this.initial])?this.initial:((e={})[this.initial]=this.states[this.initial].initialStateValue,e)}else t={};return this.__cache.initialStateValue=t,this.__cache.initialStateValue},enumerable:!1,configurable:!0}),e.prototype.getInitialState=function(e,t){this._init();var n=this.getStateNodes(e);return this.resolveTransition({configuration:n,exitSet:[],transitions:[],source:void 0,actions:[]},void 0,null!=t?t:this.machine.context,void 0)},Object.defineProperty(e.prototype,"initialState",{get:function(){var e=this.initialStateValue;if(!e)throw new Error("Cannot retrieve initial state from simple state '".concat(this.id,"'."));return this.getInitialState(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){var e;if("history"===this.type){var t=this.config;e=Ao(t.target)&&Fa(t.target)?So(this.machine.getStateNodeById(t.target).path.slice(this.path.length-1)):t.target}return e},enumerable:!1,configurable:!0}),e.prototype.getRelativeStateNodes=function(e,t,n){return void 0===n&&(n=!0),n?"history"===e.type?e.resolveHistory(t):e.initialStateNodes:[e]},Object.defineProperty(e.prototype,"initialStateNodes",{get:function(){var e=this;return ua(this)?[this]:"compound"!==this.type||this.initial?Lo(Ro(this.initialStateValue).map((function(t){return e.getFromRelativePath(t)}))):(yo||No(!1,"Compound state node '".concat(this.id,"' has no initial state.")),[this])},enumerable:!1,configurable:!0}),e.prototype.getFromRelativePath=function(e){if(!e.length)return[this];var t=Qi(e),n=t[0],r=t.slice(1);if(!this.states)throw new Error("Cannot retrieve subPath '".concat(n,"' from node with no states"));var i=this.getStateNode(n);if("history"===i.type)return i.resolveHistory();if(!this.states[n])throw new Error("Child state '".concat(n,"' does not exist on '").concat(this.id,"'"));return this.states[n].getFromRelativePath(r)},e.prototype.historyValue=function(e){if(Object.keys(this.states).length)return{current:e||this.initialStateValue,states:Eo(this.states,(function(t,n){if(!e)return t.historyValue();var r=Ao(e)?void 0:e[n];return t.historyValue(r||t.initialStateValue)}),(function(e){return!e.history}))}},e.prototype.resolveHistory=function(e){var t=this;if("history"!==this.type)return[this];var n=this.parent;if(!e){var r=this.target;return r?Lo(Ro(r).map((function(e){return n.getFromRelativePath(e)}))):n.initialStateNodes}var i,o,a=(i=n.path,o="states",function(e){var t,n,r=e;try{for(var a=Ji(i),s=a.next();!s.done;s=a.next()){var l=s.value;r=r[o][l]}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return r})(e).current;return Ao(a)?[n.getStateNode(a)]:Lo(Ro(a).map((function(e){return"deep"===t.history?n.getFromRelativePath(e):[n.states[e[0]]]})))},Object.defineProperty(e.prototype,"stateIds",{get:function(){var e=this,t=Lo(Object.keys(this.states).map((function(t){return e.states[t].stateIds})));return[this.id].concat(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"events",{get:function(){var e,t,n,r;if(this.__cache.events)return this.__cache.events;var i=this.states,o=new Set(this.ownEvents);if(i)try{for(var a=Ji(Object.keys(i)),s=a.next();!s.done;s=a.next()){var l=i[s.value];if(l.states)try{for(var c=(n=void 0,Ji(l.events)),u=c.next();!u.done;u=c.next()){var d=u.value;o.add("".concat(d))}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}return this.__cache.events=Array.from(o)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ownEvents",{get:function(){var e=new Set(this.transitions.filter((function(e){return!(!e.target&&!e.actions.length&&e.internal)})).map((function(e){return e.eventType})));return Array.from(e)},enumerable:!1,configurable:!0}),e.prototype.resolveTarget=function(e){var t=this;if(void 0!==e)return e.map((function(e){if(!Ao(e))return e;var n=e[0]===t.delimiter;if(n&&!t.parent)return t.getStateNodeByPath(e.slice(1));var r=n?t.key+e:e;if(!t.parent)return t.getStateNodeByPath(r);try{return t.parent.getStateNodeByPath(r)}catch(e){throw new Error("Invalid transition definition for state node '".concat(t.id,"':\n").concat(e.message))}}))},e.prototype.formatTransition=function(e){var t=this,n=function(e){if(void 0!==e&&""!==e)return _o(e)}(e.target),r="internal"in e?e.internal:!n||n.some((function(e){return Ao(e)&&e[0]===t.delimiter})),i=this.machine.options.guards,o=this.resolveTarget(n),a=Yi(Yi({},e),{actions:ta(_o(e.actions)),cond:Bo(e.cond,i),target:o,source:this,internal:r,eventType:e.event,toJSON:function(){return Yi(Yi({},a),{target:a.target?a.target.map((function(e){return"#".concat(e.id)})):void 0,source:"#".concat(t.id)})}});return a},e.prototype.formatTransitions=function(){var e,t,n,r=this;if(this.config.on)if(Array.isArray(this.config.on))n=this.config.on;else{var i=this.config.on,o=Ba,a=i[o],s=void 0===a?[]:a,l=Ki(i,["*"]);n=Lo(Object.keys(l).map((function(e){yo||e!==Aa||No(!1,"Empty string transition configs (e.g., `{ on: { '': ... }}`) for transient transitions are deprecated. Specify the transition in the `{ always: ... }` property instead. "+'Please check the `on` configuration for "#'.concat(r.id,'".'));var t=qo(e,l[e]);return yo||function(e,t,n){var r=n.slice(0,-1).some((function(e){return!("cond"in e)&&!("in"in e)&&(Ao(e.target)||Fo(e.target))})),i=t===Aa?"the transient event":"event '".concat(t,"'");No(!r,"One or more transitions for ".concat(i," on state '").concat(e.id,"' are unreachable. ")+"Make sure that the default transition is the last one defined.")}(r,e,t),t})).concat(qo(Ba,s)))}else n=[];var c=this.config.always?qo("",this.config.always):[],u=this.config.onDone?qo(String(ra(this.id)),this.config.onDone):[];yo||No(!(this.config.onDone&&!this.parent),'Root nodes cannot have an ".onDone" transition. Please check the config of "'.concat(this.id,'".'));var d=Lo(this.invoke.map((function(e){var t=[];return e.onDone&&t.push.apply(t,eo([],Qi(qo(String(ia(e.id)),e.onDone)),!1)),e.onError&&t.push.apply(t,eo([],Qi(qo(String(oa(e.id)),e.onError)),!1)),t}))),p=this.after,h=Lo(eo(eo(eo(eo([],Qi(u),!1),Qi(d),!1),Qi(n),!1),Qi(c),!1).map((function(e){return _o(e).map((function(e){return r.formatTransition(e)}))})));try{for(var f=Ji(p),x=f.next();!x.done;x=f.next()){var g=x.value;h.push(g)}}catch(t){e={error:t}}finally{try{x&&!x.done&&(t=f.return)&&t.call(f)}finally{if(e)throw e.error}}return h},e}();var Ga,qa=function(e){return{type:so,assignment:e}};!function(e){e[e.Effect=1]="Effect",e[e.LayoutEffect=2]="LayoutEffect"}(Ga||(Ga={}));var Wa="undefined"!=typeof document?n.useLayoutEffect:function(){};function Ua(e){var t=l.useRef();return t.current||(t.current={v:e()}),t.current.v}var Xa=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},Ya=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};var Ka=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},Ja=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))};function Qa(e,t){(0,e.exec)(t.context,t._event.data,{action:e,state:t,_event:t._event})()}function es(e){var t=n.useRef([]),r=n.useRef([]);Wa((function(){var n=e.subscribe((function(e){var n,i;if(e.actions.length){var o=e.actions.filter((function(e){return"function"==typeof e.exec&&"__effect"in e.exec})),a=Ka(function(e,t){var n,r,i=Xa([[],[]],2),o=i[0],a=i[1];try{for(var s=Ya(e),l=s.next();!l.done;l=s.next()){var c=l.value;t(c)?o.push(c):a.push(c)}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return[o,a]}(o,(function(e){return e.exec.__effect===Ga.Effect})),2),s=a[0],l=a[1];(n=t.current).push.apply(n,Ja([],Ka(s.map((function(t){return[t,e]}))),!1)),(i=r.current).push.apply(i,Ja([],Ka(l.map((function(t){return[t,e]}))),!1))}}));return function(){n.unsubscribe()}}),[]),Wa((function(){for(;r.current.length;){var e=Ka(r.current.shift(),2);Qa(e[0],e[1])}})),n.useEffect((function(){for(;t.current.length;){var e=Ka(t.current.shift(),2);Qa(e[0],e[1])}}))}var ts=function(){return ts=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ts.apply(this,arguments)},ns=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},rs=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a};var is=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a};function os(e,t){void 0===t&&(t={});var r=n.useCallback((function(e){var t=void 0===e.changed&&Object.keys(e.children).length;(e.changed||t)&&s(e)}),[]),i=function(e,t,r){void 0===t&&(t={});var i=Ua((function(){return"function"==typeof e?e():e}));if("production"!==process.env.NODE_ENV&&"function"!=typeof e){var o=rs(n.useState(i),1)[0];e!==o&&console.warn("Machine given to `useMachine` has changed between renders. This is not supported and might lead to unexpected results.\nPlease make sure that you pass the same Machine as argument each time.")}var a=t.context,s=t.guards,l=t.actions,c=t.activities,u=t.services,d=t.delays,p=t.state,h=ns(t,["context","guards","actions","activities","services","delays","state"]),f=Ua((function(){var e={context:a,guards:s,actions:l,activities:c,services:u,delays:d};return Na(i.withConfig(e,(function(){return ts(ts({},i.context),a)})),ts({deferEvents:!0},h))}));return Wa((function(){var e;return r&&(e=f.subscribe(function(e){if("object"==typeof e)return e;var t=function(){};return{next:e,error:void 0||t,complete:void 0||t}}(r))),function(){null==e||e.unsubscribe()}}),[r]),Wa((function(){return f.start(p?wa.create(p):void 0),function(){f.stop()}}),[]),Wa((function(){Object.assign(f.machine.options.actions,l),Object.assign(f.machine.options.guards,s),Object.assign(f.machine.options.activities,c),Object.assign(f.machine.options.services,u),Object.assign(f.machine.options.delays,d)}),[l,s,c,u,d]),es(f),f}(e,t,r),o=is(n.useState((function(){var e=i.machine.initialState;return t.state?wa.create(t.state):e})),2),a=o[0],s=o[1];return[a,i.send,i]}function as(){return as=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},as.apply(null,arguments)}function ss(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}const ls={arr:Array.isArray,obj:e=>"[object Object]"===Object.prototype.toString.call(e),fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,und:e=>void 0===e,nul:e=>null===e,set:e=>e instanceof Set,map:e=>e instanceof Map,equ(e,t){if(typeof e!=typeof t)return!1;if(ls.str(e)||ls.num(e))return e===t;if(ls.obj(e)&&ls.obj(t)&&Object.keys(e).length+Object.keys(t).length===0)return!0;let n;for(n in e)if(!(n in t))return!1;for(n in t)if(e[n]!==t[n])return!1;return!ls.und(n)||e===t}};function cs(e,t){return ls.und(e)||ls.nul(e)?t:e}function us(e){return ls.und(e)?[]:ls.arr(e)?e:[e]}function ds(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return ls.fun(e)?e(...n):e}function ps(e){const t=function(e){return e.to,e.from,e.config,e.onStart,e.onRest,e.onFrame,e.children,e.reset,e.reverse,e.force,e.immediate,e.delay,e.attach,e.destroyed,e.interpolateTo,e.ref,e.lazy,ss(e,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}(e);if(ls.und(t))return as({to:t},e);const n=Object.keys(e).reduce(((n,r)=>ls.und(t[r])?as({},n,{[r]:e[r]}):n),{});return as({to:t},n)}class hs{constructor(){this.payload=void 0,this.children=[]}getAnimatedValue(){return this.getValue()}getPayload(){return this.payload||this}attach(){}detach(){}getChildren(){return this.children}addChild(e){0===this.children.length&&this.attach(),this.children.push(e)}removeChild(e){const t=this.children.indexOf(e);this.children.splice(t,1),0===this.children.length&&this.detach()}}class fs extends hs{constructor(){super(...arguments),this.payload=[],this.attach=()=>this.payload.forEach((e=>e instanceof hs&&e.addChild(this))),this.detach=()=>this.payload.forEach((e=>e instanceof hs&&e.removeChild(this)))}}class xs extends hs{constructor(){super(...arguments),this.payload={},this.attach=()=>Object.values(this.payload).forEach((e=>e instanceof hs&&e.addChild(this))),this.detach=()=>Object.values(this.payload).forEach((e=>e instanceof hs&&e.removeChild(this)))}getValue(e){void 0===e&&(e=!1);const t={};for(const n in this.payload){const r=this.payload[n];(!e||r instanceof hs)&&(t[n]=r instanceof hs?r[e?"getAnimatedValue":"getValue"]():r)}return t}getAnimatedValue(){return this.getValue(!0)}}let gs,vs;let ms,bs=e=>"undefined"!=typeof window?window.requestAnimationFrame(e):-1;let ys,Cs=()=>Date.now();class ws extends xs{constructor(e,t){super(),this.update=void 0,this.payload=e.style?as({},e,{style:ys(e.style)}):e,this.update=t,this.attach()}}let js=!1;const ks=new Set,Ss=()=>{if(!js)return!1;let e=Cs();for(let t of ks){let n=!1;for(let r=0;r<t.configs.length;r++){let i,o,a=t.configs[r];for(let t=0;t<a.animatedValues.length;t++){let r=a.animatedValues[t];if(r.done)continue;let s=a.fromValues[t],l=a.toValues[t],c=r.lastPosition,u=l instanceof hs,d=Array.isArray(a.initialVelocity)?a.initialVelocity[t]:a.initialVelocity;if(u&&(l=l.getValue()),a.immediate)r.setValue(l),r.done=!0;else if("string"!=typeof s&&"string"!=typeof l){if(void 0!==a.duration)c=s+a.easing((e-r.startTime)/a.duration)*(l-s),i=e>=r.startTime+a.duration;else if(a.decay)c=s+d/(1-.998)*(1-Math.exp(-.0020000000000000018*(e-r.startTime))),i=Math.abs(r.lastPosition-c)<.1,i&&(l=c);else{o=void 0!==r.lastTime?r.lastTime:e,d=void 0!==r.lastVelocity?r.lastVelocity:a.initialVelocity,e>o+64&&(o=e);let t=Math.floor(e-o);for(let e=0;e<t;++e){d+=1*((-a.tension*(c-l)+-a.friction*d)/a.mass)/1e3,c+=1*d/1e3}let n=!(!a.clamp||0===a.tension)&&(s<l?c>l:c<l),u=Math.abs(d)<=a.precision,p=0===a.tension||Math.abs(l-c)<=a.precision;i=n||u&&p,r.lastVelocity=d,r.lastTime=e}u&&!a.toValues[t].done&&(i=!1),i?(r.value!==l&&(c=l),r.done=!0):n=!0,r.setValue(c),r.lastPosition=c}else r.setValue(l),r.done=!0}t.props.onFrame&&(t.values[a.name]=a.interpolation.getValue())}t.props.onFrame&&t.props.onFrame(t.values),n||(ks.delete(t),t.stop(!0))}return ks.size?bs(Ss):js=!1,js};function $s(e,t,n){if("function"==typeof e)return e;if(Array.isArray(e))return $s({range:e,output:t,extrapolate:n});if(ms&&"string"==typeof e.output[0])return ms(e);const r=e,i=r.output,o=r.range||[0,1],a=r.extrapolateLeft||r.extrapolate||"extend",s=r.extrapolateRight||r.extrapolate||"extend",l=r.easing||(e=>e);return e=>{const t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,o);return function(e,t,n,r,i,o,a,s,l){let c=l?l(e):e;if(c<t){if("identity"===a)return c;"clamp"===a&&(c=t)}if(c>n){if("identity"===s)return c;"clamp"===s&&(c=n)}if(r===i)return r;if(t===n)return e<=t?r:i;t===-1/0?c=-c:n===1/0?c-=t:c=(c-t)/(n-t);c=o(c),r===-1/0?c=-c:i===1/0?c+=r:c=c*(i-r)+r;return c}(e,o[t],o[t+1],i[t],i[t+1],l,a,s,r.map)}}class Es extends fs{constructor(e,t,n,r){super(),this.calc=void 0,this.payload=e instanceof fs&&!(e instanceof Es)?e.getPayload():Array.isArray(e)?e:[e],this.calc=$s(t,n,r)}getValue(){return this.calc(...this.payload.map((e=>e.getValue())))}updateConfig(e,t,n){this.calc=$s(e,t,n)}interpolate(e,t,n){return new Es(this,e,t,n)}}const Os=(e,t,n)=>e&&new Es(e,t,n);function Rs(e,t){"update"in e?t.add(e):e.getChildren().forEach((e=>Rs(e,t)))}class Ls extends hs{constructor(e){var t;super(),t=this,this.animatedStyles=new Set,this.value=void 0,this.startPosition=void 0,this.lastPosition=void 0,this.lastVelocity=void 0,this.startTime=void 0,this.lastTime=void 0,this.done=!1,this.setValue=function(e,n){void 0===n&&(n=!0),t.value=e,n&&t.flush()},this.value=e,this.startPosition=e,this.lastPosition=e}flush(){0===this.animatedStyles.size&&Rs(this,this.animatedStyles),this.animatedStyles.forEach((e=>e.update()))}clearStyles(){this.animatedStyles.clear()}getValue(){return this.value}interpolate(e,t,n){return new Es(this,e,t,n)}}class Ts extends fs{constructor(e){super(),this.payload=e.map((e=>new Ls(e)))}setValue(e,t){void 0===t&&(t=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach(((e,n)=>this.payload[n].setValue(e,t))):this.payload.forEach((n=>n.setValue(e,t)))}getValue(){return this.payload.map((e=>e.getValue()))}interpolate(e,t){return new Es(this,e,t)}}let _s=0,Ps=class{constructor(){this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=()=>this.interpolations,this.id=_s++}update(e){if(!e)return this;const t=ps(e),n=t.delay,r=void 0===n?0:n,i=t.to,o=ss(t,["delay","to"]);if(ls.arr(i)||ls.fun(i))this.queue.push(as({},o,{delay:r,to:i}));else if(i){let e={};Object.entries(i).forEach((t=>{let n=t[0],i=t[1];const a=as({to:{[n]:i},delay:ds(r,n)},o),s=e[a.delay]&&e[a.delay].to;e[a.delay]=as({},e[a.delay],a,{to:as({},s,a.to)})})),this.queue=Object.values(e)}return this.queue=this.queue.sort(((e,t)=>e.delay-t.delay)),this.diff(o),this}start(e){if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((e=>{let t=e.from,n=void 0===t?{}:t,r=e.to,i=void 0===r?{}:r;ls.obj(n)&&(this.merged=as({},n,this.merged)),ls.obj(i)&&(this.merged=as({},this.merged,i))}));const t=this.local=++this.guid,n=this.localQueue=this.queue;this.queue=[],n.forEach(((r,i)=>{let o=r.delay,a=ss(r,["delay"]);const s=r=>{i===n.length-1&&t===this.guid&&r&&(this.idle=!0,this.props.onRest&&this.props.onRest(this.merged)),e&&e()};let l=ls.arr(a.to)||ls.fun(a.to);o?setTimeout((()=>{t===this.guid&&(l?this.runAsync(a,s):this.diff(a).start(s))}),o):l?this.runAsync(a,s):this.diff(a).start(s)}))}else ls.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),t=this,ks.has(t)||ks.add(t),js||(js=!0,bs(Ss));var t;return this}stop(e){return this.listeners.forEach((t=>t(e))),this.listeners=[],this}pause(e){var t;return this.stop(!0),e&&(t=this,ks.has(t)&&ks.delete(t)),this}runAsync(e,t){var n=this;e.delay;let r=ss(e,["delay"]);const i=this.local;let o=Promise.resolve(void 0);if(ls.arr(r.to))for(let e=0;e<r.to.length;e++){const t=e,n=as({},r,ps(r.to[t]));ls.arr(n.config)&&(n.config=n.config[t]),o=o.then((()=>{if(i===this.guid)return new Promise((e=>this.diff(n).start(e)))}))}else if(ls.fun(r.to)){let e,t=0;o=o.then((()=>r.to((n=>{const o=as({},r,ps(n));if(ls.arr(o.config)&&(o.config=o.config[t]),t++,i===this.guid)return e=new Promise((e=>this.diff(o).start(e)))}),(function(e){return void 0===e&&(e=!0),n.stop(e)})).then((()=>e))))}o.then(t)}diff(e){this.props=as({},this.props,e);let t=this.props,n=t.from,r=void 0===n?{}:n,i=t.to,o=void 0===i?{}:i,a=t.config,s=void 0===a?{}:a,l=t.reverse,c=t.attach,u=t.reset,d=t.immediate;if(l){var p=[o,r];r=p[0],o=p[1]}this.merged=as({},r,this.merged,o),this.hasChanged=!1;let h=c&&c(this);if(this.animations=Object.entries(this.merged).reduce(((e,t)=>{let n=t[0],i=t[1],o=e[n]||{};const a=ls.num(i),l=ls.str(i)&&!i.startsWith("#")&&!/\d/.test(i)&&!vs[i],c=ls.arr(i),p=!a&&!c&&!l;let f=ls.und(r[n])?i:r[n],x=a||c||l?i:1,g=ds(s,n);h&&(x=h.animations[n].parent);let v,m=o.parent,b=o.interpolation,y=us(h?x.getPayload():x),C=i;p&&(C=ms({range:[0,1],output:[i,i]})(1));let w=b&&b.getValue();const j=!ls.und(m)&&o.animatedValues.some((e=>!e.done)),k=!ls.equ(C,w),S=!ls.equ(C,o.previous),$=!ls.equ(g,o.config);if(u||S&&k||$){if(a||l)m=b=o.parent||new Ls(f);else if(c)m=b=o.parent||new Ts(f);else if(p){let e=o.interpolation&&o.interpolation.calc(o.parent.value);e=void 0===e||u?f:e,o.parent?(m=o.parent,m.setValue(0,!1)):m=new Ls(0);const t={output:[e,i]};o.interpolation?(b=o.interpolation,o.interpolation.updateConfig(t)):b=m.interpolate(t)}return y=us(h?x.getPayload():x),v=us(m.getPayload()),u&&!p&&m.setValue(f,!1),this.hasChanged=!0,v.forEach((e=>{e.startPosition=e.value,e.lastPosition=e.value,e.lastVelocity=j?e.lastVelocity:void 0,e.lastTime=j?e.lastTime:void 0,e.startTime=Cs(),e.done=!1,e.animatedStyles.clear()})),ds(d,n)&&m.setValue(p?x:i,!1),as({},e,{[n]:as({},o,{name:n,parent:m,interpolation:b,animatedValues:v,toValues:y,previous:C,config:g,fromValues:us(m.getValue()),immediate:ds(d,n),initialVelocity:cs(g.velocity,0),clamp:cs(g.clamp,!1),precision:cs(g.precision,.01),tension:cs(g.tension,170),friction:cs(g.friction,26),mass:cs(g.mass,1),duration:g.duration,easing:cs(g.easing,(e=>e)),decay:g.decay})})}return k?e:(p&&(m.setValue(1,!1),b.updateConfig({output:[C,C]})),m.done=!0,this.hasChanged=!0,as({},e,{[n]:as({},e[n],{previous:C})}))}),this.animations),this.hasChanged){this.configs=Object.values(this.animations),this.values={},this.interpolations={};for(let e in this.animations)this.interpolations[e]=this.animations[e].interpolation,this.values[e]=this.animations[e].interpolation.getValue()}return this}destroy(){this.stop(),this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.local=0}};const Ms=e=>{const t=ls.fun(e),r=((e,t)=>{const r=n.useRef(!1),i=n.useRef(),o=ls.fun(t),a=n.useMemo((()=>{let n;return i.current&&(i.current.map((e=>e.destroy())),i.current=void 0),[new Array(e).fill().map(((e,r)=>{const i=new Ps,a=o?ds(t,r,i):t[r];return 0===r&&(n=a.ref),i.update(a),n||i.start(),i})),n]}),[e]),s=a[0],l=a[1];i.current=s,n.useImperativeHandle(l,(()=>({start:()=>Promise.all(i.current.map((e=>new Promise((t=>e.start(t)))))),stop:e=>i.current.forEach((t=>t.stop(e))),get controllers(){return i.current}})));const c=n.useMemo((()=>e=>i.current.map(((t,n)=>{t.update(o?ds(e,n,t):e[n]),l||t.start()}))),[e]);n.useEffect((()=>{r.current?o||c(t):l||i.current.forEach((e=>e.start()))})),n.useEffect((()=>(r.current=!0,()=>i.current.forEach((e=>e.destroy())))),[]);const u=i.current.map((e=>e.getValues()));return o?[u,c,e=>i.current.forEach((t=>t.pause(e)))]:u})(1,t?e:[e]),i=r[0],o=r[1],a=r[2];return t?[i[0],o,a]:i};class Ds extends xs{constructor(e){void 0===e&&(e={}),super(),!e.transform||e.transform instanceof hs||(e=gs.transform(e)),this.payload=e}}const Is={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Ns="[-+]?\\d*\\.?\\d+",Vs=Ns+"%";function zs(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"\\(\\s*("+t.join(")\\s*,\\s*(")+")\\s*\\)"}const As=new RegExp("rgb"+zs(Ns,Ns,Ns)),Bs=new RegExp("rgba"+zs(Ns,Ns,Ns,Ns)),Hs=new RegExp("hsl"+zs(Ns,Vs,Vs)),Fs=new RegExp("hsla"+zs(Ns,Vs,Vs,Ns)),Zs=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Gs=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,qs=/^#([0-9a-fA-F]{6})$/,Ws=/^#([0-9a-fA-F]{8})$/;function Us(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Xs(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,o=Us(i,r,e+1/3),a=Us(i,r,e),s=Us(i,r,e-1/3);return Math.round(255*o)<<24|Math.round(255*a)<<16|Math.round(255*s)<<8}function Ys(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function Ks(e){return(parseFloat(e)%360+360)%360/360}function Js(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function Qs(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function el(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=qs.exec(e))?parseInt(t[1]+"ff",16)>>>0:Is.hasOwnProperty(e)?Is[e]:(t=As.exec(e))?(Ys(t[1])<<24|Ys(t[2])<<16|Ys(t[3])<<8|255)>>>0:(t=Bs.exec(e))?(Ys(t[1])<<24|Ys(t[2])<<16|Ys(t[3])<<8|Js(t[4]))>>>0:(t=Zs.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=Ws.exec(e))?parseInt(t[1],16)>>>0:(t=Gs.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Hs.exec(e))?(255|Xs(Ks(t[1]),Qs(t[2]),Qs(t[3])))>>>0:(t=Fs.exec(e))?(Xs(Ks(t[1]),Qs(t[2]),Qs(t[3]))|Js(t[4]))>>>0:null}(e);return null===t?e:(t=t||0,`rgba(${(4278190080&t)>>>24}, ${(16711680&t)>>>16}, ${(65280&t)>>>8}, ${(255&t)/255})`)}const tl=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,nl=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,rl=new RegExp(`(${Object.keys(Is).join("|")})`,"g");let il={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};const ol=["Webkit","Ms","Moz","O"];function al(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||il.hasOwnProperty(e)&&il[e]?(""+t).trim():t+"px"}il=Object.keys(il).reduce(((e,t)=>(ol.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),il);const sl={};var ll;ys=e=>new Ds(e),ll=e=>{const t=e.output.map((e=>e.replace(nl,el))).map((e=>e.replace(rl,el))),n=t[0].match(tl).map((()=>[]));t.forEach((e=>{e.match(tl).forEach(((e,t)=>n[t].push(+e)))}));const r=t[0].match(tl).map(((t,r)=>$s(as({},e,{output:n[r]}))));return e=>{let n=0;return t[0].replace(tl,(()=>r[n++](e))).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,((e,t,n,r,i)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${i})`))}},ms=ll,vs=Is,function(e,t){gs={fn:e,transform:t}}(((e,t)=>{if(!e.nodeType||void 0===e.setAttribute)return!1;{const i=t.style,o=t.children,a=t.scrollTop,s=t.scrollLeft,l=ss(t,["style","children","scrollTop","scrollLeft"]),c="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;void 0!==a&&(e.scrollTop=a),void 0!==s&&(e.scrollLeft=s),void 0!==o&&(e.textContent=o);for(let t in i)if(i.hasOwnProperty(t)){var n=0===t.indexOf("--"),r=al(t,i[t],n);"float"===t&&(t="cssFloat"),n?e.style.setProperty(t,r):e.style[t]=r}for(let t in l){const n=c?t:sl[t]||(sl[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())));void 0!==e.getAttribute(n)&&e.setAttribute(n,l[t])}}}),(e=>e));var cl;const ul=(cl=e=>n.forwardRef(((t,r)=>{const i=function(){const e=n.useState(!1)[1];return n.useCallback((()=>e((e=>!e))),[])}(),o=n.useRef(!0),a=n.useRef(null),s=n.useRef(null),l=n.useCallback((e=>{const t=a.current;a.current=new ws(e,(()=>{let e=!1;s.current&&(e=gs.fn(s.current,a.current.getAnimatedValue())),s.current&&!1!==e||i()})),t&&t.detach()}),[]);n.useEffect((()=>()=>{o.current=!1,a.current&&a.current.detach()}),[]),n.useImperativeHandle(r,(()=>(e=>e.current)(s))),l(t);const c=a.current.getValue();c.scrollTop,c.scrollLeft;const u=ss(c,["scrollTop","scrollLeft"]),d=(p=e,!ls.fun(p)||p.prototype instanceof n.Component?e=>s.current=function(e,t){return t&&(ls.fun(t)?t(e):ls.obj(t)&&(t.current=e)),e}(e,r):void 0);var p;return n.createElement(e,as({},u,{ref:d}))})),e=>(ls.arr(e)?e:Object.keys(e)).reduce(((e,t)=>{const n=t;return e[n]=cl(n),e}),cl))(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]);function dl(e,t){return e.map((function(e,n){return e+t[n]}))}function pl(e,t){return e.map((function(e,n){return e-t[n]}))}function hl(e){return Math.hypot.apply(Math,e)}function fl(e){return Math.sign?Math.sign(e):Number(e>0)-Number(e<0)||+e}function xl(e,t,n){return 0===t||Math.abs(t)===1/0?function(e,t){return Math.pow(e,5*t)}(e,n):e*t*n/(t+n*e)}function gl(e,t,n,r){return void 0===r&&(r=.15),0===r?function(e,t,n){return Math.max(t,Math.min(e,n))}(e,t,n):e<t?-xl(t-e,n-t,r)+t:e>n?+xl(e-n,n-t,r)+n:e}function vl(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}function ml(){return ml=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ml.apply(this,arguments)}function bl(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function yl(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Cl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function wl(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Cl(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Cl(e,t):void 0}}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function jl(){}function kl(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?jl:1===t.length?t[0]:function(){for(var e,n,r=wl(t);!(n=r()).done;){e=n.value.apply(this,arguments)||e}return e}}function Sl(e,t){if(void 0===e){if(void 0===t)throw new Error("Must define fallback value if undefined is expected");e=t}return Array.isArray(e)?e:[e,e]}function $l(e){if("function"==typeof e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.apply(void 0,n)}return e}function El(e,t){void 0===e&&(e={});for(var n={},r=0,i=Object.entries(t);r<i.length;r++){var o=i[r],a=o[0],s=o[1];switch(typeof s){case"function":n[a]=s.call(n,e[a],a,e);break;case"object":n[a]=El(e[a],s);break;case"boolean":s&&(n[a]=e[a])}}return n}var Ol=ml({},{threshold:function(e){return void 0===e&&(e=0),Sl(e)},rubberband:function(e){switch(void 0===e&&(e=0),e){case!0:return Sl(.15);case!1:return Sl(0);default:return Sl(e)}},enabled:function(e){return void 0===e&&(e=!0),e},triggerAllEvents:function(e){return void 0===e&&(e=!1),e},initial:function(e){return void 0===e&&(e=0),"function"==typeof e?e:Sl(e)}},{axis:!0,lockDirection:function(e){return void 0===e&&(e=!1),e},bounds:function(e){if(void 0===e&&(e={}),"function"==typeof e)return function(t){return Ol.bounds(e(t))};var t=e,n=t.left,r=void 0===n?-1/0:n,i=t.right,o=void 0===i?1/0:i,a=t.top,s=void 0===a?-1/0:a,l=t.bottom;return[[r,o],[s,void 0===l?1/0:l]]}}),Rl="undefined"!=typeof window&&window.document&&window.document.createElement,Ll={enabled:function(e){return void 0===e&&(e=!0),e},domTarget:!0,window:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e){return void 0===e&&(e=Rl?window:void 0),e})),eventOptions:function(e){var t=void 0===e?{}:e,n=t.passive,r=void 0===n||n,i=t.capture;return{passive:r,capture:void 0!==i&&i}}},Tl=ml({},Ol,{threshold:function(e,t,n){var r=n.filterTaps,i=void 0!==r&&r,o=n.lockDirection,a=void 0!==o&&o,s=n.axis,l=Sl(e,i?3:a||(void 0===s?void 0:s)?1:0);return this.filterTaps=i||l[0]+l[1]>0,l},swipeVelocity:function(e){return void 0===e&&(e=.5),Sl(e)},swipeDistance:function(e){return void 0===e&&(e=60),Sl(e)},delay:function(e){switch(void 0===e&&(e=0),e){case!0:return 180;case!1:return 0;default:return e}}});function _l(e){var t=e.domTarget,n=e.eventOptions,r=e.window,i=e.enabled,o=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["domTarget","eventOptions","window","enabled"]),a=function(e){return void 0===e&&(e={}),El(e,Ll)}({domTarget:t,eventOptions:n,window:r,enabled:i});return a.drag=function(e){return void 0===e&&(e={}),El(e,Tl)}(o),a}function Pl(e){return ml({_active:!1,_blocked:!1,_intentional:[!1,!1],_movement:[0,0],_initial:[0,0],_bounds:[[-1/0,1/0],[-1/0,1/0]],_lastEventType:void 0,event:void 0,intentional:!1,values:[0,0],velocities:[0,0],delta:[0,0],movement:[0,0],offset:[0,0],lastOffset:[0,0],direction:[0,0],initial:[0,0],previous:[0,0],first:!1,last:!1,active:!1,timeStamp:0,startTime:0,elapsedTime:0,cancel:jl,canceled:!1,memo:void 0,args:void 0},e)}function Ml(){return{shared:{hovering:!1,scrolling:!1,wheeling:!1,dragging:!1,moving:!1,pinching:!1,touches:0,buttons:0,down:!1,shiftKey:!1,altKey:!1,metaKey:!1,ctrlKey:!1},drag:Pl({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0,_isTap:!0,_delayedEvent:!1,_pointerId:void 0,tap:!1,swipe:[0,0]}),pinch:Pl({da:[0,0],vdva:[0,0],origin:void 0,turns:0}),wheel:Pl({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),move:Pl({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),scroll:Pl({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0})}}var Dl=new Map,Il=function(){function e(e,t){var n=this;void 0===t&&(t=[]),this.controller=e,this.args=t,this.debounced=!0,this.setTimeout=function(e,t){var r;void 0===t&&(t=140),clearTimeout(n.controller.timeouts[n.stateKey]);for(var i=arguments.length,o=new Array(i>2?i-2:0),a=2;a<i;a++)o[a-2]=arguments[a];n.controller.timeouts[n.stateKey]=(r=window).setTimeout.apply(r,[e,t].concat(o))},this.clearTimeout=function(){clearTimeout(n.controller.timeouts[n.stateKey])},this.fireGestureHandler=function(e){if(void 0===e&&(e=!1),n.state._blocked)return n.debounced||(n.state._active=!1,n.clean()),null;if(!e&&!n.state.intentional&&!n.config.triggerAllEvents)return null;if(n.state.intentional){var t=n.state.active,r=n.state._active;n.state.active=r,n.state.first=r&&!t,n.state.last=t&&!r,n.controller.state.shared[n.ingKey]=r}var i=ml({},n.controller.state.shared,n.state,n.mapStateValues(n.state)),o=n.handler(i);return n.state.memo=void 0!==o?o:n.state.memo,n.state._active||n.clean(),i}}var t=e.prototype;return t.updateSharedState=function(e){Object.assign(this.controller.state.shared,e)},t.updateGestureState=function(e){Object.assign(this.state,e)},t.checkIntentionality=function(e,t){return{_intentional:e,_blocked:!1}},t.getMovement=function(e){var t=this.config,n=t.initial,r=t.bounds,i=t.rubberband,o=t.threshold,a=this.state,s=a._bounds,l=a._initial,c=a._active,u=a._intentional,d=a.lastOffset,p=a.movement,h=this.getInternalMovement(e,this.state),f=!1===u[0]?Nl(h[0],o[0]):u[0],x=!1===u[1]?Nl(h[1],o[1]):u[1],g=this.checkIntentionality([f,x],h);if(g._blocked)return ml({},g,{_movement:h,delta:[0,0]});var v,m,b,y,C=g._intentional,w=h;(!1!==C[0]&&!1===u[0]&&(m=$l(n,this.state),v=$l(r,this.state),l[0]=m[0],s[0]=v[0]),!1!==C[1]&&!1===u[1])&&(m=null!=(b=m)?b:$l(n,this.state),v=null!=(y=v)?y:$l(r,this.state),l[1]=m[1],s[1]=v[1]);var j=[!1!==C[0]?h[0]-C[0]:l[0],!1!==C[1]?h[1]-C[1]:l[1]],k=dl(j,d),S=c?i:[0,0];return j=Vl(s,dl(j,l),S),ml({},g,{intentional:!1!==C[0]||!1!==C[1],_initial:l,_movement:w,movement:j,values:e,offset:Vl(s,k,S),delta:pl(j,p)})},t.clean=function(){this.clearTimeout()},vl(e,[{key:"config",get:function(){return this.controller.config[this.stateKey]}},{key:"enabled",get:function(){return this.controller.config.enabled&&this.config.enabled}},{key:"state",get:function(){return this.controller.state[this.stateKey]}},{key:"handler",get:function(){return this.controller.handlers[this.stateKey]}}]),e}();function Nl(e,t){return Math.abs(e)>=t&&fl(e)*t}function Vl(e,t,n){var r=t[0],i=t[1],o=n[0],a=n[1],s=e[0],l=s[0],c=s[1],u=e[1],d=u[0],p=u[1];return[gl(r,l,c,o),gl(i,d,p,a)]}function zl(e,t,n){var r=e.state,i=e.args,o=t.timeStamp,a=t.type,s=r.values;return{_lastEventType:a,event:t,timeStamp:o,elapsedTime:n?0:o-r.startTime,args:i,previous:s}}function Al(e,t){return function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return e.call.apply(e,[this,ml({},t,{event:n})].concat(i))}}var Bl=function(e){var t=this;this.classes=e,this.bind=function(){for(var e={},n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];for(var o,a=wl(t.classes);!(o=a()).done;){new(0,o.value)(t,r).addBindings(e)}for(var s=0,l=Object.entries(t.nativeRefs);s<l.length;s++){var c=l[s];Zl(e,c[0],Al(c[1],ml({},t.state.shared,{args:r})))}return t.config.domTarget?function(e,t){var n=e.config,r=e.domListeners,i=Fl(n);if(!i)throw new Error("domTarget must be defined");var o=n.eventOptions;ql(i,Hl(r),o);for(var a=0,s=Object.entries(t);a<s.length;a++){var l=s[a],c=l[0],u=l[1],d=c.slice(2).toLowerCase();r.push([d,kl.apply(void 0,u)])}Gl(i,r,o)}(t,e):function(e,t){for(var n=e.config,r={},i=n.eventOptions.capture?"Capture":"",o=0,a=Object.entries(t);o<a.length;o++){var s=a[o],l=s[0],c=s[1],u=Array.isArray(c)?c:[c];r[l+i]=kl.apply(void 0,u)}return r}(t,e)},this.effect=function(){return t.config.domTarget&&t.bind(),t.clean},this.clean=function(){var e=Fl(t.config),n=t.config.eventOptions;e&&ql(e,Hl(t.domListeners),n),Object.values(t.timeouts).forEach(clearTimeout),function(e){var t=e.config,n=t.window,r=t.eventOptions,i=e.windowListeners;if(!n)return;for(var o in i){ql(n,i[o],r)}e.windowListeners={}}(t)},this.state=Ml(),this.timeouts={},this.domListeners=[],this.windowListeners={}};function Hl(e){return void 0===e&&(e=[]),e.splice(0,e.length)}function Fl(e){var t=e.domTarget;return t&&"current"in t?t.current:t}function Zl(e,t,n){e[t]||(e[t]=[]),e[t].push(n)}function Gl(e,t,n){void 0===t&&(t=[]),void 0===n&&(n={});for(var r,i=wl(t);!(r=i()).done;){var o=r.value,a=o[0],s=o[1];e.addEventListener(a,s,n)}}function ql(e,t,n){void 0===t&&(t=[]),void 0===n&&(n={});for(var r,i=wl(t);!(r=i()).done;){var o=r.value,a=o[0],s=o[1];e.removeEventListener(a,s,n)}}function Wl(e,t,r){void 0===r&&(r={});var i=function(e){var t=new Set;e.drag&&t.add(Dl.get("drag"));e.wheel&&t.add(Dl.get("wheel"));e.scroll&&t.add(Dl.get("scroll"));e.move&&t.add(Dl.get("move"));e.pinch&&t.add(Dl.get("pinch"));e.hover&&t.add(Dl.get("hover"));return t}(e),o=n.useMemo((function(){return new Bl(i)}),[]);return o.config=t,o.handlers=e,o.nativeRefs=r,n.useEffect(o.effect,[]),o.config.domTarget?Ul:o.bind}function Ul(){"development"===process.env.NODE_ENV&&console.warn("Deprecation notice: When the `domTarget` option is specified, you don't need to write `useEffect(bind, [bind])` anymore: event binding is now made handled internally to this lib.\n\nNext version won't return anything when `domTarget` is provided, therefore your code will break if you try to call `useEffect`.")}function Xl(e){if("touches"in e){var t=e.targetTouches,n=e.changedTouches;return t.length>0?t:n}return null}function Yl(e){var t="buttons"in e?e.buttons:0,n=Xl(e),r=n&&n.length||0;return{touches:r,down:r>0||t>0,buttons:t,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,ctrlKey:e.ctrlKey}}function Kl(e){var t=Xl(e),n=t?t[0]:e;return[n.clientX,n.clientY]}var Jl=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).ingKey="dragging",t.stateKey="drag",t.onDragStart=function(e){t.enabled&&!t.state._active&&(!function(e,t,n){var r=e.config,i=e.windowListeners;void 0===n&&(n=[]),r.window&&(ql(r.window,i[t],r.eventOptions),Gl(r.window,i[t]=n,r.eventOptions))}(t.controller,t.stateKey,[["pointermove",t.onDragChange],["pointerup",t.onDragEnd],["pointercancel",t.onDragEnd]]),t.updateGestureState({_pointerId:e.pointerId}),t.config.delay>0?(t.state._delayedEvent=!0,"persist"in e&&"function"==typeof e.persist&&e.persist(),t.setTimeout(t.startDrag.bind(yl(t)),t.config.delay,e)):t.startDrag(e))},t.onDragChange=function(e){if(!t.state.canceled&&e.pointerId===t.state._pointerId)if(t.state._active){var n=Yl(e);if(n.down){t.updateSharedState(n);var r=Kl(e),i=t.getKinematics(r,e),o=zl(yl(t),e),a=t.state._isTap,s=hl(i._movement);a&&s>=3&&(a=!1),t.updateGestureState(ml({},o,i,{_isTap:a})),t.fireGestureHandler()}else t.onDragEnd(e)}else t.state._delayedEvent&&(t.clearTimeout(),t.startDrag(e))},t.onDragEnd=function(e){if(e.pointerId===t.state._pointerId){t.state._active=!1,t.updateSharedState({down:!1,buttons:0,touches:0});var n=t.state._isTap,r=t.state.velocities,i=r[0],o=r[1],a=t.state.movement,s=a[0],l=a[1],c=t.state._intentional,u=c[0],d=c[1],p=t.config.swipeVelocity,h=p[0],f=p[1],x=t.config.swipeDistance,g=x[0],v=x[1],m=ml({},zl(yl(t),e),t.getMovement(t.state.values)),b=[0,0];m.elapsedTime<220&&(!1!==u&&Math.abs(i)>h&&Math.abs(s)>g&&(b[0]=fl(i)),!1!==d&&Math.abs(o)>f&&Math.abs(l)>v&&(b[1]=fl(o))),t.updateGestureState(ml({},m,{tap:n,swipe:b})),t.fireGestureHandler(!0===n)}},t.clean=function(){e.prototype.clean.call(yl(t)),t.state._delayedEvent=!1,function(e,t){var n=e.config,r=e.windowListeners;n.window&&(ql(n.window,r[t],n.eventOptions),delete r[t])}(t.controller,t.stateKey)},t.onCancel=function(){t.state.canceled||(t.updateGestureState({canceled:!0}),t.state._active=!1,t.updateSharedState({down:!1,buttons:0,touches:0}),requestAnimationFrame((function(){return t.fireGestureHandler()})))},t.onClick=function(e){t.state._isTap||e.stopPropagation()},t}bl(t,e);var n=t.prototype;return n.startDrag=function(e){var t=Kl(e);this.updateSharedState(Yl(e)),this.updateGestureState(ml({},function(e,t,n){var r=e.state.offset,i=n.timeStamp;return ml({},Ml()[e.stateKey],{_active:!0,values:t,initial:t,offset:r,lastOffset:r,startTime:i})}(this,t,e),zl(this,e,!0),{_pointerId:e.pointerId,cancel:this.onCancel})),this.updateGestureState(this.getMovement(t)),this.fireGestureHandler()},n.addBindings=function(e){(Zl(e,"onPointerDown",this.onDragStart),this.config.filterTaps)&&Zl(e,this.controller.config.eventOptions.capture?"onClick":"onClickCapture",this.onClick)},t}(function(e){function t(){return e.apply(this,arguments)||this}bl(t,e);var n=t.prototype;return n.getInternalMovement=function(e,t){return pl(e,t.initial)},n.checkIntentionality=function(e,t){if(!1===e[0]&&!1===e[1])return{_intentional:e,axis:this.state.axis};var n=t.map(Math.abs),r=n[0],i=n[1],o=this.state.axis||(r>i?"x":r<i?"y":void 0);return this.config.axis||this.config.lockDirection?o?this.config.axis&&o!==this.config.axis?{_intentional:e,_blocked:!0,axis:o}:(e["x"===o?1:0]=!1,{_intentional:e,_blocked:!1,axis:o}):{_intentional:[!1,!1],_blocked:!1,axis:o}:{_intentional:e,_blocked:!1,axis:o}},n.getKinematics=function(e,t){var n=this.getMovement(e);if(!n._blocked){var r=t.timeStamp-this.state.timeStamp;Object.assign(n,function(e,t,n){var r=hl(t),i=0===r?0:1/r,o=0===n?0:1/n,a=o*r,s=t.map((function(e){return o*e})),l=t.map((function(e){return i*e}));return{velocities:s,velocity:a,distance:hl(e),direction:l}}(n.movement,n.delta,r))}return n},n.mapStateValues=function(e){return{xy:e.values,vxvy:e.velocities}},t}(Il));function Ql(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;var n,r,i,o;if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(r=n;0!=r--;)if(!Ql(e[r],t[r]))return!1;return!0}if("function"==typeof Map&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!Ql(r.value[1],t.get(r.value[0])))return!1;return!0}if("function"==typeof Set&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if((n=(i=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if("undefined"!=typeof Element&&e instanceof Element)return!1;for(r=n;0!=r--;)if(!("_owner"===i[r]&&e.$$typeof||Ql(e[i[r]],t[i[r]])))return!1;return!0}return e!=e&&t!=t}function ec(e,t){try{return Ql(e,t)}catch(e){if((e.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw e}}function tc(e,t){void 0===t&&(t={}),Dl.set("drag",Jl);var r=n.useRef();return r.current||(r.current=function(e,t){var n,r,i=[],o=!1;return function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];return o&&n===this&&t(s,i)||(r=e.apply(this,s),o=!0,n=this,i=s),r}}(_l,ec)),Wl({drag:e},r.current(t))}
2231
2248
  /*!
2232
2249
  * tabbable 5.3.3
2233
2250
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
2234
- */var ec=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],tc=ec.join(","),nc="undefined"==typeof Element,rc=nc?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ic=!nc&&Element.prototype.getRootNode?function(e){return e.getRootNode()}:function(e){return e.ownerDocument},oc=function(e,t,n){var r=Array.prototype.slice.apply(e.querySelectorAll(tc));return t&&rc.call(e,tc)&&r.unshift(e),r=r.filter(n)},ac=function e(t,n,r){for(var i=[],o=Array.from(t);o.length;){var a=o.shift();if("SLOT"===a.tagName){var s=a.assignedElements(),l=e(s.length?s:a.children,!0,r);r.flatten?i.push.apply(i,l):i.push({scope:a,candidates:l})}else{rc.call(a,tc)&&r.filter(a)&&(n||!t.includes(a))&&i.push(a);var c=a.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(a),u=!r.shadowRootFilter||r.shadowRootFilter(a);if(c&&u){var d=e(!0===c?a.children:c.children,!0,r);r.flatten?i.push.apply(i,d):i.push({scope:a,candidates:d})}else o.unshift.apply(o,a.children)}}return i},sc=function(e,t){return e.tabIndex<0&&(t||/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||e.isContentEditable)&&isNaN(parseInt(e.getAttribute("tabindex"),10))?0:e.tabIndex},lc=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},cc=function(e){return"INPUT"===e.tagName},uc=function(e){return function(e){return cc(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||ic(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var i=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!i||i===e}(e)},dc=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},pc=function(e,t){return!(t.disabled||function(e){return cc(e)&&"hidden"===e.type}(t)||function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var i=rc.call(e,"details>summary:first-of-type")?e.parentElement:e;if(rc.call(i,"details:not([open]) *"))return!0;var o=ic(e).host,a=(null==o?void 0:o.ownerDocument.contains(o))||e.ownerDocument.contains(e);if(n&&"full"!==n){if("non-zero-area"===n)return dc(e)}else{if("function"==typeof r){for(var s=e;e;){var l=e.parentElement,c=ic(e);if(l&&!l.shadowRoot&&!0===r(l))return dc(e);e=e.assignedSlot?e.assignedSlot:l||c===e.ownerDocument?l:c.host}e=s}if(a)return!e.getClientRects().length}return!1}(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!!rc.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},hc=function(e,t){return!(uc(t)||sc(t)<0||!pc(e,t))},fc=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},xc=function e(t){var n=[],r=[];return t.forEach((function(t,i){var o=!!t.scope,a=o?t.scope:t,s=sc(a,o),l=o?e(t.candidates):a;0===s?o?n.push.apply(n,l):n.push(a):r.push({documentOrder:i,tabIndex:s,item:t,isScope:o,content:l})})),r.sort(lc).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)},gc=function(e,t){var n;return n=(t=t||{}).getShadowRoot?ac([e],t.includeContainer,{filter:hc.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:fc}):oc(e,t.includeContainer,hc.bind(null,t)),xc(n)},vc=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==rc.call(e,tc)&&hc(t,e)},mc=ec.concat("iframe").join(","),bc=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==rc.call(e,mc)&&pc(t,e)};
2251
+ */var nc=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],rc=nc.join(","),ic="undefined"==typeof Element,oc=ic?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ac=!ic&&Element.prototype.getRootNode?function(e){return e.getRootNode()}:function(e){return e.ownerDocument},sc=function(e,t,n){var r=Array.prototype.slice.apply(e.querySelectorAll(rc));return t&&oc.call(e,rc)&&r.unshift(e),r=r.filter(n)},lc=function e(t,n,r){for(var i=[],o=Array.from(t);o.length;){var a=o.shift();if("SLOT"===a.tagName){var s=a.assignedElements(),l=e(s.length?s:a.children,!0,r);r.flatten?i.push.apply(i,l):i.push({scope:a,candidates:l})}else{oc.call(a,rc)&&r.filter(a)&&(n||!t.includes(a))&&i.push(a);var c=a.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(a),u=!r.shadowRootFilter||r.shadowRootFilter(a);if(c&&u){var d=e(!0===c?a.children:c.children,!0,r);r.flatten?i.push.apply(i,d):i.push({scope:a,candidates:d})}else o.unshift.apply(o,a.children)}}return i},cc=function(e,t){return e.tabIndex<0&&(t||/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||e.isContentEditable)&&isNaN(parseInt(e.getAttribute("tabindex"),10))?0:e.tabIndex},uc=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},dc=function(e){return"INPUT"===e.tagName},pc=function(e){return function(e){return dc(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||ac(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var i=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!i||i===e}(e)},hc=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},fc=function(e,t){return!(t.disabled||function(e){return dc(e)&&"hidden"===e.type}(t)||function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var i=oc.call(e,"details>summary:first-of-type")?e.parentElement:e;if(oc.call(i,"details:not([open]) *"))return!0;var o=ac(e).host,a=(null==o?void 0:o.ownerDocument.contains(o))||e.ownerDocument.contains(e);if(n&&"full"!==n){if("non-zero-area"===n)return hc(e)}else{if("function"==typeof r){for(var s=e;e;){var l=e.parentElement,c=ac(e);if(l&&!l.shadowRoot&&!0===r(l))return hc(e);e=e.assignedSlot?e.assignedSlot:l||c===e.ownerDocument?l:c.host}e=s}if(a)return!e.getClientRects().length}return!1}(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!!oc.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},xc=function(e,t){return!(pc(t)||cc(t)<0||!fc(e,t))},gc=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},vc=function e(t){var n=[],r=[];return t.forEach((function(t,i){var o=!!t.scope,a=o?t.scope:t,s=cc(a,o),l=o?e(t.candidates):a;0===s?o?n.push.apply(n,l):n.push(a):r.push({documentOrder:i,tabIndex:s,item:t,isScope:o,content:l})})),r.sort(uc).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)},mc=function(e,t){var n;return n=(t=t||{}).getShadowRoot?lc([e],t.includeContainer,{filter:xc.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:gc}):sc(e,t.includeContainer,xc.bind(null,t)),vc(n)},bc=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==oc.call(e,rc)&&xc(t,e)},yc=nc.concat("iframe").join(","),Cc=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==oc.call(e,yc)&&fc(t,e)};
2235
2252
  /*!
2236
2253
  * focus-trap 6.9.4
2237
2254
  * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
2238
2255
  */
2239
- function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Cc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yc(Object(n),!0).forEach((function(t){wc(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function wc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var jc,kc=(jc=[],{activateTrap:function(e){if(jc.length>0){var t=jc[jc.length-1];t!==e&&t.pause()}var n=jc.indexOf(e);-1===n||jc.splice(n,1),jc.push(e)},deactivateTrap:function(e){var t=jc.indexOf(e);-1!==t&&jc.splice(t,1),jc.length>0&&jc[jc.length-1].unpause()}}),Sc=function(e){return setTimeout(e,0)},$c=function(e,t){var n=-1;return e.every((function(e,r){return!t(e)||(n=r,!1)})),n},Ec=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return"function"==typeof e?e.apply(void 0,n):e},Oc=function(e){return e.target.shadowRoot&&"function"==typeof e.composedPath?e.composedPath()[0]:e.target},Rc=function(e,t){var n,r=(null==t?void 0:t.document)||document,i=Cc({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},t),o={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},a=function(e,t,n){return e&&void 0!==e[t]?e[t]:i[n||t]},s=function(e){return o.containerGroups.findIndex((function(t){var n=t.container,r=t.tabbableNodes;return n.contains(e)||r.find((function(t){return t===e}))}))},l=function(e){var t=i[e];if("function"==typeof t){for(var n=arguments.length,o=new Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];t=t.apply(void 0,o)}if(!0===t&&(t=void 0),!t){if(void 0===t||!1===t)return t;throw new Error("`".concat(e,"` was specified but was not a node, or did not return a node"))}var s=t;if("string"==typeof t&&!(s=r.querySelector(t)))throw new Error("`".concat(e,"` as selector refers to no known node"));return s},c=function(){var e=l("initialFocus");if(!1===e)return!1;if(void 0===e)if(s(r.activeElement)>=0)e=r.activeElement;else{var t=o.tabbableGroups[0];e=t&&t.firstTabbableNode||l("fallbackFocus")}if(!e)throw new Error("Your focus-trap needs to have at least one focusable element");return e},u=function(){if(o.containerGroups=o.containers.map((function(e){var t,n,r=gc(e,i.tabbableOptions),o=(t=e,(n=(n=i.tabbableOptions)||{}).getShadowRoot?ac([t],n.includeContainer,{filter:pc.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):oc(t,n.includeContainer,pc.bind(null,n)));return{container:e,tabbableNodes:r,focusableNodes:o,firstTabbableNode:r.length>0?r[0]:null,lastTabbableNode:r.length>0?r[r.length-1]:null,nextTabbableNode:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=o.findIndex((function(t){return t===e}));if(!(n<0))return t?o.slice(n+1).find((function(e){return vc(e,i.tabbableOptions)})):o.slice(0,n).reverse().find((function(e){return vc(e,i.tabbableOptions)}))}}})),o.tabbableGroups=o.containerGroups.filter((function(e){return e.tabbableNodes.length>0})),o.tabbableGroups.length<=0&&!l("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},d=function e(t){!1!==t&&t!==r.activeElement&&(t&&t.focus?(t.focus({preventScroll:!!i.preventScroll}),o.mostRecentlyFocusedNode=t,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(t)&&t.select()):e(c()))},p=function(e){var t=l("setReturnFocus",e);return t||!1!==t&&e},h=function(e){var t=Oc(e);s(t)>=0||(Ec(i.clickOutsideDeactivates,e)?n.deactivate({returnFocus:i.returnFocusOnDeactivate&&!bc(t,i.tabbableOptions)}):Ec(i.allowOutsideClick,e)||e.preventDefault())},f=function(e){var t=Oc(e),n=s(t)>=0;n||t instanceof Document?n&&(o.mostRecentlyFocusedNode=t):(e.stopImmediatePropagation(),d(o.mostRecentlyFocusedNode||c()))},x=function(e){if(function(e){return"Escape"===e.key||"Esc"===e.key||27===e.keyCode}(e)&&!1!==Ec(i.escapeDeactivates,e))return e.preventDefault(),void n.deactivate();(function(e){return"Tab"===e.key||9===e.keyCode})(e)&&function(e){var t=Oc(e);u();var n=null;if(o.tabbableGroups.length>0){var r=s(t),a=r>=0?o.containerGroups[r]:void 0;if(r<0)n=e.shiftKey?o.tabbableGroups[o.tabbableGroups.length-1].lastTabbableNode:o.tabbableGroups[0].firstTabbableNode;else if(e.shiftKey){var c=$c(o.tabbableGroups,(function(e){var n=e.firstTabbableNode;return t===n}));if(c<0&&(a.container===t||bc(t,i.tabbableOptions)&&!vc(t,i.tabbableOptions)&&!a.nextTabbableNode(t,!1))&&(c=r),c>=0){var p=0===c?o.tabbableGroups.length-1:c-1;n=o.tabbableGroups[p].lastTabbableNode}}else{var h=$c(o.tabbableGroups,(function(e){var n=e.lastTabbableNode;return t===n}));if(h<0&&(a.container===t||bc(t,i.tabbableOptions)&&!vc(t,i.tabbableOptions)&&!a.nextTabbableNode(t))&&(h=r),h>=0){var f=h===o.tabbableGroups.length-1?0:h+1;n=o.tabbableGroups[f].firstTabbableNode}}}else n=l("fallbackFocus");n&&(e.preventDefault(),d(n))}(e)},g=function(e){var t=Oc(e);s(t)>=0||Ec(i.clickOutsideDeactivates,e)||Ec(i.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},v=function(){if(o.active)return kc.activateTrap(n),o.delayInitialFocusTimer=i.delayInitialFocus?Sc((function(){d(c())})):d(c()),r.addEventListener("focusin",f,!0),r.addEventListener("mousedown",h,{capture:!0,passive:!1}),r.addEventListener("touchstart",h,{capture:!0,passive:!1}),r.addEventListener("click",g,{capture:!0,passive:!1}),r.addEventListener("keydown",x,{capture:!0,passive:!1}),n},m=function(){if(o.active)return r.removeEventListener("focusin",f,!0),r.removeEventListener("mousedown",h,!0),r.removeEventListener("touchstart",h,!0),r.removeEventListener("click",g,!0),r.removeEventListener("keydown",x,!0),n};return(n={get active(){return o.active},get paused(){return o.paused},activate:function(e){if(o.active)return this;var t=a(e,"onActivate"),n=a(e,"onPostActivate"),i=a(e,"checkCanFocusTrap");i||u(),o.active=!0,o.paused=!1,o.nodeFocusedBeforeActivation=r.activeElement,t&&t();var s=function(){i&&u(),v(),n&&n()};return i?(i(o.containers.concat()).then(s,s),this):(s(),this)},deactivate:function(e){if(!o.active)return this;var t=Cc({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},e);clearTimeout(o.delayInitialFocusTimer),o.delayInitialFocusTimer=void 0,m(),o.active=!1,o.paused=!1,kc.deactivateTrap(n);var r=a(t,"onDeactivate"),s=a(t,"onPostDeactivate"),l=a(t,"checkCanReturnFocus"),c=a(t,"returnFocus","returnFocusOnDeactivate");r&&r();var u=function(){Sc((function(){c&&d(p(o.nodeFocusedBeforeActivation)),s&&s()}))};return c&&l?(l(p(o.nodeFocusedBeforeActivation)).then(u,u),this):(u(),this)},pause:function(){return o.paused||!o.active||(o.paused=!0,m()),this},unpause:function(){return o.paused&&o.active?(o.paused=!1,u(),v(),this):this},updateContainerElements:function(e){var t=[].concat(e).filter(Boolean);return o.containers=t.map((function(e){return"string"==typeof e?r.querySelector(e):e})),o.active&&u(),this}}).updateContainerElements(e),n};var Lc=!1;if("undefined"!=typeof window){var Tc={get passive(){Lc=!0}};window.addEventListener("testPassive",null,Tc),window.removeEventListener("testPassive",null,Tc)}var _c,Pc="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1),Mc=[],Dc=!1,Ic=-1,Nc=void 0,Vc=void 0,zc=function(e){return Mc.some((function(t){return!(!t.options.allowTouchMove||!t.options.allowTouchMove(e))}))},Ac=function(e){var t=e||window.event;return!!zc(t.target)||(t.touches.length>1||(t.preventDefault&&t.preventDefault(),!1))},Bc=function(e,t){if(e){if(!Mc.some((function(t){return t.targetElement===e}))){var n={targetElement:e,options:t||{}};Mc=[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(Mc),[n]),Pc?(e.ontouchstart=function(e){1===e.targetTouches.length&&(Ic=e.targetTouches[0].clientY)},e.ontouchmove=function(t){1===t.targetTouches.length&&function(e,t){var n=e.targetTouches[0].clientY-Ic;!zc(e.target)&&(t&&0===t.scrollTop&&n>0||function(e){return!!e&&e.scrollHeight-e.scrollTop<=e.clientHeight}(t)&&n<0?Ac(e):e.stopPropagation())}(t,e)},Dc||(document.addEventListener("touchmove",Ac,Lc?{passive:!1}:void 0),Dc=!0)):function(e){if(void 0===Vc){var t=!!e&&!0===e.reserveScrollBarGap,n=window.innerWidth-document.documentElement.clientWidth;t&&n>0&&(Vc=document.body.style.paddingRight,document.body.style.paddingRight=n+"px")}void 0===Nc&&(Nc=document.body.style.overflow,document.body.style.overflow="hidden")}(t)}}else console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.")},Hc=function(e){e?(Mc=Mc.filter((function(t){return t.targetElement!==e})),Pc?(e.ontouchstart=null,e.ontouchmove=null,Dc&&0===Mc.length&&(document.removeEventListener("touchmove",Ac,Lc?{passive:!1}:void 0),Dc=!1)):Mc.length||(void 0!==Vc&&(document.body.style.paddingRight=Vc,Vc=void 0),void 0!==Nc&&(document.body.style.overflow=Nc,Nc=void 0))):console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.")},Fc=[],Zc="ResizeObserver loop completed with undelivered notifications.";!function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(_c||(_c={}));var Gc,qc=function(e){return Object.freeze(e)},Wc=function(e,t){this.inlineSize=e,this.blockSize=t,qc(this)},Uc=function(){function e(e,t,n,r){return this.x=e,this.y=t,this.width=n,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,qc(this)}return e.prototype.toJSON=function(){var e=this;return{x:e.x,y:e.y,top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),Xc=function(e){return e instanceof SVGElement&&"getBBox"in e},Yc=function(e){if(Xc(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var i=e,o=i.offsetWidth,a=i.offsetHeight;return!(o||a||e.getClientRects().length)},Kc=function(e){var t;if(e instanceof Element)return!0;var n=null===(t=null==e?void 0:e.ownerDocument)||void 0===t?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},Jc="undefined"!=typeof window?window:{},Qc=new WeakMap,eu=/auto|scroll/,tu=/^tb|vertical/,nu=/msie|trident/i.test(Jc.navigator&&Jc.navigator.userAgent),ru=function(e){return parseFloat(e||"0")},iu=function(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=!1),new Wc((n?t:e)||0,(n?e:t)||0)},ou=qc({devicePixelContentBoxSize:iu(),borderBoxSize:iu(),contentBoxSize:iu(),contentRect:new Uc(0,0,0,0)}),au=function(e,t){if(void 0===t&&(t=!1),Qc.has(e)&&!t)return Qc.get(e);if(Yc(e))return Qc.set(e,ou),ou;var n=getComputedStyle(e),r=Xc(e)&&e.ownerSVGElement&&e.getBBox(),i=!nu&&"border-box"===n.boxSizing,o=tu.test(n.writingMode||""),a=!r&&eu.test(n.overflowY||""),s=!r&&eu.test(n.overflowX||""),l=r?0:ru(n.paddingTop),c=r?0:ru(n.paddingRight),u=r?0:ru(n.paddingBottom),d=r?0:ru(n.paddingLeft),p=r?0:ru(n.borderTopWidth),h=r?0:ru(n.borderRightWidth),f=r?0:ru(n.borderBottomWidth),x=d+c,g=l+u,v=(r?0:ru(n.borderLeftWidth))+h,m=p+f,b=s?e.offsetHeight-m-e.clientHeight:0,y=a?e.offsetWidth-v-e.clientWidth:0,C=i?x+v:0,w=i?g+m:0,j=r?r.width:ru(n.width)-C-y,k=r?r.height:ru(n.height)-w-b,S=j+x+y+v,$=k+g+b+m,E=qc({devicePixelContentBoxSize:iu(Math.round(j*devicePixelRatio),Math.round(k*devicePixelRatio),o),borderBoxSize:iu(S,$,o),contentBoxSize:iu(j,k,o),contentRect:new Uc(d,l,j,k)});return Qc.set(e,E),E},su=function(e,t,n){var r=au(e,n),i=r.borderBoxSize,o=r.contentBoxSize,a=r.devicePixelContentBoxSize;switch(t){case _c.DEVICE_PIXEL_CONTENT_BOX:return a;case _c.BORDER_BOX:return i;default:return o}},lu=function(e){var t=au(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=qc([t.borderBoxSize]),this.contentBoxSize=qc([t.contentBoxSize]),this.devicePixelContentBoxSize=qc([t.devicePixelContentBoxSize])},cu=function(e){if(Yc(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},uu=function(){var e=1/0,t=[];Fc.forEach((function(n){if(0!==n.activeTargets.length){var r=[];n.activeTargets.forEach((function(t){var n=new lu(t.target),i=cu(t.target);r.push(n),t.lastReportedSize=su(t.target,t.observedBox),i<e&&(e=i)})),t.push((function(){n.callback.call(n.observer,r,n.observer)})),n.activeTargets.splice(0,n.activeTargets.length)}}));for(var n=0,r=t;n<r.length;n++){(0,r[n])()}return e},du=function(e){Fc.forEach((function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach((function(n){n.isActive()&&(cu(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))}))}))},pu=function(){var e=0;for(du(e);Fc.some((function(e){return e.activeTargets.length>0}));)e=uu(),du(e);return Fc.some((function(e){return e.skippedTargets.length>0}))&&function(){var e;"function"==typeof ErrorEvent?e=new ErrorEvent("error",{message:Zc}):((e=document.createEvent("Event")).initEvent("error",!1,!1),e.message=Zc),window.dispatchEvent(e)}(),e>0},hu=[],fu=function(e){if(!Gc){var t=0,n=document.createTextNode("");new MutationObserver((function(){return hu.splice(0).forEach((function(e){return e()}))})).observe(n,{characterData:!0}),Gc=function(){n.textContent="".concat(t?t--:t++)}}hu.push(e),Gc()},xu=0,gu={attributes:!0,characterData:!0,childList:!0,subtree:!0},vu=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],mu=function(e){return void 0===e&&(e=0),Date.now()+e},bu=!1,yu=new(function(){function e(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return e.prototype.run=function(e){var t=this;if(void 0===e&&(e=250),!bu){bu=!0;var n,r=mu(e);n=function(){var n=!1;try{n=pu()}finally{if(bu=!1,e=r-mu(),!xu)return;n?t.run(1e3):e>0?t.run(e):t.start()}},fu((function(){requestAnimationFrame(n)}))}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var e=this,t=function(){return e.observer&&e.observer.observe(document.body,gu)};document.body?t():Jc.addEventListener("DOMContentLoaded",t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),vu.forEach((function(t){return Jc.addEventListener(t,e.listener,!0)})))},e.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),vu.forEach((function(t){return Jc.removeEventListener(t,e.listener,!0)})),this.stopped=!0)},e}()),Cu=function(e){!xu&&e>0&&yu.start(),!(xu+=e)&&yu.stop()},wu=function(){function e(e,t){this.target=e,this.observedBox=t||_c.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e=su(this.target,this.observedBox,!0);return function(e){return!Xc(e)&&!function(e){switch(e.tagName){case"INPUT":if("image"!==e.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(e)&&"inline"===getComputedStyle(e).display}(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},e}(),ju=function(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t},ku=new WeakMap,Su=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},$u=function(){function e(){}return e.connect=function(e,t){var n=new ju(e,t);ku.set(e,n)},e.observe=function(e,t,n){var r=ku.get(e),i=0===r.observationTargets.length;Su(r.observationTargets,t)<0&&(i&&Fc.push(r),r.observationTargets.push(new wu(t,n&&n.box)),Cu(1),yu.schedule())},e.unobserve=function(e,t){var n=ku.get(e),r=Su(n.observationTargets,t),i=1===n.observationTargets.length;r>=0&&(i&&Fc.splice(Fc.indexOf(n),1),n.observationTargets.splice(r,1),Cu(-1))},e.disconnect=function(e){var t=this,n=ku.get(e);n.observationTargets.slice().forEach((function(n){return t.unobserve(e,n.target)})),n.activeTargets.splice(0,n.activeTargets.length)},e}(),Eu=function(){function e(e){if(0===arguments.length)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof e)throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");$u.connect(this,e)}return e.prototype.observe=function(e,t){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Kc(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");$u.observe(this,e,t)},e.prototype.unobserve=function(e){if(0===arguments.length)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Kc(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");$u.unobserve(this,e)},e.prototype.disconnect=function(){$u.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();function Ou(){return Ou=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ou.apply(this,arguments)}function Ru(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(i[n]=e[n]);return i}var Lu="undefined"!=typeof window?n.useLayoutEffect:n.useEffect;function Tu(e,t,n){return t=(t=+t)==t?t:0,n=(n=+n)==n?n:0,(e=+e)==e&&(e=(e=e<=n?e:n)>=t?e:t),e}function _u(e){var t=Math.round(e);if(Number.isNaN(e))throw new TypeError("Found a NaN! Check your snapPoints / defaultSnap / snapTo ");return t}var Pu={box:"border-box"};function Mu(e,t){var r=t.label,i=t.enabled,o=t.resizeSourceRef,a=n.useState(0),s=a[0],l=a[1];n.useDebugValue(r+": "+s);var c=n.useCallback((function(e){l(e[0].borderBoxSize[0].blockSize),o.current="element"}),[o]);return Lu((function(){if(e.current&&i){var t=new Eu(c);return t.observe(e.current,Pu),function(){t.disconnect()}}}),[e,c,i]),i?s:0}function Du(e){return void 0===e&&(e=1e3),new Promise((function(t){return setTimeout(t,e)}))}var Iu={DRAG:{target:"#overlay.dragging",actions:"onOpenEnd"}},Nu={RESIZE:{target:"#overlay.resizing",actions:"onOpenEnd"}},Vu=function(e,t,n){return void 0===n&&(n=e.context),new Ha(e,t,n)}({id:"overlay",initial:"closed",context:{initialState:"CLOSED"},states:{closed:{on:{OPEN:"opening",CLOSE:void 0}},opening:{initial:"start",states:{start:{invoke:{src:"onOpenStart",onDone:"transition"}},transition:{always:[{target:"immediately",cond:"initiallyOpen"},{target:"smoothly",cond:"initiallyClosed"}]},immediately:{initial:"open",states:{open:{invoke:{src:"openImmediately",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"#overlay.opening.end"},on:Ou({},Iu,Nu)}}},smoothly:{initial:"visuallyHidden",states:{visuallyHidden:{invoke:{src:"renderVisuallyHidden",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"open"}},open:{invoke:{src:"openSmoothly",onDone:"#overlay.opening.end"},on:Ou({},Iu,Nu)}}},end:{invoke:{src:"onOpenEnd",onDone:"done"},on:{CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:Ou({},{CLOSE:{target:"#overlay.closing",actions:"onOpenCancel"}}),onDone:"open"},open:{on:{DRAG:"#overlay.dragging",SNAP:"snapping",RESIZE:"resizing"}},dragging:{on:{SNAP:"snapping"}},snapping:{initial:"start",states:{start:{invoke:{src:"onSnapStart",onDone:"snappingSmoothly"},entry:[Za({y:function(e,t){return t.payload.y},velocity:function(e,t){return t.payload.velocity},snapSource:function(e,t){var n=t.payload.source;return void 0===n?"custom":n}})]},snappingSmoothly:{invoke:{src:"snapSmoothly",onDone:"end"}},end:{invoke:{src:"onSnapEnd",onDone:"done"},on:{RESIZE:"#overlay.resizing",SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{SNAP:{target:"snapping",actions:"onSnapEnd"},RESIZE:{target:"#overlay.resizing",actions:"onSnapCancel"},DRAG:{target:"#overlay.dragging",actions:"onSnapCancel"},CLOSE:{target:"#overlay.closing",actions:"onSnapCancel"}},onDone:"open"},resizing:{initial:"start",states:{start:{invoke:{src:"onResizeStart",onDone:"resizingSmoothly"}},resizingSmoothly:{invoke:{src:"resizeSmoothly",onDone:"end"}},end:{invoke:{src:"onResizeEnd",onDone:"done"},on:{SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{RESIZE:{target:"resizing",actions:"onResizeEnd"},SNAP:{target:"snapping",actions:"onResizeCancel"},DRAG:{target:"#overlay.dragging",actions:"onResizeCancel"},CLOSE:{target:"#overlay.closing",actions:"onResizeCancel"}},onDone:"open"},closing:{initial:"start",states:{start:{invoke:{src:"onCloseStart",onDone:"deactivating"},on:{OPEN:{target:"#overlay.open",actions:"onCloseCancel"}}},deactivating:{invoke:{src:"deactivate",onDone:"closingSmoothly"}},closingSmoothly:{invoke:{src:"closeSmoothly",onDone:"end"}},end:{invoke:{src:"onCloseEnd",onDone:"done"},on:{OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}}},done:{type:"final"}},on:{CLOSE:void 0,OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}},onDone:"closed"}},on:{CLOSE:"closing"}},{actions:{onOpenCancel:function(e,t){},onSnapCancel:function(e,t){},onResizeCancel:function(e,t){},onCloseCancel:function(e,t){},onOpenEnd:function(e,t){},onSnapEnd:function(e,t){},onRezizeEnd:function(e,t){}},services:{onSnapStart:function(){try{return Promise.resolve(Du()).then((function(){}))}catch(e){return Promise.reject(e)}},onOpenStart:function(){try{return Promise.resolve(Du()).then((function(){}))}catch(e){return Promise.reject(e)}},onCloseStart:function(){try{return Promise.resolve(Du()).then((function(){}))}catch(e){return Promise.reject(e)}},onResizeStart:function(){try{return Promise.resolve(Du()).then((function(){}))}catch(e){return Promise.reject(e)}},onSnapEnd:function(){try{return Promise.resolve(Du()).then((function(){}))}catch(e){return Promise.reject(e)}},onOpenEnd:function(){try{return Promise.resolve(Du()).then((function(){}))}catch(e){return Promise.reject(e)}},onCloseEnd:function(){try{return Promise.resolve(Du()).then((function(){}))}catch(e){return Promise.reject(e)}},onResizeEnd:function(){try{return Promise.resolve(Du()).then((function(){}))}catch(e){return Promise.reject(e)}},renderVisuallyHidden:function(e,t){try{return Promise.resolve(Du()).then((function(){}))}catch(e){return Promise.reject(e)}},activate:function(e,t){try{return Promise.resolve(Du()).then((function(){}))}catch(e){return Promise.reject(e)}},deactivate:function(e,t){try{return Promise.resolve(Du()).then((function(){}))}catch(e){return Promise.reject(e)}},openSmoothly:function(e,t){try{return Promise.resolve(Du()).then((function(){}))}catch(e){return Promise.reject(e)}},openImmediately:function(e,t){try{return Promise.resolve(Du()).then((function(){}))}catch(e){return Promise.reject(e)}},snapSmoothly:function(e,t){try{return Promise.resolve(Du()).then((function(){}))}catch(e){return Promise.reject(e)}},resizeSmoothly:function(e,t){try{return Promise.resolve(Du()).then((function(){}))}catch(e){return Promise.reject(e)}},closeSmoothly:function(e,t){try{return Promise.resolve(Du()).then((function(){}))}catch(e){return Promise.reject(e)}}},guards:{initiallyClosed:function(e){return"CLOSED"===e.initialState},initiallyOpen:function(e){return"OPEN"===e.initialState}}}),zu=["children","sibling","className","footer","header","open","initialState","lastSnapRef","initialFocusRef","onDismiss","maxHeight","defaultSnap","snapPoints","blocking","scrollLocking","style","onSpringStart","onSpringCancel","onSpringEnd","reserveScrollBarGap","expandOnContentDrag"],Au=["velocity"],Bu=["onRest","config"],Hu={tension:170,friction:26},Fu=Hu.tension,Zu=Hu.friction,Gu=n.forwardRef((function(e,t){var r=e.children,i=e.sibling,o=e.className,a=e.footer,s=e.header,l=e.open,c=e.initialState,u=e.lastSnapRef,d=e.initialFocusRef,p=e.onDismiss,h=e.maxHeight,f=e.defaultSnap,x=void 0===f?Wu:f,g=e.snapPoints,v=void 0===g?Uu:g,m=e.blocking,b=void 0===m||m,y=e.scrollLocking,C=void 0===y||y,w=e.style,j=e.onSpringStart,k=e.onSpringCancel,S=e.onSpringEnd,$=e.reserveScrollBarGap,E=void 0===$?b:$,O=e.expandOnContentDrag,R=void 0!==O&&O,L=Ru(e,zu),T=function(){var e=n.useState(!1),t=e[0],r=e[1],i=n.useState({}),o=i[0],a=i[1],s=n.useCallback((function(e){return a((function(t){var n;return Ou({},t,((n={})[e]=!1,n))})),function(){a((function(t){var n;return Ou({},t,((n={})[e]=!0,n))}))}}),[]);return n.useEffect((function(){var e=Object.values(o);0!==e.length&&e.every(Boolean)&&r(!0)}),[o]),{ready:t,registerReady:s}}(),_=T.ready,P=T.registerReady,M=n.useRef(!1),D=n.useRef(j),I=n.useRef(k),N=n.useRef(S);n.useEffect((function(){D.current=j,I.current=k,N.current=S}),[k,j,S]);var V,z,A=_s((function(){return{y:0,ready:0,maxHeight:0,minSnap:0,maxSnap:0}})),B=A[0],H=A[1],F=n.useRef(null),Z=n.useRef(null),G=n.useRef(null),q=n.useRef(null),W=n.useRef(null),U=n.useRef(null),X=n.useRef(0),Y=n.useRef(),K=n.useRef(!1),J=(V=n.useMemo((function(){return"undefined"!=typeof window?window.matchMedia("(prefers-reduced-motion: reduce)"):null}),[]),z=n.useRef(null==V?void 0:V.matches),n.useDebugValue(z.current?"reduce":"no-preference"),n.useEffect((function(){var e=function(e){z.current=e.matches};return null==V||V.addListener(e),function(){return null==V?void 0:V.removeListener(e)}}),[V]),z),Q=function(e){var t=e.targetRef,r=e.enabled,i=e.reserveScrollBarGap,o=n.useRef({activate:function(){throw new TypeError("Tried to activate scroll lock too early")},deactivate:function(){}});return n.useDebugValue(r?"Enabled":"Disabled"),n.useEffect((function(){if(!r)return o.current.deactivate(),void(o.current={activate:function(){},deactivate:function(){}});var e=t.current,n=!1;o.current={activate:function(){n||(n=!0,Bc(e,{allowTouchMove:function(e){return e.closest("[data-body-scroll-lock-ignore]")},reserveScrollBarGap:i}))},deactivate:function(){n&&(n=!1,Hc(e))}}}),[r,t,i]),o}({targetRef:Z,enabled:_&&C,reserveScrollBarGap:E}),ee=function(e){var t=e.targetRef,r=e.enabled,i=n.useRef({activate:function(){throw new TypeError("Tried to activate aria hider too early")},deactivate:function(){}});return n.useDebugValue(r?"Enabled":"Disabled"),n.useEffect((function(){if(!r)return i.current.deactivate(),void(i.current={activate:function(){},deactivate:function(){}});var e=t.current,n=!1,o=[],a=[];i.current={activate:function(){if(!n){n=!0;var t=e.parentNode;document.querySelectorAll("body > *").forEach((function(e){if(e!==t){var n=e.getAttribute("aria-hidden");null!==n&&"false"!==n||(o.push(n),a.push(e),e.setAttribute("aria-hidden","true"))}}))}},deactivate:function(){n&&(n=!1,a.forEach((function(e,t){var n=o[t];null===n?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",n)})),o=[],a=[])}}}),[t,r]),i}({targetRef:F,enabled:_&&b}),te=function(e){var t=e.targetRef,r=e.fallbackRef,i=e.initialFocusRef,o=e.enabled,a=n.useRef({activate:function(){throw new TypeError("Tried to activate focus trap too early")},deactivate:function(){}});return n.useDebugValue(o?"Enabled":"Disabled"),n.useEffect((function(){if(!o)return a.current.deactivate(),void(a.current={activate:function(){},deactivate:function(){}});var e=r.current,n=Rc(t.current,{onActivate:void 0,initialFocus:i?function(){return(null==i?void 0:i.current)||e}:void 0,fallbackFocus:e,escapeDeactivates:!1,clickOutsideDeactivates:!1}),s=!1;a.current={activate:function(){try{return s?Promise.resolve():(s=!0,Promise.resolve(n.activate()).then((function(){return Promise.resolve(new Promise((function(e){return setTimeout((function(){return e(void 0)}),0)}))).then((function(){}))})))}catch(e){return Promise.reject(e)}},deactivate:function(){s&&(s=!1,n.deactivate())}}}),[o,r,i,t]),a}({targetRef:F,fallbackRef:U,initialFocusRef:d||void 0,enabled:_&&b&&!1!==d}),ne=function(e){var t=e.getSnapPoints,r=e.heightRef,i=e.lastSnapRef,o=e.ready,a=function(e){var t=e.contentRef,r=e.controlledMaxHeight,i=e.footerEnabled,o=e.footerRef,a=e.headerEnabled,s=e.headerRef,l=e.registerReady,c=e.resizeSourceRef,u=n.useMemo((function(){return l("contentHeight")}),[l]),d=function(e,t,r){var i=n.useMemo((function(){return t("maxHeight")}),[t]),o=n.useState((function(){return _u(e)||"undefined"!=typeof window?window.innerHeight:0})),a=o[0],s=o[1],l=a>0,c=n.useRef(0);return n.useDebugValue(e?"controlled":"auto"),n.useEffect((function(){l&&i()}),[l,i]),Lu((function(){if(e)return s(_u(e)),void(r.current="maxheightprop");var t=function(){c.current||(c.current=requestAnimationFrame((function(){s(window.innerHeight),r.current="window",c.current=0})))};return window.addEventListener("resize",t),s(window.innerHeight),r.current="window",i(),function(){window.removeEventListener("resize",t),cancelAnimationFrame(c.current)}}),[e,i,r]),a}(r,l,c),p=Mu(s,{label:"headerHeight",enabled:a,resizeSourceRef:c}),h=Mu(t,{label:"contentHeight",enabled:!0,resizeSourceRef:c}),f=Mu(o,{label:"footerHeight",enabled:i,resizeSourceRef:c}),x=Math.min(d-p-f,h)+p+f;n.useDebugValue("minHeight: "+x);var g=h>0;return n.useEffect((function(){g&&u()}),[g,u]),{maxHeight:d,minHeight:x,headerHeight:p,footerHeight:f}}({contentRef:e.contentRef,controlledMaxHeight:e.controlledMaxHeight,footerEnabled:e.footerEnabled,footerRef:e.footerRef,headerEnabled:e.headerEnabled,headerRef:e.headerRef,registerReady:e.registerReady,resizeSourceRef:e.resizeSourceRef}),s=a.maxHeight,l=a.minHeight,c=a.headerHeight,u=a.footerHeight,d=function(e,t){var n=[].concat(e).map(_u).reduce((function(e,n){return e.add(Tu(n,0,t)),e}),new Set),r=Array.from(n),i=Math.min.apply(Math,r);if(Number.isNaN(i))throw new TypeError("minSnap is NaN");var o=Math.max.apply(Math,r);if(Number.isNaN(o))throw new TypeError("maxSnap is NaN");return{snapPoints:r,minSnap:i,maxSnap:o}}(o?t({height:r.current,footerHeight:u,headerHeight:c,minHeight:l,maxHeight:s}):[0],s),p=d.snapPoints,h=d.minSnap,f=d.maxSnap;return n.useDebugValue("minSnap: "+h+", maxSnap:"+f),{minSnap:h,maxSnap:f,findSnap:function(e){var t=_u("function"==typeof e?e({footerHeight:u,headerHeight:c,height:r.current,minHeight:l,maxHeight:s,snapPoints:p,lastSnap:i.current}):e);return p.reduce((function(e,n){return Math.abs(n-t)<Math.abs(e-t)?n:e}),h)},maxHeight:s}}({contentRef:G,controlledMaxHeight:h,footerEnabled:!!a,footerRef:W,getSnapPoints:v,headerEnabled:!1!==s,headerRef:q,heightRef:X,lastSnapRef:u,ready:_,registerReady:P,resizeSourceRef:Y}),re=ne.minSnap,ie=ne.maxSnap,oe=ne.maxHeight,ae=ne.findSnap,se=n.useRef(oe),le=n.useRef(re),ce=n.useRef(ie),ue=n.useRef(ae),de=n.useRef(0);Lu((function(){se.current=oe,ce.current=ie,le.current=re,ue.current=ae,de.current=ae(x)}),[ae,x,oe,ie,re]);var pe=n.useCallback((function(e){var t=e.onRest,n=e.config,r=(n=void 0===n?{}:n).velocity,i=void 0===r?1:r,o=Ru(n,Au),a=Ru(e,Bu);return new Promise((function(e){return H(Ou({},a,{config:Ou({velocity:i},o,{mass:1,tension:Fu,friction:Math.max(Zu,Zu+(Zu-Zu*i))}),onRest:function(){var n=[].slice.call(arguments);e.apply(void 0,n),null==t||t.apply(void 0,n)}}))}))}),[H]),he=rs(Vu,{devTools:!1,actions:{onOpenCancel:n.useCallback((function(){return null==I.current?void 0:I.current({type:"OPEN"})}),[]),onSnapCancel:n.useCallback((function(e){return null==I.current?void 0:I.current({type:"SNAP",source:e.snapSource})}),[]),onCloseCancel:n.useCallback((function(){return null==I.current?void 0:I.current({type:"CLOSE"})}),[]),onResizeCancel:n.useCallback((function(){return null==I.current?void 0:I.current({type:"RESIZE",source:Y.current})}),[]),onOpenEnd:n.useCallback((function(){return null==N.current?void 0:N.current({type:"OPEN"})}),[]),onSnapEnd:n.useCallback((function(e,t){return null==N.current?void 0:N.current({type:"SNAP",source:e.snapSource})}),[]),onResizeEnd:n.useCallback((function(){return null==N.current?void 0:N.current({type:"RESIZE",source:Y.current})}),[])},context:{initialState:c},services:{onSnapStart:n.useCallback((function(e,t){try{return Promise.resolve(null==D.current?void 0:D.current({type:"SNAP",source:t.payload.source||"custom"}))}catch(e){return Promise.reject(e)}}),[]),onOpenStart:n.useCallback((function(){try{return Promise.resolve(null==D.current?void 0:D.current({type:"OPEN"}))}catch(e){return Promise.reject(e)}}),[]),onCloseStart:n.useCallback((function(){try{return Promise.resolve(null==D.current?void 0:D.current({type:"CLOSE"}))}catch(e){return Promise.reject(e)}}),[]),onResizeStart:n.useCallback((function(){try{return Promise.resolve(null==D.current?void 0:D.current({type:"RESIZE",source:Y.current}))}catch(e){return Promise.reject(e)}}),[]),onSnapEnd:n.useCallback((function(e,t){try{return Promise.resolve(null==N.current?void 0:N.current({type:"SNAP",source:e.snapSource}))}catch(e){return Promise.reject(e)}}),[]),onOpenEnd:n.useCallback((function(){try{return Promise.resolve(null==N.current?void 0:N.current({type:"OPEN"}))}catch(e){return Promise.reject(e)}}),[]),onCloseEnd:n.useCallback((function(){try{return Promise.resolve(null==N.current?void 0:N.current({type:"CLOSE"}))}catch(e){return Promise.reject(e)}}),[]),onResizeEnd:n.useCallback((function(){try{return Promise.resolve(null==N.current?void 0:N.current({type:"RESIZE",source:Y.current}))}catch(e){return Promise.reject(e)}}),[]),renderVisuallyHidden:n.useCallback((function(e,t){try{return Promise.resolve(pe({y:de.current,ready:0,maxHeight:se.current,maxSnap:ce.current,minSnap:de.current,immediate:!0})).then((function(){}))}catch(e){return Promise.reject(e)}}),[pe]),activate:n.useCallback((function(e,t){try{return M.current=!0,Promise.resolve(Promise.all([Q.current.activate(),te.current.activate(),ee.current.activate()])).then((function(){}))}catch(e){return Promise.reject(e)}}),[ee,te,Q]),deactivate:n.useCallback((function(){try{return Q.current.deactivate(),te.current.deactivate(),ee.current.deactivate(),M.current=!1,Promise.resolve()}catch(e){return Promise.reject(e)}}),[ee,te,Q]),openImmediately:n.useCallback((function(){try{return X.current=de.current,Promise.resolve(pe({y:de.current,ready:1,maxHeight:se.current,maxSnap:ce.current,minSnap:de.current,immediate:!0})).then((function(){}))}catch(e){return Promise.reject(e)}}),[pe]),openSmoothly:n.useCallback((function(){try{return Promise.resolve(pe({y:0,ready:1,maxHeight:se.current,maxSnap:ce.current,minSnap:de.current,immediate:!0})).then((function(){return X.current=de.current,Promise.resolve(pe({y:de.current,ready:1,maxHeight:se.current,maxSnap:ce.current,minSnap:de.current,immediate:J.current})).then((function(){}))}))}catch(e){return Promise.reject(e)}}),[pe,J]),snapSmoothly:n.useCallback((function(e,t){try{var n=ue.current(e.y);return X.current=n,u.current=n,Promise.resolve(pe({y:n,ready:1,maxHeight:se.current,maxSnap:ce.current,minSnap:le.current,immediate:J.current,config:{velocity:e.velocity}})).then((function(){}))}catch(e){return Promise.reject(e)}}),[pe,u,J]),resizeSmoothly:n.useCallback((function(){try{var e=ue.current(X.current);return X.current=e,u.current=e,Promise.resolve(pe({y:e,ready:1,maxHeight:se.current,maxSnap:ce.current,minSnap:le.current,immediate:"element"!==Y.current||J.current})).then((function(){}))}catch(e){return Promise.reject(e)}}),[pe,u,J]),closeSmoothly:n.useCallback((function(e,t){try{return pe({minSnap:X.current,immediate:!0}),X.current=0,Promise.resolve(pe({y:0,maxHeight:se.current,maxSnap:ce.current,immediate:J.current})).then((function(){return Promise.resolve(pe({ready:0,immediate:!0})).then((function(){}))}))}catch(e){return Promise.reject(e)}}),[pe,J])}}),fe=he[0],xe=he[1];n.useEffect((function(){_&&xe(l?"OPEN":"CLOSE")}),[l,xe,_]),Lu((function(){(oe||ie||re)&&xe("RESIZE")}),[oe,ie,re,xe]),n.useEffect((function(){return function(){Q.current.deactivate(),te.current.deactivate(),ee.current.deactivate()}}),[ee,te,Q]),n.useImperativeHandle(t,(function(){return{snapTo:function(e,t){var n=void 0===t?{}:t,r=n.velocity,i=void 0===r?1:r,o=n.source,a=void 0===o?"custom":o;xe("SNAP",{payload:{y:ue.current(e),velocity:i,source:a}})},get height(){return X.current}}}),[xe]),n.useEffect((function(){var e=Z.current,t=function(e){K.current&&e.preventDefault()},n=function(t){e.scrollTop<0&&(requestAnimationFrame((function(){e.style.overflow="hidden",e.scrollTop=0,e.style.removeProperty("overflow")})),t.preventDefault())};return R&&(e.addEventListener("scroll",t),e.addEventListener("touchmove",t),e.addEventListener("touchstart",n)),function(){e.removeEventListener("scroll",t),e.removeEventListener("touchmove",t),e.removeEventListener("touchstart",n)}}),[R,Z]);var ge=Ql((function(e){var t=e.args,n=(t=void 0===t?[]:t)[0],r=(n=void 0===n?{}:n).closeOnTap,i=void 0!==r&&r,o=n.isContentDragging,a=void 0!==o&&o,s=e.cancel,l=e.direction[1],c=e.down,u=e.first,d=e.last,h=e.memo,f=void 0===h?B.y.getValue():h,x=e.tap,g=e.velocity,v=-1*e.movement[1];if(!M.current)return s(),f;if(p&&i&&x)return s(),setTimeout((function(){return p()}),0),f;if(x)return f;var m=f+v,b=v*g,y=Math.max(le.current,Math.min(ce.current,m+2*b));if(!c&&p&&l>0&&m+b<le.current/2)return s(),p(),f;var C=c?p||le.current!==ce.current?fl(m,p?0:le.current,ce.current,.55):m<le.current?fl(m,le.current,2*ce.current,.55):fl(m,le.current/2,ce.current,.55):y;return R&&a?(C>=ce.current&&(C=ce.current),f===ce.current&&Z.current.scrollTop>0&&(C=ce.current),K.current=C<ce.current):K.current=!1,u&&xe("DRAG"),d?(xe("SNAP",{payload:{y:C,velocity:g>.05?g:1,source:"dragging"}}),f):(H({y:C,ready:1,maxHeight:se.current,maxSnap:ce.current,minSnap:le.current,immediate:!0,config:{velocity:g}}),f)}),{filterTaps:!0});if(Number.isNaN(ce.current))throw new TypeError("maxSnapRef is NaN!!");if(Number.isNaN(le.current))throw new TypeError("minSnapRef is NaN!!");var ve=function(e){var t,n=e.spring,r=$s([n.y,n.maxHeight],(function(e,t){return Math.round(Tu(t-e,0,16))+"px"})),i=$s([n.y,n.minSnap,n.maxSnap],(function(e,t,n){return Tu(e,t,n)+"px"})),o=$s([n.y,n.minSnap,n.maxSnap],(function(e,t,n){return e<t?t-e+"px":e>n?n-e+"px":"0px"})),a=$s([n.y,n.maxSnap],(function(e,t){return e>=t?Math.ceil(e-t):0})),s=$s([n.y,n.minSnap],(function(e,t){if(!t)return 0;var n=Math.max(t/2-45,0);return Tu((e-n)*(1/(Math.min(t/2+45,t)-n)+0),0,1)})),l=$s([n.y,n.minSnap],(function(e,t){return t?Tu(e/t,0,1):0}));return(t={})["--rsbs-content-opacity"]=s,t["--rsbs-backdrop-opacity"]=l,t["--rsbs-antigap-scale-y"]=a,t["--rsbs-overlay-translate-y"]=o,t["--rsbs-overlay-rounded"]=r,t["--rsbs-overlay-h"]=i,t}({spring:B});return n.createElement(ll.div,Ou({},L,{"data-rsbs-root":!0,"data-rsbs-state":qu.find(fe.matches),"data-rsbs-is-blocking":b,"data-rsbs-is-dismissable":!!p,"data-rsbs-has-header":!!s,"data-rsbs-has-footer":!!a,className:o,ref:F,style:Ou({},ve,w,{opacity:B.ready})}),i,b&&n.createElement("div",Ou({key:"backdrop","data-rsbs-backdrop":!0},ge({closeOnTap:!0}))),n.createElement("div",{key:"overlay","aria-modal":"true",role:"dialog","data-rsbs-overlay":!0,tabIndex:-1,ref:U,onKeyDown:function(e){"Escape"===e.key&&(e.stopPropagation(),p&&p())}},!1!==s&&n.createElement("div",Ou({key:"header","data-rsbs-header":!0,ref:q},ge()),s),n.createElement("div",Ou({key:"scroll","data-rsbs-scroll":!0,ref:Z},R?ge({isContentDragging:!0}):{}),n.createElement("div",{"data-rsbs-content":!0,ref:G},r)),a&&n.createElement("div",Ou({key:"footer",ref:W,"data-rsbs-footer":!0},ge()),a)))})),qu=["closed","opening","open","closing","dragging","snapping","resizing"];function Wu(e){var t=e.lastSnap;return null!=t?t:Math.min.apply(Math,e.snapPoints)}function Uu(e){return e.minHeight}var Xu=["onSpringStart","onSpringEnd","skipInitialTransition"],Yu=n.forwardRef((function(e,t){var r=e.onSpringStart,i=e.onSpringEnd,o=e.skipInitialTransition,a=Ru(e,Xu),s=n.useState(!1),l=s[0],c=s[1],u=n.useRef(),d=n.useRef(null),p=n.useRef(o&&a.open?"OPEN":"CLOSED");Lu((function(){if(a.open)return cancelAnimationFrame(u.current),c(!0),function(){p.current="CLOSED"}}),[a.open]);var h=n.useCallback((function(e){return Promise.resolve(null==r?void 0:r(e)).then((function(){"OPEN"===e.type&&cancelAnimationFrame(u.current)}))}),[r]),f=n.useCallback((function(e){return Promise.resolve(null==i?void 0:i(e)).then((function(){"CLOSE"===e.type&&(u.current=requestAnimationFrame((function(){return c(!1)})))}))}),[i]);return l?n.createElement(Gi,{"data-rsbs-portal":!0},n.createElement(Gu,Ou({},a,{lastSnapRef:d,ref:t,initialState:p.current,onSpringStart:h,onSpringEnd:f}))):null}));const Ku=(e,t)=>r.css`
2256
+ function wc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function jc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wc(Object(n),!0).forEach((function(t){kc(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function kc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Sc,$c=(Sc=[],{activateTrap:function(e){if(Sc.length>0){var t=Sc[Sc.length-1];t!==e&&t.pause()}var n=Sc.indexOf(e);-1===n||Sc.splice(n,1),Sc.push(e)},deactivateTrap:function(e){var t=Sc.indexOf(e);-1!==t&&Sc.splice(t,1),Sc.length>0&&Sc[Sc.length-1].unpause()}}),Ec=function(e){return setTimeout(e,0)},Oc=function(e,t){var n=-1;return e.every((function(e,r){return!t(e)||(n=r,!1)})),n},Rc=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return"function"==typeof e?e.apply(void 0,n):e},Lc=function(e){return e.target.shadowRoot&&"function"==typeof e.composedPath?e.composedPath()[0]:e.target},Tc=function(e,t){var n,r=(null==t?void 0:t.document)||document,i=jc({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},t),o={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},a=function(e,t,n){return e&&void 0!==e[t]?e[t]:i[n||t]},s=function(e){return o.containerGroups.findIndex((function(t){var n=t.container,r=t.tabbableNodes;return n.contains(e)||r.find((function(t){return t===e}))}))},l=function(e){var t=i[e];if("function"==typeof t){for(var n=arguments.length,o=new Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];t=t.apply(void 0,o)}if(!0===t&&(t=void 0),!t){if(void 0===t||!1===t)return t;throw new Error("`".concat(e,"` was specified but was not a node, or did not return a node"))}var s=t;if("string"==typeof t&&!(s=r.querySelector(t)))throw new Error("`".concat(e,"` as selector refers to no known node"));return s},c=function(){var e=l("initialFocus");if(!1===e)return!1;if(void 0===e)if(s(r.activeElement)>=0)e=r.activeElement;else{var t=o.tabbableGroups[0];e=t&&t.firstTabbableNode||l("fallbackFocus")}if(!e)throw new Error("Your focus-trap needs to have at least one focusable element");return e},u=function(){if(o.containerGroups=o.containers.map((function(e){var t,n,r=mc(e,i.tabbableOptions),o=(t=e,(n=(n=i.tabbableOptions)||{}).getShadowRoot?lc([t],n.includeContainer,{filter:fc.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):sc(t,n.includeContainer,fc.bind(null,n)));return{container:e,tabbableNodes:r,focusableNodes:o,firstTabbableNode:r.length>0?r[0]:null,lastTabbableNode:r.length>0?r[r.length-1]:null,nextTabbableNode:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=o.findIndex((function(t){return t===e}));if(!(n<0))return t?o.slice(n+1).find((function(e){return bc(e,i.tabbableOptions)})):o.slice(0,n).reverse().find((function(e){return bc(e,i.tabbableOptions)}))}}})),o.tabbableGroups=o.containerGroups.filter((function(e){return e.tabbableNodes.length>0})),o.tabbableGroups.length<=0&&!l("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},d=function e(t){!1!==t&&t!==r.activeElement&&(t&&t.focus?(t.focus({preventScroll:!!i.preventScroll}),o.mostRecentlyFocusedNode=t,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(t)&&t.select()):e(c()))},p=function(e){var t=l("setReturnFocus",e);return t||!1!==t&&e},h=function(e){var t=Lc(e);s(t)>=0||(Rc(i.clickOutsideDeactivates,e)?n.deactivate({returnFocus:i.returnFocusOnDeactivate&&!Cc(t,i.tabbableOptions)}):Rc(i.allowOutsideClick,e)||e.preventDefault())},f=function(e){var t=Lc(e),n=s(t)>=0;n||t instanceof Document?n&&(o.mostRecentlyFocusedNode=t):(e.stopImmediatePropagation(),d(o.mostRecentlyFocusedNode||c()))},x=function(e){if(function(e){return"Escape"===e.key||"Esc"===e.key||27===e.keyCode}(e)&&!1!==Rc(i.escapeDeactivates,e))return e.preventDefault(),void n.deactivate();(function(e){return"Tab"===e.key||9===e.keyCode})(e)&&function(e){var t=Lc(e);u();var n=null;if(o.tabbableGroups.length>0){var r=s(t),a=r>=0?o.containerGroups[r]:void 0;if(r<0)n=e.shiftKey?o.tabbableGroups[o.tabbableGroups.length-1].lastTabbableNode:o.tabbableGroups[0].firstTabbableNode;else if(e.shiftKey){var c=Oc(o.tabbableGroups,(function(e){var n=e.firstTabbableNode;return t===n}));if(c<0&&(a.container===t||Cc(t,i.tabbableOptions)&&!bc(t,i.tabbableOptions)&&!a.nextTabbableNode(t,!1))&&(c=r),c>=0){var p=0===c?o.tabbableGroups.length-1:c-1;n=o.tabbableGroups[p].lastTabbableNode}}else{var h=Oc(o.tabbableGroups,(function(e){var n=e.lastTabbableNode;return t===n}));if(h<0&&(a.container===t||Cc(t,i.tabbableOptions)&&!bc(t,i.tabbableOptions)&&!a.nextTabbableNode(t))&&(h=r),h>=0){var f=h===o.tabbableGroups.length-1?0:h+1;n=o.tabbableGroups[f].firstTabbableNode}}}else n=l("fallbackFocus");n&&(e.preventDefault(),d(n))}(e)},g=function(e){var t=Lc(e);s(t)>=0||Rc(i.clickOutsideDeactivates,e)||Rc(i.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},v=function(){if(o.active)return $c.activateTrap(n),o.delayInitialFocusTimer=i.delayInitialFocus?Ec((function(){d(c())})):d(c()),r.addEventListener("focusin",f,!0),r.addEventListener("mousedown",h,{capture:!0,passive:!1}),r.addEventListener("touchstart",h,{capture:!0,passive:!1}),r.addEventListener("click",g,{capture:!0,passive:!1}),r.addEventListener("keydown",x,{capture:!0,passive:!1}),n},m=function(){if(o.active)return r.removeEventListener("focusin",f,!0),r.removeEventListener("mousedown",h,!0),r.removeEventListener("touchstart",h,!0),r.removeEventListener("click",g,!0),r.removeEventListener("keydown",x,!0),n};return(n={get active(){return o.active},get paused(){return o.paused},activate:function(e){if(o.active)return this;var t=a(e,"onActivate"),n=a(e,"onPostActivate"),i=a(e,"checkCanFocusTrap");i||u(),o.active=!0,o.paused=!1,o.nodeFocusedBeforeActivation=r.activeElement,t&&t();var s=function(){i&&u(),v(),n&&n()};return i?(i(o.containers.concat()).then(s,s),this):(s(),this)},deactivate:function(e){if(!o.active)return this;var t=jc({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},e);clearTimeout(o.delayInitialFocusTimer),o.delayInitialFocusTimer=void 0,m(),o.active=!1,o.paused=!1,$c.deactivateTrap(n);var r=a(t,"onDeactivate"),s=a(t,"onPostDeactivate"),l=a(t,"checkCanReturnFocus"),c=a(t,"returnFocus","returnFocusOnDeactivate");r&&r();var u=function(){Ec((function(){c&&d(p(o.nodeFocusedBeforeActivation)),s&&s()}))};return c&&l?(l(p(o.nodeFocusedBeforeActivation)).then(u,u),this):(u(),this)},pause:function(){return o.paused||!o.active||(o.paused=!0,m()),this},unpause:function(){return o.paused&&o.active?(o.paused=!1,u(),v(),this):this},updateContainerElements:function(e){var t=[].concat(e).filter(Boolean);return o.containers=t.map((function(e){return"string"==typeof e?r.querySelector(e):e})),o.active&&u(),this}}).updateContainerElements(e),n};var _c=!1;if("undefined"!=typeof window){var Pc={get passive(){_c=!0}};window.addEventListener("testPassive",null,Pc),window.removeEventListener("testPassive",null,Pc)}var Mc,Dc="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1),Ic=[],Nc=!1,Vc=-1,zc=void 0,Ac=void 0,Bc=function(e){return Ic.some((function(t){return!(!t.options.allowTouchMove||!t.options.allowTouchMove(e))}))},Hc=function(e){var t=e||window.event;return!!Bc(t.target)||(t.touches.length>1||(t.preventDefault&&t.preventDefault(),!1))},Fc=function(e,t){if(e){if(!Ic.some((function(t){return t.targetElement===e}))){var n={targetElement:e,options:t||{}};Ic=[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(Ic),[n]),Dc?(e.ontouchstart=function(e){1===e.targetTouches.length&&(Vc=e.targetTouches[0].clientY)},e.ontouchmove=function(t){1===t.targetTouches.length&&function(e,t){var n=e.targetTouches[0].clientY-Vc;!Bc(e.target)&&(t&&0===t.scrollTop&&n>0||function(e){return!!e&&e.scrollHeight-e.scrollTop<=e.clientHeight}(t)&&n<0?Hc(e):e.stopPropagation())}(t,e)},Nc||(document.addEventListener("touchmove",Hc,_c?{passive:!1}:void 0),Nc=!0)):function(e){if(void 0===Ac){var t=!!e&&!0===e.reserveScrollBarGap,n=window.innerWidth-document.documentElement.clientWidth;t&&n>0&&(Ac=document.body.style.paddingRight,document.body.style.paddingRight=n+"px")}void 0===zc&&(zc=document.body.style.overflow,document.body.style.overflow="hidden")}(t)}}else console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.")},Zc=function(e){e?(Ic=Ic.filter((function(t){return t.targetElement!==e})),Dc?(e.ontouchstart=null,e.ontouchmove=null,Nc&&0===Ic.length&&(document.removeEventListener("touchmove",Hc,_c?{passive:!1}:void 0),Nc=!1)):Ic.length||(void 0!==Ac&&(document.body.style.paddingRight=Ac,Ac=void 0),void 0!==zc&&(document.body.style.overflow=zc,zc=void 0))):console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.")},Gc=[],qc="ResizeObserver loop completed with undelivered notifications.";!function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(Mc||(Mc={}));var Wc,Uc=function(e){return Object.freeze(e)},Xc=function(e,t){this.inlineSize=e,this.blockSize=t,Uc(this)},Yc=function(){function e(e,t,n,r){return this.x=e,this.y=t,this.width=n,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Uc(this)}return e.prototype.toJSON=function(){var e=this;return{x:e.x,y:e.y,top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),Kc=function(e){return e instanceof SVGElement&&"getBBox"in e},Jc=function(e){if(Kc(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var i=e,o=i.offsetWidth,a=i.offsetHeight;return!(o||a||e.getClientRects().length)},Qc=function(e){var t;if(e instanceof Element)return!0;var n=null===(t=null==e?void 0:e.ownerDocument)||void 0===t?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},eu="undefined"!=typeof window?window:{},tu=new WeakMap,nu=/auto|scroll/,ru=/^tb|vertical/,iu=/msie|trident/i.test(eu.navigator&&eu.navigator.userAgent),ou=function(e){return parseFloat(e||"0")},au=function(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=!1),new Xc((n?t:e)||0,(n?e:t)||0)},su=Uc({devicePixelContentBoxSize:au(),borderBoxSize:au(),contentBoxSize:au(),contentRect:new Yc(0,0,0,0)}),lu=function(e,t){if(void 0===t&&(t=!1),tu.has(e)&&!t)return tu.get(e);if(Jc(e))return tu.set(e,su),su;var n=getComputedStyle(e),r=Kc(e)&&e.ownerSVGElement&&e.getBBox(),i=!iu&&"border-box"===n.boxSizing,o=ru.test(n.writingMode||""),a=!r&&nu.test(n.overflowY||""),s=!r&&nu.test(n.overflowX||""),l=r?0:ou(n.paddingTop),c=r?0:ou(n.paddingRight),u=r?0:ou(n.paddingBottom),d=r?0:ou(n.paddingLeft),p=r?0:ou(n.borderTopWidth),h=r?0:ou(n.borderRightWidth),f=r?0:ou(n.borderBottomWidth),x=d+c,g=l+u,v=(r?0:ou(n.borderLeftWidth))+h,m=p+f,b=s?e.offsetHeight-m-e.clientHeight:0,y=a?e.offsetWidth-v-e.clientWidth:0,C=i?x+v:0,w=i?g+m:0,j=r?r.width:ou(n.width)-C-y,k=r?r.height:ou(n.height)-w-b,S=j+x+y+v,$=k+g+b+m,E=Uc({devicePixelContentBoxSize:au(Math.round(j*devicePixelRatio),Math.round(k*devicePixelRatio),o),borderBoxSize:au(S,$,o),contentBoxSize:au(j,k,o),contentRect:new Yc(d,l,j,k)});return tu.set(e,E),E},cu=function(e,t,n){var r=lu(e,n),i=r.borderBoxSize,o=r.contentBoxSize,a=r.devicePixelContentBoxSize;switch(t){case Mc.DEVICE_PIXEL_CONTENT_BOX:return a;case Mc.BORDER_BOX:return i;default:return o}},uu=function(e){var t=lu(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=Uc([t.borderBoxSize]),this.contentBoxSize=Uc([t.contentBoxSize]),this.devicePixelContentBoxSize=Uc([t.devicePixelContentBoxSize])},du=function(e){if(Jc(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},pu=function(){var e=1/0,t=[];Gc.forEach((function(n){if(0!==n.activeTargets.length){var r=[];n.activeTargets.forEach((function(t){var n=new uu(t.target),i=du(t.target);r.push(n),t.lastReportedSize=cu(t.target,t.observedBox),i<e&&(e=i)})),t.push((function(){n.callback.call(n.observer,r,n.observer)})),n.activeTargets.splice(0,n.activeTargets.length)}}));for(var n=0,r=t;n<r.length;n++){(0,r[n])()}return e},hu=function(e){Gc.forEach((function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach((function(n){n.isActive()&&(du(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))}))}))},fu=function(){var e=0;for(hu(e);Gc.some((function(e){return e.activeTargets.length>0}));)e=pu(),hu(e);return Gc.some((function(e){return e.skippedTargets.length>0}))&&function(){var e;"function"==typeof ErrorEvent?e=new ErrorEvent("error",{message:qc}):((e=document.createEvent("Event")).initEvent("error",!1,!1),e.message=qc),window.dispatchEvent(e)}(),e>0},xu=[],gu=function(e){if(!Wc){var t=0,n=document.createTextNode("");new MutationObserver((function(){return xu.splice(0).forEach((function(e){return e()}))})).observe(n,{characterData:!0}),Wc=function(){n.textContent="".concat(t?t--:t++)}}xu.push(e),Wc()},vu=0,mu={attributes:!0,characterData:!0,childList:!0,subtree:!0},bu=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],yu=function(e){return void 0===e&&(e=0),Date.now()+e},Cu=!1,wu=new(function(){function e(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return e.prototype.run=function(e){var t=this;if(void 0===e&&(e=250),!Cu){Cu=!0;var n,r=yu(e);n=function(){var n=!1;try{n=fu()}finally{if(Cu=!1,e=r-yu(),!vu)return;n?t.run(1e3):e>0?t.run(e):t.start()}},gu((function(){requestAnimationFrame(n)}))}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var e=this,t=function(){return e.observer&&e.observer.observe(document.body,mu)};document.body?t():eu.addEventListener("DOMContentLoaded",t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),bu.forEach((function(t){return eu.addEventListener(t,e.listener,!0)})))},e.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),bu.forEach((function(t){return eu.removeEventListener(t,e.listener,!0)})),this.stopped=!0)},e}()),ju=function(e){!vu&&e>0&&wu.start(),!(vu+=e)&&wu.stop()},ku=function(){function e(e,t){this.target=e,this.observedBox=t||Mc.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e=cu(this.target,this.observedBox,!0);return function(e){return!Kc(e)&&!function(e){switch(e.tagName){case"INPUT":if("image"!==e.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(e)&&"inline"===getComputedStyle(e).display}(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},e}(),Su=function(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t},$u=new WeakMap,Eu=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},Ou=function(){function e(){}return e.connect=function(e,t){var n=new Su(e,t);$u.set(e,n)},e.observe=function(e,t,n){var r=$u.get(e),i=0===r.observationTargets.length;Eu(r.observationTargets,t)<0&&(i&&Gc.push(r),r.observationTargets.push(new ku(t,n&&n.box)),ju(1),wu.schedule())},e.unobserve=function(e,t){var n=$u.get(e),r=Eu(n.observationTargets,t),i=1===n.observationTargets.length;r>=0&&(i&&Gc.splice(Gc.indexOf(n),1),n.observationTargets.splice(r,1),ju(-1))},e.disconnect=function(e){var t=this,n=$u.get(e);n.observationTargets.slice().forEach((function(n){return t.unobserve(e,n.target)})),n.activeTargets.splice(0,n.activeTargets.length)},e}(),Ru=function(){function e(e){if(0===arguments.length)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof e)throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Ou.connect(this,e)}return e.prototype.observe=function(e,t){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Qc(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Ou.observe(this,e,t)},e.prototype.unobserve=function(e){if(0===arguments.length)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Qc(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Ou.unobserve(this,e)},e.prototype.disconnect=function(){Ou.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();function Lu(){return Lu=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Lu.apply(this,arguments)}function Tu(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(i[n]=e[n]);return i}var _u="undefined"!=typeof window?n.useLayoutEffect:n.useEffect;function Pu(e,t,n){return t=(t=+t)==t?t:0,n=(n=+n)==n?n:0,(e=+e)==e&&(e=(e=e<=n?e:n)>=t?e:t),e}function Mu(e){var t=Math.round(e);if(Number.isNaN(e))throw new TypeError("Found a NaN! Check your snapPoints / defaultSnap / snapTo ");return t}var Du={box:"border-box"};function Iu(e,t){var r=t.label,i=t.enabled,o=t.resizeSourceRef,a=n.useState(0),s=a[0],l=a[1];n.useDebugValue(r+": "+s);var c=n.useCallback((function(e){l(e[0].borderBoxSize[0].blockSize),o.current="element"}),[o]);return _u((function(){if(e.current&&i){var t=new Ru(c);return t.observe(e.current,Du),function(){t.disconnect()}}}),[e,c,i]),i?s:0}function Nu(e){return void 0===e&&(e=1e3),new Promise((function(t){return setTimeout(t,e)}))}var Vu={DRAG:{target:"#overlay.dragging",actions:"onOpenEnd"}},zu={RESIZE:{target:"#overlay.resizing",actions:"onOpenEnd"}},Au=function(e,t,n){return void 0===n&&(n=e.context),new Za(e,t,n)}({id:"overlay",initial:"closed",context:{initialState:"CLOSED"},states:{closed:{on:{OPEN:"opening",CLOSE:void 0}},opening:{initial:"start",states:{start:{invoke:{src:"onOpenStart",onDone:"transition"}},transition:{always:[{target:"immediately",cond:"initiallyOpen"},{target:"smoothly",cond:"initiallyClosed"}]},immediately:{initial:"open",states:{open:{invoke:{src:"openImmediately",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"#overlay.opening.end"},on:Lu({},Vu,zu)}}},smoothly:{initial:"visuallyHidden",states:{visuallyHidden:{invoke:{src:"renderVisuallyHidden",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"open"}},open:{invoke:{src:"openSmoothly",onDone:"#overlay.opening.end"},on:Lu({},Vu,zu)}}},end:{invoke:{src:"onOpenEnd",onDone:"done"},on:{CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:Lu({},{CLOSE:{target:"#overlay.closing",actions:"onOpenCancel"}}),onDone:"open"},open:{on:{DRAG:"#overlay.dragging",SNAP:"snapping",RESIZE:"resizing"}},dragging:{on:{SNAP:"snapping"}},snapping:{initial:"start",states:{start:{invoke:{src:"onSnapStart",onDone:"snappingSmoothly"},entry:[qa({y:function(e,t){return t.payload.y},velocity:function(e,t){return t.payload.velocity},snapSource:function(e,t){var n=t.payload.source;return void 0===n?"custom":n}})]},snappingSmoothly:{invoke:{src:"snapSmoothly",onDone:"end"}},end:{invoke:{src:"onSnapEnd",onDone:"done"},on:{RESIZE:"#overlay.resizing",SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{SNAP:{target:"snapping",actions:"onSnapEnd"},RESIZE:{target:"#overlay.resizing",actions:"onSnapCancel"},DRAG:{target:"#overlay.dragging",actions:"onSnapCancel"},CLOSE:{target:"#overlay.closing",actions:"onSnapCancel"}},onDone:"open"},resizing:{initial:"start",states:{start:{invoke:{src:"onResizeStart",onDone:"resizingSmoothly"}},resizingSmoothly:{invoke:{src:"resizeSmoothly",onDone:"end"}},end:{invoke:{src:"onResizeEnd",onDone:"done"},on:{SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{RESIZE:{target:"resizing",actions:"onResizeEnd"},SNAP:{target:"snapping",actions:"onResizeCancel"},DRAG:{target:"#overlay.dragging",actions:"onResizeCancel"},CLOSE:{target:"#overlay.closing",actions:"onResizeCancel"}},onDone:"open"},closing:{initial:"start",states:{start:{invoke:{src:"onCloseStart",onDone:"deactivating"},on:{OPEN:{target:"#overlay.open",actions:"onCloseCancel"}}},deactivating:{invoke:{src:"deactivate",onDone:"closingSmoothly"}},closingSmoothly:{invoke:{src:"closeSmoothly",onDone:"end"}},end:{invoke:{src:"onCloseEnd",onDone:"done"},on:{OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}}},done:{type:"final"}},on:{CLOSE:void 0,OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}},onDone:"closed"}},on:{CLOSE:"closing"}},{actions:{onOpenCancel:function(e,t){},onSnapCancel:function(e,t){},onResizeCancel:function(e,t){},onCloseCancel:function(e,t){},onOpenEnd:function(e,t){},onSnapEnd:function(e,t){},onRezizeEnd:function(e,t){}},services:{onSnapStart:function(){try{return Promise.resolve(Nu()).then((function(){}))}catch(e){return Promise.reject(e)}},onOpenStart:function(){try{return Promise.resolve(Nu()).then((function(){}))}catch(e){return Promise.reject(e)}},onCloseStart:function(){try{return Promise.resolve(Nu()).then((function(){}))}catch(e){return Promise.reject(e)}},onResizeStart:function(){try{return Promise.resolve(Nu()).then((function(){}))}catch(e){return Promise.reject(e)}},onSnapEnd:function(){try{return Promise.resolve(Nu()).then((function(){}))}catch(e){return Promise.reject(e)}},onOpenEnd:function(){try{return Promise.resolve(Nu()).then((function(){}))}catch(e){return Promise.reject(e)}},onCloseEnd:function(){try{return Promise.resolve(Nu()).then((function(){}))}catch(e){return Promise.reject(e)}},onResizeEnd:function(){try{return Promise.resolve(Nu()).then((function(){}))}catch(e){return Promise.reject(e)}},renderVisuallyHidden:function(e,t){try{return Promise.resolve(Nu()).then((function(){}))}catch(e){return Promise.reject(e)}},activate:function(e,t){try{return Promise.resolve(Nu()).then((function(){}))}catch(e){return Promise.reject(e)}},deactivate:function(e,t){try{return Promise.resolve(Nu()).then((function(){}))}catch(e){return Promise.reject(e)}},openSmoothly:function(e,t){try{return Promise.resolve(Nu()).then((function(){}))}catch(e){return Promise.reject(e)}},openImmediately:function(e,t){try{return Promise.resolve(Nu()).then((function(){}))}catch(e){return Promise.reject(e)}},snapSmoothly:function(e,t){try{return Promise.resolve(Nu()).then((function(){}))}catch(e){return Promise.reject(e)}},resizeSmoothly:function(e,t){try{return Promise.resolve(Nu()).then((function(){}))}catch(e){return Promise.reject(e)}},closeSmoothly:function(e,t){try{return Promise.resolve(Nu()).then((function(){}))}catch(e){return Promise.reject(e)}}},guards:{initiallyClosed:function(e){return"CLOSED"===e.initialState},initiallyOpen:function(e){return"OPEN"===e.initialState}}}),Bu=["children","sibling","className","footer","header","open","initialState","lastSnapRef","initialFocusRef","onDismiss","maxHeight","defaultSnap","snapPoints","blocking","scrollLocking","style","onSpringStart","onSpringCancel","onSpringEnd","reserveScrollBarGap","expandOnContentDrag"],Hu=["velocity"],Fu=["onRest","config"],Zu={tension:170,friction:26},Gu=Zu.tension,qu=Zu.friction,Wu=n.forwardRef((function(e,t){var r=e.children,i=e.sibling,o=e.className,a=e.footer,s=e.header,l=e.open,c=e.initialState,u=e.lastSnapRef,d=e.initialFocusRef,p=e.onDismiss,h=e.maxHeight,f=e.defaultSnap,x=void 0===f?Xu:f,g=e.snapPoints,v=void 0===g?Yu:g,m=e.blocking,b=void 0===m||m,y=e.scrollLocking,C=void 0===y||y,w=e.style,j=e.onSpringStart,k=e.onSpringCancel,S=e.onSpringEnd,$=e.reserveScrollBarGap,E=void 0===$?b:$,O=e.expandOnContentDrag,R=void 0!==O&&O,L=Tu(e,Bu),T=function(){var e=n.useState(!1),t=e[0],r=e[1],i=n.useState({}),o=i[0],a=i[1],s=n.useCallback((function(e){return a((function(t){var n;return Lu({},t,((n={})[e]=!1,n))})),function(){a((function(t){var n;return Lu({},t,((n={})[e]=!0,n))}))}}),[]);return n.useEffect((function(){var e=Object.values(o);0!==e.length&&e.every(Boolean)&&r(!0)}),[o]),{ready:t,registerReady:s}}(),_=T.ready,P=T.registerReady,M=n.useRef(!1),D=n.useRef(j),I=n.useRef(k),N=n.useRef(S);n.useEffect((function(){D.current=j,I.current=k,N.current=S}),[k,j,S]);var V,z,A=Ms((function(){return{y:0,ready:0,maxHeight:0,minSnap:0,maxSnap:0}})),B=A[0],H=A[1],F=n.useRef(null),Z=n.useRef(null),G=n.useRef(null),q=n.useRef(null),W=n.useRef(null),U=n.useRef(null),X=n.useRef(0),Y=n.useRef(),K=n.useRef(!1),J=(V=n.useMemo((function(){return"undefined"!=typeof window?window.matchMedia("(prefers-reduced-motion: reduce)"):null}),[]),z=n.useRef(null==V?void 0:V.matches),n.useDebugValue(z.current?"reduce":"no-preference"),n.useEffect((function(){var e=function(e){z.current=e.matches};return null==V||V.addListener(e),function(){return null==V?void 0:V.removeListener(e)}}),[V]),z),Q=function(e){var t=e.targetRef,r=e.enabled,i=e.reserveScrollBarGap,o=n.useRef({activate:function(){throw new TypeError("Tried to activate scroll lock too early")},deactivate:function(){}});return n.useDebugValue(r?"Enabled":"Disabled"),n.useEffect((function(){if(!r)return o.current.deactivate(),void(o.current={activate:function(){},deactivate:function(){}});var e=t.current,n=!1;o.current={activate:function(){n||(n=!0,Fc(e,{allowTouchMove:function(e){return e.closest("[data-body-scroll-lock-ignore]")},reserveScrollBarGap:i}))},deactivate:function(){n&&(n=!1,Zc(e))}}}),[r,t,i]),o}({targetRef:Z,enabled:_&&C,reserveScrollBarGap:E}),ee=function(e){var t=e.targetRef,r=e.enabled,i=n.useRef({activate:function(){throw new TypeError("Tried to activate aria hider too early")},deactivate:function(){}});return n.useDebugValue(r?"Enabled":"Disabled"),n.useEffect((function(){if(!r)return i.current.deactivate(),void(i.current={activate:function(){},deactivate:function(){}});var e=t.current,n=!1,o=[],a=[];i.current={activate:function(){if(!n){n=!0;var t=e.parentNode;document.querySelectorAll("body > *").forEach((function(e){if(e!==t){var n=e.getAttribute("aria-hidden");null!==n&&"false"!==n||(o.push(n),a.push(e),e.setAttribute("aria-hidden","true"))}}))}},deactivate:function(){n&&(n=!1,a.forEach((function(e,t){var n=o[t];null===n?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",n)})),o=[],a=[])}}}),[t,r]),i}({targetRef:F,enabled:_&&b}),te=function(e){var t=e.targetRef,r=e.fallbackRef,i=e.initialFocusRef,o=e.enabled,a=n.useRef({activate:function(){throw new TypeError("Tried to activate focus trap too early")},deactivate:function(){}});return n.useDebugValue(o?"Enabled":"Disabled"),n.useEffect((function(){if(!o)return a.current.deactivate(),void(a.current={activate:function(){},deactivate:function(){}});var e=r.current,n=Tc(t.current,{onActivate:void 0,initialFocus:i?function(){return(null==i?void 0:i.current)||e}:void 0,fallbackFocus:e,escapeDeactivates:!1,clickOutsideDeactivates:!1}),s=!1;a.current={activate:function(){try{return s?Promise.resolve():(s=!0,Promise.resolve(n.activate()).then((function(){return Promise.resolve(new Promise((function(e){return setTimeout((function(){return e(void 0)}),0)}))).then((function(){}))})))}catch(e){return Promise.reject(e)}},deactivate:function(){s&&(s=!1,n.deactivate())}}}),[o,r,i,t]),a}({targetRef:F,fallbackRef:U,initialFocusRef:d||void 0,enabled:_&&b&&!1!==d}),ne=function(e){var t=e.getSnapPoints,r=e.heightRef,i=e.lastSnapRef,o=e.ready,a=function(e){var t=e.contentRef,r=e.controlledMaxHeight,i=e.footerEnabled,o=e.footerRef,a=e.headerEnabled,s=e.headerRef,l=e.registerReady,c=e.resizeSourceRef,u=n.useMemo((function(){return l("contentHeight")}),[l]),d=function(e,t,r){var i=n.useMemo((function(){return t("maxHeight")}),[t]),o=n.useState((function(){return Mu(e)||"undefined"!=typeof window?window.innerHeight:0})),a=o[0],s=o[1],l=a>0,c=n.useRef(0);return n.useDebugValue(e?"controlled":"auto"),n.useEffect((function(){l&&i()}),[l,i]),_u((function(){if(e)return s(Mu(e)),void(r.current="maxheightprop");var t=function(){c.current||(c.current=requestAnimationFrame((function(){s(window.innerHeight),r.current="window",c.current=0})))};return window.addEventListener("resize",t),s(window.innerHeight),r.current="window",i(),function(){window.removeEventListener("resize",t),cancelAnimationFrame(c.current)}}),[e,i,r]),a}(r,l,c),p=Iu(s,{label:"headerHeight",enabled:a,resizeSourceRef:c}),h=Iu(t,{label:"contentHeight",enabled:!0,resizeSourceRef:c}),f=Iu(o,{label:"footerHeight",enabled:i,resizeSourceRef:c}),x=Math.min(d-p-f,h)+p+f;n.useDebugValue("minHeight: "+x);var g=h>0;return n.useEffect((function(){g&&u()}),[g,u]),{maxHeight:d,minHeight:x,headerHeight:p,footerHeight:f}}({contentRef:e.contentRef,controlledMaxHeight:e.controlledMaxHeight,footerEnabled:e.footerEnabled,footerRef:e.footerRef,headerEnabled:e.headerEnabled,headerRef:e.headerRef,registerReady:e.registerReady,resizeSourceRef:e.resizeSourceRef}),s=a.maxHeight,l=a.minHeight,c=a.headerHeight,u=a.footerHeight,d=function(e,t){var n=[].concat(e).map(Mu).reduce((function(e,n){return e.add(Pu(n,0,t)),e}),new Set),r=Array.from(n),i=Math.min.apply(Math,r);if(Number.isNaN(i))throw new TypeError("minSnap is NaN");var o=Math.max.apply(Math,r);if(Number.isNaN(o))throw new TypeError("maxSnap is NaN");return{snapPoints:r,minSnap:i,maxSnap:o}}(o?t({height:r.current,footerHeight:u,headerHeight:c,minHeight:l,maxHeight:s}):[0],s),p=d.snapPoints,h=d.minSnap,f=d.maxSnap;return n.useDebugValue("minSnap: "+h+", maxSnap:"+f),{minSnap:h,maxSnap:f,findSnap:function(e){var t=Mu("function"==typeof e?e({footerHeight:u,headerHeight:c,height:r.current,minHeight:l,maxHeight:s,snapPoints:p,lastSnap:i.current}):e);return p.reduce((function(e,n){return Math.abs(n-t)<Math.abs(e-t)?n:e}),h)},maxHeight:s}}({contentRef:G,controlledMaxHeight:h,footerEnabled:!!a,footerRef:W,getSnapPoints:v,headerEnabled:!1!==s,headerRef:q,heightRef:X,lastSnapRef:u,ready:_,registerReady:P,resizeSourceRef:Y}),re=ne.minSnap,ie=ne.maxSnap,oe=ne.maxHeight,ae=ne.findSnap,se=n.useRef(oe),le=n.useRef(re),ce=n.useRef(ie),ue=n.useRef(ae),de=n.useRef(0);_u((function(){se.current=oe,ce.current=ie,le.current=re,ue.current=ae,de.current=ae(x)}),[ae,x,oe,ie,re]);var pe=n.useCallback((function(e){var t=e.onRest,n=e.config,r=(n=void 0===n?{}:n).velocity,i=void 0===r?1:r,o=Tu(n,Hu),a=Tu(e,Fu);return new Promise((function(e){return H(Lu({},a,{config:Lu({velocity:i},o,{mass:1,tension:Gu,friction:Math.max(qu,qu+(qu-qu*i))}),onRest:function(){var n=[].slice.call(arguments);e.apply(void 0,n),null==t||t.apply(void 0,n)}}))}))}),[H]),he=os(Au,{devTools:!1,actions:{onOpenCancel:n.useCallback((function(){return null==I.current?void 0:I.current({type:"OPEN"})}),[]),onSnapCancel:n.useCallback((function(e){return null==I.current?void 0:I.current({type:"SNAP",source:e.snapSource})}),[]),onCloseCancel:n.useCallback((function(){return null==I.current?void 0:I.current({type:"CLOSE"})}),[]),onResizeCancel:n.useCallback((function(){return null==I.current?void 0:I.current({type:"RESIZE",source:Y.current})}),[]),onOpenEnd:n.useCallback((function(){return null==N.current?void 0:N.current({type:"OPEN"})}),[]),onSnapEnd:n.useCallback((function(e,t){return null==N.current?void 0:N.current({type:"SNAP",source:e.snapSource})}),[]),onResizeEnd:n.useCallback((function(){return null==N.current?void 0:N.current({type:"RESIZE",source:Y.current})}),[])},context:{initialState:c},services:{onSnapStart:n.useCallback((function(e,t){try{return Promise.resolve(null==D.current?void 0:D.current({type:"SNAP",source:t.payload.source||"custom"}))}catch(e){return Promise.reject(e)}}),[]),onOpenStart:n.useCallback((function(){try{return Promise.resolve(null==D.current?void 0:D.current({type:"OPEN"}))}catch(e){return Promise.reject(e)}}),[]),onCloseStart:n.useCallback((function(){try{return Promise.resolve(null==D.current?void 0:D.current({type:"CLOSE"}))}catch(e){return Promise.reject(e)}}),[]),onResizeStart:n.useCallback((function(){try{return Promise.resolve(null==D.current?void 0:D.current({type:"RESIZE",source:Y.current}))}catch(e){return Promise.reject(e)}}),[]),onSnapEnd:n.useCallback((function(e,t){try{return Promise.resolve(null==N.current?void 0:N.current({type:"SNAP",source:e.snapSource}))}catch(e){return Promise.reject(e)}}),[]),onOpenEnd:n.useCallback((function(){try{return Promise.resolve(null==N.current?void 0:N.current({type:"OPEN"}))}catch(e){return Promise.reject(e)}}),[]),onCloseEnd:n.useCallback((function(){try{return Promise.resolve(null==N.current?void 0:N.current({type:"CLOSE"}))}catch(e){return Promise.reject(e)}}),[]),onResizeEnd:n.useCallback((function(){try{return Promise.resolve(null==N.current?void 0:N.current({type:"RESIZE",source:Y.current}))}catch(e){return Promise.reject(e)}}),[]),renderVisuallyHidden:n.useCallback((function(e,t){try{return Promise.resolve(pe({y:de.current,ready:0,maxHeight:se.current,maxSnap:ce.current,minSnap:de.current,immediate:!0})).then((function(){}))}catch(e){return Promise.reject(e)}}),[pe]),activate:n.useCallback((function(e,t){try{return M.current=!0,Promise.resolve(Promise.all([Q.current.activate(),te.current.activate(),ee.current.activate()])).then((function(){}))}catch(e){return Promise.reject(e)}}),[ee,te,Q]),deactivate:n.useCallback((function(){try{return Q.current.deactivate(),te.current.deactivate(),ee.current.deactivate(),M.current=!1,Promise.resolve()}catch(e){return Promise.reject(e)}}),[ee,te,Q]),openImmediately:n.useCallback((function(){try{return X.current=de.current,Promise.resolve(pe({y:de.current,ready:1,maxHeight:se.current,maxSnap:ce.current,minSnap:de.current,immediate:!0})).then((function(){}))}catch(e){return Promise.reject(e)}}),[pe]),openSmoothly:n.useCallback((function(){try{return Promise.resolve(pe({y:0,ready:1,maxHeight:se.current,maxSnap:ce.current,minSnap:de.current,immediate:!0})).then((function(){return X.current=de.current,Promise.resolve(pe({y:de.current,ready:1,maxHeight:se.current,maxSnap:ce.current,minSnap:de.current,immediate:J.current})).then((function(){}))}))}catch(e){return Promise.reject(e)}}),[pe,J]),snapSmoothly:n.useCallback((function(e,t){try{var n=ue.current(e.y);return X.current=n,u.current=n,Promise.resolve(pe({y:n,ready:1,maxHeight:se.current,maxSnap:ce.current,minSnap:le.current,immediate:J.current,config:{velocity:e.velocity}})).then((function(){}))}catch(e){return Promise.reject(e)}}),[pe,u,J]),resizeSmoothly:n.useCallback((function(){try{var e=ue.current(X.current);return X.current=e,u.current=e,Promise.resolve(pe({y:e,ready:1,maxHeight:se.current,maxSnap:ce.current,minSnap:le.current,immediate:"element"!==Y.current||J.current})).then((function(){}))}catch(e){return Promise.reject(e)}}),[pe,u,J]),closeSmoothly:n.useCallback((function(e,t){try{return pe({minSnap:X.current,immediate:!0}),X.current=0,Promise.resolve(pe({y:0,maxHeight:se.current,maxSnap:ce.current,immediate:J.current})).then((function(){return Promise.resolve(pe({ready:0,immediate:!0})).then((function(){}))}))}catch(e){return Promise.reject(e)}}),[pe,J])}}),fe=he[0],xe=he[1];n.useEffect((function(){_&&xe(l?"OPEN":"CLOSE")}),[l,xe,_]),_u((function(){(oe||ie||re)&&xe("RESIZE")}),[oe,ie,re,xe]),n.useEffect((function(){return function(){Q.current.deactivate(),te.current.deactivate(),ee.current.deactivate()}}),[ee,te,Q]),n.useImperativeHandle(t,(function(){return{snapTo:function(e,t){var n=void 0===t?{}:t,r=n.velocity,i=void 0===r?1:r,o=n.source,a=void 0===o?"custom":o;xe("SNAP",{payload:{y:ue.current(e),velocity:i,source:a}})},get height(){return X.current}}}),[xe]),n.useEffect((function(){var e=Z.current,t=function(e){K.current&&e.preventDefault()},n=function(t){e.scrollTop<0&&(requestAnimationFrame((function(){e.style.overflow="hidden",e.scrollTop=0,e.style.removeProperty("overflow")})),t.preventDefault())};return R&&(e.addEventListener("scroll",t),e.addEventListener("touchmove",t),e.addEventListener("touchstart",n)),function(){e.removeEventListener("scroll",t),e.removeEventListener("touchmove",t),e.removeEventListener("touchstart",n)}}),[R,Z]);var ge=tc((function(e){var t=e.args,n=(t=void 0===t?[]:t)[0],r=(n=void 0===n?{}:n).closeOnTap,i=void 0!==r&&r,o=n.isContentDragging,a=void 0!==o&&o,s=e.cancel,l=e.direction[1],c=e.down,u=e.first,d=e.last,h=e.memo,f=void 0===h?B.y.getValue():h,x=e.tap,g=e.velocity,v=-1*e.movement[1];if(!M.current)return s(),f;if(p&&i&&x)return s(),setTimeout((function(){return p()}),0),f;if(x)return f;var m=f+v,b=v*g,y=Math.max(le.current,Math.min(ce.current,m+2*b));if(!c&&p&&l>0&&m+b<le.current/2)return s(),p(),f;var C=c?p||le.current!==ce.current?gl(m,p?0:le.current,ce.current,.55):m<le.current?gl(m,le.current,2*ce.current,.55):gl(m,le.current/2,ce.current,.55):y;return R&&a?(C>=ce.current&&(C=ce.current),f===ce.current&&Z.current.scrollTop>0&&(C=ce.current),K.current=C<ce.current):K.current=!1,u&&xe("DRAG"),d?(xe("SNAP",{payload:{y:C,velocity:g>.05?g:1,source:"dragging"}}),f):(H({y:C,ready:1,maxHeight:se.current,maxSnap:ce.current,minSnap:le.current,immediate:!0,config:{velocity:g}}),f)}),{filterTaps:!0});if(Number.isNaN(ce.current))throw new TypeError("maxSnapRef is NaN!!");if(Number.isNaN(le.current))throw new TypeError("minSnapRef is NaN!!");var ve=function(e){var t,n=e.spring,r=Os([n.y,n.maxHeight],(function(e,t){return Math.round(Pu(t-e,0,16))+"px"})),i=Os([n.y,n.minSnap,n.maxSnap],(function(e,t,n){return Pu(e,t,n)+"px"})),o=Os([n.y,n.minSnap,n.maxSnap],(function(e,t,n){return e<t?t-e+"px":e>n?n-e+"px":"0px"})),a=Os([n.y,n.maxSnap],(function(e,t){return e>=t?Math.ceil(e-t):0})),s=Os([n.y,n.minSnap],(function(e,t){if(!t)return 0;var n=Math.max(t/2-45,0);return Pu((e-n)*(1/(Math.min(t/2+45,t)-n)+0),0,1)})),l=Os([n.y,n.minSnap],(function(e,t){return t?Pu(e/t,0,1):0}));return(t={})["--rsbs-content-opacity"]=s,t["--rsbs-backdrop-opacity"]=l,t["--rsbs-antigap-scale-y"]=a,t["--rsbs-overlay-translate-y"]=o,t["--rsbs-overlay-rounded"]=r,t["--rsbs-overlay-h"]=i,t}({spring:B});return n.createElement(ul.div,Lu({},L,{"data-rsbs-root":!0,"data-rsbs-state":Uu.find(fe.matches),"data-rsbs-is-blocking":b,"data-rsbs-is-dismissable":!!p,"data-rsbs-has-header":!!s,"data-rsbs-has-footer":!!a,className:o,ref:F,style:Lu({},ve,w,{opacity:B.ready})}),i,b&&n.createElement("div",Lu({key:"backdrop","data-rsbs-backdrop":!0},ge({closeOnTap:!0}))),n.createElement("div",{key:"overlay","aria-modal":"true",role:"dialog","data-rsbs-overlay":!0,tabIndex:-1,ref:U,onKeyDown:function(e){"Escape"===e.key&&(e.stopPropagation(),p&&p())}},!1!==s&&n.createElement("div",Lu({key:"header","data-rsbs-header":!0,ref:q},ge()),s),n.createElement("div",Lu({key:"scroll","data-rsbs-scroll":!0,ref:Z},R?ge({isContentDragging:!0}):{}),n.createElement("div",{"data-rsbs-content":!0,ref:G},r)),a&&n.createElement("div",Lu({key:"footer",ref:W,"data-rsbs-footer":!0},ge()),a)))})),Uu=["closed","opening","open","closing","dragging","snapping","resizing"];function Xu(e){var t=e.lastSnap;return null!=t?t:Math.min.apply(Math,e.snapPoints)}function Yu(e){return e.minHeight}var Ku=["onSpringStart","onSpringEnd","skipInitialTransition"],Ju=n.forwardRef((function(e,t){var r=e.onSpringStart,i=e.onSpringEnd,o=e.skipInitialTransition,a=Tu(e,Ku),s=n.useState(!1),l=s[0],c=s[1],u=n.useRef(),d=n.useRef(null),p=n.useRef(o&&a.open?"OPEN":"CLOSED");_u((function(){if(a.open)return cancelAnimationFrame(u.current),c(!0),function(){p.current="CLOSED"}}),[a.open]);var h=n.useCallback((function(e){return Promise.resolve(null==r?void 0:r(e)).then((function(){"OPEN"===e.type&&cancelAnimationFrame(u.current)}))}),[r]),f=n.useCallback((function(e){return Promise.resolve(null==i?void 0:i(e)).then((function(){"CLOSE"===e.type&&(u.current=requestAnimationFrame((function(){return c(!1)})))}))}),[i]);return l?n.createElement(Wi,{"data-rsbs-portal":!0},n.createElement(Wu,Lu({},a,{lastSnapRef:d,ref:t,initialState:p.current,onSpringStart:h,onSpringEnd:f}))):null}));const Qu=(e,t)=>r.css`
2240
2257
  [data-rsbs-overlay] {
2241
2258
  border-top-left-radius: 16px;
2242
2259
  border-top-right-radius: 16px;
@@ -2265,7 +2282,7 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2265
2282
  padding: 0px;
2266
2283
  min-height: 64px;
2267
2284
  }
2268
- `;!function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}("[data-rsbs-overlay] {\n border-top-left-radius: 16px;\n border-top-left-radius: var(--rsbs-overlay-rounded,16px);\n border-top-right-radius: 16px;\n border-top-right-radius: var(--rsbs-overlay-rounded,16px);\n display: flex;\n background: #fff;\n background: var(--rsbs-bg,#fff);\n flex-direction: column;\n height: 0px;\n height: var(--rsbs-overlay-h,0px);\n transform: translate3d(0, 0px, 0);\n transform: translate3d(0, var(--rsbs-overlay-translate-y,0px), 0);\n will-change: height;\n}\n\n[data-rsbs-overlay]:focus {\n outline: none;\n}\n\n[data-rsbs-is-blocking='false'] [data-rsbs-overlay] {\n box-shadow: 0 -5px 60px 0 rgba(38, 89, 115, 0.11),\n 0 -1px 0 rgba(38, 89, 115, 0.05);\n}\n\n[data-rsbs-overlay],\n[data-rsbs-root]:after {\n max-width: auto;\n max-width: var(--rsbs-max-w,auto);\n margin-left: env(safe-area-inset-left);\n margin-left: var(--rsbs-ml,env(safe-area-inset-left));\n margin-right: env(safe-area-inset-right);\n margin-right: var(--rsbs-mr,env(safe-area-inset-right));\n}\n\n[data-rsbs-overlay],\n[data-rsbs-backdrop],\n[data-rsbs-root]:after {\n z-index: 3;\n -ms-scroll-chaining: none;\n overscroll-behavior: none;\n touch-action: none;\n position: fixed;\n right: 0;\n bottom: 0;\n left: 0;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n -webkit-touch-callout: none;\n}\n\n[data-rsbs-backdrop] {\n top: -60px;\n bottom: -60px;\n background-color: rgba(0, 0, 0, 0.6);\n background-color: var(--rsbs-backdrop-bg,rgba(0, 0, 0, 0.6));\n will-change: opacity;\n cursor: pointer;\n opacity: 1;\n}\n\n[data-rsbs-is-dismissable='false'] [data-rsbs-backdrop] {\n cursor: ns-resize;\n}\n\n[data-rsbs-root]:after {\n content: '';\n pointer-events: none;\n background: #fff;\n background: var(--rsbs-bg,#fff);\n height: 1px;\n transform-origin: bottom;\n transform: scale3d(1, 0, 1);\n transform: scale3d(1, var(--rsbs-antigap-scale-y,0), 1);\n will-change: transform;\n}\n\n[data-rsbs-footer],\n[data-rsbs-header] {\n flex-shrink: 0;\n cursor: ns-resize;\n padding: 16px;\n}\n\n[data-rsbs-header] {\n text-align: center;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n box-shadow: 0 1px 0\n rgba(46, 59, 66, calc(1 * 0.125));\n box-shadow: 0 1px 0\n rgba(46, 59, 66, calc(var(--rsbs-content-opacity,1) * 0.125));\n z-index: 1;\n padding-top: calc(20px + env(safe-area-inset-top));\n padding-bottom: 8px;\n}\n\n[data-rsbs-header]:before {\n position: absolute;\n content: '';\n display: block;\n width: 36px;\n height: 4px;\n top: calc(8px + env(safe-area-inset-top));\n left: 50%;\n transform: translateX(-50%);\n border-radius: 2px;\n background-color: hsla(0, 0%, 0%, 0.14);\n background-color: var(--rsbs-handle-bg,hsla(0, 0%, 0%, 0.14));\n}\n\n@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {\n [data-rsbs-header]:before {\n transform: translateX(-50%) scaleY(0.75);\n }\n}\n\n[data-rsbs-has-header='false'] [data-rsbs-header] {\n box-shadow: none;\n padding-top: calc(12px + env(safe-area-inset-top));\n}\n\n[data-rsbs-scroll] {\n flex-shrink: 1;\n flex-grow: 1;\n -webkit-tap-highlight-color: revert;\n -webkit-touch-callout: revert;\n -webkit-user-select: auto;\n -ms-user-select: auto;\n -moz-user-select: auto;\n user-select: auto;\n overflow: auto;\n -ms-scroll-chaining: none;\n overscroll-behavior: contain;\n -webkit-overflow-scrolling: touch;\n}\n\n[data-rsbs-scroll]:focus {\n outline: none;\n}\n\n[data-rsbs-has-footer='false'] [data-rsbs-content] {\n padding-bottom: env(safe-area-inset-bottom);\n}\n\n[data-rsbs-content] {\n /* The overflow hidden is to ensure any margin on child nodes are included when the resize observer is measuring the height */\n overflow: hidden;\n}\n\n[data-rsbs-footer] {\n box-shadow: 0 -1px 0 rgba(46, 59, 66, calc(1 * 0.125)),\n 0 2px 0 #fff;\n box-shadow: 0 -1px 0 rgba(46, 59, 66, calc(var(--rsbs-content-opacity,1) * 0.125)),\n 0 2px 0 var(--rsbs-bg,#fff);\n overflow: hidden;\n z-index: 1;\n padding-bottom: calc(16px + env(safe-area-inset-bottom));\n}\n\n[data-rsbs-is-dismissable='true'] [data-rsbs-header] > *, [data-rsbs-is-dismissable='true'] [data-rsbs-scroll] > *, [data-rsbs-is-dismissable='true'] [data-rsbs-footer] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-header] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-header] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-scroll] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-scroll] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-footer] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-footer] > * {\n opacity: 1;\n opacity: var(--rsbs-content-opacity,1);\n }\n\n[data-rsbs-is-dismissable='true'] [data-rsbs-backdrop], [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-backdrop], [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-backdrop] {\n opacity: 1;\n opacity: var(--rsbs-backdrop-opacity,1);\n }\n\n[data-rsbs-state='closed'],\n[data-rsbs-state='closing'] {\n /* Allows interactions on the rest of the page before the close transition is finished */\n pointer-events: none;\n}\n");const Ju=r.css`
2285
+ `;!function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}("[data-rsbs-overlay] {\n border-top-left-radius: 16px;\n border-top-left-radius: var(--rsbs-overlay-rounded,16px);\n border-top-right-radius: 16px;\n border-top-right-radius: var(--rsbs-overlay-rounded,16px);\n display: flex;\n background: #fff;\n background: var(--rsbs-bg,#fff);\n flex-direction: column;\n height: 0px;\n height: var(--rsbs-overlay-h,0px);\n transform: translate3d(0, 0px, 0);\n transform: translate3d(0, var(--rsbs-overlay-translate-y,0px), 0);\n will-change: height;\n}\n\n[data-rsbs-overlay]:focus {\n outline: none;\n}\n\n[data-rsbs-is-blocking='false'] [data-rsbs-overlay] {\n box-shadow: 0 -5px 60px 0 rgba(38, 89, 115, 0.11),\n 0 -1px 0 rgba(38, 89, 115, 0.05);\n}\n\n[data-rsbs-overlay],\n[data-rsbs-root]:after {\n max-width: auto;\n max-width: var(--rsbs-max-w,auto);\n margin-left: env(safe-area-inset-left);\n margin-left: var(--rsbs-ml,env(safe-area-inset-left));\n margin-right: env(safe-area-inset-right);\n margin-right: var(--rsbs-mr,env(safe-area-inset-right));\n}\n\n[data-rsbs-overlay],\n[data-rsbs-backdrop],\n[data-rsbs-root]:after {\n z-index: 3;\n -ms-scroll-chaining: none;\n overscroll-behavior: none;\n touch-action: none;\n position: fixed;\n right: 0;\n bottom: 0;\n left: 0;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n -webkit-touch-callout: none;\n}\n\n[data-rsbs-backdrop] {\n top: -60px;\n bottom: -60px;\n background-color: rgba(0, 0, 0, 0.6);\n background-color: var(--rsbs-backdrop-bg,rgba(0, 0, 0, 0.6));\n will-change: opacity;\n cursor: pointer;\n opacity: 1;\n}\n\n[data-rsbs-is-dismissable='false'] [data-rsbs-backdrop] {\n cursor: ns-resize;\n}\n\n[data-rsbs-root]:after {\n content: '';\n pointer-events: none;\n background: #fff;\n background: var(--rsbs-bg,#fff);\n height: 1px;\n transform-origin: bottom;\n transform: scale3d(1, 0, 1);\n transform: scale3d(1, var(--rsbs-antigap-scale-y,0), 1);\n will-change: transform;\n}\n\n[data-rsbs-footer],\n[data-rsbs-header] {\n flex-shrink: 0;\n cursor: ns-resize;\n padding: 16px;\n}\n\n[data-rsbs-header] {\n text-align: center;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n box-shadow: 0 1px 0\n rgba(46, 59, 66, calc(1 * 0.125));\n box-shadow: 0 1px 0\n rgba(46, 59, 66, calc(var(--rsbs-content-opacity,1) * 0.125));\n z-index: 1;\n padding-top: calc(20px + env(safe-area-inset-top));\n padding-bottom: 8px;\n}\n\n[data-rsbs-header]:before {\n position: absolute;\n content: '';\n display: block;\n width: 36px;\n height: 4px;\n top: calc(8px + env(safe-area-inset-top));\n left: 50%;\n transform: translateX(-50%);\n border-radius: 2px;\n background-color: hsla(0, 0%, 0%, 0.14);\n background-color: var(--rsbs-handle-bg,hsla(0, 0%, 0%, 0.14));\n}\n\n@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {\n [data-rsbs-header]:before {\n transform: translateX(-50%) scaleY(0.75);\n }\n}\n\n[data-rsbs-has-header='false'] [data-rsbs-header] {\n box-shadow: none;\n padding-top: calc(12px + env(safe-area-inset-top));\n}\n\n[data-rsbs-scroll] {\n flex-shrink: 1;\n flex-grow: 1;\n -webkit-tap-highlight-color: revert;\n -webkit-touch-callout: revert;\n -webkit-user-select: auto;\n -ms-user-select: auto;\n -moz-user-select: auto;\n user-select: auto;\n overflow: auto;\n -ms-scroll-chaining: none;\n overscroll-behavior: contain;\n -webkit-overflow-scrolling: touch;\n}\n\n[data-rsbs-scroll]:focus {\n outline: none;\n}\n\n[data-rsbs-has-footer='false'] [data-rsbs-content] {\n padding-bottom: env(safe-area-inset-bottom);\n}\n\n[data-rsbs-content] {\n /* The overflow hidden is to ensure any margin on child nodes are included when the resize observer is measuring the height */\n overflow: hidden;\n}\n\n[data-rsbs-footer] {\n box-shadow: 0 -1px 0 rgba(46, 59, 66, calc(1 * 0.125)),\n 0 2px 0 #fff;\n box-shadow: 0 -1px 0 rgba(46, 59, 66, calc(var(--rsbs-content-opacity,1) * 0.125)),\n 0 2px 0 var(--rsbs-bg,#fff);\n overflow: hidden;\n z-index: 1;\n padding-bottom: calc(16px + env(safe-area-inset-bottom));\n}\n\n[data-rsbs-is-dismissable='true'] [data-rsbs-header] > *, [data-rsbs-is-dismissable='true'] [data-rsbs-scroll] > *, [data-rsbs-is-dismissable='true'] [data-rsbs-footer] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-header] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-header] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-scroll] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-scroll] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-footer] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-footer] > * {\n opacity: 1;\n opacity: var(--rsbs-content-opacity,1);\n }\n\n[data-rsbs-is-dismissable='true'] [data-rsbs-backdrop], [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-backdrop], [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-backdrop] {\n opacity: 1;\n opacity: var(--rsbs-backdrop-opacity,1);\n }\n\n[data-rsbs-state='closed'],\n[data-rsbs-state='closing'] {\n /* Allows interactions on the rest of the page before the close transition is finished */\n pointer-events: none;\n}\n");const ed=r.css`
2269
2286
  a,
2270
2287
  p {
2271
2288
  font-size: 16px;
@@ -2297,19 +2314,19 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2297
2314
  a:hover {
2298
2315
  text-decoration: underline;
2299
2316
  }
2300
- `,Qu=r.css`
2317
+ `,td=r.css`
2301
2318
  svg {
2302
2319
  height: 12px;
2303
2320
  width: 12px;
2304
2321
  color: ${d("neutral",600)};
2305
2322
  }
2306
- `,ed=r.css`
2323
+ `,nd=r.css`
2307
2324
  cursor: pointer;
2308
2325
  color: ${d("neutral",600)};
2309
2326
  display: flex;
2310
2327
  justify-content: center;
2311
2328
  align-items: center;
2312
- `,td=(e,t)=>r.css`
2329
+ `,rd=(e,t)=>r.css`
2313
2330
  min-height: 56px;
2314
2331
  width: 100vw;
2315
2332
  position: ${e?"sticky":"absolute"};
@@ -2319,7 +2336,7 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2319
2336
  background-color: ${d("neutral",t?200:100)};
2320
2337
  border-top: 1px solid ${d("neutral",400)};
2321
2338
  z-index: 101;
2322
- `,nd=e=>r.css`
2339
+ `,id=e=>r.css`
2323
2340
  height: 100%;
2324
2341
  width: 100%;
2325
2342
  max-width: ${e?`${e}px`:"100%"};
@@ -2334,7 +2351,7 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2334
2351
  flex-direction: column;
2335
2352
  align-items: flex-start;
2336
2353
  }
2337
- `,rd=r.css`
2354
+ `,od=r.css`
2338
2355
  display: flex;
2339
2356
  align-items: center;
2340
2357
  flex-wrap: wrap;
@@ -2347,7 +2364,7 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2347
2364
  color: ${d("neutral",700)};
2348
2365
  text-decoration: underline;
2349
2366
  }
2350
- `,id=r.css`
2367
+ `,ad=r.css`
2351
2368
  width: 240px;
2352
2369
  font-size: 14px;
2353
2370
  line-height: 20px;
@@ -2358,7 +2375,7 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2358
2375
  @media screen and (max-width: 768px) {
2359
2376
  text-align: left;
2360
2377
  }
2361
- `,od=(e,t)=>r.css`
2378
+ `,sd=(e,t)=>r.css`
2362
2379
  height: ${e?"96px":"48px"};
2363
2380
  width: 100%;
2364
2381
  background-color: ${d("neutral",100)};
@@ -2367,7 +2384,7 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2367
2384
  left: 0;
2368
2385
  z-index: 102;
2369
2386
  border-bottom: 1px solid ${d("neutral",400)};
2370
- `,ad=r.css`
2387
+ `,ld=r.css`
2371
2388
  height: 48px;
2372
2389
  width: 100%;
2373
2390
  background-color: ${d("neutral",100)};
@@ -2377,7 +2394,7 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2377
2394
  justify-content: flex-start;
2378
2395
  gap: 0px;
2379
2396
  padding: 8px 16px;
2380
- `,sd=(e,t)=>r.css`
2397
+ `,cd=(e,t)=>r.css`
2381
2398
  height: 48px;
2382
2399
  width: 100%;
2383
2400
  max-width: ${t?`${t}px`:"100%"};
@@ -2387,7 +2404,7 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2387
2404
  justify-content: space-between;
2388
2405
  margin: 0 auto;
2389
2406
  padding: 8px 16px;
2390
- `,ld=r.css`
2407
+ `,ud=r.css`
2391
2408
  outline: none;
2392
2409
  a {
2393
2410
  &:focus-visible {
@@ -2398,12 +2415,12 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2398
2415
  outline-width: 2px;
2399
2416
  }
2400
2417
  }
2401
- `,cd=e=>r.css`
2418
+ `,dd=e=>r.css`
2402
2419
  display: ${e?"none":"flex"};
2403
2420
  align-items: center;
2404
2421
  justify-content: flex-start;
2405
2422
  gap: 0px;
2406
- `,ud=e=>r.css`
2423
+ `,pd=e=>r.css`
2407
2424
  font-size: 16px;
2408
2425
  line-height: 24px;
2409
2426
  font-weight: 400;
@@ -2428,12 +2445,12 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2428
2445
  font-weight: 700;
2429
2446
  color: ${d("accessible","controls-on-neutral-lights")};
2430
2447
  `:""}
2431
- `,dd=r.css`
2448
+ `,hd=r.css`
2432
2449
  height: 48px;
2433
2450
  display: flex;
2434
2451
  align-items: center;
2435
2452
  justify-content: flex-end;
2436
- `,pd=e=>r.css`
2453
+ `,fd=e=>r.css`
2437
2454
  height: 100%;
2438
2455
  font-size: 16px;
2439
2456
  line-height: 24px;
@@ -2452,7 +2469,7 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2452
2469
  }
2453
2470
  }
2454
2471
  `:""}
2455
- `,hd=e=>r.css`
2472
+ `,xd=e=>r.css`
2456
2473
  height: 100%;
2457
2474
  display: flex;
2458
2475
  align-items: center;
@@ -2460,7 +2477,7 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2460
2477
  gap: 20px;
2461
2478
  padding-left: 16px;
2462
2479
  border-left: 1px solid ${d("neutral",e?700:300)};
2463
- `,fd=r.css`
2480
+ `,gd=r.css`
2464
2481
  background-color: none;
2465
2482
  border: none;
2466
2483
  cursor: pointer;
@@ -2485,7 +2502,7 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2485
2502
  outline-width: 2px;
2486
2503
  background-color: ${d("neutral",200)};
2487
2504
  }
2488
- `,xd=e=>r.css`
2505
+ `,vd=e=>r.css`
2489
2506
  position: absolute;
2490
2507
  top: 48px;
2491
2508
  right: 0;
@@ -2498,10 +2515,10 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2498
2515
  justify-content: flex-start;
2499
2516
  gap: 16px;
2500
2517
  transition: width 0.5s ease-in-out;
2501
- `,gd=r.css`
2518
+ `,md=r.css`
2502
2519
  height: 100%;
2503
2520
  width: 100%;
2504
- `,vd=r.css`
2521
+ `,bd=r.css`
2505
2522
  background-color: ${d("neutral",200)};
2506
2523
  border-bottom: 1px solid ${d("neutral",300)};
2507
2524
 
@@ -2521,13 +2538,13 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2521
2538
  margin-left: -12px;
2522
2539
  }
2523
2540
  }
2524
- `,md=r.css`
2541
+ `,yd=r.css`
2525
2542
  background-color: ${d("neutral",100)};
2526
- `,bd=r.css`
2543
+ `,Cd=r.css`
2527
2544
  min-height: 100vh;
2528
2545
  width: 100%;
2529
2546
  overflow-y: scroll;
2530
- `;r.css``;const yd=e=>r.css`
2547
+ `;r.css``;const wd=e=>r.css`
2531
2548
  display: inline-block;
2532
2549
  width: 100%;
2533
2550
  padding: 12px 16px;
@@ -2556,7 +2573,7 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2556
2573
  outline-width: 2px;
2557
2574
  background-color: ${d("neutral",200)};
2558
2575
  }
2559
- `,Cd=r.css`
2576
+ `,jd=r.css`
2560
2577
  width: 100%;
2561
2578
  padding: 12px 16px;
2562
2579
  display: flex;
@@ -2580,7 +2597,7 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2580
2597
  outline-width: 2px;
2581
2598
  background-color: ${d("neutral",200)};
2582
2599
  }
2583
- `,wd=e=>r.css`
2600
+ `,kd=e=>r.css`
2584
2601
  position: absolute;
2585
2602
  top: 0px;
2586
2603
  right: 0;
@@ -2592,7 +2609,7 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2592
2609
  align-items: flex-start;
2593
2610
  justify-content: flex-start;
2594
2611
  transition: width 0.5s ease-in-out;
2595
- `,jd=r.css`
2612
+ `,Sd=r.css`
2596
2613
  height: 48px;
2597
2614
  width: 100%;
2598
2615
  display: flex;
@@ -2603,7 +2620,7 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2603
2620
  position: relative;
2604
2621
  top: 0;
2605
2622
  left: 0;
2606
- `,kd=r.css`
2623
+ `,$d=r.css`
2607
2624
  position: absolute;
2608
2625
  bottom: 0;
2609
2626
  left: 0;
@@ -2618,7 +2635,7 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2618
2635
  button {
2619
2636
  width: calc(48% - 24px);
2620
2637
  }
2621
- `,Sd=({navigationSection:e,utilitySection:r,actionsSection:i,linkRouter:o,isOpen:a,setIsOpen:s,pathname:l})=>{const[c,u]=n.useState(void 0),[d,p]=n.useState(-1),h=n.useRef(null),f=n.useRef([]),x=o;return t.jsxs(t.Fragment,{children:[t.jsx("div",{css:xd(a),children:a&&t.jsxs("div",{css:gd,children:[t.jsxs("div",{style:{overflowY:"scroll",width:"100%",height:"100%",paddingBottom:"72px"},children:[r?t.jsx("div",{css:vd,children:r?.map((e=>t.jsx("div",{className:"utility-item",children:e})))}):null,e?t.jsx("div",{css:md,children:e.map(((e,n)=>e.link?t.jsx(x,{to:e.link,href:e.link,onClick:()=>{u(void 0),p(-1),s(!1)},css:yd(l===e.link),children:e.label},e.label):t.jsxs("button",{css:Cd,type:"button",ref:e=>f.current[n]=e,onClick:()=>{e.items&&(u(e),p(n),setTimeout((()=>{h.current?.focus()}),100))},children:[e.label,e.items?t.jsx(j,{rotate:"270",color:"var(--chakra-colors-neutral-700)"}):null]},e.label)))}):null]}),i?t.jsx("div",{css:kd,children:i.map((e=>t.jsx(v,{label:e.label,onClick:()=>{e?.onClick?.(),u(void 0),p(-1),s(!1)}},e.label)))}):null]})}),t.jsx("div",{css:wd(!!c?.items),children:c?.items?t.jsxs(t.Fragment,{children:[t.jsxs("div",{css:jd,children:[t.jsxs("button",{type:"button",onClick:()=>{u(void 0),p(-1),f.current[d]?.focus()},"aria-label":"Go back",css:fd,ref:h,children:[t.jsx(j,{rotate:"90",color:"var(--chakra-colors-neutral-700)"}),c?.label]}),t.jsxs("button",{type:"button",onClick:()=>{u(void 0),p(-1),s(!1)},"aria-label":"Close menu",css:fd,children:["Close",t.jsx(S,{height:"16px",width:"16px"})]})]}),t.jsx("div",{css:bd,children:c?.items?.map((e=>t.jsx(x,{to:e.link,href:e.link,css:yd(),onClick:()=>{u(void 0),p(-1),s(!1)},children:e.label},e.label)))})]}):null})]})},$d=1023,Ed=r.css`
2638
+ `,Ed=({navigationSection:e,utilitySection:r,actionsSection:i,linkRouter:o,isOpen:a,setIsOpen:s,pathname:l})=>{const[c,u]=n.useState(void 0),[d,p]=n.useState(-1),h=n.useRef(null),f=n.useRef([]),x=o;return t.jsxs(t.Fragment,{children:[t.jsx("div",{css:vd(a),children:a&&t.jsxs("div",{css:md,children:[t.jsxs("div",{style:{overflowY:"scroll",width:"100%",height:"100%",paddingBottom:"72px"},children:[r?t.jsx("div",{css:bd,children:r?.map((e=>t.jsx("div",{className:"utility-item",children:e})))}):null,e?t.jsx("div",{css:yd,children:e.map(((e,n)=>e.link?t.jsx(x,{to:e.link,href:e.link,onClick:()=>{u(void 0),p(-1),s(!1)},css:wd(l===e.link),children:e.label},e.label):t.jsxs("button",{css:jd,type:"button",ref:e=>f.current[n]=e,onClick:()=>{e.items&&(u(e),p(n),setTimeout((()=>{h.current?.focus()}),100))},children:[e.label,e.items?t.jsx(j,{rotate:"270",color:"var(--chakra-colors-neutral-700)"}):null]},e.label)))}):null]}),i?t.jsx("div",{css:$d,children:i.map((e=>t.jsx(v,{label:e.label,onClick:()=>{e?.onClick?.(),u(void 0),p(-1),s(!1)}},e.label)))}):null]})}),t.jsx("div",{css:kd(!!c?.items),children:c?.items?t.jsxs(t.Fragment,{children:[t.jsxs("div",{css:Sd,children:[t.jsxs("button",{type:"button",onClick:()=>{u(void 0),p(-1),f.current[d]?.focus()},"aria-label":"Go back",css:gd,ref:h,children:[t.jsx(j,{rotate:"90",color:"var(--chakra-colors-neutral-700)"}),c?.label]}),t.jsxs("button",{type:"button",onClick:()=>{u(void 0),p(-1),s(!1)},"aria-label":"Close menu",css:gd,children:["Close",t.jsx(S,{height:"16px",width:"16px"})]})]}),t.jsx("div",{css:Cd,children:c?.items?.map((e=>t.jsx(x,{to:e.link,href:e.link,css:wd(),onClick:()=>{u(void 0),p(-1),s(!1)},children:e.label},e.label)))})]}):null})]})},Od=1023,Rd=r.css`
2622
2639
  width: 64px;
2623
2640
  height: 100%;
2624
2641
  z-index: 100;
@@ -2627,7 +2644,7 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2627
2644
  display: flex;
2628
2645
  flex-direction: column;
2629
2646
  justify-content: space-between;
2630
- `,Od=r.css`
2647
+ `,Ld=r.css`
2631
2648
  width: 64px;
2632
2649
  height: 64px;
2633
2650
  background-color: ${d("neutral",200)};
@@ -2717,7 +2734,7 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2717
2734
  }
2718
2735
  }
2719
2736
  }
2720
- `,Rd=r.css`
2737
+ `,Td=r.css`
2721
2738
  display: flex;
2722
2739
  justify-content: center;
2723
2740
  align-items: center;
@@ -2730,7 +2747,7 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2730
2747
  fill: ${d("neutral",600)};
2731
2748
  }
2732
2749
  }
2733
- `,Ld=r.css`
2750
+ `,_d=r.css`
2734
2751
  width: 64px;
2735
2752
  height: 64px;
2736
2753
  background-color: ${d("neutral",200)};
@@ -2768,7 +2785,7 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2768
2785
  text-align: center;
2769
2786
  color: ${d("neutral",600)};
2770
2787
  }
2771
- `,Td=r.css`
2788
+ `,Pd=r.css`
2772
2789
  width: 320px;
2773
2790
  height: 100%;
2774
2791
  z-index: 100;
@@ -2776,14 +2793,14 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2776
2793
  background-color: ${d("neutral",100)};
2777
2794
  overflow-y: auto;
2778
2795
  overflow-x: hidden;
2779
- `,_d=e=>r.css`
2796
+ `,Md=e=>r.css`
2780
2797
  width: 100%;
2781
2798
  display: flex;
2782
2799
  align-items: center;
2783
2800
  height: 40px;
2784
2801
 
2785
2802
  ${"view"===e&&`\n border: 1px solid ${d("neutral",400)};\n background-color: ${d("neutral",200)};\n border-radius: 4px;\n padding: 4px;\n `}
2786
- `,Pd=r.css`
2803
+ `,Dd=r.css`
2787
2804
  width: 99%;
2788
2805
  height: 40px;
2789
2806
  padding: 8px 16px;
@@ -2799,7 +2816,7 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2799
2816
  &:focus-visible {
2800
2817
  box-shadow: none;
2801
2818
  }
2802
- `,Md=r.css`
2819
+ `,Id=r.css`
2803
2820
  background-color: ${d("neutral",200)};
2804
2821
  color: ${d("neutral",700)};
2805
2822
 
@@ -2856,11 +2873,11 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2856
2873
  opacity: 1;
2857
2874
  }
2858
2875
  }
2859
- `,Dd=r.css`
2876
+ `,Nd=r.css`
2860
2877
  width: 4px;
2861
2878
  height: 24px;
2862
2879
  background-color: ${d("neutral",400)};
2863
- `,Id=r.css`
2880
+ `,Vd=r.css`
2864
2881
  height: 32px;
2865
2882
  border-radius: 2px;
2866
2883
  background-color: ${d("neutral",200)};
@@ -2933,16 +2950,16 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2933
2950
  opacity: 1;
2934
2951
  }
2935
2952
  }
2936
- `,Nd=(e,t)=>e.findIndex((e=>e.value===t)),Vd=e=>1===e?"none":2===e?"left":"right",zd=r.css`
2953
+ `,zd=(e,t)=>e.findIndex((e=>e.value===t)),Ad=e=>1===e?"none":2===e?"left":"right",Bd=r.css`
2937
2954
  display: flex;
2938
2955
  justify-content: flex-start;
2939
2956
  align-items: center;
2940
2957
  gap: 8px;
2941
- `,Ad=e=>r.css`
2958
+ `,Hd=e=>r.css`
2942
2959
  width: ${e||"16px"};
2943
2960
  position: relative;
2944
2961
  display: flex;
2945
- `,Bd=r.css`
2962
+ `,Fd=r.css`
2946
2963
  height: 4px;
2947
2964
  width: 4px;
2948
2965
  background-color: ${d("error",500)};
@@ -2950,7 +2967,7 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2950
2967
  position: absolute;
2951
2968
  top: 0px;
2952
2969
  right: 0px;
2953
- `,Hd=r.css`
2970
+ `,Zd=r.css`
2954
2971
  height: 10px;
2955
2972
  background-color: ${d("error",500)};
2956
2973
  padding: 0 3px 1px 3px;
@@ -2961,11 +2978,11 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2961
2978
  position: absolute;
2962
2979
  top: -2px;
2963
2980
  left: 9px;
2964
- `,Fd=r.css`
2981
+ `,Gd=r.css`
2965
2982
  font-size: 9px;
2966
2983
  font-weight: 700;
2967
2984
  color: ${d("error",100)};
2968
- `,Zd=r.css`
2985
+ `,qd=r.css`
2969
2986
  height: 16px;
2970
2987
  min-width: 16px;
2971
2988
  background-color: ${d("error",500)};
@@ -2974,11 +2991,11 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2974
2991
  justify-content: center;
2975
2992
  align-items: center;
2976
2993
  padding: 0px 4px 1px 4px;
2977
- `,Gd=r.css`
2994
+ `,Wd=r.css`
2978
2995
  font-size: 16px;
2979
2996
  font-weight: 700;
2980
2997
  color: ${d("error",100)};
2981
- `,qd=(e,t)=>r.css`
2998
+ `,Ud=(e,t)=>r.css`
2982
2999
  width: 100%;
2983
3000
  min-width: ${"small"===e?"234px":"320px"};
2984
3001
  border-radius: 4px;
@@ -2993,7 +3010,7 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2993
3010
  button {
2994
3011
  margin-left: ${t?0:"24px"};
2995
3012
  }
2996
- `,Wd=r.css`
3013
+ `,Xd=r.css`
2997
3014
  display: flex;
2998
3015
  align-items: flex-start;
2999
3016
  gap: 8px;
@@ -3001,28 +3018,28 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3001
3018
  svg {
3002
3019
  margin-top: 6px;
3003
3020
  }
3004
- `,Ud=e=>r.css`
3021
+ `,Yd=e=>r.css`
3005
3022
  color: ${d("neutral",800)};
3006
3023
  font-size: ${"small"===e?"14px":"18px"};
3007
3024
  line-height: ${"small"===e?"20px":"28px"};
3008
3025
  font-weight: 400;
3009
3026
  text-align: left;
3010
- `,Xd=e=>r.css`
3027
+ `,Kd=e=>r.css`
3011
3028
  color: ${d("neutral",700)};
3012
3029
  font-size: ${"small"===e?"12px":"16px"};
3013
3030
  line-height: ${"small"===e?"16px":"24px"};
3014
3031
  font-weight: 400;
3015
3032
  margin-left: 24px;
3016
3033
  text-align: left;
3017
- `,Yd=r.css`
3034
+ `,Jd=r.css`
3018
3035
  background-color: ${d("neutral",100)};
3019
3036
  border: 1px solid ${d("neutral",300)};
3020
3037
  color: ${d("neutral",700)};
3021
- `,Kd=r.css`
3038
+ `,Qd=r.css`
3022
3039
  background-color: ${d("neutral",200)};
3023
3040
  border: 1px solid ${d("neutral",300)};
3024
3041
  color: ${d("neutral",700)};
3025
- `,Jd=r.css`
3042
+ `,ep=r.css`
3026
3043
  background-color: ${d("success",100)};
3027
3044
  border: 1px solid ${d("success",300)};
3028
3045
  color: ${d("success",500)};
@@ -3030,7 +3047,7 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3030
3047
  p {
3031
3048
  color: ${d("success",900)};
3032
3049
  }
3033
- `,Qd=r.css`
3050
+ `,tp=r.css`
3034
3051
  background-color: ${d("warning",100)};
3035
3052
  border: 1px solid ${d("warning",300)};
3036
3053
  color: ${d("warning",500)};
@@ -3038,7 +3055,7 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3038
3055
  p {
3039
3056
  color: ${d("warning",900)};
3040
3057
  }
3041
- `,ep=r.css`
3058
+ `,np=r.css`
3042
3059
  background-color: ${d("error",100)};
3043
3060
  border: 1px solid ${d("error",300)};
3044
3061
  color: ${d("error",500)};
@@ -3046,32 +3063,32 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3046
3063
  p {
3047
3064
  color: ${d("error",900)};
3048
3065
  }
3049
- `,tp=r.css`
3066
+ `,rp=r.css`
3050
3067
  height: 8px;
3051
3068
  width: 100%;
3052
3069
  background-color: ${d("neutral",300)};
3053
3070
  display: flex;
3054
3071
  align-items: center;
3055
3072
  justify-content: flex-start;
3056
- `,np=e=>r.css`
3073
+ `,ip=e=>r.css`
3057
3074
  height: 100%;
3058
3075
  width: ${e}%;
3059
3076
  background-color: ${d("primary",500)};
3060
3077
  transition: width 0.5s ease-in-out;
3061
- `,rp=r.css`
3078
+ `,op=r.css`
3062
3079
  width: 100%;
3063
3080
  display: flex;
3064
3081
  align-items: center;
3065
3082
  justify-content: space-between;
3066
3083
  position: relative;
3067
- `,ip=r.css`
3084
+ `,ap=r.css`
3068
3085
  height: 60px;
3069
3086
  width: 80px;
3070
3087
  display: flex;
3071
3088
  flex-direction: column;
3072
3089
  align-items: center;
3073
3090
  justify-content: space-between;
3074
- `,op=(e,t)=>r.css`
3091
+ `,sp=(e,t)=>r.css`
3075
3092
  height: 32px;
3076
3093
  width: 32px;
3077
3094
  display: flex;
@@ -3107,12 +3124,12 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3107
3124
  }
3108
3125
 
3109
3126
  ${t?`\n background-color: ${d("neutral",300)};\n \n &:hover {\n background-color: ${d("neutral",300)};\n box-shadow: none;\n }\n `:""}
3110
- `,ap=e=>r.css`
3127
+ `,lp=e=>r.css`
3111
3128
  color: ${d("neutral",e?800:600)};
3112
3129
  font-size: 14px;
3113
3130
  line-height: 20px;
3114
3131
  font-weight: 400;
3115
- `,sp=r.css`
3132
+ `,cp=r.css`
3116
3133
  height: 1px;
3117
3134
  width: 100%;
3118
3135
  padding: 0 30px;
@@ -3120,11 +3137,11 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3120
3137
  top: 16px;
3121
3138
  left: 0;
3122
3139
  z-index: -1;
3123
- `,lp=r.css`
3140
+ `,up=r.css`
3124
3141
  height: 1px;
3125
3142
  width: 100%;
3126
3143
  background-color: ${d("neutral",400)};
3127
- `,cp=r.css`
3144
+ `,dp=r.css`
3128
3145
  justify-content: space-between;
3129
3146
  align-items: center;
3130
3147
  gap: 8px;
@@ -3167,21 +3184,21 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3167
3184
  color: ${d("error",900)};
3168
3185
  }
3169
3186
  }
3170
- `,up=r.css`
3187
+ `,pp=r.css`
3171
3188
  font-size: 18px;
3172
3189
  line-height: 28px;
3173
3190
  font-weight: 400;
3174
3191
  color: ${d("neutral",800)};
3175
- `,dp=r.css`
3192
+ `,hp=r.css`
3176
3193
  font-size: 16px;
3177
3194
  line-height: 24px;
3178
3195
  font-weight: 400;
3179
3196
  color: ${d("neutral",700)};
3180
- `,pp=r.css`
3197
+ `,fp=r.css`
3181
3198
  padding: 6px;
3182
- `,hp=r.css`
3199
+ `,xp=r.css`
3183
3200
  padding: 6px;
3184
- `,fp={pauseOnPageIdle:!0,offsets:"24px"},xp={"top-start":e.createToaster({placement:"top-start",...fp}),"top-end":e.createToaster({placement:"top-end",...fp}),"bottom-start":e.createToaster({placement:"bottom-start",...fp}),"bottom-end":e.createToaster({placement:"bottom-end",...fp})};exports.Badge=({hasNotification:e,notificationCount:r,label:i})=>{const[o,a]=n.useState(!1);n.useEffect((()=>{const e=()=>{window.innerWidth<1024?a(!0):a(!1)};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]);const s=(()=>{let e="";return r&&r>0&&(e=`${r>99?"99+":r}`),e})();let l="16px";return r&&r>99?l="28px":r&&r>9&&(l="22px"),o?t.jsxs("div",{css:zd,role:"status","aria-live":"polite",children:[t.jsxs("div",{css:Ad(),children:[t.jsx(P,{color:"currentColor",height:"16px",width:"16px"}),!e||r||i?null:t.jsx("div",{css:Bd,"aria-hidden":!0})]}),i?t.jsx("p",{children:i}):null,s.length>0?t.jsx("div",{css:Zd,children:t.jsx("p",{css:Gd,"aria-label":`${r} unread message`,children:s})}):null]}):t.jsxs("div",{css:zd,role:"status","aria-live":"polite",children:[i?t.jsx("p",{children:i}):null,t.jsxs("div",{css:Ad(l),children:[s.length>0?t.jsx("div",{css:Hd,children:t.jsx("p",{css:Fd,"aria-label":`${r} unread message`,children:s})}):null,e&&!r?t.jsx("div",{css:Bd,"aria-hidden":!0}):null,t.jsx(P,{color:"currentColor",height:"16px",width:"16px"})]})]})},exports.BaseMap=({title:e,caption:n,additionalSettings:i,options:o,onOptionSelected:a,maxHeight:s="400px",maxWidth:l="260px"})=>t.jsx("div",{css:dn(s,l),children:t.jsxs("div",{className:"base-map-scroll-content",children:[t.jsxs("div",{css:pn,children:[t.jsx("p",{className:"base-map-header-title",children:e}),t.jsx("p",{className:"base-map-header-caption",children:n})]}),t.jsxs("div",{css:hn,children:[i?t.jsx("div",{css:fn,children:i.map((e=>t.jsxs("div",{children:[t.jsx(Ce,{css:{},checked:e.checked,onCheckedChange:({checked:t})=>e.onCheckedChange({checked:Boolean(t)}),children:e.label}),e.checked&&e.children?t.jsx("div",{css:xn,children:e.children}):null]},e.label)))}):null,o?t.jsx("div",{css:gn,children:o.map((e=>{return t.jsxs("div",{css:vn(e.active),role:"button",onClick:()=>a?.(e),tabIndex:0,onKeyDown:t=>{"Enter"===t.key&&a?.(e)},children:[t.jsx("div",{css:(n=e.imageUrl,r.css`
3201
+ `,gp={pauseOnPageIdle:!0,offsets:"24px"},vp={"top-start":e.createToaster({placement:"top-start",...gp}),"top-end":e.createToaster({placement:"top-end",...gp}),"bottom-start":e.createToaster({placement:"bottom-start",...gp}),"bottom-end":e.createToaster({placement:"bottom-end",...gp})};exports.Badge=({hasNotification:e,notificationCount:r,label:i})=>{const[o,a]=n.useState(!1);n.useEffect((()=>{const e=()=>{window.innerWidth<1024?a(!0):a(!1)};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]);const s=(()=>{let e="";return r&&r>0&&(e=`${r>99?"99+":r}`),e})();let l="16px";return r&&r>99?l="28px":r&&r>9&&(l="22px"),o?t.jsxs("div",{css:Bd,role:"status","aria-live":"polite",children:[t.jsxs("div",{css:Hd(),children:[t.jsx(P,{color:"currentColor",height:"16px",width:"16px"}),!e||r||i?null:t.jsx("div",{css:Fd,"aria-hidden":!0})]}),i?t.jsx("p",{children:i}):null,s.length>0?t.jsx("div",{css:qd,children:t.jsx("p",{css:Wd,"aria-label":`${r} unread message`,children:s})}):null]}):t.jsxs("div",{css:Bd,role:"status","aria-live":"polite",children:[i?t.jsx("p",{children:i}):null,t.jsxs("div",{css:Hd(l),children:[s.length>0?t.jsx("div",{css:Zd,children:t.jsx("p",{css:Gd,"aria-label":`${r} unread message`,children:s})}):null,e&&!r?t.jsx("div",{css:Fd,"aria-hidden":!0}):null,t.jsx(P,{color:"currentColor",height:"16px",width:"16px"})]})]})},exports.BaseMap=({title:e,caption:n,additionalSettings:i,options:o,onOptionSelected:a,maxHeight:s="400px",maxWidth:l="260px"})=>t.jsx("div",{css:dn(s,l),children:t.jsxs("div",{className:"base-map-scroll-content",children:[t.jsxs("div",{css:pn,children:[t.jsx("p",{className:"base-map-header-title",children:e}),t.jsx("p",{className:"base-map-header-caption",children:n})]}),t.jsxs("div",{css:hn,children:[i?t.jsx("div",{css:fn,children:i.map((e=>t.jsxs("div",{children:[t.jsx(Ce,{css:{},checked:e.checked,onCheckedChange:({checked:t})=>e.onCheckedChange({checked:Boolean(t)}),children:e.label}),e.checked&&e.children?t.jsx("div",{css:xn,children:e.children}):null]},e.label)))}):null,o?t.jsx("div",{css:gn,children:o.map((e=>{return t.jsxs("div",{css:vn(e.active),role:"button",onClick:()=>a?.(e),tabIndex:0,onKeyDown:t=>{"Enter"===t.key&&a?.(e)},children:[t.jsx("div",{css:(n=e.imageUrl,r.css`
3185
3202
  height: 32px;
3186
3203
  width: 32px;
3187
3204
  border: 1px solid ${d("neutral",300)};
@@ -3189,7 +3206,7 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3189
3206
  background-image: url(${n});
3190
3207
  background-size: cover;
3191
3208
  background-position: center;
3192
- `)}),t.jsxs("div",{css:mn,children:[t.jsxs("div",{className:"base-map-title-container",children:[t.jsx("p",{className:"base-map-title",children:e.label}),e.active?t.jsx(It,{label:"Active",variant:"warning",size:"small",icon:t.jsx(y,{})}):null]}),t.jsx("p",{className:"base-map-caption",children:e.caption}),e.active&&e.children?t.jsx("div",{className:"base-map-children",children:e.children}):null]})]},e.label);var n}))}):null]})]})}),exports.Breadcrumb=({links:r,separator:i,maxItems:o=99,linkRouter:a})=>{const[s,l]=n.useState(r.length>o);n.useEffect((()=>{l(r.length>o)}),[r.length]);const c=a;return t.jsx(e.Breadcrumb.Root,{children:t.jsx(e.Breadcrumb.List,{gap:"16px",children:s?t.jsxs(t.Fragment,{children:[t.jsx(e.Breadcrumb.Item,{css:Ju,children:t.jsxs(c,{to:r[0].link,href:r[0].link,children:[r[0].icon,r[0].label]})}),t.jsx(e.Breadcrumb.Separator,{css:Qu,children:i||t.jsx(j,{rotate:"270"})}),t.jsx("li",{className:"chakra-breadcrumb__item",children:t.jsx("button",{css:ed,type:"button",onClick:()=>l(!1),children:"..."})}),t.jsx(e.Breadcrumb.Separator,{css:Qu,children:i||t.jsx(j,{rotate:"270"})}),t.jsx(e.Breadcrumb.Item,{css:Ju,children:t.jsxs("p",{"aria-current":"page","aria-label":r[r.length-1].label,children:[r[r.length-1].icon,r[r.length-1].label]})})]}):r.map(((o,a)=>o?.label?t.jsxs(n.Fragment,{children:[t.jsx(e.Breadcrumb.Item,{css:Ju,children:a<r.length-1?t.jsxs(c,{to:o.link,href:o.link,children:[o.icon,o.label]}):t.jsxs("p",{"aria-current":"page","aria-label":o.label,children:[o.label&&o.icon?o.icon:"",o.label]})}),a<r.length-1?t.jsx(e.Breadcrumb.Separator,{css:Qu,children:i||t.jsx(j,{rotate:"270"})}):null]},o.label):null))})})},exports.Button=v,exports.Checkbox=Ce,exports.CheckboxList=({label:i,caption:o,checkboxes:a,defaultValue:s,onCheckedChange:l,errorMessage:c,horizontal:u,required:d})=>{const[p,h]=n.useState(s?{[s]:!0}:{}),f=`${i}. ${o?`${o}.`:""} ${d?"Required.":"Optional"} ${c?`Error: ${c}.`:""} `;return t.jsxs(e.Group,{css:Xe,tabIndex:0,"aria-label":f,children:[c?t.jsx("div",{css:Qe}):null,t.jsxs("div",{css:(x=!!c,r.css`
3209
+ `)}),t.jsxs("div",{css:mn,children:[t.jsxs("div",{className:"base-map-title-container",children:[t.jsx("p",{className:"base-map-title",children:e.label}),e.active?t.jsx(It,{label:"Active",variant:"warning",size:"small",icon:t.jsx(y,{})}):null]}),t.jsx("p",{className:"base-map-caption",children:e.caption}),e.active&&e.children?t.jsx("div",{className:"base-map-children",children:e.children}):null]})]},e.label);var n}))}):null]})]})}),exports.Breadcrumb=({links:r,separator:i,maxItems:o=99,linkRouter:a})=>{const[s,l]=n.useState(r.length>o);n.useEffect((()=>{l(r.length>o)}),[r.length]);const c=a;return t.jsx(e.Breadcrumb.Root,{children:t.jsx(e.Breadcrumb.List,{gap:"16px",children:s?t.jsxs(t.Fragment,{children:[t.jsx(e.Breadcrumb.Item,{css:ed,children:t.jsxs(c,{to:r[0].link,href:r[0].link,children:[r[0].icon,r[0].label]})}),t.jsx(e.Breadcrumb.Separator,{css:td,children:i||t.jsx(j,{rotate:"270"})}),t.jsx("li",{className:"chakra-breadcrumb__item",children:t.jsx("button",{css:nd,type:"button",onClick:()=>l(!1),children:"..."})}),t.jsx(e.Breadcrumb.Separator,{css:td,children:i||t.jsx(j,{rotate:"270"})}),t.jsx(e.Breadcrumb.Item,{css:ed,children:t.jsxs("p",{"aria-current":"page","aria-label":r[r.length-1].label,children:[r[r.length-1].icon,r[r.length-1].label]})})]}):r.map(((o,a)=>o?.label?t.jsxs(n.Fragment,{children:[t.jsx(e.Breadcrumb.Item,{css:ed,children:a<r.length-1?t.jsxs(c,{to:o.link,href:o.link,children:[o.icon,o.label]}):t.jsxs("p",{"aria-current":"page","aria-label":o.label,children:[o.label&&o.icon?o.icon:"",o.label]})}),a<r.length-1?t.jsx(e.Breadcrumb.Separator,{css:td,children:i||t.jsx(j,{rotate:"270"})}):null]},o.label):null))})})},exports.Button=v,exports.Checkbox=Ce,exports.CheckboxList=({label:i,caption:o,checkboxes:a,defaultValue:s,onCheckedChange:l,errorMessage:c,horizontal:u,required:d})=>{const[p,h]=n.useState(s?{[s]:!0}:{}),f=`${i}. ${o?`${o}.`:""} ${d?"Required.":"Optional"} ${c?`Error: ${c}.`:""} `;return t.jsxs(e.Group,{css:Xe,tabIndex:0,"aria-label":f,children:[c?t.jsx("div",{css:Qe}):null,t.jsxs("div",{css:(x=!!c,r.css`
3193
3210
  margin-left: ${x?"19px":"0px"};
3194
3211
  `),children:[t.jsxs("p",{css:Ye,"aria-label":i,children:[d&&t.jsx("span",{"aria-label":"required",children:"*"}),i]}),t.jsx("p",{css:Ke,"aria-label":o,children:o}),c?t.jsx("p",{css:et,"aria-label":c,children:c}):null,t.jsx("div",{css:Je(u),children:a.map((e=>t.jsx(Ce,{css:{},defaultChecked:s===e.value,onCheckedChange:({checked:t})=>((e,t)=>{const n={...p};t&&(n[t]=e,h(n)),l&&l(n)})(t,e.name),...e},e.name)))})]})]});var x},exports.CheckboxOptionCard=({defaultValue:n,items:i,onValueChange:o})=>t.jsx(e.CheckboxGroup,{defaultValue:n,onValueChange:o,children:t.jsx(e.HStack,{alignItems:"flex-start",flexWrap:"wrap",gap:"12px",children:i.map((i=>{return t.jsxs(e.CheckboxCard.Root,{css:we,defaultChecked:-1!==n?.indexOf(i.value),disabled:i.disabled,value:i.value,children:[t.jsx(e.CheckboxCard.HiddenInput,{}),t.jsxs(e.CheckboxCard.Control,{css:je,children:[t.jsxs(e.CheckboxCard.Content,{css:(a=i.variant,r.css`
3195
3212
  width: 100%;
@@ -3204,13 +3221,13 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3204
3221
  padding: 0px;
3205
3222
  padding-top: 8px;
3206
3223
  color: ${o?d("neutral",500):"inherit"};
3207
- `),children:i.children}):null]},`${i.label}-${i.value}`);var o,a}))})}),exports.CloseButton=ee,exports.Footer=({children:e,label:n="© World Resources Institute",fixed:r,filled:i,maxWidth:o})=>{const a=(new Date).getFullYear();return t.jsx("footer",{css:td(r,i),children:t.jsxs("div",{css:nd(o),children:[t.jsx("div",{children:t.jsx(_,{height:"32px",width:"91px"})}),t.jsx("div",{css:rd,children:e}),t.jsx("div",{children:t.jsxs("p",{css:id,children:[n," ",a]})})]})})},exports.IconButton=Q,exports.IconMarker=yn,exports.IconMarkers=Cn,exports.InlineMessage=({label:e,caption:n,variant:r,size:i="large",icon:o=t.jsx(w,{height:"16px",width:"16px"}),onActionClick:a,actionLabel:s,isButtonRight:l})=>{let c=Yd;return"info-grey"===r?c=Kd:"success"===r?c=Jd:"warning"===r?c=Qd:"error"===r&&(c=ep),t.jsxs("div",{css:[qd(i,l),c],"aria-roledescription":"Note",children:[t.jsxs("div",{children:[t.jsxs("div",{css:Wd,children:[o,t.jsx("p",{css:Ud(i),children:e})]}),t.jsx("p",{css:Xd(i),children:n})]}),s?t.jsx(v,{label:s,variant:"info-white"===r||"info-grey"===r?"primary":"secondary",size:"large"===i?"default":"small",onClick:a}):null]})},exports.InputWithUnits=({label:r,caption:i,errorMessage:o,units:a,unitsPosition:s="end",defaultUnit:l="",defaultValue:c="",onChange:u,required:d,disabled:p})=>{const[h,f]=n.useState(c),[x,g]=n.useState(l?[l]:[a[0].value]),v=(e,t)=>{u&&u("end"===s?""+(t?`${h} ${e}`:`${e} ${x}`):""+(t?`${e} ${h}`:`${x} ${e}`))};return t.jsxs("div",{css:tt,children:[o?t.jsx("div",{css:it}):null,t.jsxs("div",{style:{marginLeft:o?"19px":"0px"},children:[t.jsxs("p",{css:nt(p),"aria-label":r,children:[d?t.jsx("span",{children:"*"}):null,r]}),t.jsx("p",{css:rt(p),"aria-label":i,children:i}),o?t.jsx("p",{css:ot,"aria-label":o,children:o}):null,t.jsxs(e.Group,{css:at(!!o,s),attached:!0,children:["start"===s?t.jsx(zt,{placeholder:"",value:x,items:a,disabled:p,onChange:e=>{g(e),v(e?.[0],!0)}}):null,t.jsx(ht,{type:"number",value:h,disabled:p,onChange:e=>{f(e.target.value),v(e.target.value)}}),"end"===s?t.jsx(zt,{placeholder:"",value:x,items:a,disabled:p,onChange:e=>{g(e),v(e?.[0],!0)}}):null]})]})]})},exports.ItemCount=ur,exports.LayerGroup=({label:r,caption:i,value:o,layerItems:a,onChangeForRadioVariant:s})=>{const[l,c]=n.useState({}),[u]=n.useState((e=>{const t=e.find((e=>"radio"===e.variant&&e.isDefaultSelected));return t?.name})(a));n.useEffect((()=>{let e={...l};a.forEach((t=>{t.isDefaultSelected&&(e={...e,["radio"===t.variant?r:t.name]:t.isDefaultSelected})})),c(e)}),[]);const d=(e,t,n,r)=>{const i={...l,[e]:t};c(i),n&&n(e,t,r)},p=Object.values(l).filter((e=>!0===e)).length,h=`${r}, ${p} Active layers on the map${i?`, ${i}`:""}`;return t.jsxs(e.Accordion.Item,{value:o,width:"100%",children:[t.jsxs(e.Accordion.ItemTrigger,{css:jn,alignItems:"flex-start","aria-label":h,children:[t.jsxs(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:[t.jsxs("span",{css:kn,children:[r,t.jsx(It,{label:`${p} Active`,size:"small",variant:p>0?"success":"info-grey"})]}),t.jsx("div",{css:Sn,children:i})]}),t.jsx(e.Accordion.ItemIndicator,{display:"flex",children:t.jsx(j,{color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]}),t.jsx(e.Accordion.ItemContent,{paddingLeft:"16px",paddingRight:"16px",children:t.jsx(Ne,{name:r,defaultValue:u,customGap:"0px",onChange:(e,t)=>d(e,!!t,s,t),children:a.map((e=>t.jsx(Tn,{...e,onChange:(t,n)=>d(t,n,e.onChange)},e.label)))})})]})},exports.LayerGroupContainer=({children:n,defaultValue:r,...i})=>t.jsx("div",{css:wn,style:{width:"100%"},children:t.jsx(e.Accordion.Root,{css:{},defaultValue:r,multiple:!0,...i,children:n})}),exports.LayerItem=Tn,exports.LayerParameters=({label:r,children:i,openedByDefault:o})=>t.jsx("div",{children:t.jsx(e.Accordion.Root,{defaultValue:o?[r]:[],multiple:!0,children:t.jsxs(e.Accordion.Item,{css:_n,value:r,children:[t.jsxs(e.Accordion.ItemTrigger,{css:Pn,children:[t.jsx(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:t.jsx("p",{css:Mn,children:r})}),t.jsx(e.Accordion.ItemIndicator,{display:"flex",children:t.jsx(j,{color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]}),t.jsx(e.Accordion.ItemContent,{css:Dn,children:n.Children.map(i,(e=>t.jsx("div",{className:"layer-parameters-item-child",children:e})))})]})})}),exports.LegendItem=({layerName:e,dataUnit:n,onDrag:r,onUpClick:i,onDownClick:o,onRemoveClick:a,children:s,onInfoClick:l,onOpacityChanged:c})=>t.jsxs("div",{css:In,children:[t.jsxs("div",{css:Nn,children:[t.jsx(Q,{icon:t.jsx(O,{}),"aria-label":"Drag and drop","aria-hidden":!0,onClick:r,style:{display:"none",marginBottom:"12px"}}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"12px"},children:[t.jsx(Q,{icon:t.jsx(j,{rotate:"180"}),"aria-label":"Up",onClick:i}),t.jsx(Q,{icon:t.jsx(j,{}),"aria-label":"Down",onClick:o})]})]}),t.jsxs("div",{style:{width:"100%"},children:[t.jsxs("div",{css:Vn,children:[t.jsxs("div",{children:[t.jsx("h3",{css:zn,children:e}),t.jsx("p",{css:An,children:n})]}),t.jsx(v,{label:"Remove",size:"small",variant:"secondary",rightIcon:t.jsx(S,{}),onClick:a})]}),s,t.jsxs("div",{css:Bn,children:[t.jsx(v,{label:"About data",size:"small",variant:"secondary",leftIcon:t.jsx(w,{}),onClick:l}),t.jsx(qn,{defaultValue:80,onOpacityChanged:c})]})]})]}),exports.List=({items:n})=>t.jsx(e.Box,{css:dr,children:n.map((e=>t.jsx(mr,{id:e.id,icon:e.icon,label:e.label,caption:e.caption,value:e.value,variant:e.variant??"data",onItemClick:e.onItemClick},e.id??e.label)))}),exports.MapControl=oe,exports.MapControls=ae,exports.Menu=fe,exports.Modal=({header:n,content:r,footer:i,size:o="medium",draggable:a,blocking:s,open:l,onClose:c})=>l?t.jsx(e.Dialog.Root,{open:l,onOpenChange:c,placement:"center",scrollBehavior:"inside",closeOnInteractOutside:!a&&!s,preventScroll:!a&&!s,closeOnEscape:!s,defaultOpen:!0,children:t.jsxs(e.Portal,{children:[a?null:t.jsx(e.Dialog.Backdrop,{}),t.jsx(Li,{disabled:!a,children:t.jsx(e.Dialog.Positioner,{children:t.jsxs(e.Dialog.Content,{css:Ti(o),children:[t.jsxs(e.Dialog.Header,{css:_i,children:[n,s?null:t.jsx(e.Dialog.CloseTrigger,{css:Pi,asChild:!0,children:t.jsx(ee,{})})]}),t.jsx(e.Dialog.Body,{css:Mi,children:r}),i?t.jsx(e.Dialog.Footer,{padding:"12px",children:i}):null]})})})]})}):null,exports.MultiActionButton=({variant:r="primary",size:i="default",mainActionLabel:o,mainActionOnClick:a=()=>{},otherActions:s=[],disabled:l,...c})=>{const[u,p]=n.useState(!1),h=l?`${o} action button with menu, disabled`:void 0;return t.jsxs(e.Group,{css:me,attached:!0,tabIndex:l?0:void 0,"aria-disabled":l,"aria-label":h,role:"group",children:[t.jsx(v,{css:{},label:o,variant:r,size:i,onClick:a,disabled:l,...c}),t.jsxs(e.Menu.Root,{onOpenChange:({open:e})=>p(e),positioning:{placement:"bottom-end"},children:[t.jsx(e.Menu.Trigger,{css:ge(r),"data-group-item":!0,"data-last":!0,asChild:!0,children:t.jsx(v,{variant:r,size:i,leftIcon:t.jsx(j,{rotate:u?"180":"0",color:d("accessible","text-on-primary-mids")||d("primary",900)}),disabled:l})}),t.jsx(be,{children:s.map((({label:n,value:r,onClick:o})=>t.jsx(e.Menu.Item,{css:ve(i),onClick:o,value:r,children:n},r)))})]})]})},exports.Navbar=({logo:e,linkRouter:i,pathname:o,navigationSection:a,utilitySection:s,actionsSection:l,maxWidth:c,fixed:u,onNavbarHeightChange:p})=>{const h=n.useRef(null),f=n.useRef(null),x=n.useRef(null),[g,m]=n.useState(!1),[b,y]=n.useState(-1),[C,w]=n.useState("undefined"!=typeof window&&window?.innerWidth<=$d),[j,k]=n.useState(!1),$=i,E=n.useCallback((()=>{if(f.current&&h.current&&x.current){const e=h.current.getBoundingClientRect(),t=f.current.getBoundingClientRect(),n=x.current.getBoundingClientRect();t.width,e.width,window.innerWidth<=$d||window.innerWidth<=b?(p?.(96),m(!0)):window.innerWidth>$d&&window.innerWidth<=1440?e.right>=t.left?(p?.(96),m(!0),y(window.innerWidth)):window.innerWidth>b&&(p?.(48),m(!1),y(-1)):(p?.(48),m(!1),y(-1)),g&&(window.innerWidth<=$d||n.right>=t.left?(w(!0),p?.(48)):(w(!1),p?.(96)))}}),[b,g]);return n.useEffect((()=>(E(),window.addEventListener("resize",E),()=>{window.removeEventListener("resize",E)})),[E]),t.jsxs("nav",{css:od(g&&!C,u),children:[t.jsxs("div",{css:sd(g&&!C,c),children:[t.jsxs("div",{css:(O=g&&!C,r.css`
3224
+ `),children:i.children}):null]},`${i.label}-${i.value}`);var o,a}))})}),exports.CloseButton=ee,exports.ExtendableCard=({children:n,header:r,footer:i})=>t.jsx(e.Box,{css:Pr,children:t.jsx(e.Accordion.Root,{multiple:!0,children:t.jsxs(e.Accordion.Item,{value:"extendable-card-item",children:[t.jsxs(e.Accordion.ItemTrigger,{css:Mr,alignItems:"center",children:[t.jsx(e.Flex,{gap:3,flex:"1",overflow:"hidden",alignItems:"center",children:r}),t.jsx(e.Accordion.ItemIndicator,{children:t.jsx(j,{color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]}),t.jsxs(e.Accordion.ItemContent,{children:[n,i]})]})})}),exports.Footer=({children:e,label:n="© World Resources Institute",fixed:r,filled:i,maxWidth:o})=>{const a=(new Date).getFullYear();return t.jsx("footer",{css:rd(r,i),children:t.jsxs("div",{css:id(o),children:[t.jsx("div",{children:t.jsx(_,{height:"32px",width:"91px"})}),t.jsx("div",{css:od,children:e}),t.jsx("div",{children:t.jsxs("p",{css:ad,children:[n," ",a]})})]})})},exports.IconButton=Q,exports.IconMarker=yn,exports.IconMarkers=Cn,exports.InlineMessage=({label:e,caption:n,variant:r,size:i="large",icon:o=t.jsx(w,{height:"16px",width:"16px"}),onActionClick:a,actionLabel:s,isButtonRight:l})=>{let c=Jd;return"info-grey"===r?c=Qd:"success"===r?c=ep:"warning"===r?c=tp:"error"===r&&(c=np),t.jsxs("div",{css:[Ud(i,l),c],"aria-roledescription":"Note",children:[t.jsxs("div",{children:[t.jsxs("div",{css:Xd,children:[o,t.jsx("p",{css:Yd(i),children:e})]}),t.jsx("p",{css:Kd(i),children:n})]}),s?t.jsx(v,{label:s,variant:"info-white"===r||"info-grey"===r?"primary":"secondary",size:"large"===i?"default":"small",onClick:a}):null]})},exports.InputWithUnits=({label:r,caption:i,errorMessage:o,units:a,unitsPosition:s="end",defaultUnit:l="",defaultValue:c="",onChange:u,required:d,disabled:p})=>{const[h,f]=n.useState(c),[x,g]=n.useState(l?[l]:[a[0].value]),v=(e,t)=>{u&&u("end"===s?""+(t?`${h} ${e}`:`${e} ${x}`):""+(t?`${e} ${h}`:`${x} ${e}`))};return t.jsxs("div",{css:tt,children:[o?t.jsx("div",{css:it}):null,t.jsxs("div",{style:{marginLeft:o?"19px":"0px"},children:[t.jsxs("p",{css:nt(p),"aria-label":r,children:[d?t.jsx("span",{children:"*"}):null,r]}),t.jsx("p",{css:rt(p),"aria-label":i,children:i}),o?t.jsx("p",{css:ot,"aria-label":o,children:o}):null,t.jsxs(e.Group,{css:at(!!o,s),attached:!0,children:["start"===s?t.jsx(zt,{placeholder:"",value:x,items:a,disabled:p,onChange:e=>{g(e),v(e?.[0],!0)}}):null,t.jsx(ht,{type:"number",value:h,disabled:p,onChange:e=>{f(e.target.value),v(e.target.value)}}),"end"===s?t.jsx(zt,{placeholder:"",value:x,items:a,disabled:p,onChange:e=>{g(e),v(e?.[0],!0)}}):null]})]})]})},exports.ItemCount=ur,exports.LayerGroup=({label:r,caption:i,value:o,layerItems:a,onChangeForRadioVariant:s})=>{const[l,c]=n.useState({}),[u]=n.useState((e=>{const t=e.find((e=>"radio"===e.variant&&e.isDefaultSelected));return t?.name})(a));n.useEffect((()=>{let e={...l};a.forEach((t=>{t.isDefaultSelected&&(e={...e,["radio"===t.variant?r:t.name]:t.isDefaultSelected})})),c(e)}),[]);const d=(e,t,n,r)=>{const i={...l,[e]:t};c(i),n&&n(e,t,r)},p=Object.values(l).filter((e=>!0===e)).length,h=`${r}, ${p} Active layers on the map${i?`, ${i}`:""}`;return t.jsxs(e.Accordion.Item,{value:o,width:"100%",children:[t.jsxs(e.Accordion.ItemTrigger,{css:jn,alignItems:"flex-start","aria-label":h,children:[t.jsxs(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:[t.jsxs("span",{css:kn,children:[r,t.jsx(It,{label:`${p} Active`,size:"small",variant:p>0?"success":"info-grey"})]}),t.jsx("div",{css:Sn,children:i})]}),t.jsx(e.Accordion.ItemIndicator,{display:"flex",children:t.jsx(j,{color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]}),t.jsx(e.Accordion.ItemContent,{paddingLeft:"16px",paddingRight:"16px",children:t.jsx(Ne,{name:r,defaultValue:u,customGap:"0px",onChange:(e,t)=>d(e,!!t,s,t),children:a.map((e=>t.jsx(Tn,{...e,onChange:(t,n)=>d(t,n,e.onChange)},e.label)))})})]})},exports.LayerGroupContainer=({children:n,defaultValue:r,...i})=>t.jsx("div",{css:wn,style:{width:"100%"},children:t.jsx(e.Accordion.Root,{css:{},defaultValue:r,multiple:!0,...i,children:n})}),exports.LayerItem=Tn,exports.LayerParameters=({label:r,children:i,openedByDefault:o})=>t.jsx("div",{children:t.jsx(e.Accordion.Root,{defaultValue:o?[r]:[],multiple:!0,children:t.jsxs(e.Accordion.Item,{css:_n,value:r,children:[t.jsxs(e.Accordion.ItemTrigger,{css:Pn,children:[t.jsx(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:t.jsx("p",{css:Mn,children:r})}),t.jsx(e.Accordion.ItemIndicator,{display:"flex",children:t.jsx(j,{color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]}),t.jsx(e.Accordion.ItemContent,{css:Dn,children:n.Children.map(i,(e=>t.jsx("div",{className:"layer-parameters-item-child",children:e})))})]})})}),exports.LegendItem=({layerName:e,dataUnit:n,onDrag:r,onUpClick:i,onDownClick:o,onRemoveClick:a,children:s,onInfoClick:l,onOpacityChanged:c})=>t.jsxs("div",{css:In,children:[t.jsxs("div",{css:Nn,children:[t.jsx(Q,{icon:t.jsx(O,{}),"aria-label":"Drag and drop","aria-hidden":!0,onClick:r,style:{display:"none",marginBottom:"12px"}}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"12px"},children:[t.jsx(Q,{icon:t.jsx(j,{rotate:"180"}),"aria-label":"Up",onClick:i}),t.jsx(Q,{icon:t.jsx(j,{}),"aria-label":"Down",onClick:o})]})]}),t.jsxs("div",{style:{width:"100%"},children:[t.jsxs("div",{css:Vn,children:[t.jsxs("div",{children:[t.jsx("h3",{css:zn,children:e}),t.jsx("p",{css:An,children:n})]}),t.jsx(v,{label:"Remove",size:"small",variant:"secondary",rightIcon:t.jsx(S,{}),onClick:a})]}),s,t.jsxs("div",{css:Bn,children:[t.jsx(v,{label:"About data",size:"small",variant:"secondary",leftIcon:t.jsx(w,{}),onClick:l}),t.jsx(qn,{defaultValue:80,onOpacityChanged:c})]})]})]}),exports.List=({items:n})=>t.jsx(e.Box,{css:dr,children:n.map((e=>t.jsx(mr,{id:e.id,icon:e.icon,label:e.label,caption:e.caption,value:e.value,variant:e.variant??"data",onItemClick:e.onItemClick},e.id??e.label)))}),exports.MapControl=oe,exports.MapControls=ae,exports.Menu=fe,exports.Modal=({header:n,content:r,footer:i,size:o="medium",draggable:a,blocking:s,open:l,onClose:c})=>l?t.jsx(e.Dialog.Root,{open:l,onOpenChange:c,placement:"center",scrollBehavior:"inside",closeOnInteractOutside:!a&&!s,preventScroll:!a&&!s,closeOnEscape:!s,defaultOpen:!0,children:t.jsxs(e.Portal,{children:[a?null:t.jsx(e.Dialog.Backdrop,{}),t.jsx(_i,{disabled:!a,children:t.jsx(e.Dialog.Positioner,{children:t.jsxs(e.Dialog.Content,{css:Pi(o),children:[t.jsxs(e.Dialog.Header,{css:Mi,children:[n,s?null:t.jsx(e.Dialog.CloseTrigger,{css:Di,asChild:!0,children:t.jsx(ee,{})})]}),t.jsx(e.Dialog.Body,{css:Ii,children:r}),i?t.jsx(e.Dialog.Footer,{padding:"12px",children:i}):null]})})})]})}):null,exports.MultiActionButton=({variant:r="primary",size:i="default",mainActionLabel:o,mainActionOnClick:a=()=>{},otherActions:s=[],disabled:l,...c})=>{const[u,p]=n.useState(!1),h=l?`${o} action button with menu, disabled`:void 0;return t.jsxs(e.Group,{css:me,attached:!0,tabIndex:l?0:void 0,"aria-disabled":l,"aria-label":h,role:"group",children:[t.jsx(v,{css:{},label:o,variant:r,size:i,onClick:a,disabled:l,...c}),t.jsxs(e.Menu.Root,{onOpenChange:({open:e})=>p(e),positioning:{placement:"bottom-end"},children:[t.jsx(e.Menu.Trigger,{css:ge(r),"data-group-item":!0,"data-last":!0,asChild:!0,children:t.jsx(v,{variant:r,size:i,leftIcon:t.jsx(j,{rotate:u?"180":"0",color:d("accessible","text-on-primary-mids")||d("primary",900)}),disabled:l})}),t.jsx(be,{children:s.map((({label:n,value:r,onClick:o})=>t.jsx(e.Menu.Item,{css:ve(i),onClick:o,value:r,children:n},r)))})]})]})},exports.Navbar=({logo:e,linkRouter:i,pathname:o,navigationSection:a,utilitySection:s,actionsSection:l,maxWidth:c,fixed:u,onNavbarHeightChange:p})=>{const h=n.useRef(null),f=n.useRef(null),x=n.useRef(null),[g,m]=n.useState(!1),[b,y]=n.useState(-1),[C,w]=n.useState("undefined"!=typeof window&&window?.innerWidth<=Od),[j,k]=n.useState(!1),$=i,E=n.useCallback((()=>{if(f.current&&h.current&&x.current){const e=h.current.getBoundingClientRect(),t=f.current.getBoundingClientRect(),n=x.current.getBoundingClientRect();t.width,e.width,window.innerWidth<=Od||window.innerWidth<=b?(p?.(96),m(!0)):window.innerWidth>Od&&window.innerWidth<=1440?e.right>=t.left?(p?.(96),m(!0),y(window.innerWidth)):window.innerWidth>b&&(p?.(48),m(!1),y(-1)):(p?.(48),m(!1),y(-1)),g&&(window.innerWidth<=Od||n.right>=t.left?(w(!0),p?.(48)):(w(!1),p?.(96)))}}),[b,g]);return n.useEffect((()=>(E(),window.addEventListener("resize",E),()=>{window.removeEventListener("resize",E)})),[E]),t.jsxs("nav",{css:sd(g&&!C,u),children:[t.jsxs("div",{css:cd(g&&!C,c),children:[t.jsxs("div",{css:(O=g&&!C,r.css`
3208
3225
  display: flex;
3209
3226
  align-items: center;
3210
3227
  justify-content: flex-start;
3211
3228
  gap: 12px;
3212
3229
  color: ${d("neutral",O?100:900)};
3213
- `),ref:h,children:[e?t.jsx("div",{ref:x,css:ld,children:e}):null,t.jsx("div",{css:cd(g),children:a?.map((e=>e.link?t.jsx($,{to:e.link,href:e.link,css:ud(o===e.link),children:e.label},e.label):t.jsx(fe,{label:e.label,items:e.items||[]},e.label)))})]}),t.jsx("div",{css:dd,ref:f,children:C?t.jsxs("button",{type:"button",onClick:()=>k(!j),"aria-label":"Open menu",css:fd,children:[j?"Close":"Menu",j?t.jsx(S,{height:"16px",width:"16px"}):t.jsx(X,{height:"16px",width:"16px"})]}):t.jsxs(t.Fragment,{children:[t.jsx("div",{css:dd,children:s?.map(((e,n)=>t.jsx("div",{css:pd(g),children:e},n)))}),l?t.jsx("div",{css:hd(g),children:l.map((e=>t.jsx(v,{...e},e.label)))}):null]})})]}),g&&!C?t.jsx("div",{css:ad,children:a?.map((e=>e.link?t.jsx($,{to:e.link,href:e.link,css:ud(o===e.link),children:e.label},e.label):t.jsx(fe,{label:e.label,items:e.items||[]},e.label)))}):null,C?t.jsx(Sd,{navigationSection:a,utilitySection:s,actionsSection:l,linkRouter:i,isOpen:j,setIsOpen:k,pathname:o}):null]});var O},exports.NavigationRail=({tabs:r=[],defaultValue:i,onTabClick:o,children:a,onOpenChange:s})=>{const[l,c]=n.useState(!1),[u,d]=n.useState(i||r?.[0]?.value);return t.jsxs("div",{style:{height:"calc(100vh - 48px - 56px)",position:"fixed",top:"48px",left:0,display:"flex"},children:[t.jsxs("div",{css:Ed,children:[t.jsx(e.Tabs.Root,{defaultValue:i||r?.[0]?.value,orientation:"horizontal",width:"full",onValueChange:({value:e})=>{var t;d(t=e),o&&o(t)},role:"tablist",children:t.jsx(e.Tabs.List,{alignItems:"center",border:"none",style:{flexDirection:"column"},children:r.map((n=>t.jsx(e.Tabs.Trigger,{css:Od,"aria-label":n["aria-label"]||n.label,...n,children:t.jsxs(e.Box,{display:"flex",alignItems:"center",flexDirection:"column",gap:"5px",className:"tab-label",children:[n.icon?t.jsx("div",{css:Rd,children:n.icon}):null,t.jsx("p",{children:n.label})]})},n.label)))})}),a?t.jsx(e.Collapsible.Root,{onOpenChange:({open:e})=>{c(e),s&&s(!e)},children:t.jsxs(e.Collapsible.Trigger,{css:Ld,children:[t.jsx("div",{css:Rd,children:l?t.jsx(b,{}):t.jsx(m,{})}),t.jsxs("div",{className:"tab-label",children:[t.jsx("p",{children:l?"Show":"Hide"}),t.jsx("p",{children:"Sidebar"})]})]})}):null]}),a?t.jsx(e.Collapsible.Root,{defaultOpen:!0,open:!l,children:t.jsx(e.Collapsible.Content,{height:"100%",children:t.jsx("div",{css:Td,role:"tabpanel","aria-labelledby":u,children:a})})}):null]})},exports.OptionCard=({defaultValue:n,items:i,onValueChange:o})=>t.jsx(e.RadioCard.Root,{defaultValue:n,onValueChange:o,children:t.jsx(e.HStack,{alignItems:"flex-start",flexWrap:"wrap",gap:"12px",children:i.map((n=>{return t.jsxs(e.RadioCard.Item,{css:Oe,value:n.value,disabled:n.disabled,children:[t.jsx(e.RadioCard.ItemHiddenInput,{}),t.jsxs(e.RadioCard.ItemControl,{css:Re,children:[t.jsxs("div",{css:(o=n.variant,r.css`
3230
+ `),ref:h,children:[e?t.jsx("div",{ref:x,css:ud,children:e}):null,t.jsx("div",{css:dd(g),children:a?.map((e=>e.link?t.jsx($,{to:e.link,href:e.link,css:pd(o===e.link),children:e.label},e.label):t.jsx(fe,{label:e.label,items:e.items||[]},e.label)))})]}),t.jsx("div",{css:hd,ref:f,children:C?t.jsxs("button",{type:"button",onClick:()=>k(!j),"aria-label":"Open menu",css:gd,children:[j?"Close":"Menu",j?t.jsx(S,{height:"16px",width:"16px"}):t.jsx(X,{height:"16px",width:"16px"})]}):t.jsxs(t.Fragment,{children:[t.jsx("div",{css:hd,children:s?.map(((e,n)=>t.jsx("div",{css:fd(g),children:e},n)))}),l?t.jsx("div",{css:xd(g),children:l.map((e=>t.jsx(v,{...e},e.label)))}):null]})})]}),g&&!C?t.jsx("div",{css:ld,children:a?.map((e=>e.link?t.jsx($,{to:e.link,href:e.link,css:pd(o===e.link),children:e.label},e.label):t.jsx(fe,{label:e.label,items:e.items||[]},e.label)))}):null,C?t.jsx(Ed,{navigationSection:a,utilitySection:s,actionsSection:l,linkRouter:i,isOpen:j,setIsOpen:k,pathname:o}):null]});var O},exports.NavigationRail=({tabs:r=[],defaultValue:i,onTabClick:o,children:a,onOpenChange:s})=>{const[l,c]=n.useState(!1),[u,d]=n.useState(i||r?.[0]?.value);return t.jsxs("div",{style:{height:"calc(100vh - 48px - 56px)",position:"fixed",top:"48px",left:0,display:"flex"},children:[t.jsxs("div",{css:Rd,children:[t.jsx(e.Tabs.Root,{defaultValue:i||r?.[0]?.value,orientation:"horizontal",width:"full",onValueChange:({value:e})=>{var t;d(t=e),o&&o(t)},role:"tablist",children:t.jsx(e.Tabs.List,{alignItems:"center",border:"none",style:{flexDirection:"column"},children:r.map((n=>t.jsx(e.Tabs.Trigger,{css:Ld,"aria-label":n["aria-label"]||n.label,...n,children:t.jsxs(e.Box,{display:"flex",alignItems:"center",flexDirection:"column",gap:"5px",className:"tab-label",children:[n.icon?t.jsx("div",{css:Td,children:n.icon}):null,t.jsx("p",{children:n.label})]})},n.label)))})}),a?t.jsx(e.Collapsible.Root,{onOpenChange:({open:e})=>{c(e),s&&s(!e)},children:t.jsxs(e.Collapsible.Trigger,{css:_d,children:[t.jsx("div",{css:Td,children:l?t.jsx(b,{}):t.jsx(m,{})}),t.jsxs("div",{className:"tab-label",children:[t.jsx("p",{children:l?"Show":"Hide"}),t.jsx("p",{children:"Sidebar"})]})]})}):null]}),a?t.jsx(e.Collapsible.Root,{defaultOpen:!0,open:!l,children:t.jsx(e.Collapsible.Content,{height:"100%",children:t.jsx("div",{css:Pd,role:"tabpanel","aria-labelledby":u,children:a})})}):null]})},exports.OptionCard=({defaultValue:n,items:i,onValueChange:o})=>t.jsx(e.RadioCard.Root,{defaultValue:n,onValueChange:o,children:t.jsx(e.HStack,{alignItems:"flex-start",flexWrap:"wrap",gap:"12px",children:i.map((n=>{return t.jsxs(e.RadioCard.Item,{css:Oe,value:n.value,disabled:n.disabled,children:[t.jsx(e.RadioCard.ItemHiddenInput,{}),t.jsxs(e.RadioCard.ItemControl,{css:Re,children:[t.jsxs("div",{css:(o=n.variant,r.css`
3214
3231
  width: 100%;
3215
3232
  display: flex;
3216
3233
  flex-direction: ${"centered"===o?"column":"row"};
@@ -3223,7 +3240,7 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3223
3240
  padding: 0px;
3224
3241
  padding-top: 8px;
3225
3242
  color: ${i?d("neutral",500):"inherit"};
3226
- `),children:n.children}):null]},`${n.label}-${n.value}`);var i,o}))})}),exports.Pagination=jr,exports.Panel=({header:e,content:r,footer:i,variant:o="fixed",width:a})=>{const[s,l]=n.useState(void 0),[c,u]=n.useState(void 0),d=n.useRef(null),p=n.useRef(null);n.useEffect((()=>{l(d?.current?.getBoundingClientRect()?.height),u(p?.current?.getBoundingClientRect()?.height)}),[e,i]);return t.jsxs("div",{css:[Di(a),"fixed"===o?Ii:Ni],children:[e?t.jsx("div",{css:Vi,ref:d,children:e}):null,t.jsx("div",{css:zi(s,c),children:r}),i?t.jsx("div",{css:Ai,ref:p,children:i}):null]})},exports.Password=({label:e,caption:i,required:o,disabledRules:a,onChange:s,minLength:l=8,hideValidations:c})=>{const[u,p]=n.useState(!1),[h,f]=n.useState(""),[x,g]=n.useState({strength:"Very weak",length:!1,uppercase:!1,lowercase:!1,numbers:!1,specialCharacters:!1});return t.jsxs("div",{css:At,children:[t.jsxs("p",{css:Bt,"aria-label":e,children:[o?t.jsx("span",{children:"*"}):null,e]}),t.jsx("p",{css:Ht,"aria-label":i,children:i}),t.jsxs("div",{css:Ft,children:[t.jsx(ht,{type:u?"text":"password",value:h,"aria-describedby":"password-guidelines",onChange:e=>(e=>{const t={...x};let n=0,r=!1;t.length=e.length>=l,n+=e.length>=l?1:0,r=/[A-Z]/.test(e),n+=r?1:0,t.uppercase=r,r=/[a-z]/.test(e),n+=r?1:0,t.lowercase=r,r=/[0-9]/.test(e),n+=r?1:0,t.numbers=r,r=/[-'/`~!¡#*$@_%+=.,^&(){}[\]|;:“‘"<>?\\]/.test(e),n+=r?1:0,t.specialCharacters=r,t.strength="Very Weak",e.length>=4&&n>=2&&(t.strength="Weak"),e.length>=6&&n>=3&&(t.strength="Medium"),e.length>=l&&n>=4&&(t.strength="Strong"),e.length>=l+2&&n>=5&&(t.strength="Very Strong"),f(e),g(t),s&&s(t)})(e.target.value)}),t.jsx(v,{label:u?"Hide":"Show",variant:"secondary",leftIcon:u?t.jsx(E,{}):t.jsx($,{}),"aria-label":u?"Hide password":"Show password",onClick:()=>p(!u),type:"button"})]}),h&&!c?t.jsxs("div",{id:"password-guidelines",css:Zt,"aria-live":"polite",children:[t.jsxs("p",{css:(m=x.strength,r.css`
3243
+ `),children:n.children}):null]},`${n.label}-${n.value}`);var i,o}))})}),exports.Pagination=jr,exports.Panel=({header:e,content:r,footer:i,variant:o="fixed",width:a})=>{const[s,l]=n.useState(void 0),[c,u]=n.useState(void 0),d=n.useRef(null),p=n.useRef(null);n.useEffect((()=>{l(d?.current?.getBoundingClientRect()?.height),u(p?.current?.getBoundingClientRect()?.height)}),[e,i]);return t.jsxs("div",{css:[Ni(a),"fixed"===o?Vi:zi],children:[e?t.jsx("div",{css:Ai,ref:d,children:e}):null,t.jsx("div",{css:Bi(s,c),children:r}),i?t.jsx("div",{css:Hi,ref:p,children:i}):null]})},exports.Password=({label:e,caption:i,required:o,disabledRules:a,onChange:s,minLength:l=8,hideValidations:c})=>{const[u,p]=n.useState(!1),[h,f]=n.useState(""),[x,g]=n.useState({strength:"Very weak",length:!1,uppercase:!1,lowercase:!1,numbers:!1,specialCharacters:!1});return t.jsxs("div",{css:At,children:[t.jsxs("p",{css:Bt,"aria-label":e,children:[o?t.jsx("span",{children:"*"}):null,e]}),t.jsx("p",{css:Ht,"aria-label":i,children:i}),t.jsxs("div",{css:Ft,children:[t.jsx(ht,{type:u?"text":"password",value:h,"aria-describedby":"password-guidelines",onChange:e=>(e=>{const t={...x};let n=0,r=!1;t.length=e.length>=l,n+=e.length>=l?1:0,r=/[A-Z]/.test(e),n+=r?1:0,t.uppercase=r,r=/[a-z]/.test(e),n+=r?1:0,t.lowercase=r,r=/[0-9]/.test(e),n+=r?1:0,t.numbers=r,r=/[-'/`~!¡#*$@_%+=.,^&(){}[\]|;:“‘"<>?\\]/.test(e),n+=r?1:0,t.specialCharacters=r,t.strength="Very Weak",e.length>=4&&n>=2&&(t.strength="Weak"),e.length>=6&&n>=3&&(t.strength="Medium"),e.length>=l&&n>=4&&(t.strength="Strong"),e.length>=l+2&&n>=5&&(t.strength="Very Strong"),f(e),g(t),s&&s(t)})(e.target.value)}),t.jsx(v,{label:u?"Hide":"Show",variant:"secondary",leftIcon:u?t.jsx(E,{}):t.jsx($,{}),"aria-label":u?"Hide password":"Show password",onClick:()=>p(!u),type:"button"})]}),h&&!c?t.jsxs("div",{id:"password-guidelines",css:Zt,"aria-live":"polite",children:[t.jsxs("p",{css:(m=x.strength,r.css`
3227
3244
  font-size: 16px;
3228
3245
  line-height: 24px;
3229
3246
  font-weight: 400;
@@ -3234,7 +3251,7 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3234
3251
  font-weight: 700;
3235
3252
  color: ${d("Medium"===m?"warning":"Strong"===m||"Very Strong"===m?"success":"error",900)};
3236
3253
  }
3237
- `),"aria-live":"polite",role:"status",children:["Password Strength: ",t.jsx("span",{children:x.strength})]}),t.jsx("div",{css:Gt(x.strength),children:t.jsx("div",{})}),t.jsxs("div",{css:qt(x.length),"aria-label":`Use a minimum of ${l} characters. ${x.length?"Requirement met.":"Requirement not met."}`,children:[t.jsx("div",{children:x.length?t.jsx(y,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(S,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsxs("p",{children:["Use a minimum of ",l," characters"]})]}),a?.uppercase?null:t.jsxs("div",{css:qt(x.uppercase),"aria-label":"Use an uppercase letter. "+(x.uppercase?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.uppercase?t.jsx(y,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(S,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsx("p",{children:"Use an uppercase letter"})]}),a?.lowercase?null:t.jsxs("div",{css:qt(x.lowercase),"aria-label":"Use a lowercase letter. "+(x.lowercase?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.lowercase?t.jsx(y,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(S,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsx("p",{children:"Use a lowercase letter"})]}),a?.numbers?null:t.jsxs("div",{css:qt(x.numbers),"aria-label":"Use a number. "+(x.numbers?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.numbers?t.jsx(y,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(S,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsx("p",{children:"Use a number"})]}),a?.specialCharacters?null:t.jsxs("div",{css:qt(x.specialCharacters),"aria-label":"Use a special character. "+(x.specialCharacters?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.specialCharacters?t.jsx(y,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(S,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsx("p",{children:"Use a special character"})]})]}):null]});var m},exports.ProgressBar=({progress:e})=>{let n=e;return n>100&&(n=100),n<0&&(n=0),t.jsx("div",{css:tp,role:"progressbar","aria-label":`Progress: ${n}%`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":n,children:t.jsx("div",{css:np(n)})})},exports.QualitativeAttribute=({type:e,label:r,caption:i,color:o,onActionClick:a,showActionButton:s,pointIcon:l=t.jsx(B,{color:"#006D2C"})})=>{const[c,u]=n.useState(!0),d=n.useId(),p=n.useId(),h="raster"===e,f="line"===e,x="point"===e,g=c?"Hide":"Show",m=i?`${d} ${p}`:d;return t.jsxs("div",{css:Yn,children:[t.jsxs("div",{css:Kn,children:[t.jsxs("div",{children:[h&&t.jsx("div",{css:Wn(o)}),f&&t.jsx("div",{css:Un(o)}),x&&t.jsx("div",{css:Xn(o),children:l})]}),t.jsxs("div",{children:[t.jsx("p",{id:d,css:Jn,children:r}),i?t.jsx("p",{id:p,css:Qn,children:i}):null]})]}),a&&s?t.jsx("div",{css:er,children:t.jsx(v,{type:"button",variant:"borderless",label:g,rightIcon:c?t.jsx(E,{}):t.jsx($,{}),"aria-pressed":c,"aria-describedby":m,"aria-label":`${g} ${r}`,onClick:()=>{u((e=>!e)),a?.()}})}):null]})},exports.Radio=Ie,exports.RadioGroup=Ne,exports.RadioList=({label:n,caption:i,name:o,radios:a,defaultValue:s,onCheckedChange:l,errorMessage:c,horizontal:u,variant:d="default",required:p})=>{const h=`${n}. ${i?`${i}.`:""} ${p?"Required.":"Optional."} ${c?`Error: ${c}.`:""} `;return t.jsxs(e.Group,{tabIndex:0,css:Wt,"aria-roledescription":"group","aria-label":h,children:[c?t.jsx("div",{css:Kt}):null,t.jsxs("div",{css:(f=!!c,r.css`
3254
+ `),"aria-live":"polite",role:"status",children:["Password Strength: ",t.jsx("span",{children:x.strength})]}),t.jsx("div",{css:Gt(x.strength),children:t.jsx("div",{})}),t.jsxs("div",{css:qt(x.length),"aria-label":`Use a minimum of ${l} characters. ${x.length?"Requirement met.":"Requirement not met."}`,children:[t.jsx("div",{children:x.length?t.jsx(y,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(S,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsxs("p",{children:["Use a minimum of ",l," characters"]})]}),a?.uppercase?null:t.jsxs("div",{css:qt(x.uppercase),"aria-label":"Use an uppercase letter. "+(x.uppercase?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.uppercase?t.jsx(y,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(S,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsx("p",{children:"Use an uppercase letter"})]}),a?.lowercase?null:t.jsxs("div",{css:qt(x.lowercase),"aria-label":"Use a lowercase letter. "+(x.lowercase?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.lowercase?t.jsx(y,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(S,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsx("p",{children:"Use a lowercase letter"})]}),a?.numbers?null:t.jsxs("div",{css:qt(x.numbers),"aria-label":"Use a number. "+(x.numbers?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.numbers?t.jsx(y,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(S,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsx("p",{children:"Use a number"})]}),a?.specialCharacters?null:t.jsxs("div",{css:qt(x.specialCharacters),"aria-label":"Use a special character. "+(x.specialCharacters?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.specialCharacters?t.jsx(y,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(S,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsx("p",{children:"Use a special character"})]})]}):null]});var m},exports.ProgressBar=({progress:e})=>{let n=e;return n>100&&(n=100),n<0&&(n=0),t.jsx("div",{css:rp,role:"progressbar","aria-label":`Progress: ${n}%`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":n,children:t.jsx("div",{css:ip(n)})})},exports.QualitativeAttribute=({type:e,label:r,caption:i,color:o,onActionClick:a,showActionButton:s,pointIcon:l=t.jsx(B,{color:"#006D2C"})})=>{const[c,u]=n.useState(!0),d=n.useId(),p=n.useId(),h="raster"===e,f="line"===e,x="point"===e,g=c?"Hide":"Show",m=i?`${d} ${p}`:d;return t.jsxs("div",{css:Yn,children:[t.jsxs("div",{css:Kn,children:[t.jsxs("div",{children:[h&&t.jsx("div",{css:Wn(o)}),f&&t.jsx("div",{css:Un(o)}),x&&t.jsx("div",{css:Xn(o),children:l})]}),t.jsxs("div",{children:[t.jsx("p",{id:d,css:Jn,children:r}),i?t.jsx("p",{id:p,css:Qn,children:i}):null]})]}),a&&s?t.jsx("div",{css:er,children:t.jsx(v,{type:"button",variant:"borderless",label:g,rightIcon:c?t.jsx(E,{}):t.jsx($,{}),"aria-pressed":c,"aria-describedby":m,"aria-label":`${g} ${r}`,onClick:()=>{u((e=>!e)),a?.()}})}):null]})},exports.Radio=Ie,exports.RadioGroup=Ne,exports.RadioList=({label:n,caption:i,name:o,radios:a,defaultValue:s,onCheckedChange:l,errorMessage:c,horizontal:u,variant:d="default",required:p})=>{const h=`${n}. ${i?`${i}.`:""} ${p?"Required.":"Optional."} ${c?`Error: ${c}.`:""} `;return t.jsxs(e.Group,{tabIndex:0,css:Wt,"aria-roledescription":"group","aria-label":h,children:[c?t.jsx("div",{css:Kt}):null,t.jsxs("div",{css:(f=!!c,r.css`
3238
3255
  margin-left: ${f?"19px":"0px"};
3239
3256
  `),children:[t.jsxs("p",{css:Ut,"aria-label":n,children:[p&&t.jsx("span",{"aria-label":"required",children:"*"}),n]}),t.jsx("p",{css:Xt,"aria-label":i,children:i}),c?t.jsx("p",{css:Jt,"aria-label":c,children:c}):null,t.jsx("div",{css:Yt,children:t.jsx(Ne,{name:o,defaultValue:s,onChange:l,horizontal:u&&"card"!==d,children:a.map((e=>t.jsx(Ie,{css:"card"===d?Qt:{},...e},e.value)))})})]})]});var f},exports.SSOButtons=Y,exports.ScaleBar=({colors:e,values:n,subLabels:i,isGradient:o})=>{return t.jsxs("div",{css:tr,children:[o?t.jsx("div",{css:(a=ar(e),r.css`
3240
3257
  height: 20px;
@@ -3243,4 +3260,4 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3243
3260
  border: 1px solid ${d("neutral",300)};
3244
3261
  border-radius: 4px;
3245
3262
  ${a?`background: ${a};`:""}
3246
- `)}):t.jsx("div",{css:nr,children:e?.map(((e,r)=>t.jsx("div",{"data-test":`${e}-${n?.[r]}`,style:{backgroundColor:e,width:"100%",height:"100%"}},`${e}-${n?.[r]}`)))}),t.jsx("div",{css:rr,children:n?.map((e=>t.jsx("div",{style:{width:o?"auto":`calc(100% / ${n.length})`,display:"flex",justifyContent:"center"},children:t.jsx("p",{css:ir,children:e})},e)))}),i&&i.length?t.jsx("div",{css:rr,children:i.map((e=>t.jsx("div",{style:{width:o?"auto":`calc(100% / ${n.length})`,display:"flex",justifyContent:"center"},children:t.jsx("p",{css:or,style:{width:"100%"},children:e})},e)))}):null]});var a},exports.Select=zt,exports.Sheet=({header:e,content:n,footer:r,open:i=!1,onClose:o,minimizedHeight:a,midHeight:s=200,maxFullHeight:l,defaultSnap:c="minimized",className:u,blocking:d,zIndex:p=1e3})=>t.jsx(Yu,{css:Ku(!!e,p),className:u,open:i,onDismiss:o,header:e,footer:r,snapPoints:({headerHeight:e,maxHeight:t,footerHeight:n})=>[20,a||e,s+(r?n:0),l||t-t/6],defaultSnap:({headerHeight:e,maxHeight:t,footerHeight:n})=>{let i=20;return"minimized"===c?i=a||e:"mid"===c?i=s+(r?n:0):"full"===c&&(i=l||t-t/6),i},blocking:d,children:n}),exports.Slider=qe,exports.SliderInput=({label:e,caption:r,size:i="default",sliderItem:o,required:a,onChange:s})=>{const[l,c]=n.useState(o.value||[]),u=(e,t)=>{const n=e.target.value,r=[...l];let i=n?parseInt(n,10):n;const a=o.min||0,s=o.max||100;i=Number.isNaN(i)?a:i,i=i<a?a:i,i=i>s?s:i,r[t]=i,c(r)},d=(e,t)=>{const n=e.target.value||"0",r=[...l];let i=parseInt(n,10);const a=o.min||0,u=o.max||100;if(i=Number.isNaN(i)?a:i,i=i<a?a:i,i=i>u?u:i,2===l?.length){i=Number.isNaN(i)?a:i;const e=l[0],n=l[1];0===t?(i=i<a?a:i,i=i>n?n:i):1===t&&(i=i<e?e:i,i=i>u?u:i)}r[t]=i,c(r),s&&s(r)};return t.jsxs("div",{children:[t.jsxs("p",{css:en(i),"aria-label":e,children:[a?t.jsx("span",{children:"*"}):null,e]}),r?t.jsx("p",{css:tn(i),"aria-label":r,children:r}):null,t.jsxs("div",{css:nn,children:[o.step&&o.marks?t.jsx(zt,{items:o.marks.map((e=>({label:`${e.label}`,value:`${e.value}`}))),placeholder:"",style:{width:"90px"},value:[`${l?.[0]}`],onChange:e=>{const t=e.map((e=>parseInt(e,10)));c(t),s&&s(t)}}):t.jsx(ht,{"aria-label":e,min:o.min,max:o.max,value:l?.[0],type:"number",onChange:e=>u(e,0),onBlur:e=>d(e,0),className:"opacity-control-text-input",onClick:e=>e.target.select()}),t.jsx(qe,{css:{},...o,value:l,onValueChangeEnd:e=>{c(e.value),s&&s(e.value)}}),2===l?.length?t.jsx(ht,{"aria-label":e,min:o.min,max:o.max,value:l?.[1],type:"number",onChange:e=>u(e,1),onBlur:e=>d(e,1),className:"opacity-control-text-input",onClick:e=>e.target.select()}):null]})]})},exports.StepProgressIndicator=({steps:e,currentStep:n})=>t.jsxs("div",{css:rp,children:[e.map(((e,r)=>t.jsxs("div",{css:ip,children:[t.jsx("button",{css:op(n>=r+1,n<r+1),type:"button",onClick:e.onClick,"aria-current":n===r+1,"aria-disabled":n<r+1,disabled:n<r+1,"aria-label":`Current Step ${r}${e.label?` ${e.label}`:""}`,"data-active":n>=r+1,children:n>r+1?t.jsx(y,{height:"16px",width:"16px"}):r+1}),e.label?t.jsx("p",{css:ap(n===r+1),children:e.label}):null]},`${e.label}-${r}`))),t.jsx("div",{css:sp,children:t.jsx("div",{css:lp})})]}),exports.Switch=Ue,exports.TabBar=({variant:r="panel",defaultValue:i,tabs:o,onTabClick:a})=>{const[s,l]=n.useState(Nd(o,i)||0),c="view"===r;return t.jsx("div",{css:_d(r),children:t.jsx(e.Tabs.Root,{width:"full",defaultValue:i||o?.[0]?.value,onValueChange:({value:e})=>{return l(Nd(o,t=e)),void(a&&a(t));var t},children:t.jsx(e.Tabs.List,{alignItems:"center",border:"none",children:o.map(((r,i)=>t.jsxs(n.Fragment,{children:[c&&1===i&&"left"===Vd(s)?t.jsx("div",{css:Dd}):null,t.jsx(e.Tabs.Trigger,{css:[Pd,c?Id:Md],"aria-label":r["aria-label"]||r.label,...r,children:t.jsxs(e.Box,{display:"flex",alignItems:"center",gap:"5px",children:[r.icon,r.label]})},r.label),c&&1===i&&"right"===Vd(s)?t.jsx("div",{css:Dd}):null]},r.label)))})})})},exports.Table=({columns:r,data:i,renderRow:o,striped:a,stickyHeader:s,pagination:l,selectable:c,selectedRows:u,onSortColumn:d,onPageSizeChange:p,onPageChange:h,onAllItemsSelected:f})=>{const[x,g]=n.useState({key:"",order:""}),{totalItems:v=i.length,currentPage:m=1,pageSize:b=10,showItemCount:y,showItemCountText:C}=l||{},w=(e,t)=>{g({key:e,order:t}),d&&d({key:e,order:t})},k=u?.length===i?.length,S=u&&u.length>0&&!k;return t.jsxs("div",{children:[t.jsxs(e.Table.Root,{css:kr,striped:a,stickyHeader:s,interactive:!0,children:[t.jsx(e.Table.Header,{css:Sr,children:t.jsxs(e.Table.Row,{children:[c?t.jsx(e.Table.ColumnHeader,{children:t.jsx(Ce,{name:"header-checkbox",checked:k,indeterminate:S,onCheckedChange:({checked:e})=>{f&&f(e)}})}):null,r.map((n=>t.jsx(e.Table.ColumnHeader,{role:n.sortable?"columnheader":void 0,"aria-sort":n.sortable&&"asc"===x.order?"ascending":n.sortable&&"desc"===x.order?"descending":void 0,children:t.jsxs("div",{css:$r,children:[n.label,n.sortable?t.jsxs("div",{css:Er,children:[t.jsx(Q,{css:Or(x.key===n.key&&"asc"===x.order),icon:t.jsx(j,{style:{transform:"rotate(180deg)"}}),onClick:()=>w(n.key,"asc"),"aria-label":"Ascending"}),t.jsx(Q,{css:Or(x.key===n.key&&"desc"===x.order),icon:t.jsx(j,{}),onClick:()=>w(n.key,"desc"),"aria-label":"Descending"})]}):null]})},n.key)))]})}),t.jsx(e.Table.Body,{children:i.map((e=>t.jsx(n.Fragment,{children:o(e)},e.id)))})]}),t.jsxs("div",{css:Rr,children:[t.jsx("div",{children:y?t.jsx(ur,{pageSize:b,currentPage:m,totalItems:v,onPageSizeChange:p,showItemCountText:C}):null}),l?t.jsx("div",{css:Lr,children:t.jsx(jr,{totalItems:v,pageSize:b,currentPage:m,onPageChange:h})}):null]})]})},exports.TableCell=_r,exports.TableRow=Tr,exports.Tag=It,exports.TextInput=ht,exports.Textarea=({label:r,caption:i,placeholder:o,errorMessage:a,required:s,disabled:l,size:c="default",defaultValue:u="",onChange:d,minLength:p,maxLength:h,...f})=>{const[x,g]=n.useState(u),[v,m]=n.useState(!1),[b,y]=n.useState(!1),[C,w]=n.useState(""),j=n.useId(),k=n.useId(),S=n.useId();n.useEffect((()=>{const{length:e}=u;p&&e<p&&e>0?(m(e<p),y(!1),w(`Enter at least ${p-e} characters`)):p&&0===e&&w(`Min ${p} characters`),h&&e>0?(m(!1),y(e>h),w(`You have ${h-e} characters remaining`)):h&&0===e&&w(`Max ${h} characters`)}),[]);const $=!!a||v||b,E=[i?j:null,$?k:null,C?S:null].filter(Boolean).join(" ")||void 0;return t.jsxs("div",{css:rn(c),children:[$?t.jsx("div",{css:on}):null,t.jsxs(e.Field.Root,{required:s,invalid:$,gap:"0",style:{marginLeft:$?"19px":"0px"},children:[r?t.jsxs(e.Field.Label,{css:an(c,l),"aria-label":r,children:[t.jsx(e.Field.RequiredIndicator,{"aria-label":"required"}),r,s?"":t.jsx("span",{children:" (Optional)"})]}):null,i?t.jsx(e.Field.HelperText,{id:j,css:sn(c,l),children:i}):null,a?t.jsx(e.Field.ErrorText,{id:k,css:cn,"aria-label":`Error: ${a}`,"aria-live":"polite",children:a}):null,t.jsx(e.Textarea,{placeholder:o,disabled:l,css:un(c,x,u),onChange:e=>{g(e.target.value);const{length:t}=e.target.value;p&&h?(m(t<p),y(t>h),w(`You have ${h-t} characters remaining`)):p?(m(t<p),y(!1),w(t<p?`Enter at least ${p-t} characters`:"")):h&&(y(t>h),m(!1),w(`You have ${h-t} characters remaining`)),d&&d(e)},value:x,"aria-describedby":E,_placeholder:{color:"var(--chakra-colors-neutral-500)"},...f}),v&&p?t.jsxs(e.Field.ErrorText,{id:k,css:cn,style:{marginTop:"8px",fontSize:"12px",lineHeight:"16px"},"aria-live":"polite",children:["You need ",p-x.length," more characters"]}):null,b&&h?t.jsxs(e.Field.ErrorText,{id:k,css:cn,style:{marginTop:"8px",fontSize:"12px",lineHeight:"16px"},"aria-live":"polite",children:["You have ",x.length-h," characters too many"]}):null,!C||b||v?null:t.jsx(e.Field.HelperText,{id:S,css:ln,"aria-live":"polite",children:C})]})]})},exports.Toast=()=>Object.keys(xp).map((n=>t.jsx(e.Portal,{children:t.jsx(e.Toaster,{toaster:xp[n],insetInline:{mdDown:"4"},children:r=>t.jsxs(e.Toast.Root,{css:cp,width:{md:"sm"},children:[t.jsxs(e.Stack,{flexDirection:"row",className:"icon-container",children:["info"===r.type?r.meta?.icon?r.meta.icon:t.jsx(w,{color:"var(--chakra-colors-neutral-700)"}):null,"loading"===r.type?t.jsx(e.Spinner,{size:"lg",borderWidth:"3px",color:"var(--chakra-colors-primary-500)"}):null,"success"===r.type?r.meta?.icon?r.meta.icon:t.jsx(R,{color:"var(--chakra-colors-success-500)"}):null,"warning"===r.type?r.meta?.icon?r.meta.icon:t.jsx(L,{color:"var(--chakra-colors-warning-500)"}):null,"error"===r.type?r.meta?.icon?r.meta.icon:t.jsx(T,{color:"var(--chakra-colors-error-500)"}):null,t.jsxs(e.Stack,{gap:"1",flex:"1",maxWidth:"100%",children:[t.jsx(e.Toast.Title,{css:up,"aria-label":`${r.title}`,children:r.title}),r.description?t.jsx(e.Toast.Title,{css:dp,"aria-label":`${r.description}`,children:r.description}):null]})]}),r.action||r.meta?.closable?t.jsxs(e.Stack,{flexDirection:"row",children:[r.action?t.jsx(v,{css:pp,label:r.action.label,size:"small",variant:"info"===r.type?"primary":"secondary",onClick:()=>{r?.action?.onClick&&r.action.onClick(),xp[n].dismiss()}}):null,r.meta?.closable?t.jsx(v,{css:hp,label:r.meta.closableLabel,"aria-label":r.meta?.closableLabel||"Dismiss",leftIcon:t.jsx(S,{height:"10px!",width:"10px!"}),size:"small",variant:"secondary",onClick:()=>xp[n].dismiss()}):null]}):null]})})},n))),exports.designSystemStyles=u,exports.getThemedColor=d,exports.showToast=e=>{xp[e.placement].create({title:e.label,description:e.caption,duration:e.duration||5e3,meta:{closable:e.closable,icon:e.icon,closableLabel:e.closableLabel},...e})};
3263
+ `)}):t.jsx("div",{css:nr,children:e?.map(((e,r)=>t.jsx("div",{"data-test":`${e}-${n?.[r]}`,style:{backgroundColor:e,width:"100%",height:"100%"}},`${e}-${n?.[r]}`)))}),t.jsx("div",{css:rr,children:n?.map((e=>t.jsx("div",{style:{width:o?"auto":`calc(100% / ${n.length})`,display:"flex",justifyContent:"center"},children:t.jsx("p",{css:ir,children:e})},e)))}),i&&i.length?t.jsx("div",{css:rr,children:i.map((e=>t.jsx("div",{style:{width:o?"auto":`calc(100% / ${n.length})`,display:"flex",justifyContent:"center"},children:t.jsx("p",{css:or,style:{width:"100%"},children:e})},e)))}):null]});var a},exports.Select=zt,exports.Sheet=({header:e,content:n,footer:r,open:i=!1,onClose:o,minimizedHeight:a,midHeight:s=200,maxFullHeight:l,defaultSnap:c="minimized",className:u,blocking:d,zIndex:p=1e3})=>t.jsx(Ju,{css:Qu(!!e,p),className:u,open:i,onDismiss:o,header:e,footer:r,snapPoints:({headerHeight:e,maxHeight:t,footerHeight:n})=>[20,a||e,s+(r?n:0),l||t-t/6],defaultSnap:({headerHeight:e,maxHeight:t,footerHeight:n})=>{let i=20;return"minimized"===c?i=a||e:"mid"===c?i=s+(r?n:0):"full"===c&&(i=l||t-t/6),i},blocking:d,children:n}),exports.Slider=qe,exports.SliderInput=({label:e,caption:r,size:i="default",sliderItem:o,required:a,onChange:s})=>{const[l,c]=n.useState(o.value||[]),u=(e,t)=>{const n=e.target.value,r=[...l];let i=n?parseInt(n,10):n;const a=o.min||0,s=o.max||100;i=Number.isNaN(i)?a:i,i=i<a?a:i,i=i>s?s:i,r[t]=i,c(r)},d=(e,t)=>{const n=e.target.value||"0",r=[...l];let i=parseInt(n,10);const a=o.min||0,u=o.max||100;if(i=Number.isNaN(i)?a:i,i=i<a?a:i,i=i>u?u:i,2===l?.length){i=Number.isNaN(i)?a:i;const e=l[0],n=l[1];0===t?(i=i<a?a:i,i=i>n?n:i):1===t&&(i=i<e?e:i,i=i>u?u:i)}r[t]=i,c(r),s&&s(r)};return t.jsxs("div",{children:[t.jsxs("p",{css:en(i),"aria-label":e,children:[a?t.jsx("span",{children:"*"}):null,e]}),r?t.jsx("p",{css:tn(i),"aria-label":r,children:r}):null,t.jsxs("div",{css:nn,children:[o.step&&o.marks?t.jsx(zt,{items:o.marks.map((e=>({label:`${e.label}`,value:`${e.value}`}))),placeholder:"",style:{width:"90px"},value:[`${l?.[0]}`],onChange:e=>{const t=e.map((e=>parseInt(e,10)));c(t),s&&s(t)}}):t.jsx(ht,{"aria-label":e,min:o.min,max:o.max,value:l?.[0],type:"number",onChange:e=>u(e,0),onBlur:e=>d(e,0),className:"opacity-control-text-input",onClick:e=>e.target.select()}),t.jsx(qe,{css:{},...o,value:l,onValueChangeEnd:e=>{c(e.value),s&&s(e.value)}}),2===l?.length?t.jsx(ht,{"aria-label":e,min:o.min,max:o.max,value:l?.[1],type:"number",onChange:e=>u(e,1),onBlur:e=>d(e,1),className:"opacity-control-text-input",onClick:e=>e.target.select()}):null]})]})},exports.StepProgressIndicator=({steps:e,currentStep:n})=>t.jsxs("div",{css:op,children:[e.map(((e,r)=>t.jsxs("div",{css:ap,children:[t.jsx("button",{css:sp(n>=r+1,n<r+1),type:"button",onClick:e.onClick,"aria-current":n===r+1,"aria-disabled":n<r+1,disabled:n<r+1,"aria-label":`Current Step ${r}${e.label?` ${e.label}`:""}`,"data-active":n>=r+1,children:n>r+1?t.jsx(y,{height:"16px",width:"16px"}):r+1}),e.label?t.jsx("p",{css:lp(n===r+1),children:e.label}):null]},`${e.label}-${r}`))),t.jsx("div",{css:cp,children:t.jsx("div",{css:up})})]}),exports.Switch=Ue,exports.TabBar=({variant:r="panel",defaultValue:i,tabs:o,onTabClick:a})=>{const[s,l]=n.useState(zd(o,i)||0),c="view"===r;return t.jsx("div",{css:Md(r),children:t.jsx(e.Tabs.Root,{width:"full",defaultValue:i||o?.[0]?.value,onValueChange:({value:e})=>{return l(zd(o,t=e)),void(a&&a(t));var t},children:t.jsx(e.Tabs.List,{alignItems:"center",border:"none",children:o.map(((r,i)=>t.jsxs(n.Fragment,{children:[c&&1===i&&"left"===Ad(s)?t.jsx("div",{css:Nd}):null,t.jsx(e.Tabs.Trigger,{css:[Dd,c?Vd:Id],"aria-label":r["aria-label"]||r.label,...r,children:t.jsxs(e.Box,{display:"flex",alignItems:"center",gap:"5px",children:[r.icon,r.label]})},r.label),c&&1===i&&"right"===Ad(s)?t.jsx("div",{css:Nd}):null]},r.label)))})})})},exports.Table=({columns:r,data:i,renderRow:o,striped:a,stickyHeader:s,pagination:l,selectable:c,selectedRows:u,onSortColumn:d,onPageSizeChange:p,onPageChange:h,onAllItemsSelected:f})=>{const[x,g]=n.useState({key:"",order:""}),{totalItems:v=i.length,currentPage:m=1,pageSize:b=10,showItemCount:y,showItemCountText:C}=l||{},w=(e,t)=>{g({key:e,order:t}),d&&d({key:e,order:t})},k=u?.length===i?.length,S=u&&u.length>0&&!k;return t.jsxs("div",{children:[t.jsxs(e.Table.Root,{css:kr,striped:a,stickyHeader:s,interactive:!0,children:[t.jsx(e.Table.Header,{css:Sr,children:t.jsxs(e.Table.Row,{children:[c?t.jsx(e.Table.ColumnHeader,{children:t.jsx(Ce,{name:"header-checkbox",checked:k,indeterminate:S,onCheckedChange:({checked:e})=>{f&&f(e)}})}):null,r.map((n=>t.jsx(e.Table.ColumnHeader,{role:n.sortable?"columnheader":void 0,"aria-sort":n.sortable&&"asc"===x.order?"ascending":n.sortable&&"desc"===x.order?"descending":void 0,children:t.jsxs("div",{css:$r,children:[n.label,n.sortable?t.jsxs("div",{css:Er,children:[t.jsx(Q,{css:Or(x.key===n.key&&"asc"===x.order),icon:t.jsx(j,{style:{transform:"rotate(180deg)"}}),onClick:()=>w(n.key,"asc"),"aria-label":"Ascending"}),t.jsx(Q,{css:Or(x.key===n.key&&"desc"===x.order),icon:t.jsx(j,{}),onClick:()=>w(n.key,"desc"),"aria-label":"Descending"})]}):null]})},n.key)))]})}),t.jsx(e.Table.Body,{children:i.map((e=>t.jsx(n.Fragment,{children:o(e)},e.id)))})]}),t.jsxs("div",{css:Rr,children:[t.jsx("div",{children:y?t.jsx(ur,{pageSize:b,currentPage:m,totalItems:v,onPageSizeChange:p,showItemCountText:C}):null}),l?t.jsx("div",{css:Lr,children:t.jsx(jr,{totalItems:v,pageSize:b,currentPage:m,onPageChange:h})}):null]})]})},exports.TableCell=_r,exports.TableRow=Tr,exports.Tag=It,exports.TextInput=ht,exports.Textarea=({label:r,caption:i,placeholder:o,errorMessage:a,required:s,disabled:l,size:c="default",defaultValue:u="",onChange:d,minLength:p,maxLength:h,...f})=>{const[x,g]=n.useState(u),[v,m]=n.useState(!1),[b,y]=n.useState(!1),[C,w]=n.useState(""),j=n.useId(),k=n.useId(),S=n.useId();n.useEffect((()=>{const{length:e}=u;p&&e<p&&e>0?(m(e<p),y(!1),w(`Enter at least ${p-e} characters`)):p&&0===e&&w(`Min ${p} characters`),h&&e>0?(m(!1),y(e>h),w(`You have ${h-e} characters remaining`)):h&&0===e&&w(`Max ${h} characters`)}),[]);const $=!!a||v||b,E=[i?j:null,$?k:null,C?S:null].filter(Boolean).join(" ")||void 0;return t.jsxs("div",{css:rn(c),children:[$?t.jsx("div",{css:on}):null,t.jsxs(e.Field.Root,{required:s,invalid:$,gap:"0",style:{marginLeft:$?"19px":"0px"},children:[r?t.jsxs(e.Field.Label,{css:an(c,l),"aria-label":r,children:[t.jsx(e.Field.RequiredIndicator,{"aria-label":"required"}),r,s?"":t.jsx("span",{children:" (Optional)"})]}):null,i?t.jsx(e.Field.HelperText,{id:j,css:sn(c,l),children:i}):null,a?t.jsx(e.Field.ErrorText,{id:k,css:cn,"aria-label":`Error: ${a}`,"aria-live":"polite",children:a}):null,t.jsx(e.Textarea,{placeholder:o,disabled:l,css:un(c,x,u),onChange:e=>{g(e.target.value);const{length:t}=e.target.value;p&&h?(m(t<p),y(t>h),w(`You have ${h-t} characters remaining`)):p?(m(t<p),y(!1),w(t<p?`Enter at least ${p-t} characters`:"")):h&&(y(t>h),m(!1),w(`You have ${h-t} characters remaining`)),d&&d(e)},value:x,"aria-describedby":E,_placeholder:{color:"var(--chakra-colors-neutral-500)"},...f}),v&&p?t.jsxs(e.Field.ErrorText,{id:k,css:cn,style:{marginTop:"8px",fontSize:"12px",lineHeight:"16px"},"aria-live":"polite",children:["You need ",p-x.length," more characters"]}):null,b&&h?t.jsxs(e.Field.ErrorText,{id:k,css:cn,style:{marginTop:"8px",fontSize:"12px",lineHeight:"16px"},"aria-live":"polite",children:["You have ",x.length-h," characters too many"]}):null,!C||b||v?null:t.jsx(e.Field.HelperText,{id:S,css:ln,"aria-live":"polite",children:C})]})]})},exports.Toast=()=>Object.keys(vp).map((n=>t.jsx(e.Portal,{children:t.jsx(e.Toaster,{toaster:vp[n],insetInline:{mdDown:"4"},children:r=>t.jsxs(e.Toast.Root,{css:dp,width:{md:"sm"},children:[t.jsxs(e.Stack,{flexDirection:"row",className:"icon-container",children:["info"===r.type?r.meta?.icon?r.meta.icon:t.jsx(w,{color:"var(--chakra-colors-neutral-700)"}):null,"loading"===r.type?t.jsx(e.Spinner,{size:"lg",borderWidth:"3px",color:"var(--chakra-colors-primary-500)"}):null,"success"===r.type?r.meta?.icon?r.meta.icon:t.jsx(R,{color:"var(--chakra-colors-success-500)"}):null,"warning"===r.type?r.meta?.icon?r.meta.icon:t.jsx(L,{color:"var(--chakra-colors-warning-500)"}):null,"error"===r.type?r.meta?.icon?r.meta.icon:t.jsx(T,{color:"var(--chakra-colors-error-500)"}):null,t.jsxs(e.Stack,{gap:"1",flex:"1",maxWidth:"100%",children:[t.jsx(e.Toast.Title,{css:pp,"aria-label":`${r.title}`,children:r.title}),r.description?t.jsx(e.Toast.Title,{css:hp,"aria-label":`${r.description}`,children:r.description}):null]})]}),r.action||r.meta?.closable?t.jsxs(e.Stack,{flexDirection:"row",children:[r.action?t.jsx(v,{css:fp,label:r.action.label,size:"small",variant:"info"===r.type?"primary":"secondary",onClick:()=>{r?.action?.onClick&&r.action.onClick(),vp[n].dismiss()}}):null,r.meta?.closable?t.jsx(v,{css:xp,label:r.meta.closableLabel,"aria-label":r.meta?.closableLabel||"Dismiss",leftIcon:t.jsx(S,{height:"10px!",width:"10px!"}),size:"small",variant:"secondary",onClick:()=>vp[n].dismiss()}):null]}):null]})})},n))),exports.designSystemStyles=u,exports.getThemedColor=d,exports.showToast=e=>{vp[e.placement].create({title:e.label,description:e.caption,duration:e.duration||5e3,meta:{closable:e.closable,icon:e.icon,closableLabel:e.closableLabel},...e})};