@worldresources/wri-design-systems 2.155.0 → 2.156.1
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 +120 -109
- package/dist/index.d.ts +2 -1
- package/dist/index.esm.js +115 -104
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -2209,13 +2209,17 @@
|
|
|
2209
2209
|
color: ${h("neutral",900)};
|
|
2210
2210
|
font-weight: 700;
|
|
2211
2211
|
}
|
|
2212
|
-
`,Gi=({totalItems:n,pageSize:r,currentPage:o,variant:i="default",onPageChange:a})=>{const s="compact"===i||"compact-with-buttons"===i,l="compact-with-buttons"===i;return t.jsx("div",{"aria-label":"Pagination",children:t.jsx(e.Pagination.Root,{count:n,pageSize:r,defaultPage:o,onPageChange:e=>a&&a(e.page),siblingCount:1,children:t.jsxs(e.ButtonGroup,{gap:"2",size:"sm",variant:"ghost",css:Zi,children:[t.jsx(e.Pagination.PrevTrigger,{asChild:!0,children:l?t.jsx(b,{variant:"secondary",label:"Previous",size:"small",leftIcon:t.jsx($,{style:{rotate:"90deg"},color:"var(--chakra-colors-primary-500)"})}):t.jsx(ie,{css:Hi,style:{rotate:"90deg"},icon:t.jsx($,{}),"aria-label":"Previous page"})}),s?t.jsx(e.Pagination.PageText,{css:Fi}):t.jsx(e.Pagination.Items,{render:e=>t.jsx(ie,{css:Wi,"aria-label":`Page ${e.value}`,icon:t.jsx("p",{children:e.value})})}),t.jsx(e.Pagination.NextTrigger,{asChild:!0,children:l?t.jsx(b,{variant:"secondary",label:"Next",size:"small",rightIcon:t.jsx($,{style:{rotate:"270deg"},color:"var(--chakra-colors-primary-500)"})}):t.jsx(ie,{css:Hi,style:{rotate:"270deg"},icon:t.jsx($,{}),"aria-label":"Next page"})})]})})})},qi=r.css`
|
|
2213
|
-
border: 1px solid ${h("neutral",300)};
|
|
2212
|
+
`,Gi=({totalItems:n,pageSize:r,currentPage:o,variant:i="default",onPageChange:a})=>{const s="compact"===i||"compact-with-buttons"===i,l="compact-with-buttons"===i;return t.jsx("div",{"aria-label":"Pagination",children:t.jsx(e.Pagination.Root,{count:n,pageSize:r,defaultPage:o,onPageChange:e=>a&&a(e.page),siblingCount:1,children:t.jsxs(e.ButtonGroup,{gap:"2",size:"sm",variant:"ghost",css:Zi,children:[t.jsx(e.Pagination.PrevTrigger,{asChild:!0,children:l?t.jsx(b,{variant:"secondary",label:"Previous",size:"small",leftIcon:t.jsx($,{style:{rotate:"90deg"},color:"var(--chakra-colors-primary-500)"})}):t.jsx(ie,{css:Hi,style:{rotate:"90deg"},icon:t.jsx($,{}),"aria-label":"Previous page"})}),s?t.jsx(e.Pagination.PageText,{css:Fi}):t.jsx(e.Pagination.Items,{render:e=>t.jsx(ie,{css:Wi,"aria-label":`Page ${e.value}`,icon:t.jsx("p",{children:e.value})})}),t.jsx(e.Pagination.NextTrigger,{asChild:!0,children:l?t.jsx(b,{variant:"secondary",label:"Next",size:"small",rightIcon:t.jsx($,{style:{rotate:"270deg"},color:"var(--chakra-colors-primary-500)"})}):t.jsx(ie,{css:Hi,style:{rotate:"270deg"},icon:t.jsx($,{}),"aria-label":"Next page"})})]})})})},qi=e=>r.css`
|
|
2213
|
+
border: ${"full-width"===e?"none":`1px solid ${h("neutral",300)}`};
|
|
2214
2214
|
border-radius: 2px;
|
|
2215
|
-
box-shadow: 0 0 0 1px ${h("neutral",300)};
|
|
2216
|
-
`,Ui=r.css`
|
|
2215
|
+
box-shadow: ${"full-width"===e?"none":`0 0 0 1px ${h("neutral",300)}`};
|
|
2216
|
+
`,Ui=e=>r.css`
|
|
2217
2217
|
tr {
|
|
2218
|
-
background-color: ${h("neutral",200)};
|
|
2218
|
+
background-color: ${h("neutral","full-width"===e?100:200)};
|
|
2219
|
+
|
|
2220
|
+
th {
|
|
2221
|
+
border-color: ${h("neutral",300)};
|
|
2222
|
+
}
|
|
2219
2223
|
}
|
|
2220
2224
|
`,Xi=r.css`
|
|
2221
2225
|
font-size: 16px;
|
|
@@ -2237,7 +2241,6 @@
|
|
|
2237
2241
|
height: 10px;
|
|
2238
2242
|
width: 10px !important;
|
|
2239
2243
|
min-width: 10px !important;
|
|
2240
|
-
background-color: transparent;
|
|
2241
2244
|
|
|
2242
2245
|
svg {
|
|
2243
2246
|
height: 10px;
|
|
@@ -2250,7 +2253,7 @@
|
|
|
2250
2253
|
`,Ki=e=>r.css`
|
|
2251
2254
|
svg {
|
|
2252
2255
|
path {
|
|
2253
|
-
fill: ${e?h("primary",600):h("neutral"
|
|
2256
|
+
fill: ${e?h("primary",600):h("accessible","controls-on-neutral-lights")} !important;
|
|
2254
2257
|
}
|
|
2255
2258
|
}
|
|
2256
2259
|
`,Ji=r.css`
|
|
@@ -2259,9 +2262,17 @@
|
|
|
2259
2262
|
justify-content: space-between;
|
|
2260
2263
|
`,Qi=r.css`
|
|
2261
2264
|
margin-top: 9px;
|
|
2262
|
-
`,ea=
|
|
2265
|
+
`,ea=r.css`
|
|
2266
|
+
tr {
|
|
2267
|
+
height: 48px;
|
|
2268
|
+
|
|
2269
|
+
td {
|
|
2270
|
+
border-color: ${h("neutral",300)};
|
|
2271
|
+
}
|
|
2272
|
+
}
|
|
2273
|
+
`,ta=e.Table.Row,na=e.Table.Cell,ra=r.css`
|
|
2263
2274
|
border: 1px solid ${h("neutral",300)};
|
|
2264
|
-
`,
|
|
2275
|
+
`,oa=r.css`
|
|
2265
2276
|
padding: 16px;
|
|
2266
2277
|
cursor: pointer;
|
|
2267
2278
|
&:focus-visible {
|
|
@@ -2276,9 +2287,9 @@
|
|
|
2276
2287
|
transparent
|
|
2277
2288
|
);
|
|
2278
2289
|
}
|
|
2279
|
-
`,oa=r.css`
|
|
2280
|
-
border: 1px solid ${h("neutral",300)};
|
|
2281
2290
|
`,ia=r.css`
|
|
2291
|
+
border: 1px solid ${h("neutral",300)};
|
|
2292
|
+
`,aa=r.css`
|
|
2282
2293
|
padding: 16px;
|
|
2283
2294
|
|
|
2284
2295
|
cursor: pointer;
|
|
@@ -2296,7 +2307,7 @@
|
|
|
2296
2307
|
transparent
|
|
2297
2308
|
);
|
|
2298
2309
|
}
|
|
2299
|
-
`,
|
|
2310
|
+
`,sa=r.css`
|
|
2300
2311
|
.item-content-open > * {
|
|
2301
2312
|
max-height: auto;
|
|
2302
2313
|
|
|
@@ -2317,9 +2328,9 @@
|
|
|
2317
2328
|
padding-bottom 0.2s ease,
|
|
2318
2329
|
padding-top 0.2s ease;
|
|
2319
2330
|
}
|
|
2320
|
-
`,
|
|
2331
|
+
`,la=r.css`
|
|
2321
2332
|
border-top: 1px solid ${h("neutral",300)};
|
|
2322
|
-
`;function
|
|
2333
|
+
`;function ca(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function ua(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 da,pa={exports:{}},ha={},fa={exports:{}},xa={exports:{}},ga={};var va,ma,ba,ya,wa,Ca,ja,ka,$a,Sa,Ea,Ra,Oa,La={};
|
|
2323
2334
|
/** @license React v16.13.1
|
|
2324
2335
|
* react-is.development.js
|
|
2325
2336
|
*
|
|
@@ -2327,7 +2338,7 @@
|
|
|
2327
2338
|
*
|
|
2328
2339
|
* This source code is licensed under the MIT license found in the
|
|
2329
2340
|
* LICENSE file in the root directory of this source tree.
|
|
2330
|
-
*/function La(){return va||(va=1,"production"===process.env.NODE_ENV?fa.exports=function(){if(ua)return xa;ua=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,o=e?Symbol.for("react.strict_mode"):60108,i=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 i:case o: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 xa.AsyncMode=l,xa.ConcurrentMode=c,xa.ContextConsumer=s,xa.ContextProvider=a,xa.Element=t,xa.ForwardRef=u,xa.Fragment=r,xa.Lazy=f,xa.Memo=h,xa.Portal=n,xa.Profiler=i,xa.StrictMode=o,xa.Suspense=d,xa.isAsyncMode=function(e){return y(e)||b(e)===l},xa.isConcurrentMode=y,xa.isContextConsumer=function(e){return b(e)===s},xa.isContextProvider=function(e){return b(e)===a},xa.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},xa.isForwardRef=function(e){return b(e)===u},xa.isFragment=function(e){return b(e)===r},xa.isLazy=function(e){return b(e)===f},xa.isMemo=function(e){return b(e)===h},xa.isPortal=function(e){return b(e)===n},xa.isProfiler=function(e){return b(e)===i},xa.isStrictMode=function(e){return b(e)===o},xa.isSuspense=function(e){return b(e)===d},xa.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===i||e===o||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)},xa.typeOf=b,xa}():fa.exports=(ga||(ga=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,o=e?Symbol.for("react.strict_mode"):60108,i=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 i:case o: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,w=c,C=s,j=a,k=t,$=u,S=r,E=f,R=h,O=n,L=i,T=o,P=d,M=!1;function _(e){return b(e)===c}Oa.AsyncMode=y,Oa.ConcurrentMode=w,Oa.ContextConsumer=C,Oa.ContextProvider=j,Oa.Element=k,Oa.ForwardRef=$,Oa.Fragment=S,Oa.Lazy=E,Oa.Memo=R,Oa.Portal=O,Oa.Profiler=L,Oa.StrictMode=T,Oa.Suspense=P,Oa.isAsyncMode=function(e){return M||(M=!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.")),_(e)||b(e)===l},Oa.isConcurrentMode=_,Oa.isContextConsumer=function(e){return b(e)===s},Oa.isContextProvider=function(e){return b(e)===a},Oa.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Oa.isForwardRef=function(e){return b(e)===u},Oa.isFragment=function(e){return b(e)===r},Oa.isLazy=function(e){return b(e)===f},Oa.isMemo=function(e){return b(e)===h},Oa.isPortal=function(e){return b(e)===n},Oa.isProfiler=function(e){return b(e)===i},Oa.isStrictMode=function(e){return b(e)===o},Oa.isSuspense=function(e){return b(e)===d},Oa.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===i||e===o||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)},Oa.typeOf=b}()),Oa)),fa.exports}function Ta(){if(ba)return ma;ba=1;return ma="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function Pa(){return wa?ya:(wa=1,ya=Function.call.bind(Object.prototype.hasOwnProperty))}function Ma(){if($a)return ka;$a=1;var e=La(),t=a,n=Ta(),r=Pa(),o=function(){if(ja)return Ca;ja=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=Ta(),n={},r=Pa();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function o(o,i,a,s,l){if("production"!==process.env.NODE_ENV)for(var c in o)if(r(o,c)){var u;try{if("function"!=typeof o[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 o[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}u=o[c](i,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 o.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(n={})},Ca=o}(),i=function(){};function s(){return null}return"production"!==process.env.NODE_ENV&&(i=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),ka=function(a,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,o,i,a){if("function"!=typeof e)return new h("Property `"+a+"` of component `"+o+"` has invalid PropType notation inside arrayOf.");var s=t[r];if(!Array.isArray(s))return new h("Invalid "+i+" `"+a+"` of type `"+m(s)+"` supplied to `"+o+"`, expected an array.");for(var l=0;l<s.length;l++){var c=e(s,l,o,i,a+"["+l+"]",n);if(c instanceof Error)return c}return null}))},element:f((function(e,t,n,r,o){var i=e[t];return a(i)?null:new h("Invalid "+r+" `"+o+"` of type `"+m(i)+"` supplied to `"+n+"`, expected a single ReactElement.")})),elementType:f((function(t,n,r,o,i){var a=t[n];return e.isValidElementType(a)?null:new h("Invalid "+o+" `"+i+"` of type `"+m(a)+"` supplied to `"+r+"`, expected a single ReactElement type.")})),instanceOf:function(e){return f((function(t,n,r,o,i){if(!(t[n]instanceof e)){var a=e.name||u;return new h("Invalid "+o+" `"+i+"` 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,o){return v(e[t])?null:new h("Invalid "+r+" `"+o+"` supplied to `"+n+"`, expected a ReactNode.")})),objectOf:function(e){return f((function(t,o,i,a,s){if("function"!=typeof e)return new h("Property `"+s+"` of component `"+i+"` has invalid PropType notation inside objectOf.");var l=t[o],c=m(l);if("object"!==c)return new h("Invalid "+a+" `"+s+"` of type `"+c+"` supplied to `"+i+"`, expected an object.");for(var u in l)if(r(l,u)){var d=e(l,u,i,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&&i(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,o,i){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 "+o+" `"+i+"` of value `"+String(a)+"` supplied to `"+r+"`, expected one of "+l+".")}))},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&i("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var t=0;t<e.length;t++){var o=e[t];if("function"!=typeof o)return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+y(o)+" at index "+t+"."),s}return f((function(t,o,i,a,s){for(var l=[],c=0;c<e.length;c++){var u=(0,e[c])(t,o,i,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 `"+i+"`"+(l.length>0?", expected one of type ["+l.join(", ")+"]":"")+".")}))},shape:function(e){return f((function(t,r,o,i,a){var s=t[r],l=m(s);if("object"!==l)return new h("Invalid "+i+" `"+a+"` of type `"+l+"` supplied to `"+o+"`, expected `object`.");for(var c in e){var u=e[c];if("function"!=typeof u)return g(o,i,a,c,b(u));var d=u(s,c,o,i,a+"."+c,n);if(d)return d}return null}))},exact:function(e){return f((function(o,i,a,s,l){var c=o[i],u=m(c);if("object"!==u)return new h("Invalid "+s+" `"+l+"` of type `"+u+"` supplied to `"+a+"`, expected `object`.");var d=t({},o[i],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(o[i],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 o(o,a,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&&(i("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==a[s]?o?null===a[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(a,s,c,d,p)}var a=o.bind(null,!1);return a.isRequired=o.bind(null,!0),a}function x(e){return f((function(t,n,r,o,i,a){var s=t[n];return m(s)!==e?new h("Invalid "+o+" `"+i+"` of type `"+b(s)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null}))}function g(e,t,n,r,o){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 `"+o+"`.")}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||a(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 o=n.value;if(o&&!v(o[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=o,d.resetWarningCache=o.resetWarningCache,d.PropTypes=d,d},ka}function _a(){if(Ra)return ha.exports;if(Ra=1,"production"!==process.env.NODE_ENV){var e=La();ha.exports=Ma()(e.isElement,!0)}else ha.exports=function(){if(Ea)return Sa;Ea=1;var e=Ta();function t(){}function n(){}return n.resetWarningCache=t,Sa=function(){function r(t,n,r,o,i,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 o(){return r}r.isRequired=r;var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i}}()();return ha.exports}function Da(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=Da(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Ia(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Da(e))&&(r&&(r+=" "),r+=t);return r}var Va,Na=ca(Object.freeze({__proto__:null,clsx:Ia,default:Ia})),Aa={},za={};function Ba(){if(Va)return za;return Va=1,Object.defineProperty(za,"__esModule",{value:!0}),za.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."))},za.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]},za.int=function(e){return parseInt(e,10)},za.isFunction=function(e){return"function"==typeof e||"[object Function]"===Object.prototype.toString.call(e)},za.isNum=function(e){return"number"==typeof e&&!isNaN(e)},za}var Ha,Fa,Za={};function Wa(){if(Fa)return Aa;Fa=1,Object.defineProperty(Aa,"__esModule",{value:!0}),Aa.addClassName=a,Aa.addEvent=function(e,t,n,r){if(!e)return;const o={capture:!0,...r};e.addEventListener?e.addEventListener(t,n,o):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n},Aa.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")},Aa.createCSSTransform=function(e,n){const r=i(e,n,"px");return{[(0,t.browserPrefixToKey)("transform",t.default)]:r}},Aa.createSVGTransform=function(e,t){return i(e,t,"")},Aa.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))},Aa.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},Aa.getTranslation=i,Aa.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},Aa.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},Aa.matchesSelector=o,Aa.matchesSelectorAndParentsTo=function(e,t,n){let r=e;do{if(o(r,t))return!0;if(r===n)return!1;r=r.parentNode}while(r);return!1},Aa.offsetXYFromParent=function(e,t,n){const r=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect(),o=(e.clientX+t.scrollLeft-r.left)/n,i=(e.clientY+t.scrollTop-r.top)/n;return{x:o,y:i}},Aa.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},Aa.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},Aa.removeClassName=s,Aa.removeEvent=function(e,t,n,r){if(!e)return;const o={capture:!0,...r};e.removeEventListener?e.removeEventListener(t,n,o):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null},Aa.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=Ba(),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 o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var s=i?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(o,a,s):o[a]=e[a]}o.default=e,r&&r.set(e,o);return o}(function(){if(Ha)return Za;Ha=1,Object.defineProperty(Za,"__esModule",{value:!0}),Za.browserPrefixToKey=n,Za.browserPrefixToStyle=function(e,t){return t?"-".concat(t.toLowerCase(),"-").concat(e):e},Za.default=void 0,Za.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 o=null===(t=window.document)||void 0===t||null===(t=t.documentElement)||void 0===t?void 0:t.style;if(!o)return"";if(r in o)return"";for(let t=0;t<e.length;t++)if(n(r,e[t])in o)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 Za.default=t(),Za}());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 o(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 i(e,t,n){let{x:r,y:o}=e,i="translate(".concat(r).concat(n,",").concat(o).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);i="translate(".concat(e,", ").concat(r,")")+i}return i}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 Aa}var Ga,qa={};function Ua(){if(Ga)return qa;Ga=1,Object.defineProperty(qa,"__esModule",{value:!0}),qa.canDragX=function(e){return"both"===e.props.axis||"x"===e.props.axis},qa.canDragY=function(e){return"both"===e.props.axis||"y"===e.props.axis},qa.createCoreData=function(t,r,o){const i=!(0,e.isNum)(t.lastX),a=n(t);return i?{node:a,deltaX:0,deltaY:0,lastX:r,lastY:o,x:r,y:o}:{node:a,deltaX:r-t.lastX,deltaY:o-t.lastY,lastX:t.lastX,lastY:t.lastY,x:r,y:o}},qa.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}},qa.getBoundPosition=function(r,o,i){if(!r.props.bounds)return[o,i];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 o;if(o="parent"===a?s.parentNode:n.querySelector(a),!(o instanceof r.HTMLElement))throw new Error('Bounds selector "'+a+'" could not find an element.');const i=o,l=r.getComputedStyle(s),c=r.getComputedStyle(i);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)(i)-(0,t.outerWidth)(s)-s.offsetLeft+(0,e.int)(c.paddingRight)-(0,e.int)(l.marginRight),bottom:(0,t.innerHeight)(i)-(0,t.outerHeight)(s)-s.offsetTop+(0,e.int)(c.paddingBottom)-(0,e.int)(l.marginBottom)}}(0,e.isNum)(a.right)&&(o=Math.min(o,a.right));(0,e.isNum)(a.bottom)&&(i=Math.min(i,a.bottom));(0,e.isNum)(a.left)&&(o=Math.max(o,a.left));(0,e.isNum)(a.top)&&(i=Math.max(i,a.top));return[o,i]},qa.getControlPosition=function(e,r,o){const i="number"==typeof r?(0,t.getTouch)(e,r):null;if("number"==typeof r&&!i)return null;const a=n(o),s=o.props.offsetParent||a.offsetParent||a.ownerDocument.body;return(0,t.offsetXYFromParent)(i||e,s,o.props.scale)},qa.snapToGrid=function(e,t,n){const r=Math.round(t/e[0])*e[0],o=Math.round(n/e[1])*e[1];return[r,o]};var e=Ba(),t=Wa();function n(e){const t=e.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}return qa}var Xa,Ya,Ka,Ja,Qa={},es={};function ts(){if(Xa)return es;return Xa=1,Object.defineProperty(es,"__esModule",{value:!0}),es.default=function(){},es}function ns(){if(Ya)return Qa;Ya=1,Object.defineProperty(Qa,"__esModule",{value:!0}),Qa.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={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n),t=c(_a()),r=c(i),o=Wa(),a=Ua(),s=Ba(),l=c(ts());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,o.matchesSelectorAndParentsTo)(e.target,this.props.handle,t)||this.props.cancel&&(0,o.matchesSelectorAndParentsTo)(e.target,this.props.cancel,t))return;"touchstart"===e.type&&e.preventDefault();const r=(0,o.getTouchIdentifier)(e);this.touchIdentifier=r;const i=(0,a.getControlPosition)(e,r,this);if(null==i)return;const{x:s,y:c}=i,u=(0,a.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,o.addUserSelectStyles)(n),this.dragging=!0,this.lastX=s,this.lastY=c,(0,o.addEvent)(n,f.move,this.handleDrag),(0,o.addEvent)(n,f.stop,this.handleDragStop))})),d(this,"handleDrag",(e=>{const t=(0,a.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,a.snapToGrid)(this.props.grid,e,t),!e&&!t)return;n=this.lastX+e,r=this.lastY+t}const o=(0,a.createCoreData)(this,n,r);(0,l.default)("DraggableCore: handleDrag: %j",o);if(!1!==this.props.onDrag(e,o)&&!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,a.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,a.snapToGrid)(this.props.grid,e,t),n=this.lastX+e,r=this.lastY+t}const i=(0,a.createCoreData)(this,n,r);if(!1===this.props.onStop(e,i)||!1===this.mounted)return!1;const s=this.findDOMNode();s&&this.props.enableUserSelectHack&&(0,o.removeUserSelectStyles)(s.ownerDocument),(0,l.default)("DraggableCore: handleDragStop: %j",i),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,s&&((0,l.default)("DraggableCore: Removing handlers"),(0,o.removeEvent)(s.ownerDocument,f.move,this.handleDrag),(0,o.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,o.addEvent)(e,p.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const e=this.findDOMNode();if(e){const{ownerDocument:t}=e;(0,o.removeEvent)(t,h.move,this.handleDrag),(0,o.removeEvent)(t,p.move,this.handleDrag),(0,o.removeEvent)(t,h.stop,this.handleDragStop),(0,o.removeEvent)(t,p.stop,this.handleDragStop),(0,o.removeEvent)(e,p.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,o.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 Qa.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}),Qa}function rs(){return Ka||(Ka=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={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n),r=p(_a()),o=p(i),a=p(Na),s=Wa(),l=Ua(),c=Ba(),u=p(ns()),d=p(ts());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[o,i]=(0,l.getBoundPosition)(this,r.x,r.y);r.x=o,r.y=i,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:o.default.findDOMNode(this)}render(){const{axis:e,bounds:n,children:r,defaultPosition:o,defaultClassName:i,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||o,w={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)(w,h):v=(0,s.createCSSTransform)(w,h);const C=(0,a.default)(r.props.className||"",i,{[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:C,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})}(pa)),pa}var os=function(){if(Ja)return da.exports;Ja=1;const{default:e,DraggableCore:t}=rs();return da.exports=e,da.exports.default=e,da.exports.DraggableCore=t,da.exports}(),is=la(os);const as=e=>r.css`
|
|
2341
|
+
*/function Ta(){return ma||(ma=1,"production"===process.env.NODE_ENV?xa.exports=function(){if(da)return ga;da=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,o=e?Symbol.for("react.strict_mode"):60108,i=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 i:case o: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 ga.AsyncMode=l,ga.ConcurrentMode=c,ga.ContextConsumer=s,ga.ContextProvider=a,ga.Element=t,ga.ForwardRef=u,ga.Fragment=r,ga.Lazy=f,ga.Memo=h,ga.Portal=n,ga.Profiler=i,ga.StrictMode=o,ga.Suspense=d,ga.isAsyncMode=function(e){return y(e)||b(e)===l},ga.isConcurrentMode=y,ga.isContextConsumer=function(e){return b(e)===s},ga.isContextProvider=function(e){return b(e)===a},ga.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},ga.isForwardRef=function(e){return b(e)===u},ga.isFragment=function(e){return b(e)===r},ga.isLazy=function(e){return b(e)===f},ga.isMemo=function(e){return b(e)===h},ga.isPortal=function(e){return b(e)===n},ga.isProfiler=function(e){return b(e)===i},ga.isStrictMode=function(e){return b(e)===o},ga.isSuspense=function(e){return b(e)===d},ga.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===i||e===o||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)},ga.typeOf=b,ga}():xa.exports=(va||(va=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,o=e?Symbol.for("react.strict_mode"):60108,i=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 i:case o: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,w=c,C=s,j=a,k=t,$=u,S=r,E=f,R=h,O=n,L=i,T=o,P=d,M=!1;function _(e){return b(e)===c}La.AsyncMode=y,La.ConcurrentMode=w,La.ContextConsumer=C,La.ContextProvider=j,La.Element=k,La.ForwardRef=$,La.Fragment=S,La.Lazy=E,La.Memo=R,La.Portal=O,La.Profiler=L,La.StrictMode=T,La.Suspense=P,La.isAsyncMode=function(e){return M||(M=!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.")),_(e)||b(e)===l},La.isConcurrentMode=_,La.isContextConsumer=function(e){return b(e)===s},La.isContextProvider=function(e){return b(e)===a},La.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},La.isForwardRef=function(e){return b(e)===u},La.isFragment=function(e){return b(e)===r},La.isLazy=function(e){return b(e)===f},La.isMemo=function(e){return b(e)===h},La.isPortal=function(e){return b(e)===n},La.isProfiler=function(e){return b(e)===i},La.isStrictMode=function(e){return b(e)===o},La.isSuspense=function(e){return b(e)===d},La.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===i||e===o||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)},La.typeOf=b}()),La)),xa.exports}function Pa(){if(ya)return ba;ya=1;return ba="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function Ma(){return Ca?wa:(Ca=1,wa=Function.call.bind(Object.prototype.hasOwnProperty))}function _a(){if(Sa)return $a;Sa=1;var e=Ta(),t=a,n=Pa(),r=Ma(),o=function(){if(ka)return ja;ka=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=Pa(),n={},r=Ma();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function o(o,i,a,s,l){if("production"!==process.env.NODE_ENV)for(var c in o)if(r(o,c)){var u;try{if("function"!=typeof o[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 o[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}u=o[c](i,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 o.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(n={})},ja=o}(),i=function(){};function s(){return null}return"production"!==process.env.NODE_ENV&&(i=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),$a=function(a,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,o,i,a){if("function"!=typeof e)return new h("Property `"+a+"` of component `"+o+"` has invalid PropType notation inside arrayOf.");var s=t[r];if(!Array.isArray(s))return new h("Invalid "+i+" `"+a+"` of type `"+m(s)+"` supplied to `"+o+"`, expected an array.");for(var l=0;l<s.length;l++){var c=e(s,l,o,i,a+"["+l+"]",n);if(c instanceof Error)return c}return null}))},element:f((function(e,t,n,r,o){var i=e[t];return a(i)?null:new h("Invalid "+r+" `"+o+"` of type `"+m(i)+"` supplied to `"+n+"`, expected a single ReactElement.")})),elementType:f((function(t,n,r,o,i){var a=t[n];return e.isValidElementType(a)?null:new h("Invalid "+o+" `"+i+"` of type `"+m(a)+"` supplied to `"+r+"`, expected a single ReactElement type.")})),instanceOf:function(e){return f((function(t,n,r,o,i){if(!(t[n]instanceof e)){var a=e.name||u;return new h("Invalid "+o+" `"+i+"` 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,o){return v(e[t])?null:new h("Invalid "+r+" `"+o+"` supplied to `"+n+"`, expected a ReactNode.")})),objectOf:function(e){return f((function(t,o,i,a,s){if("function"!=typeof e)return new h("Property `"+s+"` of component `"+i+"` has invalid PropType notation inside objectOf.");var l=t[o],c=m(l);if("object"!==c)return new h("Invalid "+a+" `"+s+"` of type `"+c+"` supplied to `"+i+"`, expected an object.");for(var u in l)if(r(l,u)){var d=e(l,u,i,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&&i(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,o,i){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 "+o+" `"+i+"` of value `"+String(a)+"` supplied to `"+r+"`, expected one of "+l+".")}))},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&i("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var t=0;t<e.length;t++){var o=e[t];if("function"!=typeof o)return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+y(o)+" at index "+t+"."),s}return f((function(t,o,i,a,s){for(var l=[],c=0;c<e.length;c++){var u=(0,e[c])(t,o,i,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 `"+i+"`"+(l.length>0?", expected one of type ["+l.join(", ")+"]":"")+".")}))},shape:function(e){return f((function(t,r,o,i,a){var s=t[r],l=m(s);if("object"!==l)return new h("Invalid "+i+" `"+a+"` of type `"+l+"` supplied to `"+o+"`, expected `object`.");for(var c in e){var u=e[c];if("function"!=typeof u)return g(o,i,a,c,b(u));var d=u(s,c,o,i,a+"."+c,n);if(d)return d}return null}))},exact:function(e){return f((function(o,i,a,s,l){var c=o[i],u=m(c);if("object"!==u)return new h("Invalid "+s+" `"+l+"` of type `"+u+"` supplied to `"+a+"`, expected `object`.");var d=t({},o[i],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(o[i],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 o(o,a,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&&(i("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==a[s]?o?null===a[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(a,s,c,d,p)}var a=o.bind(null,!1);return a.isRequired=o.bind(null,!0),a}function x(e){return f((function(t,n,r,o,i,a){var s=t[n];return m(s)!==e?new h("Invalid "+o+" `"+i+"` of type `"+b(s)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null}))}function g(e,t,n,r,o){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 `"+o+"`.")}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||a(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 o=n.value;if(o&&!v(o[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=o,d.resetWarningCache=o.resetWarningCache,d.PropTypes=d,d},$a}function Da(){if(Oa)return fa.exports;if(Oa=1,"production"!==process.env.NODE_ENV){var e=Ta();fa.exports=_a()(e.isElement,!0)}else fa.exports=function(){if(Ra)return Ea;Ra=1;var e=Pa();function t(){}function n(){}return n.resetWarningCache=t,Ea=function(){function r(t,n,r,o,i,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 o(){return r}r.isRequired=r;var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i}}()();return fa.exports}function Ia(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=Ia(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Va(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Ia(e))&&(r&&(r+=" "),r+=t);return r}var Na,Aa=ua(Object.freeze({__proto__:null,clsx:Va,default:Va})),za={},Ba={};function Ha(){if(Na)return Ba;return Na=1,Object.defineProperty(Ba,"__esModule",{value:!0}),Ba.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."))},Ba.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]},Ba.int=function(e){return parseInt(e,10)},Ba.isFunction=function(e){return"function"==typeof e||"[object Function]"===Object.prototype.toString.call(e)},Ba.isNum=function(e){return"number"==typeof e&&!isNaN(e)},Ba}var Fa,Za,Wa={};function Ga(){if(Za)return za;Za=1,Object.defineProperty(za,"__esModule",{value:!0}),za.addClassName=a,za.addEvent=function(e,t,n,r){if(!e)return;const o={capture:!0,...r};e.addEventListener?e.addEventListener(t,n,o):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n},za.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")},za.createCSSTransform=function(e,n){const r=i(e,n,"px");return{[(0,t.browserPrefixToKey)("transform",t.default)]:r}},za.createSVGTransform=function(e,t){return i(e,t,"")},za.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))},za.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},za.getTranslation=i,za.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},za.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},za.matchesSelector=o,za.matchesSelectorAndParentsTo=function(e,t,n){let r=e;do{if(o(r,t))return!0;if(r===n)return!1;r=r.parentNode}while(r);return!1},za.offsetXYFromParent=function(e,t,n){const r=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect(),o=(e.clientX+t.scrollLeft-r.left)/n,i=(e.clientY+t.scrollTop-r.top)/n;return{x:o,y:i}},za.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},za.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},za.removeClassName=s,za.removeEvent=function(e,t,n,r){if(!e)return;const o={capture:!0,...r};e.removeEventListener?e.removeEventListener(t,n,o):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null},za.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=Ha(),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 o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var s=i?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(o,a,s):o[a]=e[a]}o.default=e,r&&r.set(e,o);return o}(function(){if(Fa)return Wa;Fa=1,Object.defineProperty(Wa,"__esModule",{value:!0}),Wa.browserPrefixToKey=n,Wa.browserPrefixToStyle=function(e,t){return t?"-".concat(t.toLowerCase(),"-").concat(e):e},Wa.default=void 0,Wa.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 o=null===(t=window.document)||void 0===t||null===(t=t.documentElement)||void 0===t?void 0:t.style;if(!o)return"";if(r in o)return"";for(let t=0;t<e.length;t++)if(n(r,e[t])in o)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 Wa.default=t(),Wa}());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 o(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 i(e,t,n){let{x:r,y:o}=e,i="translate(".concat(r).concat(n,",").concat(o).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);i="translate(".concat(e,", ").concat(r,")")+i}return i}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 za}var qa,Ua={};function Xa(){if(qa)return Ua;qa=1,Object.defineProperty(Ua,"__esModule",{value:!0}),Ua.canDragX=function(e){return"both"===e.props.axis||"x"===e.props.axis},Ua.canDragY=function(e){return"both"===e.props.axis||"y"===e.props.axis},Ua.createCoreData=function(t,r,o){const i=!(0,e.isNum)(t.lastX),a=n(t);return i?{node:a,deltaX:0,deltaY:0,lastX:r,lastY:o,x:r,y:o}:{node:a,deltaX:r-t.lastX,deltaY:o-t.lastY,lastX:t.lastX,lastY:t.lastY,x:r,y:o}},Ua.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}},Ua.getBoundPosition=function(r,o,i){if(!r.props.bounds)return[o,i];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 o;if(o="parent"===a?s.parentNode:n.querySelector(a),!(o instanceof r.HTMLElement))throw new Error('Bounds selector "'+a+'" could not find an element.');const i=o,l=r.getComputedStyle(s),c=r.getComputedStyle(i);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)(i)-(0,t.outerWidth)(s)-s.offsetLeft+(0,e.int)(c.paddingRight)-(0,e.int)(l.marginRight),bottom:(0,t.innerHeight)(i)-(0,t.outerHeight)(s)-s.offsetTop+(0,e.int)(c.paddingBottom)-(0,e.int)(l.marginBottom)}}(0,e.isNum)(a.right)&&(o=Math.min(o,a.right));(0,e.isNum)(a.bottom)&&(i=Math.min(i,a.bottom));(0,e.isNum)(a.left)&&(o=Math.max(o,a.left));(0,e.isNum)(a.top)&&(i=Math.max(i,a.top));return[o,i]},Ua.getControlPosition=function(e,r,o){const i="number"==typeof r?(0,t.getTouch)(e,r):null;if("number"==typeof r&&!i)return null;const a=n(o),s=o.props.offsetParent||a.offsetParent||a.ownerDocument.body;return(0,t.offsetXYFromParent)(i||e,s,o.props.scale)},Ua.snapToGrid=function(e,t,n){const r=Math.round(t/e[0])*e[0],o=Math.round(n/e[1])*e[1];return[r,o]};var e=Ha(),t=Ga();function n(e){const t=e.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}return Ua}var Ya,Ka,Ja,Qa,es={},ts={};function ns(){if(Ya)return ts;return Ya=1,Object.defineProperty(ts,"__esModule",{value:!0}),ts.default=function(){},ts}function rs(){if(Ka)return es;Ka=1,Object.defineProperty(es,"__esModule",{value:!0}),es.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={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n),t=c(Da()),r=c(i),o=Ga(),a=Xa(),s=Ha(),l=c(ns());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,o.matchesSelectorAndParentsTo)(e.target,this.props.handle,t)||this.props.cancel&&(0,o.matchesSelectorAndParentsTo)(e.target,this.props.cancel,t))return;"touchstart"===e.type&&e.preventDefault();const r=(0,o.getTouchIdentifier)(e);this.touchIdentifier=r;const i=(0,a.getControlPosition)(e,r,this);if(null==i)return;const{x:s,y:c}=i,u=(0,a.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,o.addUserSelectStyles)(n),this.dragging=!0,this.lastX=s,this.lastY=c,(0,o.addEvent)(n,f.move,this.handleDrag),(0,o.addEvent)(n,f.stop,this.handleDragStop))})),d(this,"handleDrag",(e=>{const t=(0,a.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,a.snapToGrid)(this.props.grid,e,t),!e&&!t)return;n=this.lastX+e,r=this.lastY+t}const o=(0,a.createCoreData)(this,n,r);(0,l.default)("DraggableCore: handleDrag: %j",o);if(!1!==this.props.onDrag(e,o)&&!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,a.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,a.snapToGrid)(this.props.grid,e,t),n=this.lastX+e,r=this.lastY+t}const i=(0,a.createCoreData)(this,n,r);if(!1===this.props.onStop(e,i)||!1===this.mounted)return!1;const s=this.findDOMNode();s&&this.props.enableUserSelectHack&&(0,o.removeUserSelectStyles)(s.ownerDocument),(0,l.default)("DraggableCore: handleDragStop: %j",i),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,s&&((0,l.default)("DraggableCore: Removing handlers"),(0,o.removeEvent)(s.ownerDocument,f.move,this.handleDrag),(0,o.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,o.addEvent)(e,p.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const e=this.findDOMNode();if(e){const{ownerDocument:t}=e;(0,o.removeEvent)(t,h.move,this.handleDrag),(0,o.removeEvent)(t,p.move,this.handleDrag),(0,o.removeEvent)(t,h.stop,this.handleDragStop),(0,o.removeEvent)(t,p.stop,this.handleDragStop),(0,o.removeEvent)(e,p.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,o.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 es.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}),es}function os(){return Ja||(Ja=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={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n),r=p(Da()),o=p(i),a=p(Aa),s=Ga(),l=Xa(),c=Ha(),u=p(rs()),d=p(ns());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[o,i]=(0,l.getBoundPosition)(this,r.x,r.y);r.x=o,r.y=i,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:o.default.findDOMNode(this)}render(){const{axis:e,bounds:n,children:r,defaultPosition:o,defaultClassName:i,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||o,w={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)(w,h):v=(0,s.createCSSTransform)(w,h);const C=(0,a.default)(r.props.className||"",i,{[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:C,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})}(ha)),ha}var is=function(){if(Qa)return pa.exports;Qa=1;const{default:e,DraggableCore:t}=os();return pa.exports=e,pa.exports.default=e,pa.exports.DraggableCore=t,pa.exports}(),as=ca(is);const ss=e=>r.css`
|
|
2331
2342
|
width: 240px;
|
|
2332
2343
|
${"medium"===e&&"width: 320px;"}
|
|
2333
2344
|
${"large"===e&&"width: 440px;"}
|
|
@@ -2338,7 +2349,7 @@
|
|
|
2338
2349
|
border-radius: 4px;
|
|
2339
2350
|
box-shadow: 0px 4px 6px -4px #0000001a;
|
|
2340
2351
|
box-shadow: 0px 10px 15px -3px #0000001a;
|
|
2341
|
-
`,
|
|
2352
|
+
`,ls=r.css`
|
|
2342
2353
|
height: 100%;
|
|
2343
2354
|
min-height: 40px;
|
|
2344
2355
|
display: flex;
|
|
@@ -2346,27 +2357,27 @@
|
|
|
2346
2357
|
justify-content: space-between;
|
|
2347
2358
|
padding: 8px;
|
|
2348
2359
|
border-bottom: 1px solid ${h("neutral",300)};
|
|
2349
|
-
`,ls=r.css`
|
|
2350
|
-
top: 10px;
|
|
2351
2360
|
`,cs=r.css`
|
|
2361
|
+
top: 10px;
|
|
2362
|
+
`,us=r.css`
|
|
2352
2363
|
padding: 12px;
|
|
2353
|
-
`,
|
|
2364
|
+
`,ds=e=>r.css`
|
|
2354
2365
|
height: 100%;
|
|
2355
2366
|
width: ${e||"320px"};
|
|
2356
2367
|
background-color: ${h("neutral",100)};
|
|
2357
2368
|
box-shadow: 0px 1px 2px -1px #0000001a;
|
|
2358
2369
|
box-shadow: 0px 1px 3px 0px #0000001a;
|
|
2359
2370
|
position: relative;
|
|
2360
|
-
`,ds=r.css`
|
|
2361
|
-
border-right: 1px solid ${h("neutral",300)};
|
|
2362
2371
|
`,ps=r.css`
|
|
2372
|
+
border-right: 1px solid ${h("neutral",300)};
|
|
2373
|
+
`,hs=r.css`
|
|
2363
2374
|
border: 1px solid ${h("neutral",300)};
|
|
2364
2375
|
border-radius: 4px;
|
|
2365
|
-
`,
|
|
2376
|
+
`,fs=r.css`
|
|
2366
2377
|
min-height: 48px;
|
|
2367
2378
|
width: 100%;
|
|
2368
2379
|
border-bottom: 1px solid ${h("neutral",300)};
|
|
2369
|
-
`,
|
|
2380
|
+
`,xs=(e,t)=>r.css`
|
|
2370
2381
|
height: ${((e,t)=>e&&t?`calc(100% - ${e+t}px)`:e?`calc(100% - ${e}px)`:t?`calc(100% - ${t}px)`:"100%")(e,t)};
|
|
2371
2382
|
width: 100%;
|
|
2372
2383
|
overflow-y: auto;
|
|
@@ -2374,7 +2385,7 @@
|
|
|
2374
2385
|
&:focus-visible {
|
|
2375
2386
|
outline-color: ${h("primary",700)};
|
|
2376
2387
|
}
|
|
2377
|
-
`,
|
|
2388
|
+
`,gs=r.css`
|
|
2378
2389
|
min-height: 64px;
|
|
2379
2390
|
width: 100%;
|
|
2380
2391
|
display: flex;
|
|
@@ -2384,7 +2395,7 @@
|
|
|
2384
2395
|
bottom: 0;
|
|
2385
2396
|
left: 0;
|
|
2386
2397
|
border-top: 1px solid ${h("neutral",300)};
|
|
2387
|
-
`;var
|
|
2398
|
+
`;var vs,ms;!function(){if(ms)return vs;ms=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 o=0,i="Warning: "+e.replace(/%s/g,(function(){return t[o++]}));"undefined"!=typeof console&&console.error(i);try{throw new Error(i)}catch(e){}};e=function(e,n,r){var o=arguments.length;r=new Array(o>2?o-2:0);for(var i=2;i<o;i++)r[i-2]=arguments[i];if(void 0===n)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");e||t.apply(null,[n].concat(r))}}vs=e}();var bs=ys()?n.useLayoutEffect:n.useEffect;"production"!==process.env.NODE_ENV&&("undefined"!=typeof process?process:{env:{NODE_ENV:"development"}}).env;function ys(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}process.env.NODE_ENV,process.env.NODE_ENV,process.env.NODE_ENV;var ws=function(e){var t,r=e.children,o=e.type,a=void 0===o?"reach-portal":o,s=n.useRef(null),l=n.useRef(null),c=(t=n.useState(Object.create(null))[1],n.useCallback((function(){t(Object.create(null))}),[]));return bs((function(){if(s.current){var e=s.current.ownerDocument;return l.current=null==e?void 0:e.createElement(a),e.body.appendChild(l.current),c(),function(){l.current&&l.current.ownerDocument&&l.current.ownerDocument.body.removeChild(l.current)}}}),[a,c]),l.current?i.createPortal(r,l.current):n.createElement("span",{ref:s})};"production"!==process.env.NODE_ENV&&(ws.displayName="Portal");
|
|
2388
2399
|
/*! *****************************************************************************
|
|
2389
2400
|
Copyright (c) Microsoft Corporation.
|
|
2390
2401
|
|
|
@@ -2398,16 +2409,16 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
2398
2409
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
2399
2410
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
2400
2411
|
PERFORMANCE OF THIS SOFTWARE.
|
|
2401
|
-
***************************************************************************** */var ws,Cs,js=function(){return js=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},js.apply(this,arguments)};function ks(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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function $s(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 Ss(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function Es(e,t,n){if(2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);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"}(ws||(ws={})),function(e){e.Parent="#_parent",e.Internal="#_internal"}(Cs||(Cs={}));var Rs=ws.Start,Os=ws.Stop,Ls=ws.Raise,Ts=ws.Send,Ps=ws.Cancel,Ms=ws.NullEvent,_s=ws.Assign;ws.After,ws.DoneState;var Ds=ws.Log,Is=ws.Init,Vs=ws.Invoke;ws.ErrorExecution;var Ns,As=ws.ErrorPlatform,zs=ws.ErrorCustom,Bs=ws.Update,Hs=ws.Choose,Fs=ws.Pure,Zs={},Ws="xstate.guard",Gs="production"===process.env.NODE_ENV;function qs(e,t,n){void 0===n&&(n=".");var r=Ys(e,n),o=Ys(t,n);return pl(o)?!!pl(r)&&o===r:pl(r)?r in o:Object.keys(r).every((function(e){return e in o&&qs(r[e],o[e])}))}function Us(e){try{return pl(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 Xs(e,t){try{return ul(e)?e:e.toString().split(t)}catch(t){throw new Error("'".concat(e,"' is not a valid state path."))}}function Ys(e,t){return"object"==typeof(n=e)&&"value"in n&&"context"in n&&"event"in n&&"_event"in n?e.value:ul(e)?Ks(e):"string"!=typeof e?e:Ks(Xs(e,t));var n}function Ks(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 Js(e,t){for(var n={},r=Object.keys(e),o=0;o<r.length;o++){var i=r[o];n[i]=t(e[i],i,e,o)}return n}function Qs(e,t,n){var r,o,i={};try{for(var a=$s(Object.keys(e)),s=a.next();!s.done;s=a.next()){var l=s.value,c=e[l];n(c)&&(i[l]=t(c,l,e))}}catch(e){r={error:e}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return i}var el=function(e){return function(t){var n,r,o=t;try{for(var i=$s(e),a=i.next();!a.done;a=i.next()){o=o[a.value]}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return o}};function tl(e){return e?pl(e)?[[e]]:nl(Object.keys(e).map((function(t){var n=e[t];return"string"==typeof n||n&&Object.keys(n).length?tl(e[t]).map((function(e){return[t].concat(e)})):[[t]]}))):[[]]}function nl(e){var t;return(t=[]).concat.apply(t,Es([],Ss(e),!1))}function rl(e){return ul(e)?e:[e]}function ol(e){return void 0===e?[]:rl(e)}function il(e,t,n){var r,o;if(dl(e))return e(t,n.data);var i={};try{for(var a=$s(Object.keys(e)),s=a.next();!s.done;s=a.next()){var l=s.value,c=e[l];dl(c)?i[l]=c(t,n.data):i[l]=c}}catch(e){r={error:e}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return i}function al(e){return e instanceof Promise||!(null===e||!dl(e)&&"object"!=typeof e||!dl(e.then))}function sl(e,t){return Js(e.states,(function(e,n){if(e){var r=(pl(t)?void 0:t[n])||(e?e.current:void 0);if(r)return{current:r,states:sl(e,r)}}}))}function ll(e,t,n,r){Gs||cl(!!e,"Attempting to update undefined context");var o=e?n.reduce((function(e,n){var o,i,a=n.assignment,s={state:r,action:n,_event:t},l={};if(dl(a))l=a(e,t.data,s);else try{for(var c=$s(Object.keys(a)),u=c.next();!u.done;u=c.next()){var d=u.value,p=a[d];l[d]=dl(p)?p(e,t.data,s):p}}catch(e){o={error:e}}finally{try{u&&!u.done&&(i=c.return)&&i.call(c)}finally{if(o)throw o.error}}return Object.assign({},e,l)}),e):e;return o}var cl=function(){};function ul(e){return Array.isArray(e)}function dl(e){return"function"==typeof e}function pl(e){return"string"==typeof e}function hl(e,t){if(e)return pl(e)?{type:Ws,name:e,predicate:t?t[e]:void 0}:dl(e)?{type:Ws,name:e.name,predicate:e}:e}Gs||(cl=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 fl=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}();function xl(e){return!!e&&"__xstatenode"in e}function gl(e,t){return pl(e)||"number"==typeof e?js({type:e},t):e}function vl(e,t){if(!pl(e)&&"$$type"in e&&"scxml"===e.$$type)return e;var n=gl(e);return js({name:n.type,data:n,$$type:"scxml",type:"external"},t)}function ml(e,t){return rl(t).map((function(t){return void 0===t||"string"==typeof t||xl(t)?{target:t,event:e}:js(js({},t),{event:e})}))}function bl(e,t,n,r,o){var i=e.options.guards,a={state:o,cond:t,_event:r};if(t.type===Ws)return((null==i?void 0:i[t.name])||t.predicate)(n,r.data,a);var s=null==i?void 0:i[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 yl(e){return"string"==typeof e?{type:e}:e}function wl(e,t,n){var r=function(){},o="object"==typeof e,i=o?e:null;return{next:((o?e.next:e)||r).bind(i),error:((o?e.error:t)||r).bind(i),complete:((o?e.complete:n)||r).bind(i)}}function Cl(e,t){return"".concat(e,":invocation[").concat(t,"]")}function jl(e){return(e.type===Ls||e.type===Ts&&e.to===Cs.Internal)&&"number"!=typeof e.delay}(Ns={})[fl]=function(){return this},Ns[Symbol.observable]=function(){return this};var kl=vl({type:Is});function $l(e,t){return t&&t[e]||void 0}function Sl(e,t){var n;if(pl(e)||"number"==typeof e)n=dl(r=$l(e,t))?{type:e,exec:r}:r||{type:e,exec:void 0};else if(dl(e))n={type:e.name||e.toString(),exec:e};else{var r;if(dl(r=$l(e.type,t)))n=js(js({},e),{exec:r});else if(r){var o=r.type||e.type;n=js(js(js({},r),e),{type:o})}else n=e}return n}var El=function(e,t){return e?(ul(e)?e:[e]).map((function(e){return Sl(e,t)})):[]};function Rl(e){var t=Sl(e);return js(js({id:pl(e)?e:t.id},t),{type:t.type})}function Ol(e,t){var n="".concat(ws.DoneState,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function Ll(e,t){var n="".concat(ws.DoneInvoke,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function Tl(e,t){var n="".concat(ws.ErrorPlatform,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function Pl(e,t,n,r,o,i,a){void 0===a&&(a=!1);var s=a?[]:function(e){var t,n,r=[];try{for(var o=$s(e),i=o.next();!i.done;i=o.next())for(var a=i.value,s=0;s<a.actions.length;)a.actions[s].type!==_s?s++:(r.push(a.actions[s]),a.actions.splice(s,1))}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}(o),l=s.length?ll(n,r,s,t):n,c=a?[n]:void 0,u=[];function d(o,s){var d;switch(s.type){case Ls:var p=function(e,t,n,r){var o,i={_event:n},a=vl(dl(e.event)?e.event(t,n.data,i):e.event);if(pl(e.delay)){var s=r&&r[e.delay];o=dl(s)?s(t,n.data,i):s}else o=dl(e.delay)?e.delay(t,n.data,i):e.delay;return js(js({},e),{type:Ls,_event:a,delay:o})}(s,l,r,e.options.delays);return i&&"number"==typeof p.delay&&i(p,l,r),p;case Ts:var h=function(e,t,n,r){var o,i={_event:n},a=vl(dl(e.event)?e.event(t,n.data,i):e.event);if(pl(e.delay)){var s=r&&r[e.delay];o=dl(s)?s(t,n.data,i):s}else o=dl(e.delay)?e.delay(t,n.data,i):e.delay;var l=dl(e.to)?e.to(t,n.data,i):e.to;return js(js({},e),{to:l,_event:a,event:a.data,delay:o})}(s,l,r,e.options.delays);if(!Gs){var f=s.delay;cl(!pl(f)||"number"==typeof h.delay,"No delay reference for delay expression '".concat(f,"' was found on machine '").concat(e.id,"'"))}return i&&h.to!==Cs.Internal&&("entry"===o?u.push(h):i(h,l,r)),h;case Ds:var x=function(e,t,n){return js(js({},e),{value:pl(e.expr)?e.expr:e.expr(t,n.data,{_event:n})})}(s,l,r);return null==i||i(x,l,r),x;case Hs:if(!(b=null===(d=s.conds.find((function(n){var o=hl(n.cond,e.options.guards);return!o||bl(e,o,l,r,i?void 0:t)})))||void 0===d?void 0:d.actions))return[];var g=Ss(Pl(e,t,l,r,[{type:o,actions:El(ol(b),e.options.actions)}],i,a),2),v=g[0],m=g[1];return l=m,null==c||c.push(l),v;case Fs:var b;if(!(b=s.get(l,r.data)))return[];var y=Ss(Pl(e,t,l,r,[{type:o,actions:El(ol(b),e.options.actions)}],i,a),2),w=y[0],C=y[1];return l=C,null==c||c.push(l),w;case Os:x=function(e,t,n){var r=dl(e.activity)?e.activity(t,n.data):e.activity,o="string"==typeof r?{id:r}:r;return{type:ws.Stop,activity:o}}(s,l,r);return null==i||i(x,n,r),x;case _s:l=ll(l,r,[s],i?void 0:t),null==c||c.push(l);break;default:var j=Sl(s,e.options.actions),k=j.exec;if(i)i(j,l,r);else if(k&&c){var $=c.length-1,S=js(js({},j),{exec:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];k.apply(void 0,Es([c[$]],Ss(t),!1))}});j=S}return j}}var p=nl(o.map((function(e){var t,n,o=[];try{for(var a=$s(e.actions),s=a.next();!s.done;s=a.next()){var c=s.value,p=d(e.type,c);p&&(o=o.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){i(e,l,r)})),u.length=0,o})));return[p,l]}var Ml=function(e,t){return t(e)};function _l(e){var t;return(t={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:e}}})[fl]=function(){return this},t}function Dl(e,t,n){var r=_l(t);if(r.deferred=!0,xl(e)){var o=r.state=Ml(void 0,(function(){return(n?e.withContext(n):e).initialState}));r.getSnapshot=function(){return o}}return r}var Il=function(e){return"atomic"===e.type||"final"===e.type};function Vl(e){return Object.keys(e.states).map((function(t){return e.states[t]}))}function Nl(e){return Vl(e).filter((function(e){return"history"!==e.type}))}function Al(e){var t=[e];return Il(e)?t:t.concat(nl(Nl(e).map(Al)))}function zl(e,t){var n,r,o,i,a,s,l,c,u=Hl(new Set(e)),d=new Set(t);try{for(var p=$s(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=Hl(d);try{for(var g=$s(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,$s(Nl(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){o={error:e}}finally{try{v&&!v.done&&(i=g.return)&&i.call(g)}finally{if(o)throw o.error}}try{for(var w=$s(d),C=w.next();!C.done;C=w.next()){var j;for(f=(j=C.value).parent;f&&!d.has(f);)d.add(f),f=f.parent}}catch(e){l={error:e}}finally{try{C&&!C.done&&(c=w.return)&&c.call(w)}finally{if(l)throw l.error}}return d}function Bl(e,t){var n=t.get(e);if(!n)return{};if("compound"===e.type){var r=n[0];if(!r)return{};if(Il(r))return r.key}var o={};return n.forEach((function(e){o[e.key]=Bl(e,t)})),o}function Hl(e){var t,n,r=new Map;try{for(var o=$s(e),i=o.next();!i.done;i=o.next()){var a=i.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{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}function Fl(e,t){return Bl(e,Hl(zl([e],t)))}function Zl(e,t){return Array.isArray(e)?e.some((function(e){return e===t})):e instanceof Set&&e.has(t)}function Wl(e,t){return"compound"===t.type?Nl(t).some((function(t){return"final"===t.type&&Zl(e,t)})):"parallel"===t.type&&Nl(t).every((function(t){return Wl(e,t)}))}function Gl(e){return new Set(nl(e.map((function(e){return e.tags}))))}function ql(e,t){if(e===t)return!0;if(void 0===e||void 0===t)return!1;if(pl(e)||pl(t))return e===t;var n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every((function(n){return ql(e[n],t[n])}))}var Ul=function(){function e(e){var t,n,r=this;this.actions=[],this.activities=Zs,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||Zs,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 Es([],Ss(new Set(nl(Es([],Ss(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:kl,_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=kl;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="."),pl(e))return[e];var r=Object.keys(e);return r.concat.apply(r,Es([],Ss(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=ks(e,["configuration","transitions","tags","machine"]);return js(js({},n),{tags:Array.from(t)})},e.prototype.matches=function(e){return qs(e,this.value)},e.prototype.hasTag=function(e){return this.tags.has(e)},e.prototype.can=function(e){var t;Gs&&cl(!!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}(),Xl={deferEvents:!1},Yl=function(){function e(e){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=js(js({},Xl),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}(),Kl=new Map,Jl=0,Ql=function(){return"x:".concat(Jl++)},ec=function(e,t){return Kl.set(e,t),e},tc=function(e){return Kl.get(e)},nc=function(e){Kl.delete(e)};function rc(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void(Gs||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 oc(e){if(rc()){var t=function(){var e=rc();if(e&&"__xstate__"in e)return e.__xstate__}();t&&t.register(e)}}function ic(e,t){void 0===t&&(t={});var n=e.initialState,r=new Set,o=[],i=!1,a=function(e){var t;return js(((t={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}})[fl]=function(){return this},t),e)}({id:t.id,send:function(t){o.push(t),function(){if(!i){for(i=!0;o.length>0;){var t=o.shift();n=e.transition(n,t,s),r.forEach((function(e){return e.next(n)}))}i=!1}}()},getSnapshot:function(){return n},subscribe:function(e,t,o){var i=wl(e,t,o);return r.add(i),i.next(n),{unsubscribe:function(){r.delete(i)}}}}),s={parent:t.parent,self:a,id:t.id||"anonymous",observers:r};return n=e.start?e.start(s):n,a}var ac,sc={sync:!1,autoForward:!1};!function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(ac||(ac={}));var lc=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=ac.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(e,t){if(ul(e))return r.batch(e),r.state;var n=vl(gl(e,t));if(r.status===ac.Stopped)return Gs||cl(!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!==ac.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 o,i=r.parent&&(t===Cs.Parent||r.parent.id===t),a=i?r.parent:pl(t)?t===Cs.Internal?r:r.children.get(t)||tc(t):(o=t)&&"function"==typeof o.send?t:void 0;if(a)if("machine"in a){if(r.status!==ac.Stopped||r.parent!==a||r.state.done){var s=js(js({},e),{name:e.name===zs?"".concat(Tl(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(!i)throw new Error("Unable to send event to child '".concat(t,"' from service '").concat(r.id,"'."));Gs||cl(!1,"Service '".concat(r.id,"' has no parent: unable to send event ").concat(e.type))}},this._exec=function(e,t,n,o){void 0===o&&(o=r.machine.options.actions);var i=e.exec||$l(e.type,o),a=dl(i)?i:i?i.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 Ls:var s=e;r.defer(s);break;case Ts:var l=e;if("number"==typeof l.delay)return void r.defer(l);l.to?r.sendTo(l._event,l.to,n===kl):r.send(l._event);break;case Ps:r.cancel(e.sendId);break;case Rs:if(r.status!==ac.Running)return;var c=e.activity;if(!r.machine.config.predictableActionArguments&&!r.state.activities[c.id||c.type])break;if(c.type===ws.Invoke){var u=yl(c.src),d=r.machine.options.services?r.machine.options.services[u.type]:void 0,p=c.id,h=c.data;Gs||cl(!("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(Gs||cl(!1,"No service found for invocation '".concat(c.src,"' in machine '").concat(r.machine.id,"'.")));var x=h?il(h,t,n):void 0;if("string"==typeof d)return;var g=dl(d)?d(t,n.data,{data:x,src:u,meta:c.meta}):d;if(!g)return;var v=void 0;xl(g)&&(g=x?g.withContext(x):g,v={autoForward:f}),r.spawn(g,p,v)}else r.spawnActivity(c);break;case Os:r.stopChild(e.activity.id);break;case Ds:var m=e,b=m.label,y=m.value;b?r.logger(b,y):r.logger(y);break;default:Gs||cl(!1,"No implementation found for action type '".concat(e.type,"'"))}};var o=js(js({},e.defaultOptions),n),i=o.clock,a=o.logger,s=o.parent,l=o.id,c=void 0!==l?l:t.id;this.id=c,this.logger=a,this.clock=i,this.parent=s,this.options=o,this.scheduler=new Yl({deferEvents:this.options.deferEvents}),this.sessionId=Ql()}return Object.defineProperty(e.prototype,"initialState",{get:function(){var e=this;return this._initialState?this._initialState:Ml(this,(function(){return e._initialState=e.machine.initialState,e._initialState}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return Gs||cl(this.status!==ac.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 o=$s(e.actions),i=o.next();!i.done;i=o.next()){var a=i.value;this.exec(a,e,t)}}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},e.prototype.update=function(e,t){var n,r,o,i,a,s,l,c,u=this;if(e._sessionid=this.sessionId,this._state=e,this.machine.config.predictableActionArguments&&t!==kl||!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=$s(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=$s(this.listeners),x=f.next();!x.done;x=f.next()){(0,x.value)(e,e.event)}}catch(e){o={error:e}}finally{try{x&&!x.done&&(i=f.return)&&i.call(f)}finally{if(o)throw o.error}}try{for(var g=$s(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?il(m.doneData,e.context,t):void 0;this._doneEvent=Ll(this.id,b);try{for(var y=$s(this.doneListeners),w=y.next();!w.done;w=y.next()){(0,w.value)(this._doneEvent)}}catch(e){l={error:e}}finally{try{w&&!w.done&&(c=y.return)&&c.call(y)}finally{if(l)throw l.error}}this._stop(),this._stopChildren(),nc(this.sessionId)}},e.prototype.onTransition=function(e){return this.listeners.add(e),this.status===ac.Running&&e(this.state,this.state.event),this},e.prototype.subscribe=function(e,t,n){var r=this,o=wl(e,t,n);this.listeners.add(o.next),this.status!==ac.NotStarted&&o.next(this.state);var i=function(){r.doneListeners.delete(i),r.stopListeners.delete(i),o.complete()};return this.status===ac.Stopped?o.complete():(this.onDone(i),this.onStop(i)),{unsubscribe:function(){r.listeners.delete(o.next),r.doneListeners.delete(i),r.stopListeners.delete(i)}}},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===ac.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===ac.Running)return this;this.machine._init(),ec(this.sessionId,this),this.initialized=!0,this.status=ac.Running;var n=void 0===e?this.initialState:Ml(this,(function(){return"object"==typeof(n=e)&&null!==n&&"value"in n&&"_event"in n?t.machine.resolveState(e):t.machine.resolveState(Ul.from(e,t.machine.context));var n}));return this.options.devTools&&this.attachDev(),this.scheduler.initialize((function(){t.update(n,kl)})),this},e.prototype._stopChildren=function(){this.children.forEach((function(e){dl(e.stop)&&e.stop()})),this.children.clear()},e.prototype._stop=function(){var e,t,n,r,o,i,a,s,l,c;try{for(var u=$s(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=$s(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=$s(this.contextListeners),g=x.next();!g.done;g=x.next()){p=g.value;this.contextListeners.delete(p)}}catch(e){o={error:e}}finally{try{g&&!g.done&&(i=x.return)&&i.call(x)}finally{if(o)throw o.error}}try{for(var v=$s(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=ac.Stopped,this._initialState=void 0;try{for(var b=$s(Object.keys(this.delayedEventsMap)),y=b.next();!y.done;y=b.next()){var w=y.value;this.clock.clearTimeout(this.delayedEventsMap[w])}}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 Yl({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=vl({type:"xstate.stop"}),r=Ml(e,(function(){var t=nl(Es([],Ss(e.state.configuration),!1).sort((function(e,t){return t.order-e.order})).map((function(t){return El(t.onExit,e.machine.options.actions)}))),r=Ss(Pl(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),o=r[0],i=r[1],a=new Ul({value:e.state.value,context:i,_event:n,_sessionid:e.sessionId,historyValue:void 0,history:e.state,actions:o.filter((function(e){return!jl(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(),nc(e.sessionId)}})),this},e.prototype.batch=function(e){var t=this;if(this.status===ac.NotStarted&&this.options.deferEvents)Gs||cl(!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!==ac.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,o,i=t.state,a=!1,s=[],l=function(e){var r=vl(e);t.forward(r),i=Ml(t,(function(){return t.machine.transition(i,r,void 0,n||void 0)})),s.push.apply(s,Es([],Ss(t.machine.config.predictableActionArguments?i.actions:i.actions.map((function(e){return function(e,t){var n=e.exec;return js(js({},e),{exec:void 0!==n?function(){return n(t.context,t.event,{action:e,state:t,_event:t._event})}:void 0})}(e,i)}))),!1)),a=a||!!i.changed};try{for(var c=$s(e),u=c.next();!u.done;u=c.next()){l(u.value)}}catch(e){r={error:e}}finally{try{u&&!u.done&&(o=c.return)&&o.call(c)}finally{if(r)throw r.error}}i.changed=a,i.actions=s,t.update(i,vl(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=vl(e);if(0===r.name.indexOf(As)&&!this.state.nextEvents.some((function(e){return 0===e.indexOf(As)})))throw r.data.data;return Ml(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=$s(this.forwardTo),o=r.next();!o.done;o=r.next()){var i=o.value,a=this.children.get(i);if(!a)throw new Error("Unable to forward event '".concat(e,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(i,"'."));a.send(e)}}catch(e){t={error:e}}finally{try{o&&!o.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),dl(t.stop)&&t.stop())},e.prototype.spawn=function(e,t,n){if(this.status!==ac.Running)return Dl(e,t);if(al(e))return this.spawnPromise(Promise.resolve(e),t);if(dl(e))return this.spawnCallback(e,t);if(function(e){try{return"function"==typeof e.send}catch(e){return!1}}(o=e)&&"id"in o)return this.spawnActor(e,t);if(function(e){try{return"subscribe"in e&&dl(e.subscribe)}catch(e){return!1}}(e))return this.spawnObservable(e,t);if(xl(e))return this.spawnMachine(e,js(js({},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,o},e.prototype.spawnMachine=function(t,n){var r=this;void 0===n&&(n={});var o=new e(t,js(js({},this.options),{parent:this,id:n.id||t.id})),i=js(js({},sc),n);i.sync&&o.onTransition((function(e){r.send(Bs,{state:e,id:o.id})}));var a=o;return this.children.set(o.id,a),i.autoForward&&this.forwardTo.add(o.id),o.onDone((function(e){r.removeChild(o.id),r.send(vl(e,{origin:o.id}))})).start(),a},e.prototype.spawnBehavior=function(e,t){var n=ic(e,{id:t,parent:this});return this.children.set(t,n),n},e.prototype.spawnPromise=function(e,t){var n,r,o=this,i=!1;e.then((function(e){i||(r=e,o.removeChild(t),o.send(vl(Ll(t,e),{origin:t})))}),(function(e){if(!i){o.removeChild(t);var n=Tl(t,e);try{o.send(vl(n,{origin:t}))}catch(r){!function(e,t,n){if(!Gs){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 o=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(o))}}}(e,r,t),o.devTools&&o.devTools.send(n,o.state),o.machine.strict&&o.stop()}}}));var a=((n={id:t,send:function(){},subscribe:function(t,n,r){var o=wl(t,n,r),i=!1;return e.then((function(e){i||(o.next(e),i||o.complete())}),(function(e){i||o.error(e)})),{unsubscribe:function(){return i=!0}}},stop:function(){i=!0},toJSON:function(){return{id:t}},getSnapshot:function(){return r}})[fl]=function(){return this},n);return this.children.set(t,a),a},e.prototype.spawnCallback=function(e,t){var n,r,o,i=this,a=!1,s=new Set,l=new Set;try{o=e((function(e){r=e,l.forEach((function(t){return t(e)})),a||i.send(vl(e,{origin:t}))}),(function(e){s.add(e)}))}catch(e){this.send(Tl(t,e))}if(al(o))return this.spawnPromise(o,t);var c=((n={id:t,send:function(e){return s.forEach((function(t){return t(e)}))},subscribe:function(e){var t=wl(e);return l.add(t.next),{unsubscribe:function(){l.delete(t.next)}}},stop:function(){a=!0,dl(o)&&o()},toJSON:function(){return{id:t}},getSnapshot:function(){return r}})[fl]=function(){return this},n);return this.children.set(t,c),c},e.prototype.spawnObservable=function(e,t){var n,r,o=this,i=e.subscribe((function(e){r=e,o.send(vl(e,{origin:t}))}),(function(e){o.removeChild(t),o.send(vl(Tl(t,e),{origin:t}))}),(function(){o.removeChild(t),o.send(vl(Ll(t),{origin:t}))})),a=((n={id:t,send:function(){},subscribe:function(t,n,r){return e.subscribe(t,n,r)},stop:function(){return i.unsubscribe()},getSnapshot:function(){return r},toJSON:function(){return{id:t}}})[fl]=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 Gs||cl(!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}}})[fl]=function(){return this},n))},e.prototype.attachDev=function(){var e=rc();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(js(js({name:this.id,autoPause:!0,stateSanitizer:function(e){return{value:e.value,context:e.context,actions:e.actions}}},t),{features:js({jump:!1,skip:!1},t?t.features:void 0)}),this.machine),this.devTools.init(this.state)}oc(this)}},e.prototype.toJSON=function(){return{id:this.id}},e.prototype[fl]=function(){return this},e.prototype.getSnapshot=function(){return this.status===ac.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=cc,e}();function cc(e,t){return new lc(e,t)}function uc(e){if("string"==typeof e){var t={type:e,toString:function(){return e}};return t}return e}function dc(e){return js(js({type:Vs},e),{toJSON:function(){e.onDone,e.onError;var t=ks(e,["onDone","onError"]);return js(js({},t),{type:Vs,src:uc(e.src)})}})}var pc="",hc="*",fc={},xc=function(e){return"#"===e[0]},gc=function(){function e(t,n,r,o){void 0===r&&(r="context"in t?t.context:void 0);var i,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==o?void 0:o.parent,this.key=this.config.key||(null==o?void 0:o.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||Es([this.machine.key],Ss(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!==(i=this.config.schema)&&void 0!==i?i:{},this.description=this.config.description,Gs||cl(!("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?Js(this.config.states,(function(t,n){var r,o=new e(t,{},void 0,{parent:a,key:n});return Object.assign(a.idMap,js(((r={})[o.id]=o,r),o.idMap)),o})):fc;var s=0;!function e(t){var n,r;t.order=s++;try{for(var o=$s(Vl(t)),i=o.next();!i.done;i=o.next()){e(i.value)}}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}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===pc})):pc in this.config.on),this.strict=!!this.config.strict,this.onEntry=ol(this.config.entry||this.config.onEntry).map((function(e){return Sl(e)})),this.onExit=ol(this.config.exit||this.config.onExit).map((function(e){return Sl(e)})),this.meta=this.config.meta,this.doneData="final"===this.type?this.config.data:void 0,this.invoke=ol(this.config.invoke).map((function(e,t){var n,r;if(xl(e)){var o=Cl(a.id,t);return a.machine.options.services=js(((n={})[o]=e,n),a.machine.options.services),dc({src:o,id:o})}if(pl(e.src)){o=e.id||Cl(a.id,t);return dc(js(js({},e),{id:o,src:e.src}))}if(xl(e.src)||dl(e.src)){o=e.id||Cl(a.id,t);return a.machine.options.services=js(((r={})[o]=e.src,r),a.machine.options.services),dc(js(js({id:o},e),{src:o}))}var i=e.src;return dc(js(js({id:Cl(a.id,t)},e),{src:i}))})),this.activities=ol(this.config.activities).concat(this.invoke).map((function(e){return Rl(e)})),this.transition=this.transition.bind(this),this.tags=ol(this.config.tags)}return e.prototype._init=function(){this.__cache.transitions||Al(this).forEach((function(e){return e.on}))},e.prototype.withConfig=function(t,n){var r=this.options,o=r.actions,i=r.activities,a=r.guards,s=r.services,l=r.delays;return new e(this.config,{actions:js(js({},o),t.actions),activities:js(js({},i),t.activities),guards:js(js({},a),t.guards),services:js(js({},s),t.services),delays:js(js({},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 dl(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:Js(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===pc,n=this.transitions.filter((function(n){var r=n.eventType===e;return t?r:r||n.eventType===hc}));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(ws.After,"(").concat(e,")").concat(n)}(dl(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:Ts,event:dl(e)?e:gl(e),delay:t?t.delay:void 0,id:t&&void 0!==t.id?t.id:dl(e)?e.name:Us(e)}}(r,{delay:t})),e.onExit.push({type:Ps,sendId:r}),r},r=ul(t)?t.map((function(e,t){var r=n(e.delay,t);return js(js({},e),{event:r})})):nl(Object.keys(t).map((function(e,r){var o=t[e],i=pl(o)?{target:o}:o,a=isNaN(+e)?e:+e,s=n(a,r);return ol(i).map((function(e){return js(js({},e),{event:s,delay:a})}))})));return r.map((function(t){var n=t.delay;return js(js({},e.formatTransition(t)),{delay:n})}))},e.prototype.getStateNodes=function(e){var t,n=this;if(!e)return[];var r=e instanceof Ul?e.value:Ys(e,this.delimiter);if(pl(r)){var o=this.getStateNode(r).initial;return void 0!==o?this.getStateNodes(((t={})[r]=o,t)):[this,this.states[r]]}var i=Object.keys(r),a=[this];return a.push.apply(a,Es([],Ss(nl(i.map((function(e){return n.getStateNode(e).getStateNodes(r[e])})))),!1)),a},e.prototype.handles=function(e){var t=Us(e);return this.events.includes(t)},e.prototype.resolveState=function(e){var t=e instanceof Ul?e:Ul.create(e),n=Array.from(zl([],this.getStateNodes(t.value)));return new Ul(js(js({},t),{value:this.resolve(t.value),configuration:n,done:Wl(n,this),tags:Gl(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),o=this.getStateNode(r[0])._transition(e[r[0]],t,n);return o&&o.transitions.length?o:this.next(t,n)},e.prototype.transitionParallelNode=function(e,t,n){var r,o,i={};try{for(var a=$s(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&&(i[l]=u)}}}catch(e){r={error:e}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}var d=Object.keys(i).map((function(e){return i[e]})),p=nl(d.map((function(e){return e.transitions})));if(!d.some((function(e){return e.transitions.length>0})))return this.next(t,n);var h=nl(Object.keys(i).map((function(e){return i[e].configuration})));return{transitions:p,exitSet:nl(d.map((function(e){return e.exitSet}))),configuration:h,source:t,actions:nl(Object.keys(i).map((function(e){return i[e].actions})))}},e.prototype._transition=function(e,t,n){return pl(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,vl(t))},e.prototype.next=function(e,t){var n,r,o,i=this,a=t.name,s=[],l=[];try{for(var c=$s(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||(pl(h)&&xc(h)?e.matches(Ys(this.getStateNodeById(h).path,this.delimiter)):qs(Ys(h,this.delimiter),el(this.path.slice(0,-2))(e.value))),g=!1;try{g=!p||bl(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,Es([],Ss(d.actions),!1)),o=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(o){if(!l.length)return{transitions:[o],exitSet:[],configuration:e.value?[this]:[],source:e,actions:s};var v=nl(l.map((function(t){return i.getRelativeStateNodes(t,e.historyValue)})));return{transitions:[o],exitSet:!!o.internal?[]:nl(l.map((function(e){return i.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,o,i,a){var s,l,c,u,d=this,p=i?zl([],this.getStateNodes(i.value)):[],h=new Set;try{for(var f=$s(Array.from(e).sort((function(e,t){return e.order-t.order}))),x=f.next();!x.done;x=f.next()){(!Zl(p,m=x.value)||Zl(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=$s(p),v=g.next();!v.done;v=g.next()){var m;Zl(e,m=v.value)&&!Zl(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),w=nl(b.map((function(e){var t=[];if("final"!==e.type)return t;var i=e.parent;if(!i.parent)return t;t.push(Ol(e.id,e.doneData),Ol(i.id,e.doneData?il(e.doneData,r,o):void 0));var a=i.parent;return"parallel"===a.type&&Nl(a).every((function(e){return Wl(n.configuration,e)}))&&t.push(Ol(a.id)),t}))),C=b.map((function(e){var t=e.onEntry,n=e.activities.map((function(e){return function(e){var t=Rl(e);return{type:ws.Start,activity:t,exec:void 0}}(e)}));return{type:"entry",actions:El(a?Es(Es([],Ss(t),!1),Ss(n),!1):Es(Es([],Ss(n),!1),Ss(t),!1),d.machine.options.actions)}})).concat({type:"state_done",actions:w.map((function(e){return function(e,t){return{type:Ls,event:"function"==typeof e?e:gl(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:El(Es(Es([],Ss(e.onExit),!1),Ss(e.activities.map((function(e){return function(e){var t=dl(e)?e:Rl(e);return{type:ws.Stop,activity:t,exec:void 0}}(e)}))),!1),d.machine.options.actions)}})).concat({type:"transition",actions:El(n.actions,this.machine.options.actions)}).concat(C);if(t){var k=El(nl(Es([],Ss(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!jl(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 o,i,a=vl(t);if(e instanceof Ul)o=void 0===n?e:this.resolveState(Ul.from(e,n));else{var s=pl(e)?this.resolve(Ks(this.getResolvedPath(e))):this.resolve(e),l=null!=n?n:this.machine.context;o=this.resolveState(Ul.from(s,l))}if(!Gs&&a.name===hc)throw new Error("An event cannot have the wildcard type ('".concat(hc,"')"));if(this.strict&&!this.events.includes(a.name)&&(i=a.name,!/^(done|error)\./.test(i)))throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(a.name,"'"));var c=this._transition(o.value,o,a)||{transitions:[],configuration:[],exitSet:[],source:o,actions:[]},u=zl([],this.getStateNodes(o.value)),d=c.configuration.length?zl(u,c.configuration):u;return c.configuration=Es([],Ss(d),!1),this.resolveTransition(c,o,o.context,r,a)},e.prototype.resolveRaisedTransition=function(e,t,n,r){var o,i=e.actions;return(e=this.transition(e,t,void 0,r))._event=n,e.event=n.data,(o=e.actions).unshift.apply(o,Es([],Ss(i),!1)),e},e.prototype.resolveTransition=function(e,t,n,r,o){var i,a,s,l,c=this;void 0===o&&(o=kl);var u=e.configuration,d=!t||e.transitions.length>0,p=d?e.configuration:t?t.configuration:[],h=Wl(p,this),f=d?Fl(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,o,t,r),v=t?js({},t.activities):{};try{for(var m=$s(g),b=m.next();!b.done;b=m.next()){var y=b.value;try{for(var w=(s=void 0,$s(y.actions)),C=w.next();!C.done;C=w.next()){var j=C.value;j.type===Rs?v[j.activity.id||j.activity.type]=j:j.type===Os&&(v[j.activity.id||j.activity.type]=!1)}}catch(e){s={error:e}}finally{try{C&&!C.done&&(l=w.return)&&l.call(w)}finally{if(s)throw s.error}}}}catch(e){i={error:e}}finally{try{b&&!b.done&&(a=m.return)&&a.call(m)}finally{if(i)throw i.error}}var k,$,S=Ss(Pl(this,t,n,o,g,r,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),E=S[0],R=S[1],O=Ss(function(e,t){var n,r,o=Ss([[],[]],2),i=o[0],a=o[1];try{for(var s=$s(e),l=s.next();!l.done;l=s.next()){var c=l.value;t(c)?i.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[i,a]}(E,jl),2),L=O[0],T=O[1],P=E.filter((function(e){var t;return e.type===Rs&&(null===(t=e.activity)||void 0===t?void 0:t.type)===Vs})),M=P.reduce((function(e,t){return e[t.activity.id]=function(e,t,n,r){var o,i=yl(e.src),a=null===(o=null==t?void 0:t.options.services)||void 0===o?void 0:o[i.type],s=e.data?il(e.data,n,r):void 0,l=a?Dl(a,e.id,s):_l(e.id);return l.meta=e,l}(t.activity,c.machine,R,o),e}),t?js({},t.children):{}),_=new Ul({value:f||t.value,context:R,_event:o,_sessionid:t?t._sessionid:null,historyValue:f?x?(k=x,$=f,{current:$,states:sl(k,$)}):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:M,done:h,tags:Gl(p),machine:this}),D=n!==R;_.changed=o.name===Bs||D;var I=_.history;I&&delete I.history;var V=!h&&(this._transient||u.some((function(e){return e._transient})));if(!(d||V&&o.name!==pc))return _;var N=_;if(!h)for(V&&(N=this.resolveRaisedTransition(N,{type:Ms},o,r));L.length;){var A=L.shift();N=this.resolveRaisedTransition(N,A._event,o,r)}var z=N.changed||(I?!!N.actions.length||D||typeof I.value!=typeof N.value||!ql(N.value,I.value):void 0);return N.changed=z,N.history=I,N},e.prototype.getStateNode=function(e){if(xc(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=xc(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&&xc(e))try{return this.getStateNodeById(e.slice(1))}catch(e){}for(var t=Xs(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||fc;switch(this.type){case"parallel":return Js(this.initialStateValue,(function(t,r){return t?n.getStateNode(r).resolve(e[r]||t):fc}));case"compound":if(pl(e)){var r=this.getStateNode(e);return"parallel"===r.type||"compound"===r.type?((t={})[e]=r.initialStateValue,t):e}return Object.keys(e).length?Js(e,(function(e,t){return e?n.getStateNode(t).resolve(e):fc})):this.initialStateValue||{};default:return e||fc}},e.prototype.getResolvedPath=function(e){if(xc(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 Xs(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=Qs(this.states,(function(e){return e.initialStateValue||fc}),(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=Il(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=pl(t.target)&&xc(t.target)?Ks(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 Il(this)?[this]:"compound"!==this.type||this.initial?nl(tl(this.initialStateValue).map((function(t){return e.getFromRelativePath(t)}))):(Gs||cl(!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=Ss(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 o=this.getStateNode(n);if("history"===o.type)return o.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:Qs(this.states,(function(t,n){if(!e)return t.historyValue();var r=pl(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?nl(tl(r).map((function(e){return n.getFromRelativePath(e)}))):n.initialStateNodes}var o,i,a=(o=n.path,i="states",function(e){var t,n,r=e;try{for(var a=$s(o),s=a.next();!s.done;s=a.next()){var l=s.value;r=r[i][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 pl(a)?[n.getStateNode(a)]:nl(tl(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=nl(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 o=this.states,i=new Set(this.ownEvents);if(o)try{for(var a=$s(Object.keys(o)),s=a.next();!s.done;s=a.next()){var l=o[s.value];if(l.states)try{for(var c=(n=void 0,$s(l.events)),u=c.next();!u.done;u=c.next()){var d=u.value;i.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(i)},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(!pl(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 ol(e)}(e.target),r="internal"in e?e.internal:!n||n.some((function(e){return pl(e)&&e[0]===t.delimiter})),o=this.machine.options.guards,i=this.resolveTarget(n),a=js(js({},e),{actions:El(ol(e.actions)),cond:hl(e.cond,o),target:i,source:this,internal:r,eventType:e.event,toJSON:function(){return js(js({},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 o=this.config.on,i=hc,a=o[i],s=void 0===a?[]:a,l=ks(o,["*"]);n=nl(Object.keys(l).map((function(e){Gs||e!==pc||cl(!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=ml(e,l[e]);return Gs||function(e,t,n){var r=n.slice(0,-1).some((function(e){return!("cond"in e)&&!("in"in e)&&(pl(e.target)||xl(e.target))})),o=t===pc?"the transient event":"event '".concat(t,"'");cl(!r,"One or more transitions for ".concat(o," on state '").concat(e.id,"' are unreachable. ")+"Make sure that the default transition is the last one defined.")}(r,e,t),t})).concat(ml(hc,s)))}else n=[];var c=this.config.always?ml("",this.config.always):[],u=this.config.onDone?ml(String(Ol(this.id)),this.config.onDone):[];Gs||cl(!(this.config.onDone&&!this.parent),'Root nodes cannot have an ".onDone" transition. Please check the config of "'.concat(this.id,'".'));var d=nl(this.invoke.map((function(e){var t=[];return e.onDone&&t.push.apply(t,Es([],Ss(ml(String(Ll(e.id)),e.onDone)),!1)),e.onError&&t.push.apply(t,Es([],Ss(ml(String(Tl(e.id)),e.onError)),!1)),t}))),p=this.after,h=nl(Es(Es(Es(Es([],Ss(u),!1),Ss(d),!1),Ss(n),!1),Ss(c),!1).map((function(e){return ol(e).map((function(e){return r.formatTransition(e)}))})));try{for(var f=$s(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 vc,mc=function(e){return{type:_s,assignment:e}};!function(e){e[e.Effect=1]="Effect",e[e.LayoutEffect=2]="LayoutEffect"}(vc||(vc={}));var bc="undefined"!=typeof document?n.useLayoutEffect:function(){};function yc(e){var t=l.useRef();return t.current||(t.current={v:e()}),t.current.v}var wc=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},Cc=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 jc=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},kc=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};function $c(e,t){(0,e.exec)(t.context,t._event.data,{action:e,state:t,_event:t._event})()}function Sc(e){var t=n.useRef([]),r=n.useRef([]);bc((function(){var n=e.subscribe((function(e){var n,o;if(e.actions.length){var i=e.actions.filter((function(e){return"function"==typeof e.exec&&"__effect"in e.exec})),a=jc(function(e,t){var n,r,o=wc([[],[]],2),i=o[0],a=o[1];try{for(var s=Cc(e),l=s.next();!l.done;l=s.next()){var c=l.value;t(c)?i.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[i,a]}(i,(function(e){return e.exec.__effect===vc.Effect})),2),s=a[0],l=a[1];(n=t.current).push.apply(n,kc([],jc(s.map((function(t){return[t,e]}))),!1)),(o=r.current).push.apply(o,kc([],jc(l.map((function(t){return[t,e]}))),!1))}}));return function(){n.unsubscribe()}}),[]),bc((function(){for(;r.current.length;){var e=jc(r.current.shift(),2);$c(e[0],e[1])}})),n.useEffect((function(){for(;t.current.length;){var e=jc(t.current.shift(),2);$c(e[0],e[1])}}))}var Ec=function(){return Ec=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Ec.apply(this,arguments)},Rc=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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},Oc=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};var Lc=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};function Tc(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)}),[]),o=function(e,t,r){void 0===t&&(t={});var o=yc((function(){return"function"==typeof e?e():e}));if("production"!==process.env.NODE_ENV&&"function"!=typeof e){var i=Oc(n.useState(o),1)[0];e!==i&&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=Rc(t,["context","guards","actions","activities","services","delays","state"]),f=yc((function(){var e={context:a,guards:s,actions:l,activities:c,services:u,delays:d};return cc(o.withConfig(e,(function(){return Ec(Ec({},o.context),a)})),Ec({deferEvents:!0},h))}));return bc((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]),bc((function(){return f.start(p?Ul.create(p):void 0),function(){f.stop()}}),[]),bc((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]),Sc(f),f}(e,t,r),i=Lc(n.useState((function(){var e=o.machine.initialState;return t.state?Ul.create(t.state):e})),2),a=i[0],s=i[1];return[a,o.send,o]}function Pc(){return Pc=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},Pc.apply(null,arguments)}function Mc(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 _c={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(_c.str(e)||_c.num(e))return e===t;if(_c.obj(e)&&_c.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!_c.und(n)||e===t}};function Dc(e,t){return _c.und(e)||_c.nul(e)?t:e}function Ic(e){return _c.und(e)?[]:_c.arr(e)?e:[e]}function Vc(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 _c.fun(e)?e(...n):e}function Nc(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,Mc(e,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}(e);if(_c.und(t))return Pc({to:t},e);const n=Object.keys(e).reduce(((n,r)=>_c.und(t[r])?Pc({},n,{[r]:e[r]}):n),{});return Pc({to:t},n)}class Ac{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 zc extends Ac{constructor(){super(...arguments),this.payload=[],this.attach=()=>this.payload.forEach((e=>e instanceof Ac&&e.addChild(this))),this.detach=()=>this.payload.forEach((e=>e instanceof Ac&&e.removeChild(this)))}}class Bc extends Ac{constructor(){super(...arguments),this.payload={},this.attach=()=>Object.values(this.payload).forEach((e=>e instanceof Ac&&e.addChild(this))),this.detach=()=>Object.values(this.payload).forEach((e=>e instanceof Ac&&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 Ac)&&(t[n]=r instanceof Ac?r[e?"getAnimatedValue":"getValue"]():r)}return t}getAnimatedValue(){return this.getValue(!0)}}let Hc,Fc;let Zc,Wc=e=>"undefined"!=typeof window?window.requestAnimationFrame(e):-1;let Gc,qc=()=>Date.now();class Uc extends Bc{constructor(e,t){super(),this.update=void 0,this.payload=e.style?Pc({},e,{style:Gc(e.style)}):e,this.update=t,this.attach()}}let Xc=!1;const Yc=new Set,Kc=()=>{if(!Xc)return!1;let e=qc();for(let t of Yc){let n=!1;for(let r=0;r<t.configs.length;r++){let o,i,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 Ac,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),o=e>=r.startTime+a.duration;else if(a.decay)c=s+d/(1-.998)*(1-Math.exp(-.0020000000000000018*(e-r.startTime))),o=Math.abs(r.lastPosition-c)<.1,o&&(l=c);else{i=void 0!==r.lastTime?r.lastTime:e,d=void 0!==r.lastVelocity?r.lastVelocity:a.initialVelocity,e>i+64&&(i=e);let t=Math.floor(e-i);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;o=n||u&&p,r.lastVelocity=d,r.lastTime=e}u&&!a.toValues[t].done&&(o=!1),o?(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||(Yc.delete(t),t.stop(!0))}return Yc.size?Wc(Kc):Xc=!1,Xc};function Jc(e,t,n){if("function"==typeof e)return e;if(Array.isArray(e))return Jc({range:e,output:t,extrapolate:n});if(Zc&&"string"==typeof e.output[0])return Zc(e);const r=e,o=r.output,i=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,i);return function(e,t,n,r,o,i,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===o)return r;if(t===n)return e<=t?r:o;t===-1/0?c=-c:n===1/0?c-=t:c=(c-t)/(n-t);c=i(c),r===-1/0?c=-c:o===1/0?c+=r:c=c*(o-r)+r;return c}(e,i[t],i[t+1],o[t],o[t+1],l,a,s,r.map)}}class Qc extends zc{constructor(e,t,n,r){super(),this.calc=void 0,this.payload=e instanceof zc&&!(e instanceof Qc)?e.getPayload():Array.isArray(e)?e:[e],this.calc=Jc(t,n,r)}getValue(){return this.calc(...this.payload.map((e=>e.getValue())))}updateConfig(e,t,n){this.calc=Jc(e,t,n)}interpolate(e,t,n){return new Qc(this,e,t,n)}}const eu=(e,t,n)=>e&&new Qc(e,t,n);function tu(e,t){"update"in e?t.add(e):e.getChildren().forEach((e=>tu(e,t)))}class nu extends Ac{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&&tu(this,this.animatedStyles),this.animatedStyles.forEach((e=>e.update()))}clearStyles(){this.animatedStyles.clear()}getValue(){return this.value}interpolate(e,t,n){return new Qc(this,e,t,n)}}class ru extends zc{constructor(e){super(),this.payload=e.map((e=>new nu(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 Qc(this,e,t)}}let ou=0,iu=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=ou++}update(e){if(!e)return this;const t=Nc(e),n=t.delay,r=void 0===n?0:n,o=t.to,i=Mc(t,["delay","to"]);if(_c.arr(o)||_c.fun(o))this.queue.push(Pc({},i,{delay:r,to:o}));else if(o){let e={};Object.entries(o).forEach((t=>{let n=t[0],o=t[1];const a=Pc({to:{[n]:o},delay:Vc(r,n)},i),s=e[a.delay]&&e[a.delay].to;e[a.delay]=Pc({},e[a.delay],a,{to:Pc({},s,a.to)})})),this.queue=Object.values(e)}return this.queue=this.queue.sort(((e,t)=>e.delay-t.delay)),this.diff(i),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,o=void 0===r?{}:r;_c.obj(n)&&(this.merged=Pc({},n,this.merged)),_c.obj(o)&&(this.merged=Pc({},this.merged,o))}));const t=this.local=++this.guid,n=this.localQueue=this.queue;this.queue=[],n.forEach(((r,o)=>{let i=r.delay,a=Mc(r,["delay"]);const s=r=>{o===n.length-1&&t===this.guid&&r&&(this.idle=!0,this.props.onRest&&this.props.onRest(this.merged)),e&&e()};let l=_c.arr(a.to)||_c.fun(a.to);i?setTimeout((()=>{t===this.guid&&(l?this.runAsync(a,s):this.diff(a).start(s))}),i):l?this.runAsync(a,s):this.diff(a).start(s)}))}else _c.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),t=this,Yc.has(t)||Yc.add(t),Xc||(Xc=!0,Wc(Kc));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,Yc.has(t)&&Yc.delete(t)),this}runAsync(e,t){var n=this;e.delay;let r=Mc(e,["delay"]);const o=this.local;let i=Promise.resolve(void 0);if(_c.arr(r.to))for(let e=0;e<r.to.length;e++){const t=e,n=Pc({},r,Nc(r.to[t]));_c.arr(n.config)&&(n.config=n.config[t]),i=i.then((()=>{if(o===this.guid)return new Promise((e=>this.diff(n).start(e)))}))}else if(_c.fun(r.to)){let e,t=0;i=i.then((()=>r.to((n=>{const i=Pc({},r,Nc(n));if(_c.arr(i.config)&&(i.config=i.config[t]),t++,o===this.guid)return e=new Promise((e=>this.diff(i).start(e)))}),(function(e){return void 0===e&&(e=!0),n.stop(e)})).then((()=>e))))}i.then(t)}diff(e){this.props=Pc({},this.props,e);let t=this.props,n=t.from,r=void 0===n?{}:n,o=t.to,i=void 0===o?{}:o,a=t.config,s=void 0===a?{}:a,l=t.reverse,c=t.attach,u=t.reset,d=t.immediate;if(l){var p=[i,r];r=p[0],i=p[1]}this.merged=Pc({},r,this.merged,i),this.hasChanged=!1;let h=c&&c(this);if(this.animations=Object.entries(this.merged).reduce(((e,t)=>{let n=t[0],o=t[1],i=e[n]||{};const a=_c.num(o),l=_c.str(o)&&!o.startsWith("#")&&!/\d/.test(o)&&!Fc[o],c=_c.arr(o),p=!a&&!c&&!l;let f=_c.und(r[n])?o:r[n],x=a||c||l?o:1,g=Vc(s,n);h&&(x=h.animations[n].parent);let v,m=i.parent,b=i.interpolation,y=Ic(h?x.getPayload():x),w=o;p&&(w=Zc({range:[0,1],output:[o,o]})(1));let C=b&&b.getValue();const j=!_c.und(m)&&i.animatedValues.some((e=>!e.done)),k=!_c.equ(w,C),$=!_c.equ(w,i.previous),S=!_c.equ(g,i.config);if(u||$&&k||S){if(a||l)m=b=i.parent||new nu(f);else if(c)m=b=i.parent||new ru(f);else if(p){let e=i.interpolation&&i.interpolation.calc(i.parent.value);e=void 0===e||u?f:e,i.parent?(m=i.parent,m.setValue(0,!1)):m=new nu(0);const t={output:[e,o]};i.interpolation?(b=i.interpolation,i.interpolation.updateConfig(t)):b=m.interpolate(t)}return y=Ic(h?x.getPayload():x),v=Ic(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=qc(),e.done=!1,e.animatedStyles.clear()})),Vc(d,n)&&m.setValue(p?x:o,!1),Pc({},e,{[n]:Pc({},i,{name:n,parent:m,interpolation:b,animatedValues:v,toValues:y,previous:w,config:g,fromValues:Ic(m.getValue()),immediate:Vc(d,n),initialVelocity:Dc(g.velocity,0),clamp:Dc(g.clamp,!1),precision:Dc(g.precision,.01),tension:Dc(g.tension,170),friction:Dc(g.friction,26),mass:Dc(g.mass,1),duration:g.duration,easing:Dc(g.easing,(e=>e)),decay:g.decay})})}return k?e:(p&&(m.setValue(1,!1),b.updateConfig({output:[w,w]})),m.done=!0,this.hasChanged=!0,Pc({},e,{[n]:Pc({},e[n],{previous:w})}))}),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 au=e=>{const t=_c.fun(e),r=((e,t)=>{const r=n.useRef(!1),o=n.useRef(),i=_c.fun(t),a=n.useMemo((()=>{let n;return o.current&&(o.current.map((e=>e.destroy())),o.current=void 0),[new Array(e).fill().map(((e,r)=>{const o=new iu,a=i?Vc(t,r,o):t[r];return 0===r&&(n=a.ref),o.update(a),n||o.start(),o})),n]}),[e]),s=a[0],l=a[1];o.current=s,n.useImperativeHandle(l,(()=>({start:()=>Promise.all(o.current.map((e=>new Promise((t=>e.start(t)))))),stop:e=>o.current.forEach((t=>t.stop(e))),get controllers(){return o.current}})));const c=n.useMemo((()=>e=>o.current.map(((t,n)=>{t.update(i?Vc(e,n,t):e[n]),l||t.start()}))),[e]);n.useEffect((()=>{r.current?i||c(t):l||o.current.forEach((e=>e.start()))})),n.useEffect((()=>(r.current=!0,()=>o.current.forEach((e=>e.destroy())))),[]);const u=o.current.map((e=>e.getValues()));return i?[u,c,e=>o.current.forEach((t=>t.pause(e)))]:u})(1,t?e:[e]),o=r[0],i=r[1],a=r[2];return t?[o[0],i,a]:o};class su extends Bc{constructor(e){void 0===e&&(e={}),super(),!e.transform||e.transform instanceof Ac||(e=Hc.transform(e)),this.payload=e}}const lu={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},cu="[-+]?\\d*\\.?\\d+",uu=cu+"%";function du(){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 pu=new RegExp("rgb"+du(cu,cu,cu)),hu=new RegExp("rgba"+du(cu,cu,cu,cu)),fu=new RegExp("hsl"+du(cu,uu,uu)),xu=new RegExp("hsla"+du(cu,uu,uu,cu)),gu=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,vu=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,mu=/^#([0-9a-fA-F]{6})$/,bu=/^#([0-9a-fA-F]{8})$/;function yu(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 wu(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,i=yu(o,r,e+1/3),a=yu(o,r,e),s=yu(o,r,e-1/3);return Math.round(255*i)<<24|Math.round(255*a)<<16|Math.round(255*s)<<8}function Cu(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function ju(e){return(parseFloat(e)%360+360)%360/360}function ku(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function $u(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function Su(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=mu.exec(e))?parseInt(t[1]+"ff",16)>>>0:lu.hasOwnProperty(e)?lu[e]:(t=pu.exec(e))?(Cu(t[1])<<24|Cu(t[2])<<16|Cu(t[3])<<8|255)>>>0:(t=hu.exec(e))?(Cu(t[1])<<24|Cu(t[2])<<16|Cu(t[3])<<8|ku(t[4]))>>>0:(t=gu.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=bu.exec(e))?parseInt(t[1],16)>>>0:(t=vu.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=fu.exec(e))?(255|wu(ju(t[1]),$u(t[2]),$u(t[3])))>>>0:(t=xu.exec(e))?(wu(ju(t[1]),$u(t[2]),$u(t[3]))|ku(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 Eu=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Ru=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Ou=new RegExp(`(${Object.keys(lu).join("|")})`,"g");let Lu={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 Tu=["Webkit","Ms","Moz","O"];function Pu(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||Lu.hasOwnProperty(e)&&Lu[e]?(""+t).trim():t+"px"}Lu=Object.keys(Lu).reduce(((e,t)=>(Tu.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),Lu);const Mu={};var _u;Gc=e=>new su(e),_u=e=>{const t=e.output.map((e=>e.replace(Ru,Su))).map((e=>e.replace(Ou,Su))),n=t[0].match(Eu).map((()=>[]));t.forEach((e=>{e.match(Eu).forEach(((e,t)=>n[t].push(+e)))}));const r=t[0].match(Eu).map(((t,r)=>Jc(Pc({},e,{output:n[r]}))));return e=>{let n=0;return t[0].replace(Eu,(()=>r[n++](e))).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,((e,t,n,r,o)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${o})`))}},Zc=_u,Fc=lu,function(e,t){Hc={fn:e,transform:t}}(((e,t)=>{if(!e.nodeType||void 0===e.setAttribute)return!1;{const o=t.style,i=t.children,a=t.scrollTop,s=t.scrollLeft,l=Mc(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!==i&&(e.textContent=i);for(let t in o)if(o.hasOwnProperty(t)){var n=0===t.indexOf("--"),r=Pu(t,o[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:Mu[t]||(Mu[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())));void 0!==e.getAttribute(n)&&e.setAttribute(n,l[t])}}}),(e=>e));var Du;const Iu=(Du=e=>n.forwardRef(((t,r)=>{const o=function(){const e=n.useState(!1)[1];return n.useCallback((()=>e((e=>!e))),[])}(),i=n.useRef(!0),a=n.useRef(null),s=n.useRef(null),l=n.useCallback((e=>{const t=a.current;a.current=new Uc(e,(()=>{let e=!1;s.current&&(e=Hc.fn(s.current,a.current.getAnimatedValue())),s.current&&!1!==e||o()})),t&&t.detach()}),[]);n.useEffect((()=>()=>{i.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=Mc(c,["scrollTop","scrollLeft"]),d=(p=e,!_c.fun(p)||p.prototype instanceof n.Component?e=>s.current=function(e,t){return t&&(_c.fun(t)?t(e):_c.obj(t)&&(t.current=e)),e}(e,r):void 0);var p;return n.createElement(e,Pc({},u,{ref:d}))})),e=>(_c.arr(e)?e:Object.keys(e)).reduce(((e,t)=>{const n=t;return e[n]=Du(n),e}),Du))(["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 Vu(e,t){return e.map((function(e,n){return e+t[n]}))}function Nu(e,t){return e.map((function(e,n){return e-t[n]}))}function Au(e){return Math.hypot.apply(Math,e)}function zu(e){return Math.sign?Math.sign(e):Number(e>0)-Number(e<0)||+e}function Bu(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 Hu(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?-Bu(t-e,n-t,r)+t:e>n?+Bu(e-n,n-t,r)+n:e}function Fu(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 Zu(){return Zu=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},Zu.apply(this,arguments)}function Wu(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Gu(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qu(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 Uu(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 qu(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)?qu(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 Xu(){}function Yu(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?Xu:1===t.length?t[0]:function(){for(var e,n,r=Uu(t);!(n=r()).done;){e=n.value.apply(this,arguments)||e}return e}}function Ku(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 Ju(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 Qu(e,t){void 0===e&&(e={});for(var n={},r=0,o=Object.entries(t);r<o.length;r++){var i=o[r],a=i[0],s=i[1];switch(typeof s){case"function":n[a]=s.call(n,e[a],a,e);break;case"object":n[a]=Qu(e[a],s);break;case"boolean":s&&(n[a]=e[a])}}return n}var ed=Zu({},{threshold:function(e){return void 0===e&&(e=0),Ku(e)},rubberband:function(e){switch(void 0===e&&(e=0),e){case!0:return Ku(.15);case!1:return Ku(0);default:return Ku(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:Ku(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 ed.bounds(e(t))};var t=e,n=t.left,r=void 0===n?-1/0:n,o=t.right,i=void 0===o?1/0:o,a=t.top,s=void 0===a?-1/0:a,l=t.bottom;return[[r,i],[s,void 0===l?1/0:l]]}}),td="undefined"!=typeof window&&window.document&&window.document.createElement,nd={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=td?window:void 0),e})),eventOptions:function(e){var t=void 0===e?{}:e,n=t.passive,r=void 0===n||n,o=t.capture;return{passive:r,capture:void 0!==o&&o}}},rd=Zu({},ed,{threshold:function(e,t,n){var r=n.filterTaps,o=void 0!==r&&r,i=n.lockDirection,a=void 0!==i&&i,s=n.axis,l=Ku(e,o?3:a||(void 0===s?void 0:s)?1:0);return this.filterTaps=o||l[0]+l[1]>0,l},swipeVelocity:function(e){return void 0===e&&(e=.5),Ku(e)},swipeDistance:function(e){return void 0===e&&(e=60),Ku(e)},delay:function(e){switch(void 0===e&&(e=0),e){case!0:return 180;case!1:return 0;default:return e}}});function od(e){var t=e.domTarget,n=e.eventOptions,r=e.window,o=e.enabled,i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,["domTarget","eventOptions","window","enabled"]),a=function(e){return void 0===e&&(e={}),Qu(e,nd)}({domTarget:t,eventOptions:n,window:r,enabled:o});return a.drag=function(e){return void 0===e&&(e={}),Qu(e,rd)}(i),a}function id(e){return Zu({_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:Xu,canceled:!1,memo:void 0,args:void 0},e)}function ad(){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:id({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:id({da:[0,0],vdva:[0,0],origin:void 0,turns:0}),wheel:id({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),move:id({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),scroll:id({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0})}}var sd=new Map,ld=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 o=arguments.length,i=new Array(o>2?o-2:0),a=2;a<o;a++)i[a-2]=arguments[a];n.controller.timeouts[n.stateKey]=(r=window).setTimeout.apply(r,[e,t].concat(i))},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 o=Zu({},n.controller.state.shared,n.state,n.mapStateValues(n.state)),i=n.handler(o);return n.state.memo=void 0!==i?i:n.state.memo,n.state._active||n.clean(),o}}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,o=t.rubberband,i=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]?cd(h[0],i[0]):u[0],x=!1===u[1]?cd(h[1],i[1]):u[1],g=this.checkIntentionality([f,x],h);if(g._blocked)return Zu({},g,{_movement:h,delta:[0,0]});var v,m,b,y,w=g._intentional,C=h;(!1!==w[0]&&!1===u[0]&&(m=Ju(n,this.state),v=Ju(r,this.state),l[0]=m[0],s[0]=v[0]),!1!==w[1]&&!1===u[1])&&(m=null!=(b=m)?b:Ju(n,this.state),v=null!=(y=v)?y:Ju(r,this.state),l[1]=m[1],s[1]=v[1]);var j=[!1!==w[0]?h[0]-w[0]:l[0],!1!==w[1]?h[1]-w[1]:l[1]],k=Vu(j,d),$=c?o:[0,0];return j=ud(s,Vu(j,l),$),Zu({},g,{intentional:!1!==w[0]||!1!==w[1],_initial:l,_movement:C,movement:j,values:e,offset:ud(s,k,$),delta:Nu(j,p)})},t.clean=function(){this.clearTimeout()},Fu(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 cd(e,t){return Math.abs(e)>=t&&zu(e)*t}function ud(e,t,n){var r=t[0],o=t[1],i=n[0],a=n[1],s=e[0],l=s[0],c=s[1],u=e[1],d=u[0],p=u[1];return[Hu(r,l,c,i),Hu(o,d,p,a)]}function dd(e,t,n){var r=e.state,o=e.args,i=t.timeStamp,a=t.type,s=r.values;return{_lastEventType:a,event:t,timeStamp:i,elapsedTime:n?0:i-r.startTime,args:o,previous:s}}function pd(e,t){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return e.call.apply(e,[this,Zu({},t,{event:n})].concat(o))}}var hd=function(e){var t=this;this.classes=e,this.bind=function(){for(var e={},n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];for(var i,a=Uu(t.classes);!(i=a()).done;){new(0,i.value)(t,r).addBindings(e)}for(var s=0,l=Object.entries(t.nativeRefs);s<l.length;s++){var c=l[s];gd(e,c[0],pd(c[1],Zu({},t.state.shared,{args:r})))}return t.config.domTarget?function(e,t){var n=e.config,r=e.domListeners,o=xd(n);if(!o)throw new Error("domTarget must be defined");var i=n.eventOptions;md(o,fd(r),i);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,Yu.apply(void 0,u)])}vd(o,r,i)}(t,e):function(e,t){for(var n=e.config,r={},o=n.eventOptions.capture?"Capture":"",i=0,a=Object.entries(t);i<a.length;i++){var s=a[i],l=s[0],c=s[1],u=Array.isArray(c)?c:[c];r[l+o]=Yu.apply(void 0,u)}return r}(t,e)},this.effect=function(){return t.config.domTarget&&t.bind(),t.clean},this.clean=function(){var e=xd(t.config),n=t.config.eventOptions;e&&md(e,fd(t.domListeners),n),Object.values(t.timeouts).forEach(clearTimeout),function(e){var t=e.config,n=t.window,r=t.eventOptions,o=e.windowListeners;if(!n)return;for(var i in o){md(n,o[i],r)}e.windowListeners={}}(t)},this.state=ad(),this.timeouts={},this.domListeners=[],this.windowListeners={}};function fd(e){return void 0===e&&(e=[]),e.splice(0,e.length)}function xd(e){var t=e.domTarget;return t&&"current"in t?t.current:t}function gd(e,t,n){e[t]||(e[t]=[]),e[t].push(n)}function vd(e,t,n){void 0===t&&(t=[]),void 0===n&&(n={});for(var r,o=Uu(t);!(r=o()).done;){var i=r.value,a=i[0],s=i[1];e.addEventListener(a,s,n)}}function md(e,t,n){void 0===t&&(t=[]),void 0===n&&(n={});for(var r,o=Uu(t);!(r=o()).done;){var i=r.value,a=i[0],s=i[1];e.removeEventListener(a,s,n)}}function bd(e,t,r){void 0===r&&(r={});var o=function(e){var t=new Set;e.drag&&t.add(sd.get("drag"));e.wheel&&t.add(sd.get("wheel"));e.scroll&&t.add(sd.get("scroll"));e.move&&t.add(sd.get("move"));e.pinch&&t.add(sd.get("pinch"));e.hover&&t.add(sd.get("hover"));return t}(e),i=n.useMemo((function(){return new hd(o)}),[]);return i.config=t,i.handlers=e,i.nativeRefs=r,n.useEffect(i.effect,[]),i.config.domTarget?yd:i.bind}function yd(){"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 wd(e){if("touches"in e){var t=e.targetTouches,n=e.changedTouches;return t.length>0?t:n}return null}function Cd(e){var t="buttons"in e?e.buttons:0,n=wd(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 jd(e){var t=wd(e),n=t?t[0]:e;return[n.clientX,n.clientY]}var kd=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,o=e.windowListeners;void 0===n&&(n=[]),r.window&&(md(r.window,o[t],r.eventOptions),vd(r.window,o[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(Gu(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=Cd(e);if(n.down){t.updateSharedState(n);var r=jd(e),o=t.getKinematics(r,e),i=dd(Gu(t),e),a=t.state._isTap,s=Au(o._movement);a&&s>=3&&(a=!1),t.updateGestureState(Zu({},i,o,{_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,o=r[0],i=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=Zu({},dd(Gu(t),e),t.getMovement(t.state.values)),b=[0,0];m.elapsedTime<220&&(!1!==u&&Math.abs(o)>h&&Math.abs(s)>g&&(b[0]=zu(o)),!1!==d&&Math.abs(i)>f&&Math.abs(l)>v&&(b[1]=zu(i))),t.updateGestureState(Zu({},m,{tap:n,swipe:b})),t.fireGestureHandler(!0===n)}},t.clean=function(){e.prototype.clean.call(Gu(t)),t.state._delayedEvent=!1,function(e,t){var n=e.config,r=e.windowListeners;n.window&&(md(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}Wu(t,e);var n=t.prototype;return n.startDrag=function(e){var t=jd(e);this.updateSharedState(Cd(e)),this.updateGestureState(Zu({},function(e,t,n){var r=e.state.offset,o=n.timeStamp;return Zu({},ad()[e.stateKey],{_active:!0,values:t,initial:t,offset:r,lastOffset:r,startTime:o})}(this,t,e),dd(this,e,!0),{_pointerId:e.pointerId,cancel:this.onCancel})),this.updateGestureState(this.getMovement(t)),this.fireGestureHandler()},n.addBindings=function(e){(gd(e,"onPointerDown",this.onDragStart),this.config.filterTaps)&&gd(e,this.controller.config.eventOptions.capture?"onClick":"onClickCapture",this.onClick)},t}(function(e){function t(){return e.apply(this,arguments)||this}Wu(t,e);var n=t.prototype;return n.getInternalMovement=function(e,t){return Nu(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],o=n[1],i=this.state.axis||(r>o?"x":r<o?"y":void 0);return this.config.axis||this.config.lockDirection?i?this.config.axis&&i!==this.config.axis?{_intentional:e,_blocked:!0,axis:i}:(e["x"===i?1:0]=!1,{_intentional:e,_blocked:!1,axis:i}):{_intentional:[!1,!1],_blocked:!1,axis:i}:{_intentional:e,_blocked:!1,axis:i}},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=Au(t),o=0===r?0:1/r,i=0===n?0:1/n,a=i*r,s=t.map((function(e){return i*e})),l=t.map((function(e){return o*e}));return{velocities:s,velocity:a,distance:Au(e),direction:l}}(n.movement,n.delta,r))}return n},n.mapStateValues=function(e){return{xy:e.values,vxvy:e.velocities}},t}(ld));function $d(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,o,i;if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(r=n;0!=r--;)if(!$d(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(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;for(i=e.entries();!(r=i.next()).done;)if(!$d(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(i=e.entries();!(r=i.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=(o=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;if("undefined"!=typeof Element&&e instanceof Element)return!1;for(r=n;0!=r--;)if(!("_owner"===o[r]&&e.$$typeof||$d(e[o[r]],t[o[r]])))return!1;return!0}return e!=e&&t!=t}function Sd(e,t){try{return $d(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 Ed(e,t){void 0===t&&(t={}),sd.set("drag",kd);var r=n.useRef();return r.current||(r.current=function(e,t){var n,r,o=[],i=!1;return function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];return i&&n===this&&t(s,o)||(r=e.apply(this,s),i=!0,n=this,o=s),r}}(od,Sd)),bd({drag:e},r.current(t))}
|
|
2412
|
+
***************************************************************************** */var Cs,js,ks=function(){return ks=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ks.apply(this,arguments)};function $s(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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function Ss(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 Es(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function Rs(e,t,n){if(2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);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"}(Cs||(Cs={})),function(e){e.Parent="#_parent",e.Internal="#_internal"}(js||(js={}));var Os=Cs.Start,Ls=Cs.Stop,Ts=Cs.Raise,Ps=Cs.Send,Ms=Cs.Cancel,_s=Cs.NullEvent,Ds=Cs.Assign;Cs.After,Cs.DoneState;var Is=Cs.Log,Vs=Cs.Init,Ns=Cs.Invoke;Cs.ErrorExecution;var As,zs=Cs.ErrorPlatform,Bs=Cs.ErrorCustom,Hs=Cs.Update,Fs=Cs.Choose,Zs=Cs.Pure,Ws={},Gs="xstate.guard",qs="production"===process.env.NODE_ENV;function Us(e,t,n){void 0===n&&(n=".");var r=Ks(e,n),o=Ks(t,n);return hl(o)?!!hl(r)&&o===r:hl(r)?r in o:Object.keys(r).every((function(e){return e in o&&Us(r[e],o[e])}))}function Xs(e){try{return hl(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 Ys(e,t){try{return dl(e)?e:e.toString().split(t)}catch(t){throw new Error("'".concat(e,"' is not a valid state path."))}}function Ks(e,t){return"object"==typeof(n=e)&&"value"in n&&"context"in n&&"event"in n&&"_event"in n?e.value:dl(e)?Js(e):"string"!=typeof e?e:Js(Ys(e,t));var n}function Js(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 Qs(e,t){for(var n={},r=Object.keys(e),o=0;o<r.length;o++){var i=r[o];n[i]=t(e[i],i,e,o)}return n}function el(e,t,n){var r,o,i={};try{for(var a=Ss(Object.keys(e)),s=a.next();!s.done;s=a.next()){var l=s.value,c=e[l];n(c)&&(i[l]=t(c,l,e))}}catch(e){r={error:e}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return i}var tl=function(e){return function(t){var n,r,o=t;try{for(var i=Ss(e),a=i.next();!a.done;a=i.next()){o=o[a.value]}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return o}};function nl(e){return e?hl(e)?[[e]]:rl(Object.keys(e).map((function(t){var n=e[t];return"string"==typeof n||n&&Object.keys(n).length?nl(e[t]).map((function(e){return[t].concat(e)})):[[t]]}))):[[]]}function rl(e){var t;return(t=[]).concat.apply(t,Rs([],Es(e),!1))}function ol(e){return dl(e)?e:[e]}function il(e){return void 0===e?[]:ol(e)}function al(e,t,n){var r,o;if(pl(e))return e(t,n.data);var i={};try{for(var a=Ss(Object.keys(e)),s=a.next();!s.done;s=a.next()){var l=s.value,c=e[l];pl(c)?i[l]=c(t,n.data):i[l]=c}}catch(e){r={error:e}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return i}function sl(e){return e instanceof Promise||!(null===e||!pl(e)&&"object"!=typeof e||!pl(e.then))}function ll(e,t){return Qs(e.states,(function(e,n){if(e){var r=(hl(t)?void 0:t[n])||(e?e.current:void 0);if(r)return{current:r,states:ll(e,r)}}}))}function cl(e,t,n,r){qs||ul(!!e,"Attempting to update undefined context");var o=e?n.reduce((function(e,n){var o,i,a=n.assignment,s={state:r,action:n,_event:t},l={};if(pl(a))l=a(e,t.data,s);else try{for(var c=Ss(Object.keys(a)),u=c.next();!u.done;u=c.next()){var d=u.value,p=a[d];l[d]=pl(p)?p(e,t.data,s):p}}catch(e){o={error:e}}finally{try{u&&!u.done&&(i=c.return)&&i.call(c)}finally{if(o)throw o.error}}return Object.assign({},e,l)}),e):e;return o}var ul=function(){};function dl(e){return Array.isArray(e)}function pl(e){return"function"==typeof e}function hl(e){return"string"==typeof e}function fl(e,t){if(e)return hl(e)?{type:Gs,name:e,predicate:t?t[e]:void 0}:pl(e)?{type:Gs,name:e.name,predicate:e}:e}qs||(ul=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 xl=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}();function gl(e){return!!e&&"__xstatenode"in e}function vl(e,t){return hl(e)||"number"==typeof e?ks({type:e},t):e}function ml(e,t){if(!hl(e)&&"$$type"in e&&"scxml"===e.$$type)return e;var n=vl(e);return ks({name:n.type,data:n,$$type:"scxml",type:"external"},t)}function bl(e,t){return ol(t).map((function(t){return void 0===t||"string"==typeof t||gl(t)?{target:t,event:e}:ks(ks({},t),{event:e})}))}function yl(e,t,n,r,o){var i=e.options.guards,a={state:o,cond:t,_event:r};if(t.type===Gs)return((null==i?void 0:i[t.name])||t.predicate)(n,r.data,a);var s=null==i?void 0:i[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 wl(e){return"string"==typeof e?{type:e}:e}function Cl(e,t,n){var r=function(){},o="object"==typeof e,i=o?e:null;return{next:((o?e.next:e)||r).bind(i),error:((o?e.error:t)||r).bind(i),complete:((o?e.complete:n)||r).bind(i)}}function jl(e,t){return"".concat(e,":invocation[").concat(t,"]")}function kl(e){return(e.type===Ts||e.type===Ps&&e.to===js.Internal)&&"number"!=typeof e.delay}(As={})[xl]=function(){return this},As[Symbol.observable]=function(){return this};var $l=ml({type:Vs});function Sl(e,t){return t&&t[e]||void 0}function El(e,t){var n;if(hl(e)||"number"==typeof e)n=pl(r=Sl(e,t))?{type:e,exec:r}:r||{type:e,exec:void 0};else if(pl(e))n={type:e.name||e.toString(),exec:e};else{var r;if(pl(r=Sl(e.type,t)))n=ks(ks({},e),{exec:r});else if(r){var o=r.type||e.type;n=ks(ks(ks({},r),e),{type:o})}else n=e}return n}var Rl=function(e,t){return e?(dl(e)?e:[e]).map((function(e){return El(e,t)})):[]};function Ol(e){var t=El(e);return ks(ks({id:hl(e)?e:t.id},t),{type:t.type})}function Ll(e,t){var n="".concat(Cs.DoneState,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function Tl(e,t){var n="".concat(Cs.DoneInvoke,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function Pl(e,t){var n="".concat(Cs.ErrorPlatform,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function Ml(e,t,n,r,o,i,a){void 0===a&&(a=!1);var s=a?[]:function(e){var t,n,r=[];try{for(var o=Ss(e),i=o.next();!i.done;i=o.next())for(var a=i.value,s=0;s<a.actions.length;)a.actions[s].type!==Ds?s++:(r.push(a.actions[s]),a.actions.splice(s,1))}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}(o),l=s.length?cl(n,r,s,t):n,c=a?[n]:void 0,u=[];function d(o,s){var d;switch(s.type){case Ts:var p=function(e,t,n,r){var o,i={_event:n},a=ml(pl(e.event)?e.event(t,n.data,i):e.event);if(hl(e.delay)){var s=r&&r[e.delay];o=pl(s)?s(t,n.data,i):s}else o=pl(e.delay)?e.delay(t,n.data,i):e.delay;return ks(ks({},e),{type:Ts,_event:a,delay:o})}(s,l,r,e.options.delays);return i&&"number"==typeof p.delay&&i(p,l,r),p;case Ps:var h=function(e,t,n,r){var o,i={_event:n},a=ml(pl(e.event)?e.event(t,n.data,i):e.event);if(hl(e.delay)){var s=r&&r[e.delay];o=pl(s)?s(t,n.data,i):s}else o=pl(e.delay)?e.delay(t,n.data,i):e.delay;var l=pl(e.to)?e.to(t,n.data,i):e.to;return ks(ks({},e),{to:l,_event:a,event:a.data,delay:o})}(s,l,r,e.options.delays);if(!qs){var f=s.delay;ul(!hl(f)||"number"==typeof h.delay,"No delay reference for delay expression '".concat(f,"' was found on machine '").concat(e.id,"'"))}return i&&h.to!==js.Internal&&("entry"===o?u.push(h):i(h,l,r)),h;case Is:var x=function(e,t,n){return ks(ks({},e),{value:hl(e.expr)?e.expr:e.expr(t,n.data,{_event:n})})}(s,l,r);return null==i||i(x,l,r),x;case Fs:if(!(b=null===(d=s.conds.find((function(n){var o=fl(n.cond,e.options.guards);return!o||yl(e,o,l,r,i?void 0:t)})))||void 0===d?void 0:d.actions))return[];var g=Es(Ml(e,t,l,r,[{type:o,actions:Rl(il(b),e.options.actions)}],i,a),2),v=g[0],m=g[1];return l=m,null==c||c.push(l),v;case Zs:var b;if(!(b=s.get(l,r.data)))return[];var y=Es(Ml(e,t,l,r,[{type:o,actions:Rl(il(b),e.options.actions)}],i,a),2),w=y[0],C=y[1];return l=C,null==c||c.push(l),w;case Ls:x=function(e,t,n){var r=pl(e.activity)?e.activity(t,n.data):e.activity,o="string"==typeof r?{id:r}:r;return{type:Cs.Stop,activity:o}}(s,l,r);return null==i||i(x,n,r),x;case Ds:l=cl(l,r,[s],i?void 0:t),null==c||c.push(l);break;default:var j=El(s,e.options.actions),k=j.exec;if(i)i(j,l,r);else if(k&&c){var $=c.length-1,S=ks(ks({},j),{exec:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];k.apply(void 0,Rs([c[$]],Es(t),!1))}});j=S}return j}}var p=rl(o.map((function(e){var t,n,o=[];try{for(var a=Ss(e.actions),s=a.next();!s.done;s=a.next()){var c=s.value,p=d(e.type,c);p&&(o=o.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){i(e,l,r)})),u.length=0,o})));return[p,l]}var _l=function(e,t){return t(e)};function Dl(e){var t;return(t={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:e}}})[xl]=function(){return this},t}function Il(e,t,n){var r=Dl(t);if(r.deferred=!0,gl(e)){var o=r.state=_l(void 0,(function(){return(n?e.withContext(n):e).initialState}));r.getSnapshot=function(){return o}}return r}var Vl=function(e){return"atomic"===e.type||"final"===e.type};function Nl(e){return Object.keys(e.states).map((function(t){return e.states[t]}))}function Al(e){return Nl(e).filter((function(e){return"history"!==e.type}))}function zl(e){var t=[e];return Vl(e)?t:t.concat(rl(Al(e).map(zl)))}function Bl(e,t){var n,r,o,i,a,s,l,c,u=Fl(new Set(e)),d=new Set(t);try{for(var p=Ss(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=Fl(d);try{for(var g=Ss(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,Ss(Al(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){o={error:e}}finally{try{v&&!v.done&&(i=g.return)&&i.call(g)}finally{if(o)throw o.error}}try{for(var w=Ss(d),C=w.next();!C.done;C=w.next()){var j;for(f=(j=C.value).parent;f&&!d.has(f);)d.add(f),f=f.parent}}catch(e){l={error:e}}finally{try{C&&!C.done&&(c=w.return)&&c.call(w)}finally{if(l)throw l.error}}return d}function Hl(e,t){var n=t.get(e);if(!n)return{};if("compound"===e.type){var r=n[0];if(!r)return{};if(Vl(r))return r.key}var o={};return n.forEach((function(e){o[e.key]=Hl(e,t)})),o}function Fl(e){var t,n,r=new Map;try{for(var o=Ss(e),i=o.next();!i.done;i=o.next()){var a=i.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{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}function Zl(e,t){return Hl(e,Fl(Bl([e],t)))}function Wl(e,t){return Array.isArray(e)?e.some((function(e){return e===t})):e instanceof Set&&e.has(t)}function Gl(e,t){return"compound"===t.type?Al(t).some((function(t){return"final"===t.type&&Wl(e,t)})):"parallel"===t.type&&Al(t).every((function(t){return Gl(e,t)}))}function ql(e){return new Set(rl(e.map((function(e){return e.tags}))))}function Ul(e,t){if(e===t)return!0;if(void 0===e||void 0===t)return!1;if(hl(e)||hl(t))return e===t;var n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every((function(n){return Ul(e[n],t[n])}))}var Xl=function(){function e(e){var t,n,r=this;this.actions=[],this.activities=Ws,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||Ws,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 Rs([],Es(new Set(rl(Rs([],Es(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:$l,_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=$l;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="."),hl(e))return[e];var r=Object.keys(e);return r.concat.apply(r,Rs([],Es(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=$s(e,["configuration","transitions","tags","machine"]);return ks(ks({},n),{tags:Array.from(t)})},e.prototype.matches=function(e){return Us(e,this.value)},e.prototype.hasTag=function(e){return this.tags.has(e)},e.prototype.can=function(e){var t;qs&&ul(!!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}(),Yl={deferEvents:!1},Kl=function(){function e(e){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=ks(ks({},Yl),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}(),Jl=new Map,Ql=0,ec=function(){return"x:".concat(Ql++)},tc=function(e,t){return Jl.set(e,t),e},nc=function(e){return Jl.get(e)},rc=function(e){Jl.delete(e)};function oc(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void(qs||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 ic(e){if(oc()){var t=function(){var e=oc();if(e&&"__xstate__"in e)return e.__xstate__}();t&&t.register(e)}}function ac(e,t){void 0===t&&(t={});var n=e.initialState,r=new Set,o=[],i=!1,a=function(e){var t;return ks(((t={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}})[xl]=function(){return this},t),e)}({id:t.id,send:function(t){o.push(t),function(){if(!i){for(i=!0;o.length>0;){var t=o.shift();n=e.transition(n,t,s),r.forEach((function(e){return e.next(n)}))}i=!1}}()},getSnapshot:function(){return n},subscribe:function(e,t,o){var i=Cl(e,t,o);return r.add(i),i.next(n),{unsubscribe:function(){r.delete(i)}}}}),s={parent:t.parent,self:a,id:t.id||"anonymous",observers:r};return n=e.start?e.start(s):n,a}var sc,lc={sync:!1,autoForward:!1};!function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(sc||(sc={}));var cc=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=sc.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(e,t){if(dl(e))return r.batch(e),r.state;var n=ml(vl(e,t));if(r.status===sc.Stopped)return qs||ul(!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!==sc.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 o,i=r.parent&&(t===js.Parent||r.parent.id===t),a=i?r.parent:hl(t)?t===js.Internal?r:r.children.get(t)||nc(t):(o=t)&&"function"==typeof o.send?t:void 0;if(a)if("machine"in a){if(r.status!==sc.Stopped||r.parent!==a||r.state.done){var s=ks(ks({},e),{name:e.name===Bs?"".concat(Pl(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(!i)throw new Error("Unable to send event to child '".concat(t,"' from service '").concat(r.id,"'."));qs||ul(!1,"Service '".concat(r.id,"' has no parent: unable to send event ").concat(e.type))}},this._exec=function(e,t,n,o){void 0===o&&(o=r.machine.options.actions);var i=e.exec||Sl(e.type,o),a=pl(i)?i:i?i.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 Ts:var s=e;r.defer(s);break;case Ps:var l=e;if("number"==typeof l.delay)return void r.defer(l);l.to?r.sendTo(l._event,l.to,n===$l):r.send(l._event);break;case Ms:r.cancel(e.sendId);break;case Os:if(r.status!==sc.Running)return;var c=e.activity;if(!r.machine.config.predictableActionArguments&&!r.state.activities[c.id||c.type])break;if(c.type===Cs.Invoke){var u=wl(c.src),d=r.machine.options.services?r.machine.options.services[u.type]:void 0,p=c.id,h=c.data;qs||ul(!("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(qs||ul(!1,"No service found for invocation '".concat(c.src,"' in machine '").concat(r.machine.id,"'.")));var x=h?al(h,t,n):void 0;if("string"==typeof d)return;var g=pl(d)?d(t,n.data,{data:x,src:u,meta:c.meta}):d;if(!g)return;var v=void 0;gl(g)&&(g=x?g.withContext(x):g,v={autoForward:f}),r.spawn(g,p,v)}else r.spawnActivity(c);break;case Ls:r.stopChild(e.activity.id);break;case Is:var m=e,b=m.label,y=m.value;b?r.logger(b,y):r.logger(y);break;default:qs||ul(!1,"No implementation found for action type '".concat(e.type,"'"))}};var o=ks(ks({},e.defaultOptions),n),i=o.clock,a=o.logger,s=o.parent,l=o.id,c=void 0!==l?l:t.id;this.id=c,this.logger=a,this.clock=i,this.parent=s,this.options=o,this.scheduler=new Kl({deferEvents:this.options.deferEvents}),this.sessionId=ec()}return Object.defineProperty(e.prototype,"initialState",{get:function(){var e=this;return this._initialState?this._initialState:_l(this,(function(){return e._initialState=e.machine.initialState,e._initialState}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return qs||ul(this.status!==sc.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 o=Ss(e.actions),i=o.next();!i.done;i=o.next()){var a=i.value;this.exec(a,e,t)}}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},e.prototype.update=function(e,t){var n,r,o,i,a,s,l,c,u=this;if(e._sessionid=this.sessionId,this._state=e,this.machine.config.predictableActionArguments&&t!==$l||!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=Ss(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=Ss(this.listeners),x=f.next();!x.done;x=f.next()){(0,x.value)(e,e.event)}}catch(e){o={error:e}}finally{try{x&&!x.done&&(i=f.return)&&i.call(f)}finally{if(o)throw o.error}}try{for(var g=Ss(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?al(m.doneData,e.context,t):void 0;this._doneEvent=Tl(this.id,b);try{for(var y=Ss(this.doneListeners),w=y.next();!w.done;w=y.next()){(0,w.value)(this._doneEvent)}}catch(e){l={error:e}}finally{try{w&&!w.done&&(c=y.return)&&c.call(y)}finally{if(l)throw l.error}}this._stop(),this._stopChildren(),rc(this.sessionId)}},e.prototype.onTransition=function(e){return this.listeners.add(e),this.status===sc.Running&&e(this.state,this.state.event),this},e.prototype.subscribe=function(e,t,n){var r=this,o=Cl(e,t,n);this.listeners.add(o.next),this.status!==sc.NotStarted&&o.next(this.state);var i=function(){r.doneListeners.delete(i),r.stopListeners.delete(i),o.complete()};return this.status===sc.Stopped?o.complete():(this.onDone(i),this.onStop(i)),{unsubscribe:function(){r.listeners.delete(o.next),r.doneListeners.delete(i),r.stopListeners.delete(i)}}},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===sc.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===sc.Running)return this;this.machine._init(),tc(this.sessionId,this),this.initialized=!0,this.status=sc.Running;var n=void 0===e?this.initialState:_l(this,(function(){return"object"==typeof(n=e)&&null!==n&&"value"in n&&"_event"in n?t.machine.resolveState(e):t.machine.resolveState(Xl.from(e,t.machine.context));var n}));return this.options.devTools&&this.attachDev(),this.scheduler.initialize((function(){t.update(n,$l)})),this},e.prototype._stopChildren=function(){this.children.forEach((function(e){pl(e.stop)&&e.stop()})),this.children.clear()},e.prototype._stop=function(){var e,t,n,r,o,i,a,s,l,c;try{for(var u=Ss(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=Ss(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=Ss(this.contextListeners),g=x.next();!g.done;g=x.next()){p=g.value;this.contextListeners.delete(p)}}catch(e){o={error:e}}finally{try{g&&!g.done&&(i=x.return)&&i.call(x)}finally{if(o)throw o.error}}try{for(var v=Ss(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=sc.Stopped,this._initialState=void 0;try{for(var b=Ss(Object.keys(this.delayedEventsMap)),y=b.next();!y.done;y=b.next()){var w=y.value;this.clock.clearTimeout(this.delayedEventsMap[w])}}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 Kl({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=ml({type:"xstate.stop"}),r=_l(e,(function(){var t=rl(Rs([],Es(e.state.configuration),!1).sort((function(e,t){return t.order-e.order})).map((function(t){return Rl(t.onExit,e.machine.options.actions)}))),r=Es(Ml(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),o=r[0],i=r[1],a=new Xl({value:e.state.value,context:i,_event:n,_sessionid:e.sessionId,historyValue:void 0,history:e.state,actions:o.filter((function(e){return!kl(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(),rc(e.sessionId)}})),this},e.prototype.batch=function(e){var t=this;if(this.status===sc.NotStarted&&this.options.deferEvents)qs||ul(!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!==sc.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,o,i=t.state,a=!1,s=[],l=function(e){var r=ml(e);t.forward(r),i=_l(t,(function(){return t.machine.transition(i,r,void 0,n||void 0)})),s.push.apply(s,Rs([],Es(t.machine.config.predictableActionArguments?i.actions:i.actions.map((function(e){return function(e,t){var n=e.exec;return ks(ks({},e),{exec:void 0!==n?function(){return n(t.context,t.event,{action:e,state:t,_event:t._event})}:void 0})}(e,i)}))),!1)),a=a||!!i.changed};try{for(var c=Ss(e),u=c.next();!u.done;u=c.next()){l(u.value)}}catch(e){r={error:e}}finally{try{u&&!u.done&&(o=c.return)&&o.call(c)}finally{if(r)throw r.error}}i.changed=a,i.actions=s,t.update(i,ml(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=ml(e);if(0===r.name.indexOf(zs)&&!this.state.nextEvents.some((function(e){return 0===e.indexOf(zs)})))throw r.data.data;return _l(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=Ss(this.forwardTo),o=r.next();!o.done;o=r.next()){var i=o.value,a=this.children.get(i);if(!a)throw new Error("Unable to forward event '".concat(e,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(i,"'."));a.send(e)}}catch(e){t={error:e}}finally{try{o&&!o.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),pl(t.stop)&&t.stop())},e.prototype.spawn=function(e,t,n){if(this.status!==sc.Running)return Il(e,t);if(sl(e))return this.spawnPromise(Promise.resolve(e),t);if(pl(e))return this.spawnCallback(e,t);if(function(e){try{return"function"==typeof e.send}catch(e){return!1}}(o=e)&&"id"in o)return this.spawnActor(e,t);if(function(e){try{return"subscribe"in e&&pl(e.subscribe)}catch(e){return!1}}(e))return this.spawnObservable(e,t);if(gl(e))return this.spawnMachine(e,ks(ks({},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,o},e.prototype.spawnMachine=function(t,n){var r=this;void 0===n&&(n={});var o=new e(t,ks(ks({},this.options),{parent:this,id:n.id||t.id})),i=ks(ks({},lc),n);i.sync&&o.onTransition((function(e){r.send(Hs,{state:e,id:o.id})}));var a=o;return this.children.set(o.id,a),i.autoForward&&this.forwardTo.add(o.id),o.onDone((function(e){r.removeChild(o.id),r.send(ml(e,{origin:o.id}))})).start(),a},e.prototype.spawnBehavior=function(e,t){var n=ac(e,{id:t,parent:this});return this.children.set(t,n),n},e.prototype.spawnPromise=function(e,t){var n,r,o=this,i=!1;e.then((function(e){i||(r=e,o.removeChild(t),o.send(ml(Tl(t,e),{origin:t})))}),(function(e){if(!i){o.removeChild(t);var n=Pl(t,e);try{o.send(ml(n,{origin:t}))}catch(r){!function(e,t,n){if(!qs){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 o=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(o))}}}(e,r,t),o.devTools&&o.devTools.send(n,o.state),o.machine.strict&&o.stop()}}}));var a=((n={id:t,send:function(){},subscribe:function(t,n,r){var o=Cl(t,n,r),i=!1;return e.then((function(e){i||(o.next(e),i||o.complete())}),(function(e){i||o.error(e)})),{unsubscribe:function(){return i=!0}}},stop:function(){i=!0},toJSON:function(){return{id:t}},getSnapshot:function(){return r}})[xl]=function(){return this},n);return this.children.set(t,a),a},e.prototype.spawnCallback=function(e,t){var n,r,o,i=this,a=!1,s=new Set,l=new Set;try{o=e((function(e){r=e,l.forEach((function(t){return t(e)})),a||i.send(ml(e,{origin:t}))}),(function(e){s.add(e)}))}catch(e){this.send(Pl(t,e))}if(sl(o))return this.spawnPromise(o,t);var c=((n={id:t,send:function(e){return s.forEach((function(t){return t(e)}))},subscribe:function(e){var t=Cl(e);return l.add(t.next),{unsubscribe:function(){l.delete(t.next)}}},stop:function(){a=!0,pl(o)&&o()},toJSON:function(){return{id:t}},getSnapshot:function(){return r}})[xl]=function(){return this},n);return this.children.set(t,c),c},e.prototype.spawnObservable=function(e,t){var n,r,o=this,i=e.subscribe((function(e){r=e,o.send(ml(e,{origin:t}))}),(function(e){o.removeChild(t),o.send(ml(Pl(t,e),{origin:t}))}),(function(){o.removeChild(t),o.send(ml(Tl(t),{origin:t}))})),a=((n={id:t,send:function(){},subscribe:function(t,n,r){return e.subscribe(t,n,r)},stop:function(){return i.unsubscribe()},getSnapshot:function(){return r},toJSON:function(){return{id:t}}})[xl]=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 qs||ul(!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}}})[xl]=function(){return this},n))},e.prototype.attachDev=function(){var e=oc();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(ks(ks({name:this.id,autoPause:!0,stateSanitizer:function(e){return{value:e.value,context:e.context,actions:e.actions}}},t),{features:ks({jump:!1,skip:!1},t?t.features:void 0)}),this.machine),this.devTools.init(this.state)}ic(this)}},e.prototype.toJSON=function(){return{id:this.id}},e.prototype[xl]=function(){return this},e.prototype.getSnapshot=function(){return this.status===sc.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=uc,e}();function uc(e,t){return new cc(e,t)}function dc(e){if("string"==typeof e){var t={type:e,toString:function(){return e}};return t}return e}function pc(e){return ks(ks({type:Ns},e),{toJSON:function(){e.onDone,e.onError;var t=$s(e,["onDone","onError"]);return ks(ks({},t),{type:Ns,src:dc(e.src)})}})}var hc="",fc="*",xc={},gc=function(e){return"#"===e[0]},vc=function(){function e(t,n,r,o){void 0===r&&(r="context"in t?t.context:void 0);var i,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==o?void 0:o.parent,this.key=this.config.key||(null==o?void 0:o.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||Rs([this.machine.key],Es(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!==(i=this.config.schema)&&void 0!==i?i:{},this.description=this.config.description,qs||ul(!("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?Qs(this.config.states,(function(t,n){var r,o=new e(t,{},void 0,{parent:a,key:n});return Object.assign(a.idMap,ks(((r={})[o.id]=o,r),o.idMap)),o})):xc;var s=0;!function e(t){var n,r;t.order=s++;try{for(var o=Ss(Nl(t)),i=o.next();!i.done;i=o.next()){e(i.value)}}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}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===hc})):hc in this.config.on),this.strict=!!this.config.strict,this.onEntry=il(this.config.entry||this.config.onEntry).map((function(e){return El(e)})),this.onExit=il(this.config.exit||this.config.onExit).map((function(e){return El(e)})),this.meta=this.config.meta,this.doneData="final"===this.type?this.config.data:void 0,this.invoke=il(this.config.invoke).map((function(e,t){var n,r;if(gl(e)){var o=jl(a.id,t);return a.machine.options.services=ks(((n={})[o]=e,n),a.machine.options.services),pc({src:o,id:o})}if(hl(e.src)){o=e.id||jl(a.id,t);return pc(ks(ks({},e),{id:o,src:e.src}))}if(gl(e.src)||pl(e.src)){o=e.id||jl(a.id,t);return a.machine.options.services=ks(((r={})[o]=e.src,r),a.machine.options.services),pc(ks(ks({id:o},e),{src:o}))}var i=e.src;return pc(ks(ks({id:jl(a.id,t)},e),{src:i}))})),this.activities=il(this.config.activities).concat(this.invoke).map((function(e){return Ol(e)})),this.transition=this.transition.bind(this),this.tags=il(this.config.tags)}return e.prototype._init=function(){this.__cache.transitions||zl(this).forEach((function(e){return e.on}))},e.prototype.withConfig=function(t,n){var r=this.options,o=r.actions,i=r.activities,a=r.guards,s=r.services,l=r.delays;return new e(this.config,{actions:ks(ks({},o),t.actions),activities:ks(ks({},i),t.activities),guards:ks(ks({},a),t.guards),services:ks(ks({},s),t.services),delays:ks(ks({},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 pl(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:Qs(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===hc,n=this.transitions.filter((function(n){var r=n.eventType===e;return t?r:r||n.eventType===fc}));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(Cs.After,"(").concat(e,")").concat(n)}(pl(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:Ps,event:pl(e)?e:vl(e),delay:t?t.delay:void 0,id:t&&void 0!==t.id?t.id:pl(e)?e.name:Xs(e)}}(r,{delay:t})),e.onExit.push({type:Ms,sendId:r}),r},r=dl(t)?t.map((function(e,t){var r=n(e.delay,t);return ks(ks({},e),{event:r})})):rl(Object.keys(t).map((function(e,r){var o=t[e],i=hl(o)?{target:o}:o,a=isNaN(+e)?e:+e,s=n(a,r);return il(i).map((function(e){return ks(ks({},e),{event:s,delay:a})}))})));return r.map((function(t){var n=t.delay;return ks(ks({},e.formatTransition(t)),{delay:n})}))},e.prototype.getStateNodes=function(e){var t,n=this;if(!e)return[];var r=e instanceof Xl?e.value:Ks(e,this.delimiter);if(hl(r)){var o=this.getStateNode(r).initial;return void 0!==o?this.getStateNodes(((t={})[r]=o,t)):[this,this.states[r]]}var i=Object.keys(r),a=[this];return a.push.apply(a,Rs([],Es(rl(i.map((function(e){return n.getStateNode(e).getStateNodes(r[e])})))),!1)),a},e.prototype.handles=function(e){var t=Xs(e);return this.events.includes(t)},e.prototype.resolveState=function(e){var t=e instanceof Xl?e:Xl.create(e),n=Array.from(Bl([],this.getStateNodes(t.value)));return new Xl(ks(ks({},t),{value:this.resolve(t.value),configuration:n,done:Gl(n,this),tags:ql(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),o=this.getStateNode(r[0])._transition(e[r[0]],t,n);return o&&o.transitions.length?o:this.next(t,n)},e.prototype.transitionParallelNode=function(e,t,n){var r,o,i={};try{for(var a=Ss(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&&(i[l]=u)}}}catch(e){r={error:e}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}var d=Object.keys(i).map((function(e){return i[e]})),p=rl(d.map((function(e){return e.transitions})));if(!d.some((function(e){return e.transitions.length>0})))return this.next(t,n);var h=rl(Object.keys(i).map((function(e){return i[e].configuration})));return{transitions:p,exitSet:rl(d.map((function(e){return e.exitSet}))),configuration:h,source:t,actions:rl(Object.keys(i).map((function(e){return i[e].actions})))}},e.prototype._transition=function(e,t,n){return hl(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,ml(t))},e.prototype.next=function(e,t){var n,r,o,i=this,a=t.name,s=[],l=[];try{for(var c=Ss(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||(hl(h)&&gc(h)?e.matches(Ks(this.getStateNodeById(h).path,this.delimiter)):Us(Ks(h,this.delimiter),tl(this.path.slice(0,-2))(e.value))),g=!1;try{g=!p||yl(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,Rs([],Es(d.actions),!1)),o=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(o){if(!l.length)return{transitions:[o],exitSet:[],configuration:e.value?[this]:[],source:e,actions:s};var v=rl(l.map((function(t){return i.getRelativeStateNodes(t,e.historyValue)})));return{transitions:[o],exitSet:!!o.internal?[]:rl(l.map((function(e){return i.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,o,i,a){var s,l,c,u,d=this,p=i?Bl([],this.getStateNodes(i.value)):[],h=new Set;try{for(var f=Ss(Array.from(e).sort((function(e,t){return e.order-t.order}))),x=f.next();!x.done;x=f.next()){(!Wl(p,m=x.value)||Wl(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=Ss(p),v=g.next();!v.done;v=g.next()){var m;Wl(e,m=v.value)&&!Wl(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),w=rl(b.map((function(e){var t=[];if("final"!==e.type)return t;var i=e.parent;if(!i.parent)return t;t.push(Ll(e.id,e.doneData),Ll(i.id,e.doneData?al(e.doneData,r,o):void 0));var a=i.parent;return"parallel"===a.type&&Al(a).every((function(e){return Gl(n.configuration,e)}))&&t.push(Ll(a.id)),t}))),C=b.map((function(e){var t=e.onEntry,n=e.activities.map((function(e){return function(e){var t=Ol(e);return{type:Cs.Start,activity:t,exec:void 0}}(e)}));return{type:"entry",actions:Rl(a?Rs(Rs([],Es(t),!1),Es(n),!1):Rs(Rs([],Es(n),!1),Es(t),!1),d.machine.options.actions)}})).concat({type:"state_done",actions:w.map((function(e){return function(e,t){return{type:Ts,event:"function"==typeof e?e:vl(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:Rl(Rs(Rs([],Es(e.onExit),!1),Es(e.activities.map((function(e){return function(e){var t=pl(e)?e:Ol(e);return{type:Cs.Stop,activity:t,exec:void 0}}(e)}))),!1),d.machine.options.actions)}})).concat({type:"transition",actions:Rl(n.actions,this.machine.options.actions)}).concat(C);if(t){var k=Rl(rl(Rs([],Es(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!kl(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 o,i,a=ml(t);if(e instanceof Xl)o=void 0===n?e:this.resolveState(Xl.from(e,n));else{var s=hl(e)?this.resolve(Js(this.getResolvedPath(e))):this.resolve(e),l=null!=n?n:this.machine.context;o=this.resolveState(Xl.from(s,l))}if(!qs&&a.name===fc)throw new Error("An event cannot have the wildcard type ('".concat(fc,"')"));if(this.strict&&!this.events.includes(a.name)&&(i=a.name,!/^(done|error)\./.test(i)))throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(a.name,"'"));var c=this._transition(o.value,o,a)||{transitions:[],configuration:[],exitSet:[],source:o,actions:[]},u=Bl([],this.getStateNodes(o.value)),d=c.configuration.length?Bl(u,c.configuration):u;return c.configuration=Rs([],Es(d),!1),this.resolveTransition(c,o,o.context,r,a)},e.prototype.resolveRaisedTransition=function(e,t,n,r){var o,i=e.actions;return(e=this.transition(e,t,void 0,r))._event=n,e.event=n.data,(o=e.actions).unshift.apply(o,Rs([],Es(i),!1)),e},e.prototype.resolveTransition=function(e,t,n,r,o){var i,a,s,l,c=this;void 0===o&&(o=$l);var u=e.configuration,d=!t||e.transitions.length>0,p=d?e.configuration:t?t.configuration:[],h=Gl(p,this),f=d?Zl(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,o,t,r),v=t?ks({},t.activities):{};try{for(var m=Ss(g),b=m.next();!b.done;b=m.next()){var y=b.value;try{for(var w=(s=void 0,Ss(y.actions)),C=w.next();!C.done;C=w.next()){var j=C.value;j.type===Os?v[j.activity.id||j.activity.type]=j:j.type===Ls&&(v[j.activity.id||j.activity.type]=!1)}}catch(e){s={error:e}}finally{try{C&&!C.done&&(l=w.return)&&l.call(w)}finally{if(s)throw s.error}}}}catch(e){i={error:e}}finally{try{b&&!b.done&&(a=m.return)&&a.call(m)}finally{if(i)throw i.error}}var k,$,S=Es(Ml(this,t,n,o,g,r,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),E=S[0],R=S[1],O=Es(function(e,t){var n,r,o=Es([[],[]],2),i=o[0],a=o[1];try{for(var s=Ss(e),l=s.next();!l.done;l=s.next()){var c=l.value;t(c)?i.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[i,a]}(E,kl),2),L=O[0],T=O[1],P=E.filter((function(e){var t;return e.type===Os&&(null===(t=e.activity)||void 0===t?void 0:t.type)===Ns})),M=P.reduce((function(e,t){return e[t.activity.id]=function(e,t,n,r){var o,i=wl(e.src),a=null===(o=null==t?void 0:t.options.services)||void 0===o?void 0:o[i.type],s=e.data?al(e.data,n,r):void 0,l=a?Il(a,e.id,s):Dl(e.id);return l.meta=e,l}(t.activity,c.machine,R,o),e}),t?ks({},t.children):{}),_=new Xl({value:f||t.value,context:R,_event:o,_sessionid:t?t._sessionid:null,historyValue:f?x?(k=x,$=f,{current:$,states:ll(k,$)}):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:M,done:h,tags:ql(p),machine:this}),D=n!==R;_.changed=o.name===Hs||D;var I=_.history;I&&delete I.history;var V=!h&&(this._transient||u.some((function(e){return e._transient})));if(!(d||V&&o.name!==hc))return _;var N=_;if(!h)for(V&&(N=this.resolveRaisedTransition(N,{type:_s},o,r));L.length;){var A=L.shift();N=this.resolveRaisedTransition(N,A._event,o,r)}var z=N.changed||(I?!!N.actions.length||D||typeof I.value!=typeof N.value||!Ul(N.value,I.value):void 0);return N.changed=z,N.history=I,N},e.prototype.getStateNode=function(e){if(gc(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=gc(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&&gc(e))try{return this.getStateNodeById(e.slice(1))}catch(e){}for(var t=Ys(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||xc;switch(this.type){case"parallel":return Qs(this.initialStateValue,(function(t,r){return t?n.getStateNode(r).resolve(e[r]||t):xc}));case"compound":if(hl(e)){var r=this.getStateNode(e);return"parallel"===r.type||"compound"===r.type?((t={})[e]=r.initialStateValue,t):e}return Object.keys(e).length?Qs(e,(function(e,t){return e?n.getStateNode(t).resolve(e):xc})):this.initialStateValue||{};default:return e||xc}},e.prototype.getResolvedPath=function(e){if(gc(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 Ys(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=el(this.states,(function(e){return e.initialStateValue||xc}),(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=Vl(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=hl(t.target)&&gc(t.target)?Js(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 Vl(this)?[this]:"compound"!==this.type||this.initial?rl(nl(this.initialStateValue).map((function(t){return e.getFromRelativePath(t)}))):(qs||ul(!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=Es(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 o=this.getStateNode(n);if("history"===o.type)return o.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:el(this.states,(function(t,n){if(!e)return t.historyValue();var r=hl(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?rl(nl(r).map((function(e){return n.getFromRelativePath(e)}))):n.initialStateNodes}var o,i,a=(o=n.path,i="states",function(e){var t,n,r=e;try{for(var a=Ss(o),s=a.next();!s.done;s=a.next()){var l=s.value;r=r[i][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 hl(a)?[n.getStateNode(a)]:rl(nl(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=rl(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 o=this.states,i=new Set(this.ownEvents);if(o)try{for(var a=Ss(Object.keys(o)),s=a.next();!s.done;s=a.next()){var l=o[s.value];if(l.states)try{for(var c=(n=void 0,Ss(l.events)),u=c.next();!u.done;u=c.next()){var d=u.value;i.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(i)},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(!hl(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 il(e)}(e.target),r="internal"in e?e.internal:!n||n.some((function(e){return hl(e)&&e[0]===t.delimiter})),o=this.machine.options.guards,i=this.resolveTarget(n),a=ks(ks({},e),{actions:Rl(il(e.actions)),cond:fl(e.cond,o),target:i,source:this,internal:r,eventType:e.event,toJSON:function(){return ks(ks({},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 o=this.config.on,i=fc,a=o[i],s=void 0===a?[]:a,l=$s(o,["*"]);n=rl(Object.keys(l).map((function(e){qs||e!==hc||ul(!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=bl(e,l[e]);return qs||function(e,t,n){var r=n.slice(0,-1).some((function(e){return!("cond"in e)&&!("in"in e)&&(hl(e.target)||gl(e.target))})),o=t===hc?"the transient event":"event '".concat(t,"'");ul(!r,"One or more transitions for ".concat(o," on state '").concat(e.id,"' are unreachable. ")+"Make sure that the default transition is the last one defined.")}(r,e,t),t})).concat(bl(fc,s)))}else n=[];var c=this.config.always?bl("",this.config.always):[],u=this.config.onDone?bl(String(Ll(this.id)),this.config.onDone):[];qs||ul(!(this.config.onDone&&!this.parent),'Root nodes cannot have an ".onDone" transition. Please check the config of "'.concat(this.id,'".'));var d=rl(this.invoke.map((function(e){var t=[];return e.onDone&&t.push.apply(t,Rs([],Es(bl(String(Tl(e.id)),e.onDone)),!1)),e.onError&&t.push.apply(t,Rs([],Es(bl(String(Pl(e.id)),e.onError)),!1)),t}))),p=this.after,h=rl(Rs(Rs(Rs(Rs([],Es(u),!1),Es(d),!1),Es(n),!1),Es(c),!1).map((function(e){return il(e).map((function(e){return r.formatTransition(e)}))})));try{for(var f=Ss(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 mc,bc=function(e){return{type:Ds,assignment:e}};!function(e){e[e.Effect=1]="Effect",e[e.LayoutEffect=2]="LayoutEffect"}(mc||(mc={}));var yc="undefined"!=typeof document?n.useLayoutEffect:function(){};function wc(e){var t=l.useRef();return t.current||(t.current={v:e()}),t.current.v}var Cc=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},jc=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 kc=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},$c=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};function Sc(e,t){(0,e.exec)(t.context,t._event.data,{action:e,state:t,_event:t._event})()}function Ec(e){var t=n.useRef([]),r=n.useRef([]);yc((function(){var n=e.subscribe((function(e){var n,o;if(e.actions.length){var i=e.actions.filter((function(e){return"function"==typeof e.exec&&"__effect"in e.exec})),a=kc(function(e,t){var n,r,o=Cc([[],[]],2),i=o[0],a=o[1];try{for(var s=jc(e),l=s.next();!l.done;l=s.next()){var c=l.value;t(c)?i.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[i,a]}(i,(function(e){return e.exec.__effect===mc.Effect})),2),s=a[0],l=a[1];(n=t.current).push.apply(n,$c([],kc(s.map((function(t){return[t,e]}))),!1)),(o=r.current).push.apply(o,$c([],kc(l.map((function(t){return[t,e]}))),!1))}}));return function(){n.unsubscribe()}}),[]),yc((function(){for(;r.current.length;){var e=kc(r.current.shift(),2);Sc(e[0],e[1])}})),n.useEffect((function(){for(;t.current.length;){var e=kc(t.current.shift(),2);Sc(e[0],e[1])}}))}var Rc=function(){return Rc=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Rc.apply(this,arguments)},Oc=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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},Lc=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};var Tc=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};function Pc(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)}),[]),o=function(e,t,r){void 0===t&&(t={});var o=wc((function(){return"function"==typeof e?e():e}));if("production"!==process.env.NODE_ENV&&"function"!=typeof e){var i=Lc(n.useState(o),1)[0];e!==i&&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=Oc(t,["context","guards","actions","activities","services","delays","state"]),f=wc((function(){var e={context:a,guards:s,actions:l,activities:c,services:u,delays:d};return uc(o.withConfig(e,(function(){return Rc(Rc({},o.context),a)})),Rc({deferEvents:!0},h))}));return yc((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]),yc((function(){return f.start(p?Xl.create(p):void 0),function(){f.stop()}}),[]),yc((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]),Ec(f),f}(e,t,r),i=Tc(n.useState((function(){var e=o.machine.initialState;return t.state?Xl.create(t.state):e})),2),a=i[0],s=i[1];return[a,o.send,o]}function Mc(){return Mc=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},Mc.apply(null,arguments)}function _c(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 Dc={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(Dc.str(e)||Dc.num(e))return e===t;if(Dc.obj(e)&&Dc.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!Dc.und(n)||e===t}};function Ic(e,t){return Dc.und(e)||Dc.nul(e)?t:e}function Vc(e){return Dc.und(e)?[]:Dc.arr(e)?e:[e]}function Nc(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 Dc.fun(e)?e(...n):e}function Ac(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,_c(e,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}(e);if(Dc.und(t))return Mc({to:t},e);const n=Object.keys(e).reduce(((n,r)=>Dc.und(t[r])?Mc({},n,{[r]:e[r]}):n),{});return Mc({to:t},n)}class zc{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 Bc extends zc{constructor(){super(...arguments),this.payload=[],this.attach=()=>this.payload.forEach((e=>e instanceof zc&&e.addChild(this))),this.detach=()=>this.payload.forEach((e=>e instanceof zc&&e.removeChild(this)))}}class Hc extends zc{constructor(){super(...arguments),this.payload={},this.attach=()=>Object.values(this.payload).forEach((e=>e instanceof zc&&e.addChild(this))),this.detach=()=>Object.values(this.payload).forEach((e=>e instanceof zc&&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 zc)&&(t[n]=r instanceof zc?r[e?"getAnimatedValue":"getValue"]():r)}return t}getAnimatedValue(){return this.getValue(!0)}}let Fc,Zc;let Wc,Gc=e=>"undefined"!=typeof window?window.requestAnimationFrame(e):-1;let qc,Uc=()=>Date.now();class Xc extends Hc{constructor(e,t){super(),this.update=void 0,this.payload=e.style?Mc({},e,{style:qc(e.style)}):e,this.update=t,this.attach()}}let Yc=!1;const Kc=new Set,Jc=()=>{if(!Yc)return!1;let e=Uc();for(let t of Kc){let n=!1;for(let r=0;r<t.configs.length;r++){let o,i,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 zc,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),o=e>=r.startTime+a.duration;else if(a.decay)c=s+d/(1-.998)*(1-Math.exp(-.0020000000000000018*(e-r.startTime))),o=Math.abs(r.lastPosition-c)<.1,o&&(l=c);else{i=void 0!==r.lastTime?r.lastTime:e,d=void 0!==r.lastVelocity?r.lastVelocity:a.initialVelocity,e>i+64&&(i=e);let t=Math.floor(e-i);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;o=n||u&&p,r.lastVelocity=d,r.lastTime=e}u&&!a.toValues[t].done&&(o=!1),o?(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||(Kc.delete(t),t.stop(!0))}return Kc.size?Gc(Jc):Yc=!1,Yc};function Qc(e,t,n){if("function"==typeof e)return e;if(Array.isArray(e))return Qc({range:e,output:t,extrapolate:n});if(Wc&&"string"==typeof e.output[0])return Wc(e);const r=e,o=r.output,i=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,i);return function(e,t,n,r,o,i,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===o)return r;if(t===n)return e<=t?r:o;t===-1/0?c=-c:n===1/0?c-=t:c=(c-t)/(n-t);c=i(c),r===-1/0?c=-c:o===1/0?c+=r:c=c*(o-r)+r;return c}(e,i[t],i[t+1],o[t],o[t+1],l,a,s,r.map)}}class eu extends Bc{constructor(e,t,n,r){super(),this.calc=void 0,this.payload=e instanceof Bc&&!(e instanceof eu)?e.getPayload():Array.isArray(e)?e:[e],this.calc=Qc(t,n,r)}getValue(){return this.calc(...this.payload.map((e=>e.getValue())))}updateConfig(e,t,n){this.calc=Qc(e,t,n)}interpolate(e,t,n){return new eu(this,e,t,n)}}const tu=(e,t,n)=>e&&new eu(e,t,n);function nu(e,t){"update"in e?t.add(e):e.getChildren().forEach((e=>nu(e,t)))}class ru extends zc{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&&nu(this,this.animatedStyles),this.animatedStyles.forEach((e=>e.update()))}clearStyles(){this.animatedStyles.clear()}getValue(){return this.value}interpolate(e,t,n){return new eu(this,e,t,n)}}class ou extends Bc{constructor(e){super(),this.payload=e.map((e=>new ru(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 eu(this,e,t)}}let iu=0,au=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=iu++}update(e){if(!e)return this;const t=Ac(e),n=t.delay,r=void 0===n?0:n,o=t.to,i=_c(t,["delay","to"]);if(Dc.arr(o)||Dc.fun(o))this.queue.push(Mc({},i,{delay:r,to:o}));else if(o){let e={};Object.entries(o).forEach((t=>{let n=t[0],o=t[1];const a=Mc({to:{[n]:o},delay:Nc(r,n)},i),s=e[a.delay]&&e[a.delay].to;e[a.delay]=Mc({},e[a.delay],a,{to:Mc({},s,a.to)})})),this.queue=Object.values(e)}return this.queue=this.queue.sort(((e,t)=>e.delay-t.delay)),this.diff(i),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,o=void 0===r?{}:r;Dc.obj(n)&&(this.merged=Mc({},n,this.merged)),Dc.obj(o)&&(this.merged=Mc({},this.merged,o))}));const t=this.local=++this.guid,n=this.localQueue=this.queue;this.queue=[],n.forEach(((r,o)=>{let i=r.delay,a=_c(r,["delay"]);const s=r=>{o===n.length-1&&t===this.guid&&r&&(this.idle=!0,this.props.onRest&&this.props.onRest(this.merged)),e&&e()};let l=Dc.arr(a.to)||Dc.fun(a.to);i?setTimeout((()=>{t===this.guid&&(l?this.runAsync(a,s):this.diff(a).start(s))}),i):l?this.runAsync(a,s):this.diff(a).start(s)}))}else Dc.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),t=this,Kc.has(t)||Kc.add(t),Yc||(Yc=!0,Gc(Jc));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,Kc.has(t)&&Kc.delete(t)),this}runAsync(e,t){var n=this;e.delay;let r=_c(e,["delay"]);const o=this.local;let i=Promise.resolve(void 0);if(Dc.arr(r.to))for(let e=0;e<r.to.length;e++){const t=e,n=Mc({},r,Ac(r.to[t]));Dc.arr(n.config)&&(n.config=n.config[t]),i=i.then((()=>{if(o===this.guid)return new Promise((e=>this.diff(n).start(e)))}))}else if(Dc.fun(r.to)){let e,t=0;i=i.then((()=>r.to((n=>{const i=Mc({},r,Ac(n));if(Dc.arr(i.config)&&(i.config=i.config[t]),t++,o===this.guid)return e=new Promise((e=>this.diff(i).start(e)))}),(function(e){return void 0===e&&(e=!0),n.stop(e)})).then((()=>e))))}i.then(t)}diff(e){this.props=Mc({},this.props,e);let t=this.props,n=t.from,r=void 0===n?{}:n,o=t.to,i=void 0===o?{}:o,a=t.config,s=void 0===a?{}:a,l=t.reverse,c=t.attach,u=t.reset,d=t.immediate;if(l){var p=[i,r];r=p[0],i=p[1]}this.merged=Mc({},r,this.merged,i),this.hasChanged=!1;let h=c&&c(this);if(this.animations=Object.entries(this.merged).reduce(((e,t)=>{let n=t[0],o=t[1],i=e[n]||{};const a=Dc.num(o),l=Dc.str(o)&&!o.startsWith("#")&&!/\d/.test(o)&&!Zc[o],c=Dc.arr(o),p=!a&&!c&&!l;let f=Dc.und(r[n])?o:r[n],x=a||c||l?o:1,g=Nc(s,n);h&&(x=h.animations[n].parent);let v,m=i.parent,b=i.interpolation,y=Vc(h?x.getPayload():x),w=o;p&&(w=Wc({range:[0,1],output:[o,o]})(1));let C=b&&b.getValue();const j=!Dc.und(m)&&i.animatedValues.some((e=>!e.done)),k=!Dc.equ(w,C),$=!Dc.equ(w,i.previous),S=!Dc.equ(g,i.config);if(u||$&&k||S){if(a||l)m=b=i.parent||new ru(f);else if(c)m=b=i.parent||new ou(f);else if(p){let e=i.interpolation&&i.interpolation.calc(i.parent.value);e=void 0===e||u?f:e,i.parent?(m=i.parent,m.setValue(0,!1)):m=new ru(0);const t={output:[e,o]};i.interpolation?(b=i.interpolation,i.interpolation.updateConfig(t)):b=m.interpolate(t)}return y=Vc(h?x.getPayload():x),v=Vc(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=Uc(),e.done=!1,e.animatedStyles.clear()})),Nc(d,n)&&m.setValue(p?x:o,!1),Mc({},e,{[n]:Mc({},i,{name:n,parent:m,interpolation:b,animatedValues:v,toValues:y,previous:w,config:g,fromValues:Vc(m.getValue()),immediate:Nc(d,n),initialVelocity:Ic(g.velocity,0),clamp:Ic(g.clamp,!1),precision:Ic(g.precision,.01),tension:Ic(g.tension,170),friction:Ic(g.friction,26),mass:Ic(g.mass,1),duration:g.duration,easing:Ic(g.easing,(e=>e)),decay:g.decay})})}return k?e:(p&&(m.setValue(1,!1),b.updateConfig({output:[w,w]})),m.done=!0,this.hasChanged=!0,Mc({},e,{[n]:Mc({},e[n],{previous:w})}))}),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 su=e=>{const t=Dc.fun(e),r=((e,t)=>{const r=n.useRef(!1),o=n.useRef(),i=Dc.fun(t),a=n.useMemo((()=>{let n;return o.current&&(o.current.map((e=>e.destroy())),o.current=void 0),[new Array(e).fill().map(((e,r)=>{const o=new au,a=i?Nc(t,r,o):t[r];return 0===r&&(n=a.ref),o.update(a),n||o.start(),o})),n]}),[e]),s=a[0],l=a[1];o.current=s,n.useImperativeHandle(l,(()=>({start:()=>Promise.all(o.current.map((e=>new Promise((t=>e.start(t)))))),stop:e=>o.current.forEach((t=>t.stop(e))),get controllers(){return o.current}})));const c=n.useMemo((()=>e=>o.current.map(((t,n)=>{t.update(i?Nc(e,n,t):e[n]),l||t.start()}))),[e]);n.useEffect((()=>{r.current?i||c(t):l||o.current.forEach((e=>e.start()))})),n.useEffect((()=>(r.current=!0,()=>o.current.forEach((e=>e.destroy())))),[]);const u=o.current.map((e=>e.getValues()));return i?[u,c,e=>o.current.forEach((t=>t.pause(e)))]:u})(1,t?e:[e]),o=r[0],i=r[1],a=r[2];return t?[o[0],i,a]:o};class lu extends Hc{constructor(e){void 0===e&&(e={}),super(),!e.transform||e.transform instanceof zc||(e=Fc.transform(e)),this.payload=e}}const cu={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},uu="[-+]?\\d*\\.?\\d+",du=uu+"%";function pu(){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 hu=new RegExp("rgb"+pu(uu,uu,uu)),fu=new RegExp("rgba"+pu(uu,uu,uu,uu)),xu=new RegExp("hsl"+pu(uu,du,du)),gu=new RegExp("hsla"+pu(uu,du,du,uu)),vu=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,mu=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,bu=/^#([0-9a-fA-F]{6})$/,yu=/^#([0-9a-fA-F]{8})$/;function wu(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 Cu(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,i=wu(o,r,e+1/3),a=wu(o,r,e),s=wu(o,r,e-1/3);return Math.round(255*i)<<24|Math.round(255*a)<<16|Math.round(255*s)<<8}function ju(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function ku(e){return(parseFloat(e)%360+360)%360/360}function $u(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function Su(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function Eu(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=bu.exec(e))?parseInt(t[1]+"ff",16)>>>0:cu.hasOwnProperty(e)?cu[e]:(t=hu.exec(e))?(ju(t[1])<<24|ju(t[2])<<16|ju(t[3])<<8|255)>>>0:(t=fu.exec(e))?(ju(t[1])<<24|ju(t[2])<<16|ju(t[3])<<8|$u(t[4]))>>>0:(t=vu.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=yu.exec(e))?parseInt(t[1],16)>>>0:(t=mu.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=xu.exec(e))?(255|Cu(ku(t[1]),Su(t[2]),Su(t[3])))>>>0:(t=gu.exec(e))?(Cu(ku(t[1]),Su(t[2]),Su(t[3]))|$u(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 Ru=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Ou=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Lu=new RegExp(`(${Object.keys(cu).join("|")})`,"g");let Tu={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 Pu=["Webkit","Ms","Moz","O"];function Mu(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||Tu.hasOwnProperty(e)&&Tu[e]?(""+t).trim():t+"px"}Tu=Object.keys(Tu).reduce(((e,t)=>(Pu.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),Tu);const _u={};var Du;qc=e=>new lu(e),Du=e=>{const t=e.output.map((e=>e.replace(Ou,Eu))).map((e=>e.replace(Lu,Eu))),n=t[0].match(Ru).map((()=>[]));t.forEach((e=>{e.match(Ru).forEach(((e,t)=>n[t].push(+e)))}));const r=t[0].match(Ru).map(((t,r)=>Qc(Mc({},e,{output:n[r]}))));return e=>{let n=0;return t[0].replace(Ru,(()=>r[n++](e))).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,((e,t,n,r,o)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${o})`))}},Wc=Du,Zc=cu,function(e,t){Fc={fn:e,transform:t}}(((e,t)=>{if(!e.nodeType||void 0===e.setAttribute)return!1;{const o=t.style,i=t.children,a=t.scrollTop,s=t.scrollLeft,l=_c(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!==i&&(e.textContent=i);for(let t in o)if(o.hasOwnProperty(t)){var n=0===t.indexOf("--"),r=Mu(t,o[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:_u[t]||(_u[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())));void 0!==e.getAttribute(n)&&e.setAttribute(n,l[t])}}}),(e=>e));var Iu;const Vu=(Iu=e=>n.forwardRef(((t,r)=>{const o=function(){const e=n.useState(!1)[1];return n.useCallback((()=>e((e=>!e))),[])}(),i=n.useRef(!0),a=n.useRef(null),s=n.useRef(null),l=n.useCallback((e=>{const t=a.current;a.current=new Xc(e,(()=>{let e=!1;s.current&&(e=Fc.fn(s.current,a.current.getAnimatedValue())),s.current&&!1!==e||o()})),t&&t.detach()}),[]);n.useEffect((()=>()=>{i.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=_c(c,["scrollTop","scrollLeft"]),d=(p=e,!Dc.fun(p)||p.prototype instanceof n.Component?e=>s.current=function(e,t){return t&&(Dc.fun(t)?t(e):Dc.obj(t)&&(t.current=e)),e}(e,r):void 0);var p;return n.createElement(e,Mc({},u,{ref:d}))})),e=>(Dc.arr(e)?e:Object.keys(e)).reduce(((e,t)=>{const n=t;return e[n]=Iu(n),e}),Iu))(["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 Nu(e,t){return e.map((function(e,n){return e+t[n]}))}function Au(e,t){return e.map((function(e,n){return e-t[n]}))}function zu(e){return Math.hypot.apply(Math,e)}function Bu(e){return Math.sign?Math.sign(e):Number(e>0)-Number(e<0)||+e}function Hu(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 Fu(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?-Hu(t-e,n-t,r)+t:e>n?+Hu(e-n,n-t,r)+n:e}function Zu(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 Wu(){return Wu=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},Wu.apply(this,arguments)}function Gu(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function qu(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Uu(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 Xu(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 Uu(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)?Uu(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 Yu(){}function Ku(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?Yu:1===t.length?t[0]:function(){for(var e,n,r=Xu(t);!(n=r()).done;){e=n.value.apply(this,arguments)||e}return e}}function Ju(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 Qu(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 ed(e,t){void 0===e&&(e={});for(var n={},r=0,o=Object.entries(t);r<o.length;r++){var i=o[r],a=i[0],s=i[1];switch(typeof s){case"function":n[a]=s.call(n,e[a],a,e);break;case"object":n[a]=ed(e[a],s);break;case"boolean":s&&(n[a]=e[a])}}return n}var td=Wu({},{threshold:function(e){return void 0===e&&(e=0),Ju(e)},rubberband:function(e){switch(void 0===e&&(e=0),e){case!0:return Ju(.15);case!1:return Ju(0);default:return Ju(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:Ju(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 td.bounds(e(t))};var t=e,n=t.left,r=void 0===n?-1/0:n,o=t.right,i=void 0===o?1/0:o,a=t.top,s=void 0===a?-1/0:a,l=t.bottom;return[[r,i],[s,void 0===l?1/0:l]]}}),nd="undefined"!=typeof window&&window.document&&window.document.createElement,rd={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=nd?window:void 0),e})),eventOptions:function(e){var t=void 0===e?{}:e,n=t.passive,r=void 0===n||n,o=t.capture;return{passive:r,capture:void 0!==o&&o}}},od=Wu({},td,{threshold:function(e,t,n){var r=n.filterTaps,o=void 0!==r&&r,i=n.lockDirection,a=void 0!==i&&i,s=n.axis,l=Ju(e,o?3:a||(void 0===s?void 0:s)?1:0);return this.filterTaps=o||l[0]+l[1]>0,l},swipeVelocity:function(e){return void 0===e&&(e=.5),Ju(e)},swipeDistance:function(e){return void 0===e&&(e=60),Ju(e)},delay:function(e){switch(void 0===e&&(e=0),e){case!0:return 180;case!1:return 0;default:return e}}});function id(e){var t=e.domTarget,n=e.eventOptions,r=e.window,o=e.enabled,i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,["domTarget","eventOptions","window","enabled"]),a=function(e){return void 0===e&&(e={}),ed(e,rd)}({domTarget:t,eventOptions:n,window:r,enabled:o});return a.drag=function(e){return void 0===e&&(e={}),ed(e,od)}(i),a}function ad(e){return Wu({_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:Yu,canceled:!1,memo:void 0,args:void 0},e)}function sd(){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:ad({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:ad({da:[0,0],vdva:[0,0],origin:void 0,turns:0}),wheel:ad({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),move:ad({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),scroll:ad({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0})}}var ld=new Map,cd=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 o=arguments.length,i=new Array(o>2?o-2:0),a=2;a<o;a++)i[a-2]=arguments[a];n.controller.timeouts[n.stateKey]=(r=window).setTimeout.apply(r,[e,t].concat(i))},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 o=Wu({},n.controller.state.shared,n.state,n.mapStateValues(n.state)),i=n.handler(o);return n.state.memo=void 0!==i?i:n.state.memo,n.state._active||n.clean(),o}}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,o=t.rubberband,i=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]?ud(h[0],i[0]):u[0],x=!1===u[1]?ud(h[1],i[1]):u[1],g=this.checkIntentionality([f,x],h);if(g._blocked)return Wu({},g,{_movement:h,delta:[0,0]});var v,m,b,y,w=g._intentional,C=h;(!1!==w[0]&&!1===u[0]&&(m=Qu(n,this.state),v=Qu(r,this.state),l[0]=m[0],s[0]=v[0]),!1!==w[1]&&!1===u[1])&&(m=null!=(b=m)?b:Qu(n,this.state),v=null!=(y=v)?y:Qu(r,this.state),l[1]=m[1],s[1]=v[1]);var j=[!1!==w[0]?h[0]-w[0]:l[0],!1!==w[1]?h[1]-w[1]:l[1]],k=Nu(j,d),$=c?o:[0,0];return j=dd(s,Nu(j,l),$),Wu({},g,{intentional:!1!==w[0]||!1!==w[1],_initial:l,_movement:C,movement:j,values:e,offset:dd(s,k,$),delta:Au(j,p)})},t.clean=function(){this.clearTimeout()},Zu(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 ud(e,t){return Math.abs(e)>=t&&Bu(e)*t}function dd(e,t,n){var r=t[0],o=t[1],i=n[0],a=n[1],s=e[0],l=s[0],c=s[1],u=e[1],d=u[0],p=u[1];return[Fu(r,l,c,i),Fu(o,d,p,a)]}function pd(e,t,n){var r=e.state,o=e.args,i=t.timeStamp,a=t.type,s=r.values;return{_lastEventType:a,event:t,timeStamp:i,elapsedTime:n?0:i-r.startTime,args:o,previous:s}}function hd(e,t){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return e.call.apply(e,[this,Wu({},t,{event:n})].concat(o))}}var fd=function(e){var t=this;this.classes=e,this.bind=function(){for(var e={},n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];for(var i,a=Xu(t.classes);!(i=a()).done;){new(0,i.value)(t,r).addBindings(e)}for(var s=0,l=Object.entries(t.nativeRefs);s<l.length;s++){var c=l[s];vd(e,c[0],hd(c[1],Wu({},t.state.shared,{args:r})))}return t.config.domTarget?function(e,t){var n=e.config,r=e.domListeners,o=gd(n);if(!o)throw new Error("domTarget must be defined");var i=n.eventOptions;bd(o,xd(r),i);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,Ku.apply(void 0,u)])}md(o,r,i)}(t,e):function(e,t){for(var n=e.config,r={},o=n.eventOptions.capture?"Capture":"",i=0,a=Object.entries(t);i<a.length;i++){var s=a[i],l=s[0],c=s[1],u=Array.isArray(c)?c:[c];r[l+o]=Ku.apply(void 0,u)}return r}(t,e)},this.effect=function(){return t.config.domTarget&&t.bind(),t.clean},this.clean=function(){var e=gd(t.config),n=t.config.eventOptions;e&&bd(e,xd(t.domListeners),n),Object.values(t.timeouts).forEach(clearTimeout),function(e){var t=e.config,n=t.window,r=t.eventOptions,o=e.windowListeners;if(!n)return;for(var i in o){bd(n,o[i],r)}e.windowListeners={}}(t)},this.state=sd(),this.timeouts={},this.domListeners=[],this.windowListeners={}};function xd(e){return void 0===e&&(e=[]),e.splice(0,e.length)}function gd(e){var t=e.domTarget;return t&&"current"in t?t.current:t}function vd(e,t,n){e[t]||(e[t]=[]),e[t].push(n)}function md(e,t,n){void 0===t&&(t=[]),void 0===n&&(n={});for(var r,o=Xu(t);!(r=o()).done;){var i=r.value,a=i[0],s=i[1];e.addEventListener(a,s,n)}}function bd(e,t,n){void 0===t&&(t=[]),void 0===n&&(n={});for(var r,o=Xu(t);!(r=o()).done;){var i=r.value,a=i[0],s=i[1];e.removeEventListener(a,s,n)}}function yd(e,t,r){void 0===r&&(r={});var o=function(e){var t=new Set;e.drag&&t.add(ld.get("drag"));e.wheel&&t.add(ld.get("wheel"));e.scroll&&t.add(ld.get("scroll"));e.move&&t.add(ld.get("move"));e.pinch&&t.add(ld.get("pinch"));e.hover&&t.add(ld.get("hover"));return t}(e),i=n.useMemo((function(){return new fd(o)}),[]);return i.config=t,i.handlers=e,i.nativeRefs=r,n.useEffect(i.effect,[]),i.config.domTarget?wd:i.bind}function wd(){"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 Cd(e){if("touches"in e){var t=e.targetTouches,n=e.changedTouches;return t.length>0?t:n}return null}function jd(e){var t="buttons"in e?e.buttons:0,n=Cd(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 kd(e){var t=Cd(e),n=t?t[0]:e;return[n.clientX,n.clientY]}var $d=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,o=e.windowListeners;void 0===n&&(n=[]),r.window&&(bd(r.window,o[t],r.eventOptions),md(r.window,o[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(qu(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=jd(e);if(n.down){t.updateSharedState(n);var r=kd(e),o=t.getKinematics(r,e),i=pd(qu(t),e),a=t.state._isTap,s=zu(o._movement);a&&s>=3&&(a=!1),t.updateGestureState(Wu({},i,o,{_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,o=r[0],i=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=Wu({},pd(qu(t),e),t.getMovement(t.state.values)),b=[0,0];m.elapsedTime<220&&(!1!==u&&Math.abs(o)>h&&Math.abs(s)>g&&(b[0]=Bu(o)),!1!==d&&Math.abs(i)>f&&Math.abs(l)>v&&(b[1]=Bu(i))),t.updateGestureState(Wu({},m,{tap:n,swipe:b})),t.fireGestureHandler(!0===n)}},t.clean=function(){e.prototype.clean.call(qu(t)),t.state._delayedEvent=!1,function(e,t){var n=e.config,r=e.windowListeners;n.window&&(bd(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}Gu(t,e);var n=t.prototype;return n.startDrag=function(e){var t=kd(e);this.updateSharedState(jd(e)),this.updateGestureState(Wu({},function(e,t,n){var r=e.state.offset,o=n.timeStamp;return Wu({},sd()[e.stateKey],{_active:!0,values:t,initial:t,offset:r,lastOffset:r,startTime:o})}(this,t,e),pd(this,e,!0),{_pointerId:e.pointerId,cancel:this.onCancel})),this.updateGestureState(this.getMovement(t)),this.fireGestureHandler()},n.addBindings=function(e){(vd(e,"onPointerDown",this.onDragStart),this.config.filterTaps)&&vd(e,this.controller.config.eventOptions.capture?"onClick":"onClickCapture",this.onClick)},t}(function(e){function t(){return e.apply(this,arguments)||this}Gu(t,e);var n=t.prototype;return n.getInternalMovement=function(e,t){return Au(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],o=n[1],i=this.state.axis||(r>o?"x":r<o?"y":void 0);return this.config.axis||this.config.lockDirection?i?this.config.axis&&i!==this.config.axis?{_intentional:e,_blocked:!0,axis:i}:(e["x"===i?1:0]=!1,{_intentional:e,_blocked:!1,axis:i}):{_intentional:[!1,!1],_blocked:!1,axis:i}:{_intentional:e,_blocked:!1,axis:i}},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=zu(t),o=0===r?0:1/r,i=0===n?0:1/n,a=i*r,s=t.map((function(e){return i*e})),l=t.map((function(e){return o*e}));return{velocities:s,velocity:a,distance:zu(e),direction:l}}(n.movement,n.delta,r))}return n},n.mapStateValues=function(e){return{xy:e.values,vxvy:e.velocities}},t}(cd));function Sd(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,o,i;if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(r=n;0!=r--;)if(!Sd(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(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;for(i=e.entries();!(r=i.next()).done;)if(!Sd(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(i=e.entries();!(r=i.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=(o=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;if("undefined"!=typeof Element&&e instanceof Element)return!1;for(r=n;0!=r--;)if(!("_owner"===o[r]&&e.$$typeof||Sd(e[o[r]],t[o[r]])))return!1;return!0}return e!=e&&t!=t}function Ed(e,t){try{return Sd(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 Rd(e,t){void 0===t&&(t={}),ld.set("drag",$d);var r=n.useRef();return r.current||(r.current=function(e,t){var n,r,o=[],i=!1;return function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];return i&&n===this&&t(s,o)||(r=e.apply(this,s),i=!0,n=this,o=s),r}}(id,Ed)),yd({drag:e},r.current(t))}
|
|
2402
2413
|
/*!
|
|
2403
2414
|
* tabbable 5.3.3
|
|
2404
2415
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
2405
|
-
*/var
|
|
2416
|
+
*/var Od=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],Ld=Od.join(","),Td="undefined"==typeof Element,Pd=Td?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Md=!Td&&Element.prototype.getRootNode?function(e){return e.getRootNode()}:function(e){return e.ownerDocument},_d=function(e,t,n){var r=Array.prototype.slice.apply(e.querySelectorAll(Ld));return t&&Pd.call(e,Ld)&&r.unshift(e),r=r.filter(n)},Dd=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if("SLOT"===a.tagName){var s=a.assignedElements(),l=e(s.length?s:a.children,!0,r);r.flatten?o.push.apply(o,l):o.push({scope:a,candidates:l})}else{Pd.call(a,Ld)&&r.filter(a)&&(n||!t.includes(a))&&o.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?o.push.apply(o,d):o.push({scope:a,candidates:d})}else i.unshift.apply(i,a.children)}}return o},Id=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},Vd=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Nd=function(e){return"INPUT"===e.tagName},Ad=function(e){return function(e){return Nd(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||Md(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 o=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!o||o===e}(e)},zd=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},Bd=function(e,t){return!(t.disabled||function(e){return Nd(e)&&"hidden"===e.type}(t)||function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var o=Pd.call(e,"details>summary:first-of-type")?e.parentElement:e;if(Pd.call(o,"details:not([open]) *"))return!0;var i=Md(e).host,a=(null==i?void 0:i.ownerDocument.contains(i))||e.ownerDocument.contains(e);if(n&&"full"!==n){if("non-zero-area"===n)return zd(e)}else{if("function"==typeof r){for(var s=e;e;){var l=e.parentElement,c=Md(e);if(l&&!l.shadowRoot&&!0===r(l))return zd(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!!Pd.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},Hd=function(e,t){return!(Ad(t)||Id(t)<0||!Bd(e,t))},Fd=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},Zd=function e(t){var n=[],r=[];return t.forEach((function(t,o){var i=!!t.scope,a=i?t.scope:t,s=Id(a,i),l=i?e(t.candidates):a;0===s?i?n.push.apply(n,l):n.push(a):r.push({documentOrder:o,tabIndex:s,item:t,isScope:i,content:l})})),r.sort(Vd).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)},Wd=function(e,t){var n;return n=(t=t||{}).getShadowRoot?Dd([e],t.includeContainer,{filter:Hd.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Fd}):_d(e,t.includeContainer,Hd.bind(null,t)),Zd(n)},Gd=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==Pd.call(e,Ld)&&Hd(t,e)},qd=Od.concat("iframe").join(","),Ud=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==Pd.call(e,qd)&&Bd(t,e)};
|
|
2406
2417
|
/*!
|
|
2407
2418
|
* focus-trap 6.9.4
|
|
2408
2419
|
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
|
|
2409
2420
|
*/
|
|
2410
|
-
function Ud(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 Xd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ud(Object(n),!0).forEach((function(t){Yd(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ud(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Yd(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Kd,Jd=(Kd=[],{activateTrap:function(e){if(Kd.length>0){var t=Kd[Kd.length-1];t!==e&&t.pause()}var n=Kd.indexOf(e);-1===n||Kd.splice(n,1),Kd.push(e)},deactivateTrap:function(e){var t=Kd.indexOf(e);-1!==t&&Kd.splice(t,1),Kd.length>0&&Kd[Kd.length-1].unpause()}}),Qd=function(e){return setTimeout(e,0)},ep=function(e,t){var n=-1;return e.every((function(e,r){return!t(e)||(n=r,!1)})),n},tp=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},np=function(e){return e.target.shadowRoot&&"function"==typeof e.composedPath?e.composedPath()[0]:e.target},rp=function(e,t){var n,r=(null==t?void 0:t.document)||document,o=Xd({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},t),i={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]:o[n||t]},s=function(e){return i.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=o[e];if("function"==typeof t){for(var n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];t=t.apply(void 0,i)}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=i.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(i.containerGroups=i.containers.map((function(e){var t,n,r=Zd(e,o.tabbableOptions),i=(t=e,(n=(n=o.tabbableOptions)||{}).getShadowRoot?_d([t],n.includeContainer,{filter:zd.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):Md(t,n.includeContainer,zd.bind(null,n)));return{container:e,tabbableNodes:r,focusableNodes:i,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=i.findIndex((function(t){return t===e}));if(!(n<0))return t?i.slice(n+1).find((function(e){return Wd(e,o.tabbableOptions)})):i.slice(0,n).reverse().find((function(e){return Wd(e,o.tabbableOptions)}))}}})),i.tabbableGroups=i.containerGroups.filter((function(e){return e.tabbableNodes.length>0})),i.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:!!o.preventScroll}),i.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=np(e);s(t)>=0||(tp(o.clickOutsideDeactivates,e)?n.deactivate({returnFocus:o.returnFocusOnDeactivate&&!qd(t,o.tabbableOptions)}):tp(o.allowOutsideClick,e)||e.preventDefault())},f=function(e){var t=np(e),n=s(t)>=0;n||t instanceof Document?n&&(i.mostRecentlyFocusedNode=t):(e.stopImmediatePropagation(),d(i.mostRecentlyFocusedNode||c()))},x=function(e){if(function(e){return"Escape"===e.key||"Esc"===e.key||27===e.keyCode}(e)&&!1!==tp(o.escapeDeactivates,e))return e.preventDefault(),void n.deactivate();(function(e){return"Tab"===e.key||9===e.keyCode})(e)&&function(e){var t=np(e);u();var n=null;if(i.tabbableGroups.length>0){var r=s(t),a=r>=0?i.containerGroups[r]:void 0;if(r<0)n=e.shiftKey?i.tabbableGroups[i.tabbableGroups.length-1].lastTabbableNode:i.tabbableGroups[0].firstTabbableNode;else if(e.shiftKey){var c=ep(i.tabbableGroups,(function(e){var n=e.firstTabbableNode;return t===n}));if(c<0&&(a.container===t||qd(t,o.tabbableOptions)&&!Wd(t,o.tabbableOptions)&&!a.nextTabbableNode(t,!1))&&(c=r),c>=0){var p=0===c?i.tabbableGroups.length-1:c-1;n=i.tabbableGroups[p].lastTabbableNode}}else{var h=ep(i.tabbableGroups,(function(e){var n=e.lastTabbableNode;return t===n}));if(h<0&&(a.container===t||qd(t,o.tabbableOptions)&&!Wd(t,o.tabbableOptions)&&!a.nextTabbableNode(t))&&(h=r),h>=0){var f=h===i.tabbableGroups.length-1?0:h+1;n=i.tabbableGroups[f].firstTabbableNode}}}else n=l("fallbackFocus");n&&(e.preventDefault(),d(n))}(e)},g=function(e){var t=np(e);s(t)>=0||tp(o.clickOutsideDeactivates,e)||tp(o.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},v=function(){if(i.active)return Jd.activateTrap(n),i.delayInitialFocusTimer=o.delayInitialFocus?Qd((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(i.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 i.active},get paused(){return i.paused},activate:function(e){if(i.active)return this;var t=a(e,"onActivate"),n=a(e,"onPostActivate"),o=a(e,"checkCanFocusTrap");o||u(),i.active=!0,i.paused=!1,i.nodeFocusedBeforeActivation=r.activeElement,t&&t();var s=function(){o&&u(),v(),n&&n()};return o?(o(i.containers.concat()).then(s,s),this):(s(),this)},deactivate:function(e){if(!i.active)return this;var t=Xd({onDeactivate:o.onDeactivate,onPostDeactivate:o.onPostDeactivate,checkCanReturnFocus:o.checkCanReturnFocus},e);clearTimeout(i.delayInitialFocusTimer),i.delayInitialFocusTimer=void 0,m(),i.active=!1,i.paused=!1,Jd.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(){Qd((function(){c&&d(p(i.nodeFocusedBeforeActivation)),s&&s()}))};return c&&l?(l(p(i.nodeFocusedBeforeActivation)).then(u,u),this):(u(),this)},pause:function(){return i.paused||!i.active||(i.paused=!0,m()),this},unpause:function(){return i.paused&&i.active?(i.paused=!1,u(),v(),this):this},updateContainerElements:function(e){var t=[].concat(e).filter(Boolean);return i.containers=t.map((function(e){return"string"==typeof e?r.querySelector(e):e})),i.active&&u(),this}}).updateContainerElements(e),n};var op=!1;if("undefined"!=typeof window){var ip={get passive(){op=!0}};window.addEventListener("testPassive",null,ip),window.removeEventListener("testPassive",null,ip)}var ap,sp="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1),lp=[],cp=!1,up=-1,dp=void 0,pp=void 0,hp=function(e){return lp.some((function(t){return!(!t.options.allowTouchMove||!t.options.allowTouchMove(e))}))},fp=function(e){var t=e||window.event;return!!hp(t.target)||(t.touches.length>1||(t.preventDefault&&t.preventDefault(),!1))},xp=function(e,t){if(e){if(!lp.some((function(t){return t.targetElement===e}))){var n={targetElement:e,options:t||{}};lp=[].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)}(lp),[n]),sp?(e.ontouchstart=function(e){1===e.targetTouches.length&&(up=e.targetTouches[0].clientY)},e.ontouchmove=function(t){1===t.targetTouches.length&&function(e,t){var n=e.targetTouches[0].clientY-up;!hp(e.target)&&(t&&0===t.scrollTop&&n>0||function(e){return!!e&&e.scrollHeight-e.scrollTop<=e.clientHeight}(t)&&n<0?fp(e):e.stopPropagation())}(t,e)},cp||(document.addEventListener("touchmove",fp,op?{passive:!1}:void 0),cp=!0)):function(e){if(void 0===pp){var t=!!e&&!0===e.reserveScrollBarGap,n=window.innerWidth-document.documentElement.clientWidth;t&&n>0&&(pp=document.body.style.paddingRight,document.body.style.paddingRight=n+"px")}void 0===dp&&(dp=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.")},gp=function(e){e?(lp=lp.filter((function(t){return t.targetElement!==e})),sp?(e.ontouchstart=null,e.ontouchmove=null,cp&&0===lp.length&&(document.removeEventListener("touchmove",fp,op?{passive:!1}:void 0),cp=!1)):lp.length||(void 0!==pp&&(document.body.style.paddingRight=pp,pp=void 0),void 0!==dp&&(document.body.style.overflow=dp,dp=void 0))):console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.")},vp=[],mp="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"}(ap||(ap={}));var bp,yp=function(e){return Object.freeze(e)},wp=function(e,t){this.inlineSize=e,this.blockSize=t,yp(this)},Cp=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,yp(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}(),jp=function(e){return e instanceof SVGElement&&"getBBox"in e},kp=function(e){if(jp(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var o=e,i=o.offsetWidth,a=o.offsetHeight;return!(i||a||e.getClientRects().length)},$p=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)},Sp="undefined"!=typeof window?window:{},Ep=new WeakMap,Rp=/auto|scroll/,Op=/^tb|vertical/,Lp=/msie|trident/i.test(Sp.navigator&&Sp.navigator.userAgent),Tp=function(e){return parseFloat(e||"0")},Pp=function(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=!1),new wp((n?t:e)||0,(n?e:t)||0)},Mp=yp({devicePixelContentBoxSize:Pp(),borderBoxSize:Pp(),contentBoxSize:Pp(),contentRect:new Cp(0,0,0,0)}),_p=function(e,t){if(void 0===t&&(t=!1),Ep.has(e)&&!t)return Ep.get(e);if(kp(e))return Ep.set(e,Mp),Mp;var n=getComputedStyle(e),r=jp(e)&&e.ownerSVGElement&&e.getBBox(),o=!Lp&&"border-box"===n.boxSizing,i=Op.test(n.writingMode||""),a=!r&&Rp.test(n.overflowY||""),s=!r&&Rp.test(n.overflowX||""),l=r?0:Tp(n.paddingTop),c=r?0:Tp(n.paddingRight),u=r?0:Tp(n.paddingBottom),d=r?0:Tp(n.paddingLeft),p=r?0:Tp(n.borderTopWidth),h=r?0:Tp(n.borderRightWidth),f=r?0:Tp(n.borderBottomWidth),x=d+c,g=l+u,v=(r?0:Tp(n.borderLeftWidth))+h,m=p+f,b=s?e.offsetHeight-m-e.clientHeight:0,y=a?e.offsetWidth-v-e.clientWidth:0,w=o?x+v:0,C=o?g+m:0,j=r?r.width:Tp(n.width)-w-y,k=r?r.height:Tp(n.height)-C-b,$=j+x+y+v,S=k+g+b+m,E=yp({devicePixelContentBoxSize:Pp(Math.round(j*devicePixelRatio),Math.round(k*devicePixelRatio),i),borderBoxSize:Pp($,S,i),contentBoxSize:Pp(j,k,i),contentRect:new Cp(d,l,j,k)});return Ep.set(e,E),E},Dp=function(e,t,n){var r=_p(e,n),o=r.borderBoxSize,i=r.contentBoxSize,a=r.devicePixelContentBoxSize;switch(t){case ap.DEVICE_PIXEL_CONTENT_BOX:return a;case ap.BORDER_BOX:return o;default:return i}},Ip=function(e){var t=_p(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=yp([t.borderBoxSize]),this.contentBoxSize=yp([t.contentBoxSize]),this.devicePixelContentBoxSize=yp([t.devicePixelContentBoxSize])},Vp=function(e){if(kp(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},Np=function(){var e=1/0,t=[];vp.forEach((function(n){if(0!==n.activeTargets.length){var r=[];n.activeTargets.forEach((function(t){var n=new Ip(t.target),o=Vp(t.target);r.push(n),t.lastReportedSize=Dp(t.target,t.observedBox),o<e&&(e=o)})),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},Ap=function(e){vp.forEach((function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach((function(n){n.isActive()&&(Vp(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))}))}))},zp=function(){var e=0;for(Ap(e);vp.some((function(e){return e.activeTargets.length>0}));)e=Np(),Ap(e);return vp.some((function(e){return e.skippedTargets.length>0}))&&function(){var e;"function"==typeof ErrorEvent?e=new ErrorEvent("error",{message:mp}):((e=document.createEvent("Event")).initEvent("error",!1,!1),e.message=mp),window.dispatchEvent(e)}(),e>0},Bp=[],Hp=function(e){if(!bp){var t=0,n=document.createTextNode("");new MutationObserver((function(){return Bp.splice(0).forEach((function(e){return e()}))})).observe(n,{characterData:!0}),bp=function(){n.textContent="".concat(t?t--:t++)}}Bp.push(e),bp()},Fp=0,Zp={attributes:!0,characterData:!0,childList:!0,subtree:!0},Wp=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Gp=function(e){return void 0===e&&(e=0),Date.now()+e},qp=!1,Up=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),!qp){qp=!0;var n,r=Gp(e);n=function(){var n=!1;try{n=zp()}finally{if(qp=!1,e=r-Gp(),!Fp)return;n?t.run(1e3):e>0?t.run(e):t.start()}},Hp((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,Zp)};document.body?t():Sp.addEventListener("DOMContentLoaded",t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Wp.forEach((function(t){return Sp.addEventListener(t,e.listener,!0)})))},e.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),Wp.forEach((function(t){return Sp.removeEventListener(t,e.listener,!0)})),this.stopped=!0)},e}()),Xp=function(e){!Fp&&e>0&&Up.start(),!(Fp+=e)&&Up.stop()},Yp=function(){function e(e,t){this.target=e,this.observedBox=t||ap.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e=Dp(this.target,this.observedBox,!0);return function(e){return!jp(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}(),Kp=function(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t},Jp=new WeakMap,Qp=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},eh=function(){function e(){}return e.connect=function(e,t){var n=new Kp(e,t);Jp.set(e,n)},e.observe=function(e,t,n){var r=Jp.get(e),o=0===r.observationTargets.length;Qp(r.observationTargets,t)<0&&(o&&vp.push(r),r.observationTargets.push(new Yp(t,n&&n.box)),Xp(1),Up.schedule())},e.unobserve=function(e,t){var n=Jp.get(e),r=Qp(n.observationTargets,t),o=1===n.observationTargets.length;r>=0&&(o&&vp.splice(vp.indexOf(n),1),n.observationTargets.splice(r,1),Xp(-1))},e.disconnect=function(e){var t=this,n=Jp.get(e);n.observationTargets.slice().forEach((function(n){return t.unobserve(e,n.target)})),n.activeTargets.splice(0,n.activeTargets.length)},e}(),th=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.");eh.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(!$p(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");eh.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(!$p(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");eh.unobserve(this,e)},e.prototype.disconnect=function(){eh.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();function nh(){return nh=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},nh.apply(this,arguments)}function rh(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(o[n]=e[n]);return o}var oh="undefined"!=typeof window?n.useLayoutEffect:n.useEffect;function ih(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 ah(e){var t=Math.round(e);if(Number.isNaN(e))throw new TypeError("Found a NaN! Check your snapPoints / defaultSnap / snapTo ");return t}var sh={box:"border-box"};function lh(e,t){var r=t.label,o=t.enabled,i=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),i.current="element"}),[i]);return oh((function(){if(e.current&&o){var t=new th(c);return t.observe(e.current,sh),function(){t.disconnect()}}}),[e,c,o]),o?s:0}function ch(e){return void 0===e&&(e=1e3),new Promise((function(t){return setTimeout(t,e)}))}var uh={DRAG:{target:"#overlay.dragging",actions:"onOpenEnd"}},dh={RESIZE:{target:"#overlay.resizing",actions:"onOpenEnd"}},ph=function(e,t,n){return void 0===n&&(n=e.context),new gc(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:nh({},uh,dh)}}},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:nh({},uh,dh)}}},end:{invoke:{src:"onOpenEnd",onDone:"done"},on:{CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:nh({},{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:[mc({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(ch()).then((function(){}))}catch(e){return Promise.reject(e)}},onOpenStart:function(){try{return Promise.resolve(ch()).then((function(){}))}catch(e){return Promise.reject(e)}},onCloseStart:function(){try{return Promise.resolve(ch()).then((function(){}))}catch(e){return Promise.reject(e)}},onResizeStart:function(){try{return Promise.resolve(ch()).then((function(){}))}catch(e){return Promise.reject(e)}},onSnapEnd:function(){try{return Promise.resolve(ch()).then((function(){}))}catch(e){return Promise.reject(e)}},onOpenEnd:function(){try{return Promise.resolve(ch()).then((function(){}))}catch(e){return Promise.reject(e)}},onCloseEnd:function(){try{return Promise.resolve(ch()).then((function(){}))}catch(e){return Promise.reject(e)}},onResizeEnd:function(){try{return Promise.resolve(ch()).then((function(){}))}catch(e){return Promise.reject(e)}},renderVisuallyHidden:function(e,t){try{return Promise.resolve(ch()).then((function(){}))}catch(e){return Promise.reject(e)}},activate:function(e,t){try{return Promise.resolve(ch()).then((function(){}))}catch(e){return Promise.reject(e)}},deactivate:function(e,t){try{return Promise.resolve(ch()).then((function(){}))}catch(e){return Promise.reject(e)}},openSmoothly:function(e,t){try{return Promise.resolve(ch()).then((function(){}))}catch(e){return Promise.reject(e)}},openImmediately:function(e,t){try{return Promise.resolve(ch()).then((function(){}))}catch(e){return Promise.reject(e)}},snapSmoothly:function(e,t){try{return Promise.resolve(ch()).then((function(){}))}catch(e){return Promise.reject(e)}},resizeSmoothly:function(e,t){try{return Promise.resolve(ch()).then((function(){}))}catch(e){return Promise.reject(e)}},closeSmoothly:function(e,t){try{return Promise.resolve(ch()).then((function(){}))}catch(e){return Promise.reject(e)}}},guards:{initiallyClosed:function(e){return"CLOSED"===e.initialState},initiallyOpen:function(e){return"OPEN"===e.initialState}}}),hh=["children","sibling","className","footer","header","open","initialState","lastSnapRef","initialFocusRef","onDismiss","maxHeight","defaultSnap","snapPoints","blocking","scrollLocking","style","onSpringStart","onSpringCancel","onSpringEnd","reserveScrollBarGap","expandOnContentDrag"],fh=["velocity"],xh=["onRest","config"],gh={tension:170,friction:26},vh=gh.tension,mh=gh.friction,bh=n.forwardRef((function(e,t){var r=e.children,o=e.sibling,i=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?wh:f,g=e.snapPoints,v=void 0===g?Ch:g,m=e.blocking,b=void 0===m||m,y=e.scrollLocking,w=void 0===y||y,C=e.style,j=e.onSpringStart,k=e.onSpringCancel,$=e.onSpringEnd,S=e.reserveScrollBarGap,E=void 0===S?b:S,R=e.expandOnContentDrag,O=void 0!==R&&R,L=rh(e,hh),T=function(){var e=n.useState(!1),t=e[0],r=e[1],o=n.useState({}),i=o[0],a=o[1],s=n.useCallback((function(e){return a((function(t){var n;return nh({},t,((n={})[e]=!1,n))})),function(){a((function(t){var n;return nh({},t,((n={})[e]=!0,n))}))}}),[]);return n.useEffect((function(){var e=Object.values(i);0!==e.length&&e.every(Boolean)&&r(!0)}),[i]),{ready:t,registerReady:s}}(),P=T.ready,M=T.registerReady,_=n.useRef(!1),D=n.useRef(j),I=n.useRef(k),V=n.useRef($);n.useEffect((function(){D.current=j,I.current=k,V.current=$}),[k,j,$]);var N,A,z=au((function(){return{y:0,ready:0,maxHeight:0,minSnap:0,maxSnap:0}})),B=z[0],H=z[1],F=n.useRef(null),Z=n.useRef(null),W=n.useRef(null),G=n.useRef(null),q=n.useRef(null),U=n.useRef(null),X=n.useRef(0),Y=n.useRef(),K=n.useRef(!1),J=(N=n.useMemo((function(){return"undefined"!=typeof window?window.matchMedia("(prefers-reduced-motion: reduce)"):null}),[]),A=n.useRef(null==N?void 0:N.matches),n.useDebugValue(A.current?"reduce":"no-preference"),n.useEffect((function(){var e=function(e){A.current=e.matches};return null==N||N.addListener(e),function(){return null==N?void 0:N.removeListener(e)}}),[N]),A),Q=function(e){var t=e.targetRef,r=e.enabled,o=e.reserveScrollBarGap,i=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 i.current.deactivate(),void(i.current={activate:function(){},deactivate:function(){}});var e=t.current,n=!1;i.current={activate:function(){n||(n=!0,xp(e,{allowTouchMove:function(e){return e.closest("[data-body-scroll-lock-ignore]")},reserveScrollBarGap:o}))},deactivate:function(){n&&(n=!1,gp(e))}}}),[r,t,o]),i}({targetRef:Z,enabled:P&&w,reserveScrollBarGap:E}),ee=function(e){var t=e.targetRef,r=e.enabled,o=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 o.current.deactivate(),void(o.current={activate:function(){},deactivate:function(){}});var e=t.current,n=!1,i=[],a=[];o.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||(i.push(n),a.push(e),e.setAttribute("aria-hidden","true"))}}))}},deactivate:function(){n&&(n=!1,a.forEach((function(e,t){var n=i[t];null===n?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",n)})),i=[],a=[])}}}),[t,r]),o}({targetRef:F,enabled:P&&b}),te=function(e){var t=e.targetRef,r=e.fallbackRef,o=e.initialFocusRef,i=e.enabled,a=n.useRef({activate:function(){throw new TypeError("Tried to activate focus trap too early")},deactivate:function(){}});return n.useDebugValue(i?"Enabled":"Disabled"),n.useEffect((function(){if(!i)return a.current.deactivate(),void(a.current={activate:function(){},deactivate:function(){}});var e=r.current,n=rp(t.current,{onActivate:void 0,initialFocus:o?function(){return(null==o?void 0:o.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())}}}),[i,r,o,t]),a}({targetRef:F,fallbackRef:U,initialFocusRef:d||void 0,enabled:P&&b&&!1!==d}),ne=function(e){var t=e.getSnapPoints,r=e.heightRef,o=e.lastSnapRef,i=e.ready,a=function(e){var t=e.contentRef,r=e.controlledMaxHeight,o=e.footerEnabled,i=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 o=n.useMemo((function(){return t("maxHeight")}),[t]),i=n.useState((function(){return ah(e)||"undefined"!=typeof window?window.innerHeight:0})),a=i[0],s=i[1],l=a>0,c=n.useRef(0);return n.useDebugValue(e?"controlled":"auto"),n.useEffect((function(){l&&o()}),[l,o]),oh((function(){if(e)return s(ah(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",o(),function(){window.removeEventListener("resize",t),cancelAnimationFrame(c.current)}}),[e,o,r]),a}(r,l,c),p=lh(s,{label:"headerHeight",enabled:a,resizeSourceRef:c}),h=lh(t,{label:"contentHeight",enabled:!0,resizeSourceRef:c}),f=lh(i,{label:"footerHeight",enabled:o,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(ah).reduce((function(e,n){return e.add(ih(n,0,t)),e}),new Set),r=Array.from(n),o=Math.min.apply(Math,r);if(Number.isNaN(o))throw new TypeError("minSnap is NaN");var i=Math.max.apply(Math,r);if(Number.isNaN(i))throw new TypeError("maxSnap is NaN");return{snapPoints:r,minSnap:o,maxSnap:i}}(i?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=ah("function"==typeof e?e({footerHeight:u,headerHeight:c,height:r.current,minHeight:l,maxHeight:s,snapPoints:p,lastSnap:o.current}):e);return p.reduce((function(e,n){return Math.abs(n-t)<Math.abs(e-t)?n:e}),h)},maxHeight:s}}({contentRef:W,controlledMaxHeight:h,footerEnabled:!!a,footerRef:q,getSnapPoints:v,headerEnabled:!1!==s,headerRef:G,heightRef:X,lastSnapRef:u,ready:P,registerReady:M,resizeSourceRef:Y}),re=ne.minSnap,oe=ne.maxSnap,ie=ne.maxHeight,ae=ne.findSnap,se=n.useRef(ie),le=n.useRef(re),ce=n.useRef(oe),ue=n.useRef(ae),de=n.useRef(0);oh((function(){se.current=ie,ce.current=oe,le.current=re,ue.current=ae,de.current=ae(x)}),[ae,x,ie,oe,re]);var pe=n.useCallback((function(e){var t=e.onRest,n=e.config,r=(n=void 0===n?{}:n).velocity,o=void 0===r?1:r,i=rh(n,fh),a=rh(e,xh);return new Promise((function(e){return H(nh({},a,{config:nh({velocity:o},i,{mass:1,tension:vh,friction:Math.max(mh,mh+(mh-mh*o))}),onRest:function(){var n=[].slice.call(arguments);e.apply(void 0,n),null==t||t.apply(void 0,n)}}))}))}),[H]),he=Tc(ph,{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==V.current?void 0:V.current({type:"OPEN"})}),[]),onSnapEnd:n.useCallback((function(e,t){return null==V.current?void 0:V.current({type:"SNAP",source:e.snapSource})}),[]),onResizeEnd:n.useCallback((function(){return null==V.current?void 0:V.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==V.current?void 0:V.current({type:"SNAP",source:e.snapSource}))}catch(e){return Promise.reject(e)}}),[]),onOpenEnd:n.useCallback((function(){try{return Promise.resolve(null==V.current?void 0:V.current({type:"OPEN"}))}catch(e){return Promise.reject(e)}}),[]),onCloseEnd:n.useCallback((function(){try{return Promise.resolve(null==V.current?void 0:V.current({type:"CLOSE"}))}catch(e){return Promise.reject(e)}}),[]),onResizeEnd:n.useCallback((function(){try{return Promise.resolve(null==V.current?void 0:V.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 _.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(),_.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(){P&&xe(l?"OPEN":"CLOSE")}),[l,xe,P]),oh((function(){(ie||oe||re)&&xe("RESIZE")}),[ie,oe,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,o=void 0===r?1:r,i=n.source,a=void 0===i?"custom":i;xe("SNAP",{payload:{y:ue.current(e),velocity:o,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 O&&(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)}}),[O,Z]);var ge=Ed((function(e){var t=e.args,n=(t=void 0===t?[]:t)[0],r=(n=void 0===n?{}:n).closeOnTap,o=void 0!==r&&r,i=n.isContentDragging,a=void 0!==i&&i,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(!_.current)return s(),f;if(p&&o&&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 w=c?p||le.current!==ce.current?Hu(m,p?0:le.current,ce.current,.55):m<le.current?Hu(m,le.current,2*ce.current,.55):Hu(m,le.current/2,ce.current,.55):y;return O&&a?(w>=ce.current&&(w=ce.current),f===ce.current&&Z.current.scrollTop>0&&(w=ce.current),K.current=w<ce.current):K.current=!1,u&&xe("DRAG"),d?(xe("SNAP",{payload:{y:w,velocity:g>.05?g:1,source:"dragging"}}),f):(H({y:w,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=eu([n.y,n.maxHeight],(function(e,t){return Math.round(ih(t-e,0,16))+"px"})),o=eu([n.y,n.minSnap,n.maxSnap],(function(e,t,n){return ih(e,t,n)+"px"})),i=eu([n.y,n.minSnap,n.maxSnap],(function(e,t,n){return e<t?t-e+"px":e>n?n-e+"px":"0px"})),a=eu([n.y,n.maxSnap],(function(e,t){return e>=t?Math.ceil(e-t):0})),s=eu([n.y,n.minSnap],(function(e,t){if(!t)return 0;var n=Math.max(t/2-45,0);return ih((e-n)*(1/(Math.min(t/2+45,t)-n)+0),0,1)})),l=eu([n.y,n.minSnap],(function(e,t){return t?ih(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"]=i,t["--rsbs-overlay-rounded"]=r,t["--rsbs-overlay-h"]=o,t}({spring:B});return n.createElement(Iu.div,nh({},L,{"data-rsbs-root":!0,"data-rsbs-state":yh.find(fe.matches),"data-rsbs-is-blocking":b,"data-rsbs-is-dismissable":!!p,"data-rsbs-has-header":!!s,"data-rsbs-has-footer":!!a,className:i,ref:F,style:nh({},ve,C,{opacity:B.ready})}),o,b&&n.createElement("div",nh({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",nh({key:"header","data-rsbs-header":!0,ref:G},ge()),s),n.createElement("div",nh({key:"scroll","data-rsbs-scroll":!0,ref:Z},O?ge({isContentDragging:!0}):{}),n.createElement("div",{"data-rsbs-content":!0,ref:W},r)),a&&n.createElement("div",nh({key:"footer",ref:q,"data-rsbs-footer":!0},ge()),a)))})),yh=["closed","opening","open","closing","dragging","snapping","resizing"];function wh(e){var t=e.lastSnap;return null!=t?t:Math.min.apply(Math,e.snapPoints)}function Ch(e){return e.minHeight}var jh=["onSpringStart","onSpringEnd","skipInitialTransition"],kh=n.forwardRef((function(e,t){var r=e.onSpringStart,o=e.onSpringEnd,i=e.skipInitialTransition,a=rh(e,jh),s=n.useState(!1),l=s[0],c=s[1],u=n.useRef(),d=n.useRef(null),p=n.useRef(i&&a.open?"OPEN":"CLOSED");oh((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==o?void 0:o(e)).then((function(){"CLOSE"===e.type&&(u.current=requestAnimationFrame((function(){return c(!1)})))}))}),[o]);return l?n.createElement(ys,{"data-rsbs-portal":!0},n.createElement(bh,nh({},a,{lastSnapRef:d,ref:t,initialState:p.current,onSpringStart:h,onSpringEnd:f}))):null}));const $h=r.css`
|
|
2421
|
+
function Xd(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 Yd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Xd(Object(n),!0).forEach((function(t){Kd(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Kd(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Jd,Qd=(Jd=[],{activateTrap:function(e){if(Jd.length>0){var t=Jd[Jd.length-1];t!==e&&t.pause()}var n=Jd.indexOf(e);-1===n||Jd.splice(n,1),Jd.push(e)},deactivateTrap:function(e){var t=Jd.indexOf(e);-1!==t&&Jd.splice(t,1),Jd.length>0&&Jd[Jd.length-1].unpause()}}),ep=function(e){return setTimeout(e,0)},tp=function(e,t){var n=-1;return e.every((function(e,r){return!t(e)||(n=r,!1)})),n},np=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},rp=function(e){return e.target.shadowRoot&&"function"==typeof e.composedPath?e.composedPath()[0]:e.target},op=function(e,t){var n,r=(null==t?void 0:t.document)||document,o=Yd({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},t),i={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]:o[n||t]},s=function(e){return i.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=o[e];if("function"==typeof t){for(var n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];t=t.apply(void 0,i)}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=i.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(i.containerGroups=i.containers.map((function(e){var t,n,r=Wd(e,o.tabbableOptions),i=(t=e,(n=(n=o.tabbableOptions)||{}).getShadowRoot?Dd([t],n.includeContainer,{filter:Bd.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):_d(t,n.includeContainer,Bd.bind(null,n)));return{container:e,tabbableNodes:r,focusableNodes:i,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=i.findIndex((function(t){return t===e}));if(!(n<0))return t?i.slice(n+1).find((function(e){return Gd(e,o.tabbableOptions)})):i.slice(0,n).reverse().find((function(e){return Gd(e,o.tabbableOptions)}))}}})),i.tabbableGroups=i.containerGroups.filter((function(e){return e.tabbableNodes.length>0})),i.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:!!o.preventScroll}),i.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=rp(e);s(t)>=0||(np(o.clickOutsideDeactivates,e)?n.deactivate({returnFocus:o.returnFocusOnDeactivate&&!Ud(t,o.tabbableOptions)}):np(o.allowOutsideClick,e)||e.preventDefault())},f=function(e){var t=rp(e),n=s(t)>=0;n||t instanceof Document?n&&(i.mostRecentlyFocusedNode=t):(e.stopImmediatePropagation(),d(i.mostRecentlyFocusedNode||c()))},x=function(e){if(function(e){return"Escape"===e.key||"Esc"===e.key||27===e.keyCode}(e)&&!1!==np(o.escapeDeactivates,e))return e.preventDefault(),void n.deactivate();(function(e){return"Tab"===e.key||9===e.keyCode})(e)&&function(e){var t=rp(e);u();var n=null;if(i.tabbableGroups.length>0){var r=s(t),a=r>=0?i.containerGroups[r]:void 0;if(r<0)n=e.shiftKey?i.tabbableGroups[i.tabbableGroups.length-1].lastTabbableNode:i.tabbableGroups[0].firstTabbableNode;else if(e.shiftKey){var c=tp(i.tabbableGroups,(function(e){var n=e.firstTabbableNode;return t===n}));if(c<0&&(a.container===t||Ud(t,o.tabbableOptions)&&!Gd(t,o.tabbableOptions)&&!a.nextTabbableNode(t,!1))&&(c=r),c>=0){var p=0===c?i.tabbableGroups.length-1:c-1;n=i.tabbableGroups[p].lastTabbableNode}}else{var h=tp(i.tabbableGroups,(function(e){var n=e.lastTabbableNode;return t===n}));if(h<0&&(a.container===t||Ud(t,o.tabbableOptions)&&!Gd(t,o.tabbableOptions)&&!a.nextTabbableNode(t))&&(h=r),h>=0){var f=h===i.tabbableGroups.length-1?0:h+1;n=i.tabbableGroups[f].firstTabbableNode}}}else n=l("fallbackFocus");n&&(e.preventDefault(),d(n))}(e)},g=function(e){var t=rp(e);s(t)>=0||np(o.clickOutsideDeactivates,e)||np(o.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},v=function(){if(i.active)return Qd.activateTrap(n),i.delayInitialFocusTimer=o.delayInitialFocus?ep((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(i.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 i.active},get paused(){return i.paused},activate:function(e){if(i.active)return this;var t=a(e,"onActivate"),n=a(e,"onPostActivate"),o=a(e,"checkCanFocusTrap");o||u(),i.active=!0,i.paused=!1,i.nodeFocusedBeforeActivation=r.activeElement,t&&t();var s=function(){o&&u(),v(),n&&n()};return o?(o(i.containers.concat()).then(s,s),this):(s(),this)},deactivate:function(e){if(!i.active)return this;var t=Yd({onDeactivate:o.onDeactivate,onPostDeactivate:o.onPostDeactivate,checkCanReturnFocus:o.checkCanReturnFocus},e);clearTimeout(i.delayInitialFocusTimer),i.delayInitialFocusTimer=void 0,m(),i.active=!1,i.paused=!1,Qd.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(){ep((function(){c&&d(p(i.nodeFocusedBeforeActivation)),s&&s()}))};return c&&l?(l(p(i.nodeFocusedBeforeActivation)).then(u,u),this):(u(),this)},pause:function(){return i.paused||!i.active||(i.paused=!0,m()),this},unpause:function(){return i.paused&&i.active?(i.paused=!1,u(),v(),this):this},updateContainerElements:function(e){var t=[].concat(e).filter(Boolean);return i.containers=t.map((function(e){return"string"==typeof e?r.querySelector(e):e})),i.active&&u(),this}}).updateContainerElements(e),n};var ip=!1;if("undefined"!=typeof window){var ap={get passive(){ip=!0}};window.addEventListener("testPassive",null,ap),window.removeEventListener("testPassive",null,ap)}var sp,lp="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1),cp=[],up=!1,dp=-1,pp=void 0,hp=void 0,fp=function(e){return cp.some((function(t){return!(!t.options.allowTouchMove||!t.options.allowTouchMove(e))}))},xp=function(e){var t=e||window.event;return!!fp(t.target)||(t.touches.length>1||(t.preventDefault&&t.preventDefault(),!1))},gp=function(e,t){if(e){if(!cp.some((function(t){return t.targetElement===e}))){var n={targetElement:e,options:t||{}};cp=[].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)}(cp),[n]),lp?(e.ontouchstart=function(e){1===e.targetTouches.length&&(dp=e.targetTouches[0].clientY)},e.ontouchmove=function(t){1===t.targetTouches.length&&function(e,t){var n=e.targetTouches[0].clientY-dp;!fp(e.target)&&(t&&0===t.scrollTop&&n>0||function(e){return!!e&&e.scrollHeight-e.scrollTop<=e.clientHeight}(t)&&n<0?xp(e):e.stopPropagation())}(t,e)},up||(document.addEventListener("touchmove",xp,ip?{passive:!1}:void 0),up=!0)):function(e){if(void 0===hp){var t=!!e&&!0===e.reserveScrollBarGap,n=window.innerWidth-document.documentElement.clientWidth;t&&n>0&&(hp=document.body.style.paddingRight,document.body.style.paddingRight=n+"px")}void 0===pp&&(pp=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.")},vp=function(e){e?(cp=cp.filter((function(t){return t.targetElement!==e})),lp?(e.ontouchstart=null,e.ontouchmove=null,up&&0===cp.length&&(document.removeEventListener("touchmove",xp,ip?{passive:!1}:void 0),up=!1)):cp.length||(void 0!==hp&&(document.body.style.paddingRight=hp,hp=void 0),void 0!==pp&&(document.body.style.overflow=pp,pp=void 0))):console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.")},mp=[],bp="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"}(sp||(sp={}));var yp,wp=function(e){return Object.freeze(e)},Cp=function(e,t){this.inlineSize=e,this.blockSize=t,wp(this)},jp=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,wp(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}(),kp=function(e){return e instanceof SVGElement&&"getBBox"in e},$p=function(e){if(kp(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var o=e,i=o.offsetWidth,a=o.offsetHeight;return!(i||a||e.getClientRects().length)},Sp=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)},Ep="undefined"!=typeof window?window:{},Rp=new WeakMap,Op=/auto|scroll/,Lp=/^tb|vertical/,Tp=/msie|trident/i.test(Ep.navigator&&Ep.navigator.userAgent),Pp=function(e){return parseFloat(e||"0")},Mp=function(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=!1),new Cp((n?t:e)||0,(n?e:t)||0)},_p=wp({devicePixelContentBoxSize:Mp(),borderBoxSize:Mp(),contentBoxSize:Mp(),contentRect:new jp(0,0,0,0)}),Dp=function(e,t){if(void 0===t&&(t=!1),Rp.has(e)&&!t)return Rp.get(e);if($p(e))return Rp.set(e,_p),_p;var n=getComputedStyle(e),r=kp(e)&&e.ownerSVGElement&&e.getBBox(),o=!Tp&&"border-box"===n.boxSizing,i=Lp.test(n.writingMode||""),a=!r&&Op.test(n.overflowY||""),s=!r&&Op.test(n.overflowX||""),l=r?0:Pp(n.paddingTop),c=r?0:Pp(n.paddingRight),u=r?0:Pp(n.paddingBottom),d=r?0:Pp(n.paddingLeft),p=r?0:Pp(n.borderTopWidth),h=r?0:Pp(n.borderRightWidth),f=r?0:Pp(n.borderBottomWidth),x=d+c,g=l+u,v=(r?0:Pp(n.borderLeftWidth))+h,m=p+f,b=s?e.offsetHeight-m-e.clientHeight:0,y=a?e.offsetWidth-v-e.clientWidth:0,w=o?x+v:0,C=o?g+m:0,j=r?r.width:Pp(n.width)-w-y,k=r?r.height:Pp(n.height)-C-b,$=j+x+y+v,S=k+g+b+m,E=wp({devicePixelContentBoxSize:Mp(Math.round(j*devicePixelRatio),Math.round(k*devicePixelRatio),i),borderBoxSize:Mp($,S,i),contentBoxSize:Mp(j,k,i),contentRect:new jp(d,l,j,k)});return Rp.set(e,E),E},Ip=function(e,t,n){var r=Dp(e,n),o=r.borderBoxSize,i=r.contentBoxSize,a=r.devicePixelContentBoxSize;switch(t){case sp.DEVICE_PIXEL_CONTENT_BOX:return a;case sp.BORDER_BOX:return o;default:return i}},Vp=function(e){var t=Dp(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=wp([t.borderBoxSize]),this.contentBoxSize=wp([t.contentBoxSize]),this.devicePixelContentBoxSize=wp([t.devicePixelContentBoxSize])},Np=function(e){if($p(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},Ap=function(){var e=1/0,t=[];mp.forEach((function(n){if(0!==n.activeTargets.length){var r=[];n.activeTargets.forEach((function(t){var n=new Vp(t.target),o=Np(t.target);r.push(n),t.lastReportedSize=Ip(t.target,t.observedBox),o<e&&(e=o)})),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},zp=function(e){mp.forEach((function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach((function(n){n.isActive()&&(Np(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))}))}))},Bp=function(){var e=0;for(zp(e);mp.some((function(e){return e.activeTargets.length>0}));)e=Ap(),zp(e);return mp.some((function(e){return e.skippedTargets.length>0}))&&function(){var e;"function"==typeof ErrorEvent?e=new ErrorEvent("error",{message:bp}):((e=document.createEvent("Event")).initEvent("error",!1,!1),e.message=bp),window.dispatchEvent(e)}(),e>0},Hp=[],Fp=function(e){if(!yp){var t=0,n=document.createTextNode("");new MutationObserver((function(){return Hp.splice(0).forEach((function(e){return e()}))})).observe(n,{characterData:!0}),yp=function(){n.textContent="".concat(t?t--:t++)}}Hp.push(e),yp()},Zp=0,Wp={attributes:!0,characterData:!0,childList:!0,subtree:!0},Gp=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],qp=function(e){return void 0===e&&(e=0),Date.now()+e},Up=!1,Xp=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),!Up){Up=!0;var n,r=qp(e);n=function(){var n=!1;try{n=Bp()}finally{if(Up=!1,e=r-qp(),!Zp)return;n?t.run(1e3):e>0?t.run(e):t.start()}},Fp((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,Wp)};document.body?t():Ep.addEventListener("DOMContentLoaded",t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Gp.forEach((function(t){return Ep.addEventListener(t,e.listener,!0)})))},e.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),Gp.forEach((function(t){return Ep.removeEventListener(t,e.listener,!0)})),this.stopped=!0)},e}()),Yp=function(e){!Zp&&e>0&&Xp.start(),!(Zp+=e)&&Xp.stop()},Kp=function(){function e(e,t){this.target=e,this.observedBox=t||sp.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e=Ip(this.target,this.observedBox,!0);return function(e){return!kp(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}(),Jp=function(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t},Qp=new WeakMap,eh=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},th=function(){function e(){}return e.connect=function(e,t){var n=new Jp(e,t);Qp.set(e,n)},e.observe=function(e,t,n){var r=Qp.get(e),o=0===r.observationTargets.length;eh(r.observationTargets,t)<0&&(o&&mp.push(r),r.observationTargets.push(new Kp(t,n&&n.box)),Yp(1),Xp.schedule())},e.unobserve=function(e,t){var n=Qp.get(e),r=eh(n.observationTargets,t),o=1===n.observationTargets.length;r>=0&&(o&&mp.splice(mp.indexOf(n),1),n.observationTargets.splice(r,1),Yp(-1))},e.disconnect=function(e){var t=this,n=Qp.get(e);n.observationTargets.slice().forEach((function(n){return t.unobserve(e,n.target)})),n.activeTargets.splice(0,n.activeTargets.length)},e}(),nh=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.");th.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(!Sp(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");th.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(!Sp(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");th.unobserve(this,e)},e.prototype.disconnect=function(){th.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();function rh(){return rh=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},rh.apply(this,arguments)}function oh(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(o[n]=e[n]);return o}var ih="undefined"!=typeof window?n.useLayoutEffect:n.useEffect;function ah(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 sh(e){var t=Math.round(e);if(Number.isNaN(e))throw new TypeError("Found a NaN! Check your snapPoints / defaultSnap / snapTo ");return t}var lh={box:"border-box"};function ch(e,t){var r=t.label,o=t.enabled,i=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),i.current="element"}),[i]);return ih((function(){if(e.current&&o){var t=new nh(c);return t.observe(e.current,lh),function(){t.disconnect()}}}),[e,c,o]),o?s:0}function uh(e){return void 0===e&&(e=1e3),new Promise((function(t){return setTimeout(t,e)}))}var dh={DRAG:{target:"#overlay.dragging",actions:"onOpenEnd"}},ph={RESIZE:{target:"#overlay.resizing",actions:"onOpenEnd"}},hh=function(e,t,n){return void 0===n&&(n=e.context),new vc(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:rh({},dh,ph)}}},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:rh({},dh,ph)}}},end:{invoke:{src:"onOpenEnd",onDone:"done"},on:{CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:rh({},{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:[bc({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(uh()).then((function(){}))}catch(e){return Promise.reject(e)}},onOpenStart:function(){try{return Promise.resolve(uh()).then((function(){}))}catch(e){return Promise.reject(e)}},onCloseStart:function(){try{return Promise.resolve(uh()).then((function(){}))}catch(e){return Promise.reject(e)}},onResizeStart:function(){try{return Promise.resolve(uh()).then((function(){}))}catch(e){return Promise.reject(e)}},onSnapEnd:function(){try{return Promise.resolve(uh()).then((function(){}))}catch(e){return Promise.reject(e)}},onOpenEnd:function(){try{return Promise.resolve(uh()).then((function(){}))}catch(e){return Promise.reject(e)}},onCloseEnd:function(){try{return Promise.resolve(uh()).then((function(){}))}catch(e){return Promise.reject(e)}},onResizeEnd:function(){try{return Promise.resolve(uh()).then((function(){}))}catch(e){return Promise.reject(e)}},renderVisuallyHidden:function(e,t){try{return Promise.resolve(uh()).then((function(){}))}catch(e){return Promise.reject(e)}},activate:function(e,t){try{return Promise.resolve(uh()).then((function(){}))}catch(e){return Promise.reject(e)}},deactivate:function(e,t){try{return Promise.resolve(uh()).then((function(){}))}catch(e){return Promise.reject(e)}},openSmoothly:function(e,t){try{return Promise.resolve(uh()).then((function(){}))}catch(e){return Promise.reject(e)}},openImmediately:function(e,t){try{return Promise.resolve(uh()).then((function(){}))}catch(e){return Promise.reject(e)}},snapSmoothly:function(e,t){try{return Promise.resolve(uh()).then((function(){}))}catch(e){return Promise.reject(e)}},resizeSmoothly:function(e,t){try{return Promise.resolve(uh()).then((function(){}))}catch(e){return Promise.reject(e)}},closeSmoothly:function(e,t){try{return Promise.resolve(uh()).then((function(){}))}catch(e){return Promise.reject(e)}}},guards:{initiallyClosed:function(e){return"CLOSED"===e.initialState},initiallyOpen:function(e){return"OPEN"===e.initialState}}}),fh=["children","sibling","className","footer","header","open","initialState","lastSnapRef","initialFocusRef","onDismiss","maxHeight","defaultSnap","snapPoints","blocking","scrollLocking","style","onSpringStart","onSpringCancel","onSpringEnd","reserveScrollBarGap","expandOnContentDrag"],xh=["velocity"],gh=["onRest","config"],vh={tension:170,friction:26},mh=vh.tension,bh=vh.friction,yh=n.forwardRef((function(e,t){var r=e.children,o=e.sibling,i=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?Ch:f,g=e.snapPoints,v=void 0===g?jh:g,m=e.blocking,b=void 0===m||m,y=e.scrollLocking,w=void 0===y||y,C=e.style,j=e.onSpringStart,k=e.onSpringCancel,$=e.onSpringEnd,S=e.reserveScrollBarGap,E=void 0===S?b:S,R=e.expandOnContentDrag,O=void 0!==R&&R,L=oh(e,fh),T=function(){var e=n.useState(!1),t=e[0],r=e[1],o=n.useState({}),i=o[0],a=o[1],s=n.useCallback((function(e){return a((function(t){var n;return rh({},t,((n={})[e]=!1,n))})),function(){a((function(t){var n;return rh({},t,((n={})[e]=!0,n))}))}}),[]);return n.useEffect((function(){var e=Object.values(i);0!==e.length&&e.every(Boolean)&&r(!0)}),[i]),{ready:t,registerReady:s}}(),P=T.ready,M=T.registerReady,_=n.useRef(!1),D=n.useRef(j),I=n.useRef(k),V=n.useRef($);n.useEffect((function(){D.current=j,I.current=k,V.current=$}),[k,j,$]);var N,A,z=su((function(){return{y:0,ready:0,maxHeight:0,minSnap:0,maxSnap:0}})),B=z[0],H=z[1],F=n.useRef(null),Z=n.useRef(null),W=n.useRef(null),G=n.useRef(null),q=n.useRef(null),U=n.useRef(null),X=n.useRef(0),Y=n.useRef(),K=n.useRef(!1),J=(N=n.useMemo((function(){return"undefined"!=typeof window?window.matchMedia("(prefers-reduced-motion: reduce)"):null}),[]),A=n.useRef(null==N?void 0:N.matches),n.useDebugValue(A.current?"reduce":"no-preference"),n.useEffect((function(){var e=function(e){A.current=e.matches};return null==N||N.addListener(e),function(){return null==N?void 0:N.removeListener(e)}}),[N]),A),Q=function(e){var t=e.targetRef,r=e.enabled,o=e.reserveScrollBarGap,i=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 i.current.deactivate(),void(i.current={activate:function(){},deactivate:function(){}});var e=t.current,n=!1;i.current={activate:function(){n||(n=!0,gp(e,{allowTouchMove:function(e){return e.closest("[data-body-scroll-lock-ignore]")},reserveScrollBarGap:o}))},deactivate:function(){n&&(n=!1,vp(e))}}}),[r,t,o]),i}({targetRef:Z,enabled:P&&w,reserveScrollBarGap:E}),ee=function(e){var t=e.targetRef,r=e.enabled,o=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 o.current.deactivate(),void(o.current={activate:function(){},deactivate:function(){}});var e=t.current,n=!1,i=[],a=[];o.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||(i.push(n),a.push(e),e.setAttribute("aria-hidden","true"))}}))}},deactivate:function(){n&&(n=!1,a.forEach((function(e,t){var n=i[t];null===n?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",n)})),i=[],a=[])}}}),[t,r]),o}({targetRef:F,enabled:P&&b}),te=function(e){var t=e.targetRef,r=e.fallbackRef,o=e.initialFocusRef,i=e.enabled,a=n.useRef({activate:function(){throw new TypeError("Tried to activate focus trap too early")},deactivate:function(){}});return n.useDebugValue(i?"Enabled":"Disabled"),n.useEffect((function(){if(!i)return a.current.deactivate(),void(a.current={activate:function(){},deactivate:function(){}});var e=r.current,n=op(t.current,{onActivate:void 0,initialFocus:o?function(){return(null==o?void 0:o.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())}}}),[i,r,o,t]),a}({targetRef:F,fallbackRef:U,initialFocusRef:d||void 0,enabled:P&&b&&!1!==d}),ne=function(e){var t=e.getSnapPoints,r=e.heightRef,o=e.lastSnapRef,i=e.ready,a=function(e){var t=e.contentRef,r=e.controlledMaxHeight,o=e.footerEnabled,i=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 o=n.useMemo((function(){return t("maxHeight")}),[t]),i=n.useState((function(){return sh(e)||"undefined"!=typeof window?window.innerHeight:0})),a=i[0],s=i[1],l=a>0,c=n.useRef(0);return n.useDebugValue(e?"controlled":"auto"),n.useEffect((function(){l&&o()}),[l,o]),ih((function(){if(e)return s(sh(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",o(),function(){window.removeEventListener("resize",t),cancelAnimationFrame(c.current)}}),[e,o,r]),a}(r,l,c),p=ch(s,{label:"headerHeight",enabled:a,resizeSourceRef:c}),h=ch(t,{label:"contentHeight",enabled:!0,resizeSourceRef:c}),f=ch(i,{label:"footerHeight",enabled:o,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(sh).reduce((function(e,n){return e.add(ah(n,0,t)),e}),new Set),r=Array.from(n),o=Math.min.apply(Math,r);if(Number.isNaN(o))throw new TypeError("minSnap is NaN");var i=Math.max.apply(Math,r);if(Number.isNaN(i))throw new TypeError("maxSnap is NaN");return{snapPoints:r,minSnap:o,maxSnap:i}}(i?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=sh("function"==typeof e?e({footerHeight:u,headerHeight:c,height:r.current,minHeight:l,maxHeight:s,snapPoints:p,lastSnap:o.current}):e);return p.reduce((function(e,n){return Math.abs(n-t)<Math.abs(e-t)?n:e}),h)},maxHeight:s}}({contentRef:W,controlledMaxHeight:h,footerEnabled:!!a,footerRef:q,getSnapPoints:v,headerEnabled:!1!==s,headerRef:G,heightRef:X,lastSnapRef:u,ready:P,registerReady:M,resizeSourceRef:Y}),re=ne.minSnap,oe=ne.maxSnap,ie=ne.maxHeight,ae=ne.findSnap,se=n.useRef(ie),le=n.useRef(re),ce=n.useRef(oe),ue=n.useRef(ae),de=n.useRef(0);ih((function(){se.current=ie,ce.current=oe,le.current=re,ue.current=ae,de.current=ae(x)}),[ae,x,ie,oe,re]);var pe=n.useCallback((function(e){var t=e.onRest,n=e.config,r=(n=void 0===n?{}:n).velocity,o=void 0===r?1:r,i=oh(n,xh),a=oh(e,gh);return new Promise((function(e){return H(rh({},a,{config:rh({velocity:o},i,{mass:1,tension:mh,friction:Math.max(bh,bh+(bh-bh*o))}),onRest:function(){var n=[].slice.call(arguments);e.apply(void 0,n),null==t||t.apply(void 0,n)}}))}))}),[H]),he=Pc(hh,{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==V.current?void 0:V.current({type:"OPEN"})}),[]),onSnapEnd:n.useCallback((function(e,t){return null==V.current?void 0:V.current({type:"SNAP",source:e.snapSource})}),[]),onResizeEnd:n.useCallback((function(){return null==V.current?void 0:V.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==V.current?void 0:V.current({type:"SNAP",source:e.snapSource}))}catch(e){return Promise.reject(e)}}),[]),onOpenEnd:n.useCallback((function(){try{return Promise.resolve(null==V.current?void 0:V.current({type:"OPEN"}))}catch(e){return Promise.reject(e)}}),[]),onCloseEnd:n.useCallback((function(){try{return Promise.resolve(null==V.current?void 0:V.current({type:"CLOSE"}))}catch(e){return Promise.reject(e)}}),[]),onResizeEnd:n.useCallback((function(){try{return Promise.resolve(null==V.current?void 0:V.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 _.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(),_.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(){P&&xe(l?"OPEN":"CLOSE")}),[l,xe,P]),ih((function(){(ie||oe||re)&&xe("RESIZE")}),[ie,oe,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,o=void 0===r?1:r,i=n.source,a=void 0===i?"custom":i;xe("SNAP",{payload:{y:ue.current(e),velocity:o,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 O&&(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)}}),[O,Z]);var ge=Rd((function(e){var t=e.args,n=(t=void 0===t?[]:t)[0],r=(n=void 0===n?{}:n).closeOnTap,o=void 0!==r&&r,i=n.isContentDragging,a=void 0!==i&&i,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(!_.current)return s(),f;if(p&&o&&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 w=c?p||le.current!==ce.current?Fu(m,p?0:le.current,ce.current,.55):m<le.current?Fu(m,le.current,2*ce.current,.55):Fu(m,le.current/2,ce.current,.55):y;return O&&a?(w>=ce.current&&(w=ce.current),f===ce.current&&Z.current.scrollTop>0&&(w=ce.current),K.current=w<ce.current):K.current=!1,u&&xe("DRAG"),d?(xe("SNAP",{payload:{y:w,velocity:g>.05?g:1,source:"dragging"}}),f):(H({y:w,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=tu([n.y,n.maxHeight],(function(e,t){return Math.round(ah(t-e,0,16))+"px"})),o=tu([n.y,n.minSnap,n.maxSnap],(function(e,t,n){return ah(e,t,n)+"px"})),i=tu([n.y,n.minSnap,n.maxSnap],(function(e,t,n){return e<t?t-e+"px":e>n?n-e+"px":"0px"})),a=tu([n.y,n.maxSnap],(function(e,t){return e>=t?Math.ceil(e-t):0})),s=tu([n.y,n.minSnap],(function(e,t){if(!t)return 0;var n=Math.max(t/2-45,0);return ah((e-n)*(1/(Math.min(t/2+45,t)-n)+0),0,1)})),l=tu([n.y,n.minSnap],(function(e,t){return t?ah(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"]=i,t["--rsbs-overlay-rounded"]=r,t["--rsbs-overlay-h"]=o,t}({spring:B});return n.createElement(Vu.div,rh({},L,{"data-rsbs-root":!0,"data-rsbs-state":wh.find(fe.matches),"data-rsbs-is-blocking":b,"data-rsbs-is-dismissable":!!p,"data-rsbs-has-header":!!s,"data-rsbs-has-footer":!!a,className:i,ref:F,style:rh({},ve,C,{opacity:B.ready})}),o,b&&n.createElement("div",rh({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",rh({key:"header","data-rsbs-header":!0,ref:G},ge()),s),n.createElement("div",rh({key:"scroll","data-rsbs-scroll":!0,ref:Z},O?ge({isContentDragging:!0}):{}),n.createElement("div",{"data-rsbs-content":!0,ref:W},r)),a&&n.createElement("div",rh({key:"footer",ref:q,"data-rsbs-footer":!0},ge()),a)))})),wh=["closed","opening","open","closing","dragging","snapping","resizing"];function Ch(e){var t=e.lastSnap;return null!=t?t:Math.min.apply(Math,e.snapPoints)}function jh(e){return e.minHeight}var kh=["onSpringStart","onSpringEnd","skipInitialTransition"],$h=n.forwardRef((function(e,t){var r=e.onSpringStart,o=e.onSpringEnd,i=e.skipInitialTransition,a=oh(e,kh),s=n.useState(!1),l=s[0],c=s[1],u=n.useRef(),d=n.useRef(null),p=n.useRef(i&&a.open?"OPEN":"CLOSED");ih((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==o?void 0:o(e)).then((function(){"CLOSE"===e.type&&(u.current=requestAnimationFrame((function(){return c(!1)})))}))}),[o]);return l?n.createElement(ws,{"data-rsbs-portal":!0},n.createElement(yh,rh({},a,{lastSnapRef:d,ref:t,initialState:p.current,onSpringStart:h,onSpringEnd:f}))):null}));const Sh=r.css`
|
|
2411
2422
|
width: 40px;
|
|
2412
2423
|
height: 6px;
|
|
2413
2424
|
border-color: ${h("neutral",300)};
|
|
@@ -2418,7 +2429,7 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2418
2429
|
&:focus {
|
|
2419
2430
|
outline-color: ${h("primary",700)};
|
|
2420
2431
|
}
|
|
2421
|
-
`,
|
|
2432
|
+
`,Eh=(e,t)=>r.css`
|
|
2422
2433
|
[data-rsbs-overlay] {
|
|
2423
2434
|
border-top-left-radius: 16px;
|
|
2424
2435
|
border-top-right-radius: 16px;
|
|
@@ -2447,7 +2458,7 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2447
2458
|
padding: 0px;
|
|
2448
2459
|
min-height: 64px;
|
|
2449
2460
|
}
|
|
2450
|
-
`;!function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.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
|
|
2461
|
+
`;!function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.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 Rh=r.css`
|
|
2451
2462
|
a,
|
|
2452
2463
|
p {
|
|
2453
2464
|
font-size: 16px;
|
|
@@ -2479,19 +2490,19 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2479
2490
|
a:hover {
|
|
2480
2491
|
text-decoration: underline;
|
|
2481
2492
|
}
|
|
2482
|
-
`,
|
|
2493
|
+
`,Oh=r.css`
|
|
2483
2494
|
svg {
|
|
2484
2495
|
height: 12px;
|
|
2485
2496
|
width: 12px;
|
|
2486
2497
|
color: ${h("neutral",600)};
|
|
2487
2498
|
}
|
|
2488
|
-
`,
|
|
2499
|
+
`,Lh=r.css`
|
|
2489
2500
|
cursor: pointer;
|
|
2490
2501
|
color: ${h("neutral",600)};
|
|
2491
2502
|
display: flex;
|
|
2492
2503
|
justify-content: center;
|
|
2493
2504
|
align-items: center;
|
|
2494
|
-
`,
|
|
2505
|
+
`,Th=(e,t)=>r.css`
|
|
2495
2506
|
min-height: 56px;
|
|
2496
2507
|
width: 100vw;
|
|
2497
2508
|
position: ${e?"sticky":"absolute"};
|
|
@@ -2501,7 +2512,7 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2501
2512
|
background-color: ${h("neutral",t?200:100)};
|
|
2502
2513
|
border-top: 1px solid ${h("neutral",400)};
|
|
2503
2514
|
z-index: 101;
|
|
2504
|
-
`,
|
|
2515
|
+
`,Ph=e=>r.css`
|
|
2505
2516
|
height: 100%;
|
|
2506
2517
|
width: 100%;
|
|
2507
2518
|
max-width: ${e?`${e}px`:"100%"};
|
|
@@ -2516,7 +2527,7 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2516
2527
|
flex-direction: column;
|
|
2517
2528
|
align-items: flex-start;
|
|
2518
2529
|
}
|
|
2519
|
-
`,
|
|
2530
|
+
`,Mh=r.css`
|
|
2520
2531
|
display: flex;
|
|
2521
2532
|
align-items: center;
|
|
2522
2533
|
flex-wrap: wrap;
|
|
@@ -2529,7 +2540,7 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2529
2540
|
color: ${h("neutral",700)};
|
|
2530
2541
|
text-decoration: underline;
|
|
2531
2542
|
}
|
|
2532
|
-
`,
|
|
2543
|
+
`,_h=r.css`
|
|
2533
2544
|
width: 240px;
|
|
2534
2545
|
font-size: 14px;
|
|
2535
2546
|
line-height: 20px;
|
|
@@ -2540,13 +2551,13 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2540
2551
|
@media screen and (max-width: 768px) {
|
|
2541
2552
|
text-align: left;
|
|
2542
2553
|
}
|
|
2543
|
-
`,
|
|
2554
|
+
`,Dh=r.css`
|
|
2544
2555
|
width: 100%;
|
|
2545
2556
|
display: flex;
|
|
2546
2557
|
align-items: center;
|
|
2547
2558
|
height: 56px;
|
|
2548
2559
|
background-color: ${h("neutral",200)};
|
|
2549
|
-
`,
|
|
2560
|
+
`,Ih=r.css`
|
|
2550
2561
|
height: 56px;
|
|
2551
2562
|
width: 99%;
|
|
2552
2563
|
background-color: ${h("neutral",200)};
|
|
@@ -2640,9 +2651,9 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2640
2651
|
opacity: 1;
|
|
2641
2652
|
}
|
|
2642
2653
|
}
|
|
2643
|
-
`,Ih=r.css`
|
|
2644
|
-
position: relative;
|
|
2645
2654
|
`,Vh=r.css`
|
|
2655
|
+
position: relative;
|
|
2656
|
+
`,Nh=r.css`
|
|
2646
2657
|
position: absolute;
|
|
2647
2658
|
top: -5px;
|
|
2648
2659
|
right: -5px;
|
|
@@ -2657,7 +2668,7 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2657
2668
|
display: flex;
|
|
2658
2669
|
justify-content: center;
|
|
2659
2670
|
align-items: center;
|
|
2660
|
-
`,
|
|
2671
|
+
`,Ah=(e,t)=>Math.max(0,e.findIndex((e=>e.value===t))),zh=(e,t)=>r.css`
|
|
2661
2672
|
height: ${e?"96px":"48px"};
|
|
2662
2673
|
width: 100%;
|
|
2663
2674
|
background-color: ${h("neutral",100)};
|
|
@@ -2666,7 +2677,7 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2666
2677
|
left: 0;
|
|
2667
2678
|
z-index: 102;
|
|
2668
2679
|
border-bottom: 1px solid ${h("neutral",400)};
|
|
2669
|
-
`,
|
|
2680
|
+
`,Bh=r.css`
|
|
2670
2681
|
height: 48px;
|
|
2671
2682
|
width: 100%;
|
|
2672
2683
|
background-color: ${h("neutral",100)};
|
|
@@ -2676,7 +2687,7 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2676
2687
|
justify-content: flex-start;
|
|
2677
2688
|
gap: 0px;
|
|
2678
2689
|
padding: 8px 16px;
|
|
2679
|
-
`,
|
|
2690
|
+
`,Hh=(e,t)=>r.css`
|
|
2680
2691
|
height: 48px;
|
|
2681
2692
|
width: 100%;
|
|
2682
2693
|
max-width: ${t?`${t}px`:"100%"};
|
|
@@ -2686,7 +2697,7 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2686
2697
|
justify-content: space-between;
|
|
2687
2698
|
margin: 0 auto;
|
|
2688
2699
|
padding: 8px 16px;
|
|
2689
|
-
`,
|
|
2700
|
+
`,Fh=r.css`
|
|
2690
2701
|
outline: none;
|
|
2691
2702
|
a {
|
|
2692
2703
|
&:focus-visible {
|
|
@@ -2697,12 +2708,12 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2697
2708
|
outline-width: 2px;
|
|
2698
2709
|
}
|
|
2699
2710
|
}
|
|
2700
|
-
`,
|
|
2711
|
+
`,Zh=e=>r.css`
|
|
2701
2712
|
display: ${e?"none":"flex"};
|
|
2702
2713
|
align-items: center;
|
|
2703
2714
|
justify-content: flex-start;
|
|
2704
2715
|
gap: 0px;
|
|
2705
|
-
`,
|
|
2716
|
+
`,Wh=e=>r.css`
|
|
2706
2717
|
font-size: 16px;
|
|
2707
2718
|
line-height: 24px;
|
|
2708
2719
|
font-weight: 400;
|
|
@@ -2727,12 +2738,12 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2727
2738
|
font-weight: 700;
|
|
2728
2739
|
color: ${h("accessible","controls-on-neutral-lights")};
|
|
2729
2740
|
`:""}
|
|
2730
|
-
`,
|
|
2741
|
+
`,Gh=r.css`
|
|
2731
2742
|
height: 48px;
|
|
2732
2743
|
display: flex;
|
|
2733
2744
|
align-items: center;
|
|
2734
2745
|
justify-content: flex-end;
|
|
2735
|
-
`,
|
|
2746
|
+
`,qh=e=>r.css`
|
|
2736
2747
|
height: 100%;
|
|
2737
2748
|
font-size: 16px;
|
|
2738
2749
|
line-height: 24px;
|
|
@@ -2751,7 +2762,7 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2751
2762
|
}
|
|
2752
2763
|
}
|
|
2753
2764
|
`:""}
|
|
2754
|
-
`,
|
|
2765
|
+
`,Uh=e=>r.css`
|
|
2755
2766
|
height: 100%;
|
|
2756
2767
|
display: flex;
|
|
2757
2768
|
align-items: center;
|
|
@@ -2759,7 +2770,7 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2759
2770
|
gap: 20px;
|
|
2760
2771
|
padding-left: 16px;
|
|
2761
2772
|
border-left: 1px solid ${h("neutral",e?700:300)};
|
|
2762
|
-
`,
|
|
2773
|
+
`,Xh=r.css`
|
|
2763
2774
|
background-color: none;
|
|
2764
2775
|
border: none;
|
|
2765
2776
|
cursor: pointer;
|
|
@@ -2784,7 +2795,7 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2784
2795
|
outline-width: 2px;
|
|
2785
2796
|
background-color: ${h("neutral",200)};
|
|
2786
2797
|
}
|
|
2787
|
-
`,
|
|
2798
|
+
`,Yh=e=>r.css`
|
|
2788
2799
|
position: absolute;
|
|
2789
2800
|
top: 48px;
|
|
2790
2801
|
right: 0;
|
|
@@ -2797,10 +2808,10 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2797
2808
|
justify-content: flex-start;
|
|
2798
2809
|
gap: 16px;
|
|
2799
2810
|
transition: width 0.5s ease-in-out;
|
|
2800
|
-
`,
|
|
2811
|
+
`,Kh=r.css`
|
|
2801
2812
|
height: 100%;
|
|
2802
2813
|
width: 100%;
|
|
2803
|
-
`,
|
|
2814
|
+
`,Jh=r.css`
|
|
2804
2815
|
background-color: ${h("neutral",200)};
|
|
2805
2816
|
border-bottom: 1px solid ${h("neutral",300)};
|
|
2806
2817
|
|
|
@@ -2820,13 +2831,13 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2820
2831
|
margin-left: -12px;
|
|
2821
2832
|
}
|
|
2822
2833
|
}
|
|
2823
|
-
`,Jh=r.css`
|
|
2824
|
-
background-color: ${h("neutral",100)};
|
|
2825
2834
|
`,Qh=r.css`
|
|
2835
|
+
background-color: ${h("neutral",100)};
|
|
2836
|
+
`,ef=r.css`
|
|
2826
2837
|
min-height: 100vh;
|
|
2827
2838
|
width: 100%;
|
|
2828
2839
|
overflow-y: scroll;
|
|
2829
|
-
`;r.css``;const
|
|
2840
|
+
`;r.css``;const tf=e=>r.css`
|
|
2830
2841
|
display: inline-block;
|
|
2831
2842
|
width: 100%;
|
|
2832
2843
|
padding: 12px 16px;
|
|
@@ -2855,7 +2866,7 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2855
2866
|
outline-width: 2px;
|
|
2856
2867
|
background-color: ${h("neutral",200)};
|
|
2857
2868
|
}
|
|
2858
|
-
`,
|
|
2869
|
+
`,nf=r.css`
|
|
2859
2870
|
width: 100%;
|
|
2860
2871
|
padding: 12px 16px;
|
|
2861
2872
|
display: flex;
|
|
@@ -2879,7 +2890,7 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2879
2890
|
outline-width: 2px;
|
|
2880
2891
|
background-color: ${h("neutral",200)};
|
|
2881
2892
|
}
|
|
2882
|
-
`,
|
|
2893
|
+
`,rf=e=>r.css`
|
|
2883
2894
|
position: absolute;
|
|
2884
2895
|
top: 0px;
|
|
2885
2896
|
right: 0;
|
|
@@ -2891,7 +2902,7 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2891
2902
|
align-items: flex-start;
|
|
2892
2903
|
justify-content: flex-start;
|
|
2893
2904
|
transition: width 0.5s ease-in-out;
|
|
2894
|
-
`,
|
|
2905
|
+
`,of=r.css`
|
|
2895
2906
|
height: 48px;
|
|
2896
2907
|
width: 100%;
|
|
2897
2908
|
display: flex;
|
|
@@ -2902,7 +2913,7 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2902
2913
|
position: relative;
|
|
2903
2914
|
top: 0;
|
|
2904
2915
|
left: 0;
|
|
2905
|
-
`,
|
|
2916
|
+
`,af=r.css`
|
|
2906
2917
|
position: absolute;
|
|
2907
2918
|
bottom: 0;
|
|
2908
2919
|
left: 0;
|
|
@@ -2917,7 +2928,7 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2917
2928
|
button {
|
|
2918
2929
|
width: calc(48% - 24px);
|
|
2919
2930
|
}
|
|
2920
|
-
`,
|
|
2931
|
+
`,sf=({navigationSection:e,utilitySection:r,actionsSection:o,linkRouter:i,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=i;return t.jsxs(t.Fragment,{children:[t.jsx("div",{css:Yh(a),children:a&&t.jsxs("div",{css:Kh,children:[t.jsxs("div",{style:{overflowY:"scroll",width:"100%",height:"100%",paddingBottom:"72px"},children:[r?t.jsx("div",{css:Jh,children:r?.map((e=>t.jsx("div",{className:"ds-utility-item",children:e})))}):null,e?t.jsx("div",{css:Qh,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:tf(l===e.link),children:e.label},e.label):t.jsxs("button",{css:nf,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($,{rotate:"270",color:"var(--chakra-colors-neutral-700)"}):null]},e.label)))}):null]}),o?t.jsx("div",{css:af,children:o.map((e=>t.jsx(b,{label:e.label,onClick:()=>{e?.onClick?.(),u(void 0),p(-1),s(!1)}},e.label)))}):null]})}),t.jsx("div",{css:rf(!!c?.items),children:c?.items?t.jsxs(t.Fragment,{children:[t.jsxs("div",{css:of,children:[t.jsxs("button",{type:"button",onClick:()=>{u(void 0),p(-1),f.current[d]?.focus()},"aria-label":"Go back",css:Xh,ref:h,children:[t.jsx($,{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:Xh,children:["Close",t.jsx(E,{height:"16px",width:"16px"})]})]}),t.jsx("div",{css:ef,children:c?.items?.map((e=>t.jsx(x,{to:e.link,href:e.link,css:tf(),onClick:()=>{u(void 0),p(-1),s(!1)},children:e.label},e.label)))})]}):null})]})},lf=1023,cf=r.css`
|
|
2921
2932
|
width: 64px;
|
|
2922
2933
|
height: 100%;
|
|
2923
2934
|
z-index: 100;
|
|
@@ -2926,7 +2937,7 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2926
2937
|
display: flex;
|
|
2927
2938
|
flex-direction: column;
|
|
2928
2939
|
justify-content: space-between;
|
|
2929
|
-
`,
|
|
2940
|
+
`,uf=r.css`
|
|
2930
2941
|
width: 64px;
|
|
2931
2942
|
height: 64px;
|
|
2932
2943
|
background-color: ${h("neutral",200)};
|
|
@@ -3016,7 +3027,7 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3016
3027
|
}
|
|
3017
3028
|
}
|
|
3018
3029
|
}
|
|
3019
|
-
`,
|
|
3030
|
+
`,df=r.css`
|
|
3020
3031
|
display: flex;
|
|
3021
3032
|
justify-content: center;
|
|
3022
3033
|
align-items: center;
|
|
@@ -3029,7 +3040,7 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3029
3040
|
fill: ${h("neutral",600)};
|
|
3030
3041
|
}
|
|
3031
3042
|
}
|
|
3032
|
-
`,
|
|
3043
|
+
`,pf=r.css`
|
|
3033
3044
|
width: 64px;
|
|
3034
3045
|
height: 64px;
|
|
3035
3046
|
background-color: ${h("neutral",200)};
|
|
@@ -3067,7 +3078,7 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3067
3078
|
text-align: center;
|
|
3068
3079
|
color: ${h("neutral",600)};
|
|
3069
3080
|
}
|
|
3070
|
-
`,
|
|
3081
|
+
`,hf=r.css`
|
|
3071
3082
|
width: 320px;
|
|
3072
3083
|
height: 100%;
|
|
3073
3084
|
z-index: 100;
|
|
@@ -3076,14 +3087,14 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3076
3087
|
overflow-y: auto;
|
|
3077
3088
|
overflow-x: hidden;
|
|
3078
3089
|
border-right: 1px solid ${h("neutral",300)};
|
|
3079
|
-
`,
|
|
3090
|
+
`,ff=e=>r.css`
|
|
3080
3091
|
width: 100%;
|
|
3081
3092
|
display: flex;
|
|
3082
3093
|
align-items: center;
|
|
3083
3094
|
height: 40px;
|
|
3084
3095
|
|
|
3085
3096
|
${"view"===e&&`\n border: 1px solid ${h("neutral",400)};\n background-color: ${h("neutral",200)};\n border-radius: 4px;\n padding: 4px;\n `}
|
|
3086
|
-
`,
|
|
3097
|
+
`,xf=r.css`
|
|
3087
3098
|
width: 99%;
|
|
3088
3099
|
height: 40px;
|
|
3089
3100
|
padding: 8px 16px;
|
|
@@ -3099,7 +3110,7 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3099
3110
|
&:focus-visible {
|
|
3100
3111
|
box-shadow: none;
|
|
3101
3112
|
}
|
|
3102
|
-
`,
|
|
3113
|
+
`,gf=r.css`
|
|
3103
3114
|
background-color: ${h("neutral",200)};
|
|
3104
3115
|
color: ${h("neutral",700)};
|
|
3105
3116
|
|
|
@@ -3156,11 +3167,11 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3156
3167
|
opacity: 1;
|
|
3157
3168
|
}
|
|
3158
3169
|
}
|
|
3159
|
-
`,
|
|
3170
|
+
`,vf=r.css`
|
|
3160
3171
|
width: 4px;
|
|
3161
3172
|
height: 24px;
|
|
3162
3173
|
background-color: ${h("neutral",400)};
|
|
3163
|
-
`,
|
|
3174
|
+
`,mf=r.css`
|
|
3164
3175
|
height: 32px;
|
|
3165
3176
|
border-radius: 2px;
|
|
3166
3177
|
background-color: ${h("neutral",200)};
|
|
@@ -3233,7 +3244,7 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3233
3244
|
opacity: 1;
|
|
3234
3245
|
}
|
|
3235
3246
|
}
|
|
3236
|
-
`,
|
|
3247
|
+
`,bf=(e,t)=>Math.max(0,e.findIndex((e=>e.value===t))),yf=e=>1===e?"none":2===e?"left":"right",wf={small:"16px",medium:"24px",large:"40px",default:"16px"};function Cf(e,t,n,o){const i=function(e,t){return"string"==typeof t&&""!==t.trim()?t:e&&wf[e]?wf[e]:wf.default}(e,t),a=n?h("neutral",200):h("primary",300),s=o??a,l=o&&n?"opacity: 0.7;":"",c=h("neutral",n?400:800);return r.css`
|
|
3237
3248
|
height: ${i};
|
|
3238
3249
|
width: ${i};
|
|
3239
3250
|
border-radius: 50%;
|
|
@@ -3265,12 +3276,12 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3265
3276
|
background-color: ${h("primary",500)};
|
|
3266
3277
|
}
|
|
3267
3278
|
}
|
|
3268
|
-
`}const
|
|
3279
|
+
`}const jf=e=>r.css`
|
|
3269
3280
|
width: ${e||"16px"};
|
|
3270
3281
|
position: absolute;
|
|
3271
3282
|
top: -8px;
|
|
3272
3283
|
left: 15px;
|
|
3273
|
-
`,
|
|
3284
|
+
`,kf=n.forwardRef((({name:n,ariaLabel:o,size:i="medium",customSize:a="",src:s,srcSet:l,onClick:c,notificationCount:u,disabled:d=!0,customBackgroundColor:p=""},f)=>{const x=()=>{d||c?.()},g=(()=>{let e="";return u&&u>0&&(e=`${u>99?"99+":u}`),e})();let v="16px";u&&u>99?v="28px":u&&u>9&&(v="22px");const m=!!s||!!l,b=c&&!d;return t.jsxs(e.Avatar.Root,{"aria-label":o||n,ref:f,css:Cf(i,a,d,p),onClick:x,onKeyDown:e=>{d||"Enter"!==e.key||x()},role:b?"button":void 0,tabIndex:b?0:void 0,"aria-disabled":d,children:[m?t.jsx(e.Avatar.Image,{src:s,srcSet:l}):t.jsx(Q,{size:"100%",style:{padding:"15%",color:d?h("neutral",400):void 0}}),g.length>0?t.jsx("div",{css:jf(v),children:t.jsx("div",{css:r.css`
|
|
3274
3285
|
height: 16px;
|
|
3275
3286
|
width: auto;
|
|
3276
3287
|
background-color: ${h("error",500)};
|
|
@@ -3282,16 +3293,16 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3282
3293
|
font-size: 12px;
|
|
3283
3294
|
font-weight: 700;
|
|
3284
3295
|
color: ${h("error",100)};
|
|
3285
|
-
`,children:t.jsx("p",{"aria-label":`${u} unread message`,children:g})})}):null]})}))
|
|
3296
|
+
`,children:t.jsx("p",{"aria-label":`${u} unread message`,children:g})})}):null]})})),$f=r.css`
|
|
3286
3297
|
display: flex;
|
|
3287
3298
|
justify-content: flex-start;
|
|
3288
3299
|
align-items: center;
|
|
3289
3300
|
gap: 8px;
|
|
3290
|
-
|
|
3301
|
+
`,Sf=e=>r.css`
|
|
3291
3302
|
width: ${e||"16px"};
|
|
3292
3303
|
position: relative;
|
|
3293
3304
|
display: flex;
|
|
3294
|
-
`,
|
|
3305
|
+
`,Ef=r.css`
|
|
3295
3306
|
height: 4px;
|
|
3296
3307
|
width: 4px;
|
|
3297
3308
|
background-color: ${h("error",500)};
|
|
@@ -3299,7 +3310,7 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3299
3310
|
position: absolute;
|
|
3300
3311
|
top: 0px;
|
|
3301
3312
|
right: 0px;
|
|
3302
|
-
`,
|
|
3313
|
+
`,Rf=r.css`
|
|
3303
3314
|
height: 10px;
|
|
3304
3315
|
background-color: ${h("error",500)};
|
|
3305
3316
|
padding: 0 3px 1px 3px;
|
|
@@ -3310,11 +3321,11 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3310
3321
|
position: absolute;
|
|
3311
3322
|
top: -2px;
|
|
3312
3323
|
left: 9px;
|
|
3313
|
-
`,
|
|
3324
|
+
`,Of=r.css`
|
|
3314
3325
|
font-size: 9px;
|
|
3315
3326
|
font-weight: 700;
|
|
3316
3327
|
color: ${h("error",100)};
|
|
3317
|
-
`,
|
|
3328
|
+
`,Lf=r.css`
|
|
3318
3329
|
height: 16px;
|
|
3319
3330
|
min-width: 16px;
|
|
3320
3331
|
background-color: ${h("error",500)};
|
|
@@ -3323,11 +3334,11 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3323
3334
|
justify-content: center;
|
|
3324
3335
|
align-items: center;
|
|
3325
3336
|
padding: 0px 4px 1px 4px;
|
|
3326
|
-
`,
|
|
3337
|
+
`,Tf=r.css`
|
|
3327
3338
|
font-size: 16px;
|
|
3328
3339
|
font-weight: 700;
|
|
3329
3340
|
color: ${h("error",100)};
|
|
3330
|
-
`,
|
|
3341
|
+
`,Pf=(e,t)=>r.css`
|
|
3331
3342
|
width: 100%;
|
|
3332
3343
|
max-width: ${"small"===e?"234px":"320px"};
|
|
3333
3344
|
border-radius: 4px;
|
|
@@ -3342,7 +3353,7 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3342
3353
|
button {
|
|
3343
3354
|
margin-left: ${t?0:"24px"};
|
|
3344
3355
|
}
|
|
3345
|
-
`,
|
|
3356
|
+
`,Mf=r.css`
|
|
3346
3357
|
display: flex;
|
|
3347
3358
|
align-items: flex-start;
|
|
3348
3359
|
gap: 8px;
|
|
@@ -3350,28 +3361,28 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3350
3361
|
svg {
|
|
3351
3362
|
margin-top: 6px;
|
|
3352
3363
|
}
|
|
3353
|
-
`,
|
|
3364
|
+
`,_f=e=>r.css`
|
|
3354
3365
|
color: ${h("neutral",800)};
|
|
3355
3366
|
font-size: ${"small"===e?"14px":"18px"};
|
|
3356
3367
|
line-height: ${"small"===e?"20px":"28px"};
|
|
3357
3368
|
font-weight: 400;
|
|
3358
3369
|
text-align: left;
|
|
3359
|
-
`,
|
|
3370
|
+
`,Df=e=>r.css`
|
|
3360
3371
|
color: ${h("neutral",700)};
|
|
3361
3372
|
font-size: ${"small"===e?"12px":"16px"};
|
|
3362
3373
|
line-height: ${"small"===e?"16px":"24px"};
|
|
3363
3374
|
font-weight: 400;
|
|
3364
3375
|
margin-left: 24px;
|
|
3365
3376
|
text-align: left;
|
|
3366
|
-
`,
|
|
3377
|
+
`,If=r.css`
|
|
3367
3378
|
background-color: ${h("neutral",100)};
|
|
3368
3379
|
border: 1px solid ${h("neutral",300)};
|
|
3369
3380
|
color: ${h("neutral",700)};
|
|
3370
|
-
`,
|
|
3381
|
+
`,Vf=r.css`
|
|
3371
3382
|
background-color: ${h("neutral",200)};
|
|
3372
3383
|
border: 1px solid ${h("neutral",300)};
|
|
3373
3384
|
color: ${h("neutral",700)};
|
|
3374
|
-
`,
|
|
3385
|
+
`,Nf=r.css`
|
|
3375
3386
|
background-color: ${h("success",100)};
|
|
3376
3387
|
border: 1px solid ${h("success",300)};
|
|
3377
3388
|
color: ${h("success",500)};
|
|
@@ -3379,7 +3390,7 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3379
3390
|
p {
|
|
3380
3391
|
color: ${h("success",900)};
|
|
3381
3392
|
}
|
|
3382
|
-
`,
|
|
3393
|
+
`,Af=r.css`
|
|
3383
3394
|
background-color: ${h("warning",100)};
|
|
3384
3395
|
border: 1px solid ${h("warning",300)};
|
|
3385
3396
|
color: ${h("warning",500)};
|
|
@@ -3387,7 +3398,7 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3387
3398
|
p {
|
|
3388
3399
|
color: ${h("warning",900)};
|
|
3389
3400
|
}
|
|
3390
|
-
`,
|
|
3401
|
+
`,zf=r.css`
|
|
3391
3402
|
background-color: ${h("error",100)};
|
|
3392
3403
|
border: 1px solid ${h("error",300)};
|
|
3393
3404
|
color: ${h("error",500)};
|
|
@@ -3395,32 +3406,32 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3395
3406
|
p {
|
|
3396
3407
|
color: ${h("error",900)};
|
|
3397
3408
|
}
|
|
3398
|
-
`,
|
|
3409
|
+
`,Bf=r.css`
|
|
3399
3410
|
height: 8px;
|
|
3400
3411
|
width: 100%;
|
|
3401
3412
|
background-color: ${h("neutral",300)};
|
|
3402
3413
|
display: flex;
|
|
3403
3414
|
align-items: center;
|
|
3404
3415
|
justify-content: flex-start;
|
|
3405
|
-
`,
|
|
3416
|
+
`,Hf=e=>r.css`
|
|
3406
3417
|
height: 100%;
|
|
3407
3418
|
width: ${e}%;
|
|
3408
3419
|
background-color: ${h("primary",500)};
|
|
3409
3420
|
transition: width 0.5s ease-in-out;
|
|
3410
|
-
`,
|
|
3421
|
+
`,Ff=r.css`
|
|
3411
3422
|
width: 100%;
|
|
3412
3423
|
display: flex;
|
|
3413
3424
|
align-items: center;
|
|
3414
3425
|
justify-content: space-between;
|
|
3415
3426
|
position: relative;
|
|
3416
|
-
`,
|
|
3427
|
+
`,Zf=r.css`
|
|
3417
3428
|
height: 60px;
|
|
3418
3429
|
width: 80px;
|
|
3419
3430
|
display: flex;
|
|
3420
3431
|
flex-direction: column;
|
|
3421
3432
|
align-items: center;
|
|
3422
3433
|
justify-content: space-between;
|
|
3423
|
-
`,
|
|
3434
|
+
`,Wf=(e,t)=>r.css`
|
|
3424
3435
|
height: 32px;
|
|
3425
3436
|
width: 32px;
|
|
3426
3437
|
display: flex;
|
|
@@ -3456,12 +3467,12 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3456
3467
|
}
|
|
3457
3468
|
|
|
3458
3469
|
${t?`\n background-color: ${h("neutral",300)};\n \n &:hover {\n background-color: ${h("neutral",300)};\n box-shadow: none;\n }\n `:""}
|
|
3459
|
-
`,
|
|
3470
|
+
`,Gf=e=>r.css`
|
|
3460
3471
|
color: ${h("neutral",e?800:600)};
|
|
3461
3472
|
font-size: 14px;
|
|
3462
3473
|
line-height: 20px;
|
|
3463
3474
|
font-weight: 400;
|
|
3464
|
-
`,
|
|
3475
|
+
`,qf=r.css`
|
|
3465
3476
|
height: 1px;
|
|
3466
3477
|
width: 100%;
|
|
3467
3478
|
padding: 0 30px;
|
|
@@ -3469,11 +3480,11 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3469
3480
|
top: 16px;
|
|
3470
3481
|
left: 0;
|
|
3471
3482
|
z-index: -1;
|
|
3472
|
-
`,
|
|
3483
|
+
`,Uf=r.css`
|
|
3473
3484
|
height: 1px;
|
|
3474
3485
|
width: 100%;
|
|
3475
3486
|
background-color: ${h("neutral",400)};
|
|
3476
|
-
`,
|
|
3487
|
+
`,Xf=r.css`
|
|
3477
3488
|
justify-content: space-between;
|
|
3478
3489
|
align-items: center;
|
|
3479
3490
|
gap: 8px;
|
|
@@ -3516,21 +3527,21 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3516
3527
|
color: ${h("error",900)};
|
|
3517
3528
|
}
|
|
3518
3529
|
}
|
|
3519
|
-
`,
|
|
3530
|
+
`,Yf=r.css`
|
|
3520
3531
|
font-size: 18px;
|
|
3521
3532
|
line-height: 28px;
|
|
3522
3533
|
font-weight: 400;
|
|
3523
3534
|
color: ${h("neutral",800)};
|
|
3524
|
-
`,
|
|
3535
|
+
`,Kf=r.css`
|
|
3525
3536
|
font-size: 16px;
|
|
3526
3537
|
line-height: 24px;
|
|
3527
3538
|
font-weight: 400;
|
|
3528
3539
|
color: ${h("neutral",700)};
|
|
3529
|
-
`,Kf=r.css`
|
|
3530
|
-
padding: 6px;
|
|
3531
3540
|
`,Jf=r.css`
|
|
3532
3541
|
padding: 6px;
|
|
3533
|
-
`,Qf=
|
|
3542
|
+
`,Qf=r.css`
|
|
3543
|
+
padding: 6px;
|
|
3544
|
+
`,ex={pauseOnPageIdle:!0,offsets:"24px"},tx={"top-start":e.createToaster({placement:"top-start",...ex}),"top-end":e.createToaster({placement:"top-end",...ex}),"bottom-start":e.createToaster({placement:"bottom-start",...ex}),"bottom-end":e.createToaster({placement:"bottom-end",...ex})};exports.AnalysisWidget=({children:r,header:o,footer:i,expanded:a=!0,collapsible:s=!0,actions:l,showFooterOnCollapsed:c=!1})=>{const u="analysis-widget-item",[d,p]=n.useState(a),h=`analysis-widget-header-${u}`;return t.jsx(e.Box,{as:"section","aria-labelledby":h,css:ia,children:t.jsxs(e.Accordion.Root,{multiple:!0,value:s?void 0:[u],defaultValue:a?[u]:[],children:[t.jsxs(e.Accordion.Item,{css:sa,value:u,children:[o&&t.jsx(e.Accordion.ItemTrigger,{id:h,role:"button","aria-expanded":d,tabIndex:0,css:aa,pointerEvents:s?"auto":"none",onClick:s?()=>{p(!d)}:void 0,children:t.jsxs(e.Flex,{gap:3,flex:"1",overflow:"hidden",alignItems:"top",justifyContent:"space-between",children:[o,l&&l.map((e=>t.jsx(b,{variant:"secondary",size:"small",label:e.label,onClick:t=>{e.onClick(),t.preventDefault(),t.stopPropagation()},leftIcon:e?.icon},e.label))),s&&t.jsx(e.Accordion.ItemIndicator,{height:"16px",display:"flex",children:t.jsx($,{"aria-label":"Toggle section",color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]})}),t.jsxs("div",{className:d?"item-content-open":"item-content-closed","aria-hidden":!d,children:[r,!c&&i&&t.jsx(e.Box,{css:la,children:i})]})]}),c&&i&&t.jsx(e.Box,{css:la,children:i})]})})},exports.Avatar=kf,exports.Badge=({hasNotification:e,notificationCount:r,label:o})=>{const[i,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"),i?t.jsxs("div",{css:$f,role:"status","aria-live":"polite",children:[t.jsxs("div",{css:Sf(),children:[t.jsx(I,{color:"currentColor",height:"16px",width:"16px"}),!e||r||o?null:t.jsx("div",{css:Ef,"aria-hidden":!0})]}),o?t.jsx("p",{children:o}):null,s.length>0?t.jsx("div",{css:Lf,children:t.jsx("p",{css:Tf,"aria-label":`${r} unread message`,children:s})}):null]}):t.jsxs("div",{css:$f,role:"status","aria-live":"polite",children:[o?t.jsx("p",{children:o}):null,t.jsxs("div",{css:Sf(l),children:[s.length>0?t.jsx("div",{css:Rf,children:t.jsx("p",{css:Of,"aria-label":`${r} unread message`,children:s})}):null,e&&!r?t.jsx("div",{css:Ef,"aria-hidden":!0}):null,t.jsx(I,{color:"currentColor",height:"16px",width:"16px"})]})]})},exports.BaseMap=({title:e,caption:o,additionalSettings:i,options:a,onOptionSelected:s,maxHeight:l="400px",maxWidth:c="260px"})=>{const u=n.useRef(null),d=n.useRef(null);return n.useEffect((()=>{const e=u.current,t=d.current;if(!e||!t)return;const n=()=>{e.focus()};if("undefined"!=typeof IntersectionObserver){let e=!1;const r=new IntersectionObserver((([t])=>{t?.isIntersecting?(e||n(),e=!0):e=!1}),{threshold:.01});return r.observe(t),()=>r.disconnect()}const r=window.setTimeout(n,0);return()=>window.clearTimeout(r)}),[]),t.jsx("div",{ref:d,css:bn(l,c),children:t.jsxs("div",{className:"ds-base-map-scroll-content",children:[t.jsxs("div",{css:yn,children:[t.jsx("h2",{ref:u,className:"ds-base-map-header-title",tabIndex:-1,children:e}),t.jsx("p",{className:"ds-base-map-header-caption",children:o})]}),t.jsxs("div",{css:wn,children:[i?t.jsx("div",{css:Cn,children:i.map((e=>t.jsxs("div",{children:[t.jsx(Re,{css:{},checked:e.checked,onCheckedChange:({checked:t})=>e.onCheckedChange({checked:Boolean(t)}),children:e.label}),e.checked&&e.children?t.jsx("div",{css:jn,children:e.children}):null]},e.label)))}):null,a?t.jsx("div",{css:kn,children:a.map((e=>{return t.jsxs("div",{css:$n(e.active),role:"button",onClick:()=>s?.(e),tabIndex:0,onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||s?.(e)},children:[t.jsx("div",{css:(n=e.imageUrl,r.css`
|
|
3534
3545
|
height: 32px;
|
|
3535
3546
|
width: 32px;
|
|
3536
3547
|
border: 1px solid ${h("neutral",300)};
|
|
@@ -3538,7 +3549,7 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3538
3549
|
background-image: url(${n});
|
|
3539
3550
|
background-size: cover;
|
|
3540
3551
|
background-position: center;
|
|
3541
|
-
`)}),t.jsxs("div",{css:Sn,children:[t.jsxs("div",{className:"ds-base-map-title-container",children:[t.jsx("p",{className:"ds-base-map-title",children:e.label}),e.active?t.jsx(Zt,{label:"Active",variant:"warning",size:"small",icon:t.jsx(C,{})}):null]}),t.jsx("p",{className:"ds-base-map-caption",children:e.caption}),e.active&&e.children?t.jsx("div",{className:"ds-base-map-children",children:e.children}):null]})]},e.label);var n}))}):null]})]})})},exports.Breadcrumb=({links:r,separator:o,maxItems:i=99,linkRouter:a})=>{const[s,l]=n.useState(r.length>i);n.useEffect((()=>{l(r.length>i)}),[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:
|
|
3552
|
+
`)}),t.jsxs("div",{css:Sn,children:[t.jsxs("div",{className:"ds-base-map-title-container",children:[t.jsx("p",{className:"ds-base-map-title",children:e.label}),e.active?t.jsx(Zt,{label:"Active",variant:"warning",size:"small",icon:t.jsx(C,{})}):null]}),t.jsx("p",{className:"ds-base-map-caption",children:e.caption}),e.active&&e.children?t.jsx("div",{className:"ds-base-map-children",children:e.children}):null]})]},e.label);var n}))}):null]})]})})},exports.Breadcrumb=({links:r,separator:o,maxItems:i=99,linkRouter:a})=>{const[s,l]=n.useState(r.length>i);n.useEffect((()=>{l(r.length>i)}),[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:Rh,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:Oh,children:o||t.jsx($,{rotate:"270"})}),t.jsx("li",{className:"chakra-breadcrumb__item",children:t.jsx("button",{css:Lh,type:"button",onClick:()=>l(!1),children:"..."})}),t.jsx(e.Breadcrumb.Separator,{css:Oh,children:o||t.jsx($,{rotate:"270"})}),t.jsx(e.Breadcrumb.Item,{css:Rh,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(((i,a)=>i?.label?t.jsxs(n.Fragment,{children:[t.jsx(e.Breadcrumb.Item,{css:Rh,children:a<r.length-1?t.jsxs(c,{to:i.link,href:i.link,children:[i.icon,i.label]}):t.jsxs("p",{"aria-current":"page","aria-label":i.label,children:[i.label&&i.icon?i.icon:"",i.label]})}),a<r.length-1?t.jsx(e.Breadcrumb.Separator,{css:Oh,children:o||t.jsx($,{rotate:"270"})}):null]},i.label):null))})})},exports.Button=b,exports.Checkbox=Re,exports.CheckboxList=({label:o,caption:i,checkboxes:a,defaultValue:s,onCheckedChange:l,errorMessage:c,horizontal:u,required:d})=>{const[p,h]=n.useState(s?{[s]:!0}:{}),f=`${o}. ${i?`${i}.`:""} ${d?"Required.":"Optional"} ${c?`Error: ${c}.`:""} `;return t.jsxs(e.Group,{css:rt,"aria-label":f,children:[c?t.jsx("div",{css:st}):null,t.jsxs("div",{css:(x=!!c,r.css`
|
|
3542
3553
|
margin-left: ${x?"19px":"0px"};
|
|
3543
3554
|
`),children:[t.jsxs("p",{css:ot,"aria-label":o,children:[d&&t.jsx("span",{"aria-label":"required",children:"*"}),o]}),t.jsx("p",{css:it,"aria-label":i,children:i}),c?t.jsx("p",{css:lt,"aria-label":c,children:c}):null,t.jsx("div",{css:at(u),children:a.map((e=>t.jsx(Re,{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:o,onValueChange:i})=>t.jsx(e.CheckboxGroup,{defaultValue:n,onValueChange:i,children:t.jsx(e.HStack,{alignItems:"flex-start",flexWrap:"wrap",gap:"12px",children:o.map((o=>{return t.jsxs(e.CheckboxCard.Root,{css:Oe,defaultChecked:-1!==n?.indexOf(o.value),disabled:o.disabled,value:o.value,children:[t.jsx(e.CheckboxCard.HiddenInput,{}),t.jsxs(e.CheckboxCard.Control,{css:Le,children:[t.jsxs(e.CheckboxCard.Content,{css:(a=o.variant,r.css`
|
|
3544
3555
|
width: 100%;
|
|
@@ -3553,13 +3564,13 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3553
3564
|
padding: 0px;
|
|
3554
3565
|
padding-top: 8px;
|
|
3555
3566
|
color: ${i?h("neutral",500):"inherit"};
|
|
3556
|
-
`),children:o.children}):null]},`${o.label}-${o.value}`);var i,a}))})}),exports.CloseButton=ae,exports.ClusterPoint=({onClick:e,triggerRef:t,showFocusState:n,count:r,mode:i,variant:a="cluster"})=>o.jsx(Rn,{count:r,mode:i,onClick:e,ref:t,showFocusState:n,variant:a}),exports.ExtendableCard=({children:n,header:r,footer:o})=>t.jsx(e.Box,{css:na,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:ra,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($,{color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]}),t.jsxs(e.Accordion.ItemContent,{children:[n,o]})]})})}),exports.Footer=({children:e,label:n="© World Resources Institute",fixed:r,filled:o,maxWidth:i})=>{const a=(new Date).getFullYear();return t.jsx("footer",{css:Lh(r,o),children:t.jsxs("div",{css:Th(i),children:[t.jsx("div",{children:t.jsx(D,{height:"32px",width:"91px"})}),t.jsx("div",{css:Ph,children:e}),t.jsx("div",{children:t.jsxs("p",{css:Mh,children:[n," ",a]})})]})})},exports.IconButton=ie,exports.InlineMessage=({label:e,caption:n,variant:r,size:o="large",icon:i=t.jsx(k,{height:"16px",width:"16px"}),onActionClick:a,actionLabel:s,isButtonRight:l})=>{let c=Df;return"info-grey"===r?c=If:"success"===r?c=Vf:"warning"===r?c=Nf:"error"===r&&(c=Af),t.jsxs("div",{css:[Tf(o,l),c],"aria-roledescription":"Note",children:[t.jsxs("div",{children:[t.jsxs("div",{css:Pf,children:[i,t.jsx("p",{css:Mf(o),children:e})]}),t.jsx("p",{css:_f(o),children:n})]}),s?t.jsx(b,{label:s,variant:"info-white"===r||"info-grey"===r?"primary":"secondary",size:"large"===o?"default":"small",onClick:a}):null]})},exports.InputWithUnits=({label:r,caption:o,errorMessage:i,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:ct,children:[i?t.jsx("div",{css:pt}):null,t.jsxs("div",{style:{marginLeft:i?"19px":"0px"},children:[t.jsxs("p",{css:ut(p),"aria-label":r,children:[d?t.jsx("span",{children:"*"}):null,r]}),t.jsx("p",{css:dt(p),"aria-label":o,children:o}),i?t.jsx("p",{css:ht,"aria-label":i,children:i}):null,t.jsxs(e.Group,{css:ft(!!i,s),attached:!0,children:["start"===s?t.jsx(qt,{placeholder:"",value:x,items:a,disabled:p,onChange:e=>{g(e),v(e?.[0],!0)}}):null,t.jsx(wt,{type:"number",value:h,disabled:p,onChange:e=>{f(e.target.value),v(e.target.value)}}),"end"===s?t.jsx(qt,{placeholder:"",value:x,items:a,disabled:p,onChange:e=>{g(e),v(e?.[0],!0)}}):null]})]})]})},exports.ItemCount=Mi,exports.LayerGroup=({label:r,caption:o,value:i,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 o={...l,[e]:t};c(o),n&&n(e,t,r)},p=Object.values(l).filter((e=>!0===e)).length,h=`${r}, ${p} Active layers on the map${o?`, ${o}`:""}`;return t.jsxs(e.Accordion.Item,{value:i,width:"100%",children:[t.jsxs(e.Accordion.ItemTrigger,{css:Go,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:qo,children:[r,t.jsx(Zt,{label:`${p} Active`,size:"small",variant:p>0?"success":"info-grey"})]}),t.jsx("div",{css:Uo,children:o})]}),t.jsx(e.Accordion.ItemIndicator,{display:"flex",children:t.jsx($,{color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]}),t.jsx(e.Accordion.ItemContent,{paddingLeft:"16px",paddingRight:"16px",children:t.jsx(We,{name:r,defaultValue:u,customGap:"0px",onChange:(e,t)=>d(e,!!t,s,t),children:a.map((e=>t.jsx(ei,{...e,onChange:(t,n)=>d(t,n,e.onChange)},e.label)))})})]})},exports.LayerGroupContainer=({children:n,defaultValue:r,...o})=>t.jsx("div",{css:Wo,style:{width:"100%"},children:t.jsx(e.Accordion.Root,{css:{},defaultValue:r,multiple:!0,...o,children:n})}),exports.LayerItem=ei,exports.LayerParameters=({label:r,children:o,openedByDefault:i})=>t.jsx("div",{children:t.jsx(e.Accordion.Root,{defaultValue:i?[r]:[],multiple:!0,children:t.jsxs(e.Accordion.Item,{css:ti,value:r,children:[t.jsxs(e.Accordion.ItemTrigger,{css:ni,children:[t.jsx(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:t.jsx("p",{css:ri,children:r})}),t.jsx(e.Accordion.ItemIndicator,{display:"flex",children:t.jsx($,{color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]}),t.jsx(e.Accordion.ItemContent,{css:oi,children:n.Children.map(o,(e=>t.jsx("div",{className:"ds-layer-parameters-item-child",children:e})))})]})})}),exports.LegendItem=({layerName:e,dataUnit:n,onDrag:r,onUpClick:o,onDownClick:i,onRemoveClick:a,children:s,onInfoClick:l,onOpacityChanged:c})=>t.jsxs("div",{css:ii,children:[t.jsxs("div",{css:ai,children:[t.jsx(ie,{icon:t.jsx(T,{}),"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(ie,{icon:t.jsx($,{rotate:"180"}),"aria-label":"Up",onClick:o}),t.jsx(ie,{icon:t.jsx($,{}),"aria-label":"Down",onClick:i})]})]}),t.jsxs("div",{style:{width:"100%"},children:[t.jsxs("div",{css:si,children:[t.jsxs("div",{children:[t.jsx("h3",{css:li,children:e}),t.jsx("p",{css:ci,children:n})]}),t.jsx(b,{label:"Remove",size:"small",variant:"secondary",rightIcon:t.jsx(E,{}),onClick:a})]}),s,t.jsxs("div",{css:ui,children:[t.jsx(b,{label:"About data",size:"small",variant:"secondary",leftIcon:t.jsx(k,{}),onClick:l}),t.jsx(xi,{defaultValue:80,onOpacityChanged:c})]})]})]}),exports.List=({items:n,noBorder:r})=>t.jsx(e.Box,{css:_i(r),children:n.map((e=>t.jsx(Bi,{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.MapControlsToolbar=({onZoomInClick:e,onZoomOutClick:t,onExpandClick:n,onShareClick:r,onPrintClick:i,onSettingsClick:a,onQuestionClick:s,vertical:l,expanded:c,showExpandedToggle:u,ariaLabel:d})=>{const p=[{icon:o.jsx(V,{}),label:"Zoom in",ariaLabel:"zoom in",onClick:e},{icon:o.jsx(N,{}),label:"Zoom out",ariaLabel:"zoom out",onClick:t,gap:!0},{icon:o.jsx(A,{}),label:"Expand",ariaLabel:"expand",onClick:n,gap:!0},{icon:o.jsx(z,{}),label:"Share",ariaLabel:"share",onClick:r,gap:!0},{icon:o.jsx(B,{}),label:"Print",ariaLabel:"print",onClick:i,gap:!0},{icon:o.jsx(H,{}),label:"Settings",ariaLabel:"settings",onClick:a,gap:!0},{icon:o.jsx(F,{}),label:"Help",ariaLabel:"question",onClick:s}];return o.jsx(he,{items:p,vertical:l,expanded:c,showExpandedToggle:u,ariaLabel:d||"Map controls toolbar"})},exports.MapMarker=Rn,exports.MapMarkers=On,exports.MapPopUp=({open:e,onOpenChange:r,anchorRef:o,header:i,content:a,footer:s,placement:c="bottom",offset:u=30,closeOnEscape:d=!0,closeOnOutsideClick:p=!1})=>{const h=n.useRef(null),{refs:f,floatingStyles:x,context:g,middlewareData:v,placement:m}=Io({open:e,onOpenChange:r,placement:c,whileElementsMounted:ro,middleware:[go(u),(b={fallbackAxisSideDirection:"start"},{...ao(b),options:[b,y]}),vo({padding:8}),mo({element:h})]});var b,y;n.useEffect((()=>{o?.current&&f.setReference(o.current)}),[o,f]);const w=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:a=!0,escapeKey:s=!0,outsidePress:c=!0,outsidePressEvent:u="pointerdown",referencePress:d=!1,referencePressEvent:p="pointerdown",ancestorScroll:h=!1,bubbles:f,capture:x}=t,g=To(),v=Ir("function"==typeof c?c:()=>!1),m="function"==typeof c?v:c,b=l.useRef(!1),{escapeKey:y,outsidePress:w}=_o(f),{escapeKey:C,outsidePress:j}=_o(x),k=l.useRef(!1),$=Ir((e=>{var t;if(!n||!a||!s||"Escape"!==e.key)return;if(k.current)return;const o=null==(t=i.current.floatingContext)?void 0:t.nodeId,l=g?Mr(g.nodesRef.current,o):[];if(!y&&(e.stopPropagation(),l.length>0)){let e=!0;if(l.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__escapeKeyBubbles||(e=!1)})),!e)return}r(!1,function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e,"escape-key")})),S=Ir((e=>{var t;const n=()=>{var t;$(e),null==(t=Lr(e))||t.removeEventListener("keydown",n)};null==(t=Lr(e))||t.addEventListener("keydown",n)})),E=Ir((e=>{var t;const n=i.current.insideReactTree;i.current.insideReactTree=!1;const a=b.current;if(b.current=!1,"click"===u&&a)return;if(n)return;if("function"==typeof m&&!m(e))return;const s=Lr(e),l="[data-floating-ui-inert]",c=Pr(o.floating).querySelectorAll(l);let d=Dn(s)?s:null;for(;d&&!Yn(d);){const e=Qn(d);if(Yn(e)||!Dn(e))break;d=e}if(c.length&&Dn(s)&&!s.matches("html,body")&&!Or(s,o.floating)&&Array.from(c).every((e=>!Or(d,e))))return;if(In(s)&&L){const t=Yn(s),n=Kn(s),r=/auto|scroll/,o=t||r.test(n.overflowX),i=t||r.test(n.overflowY),a=o&&s.clientWidth>0&&s.scrollWidth>s.clientWidth,l=i&&s.clientHeight>0&&s.scrollHeight>s.clientHeight,c="rtl"===n.direction,u=l&&(c?e.offsetX<=s.offsetWidth-s.clientWidth:e.offsetX>s.clientWidth),d=a&&e.offsetY>s.clientHeight;if(u||d)return}const p=null==(t=i.current.floatingContext)?void 0:t.nodeId,h=g&&Mr(g.nodesRef.current,p).some((t=>{var n;return Tr(e,null==(n=t.context)?void 0:n.elements.floating)}));if(Tr(e,o.floating)||Tr(e,o.domReference)||h)return;const f=g?Mr(g.nodesRef.current,p):[];if(f.length>0){let e=!0;if(f.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__outsidePressBubbles||(e=!1)})),!e)return}r(!1,e,"outside-press")})),R=Ir((e=>{var t;const n=()=>{var t;E(e),null==(t=Lr(e))||t.removeEventListener(u,n)};null==(t=Lr(e))||t.addEventListener(u,n)}));l.useEffect((()=>{if(!n||!a)return;i.current.__escapeKeyBubbles=y,i.current.__outsidePressBubbles=w;let e=-1;function t(e){r(!1,e,"ancestor-scroll")}function l(){window.clearTimeout(e),k.current=!0}function c(){e=window.setTimeout((()=>{k.current=!1}),Un()?5:0)}const d=Pr(o.floating);s&&(d.addEventListener("keydown",C?S:$,C),d.addEventListener("compositionstart",l),d.addEventListener("compositionend",c)),m&&d.addEventListener(u,j?R:E,j);let p=[];return h&&(Dn(o.domReference)&&(p=tr(o.domReference)),Dn(o.floating)&&(p=p.concat(tr(o.floating))),!Dn(o.reference)&&o.reference&&o.reference.contextElement&&(p=p.concat(tr(o.reference.contextElement)))),p=p.filter((e=>{var t;return e!==(null==(t=d.defaultView)?void 0:t.visualViewport)})),p.forEach((e=>{e.addEventListener("scroll",t,{passive:!0})})),()=>{s&&(d.removeEventListener("keydown",C?S:$,C),d.removeEventListener("compositionstart",l),d.removeEventListener("compositionend",c)),m&&d.removeEventListener(u,j?R:E,j),p.forEach((e=>{e.removeEventListener("scroll",t)})),window.clearTimeout(e)}}),[i,o,s,m,u,n,r,h,a,y,w,$,C,S,E,j,R]),l.useEffect((()=>{i.current.insideReactTree=!1}),[i,m,u]);const O=l.useMemo((()=>({onKeyDown:$,...d&&{[Po[p]]:e=>{r(!1,e.nativeEvent,"reference-press")},..."click"!==p&&{onClick(e){r(!1,e.nativeEvent,"reference-press")}}}})),[$,r,d,p]),L=l.useMemo((()=>({onKeyDown:$,onMouseDown(){b.current=!0},onMouseUp(){b.current=!0},[Mo[u]]:()=>{i.current.insideReactTree=!0}})),[$,u,i]);return l.useMemo((()=>a?{reference:O,floating:L}:{}),[a,O,L])}(g,{escapeKey:d,outsidePress:p}),C=Ao(g,{role:"dialog"}),{getFloatingProps:j}=function(e){void 0===e&&(e=[]);const t=e.map((e=>null==e?void 0:e.reference)),n=e.map((e=>null==e?void 0:e.floating)),r=e.map((e=>null==e?void 0:e.item)),o=l.useCallback((t=>Vo(t,e,"reference")),t),i=l.useCallback((t=>Vo(t,e,"floating")),n),a=l.useCallback((t=>Vo(t,e,"item")),r);return l.useMemo((()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a})),[o,i,a])}([w,C]),{x:k,y:$}=v.arrow??{x:null,y:null},S={top:"bottom",right:"left",bottom:"top",left:"right"}[m.split("-")[0]];if(!e)return null;let E=u-1,R=4;return"left"!==S&&"right"!==S||(E=4,R=u-1),t.jsxs(t.Fragment,{children:[t.jsxs("div",{ref:f.setFloating,style:x,"aria-modal":!0,...j(),css:zo,children:[t.jsxs("div",{css:Bo,children:[i,t.jsx(ae,{onClick:()=>r(!1),className:"ds-map-pop-up-close-button","aria-label":"Close"})]}),t.jsx("div",{css:Ho,children:a}),s?t.jsx("div",{css:Fo,children:s}):null,t.jsx("div",{ref:h,css:Zo(E,R,k,$,S,u)})]}),t.jsx("div",{className:"fixed inset-0 z-[999] bg-black/20 backdrop-blur-[1px]",onClick:()=>p&&r(!1)})]})},exports.Menu=we,exports.MobileTabBar=({defaultValue:r,tabs:o,onTabClick:i,hideLabels:a,activationMode:s="manual"})=>{const l=o.length,[c,u]=n.useState((()=>Nh(o,r)));return t.jsx("div",{css:_h,children:t.jsx(e.Tabs.Root,{width:"full",defaultValue:r||o?.[0]?.value,onValueChange:({value:e})=>(e=>{const t=Nh(o,e);u(t),i&&i(e)})(e),activationMode:s,children:t.jsx(e.Tabs.List,{alignItems:"center",border:"none",children:o.map(((n,r)=>{const{label:o,icon:i,bagdeCount:s,"aria-label":u,"aria-describedby":d,disabled:p,...h}=n,f=`${n.value}-str-status`,x=[`tab ${r+1} of ${l}`,c===r?"selected":"not selected"];p&&x.push("disabled");const g=[d,f].filter(Boolean).join(" ")||void 0;return t.jsxs(e.Tabs.Trigger,{css:Dh,"aria-label":u||o,"aria-disabled":!!p||void 0,"aria-describedby":g,disabled:p,...h,children:[t.jsxs("div",{css:Ih,children:[i,s?t.jsx("div",{css:Vh,className:"ds-badge-count",children:s}):null]}),a?null:t.jsx("p",{children:o}),t.jsx(e.VisuallyHidden,{id:f,children:x.join(", ")})]},n.value)}))})})})},exports.Modal=({header:n,content:r,footer:o,size:i="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(is,{disabled:!a,children:t.jsx(e.Dialog.Positioner,{children:t.jsxs(e.Dialog.Content,{css:as(i),children:[t.jsxs(e.Dialog.Header,{css:ss,children:[n,s?null:t.jsx(e.Dialog.CloseTrigger,{css:ls,asChild:!0,children:t.jsx(ae,{})})]}),t.jsx(e.Dialog.Body,{css:cs,children:r}),o?t.jsx(e.Dialog.Footer,{padding:"12px",children:o}):null]})})})]})}):null,exports.MultiActionButton=({variant:r="primary",size:o="default",mainActionLabel:i,mainActionOnClick:a=()=>{},otherActions:s=[],disabled:l,...c})=>{const[u,d]=n.useState(!1),p=l?`${i} action button with menu, disabled`:void 0;return t.jsxs(e.Group,{css:$e,attached:!0,tabIndex:l?0:void 0,"aria-disabled":l,"aria-label":p,role:"group",children:[t.jsx(b,{css:{},label:i,variant:r,size:o,onClick:a,disabled:l,...c}),t.jsxs(e.Menu.Root,{onOpenChange:({open:e})=>d(e),positioning:{placement:"bottom-end"},children:[t.jsx(e.Menu.Trigger,{css:je(r),"data-group-item":!0,"data-last":!0,asChild:!0,children:t.jsx(b,{variant:r,size:o,leftIcon:t.jsx($,{rotate:u?"180":"0",color:h("accessible","text-on-primary-mids")||h("primary",900)}),disabled:l})}),t.jsx(Se,{children:s.map((({label:n,value:r,onClick:i})=>t.jsx(e.Menu.Item,{css:ke(o),onClick:i,value:r,children:n},r)))})]})]})},exports.Navbar=({logo:e,linkRouter:o,pathname:i,navigationSection:a,utilitySection:s,actionsSection:l,maxWidth:c,fixed:u,onNavbarHeightChange:d})=>{const p=n.useRef(null),f=n.useRef(null),x=n.useRef(null),[g,v]=n.useState(!1),[m,y]=n.useState(-1),[w,C]=n.useState("undefined"!=typeof window&&window?.innerWidth<=sf),[j,k]=n.useState(!1),$=o,S=n.useCallback((()=>{if(f.current&&p.current&&x.current){const e=p.current.getBoundingClientRect(),t=f.current.getBoundingClientRect(),n=x.current.getBoundingClientRect();t.width,e.width,window.innerWidth<=sf||window.innerWidth<=m?(d?.(96),v(!0)):window.innerWidth>sf&&window.innerWidth<=1440?e.right>=t.left?(d?.(96),v(!0),y(window.innerWidth)):window.innerWidth>m&&(d?.(48),v(!1),y(-1)):(d?.(48),v(!1),y(-1)),g&&(window.innerWidth<=sf||n.right>=t.left?(C(!0),d?.(48)):(C(!1),d?.(96)))}}),[m,g]);return n.useEffect((()=>(S(),window.addEventListener("resize",S),()=>{window.removeEventListener("resize",S)})),[S]),t.jsxs("nav",{css:Ah(g&&!w,u),children:[t.jsxs("div",{css:Bh(g&&!w,c),children:[t.jsxs("div",{css:(R=g&&!w,r.css`
|
|
3567
|
+
`),children:o.children}):null]},`${o.label}-${o.value}`);var i,a}))})}),exports.CloseButton=ae,exports.ClusterPoint=({onClick:e,triggerRef:t,showFocusState:n,count:r,mode:i,variant:a="cluster"})=>o.jsx(Rn,{count:r,mode:i,onClick:e,ref:t,showFocusState:n,variant:a}),exports.ExtendableCard=({children:n,header:r,footer:o})=>t.jsx(e.Box,{css:ra,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:oa,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($,{color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]}),t.jsxs(e.Accordion.ItemContent,{children:[n,o]})]})})}),exports.Footer=({children:e,label:n="© World Resources Institute",fixed:r,filled:o,maxWidth:i})=>{const a=(new Date).getFullYear();return t.jsx("footer",{css:Th(r,o),children:t.jsxs("div",{css:Ph(i),children:[t.jsx("div",{children:t.jsx(D,{height:"32px",width:"91px"})}),t.jsx("div",{css:Mh,children:e}),t.jsx("div",{children:t.jsxs("p",{css:_h,children:[n," ",a]})})]})})},exports.IconButton=ie,exports.InlineMessage=({label:e,caption:n,variant:r,size:o="large",icon:i=t.jsx(k,{height:"16px",width:"16px"}),onActionClick:a,actionLabel:s,isButtonRight:l})=>{let c=If;return"info-grey"===r?c=Vf:"success"===r?c=Nf:"warning"===r?c=Af:"error"===r&&(c=zf),t.jsxs("div",{css:[Pf(o,l),c],"aria-roledescription":"Note",children:[t.jsxs("div",{children:[t.jsxs("div",{css:Mf,children:[i,t.jsx("p",{css:_f(o),children:e})]}),t.jsx("p",{css:Df(o),children:n})]}),s?t.jsx(b,{label:s,variant:"info-white"===r||"info-grey"===r?"primary":"secondary",size:"large"===o?"default":"small",onClick:a}):null]})},exports.InputWithUnits=({label:r,caption:o,errorMessage:i,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:ct,children:[i?t.jsx("div",{css:pt}):null,t.jsxs("div",{style:{marginLeft:i?"19px":"0px"},children:[t.jsxs("p",{css:ut(p),"aria-label":r,children:[d?t.jsx("span",{children:"*"}):null,r]}),t.jsx("p",{css:dt(p),"aria-label":o,children:o}),i?t.jsx("p",{css:ht,"aria-label":i,children:i}):null,t.jsxs(e.Group,{css:ft(!!i,s),attached:!0,children:["start"===s?t.jsx(qt,{placeholder:"",value:x,items:a,disabled:p,onChange:e=>{g(e),v(e?.[0],!0)}}):null,t.jsx(wt,{type:"number",value:h,disabled:p,onChange:e=>{f(e.target.value),v(e.target.value)}}),"end"===s?t.jsx(qt,{placeholder:"",value:x,items:a,disabled:p,onChange:e=>{g(e),v(e?.[0],!0)}}):null]})]})]})},exports.ItemCount=Mi,exports.LayerGroup=({label:r,caption:o,value:i,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 o={...l,[e]:t};c(o),n&&n(e,t,r)},p=Object.values(l).filter((e=>!0===e)).length,h=`${r}, ${p} Active layers on the map${o?`, ${o}`:""}`;return t.jsxs(e.Accordion.Item,{value:i,width:"100%",children:[t.jsxs(e.Accordion.ItemTrigger,{css:Go,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:qo,children:[r,t.jsx(Zt,{label:`${p} Active`,size:"small",variant:p>0?"success":"info-grey"})]}),t.jsx("div",{css:Uo,children:o})]}),t.jsx(e.Accordion.ItemIndicator,{display:"flex",children:t.jsx($,{color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]}),t.jsx(e.Accordion.ItemContent,{paddingLeft:"16px",paddingRight:"16px",children:t.jsx(We,{name:r,defaultValue:u,customGap:"0px",onChange:(e,t)=>d(e,!!t,s,t),children:a.map((e=>t.jsx(ei,{...e,onChange:(t,n)=>d(t,n,e.onChange)},e.label)))})})]})},exports.LayerGroupContainer=({children:n,defaultValue:r,...o})=>t.jsx("div",{css:Wo,style:{width:"100%"},children:t.jsx(e.Accordion.Root,{css:{},defaultValue:r,multiple:!0,...o,children:n})}),exports.LayerItem=ei,exports.LayerParameters=({label:r,children:o,openedByDefault:i})=>t.jsx("div",{children:t.jsx(e.Accordion.Root,{defaultValue:i?[r]:[],multiple:!0,children:t.jsxs(e.Accordion.Item,{css:ti,value:r,children:[t.jsxs(e.Accordion.ItemTrigger,{css:ni,children:[t.jsx(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:t.jsx("p",{css:ri,children:r})}),t.jsx(e.Accordion.ItemIndicator,{display:"flex",children:t.jsx($,{color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]}),t.jsx(e.Accordion.ItemContent,{css:oi,children:n.Children.map(o,(e=>t.jsx("div",{className:"ds-layer-parameters-item-child",children:e})))})]})})}),exports.LegendItem=({layerName:e,dataUnit:n,onDrag:r,onUpClick:o,onDownClick:i,onRemoveClick:a,children:s,onInfoClick:l,onOpacityChanged:c})=>t.jsxs("div",{css:ii,children:[t.jsxs("div",{css:ai,children:[t.jsx(ie,{icon:t.jsx(T,{}),"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(ie,{icon:t.jsx($,{rotate:"180"}),"aria-label":"Up",onClick:o}),t.jsx(ie,{icon:t.jsx($,{}),"aria-label":"Down",onClick:i})]})]}),t.jsxs("div",{style:{width:"100%"},children:[t.jsxs("div",{css:si,children:[t.jsxs("div",{children:[t.jsx("h3",{css:li,children:e}),t.jsx("p",{css:ci,children:n})]}),t.jsx(b,{label:"Remove",size:"small",variant:"secondary",rightIcon:t.jsx(E,{}),onClick:a})]}),s,t.jsxs("div",{css:ui,children:[t.jsx(b,{label:"About data",size:"small",variant:"secondary",leftIcon:t.jsx(k,{}),onClick:l}),t.jsx(xi,{defaultValue:80,onOpacityChanged:c})]})]})]}),exports.List=({items:n,noBorder:r})=>t.jsx(e.Box,{css:_i(r),children:n.map((e=>t.jsx(Bi,{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.MapControlsToolbar=({onZoomInClick:e,onZoomOutClick:t,onExpandClick:n,onShareClick:r,onPrintClick:i,onSettingsClick:a,onQuestionClick:s,vertical:l,expanded:c,showExpandedToggle:u,ariaLabel:d})=>{const p=[{icon:o.jsx(V,{}),label:"Zoom in",ariaLabel:"zoom in",onClick:e},{icon:o.jsx(N,{}),label:"Zoom out",ariaLabel:"zoom out",onClick:t,gap:!0},{icon:o.jsx(A,{}),label:"Expand",ariaLabel:"expand",onClick:n,gap:!0},{icon:o.jsx(z,{}),label:"Share",ariaLabel:"share",onClick:r,gap:!0},{icon:o.jsx(B,{}),label:"Print",ariaLabel:"print",onClick:i,gap:!0},{icon:o.jsx(H,{}),label:"Settings",ariaLabel:"settings",onClick:a,gap:!0},{icon:o.jsx(F,{}),label:"Help",ariaLabel:"question",onClick:s}];return o.jsx(he,{items:p,vertical:l,expanded:c,showExpandedToggle:u,ariaLabel:d||"Map controls toolbar"})},exports.MapMarker=Rn,exports.MapMarkers=On,exports.MapPopUp=({open:e,onOpenChange:r,anchorRef:o,header:i,content:a,footer:s,placement:c="bottom",offset:u=30,closeOnEscape:d=!0,closeOnOutsideClick:p=!1})=>{const h=n.useRef(null),{refs:f,floatingStyles:x,context:g,middlewareData:v,placement:m}=Io({open:e,onOpenChange:r,placement:c,whileElementsMounted:ro,middleware:[go(u),(b={fallbackAxisSideDirection:"start"},{...ao(b),options:[b,y]}),vo({padding:8}),mo({element:h})]});var b,y;n.useEffect((()=>{o?.current&&f.setReference(o.current)}),[o,f]);const w=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:a=!0,escapeKey:s=!0,outsidePress:c=!0,outsidePressEvent:u="pointerdown",referencePress:d=!1,referencePressEvent:p="pointerdown",ancestorScroll:h=!1,bubbles:f,capture:x}=t,g=To(),v=Ir("function"==typeof c?c:()=>!1),m="function"==typeof c?v:c,b=l.useRef(!1),{escapeKey:y,outsidePress:w}=_o(f),{escapeKey:C,outsidePress:j}=_o(x),k=l.useRef(!1),$=Ir((e=>{var t;if(!n||!a||!s||"Escape"!==e.key)return;if(k.current)return;const o=null==(t=i.current.floatingContext)?void 0:t.nodeId,l=g?Mr(g.nodesRef.current,o):[];if(!y&&(e.stopPropagation(),l.length>0)){let e=!0;if(l.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__escapeKeyBubbles||(e=!1)})),!e)return}r(!1,function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e,"escape-key")})),S=Ir((e=>{var t;const n=()=>{var t;$(e),null==(t=Lr(e))||t.removeEventListener("keydown",n)};null==(t=Lr(e))||t.addEventListener("keydown",n)})),E=Ir((e=>{var t;const n=i.current.insideReactTree;i.current.insideReactTree=!1;const a=b.current;if(b.current=!1,"click"===u&&a)return;if(n)return;if("function"==typeof m&&!m(e))return;const s=Lr(e),l="[data-floating-ui-inert]",c=Pr(o.floating).querySelectorAll(l);let d=Dn(s)?s:null;for(;d&&!Yn(d);){const e=Qn(d);if(Yn(e)||!Dn(e))break;d=e}if(c.length&&Dn(s)&&!s.matches("html,body")&&!Or(s,o.floating)&&Array.from(c).every((e=>!Or(d,e))))return;if(In(s)&&L){const t=Yn(s),n=Kn(s),r=/auto|scroll/,o=t||r.test(n.overflowX),i=t||r.test(n.overflowY),a=o&&s.clientWidth>0&&s.scrollWidth>s.clientWidth,l=i&&s.clientHeight>0&&s.scrollHeight>s.clientHeight,c="rtl"===n.direction,u=l&&(c?e.offsetX<=s.offsetWidth-s.clientWidth:e.offsetX>s.clientWidth),d=a&&e.offsetY>s.clientHeight;if(u||d)return}const p=null==(t=i.current.floatingContext)?void 0:t.nodeId,h=g&&Mr(g.nodesRef.current,p).some((t=>{var n;return Tr(e,null==(n=t.context)?void 0:n.elements.floating)}));if(Tr(e,o.floating)||Tr(e,o.domReference)||h)return;const f=g?Mr(g.nodesRef.current,p):[];if(f.length>0){let e=!0;if(f.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__outsidePressBubbles||(e=!1)})),!e)return}r(!1,e,"outside-press")})),R=Ir((e=>{var t;const n=()=>{var t;E(e),null==(t=Lr(e))||t.removeEventListener(u,n)};null==(t=Lr(e))||t.addEventListener(u,n)}));l.useEffect((()=>{if(!n||!a)return;i.current.__escapeKeyBubbles=y,i.current.__outsidePressBubbles=w;let e=-1;function t(e){r(!1,e,"ancestor-scroll")}function l(){window.clearTimeout(e),k.current=!0}function c(){e=window.setTimeout((()=>{k.current=!1}),Un()?5:0)}const d=Pr(o.floating);s&&(d.addEventListener("keydown",C?S:$,C),d.addEventListener("compositionstart",l),d.addEventListener("compositionend",c)),m&&d.addEventListener(u,j?R:E,j);let p=[];return h&&(Dn(o.domReference)&&(p=tr(o.domReference)),Dn(o.floating)&&(p=p.concat(tr(o.floating))),!Dn(o.reference)&&o.reference&&o.reference.contextElement&&(p=p.concat(tr(o.reference.contextElement)))),p=p.filter((e=>{var t;return e!==(null==(t=d.defaultView)?void 0:t.visualViewport)})),p.forEach((e=>{e.addEventListener("scroll",t,{passive:!0})})),()=>{s&&(d.removeEventListener("keydown",C?S:$,C),d.removeEventListener("compositionstart",l),d.removeEventListener("compositionend",c)),m&&d.removeEventListener(u,j?R:E,j),p.forEach((e=>{e.removeEventListener("scroll",t)})),window.clearTimeout(e)}}),[i,o,s,m,u,n,r,h,a,y,w,$,C,S,E,j,R]),l.useEffect((()=>{i.current.insideReactTree=!1}),[i,m,u]);const O=l.useMemo((()=>({onKeyDown:$,...d&&{[Po[p]]:e=>{r(!1,e.nativeEvent,"reference-press")},..."click"!==p&&{onClick(e){r(!1,e.nativeEvent,"reference-press")}}}})),[$,r,d,p]),L=l.useMemo((()=>({onKeyDown:$,onMouseDown(){b.current=!0},onMouseUp(){b.current=!0},[Mo[u]]:()=>{i.current.insideReactTree=!0}})),[$,u,i]);return l.useMemo((()=>a?{reference:O,floating:L}:{}),[a,O,L])}(g,{escapeKey:d,outsidePress:p}),C=Ao(g,{role:"dialog"}),{getFloatingProps:j}=function(e){void 0===e&&(e=[]);const t=e.map((e=>null==e?void 0:e.reference)),n=e.map((e=>null==e?void 0:e.floating)),r=e.map((e=>null==e?void 0:e.item)),o=l.useCallback((t=>Vo(t,e,"reference")),t),i=l.useCallback((t=>Vo(t,e,"floating")),n),a=l.useCallback((t=>Vo(t,e,"item")),r);return l.useMemo((()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a})),[o,i,a])}([w,C]),{x:k,y:$}=v.arrow??{x:null,y:null},S={top:"bottom",right:"left",bottom:"top",left:"right"}[m.split("-")[0]];if(!e)return null;let E=u-1,R=4;return"left"!==S&&"right"!==S||(E=4,R=u-1),t.jsxs(t.Fragment,{children:[t.jsxs("div",{ref:f.setFloating,style:x,"aria-modal":!0,...j(),css:zo,children:[t.jsxs("div",{css:Bo,children:[i,t.jsx(ae,{onClick:()=>r(!1),className:"ds-map-pop-up-close-button","aria-label":"Close"})]}),t.jsx("div",{css:Ho,children:a}),s?t.jsx("div",{css:Fo,children:s}):null,t.jsx("div",{ref:h,css:Zo(E,R,k,$,S,u)})]}),t.jsx("div",{className:"fixed inset-0 z-[999] bg-black/20 backdrop-blur-[1px]",onClick:()=>p&&r(!1)})]})},exports.Menu=we,exports.MobileTabBar=({defaultValue:r,tabs:o,onTabClick:i,hideLabels:a,activationMode:s="manual"})=>{const l=o.length,[c,u]=n.useState((()=>Ah(o,r)));return t.jsx("div",{css:Dh,children:t.jsx(e.Tabs.Root,{width:"full",defaultValue:r||o?.[0]?.value,onValueChange:({value:e})=>(e=>{const t=Ah(o,e);u(t),i&&i(e)})(e),activationMode:s,children:t.jsx(e.Tabs.List,{alignItems:"center",border:"none",children:o.map(((n,r)=>{const{label:o,icon:i,bagdeCount:s,"aria-label":u,"aria-describedby":d,disabled:p,...h}=n,f=`${n.value}-str-status`,x=[`tab ${r+1} of ${l}`,c===r?"selected":"not selected"];p&&x.push("disabled");const g=[d,f].filter(Boolean).join(" ")||void 0;return t.jsxs(e.Tabs.Trigger,{css:Ih,"aria-label":u||o,"aria-disabled":!!p||void 0,"aria-describedby":g,disabled:p,...h,children:[t.jsxs("div",{css:Vh,children:[i,s?t.jsx("div",{css:Nh,className:"ds-badge-count",children:s}):null]}),a?null:t.jsx("p",{children:o}),t.jsx(e.VisuallyHidden,{id:f,children:x.join(", ")})]},n.value)}))})})})},exports.Modal=({header:n,content:r,footer:o,size:i="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(as,{disabled:!a,children:t.jsx(e.Dialog.Positioner,{children:t.jsxs(e.Dialog.Content,{css:ss(i),children:[t.jsxs(e.Dialog.Header,{css:ls,children:[n,s?null:t.jsx(e.Dialog.CloseTrigger,{css:cs,asChild:!0,children:t.jsx(ae,{})})]}),t.jsx(e.Dialog.Body,{css:us,children:r}),o?t.jsx(e.Dialog.Footer,{padding:"12px",children:o}):null]})})})]})}):null,exports.MultiActionButton=({variant:r="primary",size:o="default",mainActionLabel:i,mainActionOnClick:a=()=>{},otherActions:s=[],disabled:l,...c})=>{const[u,d]=n.useState(!1),p=l?`${i} action button with menu, disabled`:void 0;return t.jsxs(e.Group,{css:$e,attached:!0,tabIndex:l?0:void 0,"aria-disabled":l,"aria-label":p,role:"group",children:[t.jsx(b,{css:{},label:i,variant:r,size:o,onClick:a,disabled:l,...c}),t.jsxs(e.Menu.Root,{onOpenChange:({open:e})=>d(e),positioning:{placement:"bottom-end"},children:[t.jsx(e.Menu.Trigger,{css:je(r),"data-group-item":!0,"data-last":!0,asChild:!0,children:t.jsx(b,{variant:r,size:o,leftIcon:t.jsx($,{rotate:u?"180":"0",color:h("accessible","text-on-primary-mids")||h("primary",900)}),disabled:l})}),t.jsx(Se,{children:s.map((({label:n,value:r,onClick:i})=>t.jsx(e.Menu.Item,{css:ke(o),onClick:i,value:r,children:n},r)))})]})]})},exports.Navbar=({logo:e,linkRouter:o,pathname:i,navigationSection:a,utilitySection:s,actionsSection:l,maxWidth:c,fixed:u,onNavbarHeightChange:d})=>{const p=n.useRef(null),f=n.useRef(null),x=n.useRef(null),[g,v]=n.useState(!1),[m,y]=n.useState(-1),[w,C]=n.useState("undefined"!=typeof window&&window?.innerWidth<=lf),[j,k]=n.useState(!1),$=o,S=n.useCallback((()=>{if(f.current&&p.current&&x.current){const e=p.current.getBoundingClientRect(),t=f.current.getBoundingClientRect(),n=x.current.getBoundingClientRect();t.width,e.width,window.innerWidth<=lf||window.innerWidth<=m?(d?.(96),v(!0)):window.innerWidth>lf&&window.innerWidth<=1440?e.right>=t.left?(d?.(96),v(!0),y(window.innerWidth)):window.innerWidth>m&&(d?.(48),v(!1),y(-1)):(d?.(48),v(!1),y(-1)),g&&(window.innerWidth<=lf||n.right>=t.left?(C(!0),d?.(48)):(C(!1),d?.(96)))}}),[m,g]);return n.useEffect((()=>(S(),window.addEventListener("resize",S),()=>{window.removeEventListener("resize",S)})),[S]),t.jsxs("nav",{css:zh(g&&!w,u),children:[t.jsxs("div",{css:Hh(g&&!w,c),children:[t.jsxs("div",{css:(R=g&&!w,r.css`
|
|
3557
3568
|
display: flex;
|
|
3558
3569
|
align-items: center;
|
|
3559
3570
|
justify-content: flex-start;
|
|
3560
3571
|
gap: 12px;
|
|
3561
3572
|
color: ${h("neutral",R?100:900)};
|
|
3562
|
-
`),ref:p,children:[e?t.jsx("div",{ref:x,css:
|
|
3573
|
+
`),ref:p,children:[e?t.jsx("div",{ref:x,css:Fh,children:e}):null,t.jsx("div",{css:Zh(g),children:a?.map((e=>e.link?t.jsx($,{to:e.link,href:e.link,css:Wh(i===e.link),children:e.label},e.label):t.jsx(we,{label:e.label,items:e.items||[]},e.label)))})]}),t.jsx("div",{css:Gh,ref:f,children:w?t.jsxs("button",{type:"button",onClick:()=>k(!j),"aria-label":"Open menu",css:Xh,children:[j?"Close":"Menu",j?t.jsx(E,{height:"16px",width:"16px"}):t.jsx(J,{height:"16px",width:"16px"})]}):t.jsxs(t.Fragment,{children:[t.jsx("div",{css:Gh,children:s?.map(((e,n)=>t.jsx("div",{css:qh(g),children:e},n)))}),l?t.jsx("div",{css:Uh(g),children:l.map((e=>t.jsx(b,{...e},e.label)))}):null]})})]}),g&&!w?t.jsx("div",{css:Bh,children:a?.map((e=>e.link?t.jsx($,{to:e.link,href:e.link,css:Wh(i===e.link),children:e.label},e.label):t.jsx(we,{label:e.label,items:e.items||[]},e.label)))}):null,w?t.jsx(sf,{navigationSection:a,utilitySection:s,actionsSection:l,linkRouter:o,isOpen:j,setIsOpen:k,pathname:i}):null]});var R},exports.NavigationRail=({tabs:r=[],defaultValue:o,onTabClick:i,children:a,onOpenChange:s})=>{const[l,c]=n.useState(!1),[u,d]=n.useState(o||r?.[0]?.value),p=e=>{d(e),i&&i(e)},[f]=e.useMediaQuery(["(max-width: 768px)"]);return f?t.jsxs(e.Tabs.Root,{defaultValue:u,onValueChange:({value:e})=>p(e),children:[t.jsx(e.Tabs.List,{style:{display:"flex",overflowX:"auto",whiteSpace:"nowrap",padding:"8px",gap:"8px"},children:r.map((n=>t.jsx(e.Tabs.Trigger,{value:n.value,css:{"--indicator-color":h("primary",500),flexShrink:0,padding:"10px 16px",color:h("neutral",600),"&[data-selected]":{color:h("neutral",800),fontWeight:600}},children:n.label},n.value)))}),r.map((n=>t.jsx(e.Tabs.Content,{value:n.value,children:a},n.value)))]}):t.jsxs("div",{style:{height:"calc(100vh - 48px - 56px)",position:"fixed",top:"48px",left:0,display:"flex"},children:[t.jsxs("div",{css:cf,children:[t.jsx(e.Tabs.Root,{defaultValue:o||r?.[0]?.value,orientation:"horizontal",width:"full",onValueChange:({value:e})=>{p(e)},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:uf,"aria-label":n["aria-label"]||n.label,...n,children:t.jsxs(e.Box,{display:"flex",alignItems:"center",flexDirection:"column",gap:"5px",className:"ds-tab-label",children:[n.icon?t.jsx("div",{css:df,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:pf,children:[t.jsx("div",{css:df,children:l?t.jsx(w,{}):t.jsx(y,{})}),t.jsxs("div",{className:"ds-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:hf,role:"tabpanel","aria-labelledby":u,children:a})})}):null]})},exports.OptionCard=({defaultValue:n,items:o,onValueChange:i})=>t.jsx(e.RadioCard.Root,{defaultValue:n,onValueChange:i,children:t.jsx(e.HStack,{alignItems:"flex-start",flexWrap:"wrap",gap:"12px",children:o.map((n=>{return t.jsxs(e.RadioCard.Item,{css:De,value:n.value,disabled:n.disabled,children:[t.jsx(e.RadioCard.ItemHiddenInput,{}),t.jsxs(e.RadioCard.ItemControl,{css:Ie,children:[t.jsxs("div",{css:(i=n.variant,r.css`
|
|
3563
3574
|
width: 100%;
|
|
3564
3575
|
display: flex;
|
|
3565
3576
|
flex-direction: ${"centered"===i?"column":"row"};
|
|
@@ -3572,7 +3583,7 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3572
3583
|
padding: 0px;
|
|
3573
3584
|
padding-top: 8px;
|
|
3574
3585
|
color: ${o?h("neutral",500):"inherit"};
|
|
3575
|
-
`),children:n.children}):null]},`${n.label}-${n.value}`);var o,i}))})}),exports.Pagination=Gi,exports.Panel=({header:e,content:r,footer:o,variant:i="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,o]);return t.jsxs("div",{css:[
|
|
3586
|
+
`),children:n.children}):null]},`${n.label}-${n.value}`);var o,i}))})}),exports.Pagination=Gi,exports.Panel=({header:e,content:r,footer:o,variant:i="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,o]);return t.jsxs("div",{css:[ds(a),"fixed"===i?ps:hs],children:[e?t.jsx("div",{css:fs,ref:d,children:e}):null,t.jsx("div",{css:xs(s,c),children:r}),o?t.jsx("div",{css:gs,ref:p,children:o}):null]})},exports.Password=({label:e,caption:o,required:i,disabledRules:a,onChange:s,minLength:l=8,hideValidations:c})=>{const[u,d]=n.useState(!1),[p,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:Ut,children:[t.jsxs("p",{css:Xt,"aria-label":e,children:[i?t.jsx("span",{children:"*"}):null,e]}),t.jsx("p",{css:Yt,"aria-label":o,children:o}),t.jsxs("div",{css:Kt,children:[t.jsx(wt,{type:u?"text":"password",value:p,"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(b,{label:u?"Hide":"Show",variant:"secondary",leftIcon:u?t.jsx(L,{}):t.jsx(O,{}),"aria-label":u?"Hide password":"Show password",onClick:()=>d(!u),type:"button"})]}),p&&!c?t.jsxs("div",{id:"password-guidelines",css:Jt,"aria-live":"polite",children:[t.jsxs("p",{css:(v=x.strength,r.css`
|
|
3576
3587
|
font-size: 16px;
|
|
3577
3588
|
line-height: 24px;
|
|
3578
3589
|
font-weight: 400;
|
|
@@ -3583,7 +3594,7 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3583
3594
|
font-weight: 700;
|
|
3584
3595
|
color: ${h("Medium"===v?"warning":"Strong"===v||"Very Strong"===v?"success":"error",900)};
|
|
3585
3596
|
}
|
|
3586
|
-
`),"aria-live":"polite",role:"status",children:["Password Strength: ",t.jsx("span",{children:x.strength})]}),t.jsx("div",{css:Qt(x.strength),children:t.jsx("div",{})}),t.jsxs("div",{css:en(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(C,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(E,{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:en(x.uppercase),"aria-label":"Use an uppercase letter. "+(x.uppercase?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.uppercase?t.jsx(C,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(E,{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:en(x.lowercase),"aria-label":"Use a lowercase letter. "+(x.lowercase?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.lowercase?t.jsx(C,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(E,{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:en(x.numbers),"aria-label":"Use a number. "+(x.numbers?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.numbers?t.jsx(C,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(E,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsx("p",{children:"Use a number"})]}),a?.specialCharacters?null:t.jsxs("div",{css:en(x.specialCharacters),"aria-label":"Use a special character. "+(x.specialCharacters?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.specialCharacters?t.jsx(C,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(E,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsx("p",{children:"Use a special character"})]})]}):null]});var v},exports.ProgressBar=({progress:e})=>{let n=e;return n>100&&(n=100),n<0&&(n=0),t.jsx("div",{css:
|
|
3597
|
+
`),"aria-live":"polite",role:"status",children:["Password Strength: ",t.jsx("span",{children:x.strength})]}),t.jsx("div",{css:Qt(x.strength),children:t.jsx("div",{})}),t.jsxs("div",{css:en(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(C,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(E,{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:en(x.uppercase),"aria-label":"Use an uppercase letter. "+(x.uppercase?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.uppercase?t.jsx(C,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(E,{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:en(x.lowercase),"aria-label":"Use a lowercase letter. "+(x.lowercase?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.lowercase?t.jsx(C,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(E,{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:en(x.numbers),"aria-label":"Use a number. "+(x.numbers?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.numbers?t.jsx(C,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(E,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsx("p",{children:"Use a number"})]}),a?.specialCharacters?null:t.jsxs("div",{css:en(x.specialCharacters),"aria-label":"Use a special character. "+(x.specialCharacters?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.specialCharacters?t.jsx(C,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(E,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsx("p",{children:"Use a special character"})]})]}):null]});var v},exports.ProgressBar=({progress:e})=>{let n=e;return n>100&&(n=100),n<0&&(n=0),t.jsx("div",{css:Bf,role:"progressbar","aria-label":`Progress: ${n}%`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":n,children:t.jsx("div",{css:Hf(n)})})},exports.QualitativeAttribute=({type:e,label:r,caption:o,color:i,onActionClick:a,showActionButton:s,pointIcon:l=t.jsx(Z,{color:"#006D2C"}),ariaLabelType:c=""})=>{const[u,d]=n.useState(!0),p=n.useId(),h=n.useId(),f="raster"===e,x="line"===e,g="point"===e,v=n.useId(),m=n.useMemo((()=>{let e=c??`${c},`;x&&(e="line,");return`${e} ${r}${o?`, ${o}`:""}. Currently ${u?"visible":"hidden"}.`}),[u,e,r,o]),y=u?"Hide":"Show";return t.jsxs("div",{css:bi,children:[t.jsx("p",{id:v,css:{position:"absolute",width:1,height:1,margin:-1,padding:0,border:0,clip:"rect(0 0 0 0)",overflow:"hidden"},children:m}),t.jsxs("div",{css:yi,children:[t.jsxs("div",{children:[f&&t.jsx("div",{css:gi(i)}),x&&t.jsx("div",{css:vi(i)}),g&&t.jsx("div",{css:mi(i),children:l})]}),t.jsxs("div",{children:[t.jsx("p",{id:p,css:wi,children:r}),o?t.jsx("p",{id:h,css:Ci,children:o}):null]})]}),a&&s?t.jsx("div",{css:ji,children:t.jsx(b,{type:"button",variant:"borderless",label:y,rightIcon:u?t.jsx(L,{}):t.jsx(O,{}),"aria-pressed":u,"aria-labelledby":`${v} ${p}`,onClick:()=>{d((e=>!e)),a?.()}})}):null]})},exports.Radio=Ze,exports.RadioGroup=We,exports.RadioList=({label:n,caption:o,name:i,radios:a,defaultValue:s,onCheckedChange:l,errorMessage:c,horizontal:u,variant:d="default",required:p})=>{const h=`${n}. ${o?`${o}.`:""} ${p?"Required.":"Optional."} ${c?`Error: ${c}.`:""} `;return t.jsxs(e.Group,{css:tn,"aria-roledescription":"group","aria-label":h,children:[c?t.jsx("div",{css:an}):null,t.jsxs("div",{css:(f=!!c,r.css`
|
|
3587
3598
|
margin-left: ${f?"19px":"0px"};
|
|
3588
3599
|
`),children:[t.jsxs("p",{css:nn,"aria-label":n,children:[p&&t.jsx("span",{"aria-label":"required",children:"*"}),n]}),t.jsx("p",{css:rn,"aria-label":o,children:o}),c?t.jsx("p",{css:sn,"aria-label":c,children:c}):null,t.jsx("div",{css:on,children:t.jsx(We,{name:i,defaultValue:s,onChange:l,horizontal:u&&"card"!==d,children:a.map((e=>t.jsx(Ze,{css:"card"===d?ln:{},...e},e.value)))})})]})]});var f},exports.SSOButtons=ne,exports.ScaleBar=({colors:e,values:n,subLabels:o,isGradient:i})=>{return t.jsxs("div",{css:ki,children:[i?t.jsx("div",{css:(a=Oi(e),r.css`
|
|
3589
3600
|
height: 20px;
|
|
@@ -3592,4 +3603,4 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3592
3603
|
border: 1px solid ${h("neutral",300)};
|
|
3593
3604
|
border-radius: 4px;
|
|
3594
3605
|
${a?`background: ${a};`:""}
|
|
3595
|
-
`)}):t.jsx("div",{css:$i,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:Si,children:n?.map((e=>t.jsx("div",{style:{width:i?"auto":`calc(100% / ${n.length})`,display:"flex",justifyContent:"center"},children:t.jsx("p",{css:Ei,children:e})},e)))}),o&&o.length?t.jsx("div",{css:Si,children:o.map((e=>t.jsx("div",{style:{width:i?"auto":`calc(100% / ${n.length})`,display:"flex",justifyContent:"center"},children:t.jsx("p",{css:Ri,style:{width:"100%"},children:e})},e)))}):null]});var a},exports.Select=qt,exports.Sheet=({header:e,content:r,footer:o,open:i=!1,onClose:a,minimizedHeight:s,midHeight:l=200,maxFullHeight:c,defaultSnap:u="minimized",className:d,blocking:p,zIndex:h=1e3})=>{const f=n.useRef(null),x=n.useRef([]),[g,v]=n.useState(null),m=window.innerWidth>768,b=x.current;let y="Expand sheet";if(null!=g){const e=b.indexOf(g);e>0&&e<b.length-1?y="Make full screen":e===b.length-1&&(y="Expand sheet")}return t.jsx(kh,{ref:f,css:Sh(!!e,h),className:d,open:i,onDismiss:a,header:t.jsxs("div",{children:[t.jsx("div",{tabIndex:0,role:"button","aria-label":y,"aria-expanded":i,css:$h,onKeyDown:e=>{if("Enter"!==e.key&&" "!==e.key)return;e.preventDefault();const t=b[b.length-1];if(m)return void f.current?.snapTo?.((()=>t));const n=g??b[0];let r=b.findIndex((e=>e>n));-1===r&&(r=b.length-1);const o=b[r];f.current?.snapTo?.((()=>o))}}),e]}),footer:o,snapPoints:({headerHeight:e,maxHeight:t,footerHeight:n})=>{const r=[20,s||e,l+(o?n:0),c||t-t/6];return x.current=r,r},onSpringEnd:()=>{const e=f.current?.height;e&&v(e)},defaultSnap:({headerHeight:e,maxHeight:t,footerHeight:n})=>{let r=20;return"minimized"===u?r=s||e:"mid"===u?r=l+(o?n:0):"full"===u&&(r=c||t-t/6),r},blocking:p,children:i?r:null})},exports.SimpleMapPin=({onClick:e,triggerRef:t,showFocusState:n,count:r,mode:i,variant:a="simple-pin"})=>o.jsx(Rn,{count:r,mode:i,onClick:e,ref:t,showFocusState:n,variant:a}),exports.Slider=et,exports.SliderInput=({label:e,caption:r,size:o="default",sliderItem:i,required:a,onChange:s})=>{const[l,c]=n.useState(i.value||[]),u=(e,t)=>{const n=e.target.value,r=[...l];let o=n?parseInt(n,10):n;const a=i.min||0,s=i.max||100;o=Number.isNaN(o)?a:o,o=o<a?a:o,o=o>s?s:o,r[t]=o,c(r)},d=(e,t)=>{const n=e.target.value||"0",r=[...l];let o=parseInt(n,10);const a=i.min||0,u=i.max||100;if(o=Number.isNaN(o)?a:o,o=o<a?a:o,o=o>u?u:o,2===l?.length){o=Number.isNaN(o)?a:o;const e=l[0],n=l[1];0===t?(o=o<a?a:o,o=o>n?n:o):1===t&&(o=o<e?e:o,o=o>u?u:o)}r[t]=o,c(r),s&&s(r)};return t.jsxs("div",{children:[t.jsxs("p",{css:cn(o),"aria-label":e,children:[a?t.jsx("span",{children:"*"}):null,e]}),r?t.jsx("p",{css:un(o),"aria-label":r,children:r}):null,t.jsxs("div",{css:dn,children:[i.step&&i.marks?t.jsx(qt,{items:i.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(wt,{"aria-label":e,min:i.min,max:i.max,value:l?.[0],type:"number",onChange:e=>u(e,0),onBlur:e=>d(e,0),className:"ds-opacity-control-text-input",onClick:e=>e.target.select()}),t.jsx(et,{css:{},...i,value:l,onValueChangeEnd:e=>{c(e.value),s&&s(e.value)}}),2===l?.length?t.jsx(wt,{"aria-label":e,min:i.min,max:i.max,value:l?.[1],type:"number",onChange:e=>u(e,1),onBlur:e=>d(e,1),className:"ds-opacity-control-text-input",onClick:e=>e.target.select()}):null]})]})},exports.StepProgressIndicator=({steps:e,currentStep:n})=>t.jsxs("div",{css:Hf,children:[e.map(((e,r)=>t.jsxs("div",{css:Ff,children:[t.jsx("button",{css:Zf(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(C,{height:"16px",width:"16px"}):r+1}),e.label?t.jsx("p",{css:Wf(n===r+1),children:e.label}):null]},`${e.label}-${r}`))),t.jsx("div",{css:Gf,children:t.jsx("div",{css:qf})})]}),exports.Switch=nt,exports.TabBar=({variant:r="panel",defaultValue:o,tabs:i,onTabClick:a,activationMode:s="manual"})=>{const[l,c]=n.useState(mf(i,o)||0),u="view"===r;return t.jsx("div",{css:hf(r),children:t.jsx(e.Tabs.Root,{width:"full",defaultValue:o||i?.[0]?.value,onValueChange:({value:e})=>{return c(mf(i,t=e)),void(a&&a(t));var t},activationMode:s,children:t.jsx(e.Tabs.List,{alignItems:"center",border:"none",children:i.map(((r,o)=>t.jsxs(n.Fragment,{children:[u&&1===o&&"left"===bf(l)?t.jsx("div",{css:gf}):null,t.jsx(e.Tabs.Trigger,{css:[ff,u?vf:xf],"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),u&&1===o&&"right"===bf(l)?t.jsx("div",{css:gf}):null]},r.label)))})})})},exports.Table=({columns:r,data:o,renderRow:i,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=o.length,currentPage:m=1,pageSize:b=10,showItemCount:y,showItemCountText:w}=l||{},C=(e,t)=>{g({key:e,order:t}),d&&d({key:e,order:t})},j=u?.length===o?.length,k=u&&u.length>0&&!j;return t.jsxs("div",{children:[t.jsxs(e.Table.Root,{css:qi,striped:a,stickyHeader:s,interactive:!0,children:[t.jsx(e.Table.Header,{css:Ui,children:t.jsxs(e.Table.Row,{children:[c?t.jsx(e.Table.ColumnHeader,{children:t.jsx(Re,{name:"header-checkbox",checked:j,indeterminate:k,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:Xi,children:[n.label,n.sortable?t.jsxs("div",{css:Yi,children:[t.jsx(ie,{css:Ki(x.key===n.key&&"asc"===x.order),icon:t.jsx($,{style:{transform:"rotate(180deg)"}}),onClick:()=>C(n.key,"asc"),"aria-label":"Ascending"}),t.jsx(ie,{css:Ki(x.key===n.key&&"desc"===x.order),icon:t.jsx($,{}),onClick:()=>C(n.key,"desc"),"aria-label":"Descending"})]}):null]})},n.key)))]})}),t.jsx(e.Table.Body,{children:o.map((e=>t.jsx(n.Fragment,{children:i(e)},e.id)))})]}),t.jsxs("div",{css:Ji,children:[t.jsx("div",{children:y?t.jsx(Mi,{pageSize:b,currentPage:m,totalItems:v,onPageSizeChange:p,showItemCountText:w}):null}),l?t.jsx("div",{css:Qi,children:t.jsx(Gi,{totalItems:v,pageSize:b,currentPage:m,onPageChange:h})}):null]})]})},exports.TableCell=ta,exports.TableRow=ea,exports.Tag=Zt,exports.TextInput=wt,exports.Textarea=({label:r,caption:o,placeholder:i,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),[w,C]=n.useState(""),j=n.useId(),k=n.useId(),$=n.useId();n.useEffect((()=>{const{length:e}=u;p&&e<p&&e>0?(m(e<p),y(!1),C(`Enter at least ${p-e} characters`)):p&&0===e&&C(`Min ${p} characters`),h&&e>0?(m(!1),y(e>h),C(`You have ${h-e} characters remaining`)):h&&0===e&&C(`Max ${h} characters`)}),[]);const S=!!a||v||b,E=[o?j:null,S?k:null,w?$:null].filter(Boolean).join(" ")||void 0;return t.jsxs("div",{css:pn(c),children:[S?t.jsx("div",{css:hn}):null,t.jsxs(e.Field.Root,{required:s,invalid:S,gap:"0",style:{marginLeft:S?"19px":"0px"},children:[r?t.jsxs(e.Field.Label,{css:fn(c,l),"aria-label":r,children:[t.jsx(e.Field.RequiredIndicator,{"aria-label":"required"}),r,s?"":t.jsx("span",{children:" (Optional)"})]}):null,o?t.jsx(e.Field.HelperText,{id:j,css:xn(c,l),children:o}):null,a?t.jsx(e.Field.ErrorText,{id:k,css:vn,"aria-label":`Error: ${a}`,"aria-live":"polite",children:a}):null,t.jsx(e.Textarea,{placeholder:i,disabled:l,css:mn(c,x,u),onChange:e=>{g(e.target.value);const{length:t}=e.target.value;p&&h?(m(t<p),y(t>h),C(`You have ${h-t} characters remaining`)):p?(m(t<p),y(!1),C(t<p?`Enter at least ${p-t} characters`:"")):h&&(y(t>h),m(!1),C(`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:vn,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:vn,style:{marginTop:"8px",fontSize:"12px",lineHeight:"16px"},"aria-live":"polite",children:["You have ",x.length-h," characters too many"]}):null,!w||b||v?null:t.jsx(e.Field.HelperText,{id:$,css:gn,"aria-live":"polite",children:w})]})]})},exports.Toast=()=>Object.keys(ex).map((n=>t.jsx(e.Portal,{children:t.jsx(e.Toaster,{toaster:ex[n],insetInline:{mdDown:"4"},children:r=>t.jsxs(e.Toast.Root,{css:Uf,width:{md:"sm"},children:[t.jsxs(e.Stack,{flexDirection:"row",className:"ds-toast-icon-container",children:["info"===r.type?r.meta?.icon?r.meta.icon:t.jsx(k,{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(P,{color:"var(--chakra-colors-success-500)"}):null,"warning"===r.type?r.meta?.icon?r.meta.icon:t.jsx(M,{color:"var(--chakra-colors-warning-500)"}):null,"error"===r.type?r.meta?.icon?r.meta.icon:t.jsx(_,{color:"var(--chakra-colors-error-500)"}):null,t.jsxs(e.Stack,{gap:"1",flex:"1",maxWidth:"100%",children:[t.jsx(e.Toast.Title,{css:Xf,"aria-label":`${r.title}`,children:r.title}),r.description?t.jsx(e.Toast.Title,{css:Yf,"aria-label":`${r.description}`,children:r.description}):null]})]}),r.action||r.meta?.closable?t.jsxs(e.Stack,{flexDirection:"row",children:[r.action?t.jsx(b,{css:Kf,label:r.action.label,size:"small",variant:"info"===r.type?"primary":"secondary",onClick:()=>{r?.action?.onClick&&r.action.onClick(),ex[n].dismiss()}}):null,r.meta?.closable?t.jsx(b,{css:Jf,label:r.meta.closableLabel,"aria-label":r.meta?.closableLabel||"Dismiss",leftIcon:t.jsx(E,{height:"10px!",width:"10px!"}),size:"small",variant:"secondary",onClick:()=>ex[n].dismiss()}):null]}):null]})})},n))),exports.Toolbar=he,exports.Tooltip=de,exports.designSystemStyles=p,exports.designSystemStylesForTailwind=d,exports.getThemedColor=h,exports.showToast=e=>{ex[e.placement].create({title:e.label,description:e.caption,duration:e.duration||5e3,meta:{closable:e.closable,icon:e.icon,closableLabel:e.closableLabel},...e})};
|
|
3606
|
+
`)}):t.jsx("div",{css:$i,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:Si,children:n?.map((e=>t.jsx("div",{style:{width:i?"auto":`calc(100% / ${n.length})`,display:"flex",justifyContent:"center"},children:t.jsx("p",{css:Ei,children:e})},e)))}),o&&o.length?t.jsx("div",{css:Si,children:o.map((e=>t.jsx("div",{style:{width:i?"auto":`calc(100% / ${n.length})`,display:"flex",justifyContent:"center"},children:t.jsx("p",{css:Ri,style:{width:"100%"},children:e})},e)))}):null]});var a},exports.Select=qt,exports.Sheet=({header:e,content:r,footer:o,open:i=!1,onClose:a,minimizedHeight:s,midHeight:l=200,maxFullHeight:c,defaultSnap:u="minimized",className:d,blocking:p,zIndex:h=1e3})=>{const f=n.useRef(null),x=n.useRef([]),[g,v]=n.useState(null),m=window.innerWidth>768,b=x.current;let y="Expand sheet";if(null!=g){const e=b.indexOf(g);e>0&&e<b.length-1?y="Make full screen":e===b.length-1&&(y="Expand sheet")}return t.jsx($h,{ref:f,css:Eh(!!e,h),className:d,open:i,onDismiss:a,header:t.jsxs("div",{children:[t.jsx("div",{tabIndex:0,role:"button","aria-label":y,"aria-expanded":i,css:Sh,onKeyDown:e=>{if("Enter"!==e.key&&" "!==e.key)return;e.preventDefault();const t=b[b.length-1];if(m)return void f.current?.snapTo?.((()=>t));const n=g??b[0];let r=b.findIndex((e=>e>n));-1===r&&(r=b.length-1);const o=b[r];f.current?.snapTo?.((()=>o))}}),e]}),footer:o,snapPoints:({headerHeight:e,maxHeight:t,footerHeight:n})=>{const r=[20,s||e,l+(o?n:0),c||t-t/6];return x.current=r,r},onSpringEnd:()=>{const e=f.current?.height;e&&v(e)},defaultSnap:({headerHeight:e,maxHeight:t,footerHeight:n})=>{let r=20;return"minimized"===u?r=s||e:"mid"===u?r=l+(o?n:0):"full"===u&&(r=c||t-t/6),r},blocking:p,children:i?r:null})},exports.SimpleMapPin=({onClick:e,triggerRef:t,showFocusState:n,count:r,mode:i,variant:a="simple-pin"})=>o.jsx(Rn,{count:r,mode:i,onClick:e,ref:t,showFocusState:n,variant:a}),exports.Slider=et,exports.SliderInput=({label:e,caption:r,size:o="default",sliderItem:i,required:a,onChange:s})=>{const[l,c]=n.useState(i.value||[]),u=(e,t)=>{const n=e.target.value,r=[...l];let o=n?parseInt(n,10):n;const a=i.min||0,s=i.max||100;o=Number.isNaN(o)?a:o,o=o<a?a:o,o=o>s?s:o,r[t]=o,c(r)},d=(e,t)=>{const n=e.target.value||"0",r=[...l];let o=parseInt(n,10);const a=i.min||0,u=i.max||100;if(o=Number.isNaN(o)?a:o,o=o<a?a:o,o=o>u?u:o,2===l?.length){o=Number.isNaN(o)?a:o;const e=l[0],n=l[1];0===t?(o=o<a?a:o,o=o>n?n:o):1===t&&(o=o<e?e:o,o=o>u?u:o)}r[t]=o,c(r),s&&s(r)};return t.jsxs("div",{children:[t.jsxs("p",{css:cn(o),"aria-label":e,children:[a?t.jsx("span",{children:"*"}):null,e]}),r?t.jsx("p",{css:un(o),"aria-label":r,children:r}):null,t.jsxs("div",{css:dn,children:[i.step&&i.marks?t.jsx(qt,{items:i.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(wt,{"aria-label":e,min:i.min,max:i.max,value:l?.[0],type:"number",onChange:e=>u(e,0),onBlur:e=>d(e,0),className:"ds-opacity-control-text-input",onClick:e=>e.target.select()}),t.jsx(et,{css:{},...i,value:l,onValueChangeEnd:e=>{c(e.value),s&&s(e.value)}}),2===l?.length?t.jsx(wt,{"aria-label":e,min:i.min,max:i.max,value:l?.[1],type:"number",onChange:e=>u(e,1),onBlur:e=>d(e,1),className:"ds-opacity-control-text-input",onClick:e=>e.target.select()}):null]})]})},exports.StepProgressIndicator=({steps:e,currentStep:n})=>t.jsxs("div",{css:Ff,children:[e.map(((e,r)=>t.jsxs("div",{css:Zf,children:[t.jsx("button",{css:Wf(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(C,{height:"16px",width:"16px"}):r+1}),e.label?t.jsx("p",{css:Gf(n===r+1),children:e.label}):null]},`${e.label}-${r}`))),t.jsx("div",{css:qf,children:t.jsx("div",{css:Uf})})]}),exports.Switch=nt,exports.TabBar=({variant:r="panel",defaultValue:o,tabs:i,onTabClick:a,activationMode:s="manual"})=>{const[l,c]=n.useState(bf(i,o)||0),u="view"===r;return t.jsx("div",{css:ff(r),children:t.jsx(e.Tabs.Root,{width:"full",defaultValue:o||i?.[0]?.value,onValueChange:({value:e})=>{return c(bf(i,t=e)),void(a&&a(t));var t},activationMode:s,children:t.jsx(e.Tabs.List,{alignItems:"center",border:"none",children:i.map(((r,o)=>t.jsxs(n.Fragment,{children:[u&&1===o&&"left"===yf(l)?t.jsx("div",{css:vf}):null,t.jsx(e.Tabs.Trigger,{css:[xf,u?mf:gf],"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),u&&1===o&&"right"===yf(l)?t.jsx("div",{css:vf}):null]},r.label)))})})})},exports.Table=({columns:r,data:o,renderRow:i,striped:a,stickyHeader:s,pagination:l,selectable:c,selectedRows:u,variant:d="full-width",onSortColumn:p,onPageSizeChange:h,onPageChange:f,onAllItemsSelected:x})=>{const[g,v]=n.useState({key:"",order:""}),{totalItems:m=o.length,currentPage:b=1,pageSize:y=10,showItemCount:w,showItemCountText:C}=l||{},j=(e,t)=>{v({key:e,order:t}),p&&p({key:e,order:t})},k=u?.length===o?.length,S=u&&u.length>0&&!k;return t.jsxs("div",{children:[t.jsxs(e.Table.Root,{css:qi(d),striped:a,stickyHeader:s,interactive:!0,children:[t.jsx(e.Table.Header,{css:Ui(d),children:t.jsxs(e.Table.Row,{children:[c?t.jsx(e.Table.ColumnHeader,{children:t.jsx(Re,{name:"header-checkbox",checked:k,indeterminate:S,onCheckedChange:({checked:e})=>{x&&x(e)}})}):null,r.map((n=>t.jsx(e.Table.ColumnHeader,{role:n.sortable?"columnheader":void 0,"aria-sort":n.sortable&&"asc"===g.order?"ascending":n.sortable&&"desc"===g.order?"descending":void 0,children:t.jsxs("div",{css:Xi,children:[n.label,n.sortable?t.jsxs("div",{css:Yi,children:[t.jsx(ie,{css:Ki(g.key===n.key&&"asc"===g.order),icon:t.jsx($,{style:{transform:"rotate(180deg)"}}),onClick:()=>j(n.key,"asc"),"aria-label":"Ascending"}),t.jsx(ie,{css:Ki(g.key===n.key&&"desc"===g.order),icon:t.jsx($,{}),onClick:()=>j(n.key,"desc"),"aria-label":"Descending"})]}):null]})},n.key)))]})}),t.jsx(e.Table.Body,{css:ea,children:o.map((e=>t.jsx(n.Fragment,{children:i(e)},e.id)))})]}),t.jsxs("div",{css:Ji,children:[t.jsx("div",{children:w?t.jsx(Mi,{pageSize:y,currentPage:b,totalItems:m,onPageSizeChange:h,showItemCountText:C}):null}),l?t.jsx("div",{css:Qi,children:t.jsx(Gi,{totalItems:m,pageSize:y,currentPage:b,onPageChange:f})}):null]})]})},exports.TableCell=na,exports.TableRow=ta,exports.Tag=Zt,exports.TextInput=wt,exports.Textarea=({label:r,caption:o,placeholder:i,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),[w,C]=n.useState(""),j=n.useId(),k=n.useId(),$=n.useId();n.useEffect((()=>{const{length:e}=u;p&&e<p&&e>0?(m(e<p),y(!1),C(`Enter at least ${p-e} characters`)):p&&0===e&&C(`Min ${p} characters`),h&&e>0?(m(!1),y(e>h),C(`You have ${h-e} characters remaining`)):h&&0===e&&C(`Max ${h} characters`)}),[]);const S=!!a||v||b,E=[o?j:null,S?k:null,w?$:null].filter(Boolean).join(" ")||void 0;return t.jsxs("div",{css:pn(c),children:[S?t.jsx("div",{css:hn}):null,t.jsxs(e.Field.Root,{required:s,invalid:S,gap:"0",style:{marginLeft:S?"19px":"0px"},children:[r?t.jsxs(e.Field.Label,{css:fn(c,l),"aria-label":r,children:[t.jsx(e.Field.RequiredIndicator,{"aria-label":"required"}),r,s?"":t.jsx("span",{children:" (Optional)"})]}):null,o?t.jsx(e.Field.HelperText,{id:j,css:xn(c,l),children:o}):null,a?t.jsx(e.Field.ErrorText,{id:k,css:vn,"aria-label":`Error: ${a}`,"aria-live":"polite",children:a}):null,t.jsx(e.Textarea,{placeholder:i,disabled:l,css:mn(c,x,u),onChange:e=>{g(e.target.value);const{length:t}=e.target.value;p&&h?(m(t<p),y(t>h),C(`You have ${h-t} characters remaining`)):p?(m(t<p),y(!1),C(t<p?`Enter at least ${p-t} characters`:"")):h&&(y(t>h),m(!1),C(`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:vn,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:vn,style:{marginTop:"8px",fontSize:"12px",lineHeight:"16px"},"aria-live":"polite",children:["You have ",x.length-h," characters too many"]}):null,!w||b||v?null:t.jsx(e.Field.HelperText,{id:$,css:gn,"aria-live":"polite",children:w})]})]})},exports.Toast=()=>Object.keys(tx).map((n=>t.jsx(e.Portal,{children:t.jsx(e.Toaster,{toaster:tx[n],insetInline:{mdDown:"4"},children:r=>t.jsxs(e.Toast.Root,{css:Xf,width:{md:"sm"},children:[t.jsxs(e.Stack,{flexDirection:"row",className:"ds-toast-icon-container",children:["info"===r.type?r.meta?.icon?r.meta.icon:t.jsx(k,{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(P,{color:"var(--chakra-colors-success-500)"}):null,"warning"===r.type?r.meta?.icon?r.meta.icon:t.jsx(M,{color:"var(--chakra-colors-warning-500)"}):null,"error"===r.type?r.meta?.icon?r.meta.icon:t.jsx(_,{color:"var(--chakra-colors-error-500)"}):null,t.jsxs(e.Stack,{gap:"1",flex:"1",maxWidth:"100%",children:[t.jsx(e.Toast.Title,{css:Yf,"aria-label":`${r.title}`,children:r.title}),r.description?t.jsx(e.Toast.Title,{css:Kf,"aria-label":`${r.description}`,children:r.description}):null]})]}),r.action||r.meta?.closable?t.jsxs(e.Stack,{flexDirection:"row",children:[r.action?t.jsx(b,{css:Jf,label:r.action.label,size:"small",variant:"info"===r.type?"primary":"secondary",onClick:()=>{r?.action?.onClick&&r.action.onClick(),tx[n].dismiss()}}):null,r.meta?.closable?t.jsx(b,{css:Qf,label:r.meta.closableLabel,"aria-label":r.meta?.closableLabel||"Dismiss",leftIcon:t.jsx(E,{height:"10px!",width:"10px!"}),size:"small",variant:"secondary",onClick:()=>tx[n].dismiss()}):null]}):null]})})},n))),exports.Toolbar=he,exports.Tooltip=de,exports.designSystemStyles=p,exports.designSystemStylesForTailwind=d,exports.getThemedColor=h,exports.showToast=e=>{tx[e.placement].create({title:e.label,description:e.caption,duration:e.duration||5e3,meta:{closable:e.closable,icon:e.icon,closableLabel:e.closableLabel},...e})};
|