@worldresources/wri-design-systems 2.200.0 → 2.201.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -2324,6 +2324,15 @@
2324
2324
  z-index: ${t?3:"auto"};
2325
2325
  }
2326
2326
 
2327
+ /* Border left on first sticky column cells */
2328
+ td[data-sticky]:first-of-type,
2329
+ th[data-sticky]:first-of-type {
2330
+ box-shadow: inset 0.0625rem 0 0 ${w("neutral",300)};
2331
+ }
2332
+
2333
+ /* Border top on sticky header cells */
2334
+ ${t?`\n thead th {\n box-shadow: inset 0 0.0625rem 0 ${w("neutral",300)};\n }\n thead th[data-sticky]:first-of-type {\n box-shadow: inset 0.0625rem 0.0625rem 0 ${w("neutral",300)};\n }\n `:""}
2335
+
2327
2336
  [data-sticky='start']::after {
2328
2337
  content: none;
2329
2338
  }
@@ -2394,7 +2403,7 @@
2394
2403
  justify-content: space-between;
2395
2404
  `,_w=i.css`
2396
2405
  margin-top: 0.5625rem;
2397
- `,Fw=i.css`
2406
+ `,Fw=e=>i.css`
2398
2407
  tr {
2399
2408
  height: ${k(1200)};
2400
2409
 
@@ -2402,6 +2411,8 @@
2402
2411
  border-color: ${w("neutral",300)};
2403
2412
  }
2404
2413
 
2414
+ ${e?`\n &:nth-of-type(odd) td[data-sticky] {\n background-color: ${w("neutral",200)};\n }\n &:nth-of-type(even) td[data-sticky] {\n background-color: ${w("neutral",100)};\n }\n`:""}
2415
+
2405
2416
  :hover {
2406
2417
  background-color: ${w("neutral",200)};
2407
2418
 
@@ -2428,9 +2439,9 @@
2428
2439
  display: flex;
2429
2440
  align-items: center;
2430
2441
  justify-content: center;
2431
- `,Uw=(e,t)=>{const n=e[t]?.width;return n?{width:n,minWidth:n}:{}},Kw=(e,t,n)=>{const r=e[t];return void 0===r?{}:{"data-sticky":"start","data-sticky-last":t===n?"true":void 0,left:`${r}px`}},Gw=(e,t,n)=>{if(n||!t.key)return e;const{key:r,order:o}=t,i="asc"===o;return[...e].sort(((e,t)=>((e,t,n)=>{if(null==e&&null==t)return 0;if(null==e)return 1;if(null==t)return-1;if("string"==typeof e&&"string"==typeof t)return n?e.localeCompare(t):t.localeCompare(e);if("number"==typeof e&&"number"==typeof t)return n?e-t:t-e;const r=String(e),o=String(t);return n?r.localeCompare(o):o.localeCompare(r)})(e?.[r],t?.[r],i)))},Zw=e.Table.Row,Jw=e.Table.Cell,Xw=i.css`
2442
+ `,Uw="__checkbox__",Kw=(e,t)=>{const n=e[t]?.width;return n?{width:n,minWidth:n}:{}},Gw=(e,t,n)=>{const r=e[t];return void 0===r?{}:{"data-sticky":"start","data-sticky-last":t===n?"true":void 0,left:`${r}px`}},Zw=(e,t,n)=>{if(n||!t.key)return e;const{key:r,order:o}=t,i="asc"===o;return[...e].sort(((e,t)=>((e,t,n)=>{if(null==e&&null==t)return 0;if(null==e)return 1;if(null==t)return-1;if("string"==typeof e&&"string"==typeof t)return n?e.localeCompare(t):t.localeCompare(e);if("number"==typeof e&&"number"==typeof t)return n?e-t:t-e;const r=String(e),o=String(t);return n?r.localeCompare(o):o.localeCompare(r)})(e?.[r],t?.[r],i)))},Jw=e.Table.Row,Xw=e.Table.Cell,Yw=i.css`
2432
2443
  border: ${j(100)} solid ${w("neutral",300)};
2433
- `,Yw=i.css`
2444
+ `,Qw=i.css`
2434
2445
  padding: ${k(400)};
2435
2446
  cursor: pointer;
2436
2447
  &:focus-visible {
@@ -2445,9 +2456,9 @@
2445
2456
  transparent
2446
2457
  );
2447
2458
  }
2448
- `,Qw=i.css`
2449
- border: ${j(100)} solid ${w("neutral",300)};
2450
2459
  `,eC=i.css`
2460
+ border: ${j(100)} solid ${w("neutral",300)};
2461
+ `,tC=i.css`
2451
2462
  padding: ${k(400)};
2452
2463
  cursor: pointer;
2453
2464
  border-bottom: ${j(100)} solid
@@ -2469,7 +2480,7 @@
2469
2480
  transparent
2470
2481
  );
2471
2482
  }
2472
- `,tC=i.css`
2483
+ `,nC=i.css`
2473
2484
  .item-content-open > * {
2474
2485
  max-height: auto;
2475
2486
 
@@ -2490,10 +2501,10 @@
2490
2501
  padding-bottom 0.2s ease,
2491
2502
  padding-top 0.2s ease;
2492
2503
  }
2493
- `,nC=i.css`
2504
+ `,rC=i.css`
2494
2505
  border-top: ${j(100)} solid
2495
2506
  ${w("neutral",300)};
2496
- `;var rC,oC={exports:{}},iC={},sC={exports:{}},aC={exports:{}},lC={};var cC,dC,uC,hC,pC,fC,mC,gC,vC,bC,yC,xC,wC,CC={};
2507
+ `;var oC,iC={exports:{}},sC={},aC={exports:{}},lC={exports:{}},cC={};var dC,uC,hC,pC,fC,mC,gC,vC,bC,yC,xC,wC,CC,kC={};
2497
2508
  /** @license React v16.13.1
2498
2509
  * react-is.development.js
2499
2510
  *
@@ -2501,7 +2512,7 @@
2501
2512
  *
2502
2513
  * This source code is licensed under the MIT license found in the
2503
2514
  * LICENSE file in the root directory of this source tree.
2504
- */function kC(){return dC||(dC=1,"production"===process.env.NODE_ENV?aC.exports=function(){if(rC)return lC;rC=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,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function y(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case t:switch(e=e.type){case l:case c:case r:case i:case o:case u:return e;default:switch(e=e&&e.$$typeof){case a:case d:case f:case p:case s:return e;default:return h}}case n:return h}}}function x(e){return y(e)===c}return lC.AsyncMode=l,lC.ConcurrentMode=c,lC.ContextConsumer=a,lC.ContextProvider=s,lC.Element=t,lC.ForwardRef=d,lC.Fragment=r,lC.Lazy=f,lC.Memo=p,lC.Portal=n,lC.Profiler=i,lC.StrictMode=o,lC.Suspense=u,lC.isAsyncMode=function(e){return x(e)||y(e)===l},lC.isConcurrentMode=x,lC.isContextConsumer=function(e){return y(e)===a},lC.isContextProvider=function(e){return y(e)===s},lC.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},lC.isForwardRef=function(e){return y(e)===d},lC.isFragment=function(e){return y(e)===r},lC.isLazy=function(e){return y(e)===f},lC.isMemo=function(e){return y(e)===p},lC.isPortal=function(e){return y(e)===n},lC.isProfiler=function(e){return y(e)===i},lC.isStrictMode=function(e){return y(e)===o},lC.isSuspense=function(e){return y(e)===u},lC.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===i||e===o||e===u||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===p||e.$$typeof===s||e.$$typeof===a||e.$$typeof===d||e.$$typeof===g||e.$$typeof===v||e.$$typeof===b||e.$$typeof===m)},lC.typeOf=y,lC}():aC.exports=(cC||(cC=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,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function y(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case t:var m=e.type;switch(m){case l:case c:case r:case i:case o:case u:return m;default:var g=m&&m.$$typeof;switch(g){case a:case d:case f:case p:case s:return g;default:return h}}case n:return h}}}var x=l,w=c,C=a,k=s,S=t,$=d,j=r,M=f,E=p,T=n,O=i,L=o,A=u,R=!1;function N(e){return y(e)===c}CC.AsyncMode=x,CC.ConcurrentMode=w,CC.ContextConsumer=C,CC.ContextProvider=k,CC.Element=S,CC.ForwardRef=$,CC.Fragment=j,CC.Lazy=M,CC.Memo=E,CC.Portal=T,CC.Profiler=O,CC.StrictMode=L,CC.Suspense=A,CC.isAsyncMode=function(e){return R||(R=!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.")),N(e)||y(e)===l},CC.isConcurrentMode=N,CC.isContextConsumer=function(e){return y(e)===a},CC.isContextProvider=function(e){return y(e)===s},CC.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},CC.isForwardRef=function(e){return y(e)===d},CC.isFragment=function(e){return y(e)===r},CC.isLazy=function(e){return y(e)===f},CC.isMemo=function(e){return y(e)===p},CC.isPortal=function(e){return y(e)===n},CC.isProfiler=function(e){return y(e)===i},CC.isStrictMode=function(e){return y(e)===o},CC.isSuspense=function(e){return y(e)===u},CC.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===i||e===o||e===u||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===p||e.$$typeof===s||e.$$typeof===a||e.$$typeof===d||e.$$typeof===g||e.$$typeof===v||e.$$typeof===b||e.$$typeof===m)},CC.typeOf=y}()),CC)),aC.exports}function SC(){if(hC)return uC;hC=1;return uC="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function $C(){return fC?pC:(fC=1,pC=Function.call.bind(Object.prototype.hasOwnProperty))}function jC(){if(bC)return vC;bC=1;var e=kC(),t=s,n=SC(),r=$C(),o=function(){if(gC)return mC;gC=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=SC(),n={},r=$C();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function o(o,i,s,a,l){if("production"!==process.env.NODE_ENV)for(var c in o)if(r(o,c)){var d;try{if("function"!=typeof o[c]){var u=Error((a||"React class")+": "+s+" 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 u.name="Invariant Violation",u}d=o[c](i,c,a,s,null,t)}catch(e){d=e}if(!d||d instanceof Error||e((a||"React class")+": type specification of "+s+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var h=l?l():"";e("Failed "+s+" type: "+d.message+(null!=h?h:""))}}}return o.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(n={})},mC=o}(),i=function(){};function a(){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){}}),vC=function(s,l){var c="function"==typeof Symbol&&Symbol.iterator;var d="<<anonymous>>",u={array:m("array"),bigint:m("bigint"),bool:m("boolean"),func:m("function"),number:m("number"),object:m("object"),string:m("string"),symbol:m("symbol"),any:f(a),arrayOf:function(e){return f((function(t,r,o,i,s){if("function"!=typeof e)return new p("Property `"+s+"` of component `"+o+"` has invalid PropType notation inside arrayOf.");var a=t[r];if(!Array.isArray(a))return new p("Invalid "+i+" `"+s+"` of type `"+b(a)+"` supplied to `"+o+"`, expected an array.");for(var l=0;l<a.length;l++){var c=e(a,l,o,i,s+"["+l+"]",n);if(c instanceof Error)return c}return null}))},element:f((function(e,t,n,r,o){var i=e[t];return s(i)?null:new p("Invalid "+r+" `"+o+"` of type `"+b(i)+"` supplied to `"+n+"`, expected a single ReactElement.")})),elementType:f((function(t,n,r,o,i){var s=t[n];return e.isValidElementType(s)?null:new p("Invalid "+o+" `"+i+"` of type `"+b(s)+"` 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 s=e.name||d;return new p("Invalid "+o+" `"+i+"` of type `"+(((a=t[n]).constructor&&a.constructor.name?a.constructor.name:d)+"` supplied to `")+r+"`, expected instance of `"+s+"`.")}var a;return null}))},node:f((function(e,t,n,r,o){return v(e[t])?null:new p("Invalid "+r+" `"+o+"` supplied to `"+n+"`, expected a ReactNode.")})),objectOf:function(e){return f((function(t,o,i,s,a){if("function"!=typeof e)return new p("Property `"+a+"` of component `"+i+"` has invalid PropType notation inside objectOf.");var l=t[o],c=b(l);if("object"!==c)return new p("Invalid "+s+" `"+a+"` of type `"+c+"` supplied to `"+i+"`, expected an object.");for(var d in l)if(r(l,d)){var u=e(l,d,i,s,a+"."+d,n);if(u instanceof Error)return u}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."),a;return f((function(t,n,r,o,i){for(var s=t[n],a=0;a<e.length;a++)if(h(s,e[a]))return null;var l=JSON.stringify(e,(function(e,t){return"symbol"===y(t)?String(t):t}));return new p("Invalid "+o+" `"+i+"` of value `"+String(s)+"` 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."),a;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 "+x(o)+" at index "+t+"."),a}return f((function(t,o,i,s,a){for(var l=[],c=0;c<e.length;c++){var d=(0,e[c])(t,o,i,s,a,n);if(null==d)return null;d.data&&r(d.data,"expectedType")&&l.push(d.data.expectedType)}return new p("Invalid "+s+" `"+a+"` supplied to `"+i+"`"+(l.length>0?", expected one of type ["+l.join(", ")+"]":"")+".")}))},shape:function(e){return f((function(t,r,o,i,s){var a=t[r],l=b(a);if("object"!==l)return new p("Invalid "+i+" `"+s+"` of type `"+l+"` supplied to `"+o+"`, expected `object`.");for(var c in e){var d=e[c];if("function"!=typeof d)return g(o,i,s,c,y(d));var u=d(a,c,o,i,s+"."+c,n);if(u)return u}return null}))},exact:function(e){return f((function(o,i,s,a,l){var c=o[i],d=b(c);if("object"!==d)return new p("Invalid "+a+" `"+l+"` of type `"+d+"` supplied to `"+s+"`, expected `object`.");var u=t({},o[i],e);for(var h in u){var f=e[h];if(r(e,h)&&"function"!=typeof f)return g(s,a,l,h,y(f));if(!f)return new p("Invalid "+a+" `"+l+"` key `"+h+"` supplied to `"+s+"`.\nBad object: "+JSON.stringify(o[i],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var m=f(c,h,s,a,l+"."+h,n);if(m)return m}return null}))}};function h(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function p(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,s,a,c,u,h,f){if(c=c||d,h=h||a,f!==n){if(l){var m=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 m.name="Invariant Violation",m}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var g=c+":"+a;!t[g]&&r<3&&(i("You are manually calling a React.PropTypes validation function for the `"+h+"` 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==s[a]?o?null===s[a]?new p("The "+u+" `"+h+"` is marked as required in `"+c+"`, but its value is `null`."):new p("The "+u+" `"+h+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(s,a,c,u,h)}var s=o.bind(null,!1);return s.isRequired=o.bind(null,!0),s}function m(e){return f((function(t,n,r,o,i,s){var a=t[n];return b(a)!==e?new p("Invalid "+o+" `"+i+"` of type `"+y(a)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null}))}function g(e,t,n,r,o){return new p((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||s(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 b(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 y(e){if(null==e)return""+e;var t=b(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function x(e){var t=y(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return p.prototype=Error.prototype,u.checkPropTypes=o,u.resetWarningCache=o.resetWarningCache,u.PropTypes=u,u},vC}function MC(){if(wC)return sC.exports;if(wC=1,"production"!==process.env.NODE_ENV){var e=kC();sC.exports=jC()(e.isElement,!0)}else sC.exports=function(){if(xC)return yC;xC=1;var e=SC();function t(){}function n(){}return n.resetWarningCache=t,yC=function(){function r(t,n,r,o,i,s){if(s!==e){var a=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 a.name="Invariant Violation",a}}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},yC}()();return sC.exports}var EC,TC={exports:{}};var OC,LC={},AC={};function RC(){if(OC)return AC;return OC=1,Object.defineProperty(AC,"__esModule",{value:!0}),AC.dontSetMe=function(e,t,n){if(e[t])return new Error(`Invalid prop ${t} passed to ${n} - do not set this, set it on the child.`)},AC.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]},AC.int=function(e){return parseInt(e,10)},AC.isFunction=function(e){return"function"==typeof e||"[object Function]"===Object.prototype.toString.call(e)},AC.isNum=function(e){return"number"==typeof e&&!isNaN(e)},AC}var NC,DC,IC={};function PC(){if(DC)return LC;DC=1,Object.defineProperty(LC,"__esModule",{value:!0}),LC.addClassName=s,LC.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},LC.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&&s(e.body,"react-draggable-transparent-selection")},LC.createCSSTransform=function(e,n){const r=o(e,n,"px");return{[(0,t.browserPrefixToKey)("transform",t.default)]:r}},LC.createSVGTransform=function(e,t){return o(e,t,"")},LC.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))},LC.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},LC.getTranslation=o,LC.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},LC.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},LC.matchesSelector=r,LC.matchesSelectorAndParentsTo=function(e,t,n){let o=e;do{if(r(o,t))return!0;if(o===n)return!1;o=o.parentNode}while(o);return!1},LC.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}},LC.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},LC.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},LC.removeClassName=a,LC.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},LC.scheduleRemoveUserSelectStyles=function(e){window.requestAnimationFrame?window.requestAnimationFrame((()=>{i(e)})):i(e)};var e=RC(),t=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,r=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var o,i,s={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return s;if(o=t?r:n){if(o.has(e))return o.get(e);o.set(e,s)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(i.get||i.set)?o(s,t,i):s[t]=e[t]);return s}(e,t)}(function(){if(NC)return IC;NC=1,Object.defineProperty(IC,"__esModule",{value:!0}),IC.browserPrefixToKey=n,IC.browserPrefixToStyle=function(e,t){return t?`-${t.toLowerCase()}-${e}`:e},IC.default=void 0,IC.getPrefix=t;const e=["Moz","Webkit","O","ms"];function t(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"==typeof window)return"";const r=window.document?.documentElement?.style;if(!r)return"";if(t in r)return"";for(let o=0;o<e.length;o++)if(n(t,e[o])in r)return e[o];return""}function n(e,t){return t?`${t}${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 IC.default=t(),IC}());let n="";function r(t,r){return n||(n=(0,e.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],(function(n){return(0,e.isFunction)(t[n])}))),!!(0,e.isFunction)(t[n])&&t[n](r)}function o(e,t,n){let{x:r,y:o}=e,i=`translate(${r}${n},${o}${n})`;if(t){i=`translate(${`${"string"==typeof t.x?t.x:t.x+n}`}, ${`${"string"==typeof t.y?t.y:t.y+n}`})`+i}return i}function i(e){if(e)try{if(e.body&&a(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){}}function s(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp(`(?:^|\\s)${t}(?!\\S)`))||(e.className+=` ${t}`)}function a(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp(`(?:^|\\s)${t}(?!\\S)`,"g"),"")}return LC}var zC,VC={};function BC(){if(zC)return VC;zC=1,Object.defineProperty(VC,"__esModule",{value:!0}),VC.canDragX=function(e){return"both"===e.props.axis||"x"===e.props.axis},VC.canDragY=function(e){return"both"===e.props.axis||"y"===e.props.axis},VC.createCoreData=function(t,r,o){const i=!(0,e.isNum)(t.lastX),s=n(t);return i?{node:s,deltaX:0,deltaY:0,lastX:r,lastY:o,x:r,y:o}:{node:s,deltaX:r-t.lastX,deltaY:o-t.lastY,lastX:t.lastX,lastY:t.lastY,x:r,y:o}},VC.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}},VC.getBoundPosition=function(r,o,i){if(!r.props.bounds)return[o,i];let{bounds:s}=r.props;s="string"==typeof s?s:function(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}(s);const a=n(r);if("string"==typeof s){const{ownerDocument:n}=a,r=n.defaultView;let o;if("parent"===s)o=a.parentNode;else{o=a.getRootNode().querySelector(s)}if(!(o instanceof r.HTMLElement))throw new Error('Bounds selector "'+s+'" could not find an element.');const i=o,l=r.getComputedStyle(a),c=r.getComputedStyle(i);s={left:-a.offsetLeft+(0,e.int)(c.paddingLeft)+(0,e.int)(l.marginLeft),top:-a.offsetTop+(0,e.int)(c.paddingTop)+(0,e.int)(l.marginTop),right:(0,t.innerWidth)(i)-(0,t.outerWidth)(a)-a.offsetLeft+(0,e.int)(c.paddingRight)-(0,e.int)(l.marginRight),bottom:(0,t.innerHeight)(i)-(0,t.outerHeight)(a)-a.offsetTop+(0,e.int)(c.paddingBottom)-(0,e.int)(l.marginBottom)}}(0,e.isNum)(s.right)&&(o=Math.min(o,s.right));(0,e.isNum)(s.bottom)&&(i=Math.min(i,s.bottom));(0,e.isNum)(s.left)&&(o=Math.max(o,s.left));(0,e.isNum)(s.top)&&(i=Math.max(i,s.top));return[o,i]},VC.getControlPosition=function(e,r,o){const i="number"==typeof r?(0,t.getTouch)(e,r):null;if("number"==typeof r&&!i)return null;const s=n(o),a=o.props.offsetParent||s.offsetParent||s.ownerDocument.body;return(0,t.offsetXYFromParent)(i||e,a,o.props.scale)},VC.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=RC(),t=PC();function n(e){const t=e.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}return VC}var HC,_C,FC,qC,WC={},UC={};function KC(){if(HC)return UC;return HC=1,Object.defineProperty(UC,"__esModule",{value:!0}),UC.default=function(){},UC}function GC(){if(_C)return WC;_C=1,Object.defineProperty(WC,"__esModule",{value:!0}),WC.default=void 0;var e=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,r=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var o,i,s={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return s;if(o=t?r:n){if(o.has(e))return o.get(e);o.set(e,s)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(i.get||i.set)?o(s,t,i):s[t]=e[t]);return s}(e,t)}(n),t=c(MC()),r=c(o),i=PC(),s=BC(),a=RC(),l=c(KC());function c(e){return e&&e.__esModule?e:{default:e}}function d(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!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:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const u={start:"touchstart",move:"touchmove",stop:"touchend"},h={start:"mousedown",move:"mousemove",stop:"mouseup"};let p=h,f=class extends e.Component{constructor(){super(...arguments),d(this,"dragging",!1),d(this,"lastX",NaN),d(this,"lastY",NaN),d(this,"touchIdentifier",null),d(this,"mounted",!1),d(this,"handleDragStart",(e=>{if(this.props.onMouseDown(e),!this.props.allowAnyClick&&"number"==typeof e.button&&0!==e.button)return!1;const t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:n}=t;if(this.props.disabled||!(e.target instanceof n.defaultView.Node)||this.props.handle&&!(0,i.matchesSelectorAndParentsTo)(e.target,this.props.handle,t)||this.props.cancel&&(0,i.matchesSelectorAndParentsTo)(e.target,this.props.cancel,t))return;"touchstart"!==e.type||this.props.allowMobileScroll||e.preventDefault();const r=(0,i.getTouchIdentifier)(e);this.touchIdentifier=r;const o=(0,s.getControlPosition)(e,r,this);if(null==o)return;const{x:a,y:c}=o,d=(0,s.createCoreData)(this,a,c);(0,l.default)("DraggableCore: handleDragStart: %j",d),(0,l.default)("calling",this.props.onStart);!1!==this.props.onStart(e,d)&&!1!==this.mounted&&(this.props.enableUserSelectHack&&(0,i.addUserSelectStyles)(n),this.dragging=!0,this.lastX=a,this.lastY=c,(0,i.addEvent)(n,p.move,this.handleDrag),(0,i.addEvent)(n,p.stop,this.handleDragStop))})),d(this,"handleDrag",(e=>{const t=(0,s.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,s.snapToGrid)(this.props.grid,e,t),!e&&!t)return;n=this.lastX+e,r=this.lastY+t}const o=(0,s.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,s.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,s.snapToGrid)(this.props.grid,e,t),n=this.lastX+e,r=this.lastY+t}const o=(0,s.createCoreData)(this,n,r);if(!1===this.props.onStop(e,o)||!1===this.mounted)return!1;const a=this.findDOMNode();a&&this.props.enableUserSelectHack&&(0,i.scheduleRemoveUserSelectStyles)(a.ownerDocument),(0,l.default)("DraggableCore: handleDragStop: %j",o),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,a&&((0,l.default)("DraggableCore: Removing handlers"),(0,i.removeEvent)(a.ownerDocument,p.move,this.handleDrag),(0,i.removeEvent)(a.ownerDocument,p.stop,this.handleDragStop))})),d(this,"onMouseDown",(e=>(p=h,this.handleDragStart(e)))),d(this,"onMouseUp",(e=>(p=h,this.handleDragStop(e)))),d(this,"onTouchStart",(e=>(p=u,this.handleDragStart(e)))),d(this,"onTouchEnd",(e=>(p=u,this.handleDragStop(e))))}componentDidMount(){this.mounted=!0;const e=this.findDOMNode();e&&(0,i.addEvent)(e,u.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const e=this.findDOMNode();if(e){const{ownerDocument:t}=e;(0,i.removeEvent)(t,h.move,this.handleDrag),(0,i.removeEvent)(t,u.move,this.handleDrag),(0,i.removeEvent)(t,h.stop,this.handleDragStop),(0,i.removeEvent)(t,u.stop,this.handleDragStop),(0,i.removeEvent)(e,u.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,i.scheduleRemoveUserSelectStyles)(t)}}findDOMNode(){return this.props?.nodeRef?this.props?.nodeRef?.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 WC.default=f,d(f,"displayName","DraggableCore"),d(f,"propTypes",{allowAnyClick:t.default.bool,allowMobileScroll: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:a.dontSetMe,style:a.dontSetMe,transform:a.dontSetMe}),d(f,"defaultProps",{allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),WC}function ZC(){return FC||(FC=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return d.default}}),e.default=void 0;var t=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,r=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var o,i,s={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return s;if(o=t?r:n){if(o.has(e))return o.get(e);o.set(e,s)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(i.get||i.set)?o(s,t,i):s[t]=e[t]);return s}(e,t)}(n),r=h(MC()),i=h(o),s=function(){if(EC)return TC.exports;function e(t){var n,r,o="";if("string"==typeof t||"number"==typeof t)o+=t;else if("object"==typeof t)if(Array.isArray(t)){var i=t.length;for(n=0;n<i;n++)t[n]&&(r=e(t[n]))&&(o&&(o+=" "),o+=r)}else for(r in t)t[r]&&(o&&(o+=" "),o+=r);return o}function t(){for(var t,n,r=0,o="",i=arguments.length;r<i;r++)(t=arguments[r])&&(n=e(t))&&(o&&(o+=" "),o+=n);return o}return EC=1,TC.exports=t,TC.exports.clsx=t,TC.exports}(),a=PC(),l=BC(),c=RC(),d=h(GC()),u=h(KC());function h(e){return e&&e.__esModule?e:{default:e}}function p(){return p=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},p.apply(null,arguments)}function f(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!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:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class m 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,u.default)("Draggable: getDerivedStateFromProps %j",{position:n,prevPropsPosition:r}),{x:n.x,y:n.y,prevPropsPosition:{...n}})}constructor(e){super(e),f(this,"onDragStart",((e,t)=>{(0,u.default)("Draggable: onDragStart: %j",t);if(!1===this.props.onStart(e,(0,l.createDraggableData)(this,t)))return!1;this.setState({dragging:!0,dragged:!0})})),f(this,"onDrag",((e,t)=>{if(!this.state.dragging)return!1;(0,u.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)})),f(this,"onDragStop",((e,t)=>{if(!this.state.dragging)return!1;if(!1===this.props.onStop(e,(0,l.createDraggableData)(this,t)))return!1;(0,u.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.state.dragging&&this.setState({dragging:!1})}findDOMNode(){return this.props?.nodeRef?.current??i.default.findDOMNode(this)}render(){const{axis:e,bounds:n,children:r,defaultPosition:o,defaultClassName:i,defaultClassNameDragging:c,defaultClassNameDragged:u,position:h,positionOffset:f,scale:m,...g}=this.props;let v={},b=null;const y=!Boolean(h)||this.state.dragging,x=h||o,w={x:(0,l.canDragX)(this)&&y?this.state.x:x.x,y:(0,l.canDragY)(this)&&y?this.state.y:x.y};this.state.isElementSVG?b=(0,a.createSVGTransform)(w,f):v=(0,a.createCSSTransform)(w,f);const C=(0,s.clsx)(r.props.className||"",i,{[c]:this.state.dragging,[u]:this.state.dragged});return t.createElement(d.default,p({},g,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),t.cloneElement(t.Children.only(r),{className:C,style:{...r.props.style,...v},transform:b}))}}e.default=m,f(m,"displayName","Draggable"),f(m,"propTypes",{...d.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}),f(m,"defaultProps",{...d.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})}(iC)),iC}var JC=function(){if(qC)return oC.exports;qC=1;const{default:e,DraggableCore:t}=ZC();return oC.exports=e,oC.exports.default=e,oC.exports.DraggableCore=t,oC.exports}(),XC=lp(JC);const YC=(e="medium",t,n,r)=>{const o=t?u(t):{xsmall:"15rem",small:"20rem",medium:"30rem",large:"40rem",xlarge:"60rem","full-width":"90%"}[e]||"15rem",s=r?u(r):{xsmall:"35rem",small:"45rem",medium:"45rem",large:"45rem",xlarge:"45rem","full-width":"unset"}[e]||"35rem",a="unset"===s?"80vh":`min(${s}, 80vh)`;let l="auto";return n?l=u(n):"full-width"===e&&(l="90%"),i.css`
2515
+ */function SC(){return uC||(uC=1,"production"===process.env.NODE_ENV?lC.exports=function(){if(oC)return cC;oC=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,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function y(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case t:switch(e=e.type){case l:case c:case r:case i:case o:case u:return e;default:switch(e=e&&e.$$typeof){case a:case d:case f:case p:case s:return e;default:return h}}case n:return h}}}function x(e){return y(e)===c}return cC.AsyncMode=l,cC.ConcurrentMode=c,cC.ContextConsumer=a,cC.ContextProvider=s,cC.Element=t,cC.ForwardRef=d,cC.Fragment=r,cC.Lazy=f,cC.Memo=p,cC.Portal=n,cC.Profiler=i,cC.StrictMode=o,cC.Suspense=u,cC.isAsyncMode=function(e){return x(e)||y(e)===l},cC.isConcurrentMode=x,cC.isContextConsumer=function(e){return y(e)===a},cC.isContextProvider=function(e){return y(e)===s},cC.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},cC.isForwardRef=function(e){return y(e)===d},cC.isFragment=function(e){return y(e)===r},cC.isLazy=function(e){return y(e)===f},cC.isMemo=function(e){return y(e)===p},cC.isPortal=function(e){return y(e)===n},cC.isProfiler=function(e){return y(e)===i},cC.isStrictMode=function(e){return y(e)===o},cC.isSuspense=function(e){return y(e)===u},cC.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===i||e===o||e===u||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===p||e.$$typeof===s||e.$$typeof===a||e.$$typeof===d||e.$$typeof===g||e.$$typeof===v||e.$$typeof===b||e.$$typeof===m)},cC.typeOf=y,cC}():lC.exports=(dC||(dC=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,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function y(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case t:var m=e.type;switch(m){case l:case c:case r:case i:case o:case u:return m;default:var g=m&&m.$$typeof;switch(g){case a:case d:case f:case p:case s:return g;default:return h}}case n:return h}}}var x=l,w=c,C=a,k=s,S=t,$=d,j=r,M=f,E=p,T=n,O=i,L=o,A=u,R=!1;function N(e){return y(e)===c}kC.AsyncMode=x,kC.ConcurrentMode=w,kC.ContextConsumer=C,kC.ContextProvider=k,kC.Element=S,kC.ForwardRef=$,kC.Fragment=j,kC.Lazy=M,kC.Memo=E,kC.Portal=T,kC.Profiler=O,kC.StrictMode=L,kC.Suspense=A,kC.isAsyncMode=function(e){return R||(R=!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.")),N(e)||y(e)===l},kC.isConcurrentMode=N,kC.isContextConsumer=function(e){return y(e)===a},kC.isContextProvider=function(e){return y(e)===s},kC.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},kC.isForwardRef=function(e){return y(e)===d},kC.isFragment=function(e){return y(e)===r},kC.isLazy=function(e){return y(e)===f},kC.isMemo=function(e){return y(e)===p},kC.isPortal=function(e){return y(e)===n},kC.isProfiler=function(e){return y(e)===i},kC.isStrictMode=function(e){return y(e)===o},kC.isSuspense=function(e){return y(e)===u},kC.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===i||e===o||e===u||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===p||e.$$typeof===s||e.$$typeof===a||e.$$typeof===d||e.$$typeof===g||e.$$typeof===v||e.$$typeof===b||e.$$typeof===m)},kC.typeOf=y}()),kC)),lC.exports}function $C(){if(pC)return hC;pC=1;return hC="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function jC(){return mC?fC:(mC=1,fC=Function.call.bind(Object.prototype.hasOwnProperty))}function MC(){if(yC)return bC;yC=1;var e=SC(),t=s,n=$C(),r=jC(),o=function(){if(vC)return gC;vC=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=$C(),n={},r=jC();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function o(o,i,s,a,l){if("production"!==process.env.NODE_ENV)for(var c in o)if(r(o,c)){var d;try{if("function"!=typeof o[c]){var u=Error((a||"React class")+": "+s+" 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 u.name="Invariant Violation",u}d=o[c](i,c,a,s,null,t)}catch(e){d=e}if(!d||d instanceof Error||e((a||"React class")+": type specification of "+s+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var h=l?l():"";e("Failed "+s+" type: "+d.message+(null!=h?h:""))}}}return o.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(n={})},gC=o}(),i=function(){};function a(){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){}}),bC=function(s,l){var c="function"==typeof Symbol&&Symbol.iterator;var d="<<anonymous>>",u={array:m("array"),bigint:m("bigint"),bool:m("boolean"),func:m("function"),number:m("number"),object:m("object"),string:m("string"),symbol:m("symbol"),any:f(a),arrayOf:function(e){return f((function(t,r,o,i,s){if("function"!=typeof e)return new p("Property `"+s+"` of component `"+o+"` has invalid PropType notation inside arrayOf.");var a=t[r];if(!Array.isArray(a))return new p("Invalid "+i+" `"+s+"` of type `"+b(a)+"` supplied to `"+o+"`, expected an array.");for(var l=0;l<a.length;l++){var c=e(a,l,o,i,s+"["+l+"]",n);if(c instanceof Error)return c}return null}))},element:f((function(e,t,n,r,o){var i=e[t];return s(i)?null:new p("Invalid "+r+" `"+o+"` of type `"+b(i)+"` supplied to `"+n+"`, expected a single ReactElement.")})),elementType:f((function(t,n,r,o,i){var s=t[n];return e.isValidElementType(s)?null:new p("Invalid "+o+" `"+i+"` of type `"+b(s)+"` 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 s=e.name||d;return new p("Invalid "+o+" `"+i+"` of type `"+(((a=t[n]).constructor&&a.constructor.name?a.constructor.name:d)+"` supplied to `")+r+"`, expected instance of `"+s+"`.")}var a;return null}))},node:f((function(e,t,n,r,o){return v(e[t])?null:new p("Invalid "+r+" `"+o+"` supplied to `"+n+"`, expected a ReactNode.")})),objectOf:function(e){return f((function(t,o,i,s,a){if("function"!=typeof e)return new p("Property `"+a+"` of component `"+i+"` has invalid PropType notation inside objectOf.");var l=t[o],c=b(l);if("object"!==c)return new p("Invalid "+s+" `"+a+"` of type `"+c+"` supplied to `"+i+"`, expected an object.");for(var d in l)if(r(l,d)){var u=e(l,d,i,s,a+"."+d,n);if(u instanceof Error)return u}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."),a;return f((function(t,n,r,o,i){for(var s=t[n],a=0;a<e.length;a++)if(h(s,e[a]))return null;var l=JSON.stringify(e,(function(e,t){return"symbol"===y(t)?String(t):t}));return new p("Invalid "+o+" `"+i+"` of value `"+String(s)+"` 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."),a;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 "+x(o)+" at index "+t+"."),a}return f((function(t,o,i,s,a){for(var l=[],c=0;c<e.length;c++){var d=(0,e[c])(t,o,i,s,a,n);if(null==d)return null;d.data&&r(d.data,"expectedType")&&l.push(d.data.expectedType)}return new p("Invalid "+s+" `"+a+"` supplied to `"+i+"`"+(l.length>0?", expected one of type ["+l.join(", ")+"]":"")+".")}))},shape:function(e){return f((function(t,r,o,i,s){var a=t[r],l=b(a);if("object"!==l)return new p("Invalid "+i+" `"+s+"` of type `"+l+"` supplied to `"+o+"`, expected `object`.");for(var c in e){var d=e[c];if("function"!=typeof d)return g(o,i,s,c,y(d));var u=d(a,c,o,i,s+"."+c,n);if(u)return u}return null}))},exact:function(e){return f((function(o,i,s,a,l){var c=o[i],d=b(c);if("object"!==d)return new p("Invalid "+a+" `"+l+"` of type `"+d+"` supplied to `"+s+"`, expected `object`.");var u=t({},o[i],e);for(var h in u){var f=e[h];if(r(e,h)&&"function"!=typeof f)return g(s,a,l,h,y(f));if(!f)return new p("Invalid "+a+" `"+l+"` key `"+h+"` supplied to `"+s+"`.\nBad object: "+JSON.stringify(o[i],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var m=f(c,h,s,a,l+"."+h,n);if(m)return m}return null}))}};function h(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function p(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,s,a,c,u,h,f){if(c=c||d,h=h||a,f!==n){if(l){var m=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 m.name="Invariant Violation",m}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var g=c+":"+a;!t[g]&&r<3&&(i("You are manually calling a React.PropTypes validation function for the `"+h+"` 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==s[a]?o?null===s[a]?new p("The "+u+" `"+h+"` is marked as required in `"+c+"`, but its value is `null`."):new p("The "+u+" `"+h+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(s,a,c,u,h)}var s=o.bind(null,!1);return s.isRequired=o.bind(null,!0),s}function m(e){return f((function(t,n,r,o,i,s){var a=t[n];return b(a)!==e?new p("Invalid "+o+" `"+i+"` of type `"+y(a)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null}))}function g(e,t,n,r,o){return new p((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||s(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 b(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 y(e){if(null==e)return""+e;var t=b(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function x(e){var t=y(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return p.prototype=Error.prototype,u.checkPropTypes=o,u.resetWarningCache=o.resetWarningCache,u.PropTypes=u,u},bC}function EC(){if(CC)return aC.exports;if(CC=1,"production"!==process.env.NODE_ENV){var e=SC();aC.exports=MC()(e.isElement,!0)}else aC.exports=function(){if(wC)return xC;wC=1;var e=$C();function t(){}function n(){}return n.resetWarningCache=t,xC=function(){function r(t,n,r,o,i,s){if(s!==e){var a=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 a.name="Invariant Violation",a}}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},xC}()();return aC.exports}var TC,OC={exports:{}};var LC,AC={},RC={};function NC(){if(LC)return RC;return LC=1,Object.defineProperty(RC,"__esModule",{value:!0}),RC.dontSetMe=function(e,t,n){if(e[t])return new Error(`Invalid prop ${t} passed to ${n} - do not set this, set it on the child.`)},RC.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]},RC.int=function(e){return parseInt(e,10)},RC.isFunction=function(e){return"function"==typeof e||"[object Function]"===Object.prototype.toString.call(e)},RC.isNum=function(e){return"number"==typeof e&&!isNaN(e)},RC}var DC,IC,PC={};function zC(){if(IC)return AC;IC=1,Object.defineProperty(AC,"__esModule",{value:!0}),AC.addClassName=s,AC.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},AC.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&&s(e.body,"react-draggable-transparent-selection")},AC.createCSSTransform=function(e,n){const r=o(e,n,"px");return{[(0,t.browserPrefixToKey)("transform",t.default)]:r}},AC.createSVGTransform=function(e,t){return o(e,t,"")},AC.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))},AC.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},AC.getTranslation=o,AC.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},AC.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},AC.matchesSelector=r,AC.matchesSelectorAndParentsTo=function(e,t,n){let o=e;do{if(r(o,t))return!0;if(o===n)return!1;o=o.parentNode}while(o);return!1},AC.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}},AC.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},AC.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},AC.removeClassName=a,AC.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},AC.scheduleRemoveUserSelectStyles=function(e){window.requestAnimationFrame?window.requestAnimationFrame((()=>{i(e)})):i(e)};var e=NC(),t=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,r=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var o,i,s={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return s;if(o=t?r:n){if(o.has(e))return o.get(e);o.set(e,s)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(i.get||i.set)?o(s,t,i):s[t]=e[t]);return s}(e,t)}(function(){if(DC)return PC;DC=1,Object.defineProperty(PC,"__esModule",{value:!0}),PC.browserPrefixToKey=n,PC.browserPrefixToStyle=function(e,t){return t?`-${t.toLowerCase()}-${e}`:e},PC.default=void 0,PC.getPrefix=t;const e=["Moz","Webkit","O","ms"];function t(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"==typeof window)return"";const r=window.document?.documentElement?.style;if(!r)return"";if(t in r)return"";for(let o=0;o<e.length;o++)if(n(t,e[o])in r)return e[o];return""}function n(e,t){return t?`${t}${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 PC.default=t(),PC}());let n="";function r(t,r){return n||(n=(0,e.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],(function(n){return(0,e.isFunction)(t[n])}))),!!(0,e.isFunction)(t[n])&&t[n](r)}function o(e,t,n){let{x:r,y:o}=e,i=`translate(${r}${n},${o}${n})`;if(t){i=`translate(${`${"string"==typeof t.x?t.x:t.x+n}`}, ${`${"string"==typeof t.y?t.y:t.y+n}`})`+i}return i}function i(e){if(e)try{if(e.body&&a(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){}}function s(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp(`(?:^|\\s)${t}(?!\\S)`))||(e.className+=` ${t}`)}function a(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp(`(?:^|\\s)${t}(?!\\S)`,"g"),"")}return AC}var VC,BC={};function HC(){if(VC)return BC;VC=1,Object.defineProperty(BC,"__esModule",{value:!0}),BC.canDragX=function(e){return"both"===e.props.axis||"x"===e.props.axis},BC.canDragY=function(e){return"both"===e.props.axis||"y"===e.props.axis},BC.createCoreData=function(t,r,o){const i=!(0,e.isNum)(t.lastX),s=n(t);return i?{node:s,deltaX:0,deltaY:0,lastX:r,lastY:o,x:r,y:o}:{node:s,deltaX:r-t.lastX,deltaY:o-t.lastY,lastX:t.lastX,lastY:t.lastY,x:r,y:o}},BC.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}},BC.getBoundPosition=function(r,o,i){if(!r.props.bounds)return[o,i];let{bounds:s}=r.props;s="string"==typeof s?s:function(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}(s);const a=n(r);if("string"==typeof s){const{ownerDocument:n}=a,r=n.defaultView;let o;if("parent"===s)o=a.parentNode;else{o=a.getRootNode().querySelector(s)}if(!(o instanceof r.HTMLElement))throw new Error('Bounds selector "'+s+'" could not find an element.');const i=o,l=r.getComputedStyle(a),c=r.getComputedStyle(i);s={left:-a.offsetLeft+(0,e.int)(c.paddingLeft)+(0,e.int)(l.marginLeft),top:-a.offsetTop+(0,e.int)(c.paddingTop)+(0,e.int)(l.marginTop),right:(0,t.innerWidth)(i)-(0,t.outerWidth)(a)-a.offsetLeft+(0,e.int)(c.paddingRight)-(0,e.int)(l.marginRight),bottom:(0,t.innerHeight)(i)-(0,t.outerHeight)(a)-a.offsetTop+(0,e.int)(c.paddingBottom)-(0,e.int)(l.marginBottom)}}(0,e.isNum)(s.right)&&(o=Math.min(o,s.right));(0,e.isNum)(s.bottom)&&(i=Math.min(i,s.bottom));(0,e.isNum)(s.left)&&(o=Math.max(o,s.left));(0,e.isNum)(s.top)&&(i=Math.max(i,s.top));return[o,i]},BC.getControlPosition=function(e,r,o){const i="number"==typeof r?(0,t.getTouch)(e,r):null;if("number"==typeof r&&!i)return null;const s=n(o),a=o.props.offsetParent||s.offsetParent||s.ownerDocument.body;return(0,t.offsetXYFromParent)(i||e,a,o.props.scale)},BC.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=NC(),t=zC();function n(e){const t=e.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}return BC}var _C,FC,qC,WC,UC={},KC={};function GC(){if(_C)return KC;return _C=1,Object.defineProperty(KC,"__esModule",{value:!0}),KC.default=function(){},KC}function ZC(){if(FC)return UC;FC=1,Object.defineProperty(UC,"__esModule",{value:!0}),UC.default=void 0;var e=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,r=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var o,i,s={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return s;if(o=t?r:n){if(o.has(e))return o.get(e);o.set(e,s)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(i.get||i.set)?o(s,t,i):s[t]=e[t]);return s}(e,t)}(n),t=c(EC()),r=c(o),i=zC(),s=HC(),a=NC(),l=c(GC());function c(e){return e&&e.__esModule?e:{default:e}}function d(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!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:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const u={start:"touchstart",move:"touchmove",stop:"touchend"},h={start:"mousedown",move:"mousemove",stop:"mouseup"};let p=h,f=class extends e.Component{constructor(){super(...arguments),d(this,"dragging",!1),d(this,"lastX",NaN),d(this,"lastY",NaN),d(this,"touchIdentifier",null),d(this,"mounted",!1),d(this,"handleDragStart",(e=>{if(this.props.onMouseDown(e),!this.props.allowAnyClick&&"number"==typeof e.button&&0!==e.button)return!1;const t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:n}=t;if(this.props.disabled||!(e.target instanceof n.defaultView.Node)||this.props.handle&&!(0,i.matchesSelectorAndParentsTo)(e.target,this.props.handle,t)||this.props.cancel&&(0,i.matchesSelectorAndParentsTo)(e.target,this.props.cancel,t))return;"touchstart"!==e.type||this.props.allowMobileScroll||e.preventDefault();const r=(0,i.getTouchIdentifier)(e);this.touchIdentifier=r;const o=(0,s.getControlPosition)(e,r,this);if(null==o)return;const{x:a,y:c}=o,d=(0,s.createCoreData)(this,a,c);(0,l.default)("DraggableCore: handleDragStart: %j",d),(0,l.default)("calling",this.props.onStart);!1!==this.props.onStart(e,d)&&!1!==this.mounted&&(this.props.enableUserSelectHack&&(0,i.addUserSelectStyles)(n),this.dragging=!0,this.lastX=a,this.lastY=c,(0,i.addEvent)(n,p.move,this.handleDrag),(0,i.addEvent)(n,p.stop,this.handleDragStop))})),d(this,"handleDrag",(e=>{const t=(0,s.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,s.snapToGrid)(this.props.grid,e,t),!e&&!t)return;n=this.lastX+e,r=this.lastY+t}const o=(0,s.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,s.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,s.snapToGrid)(this.props.grid,e,t),n=this.lastX+e,r=this.lastY+t}const o=(0,s.createCoreData)(this,n,r);if(!1===this.props.onStop(e,o)||!1===this.mounted)return!1;const a=this.findDOMNode();a&&this.props.enableUserSelectHack&&(0,i.scheduleRemoveUserSelectStyles)(a.ownerDocument),(0,l.default)("DraggableCore: handleDragStop: %j",o),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,a&&((0,l.default)("DraggableCore: Removing handlers"),(0,i.removeEvent)(a.ownerDocument,p.move,this.handleDrag),(0,i.removeEvent)(a.ownerDocument,p.stop,this.handleDragStop))})),d(this,"onMouseDown",(e=>(p=h,this.handleDragStart(e)))),d(this,"onMouseUp",(e=>(p=h,this.handleDragStop(e)))),d(this,"onTouchStart",(e=>(p=u,this.handleDragStart(e)))),d(this,"onTouchEnd",(e=>(p=u,this.handleDragStop(e))))}componentDidMount(){this.mounted=!0;const e=this.findDOMNode();e&&(0,i.addEvent)(e,u.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const e=this.findDOMNode();if(e){const{ownerDocument:t}=e;(0,i.removeEvent)(t,h.move,this.handleDrag),(0,i.removeEvent)(t,u.move,this.handleDrag),(0,i.removeEvent)(t,h.stop,this.handleDragStop),(0,i.removeEvent)(t,u.stop,this.handleDragStop),(0,i.removeEvent)(e,u.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,i.scheduleRemoveUserSelectStyles)(t)}}findDOMNode(){return this.props?.nodeRef?this.props?.nodeRef?.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 UC.default=f,d(f,"displayName","DraggableCore"),d(f,"propTypes",{allowAnyClick:t.default.bool,allowMobileScroll: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:a.dontSetMe,style:a.dontSetMe,transform:a.dontSetMe}),d(f,"defaultProps",{allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),UC}function JC(){return qC||(qC=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return d.default}}),e.default=void 0;var t=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,r=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var o,i,s={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return s;if(o=t?r:n){if(o.has(e))return o.get(e);o.set(e,s)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(i.get||i.set)?o(s,t,i):s[t]=e[t]);return s}(e,t)}(n),r=h(EC()),i=h(o),s=function(){if(TC)return OC.exports;function e(t){var n,r,o="";if("string"==typeof t||"number"==typeof t)o+=t;else if("object"==typeof t)if(Array.isArray(t)){var i=t.length;for(n=0;n<i;n++)t[n]&&(r=e(t[n]))&&(o&&(o+=" "),o+=r)}else for(r in t)t[r]&&(o&&(o+=" "),o+=r);return o}function t(){for(var t,n,r=0,o="",i=arguments.length;r<i;r++)(t=arguments[r])&&(n=e(t))&&(o&&(o+=" "),o+=n);return o}return TC=1,OC.exports=t,OC.exports.clsx=t,OC.exports}(),a=zC(),l=HC(),c=NC(),d=h(ZC()),u=h(GC());function h(e){return e&&e.__esModule?e:{default:e}}function p(){return p=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},p.apply(null,arguments)}function f(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!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:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class m 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,u.default)("Draggable: getDerivedStateFromProps %j",{position:n,prevPropsPosition:r}),{x:n.x,y:n.y,prevPropsPosition:{...n}})}constructor(e){super(e),f(this,"onDragStart",((e,t)=>{(0,u.default)("Draggable: onDragStart: %j",t);if(!1===this.props.onStart(e,(0,l.createDraggableData)(this,t)))return!1;this.setState({dragging:!0,dragged:!0})})),f(this,"onDrag",((e,t)=>{if(!this.state.dragging)return!1;(0,u.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)})),f(this,"onDragStop",((e,t)=>{if(!this.state.dragging)return!1;if(!1===this.props.onStop(e,(0,l.createDraggableData)(this,t)))return!1;(0,u.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.state.dragging&&this.setState({dragging:!1})}findDOMNode(){return this.props?.nodeRef?.current??i.default.findDOMNode(this)}render(){const{axis:e,bounds:n,children:r,defaultPosition:o,defaultClassName:i,defaultClassNameDragging:c,defaultClassNameDragged:u,position:h,positionOffset:f,scale:m,...g}=this.props;let v={},b=null;const y=!Boolean(h)||this.state.dragging,x=h||o,w={x:(0,l.canDragX)(this)&&y?this.state.x:x.x,y:(0,l.canDragY)(this)&&y?this.state.y:x.y};this.state.isElementSVG?b=(0,a.createSVGTransform)(w,f):v=(0,a.createCSSTransform)(w,f);const C=(0,s.clsx)(r.props.className||"",i,{[c]:this.state.dragging,[u]:this.state.dragged});return t.createElement(d.default,p({},g,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),t.cloneElement(t.Children.only(r),{className:C,style:{...r.props.style,...v},transform:b}))}}e.default=m,f(m,"displayName","Draggable"),f(m,"propTypes",{...d.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}),f(m,"defaultProps",{...d.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})}(sC)),sC}var XC=function(){if(WC)return iC.exports;WC=1;const{default:e,DraggableCore:t}=JC();return iC.exports=e,iC.exports.default=e,iC.exports.DraggableCore=t,iC.exports}(),YC=lp(XC);const QC=(e="medium",t,n,r)=>{const o=t?u(t):{xsmall:"15rem",small:"20rem",medium:"30rem",large:"40rem",xlarge:"60rem","full-width":"90%"}[e]||"15rem",s=r?u(r):{xsmall:"35rem",small:"45rem",medium:"45rem",large:"45rem",xlarge:"45rem","full-width":"unset"}[e]||"35rem",a="unset"===s?"80vh":`min(${s}, 80vh)`;let l="auto";return n?l=u(n):"full-width"===e&&(l="90%"),i.css`
2505
2516
  max-width: 100%;
2506
2517
  width: ${o};
2507
2518
  height: ${l};
@@ -2511,7 +2522,7 @@
2511
2522
  border-radius: ${$(300)};
2512
2523
  box-shadow: 0 0.25rem 0.375rem -0.25rem #0000001a;
2513
2524
  box-shadow: 0 0.625rem 0.9375rem -0.1875rem #0000001a;
2514
- `},QC=i.css`
2525
+ `},ek=i.css`
2515
2526
  height: 100%;
2516
2527
  min-height: ${k(1e3)};
2517
2528
  display: flex;
@@ -2520,29 +2531,29 @@
2520
2531
  padding: ${k(200)};
2521
2532
  border-bottom: ${j(100)} solid
2522
2533
  ${w("neutral",300)};
2523
- `,ek=i.css`
2524
- top: ${k(300)};
2525
2534
  `,tk=i.css`
2535
+ top: ${k(300)};
2536
+ `,nk=i.css`
2526
2537
  padding: ${k(300)};
2527
- `,nk=e=>i.css`
2538
+ `,rk=e=>i.css`
2528
2539
  height: 100%;
2529
2540
  width: ${e||"20rem"};
2530
2541
  background-color: ${w("neutral",100)};
2531
2542
  box-shadow: 0 0.0625rem 0.125rem -0.0625rem #0000001a;
2532
2543
  box-shadow: 0 0.0625rem 0.1875rem 0 #0000001a;
2533
2544
  position: relative;
2534
- `,rk=i.css`
2545
+ `,ok=i.css`
2535
2546
  border-right: ${j(100)} solid
2536
2547
  ${w("neutral",300)};
2537
- `,ok=i.css`
2548
+ `,ik=i.css`
2538
2549
  border: ${j(100)} solid ${w("neutral",300)};
2539
2550
  border-radius: ${$(300)};
2540
- `,ik=i.css`
2551
+ `,sk=i.css`
2541
2552
  min-height: ${k(1200)};
2542
2553
  width: 100%;
2543
2554
  border-bottom: ${j(100)} solid
2544
2555
  ${w("neutral",300)};
2545
- `,sk=(e,t)=>i.css`
2556
+ `,ak=(e,t)=>i.css`
2546
2557
  height: ${((e,t)=>e&&t?`calc(100% - ${(e+t)/16}rem)`:e?`calc(100% - ${e/16}rem)`:t?`calc(100% - ${t/16}rem)`:"100%")(e,t)};
2547
2558
  width: 100%;
2548
2559
  overflow-y: auto;
@@ -2550,7 +2561,7 @@
2550
2561
  &:focus-visible {
2551
2562
  outline-color: ${w("primary",700)};
2552
2563
  }
2553
- `,ak=i.css`
2564
+ `,lk=i.css`
2554
2565
  min-height: ${k(1600)};
2555
2566
  width: 100%;
2556
2567
  display: flex;
@@ -2561,7 +2572,7 @@
2561
2572
  left: 0;
2562
2573
  border-top: ${j(100)} solid
2563
2574
  ${w("neutral",300)};
2564
- `;var lk,ck;!function(){if(ck)return lk;ck=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))}}lk=e}();var dk=uk()?n.useLayoutEffect:n.useEffect;"production"!==process.env.NODE_ENV&&("undefined"!=typeof process?process:{env:{NODE_ENV:"development"}}).env;function uk(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}process.env.NODE_ENV,process.env.NODE_ENV,process.env.NODE_ENV;var hk=function(e){var t,r=e.children,i=e.type,s=void 0===i?"reach-portal":i,a=n.useRef(null),l=n.useRef(null),c=(t=n.useState(Object.create(null))[1],n.useCallback((function(){t(Object.create(null))}),[]));return dk((function(){if(a.current){var e=a.current.ownerDocument;return l.current=null==e?void 0:e.createElement(s),e.body.appendChild(l.current),c(),function(){l.current&&l.current.ownerDocument&&l.current.ownerDocument.body.removeChild(l.current)}}}),[s,c]),l.current?o.createPortal(r,l.current):n.createElement("span",{ref:a})};"production"!==process.env.NODE_ENV&&(hk.displayName="Portal");
2575
+ `;var ck,dk;!function(){if(dk)return ck;dk=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))}}ck=e}();var uk=hk()?n.useLayoutEffect:n.useEffect;"production"!==process.env.NODE_ENV&&("undefined"!=typeof process?process:{env:{NODE_ENV:"development"}}).env;function hk(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}process.env.NODE_ENV,process.env.NODE_ENV,process.env.NODE_ENV;var pk=function(e){var t,r=e.children,i=e.type,s=void 0===i?"reach-portal":i,a=n.useRef(null),l=n.useRef(null),c=(t=n.useState(Object.create(null))[1],n.useCallback((function(){t(Object.create(null))}),[]));return uk((function(){if(a.current){var e=a.current.ownerDocument;return l.current=null==e?void 0:e.createElement(s),e.body.appendChild(l.current),c(),function(){l.current&&l.current.ownerDocument&&l.current.ownerDocument.body.removeChild(l.current)}}}),[s,c]),l.current?o.createPortal(r,l.current):n.createElement("span",{ref:a})};"production"!==process.env.NODE_ENV&&(pk.displayName="Portal");
2565
2576
  /*! *****************************************************************************
2566
2577
  Copyright (c) Microsoft Corporation.
2567
2578
 
@@ -2575,16 +2586,16 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
2575
2586
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
2576
2587
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
2577
2588
  PERFORMANCE OF THIS SOFTWARE.
2578
- ***************************************************************************** */var pk,fk,mk=function(){return mk=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},mk.apply(this,arguments)};function gk(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 vk(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 bk(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.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 s}function yk(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"}(pk||(pk={})),function(e){e.Parent="#_parent",e.Internal="#_internal"}(fk||(fk={}));var xk=pk.Start,wk=pk.Stop,Ck=pk.Raise,kk=pk.Send,Sk=pk.Cancel,$k=pk.NullEvent,jk=pk.Assign;pk.After,pk.DoneState;var Mk=pk.Log,Ek=pk.Init,Tk=pk.Invoke;pk.ErrorExecution;var Ok,Lk=pk.ErrorPlatform,Ak=pk.ErrorCustom,Rk=pk.Update,Nk=pk.Choose,Dk=pk.Pure,Ik={},Pk="xstate.guard",zk="production"===process.env.NODE_ENV;function Vk(e,t,n){void 0===n&&(n=".");var r=_k(e,n),o=_k(t,n);return oS(o)?!!oS(r)&&o===r:oS(r)?r in o:Object.keys(r).every((function(e){return e in o&&Vk(r[e],o[e])}))}function Bk(e){try{return oS(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 Hk(e,t){try{return nS(e)?e:e.toString().split(t)}catch(t){throw new Error("'".concat(e,"' is not a valid state path."))}}function _k(e,t){return"object"==typeof(n=e)&&"value"in n&&"context"in n&&"event"in n&&"_event"in n?e.value:nS(e)?Fk(e):"string"!=typeof e?e:Fk(Hk(e,t));var n}function Fk(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 qk(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 Wk(e,t,n){var r,o,i={};try{for(var s=vk(Object.keys(e)),a=s.next();!a.done;a=s.next()){var l=a.value,c=e[l];n(c)&&(i[l]=t(c,l,e))}}catch(e){r={error:e}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}return i}var Uk=function(e){return function(t){var n,r,o=t;try{for(var i=vk(e),s=i.next();!s.done;s=i.next()){o=o[s.value]}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return o}};function Kk(e){return e?oS(e)?[[e]]:Gk(Object.keys(e).map((function(t){var n=e[t];return"string"==typeof n||n&&Object.keys(n).length?Kk(e[t]).map((function(e){return[t].concat(e)})):[[t]]}))):[[]]}function Gk(e){var t;return(t=[]).concat.apply(t,yk([],bk(e),!1))}function Zk(e){return nS(e)?e:[e]}function Jk(e){return void 0===e?[]:Zk(e)}function Xk(e,t,n){var r,o;if(rS(e))return e(t,n.data);var i={};try{for(var s=vk(Object.keys(e)),a=s.next();!a.done;a=s.next()){var l=a.value,c=e[l];rS(c)?i[l]=c(t,n.data):i[l]=c}}catch(e){r={error:e}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}return i}function Yk(e){return e instanceof Promise||!(null===e||!rS(e)&&"object"!=typeof e||!rS(e.then))}function Qk(e,t){return qk(e.states,(function(e,n){if(e){var r=(oS(t)?void 0:t[n])||(e?e.current:void 0);if(r)return{current:r,states:Qk(e,r)}}}))}function eS(e,t,n,r){zk||tS(!!e,"Attempting to update undefined context");var o=e?n.reduce((function(e,n){var o,i,s=n.assignment,a={state:r,action:n,_event:t},l={};if(rS(s))l=s(e,t.data,a);else try{for(var c=vk(Object.keys(s)),d=c.next();!d.done;d=c.next()){var u=d.value,h=s[u];l[u]=rS(h)?h(e,t.data,a):h}}catch(e){o={error:e}}finally{try{d&&!d.done&&(i=c.return)&&i.call(c)}finally{if(o)throw o.error}}return Object.assign({},e,l)}),e):e;return o}var tS=function(){};function nS(e){return Array.isArray(e)}function rS(e){return"function"==typeof e}function oS(e){return"string"==typeof e}function iS(e,t){if(e)return oS(e)?{type:Pk,name:e,predicate:t?t[e]:void 0}:rS(e)?{type:Pk,name:e.name,predicate:e}:e}zk||(tS=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 sS=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}();function aS(e){return!!e&&"__xstatenode"in e}function lS(e,t){return oS(e)||"number"==typeof e?mk({type:e},t):e}function cS(e,t){if(!oS(e)&&"$$type"in e&&"scxml"===e.$$type)return e;var n=lS(e);return mk({name:n.type,data:n,$$type:"scxml",type:"external"},t)}function dS(e,t){return Zk(t).map((function(t){return void 0===t||"string"==typeof t||aS(t)?{target:t,event:e}:mk(mk({},t),{event:e})}))}function uS(e,t,n,r,o){var i=e.options.guards,s={state:o,cond:t,_event:r};if(t.type===Pk)return((null==i?void 0:i[t.name])||t.predicate)(n,r.data,s);var a=null==i?void 0:i[t.type];if(!a)throw new Error("Guard '".concat(t.type,"' is not implemented on machine '").concat(e.id,"'."));return a(n,r.data,s)}function hS(e){return"string"==typeof e?{type:e}:e}function pS(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 fS(e,t){return"".concat(e,":invocation[").concat(t,"]")}function mS(e){return(e.type===Ck||e.type===kk&&e.to===fk.Internal)&&"number"!=typeof e.delay}(Ok={})[sS]=function(){return this},Ok[Symbol.observable]=function(){return this};var gS=cS({type:Ek});function vS(e,t){return t&&t[e]||void 0}function bS(e,t){var n;if(oS(e)||"number"==typeof e)n=rS(r=vS(e,t))?{type:e,exec:r}:r||{type:e,exec:void 0};else if(rS(e))n={type:e.name||e.toString(),exec:e};else{var r;if(rS(r=vS(e.type,t)))n=mk(mk({},e),{exec:r});else if(r){var o=r.type||e.type;n=mk(mk(mk({},r),e),{type:o})}else n=e}return n}var yS=function(e,t){return e?(nS(e)?e:[e]).map((function(e){return bS(e,t)})):[]};function xS(e){var t=bS(e);return mk(mk({id:oS(e)?e:t.id},t),{type:t.type})}function wS(e,t){var n="".concat(pk.DoneState,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function CS(e,t){var n="".concat(pk.DoneInvoke,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function kS(e,t){var n="".concat(pk.ErrorPlatform,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function SS(e,t,n,r,o,i,s){void 0===s&&(s=!1);var a=s?[]:function(e){var t,n,r=[];try{for(var o=vk(e),i=o.next();!i.done;i=o.next())for(var s=i.value,a=0;a<s.actions.length;)s.actions[a].type!==jk?a++:(r.push(s.actions[a]),s.actions.splice(a,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=a.length?eS(n,r,a,t):n,c=s?[n]:void 0,d=[];function u(o,a){var u;switch(a.type){case Ck:var h=function(e,t,n,r){var o,i={_event:n},s=cS(rS(e.event)?e.event(t,n.data,i):e.event);if(oS(e.delay)){var a=r&&r[e.delay];o=rS(a)?a(t,n.data,i):a}else o=rS(e.delay)?e.delay(t,n.data,i):e.delay;return mk(mk({},e),{type:Ck,_event:s,delay:o})}(a,l,r,e.options.delays);return i&&"number"==typeof h.delay&&i(h,l,r),h;case kk:var p=function(e,t,n,r){var o,i={_event:n},s=cS(rS(e.event)?e.event(t,n.data,i):e.event);if(oS(e.delay)){var a=r&&r[e.delay];o=rS(a)?a(t,n.data,i):a}else o=rS(e.delay)?e.delay(t,n.data,i):e.delay;var l=rS(e.to)?e.to(t,n.data,i):e.to;return mk(mk({},e),{to:l,_event:s,event:s.data,delay:o})}(a,l,r,e.options.delays);if(!zk){var f=a.delay;tS(!oS(f)||"number"==typeof p.delay,"No delay reference for delay expression '".concat(f,"' was found on machine '").concat(e.id,"'"))}return i&&p.to!==fk.Internal&&("entry"===o?d.push(p):i(p,l,r)),p;case Mk:var m=function(e,t,n){return mk(mk({},e),{value:oS(e.expr)?e.expr:e.expr(t,n.data,{_event:n})})}(a,l,r);return null==i||i(m,l,r),m;case Nk:if(!(y=null===(u=a.conds.find((function(n){var o=iS(n.cond,e.options.guards);return!o||uS(e,o,l,r,i?void 0:t)})))||void 0===u?void 0:u.actions))return[];var g=bk(SS(e,t,l,r,[{type:o,actions:yS(Jk(y),e.options.actions)}],i,s),2),v=g[0],b=g[1];return l=b,null==c||c.push(l),v;case Dk:var y;if(!(y=a.get(l,r.data)))return[];var x=bk(SS(e,t,l,r,[{type:o,actions:yS(Jk(y),e.options.actions)}],i,s),2),w=x[0],C=x[1];return l=C,null==c||c.push(l),w;case wk:m=function(e,t,n){var r=rS(e.activity)?e.activity(t,n.data):e.activity,o="string"==typeof r?{id:r}:r;return{type:pk.Stop,activity:o}}(a,l,r);return null==i||i(m,n,r),m;case jk:l=eS(l,r,[a],i?void 0:t),null==c||c.push(l);break;default:var k=bS(a,e.options.actions),S=k.exec;if(i)i(k,l,r);else if(S&&c){var $=c.length-1,j=mk(mk({},k),{exec:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];S.apply(void 0,yk([c[$]],bk(t),!1))}});k=j}return k}}var h=Gk(o.map((function(e){var t,n,o=[];try{for(var s=vk(e.actions),a=s.next();!a.done;a=s.next()){var c=a.value,h=u(e.type,c);h&&(o=o.concat(h))}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return d.forEach((function(e){i(e,l,r)})),d.length=0,o})));return[h,l]}var $S=function(e,t){return t(e)};function jS(e){var t;return(t={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:e}}})[sS]=function(){return this},t}function MS(e,t,n){var r=jS(t);if(r.deferred=!0,aS(e)){var o=r.state=$S(void 0,(function(){return(n?e.withContext(n):e).initialState}));r.getSnapshot=function(){return o}}return r}var ES=function(e){return"atomic"===e.type||"final"===e.type};function TS(e){return Object.keys(e.states).map((function(t){return e.states[t]}))}function OS(e){return TS(e).filter((function(e){return"history"!==e.type}))}function LS(e){var t=[e];return ES(e)?t:t.concat(Gk(OS(e).map(LS)))}function AS(e,t){var n,r,o,i,s,a,l,c,d=NS(new Set(e)),u=new Set(t);try{for(var h=vk(u),p=h.next();!p.done;p=h.next())for(var f=(k=p.value).parent;f&&!u.has(f);)u.add(f),f=f.parent}catch(e){n={error:e}}finally{try{p&&!p.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}var m=NS(u);try{for(var g=vk(u),v=g.next();!v.done;v=g.next()){if("compound"!==(k=v.value).type||m.get(k)&&m.get(k).length){if("parallel"===k.type)try{for(var b=(s=void 0,vk(OS(k))),y=b.next();!y.done;y=b.next()){var x=y.value;u.has(x)||(u.add(x),d.get(x)?d.get(x).forEach((function(e){return u.add(e)})):x.initialStateNodes.forEach((function(e){return u.add(e)})))}}catch(e){s={error:e}}finally{try{y&&!y.done&&(a=b.return)&&a.call(b)}finally{if(s)throw s.error}}}else d.get(k)?d.get(k).forEach((function(e){return u.add(e)})):k.initialStateNodes.forEach((function(e){return u.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=vk(u),C=w.next();!C.done;C=w.next()){var k;for(f=(k=C.value).parent;f&&!u.has(f);)u.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 u}function RS(e,t){var n=t.get(e);if(!n)return{};if("compound"===e.type){var r=n[0];if(!r)return{};if(ES(r))return r.key}var o={};return n.forEach((function(e){o[e.key]=RS(e,t)})),o}function NS(e){var t,n,r=new Map;try{for(var o=vk(e),i=o.next();!i.done;i=o.next()){var s=i.value;r.has(s)||r.set(s,[]),s.parent&&(r.has(s.parent)||r.set(s.parent,[]),r.get(s.parent).push(s))}}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 DS(e,t){return RS(e,NS(AS([e],t)))}function IS(e,t){return Array.isArray(e)?e.some((function(e){return e===t})):e instanceof Set&&e.has(t)}function PS(e,t){return"compound"===t.type?OS(t).some((function(t){return"final"===t.type&&IS(e,t)})):"parallel"===t.type&&OS(t).every((function(t){return PS(e,t)}))}function zS(e){return new Set(Gk(e.map((function(e){return e.tags}))))}function VS(e,t){if(e===t)return!0;if(void 0===e||void 0===t)return!1;if(oS(e)||oS(t))return e===t;var n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every((function(n){return VS(e[n],t[n])}))}var BS=function(){function e(e){var t,n,r=this;this.actions=[],this.activities=Ik,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||Ik,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 yk([],bk(new Set(Gk(yk([],bk(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:gS,_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=gS;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="."),oS(e))return[e];var r=Object.keys(e);return r.concat.apply(r,yk([],bk(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=gk(e,["configuration","transitions","tags","machine"]);return mk(mk({},n),{tags:Array.from(t)})},e.prototype.matches=function(e){return Vk(e,this.value)},e.prototype.hasTag=function(e){return this.tags.has(e)},e.prototype.can=function(e){var t;zk&&tS(!!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}(),HS={deferEvents:!1},_S=function(){function e(e){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=mk(mk({},HS),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}(),FS=new Map,qS=0,WS=function(){return"x:".concat(qS++)},US=function(e,t){return FS.set(e,t),e},KS=function(e){return FS.get(e)},GS=function(e){FS.delete(e)};function ZS(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void(zk||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 JS(e){if(ZS()){var t=function(){var e=ZS();if(e&&"__xstate__"in e)return e.__xstate__}();t&&t.register(e)}}function XS(e,t){void 0===t&&(t={});var n=e.initialState,r=new Set,o=[],i=!1,s=function(e){var t;return mk(((t={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}})[sS]=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,a),r.forEach((function(e){return e.next(n)}))}i=!1}}()},getSnapshot:function(){return n},subscribe:function(e,t,o){var i=pS(e,t,o);return r.add(i),i.next(n),{unsubscribe:function(){r.delete(i)}}}}),a={parent:t.parent,self:s,id:t.id||"anonymous",observers:r};return n=e.start?e.start(a):n,s}var YS,QS={sync:!1,autoForward:!1};!function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(YS||(YS={}));var e$=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=YS.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(e,t){if(nS(e))return r.batch(e),r.state;var n=cS(lS(e,t));if(r.status===YS.Stopped)return zk||tS(!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!==YS.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===fk.Parent||r.parent.id===t),s=i?r.parent:oS(t)?t===fk.Internal?r:r.children.get(t)||KS(t):(o=t)&&"function"==typeof o.send?t:void 0;if(s)if("machine"in s){if(r.status!==YS.Stopped||r.parent!==s||r.state.done){var a=mk(mk({},e),{name:e.name===Ak?"".concat(kS(r.id)):e.name,origin:r.sessionId});!n&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([s,a]):s.send(a)}}else!n&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([s,e.data]):s.send(e.data);else{if(!i)throw new Error("Unable to send event to child '".concat(t,"' from service '").concat(r.id,"'."));zk||tS(!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||vS(e.type,o),s=rS(i)?i:i?i.exec:e.exec;if(s)try{return s(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 Ck:var a=e;r.defer(a);break;case kk:var l=e;if("number"==typeof l.delay)return void r.defer(l);l.to?r.sendTo(l._event,l.to,n===gS):r.send(l._event);break;case Sk:r.cancel(e.sendId);break;case xk:if(r.status!==YS.Running)return;var c=e.activity;if(!r.machine.config.predictableActionArguments&&!r.state.activities[c.id||c.type])break;if(c.type===pk.Invoke){var d=hS(c.src),u=r.machine.options.services?r.machine.options.services[d.type]:void 0,h=c.id,p=c.data;zk||tS(!("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(!u)return void(zk||tS(!1,"No service found for invocation '".concat(c.src,"' in machine '").concat(r.machine.id,"'.")));var m=p?Xk(p,t,n):void 0;if("string"==typeof u)return;var g=rS(u)?u(t,n.data,{data:m,src:d,meta:c.meta}):u;if(!g)return;var v=void 0;aS(g)&&(g=m?g.withContext(m):g,v={autoForward:f}),r.spawn(g,h,v)}else r.spawnActivity(c);break;case wk:r.stopChild(e.activity.id);break;case Mk:var b=e,y=b.label,x=b.value;y?r.logger(y,x):r.logger(x);break;default:zk||tS(!1,"No implementation found for action type '".concat(e.type,"'"))}};var o=mk(mk({},e.defaultOptions),n),i=o.clock,s=o.logger,a=o.parent,l=o.id,c=void 0!==l?l:t.id;this.id=c,this.logger=s,this.clock=i,this.parent=a,this.options=o,this.scheduler=new _S({deferEvents:this.options.deferEvents}),this.sessionId=WS()}return Object.defineProperty(e.prototype,"initialState",{get:function(){var e=this;return this._initialState?this._initialState:$S(this,(function(){return e._initialState=e.machine.initialState,e._initialState}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return zk||tS(this.status!==YS.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=vk(e.actions),i=o.next();!i.done;i=o.next()){var s=i.value;this.exec(s,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,s,a,l,c,d=this;if(e._sessionid=this.sessionId,this._state=e,this.machine.config.predictableActionArguments&&t!==gS||!this.options.execute)for(var u=void 0;u=this._outgoingQueue.shift();)u[0].send(u[1]);else this.execute(this.state);if(this.children.forEach((function(e){d.state.children[e.id]=e})),this.devTools&&this.devTools.send(t.data,e),e.event)try{for(var h=vk(this.eventListeners),p=h.next();!p.done;p=h.next()){(0,p.value)(e.event)}}catch(e){n={error:e}}finally{try{p&&!p.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}try{for(var f=vk(this.listeners),m=f.next();!m.done;m=f.next()){(0,m.value)(e,e.event)}}catch(e){o={error:e}}finally{try{m&&!m.done&&(i=f.return)&&i.call(f)}finally{if(o)throw o.error}}try{for(var g=vk(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){s={error:e}}finally{try{v&&!v.done&&(a=g.return)&&a.call(g)}finally{if(s)throw s.error}}if(this.state.done){var b=e.configuration.find((function(e){return"final"===e.type&&e.parent===d.machine})),y=b&&b.doneData?Xk(b.doneData,e.context,t):void 0;this._doneEvent=CS(this.id,y);try{for(var x=vk(this.doneListeners),w=x.next();!w.done;w=x.next()){(0,w.value)(this._doneEvent)}}catch(e){l={error:e}}finally{try{w&&!w.done&&(c=x.return)&&c.call(x)}finally{if(l)throw l.error}}this._stop(),this._stopChildren(),GS(this.sessionId)}},e.prototype.onTransition=function(e){return this.listeners.add(e),this.status===YS.Running&&e(this.state,this.state.event),this},e.prototype.subscribe=function(e,t,n){var r=this,o=pS(e,t,n);this.listeners.add(o.next),this.status!==YS.NotStarted&&o.next(this.state);var i=function(){r.doneListeners.delete(i),r.stopListeners.delete(i),o.complete()};return this.status===YS.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===YS.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===YS.Running)return this;this.machine._init(),US(this.sessionId,this),this.initialized=!0,this.status=YS.Running;var n=void 0===e?this.initialState:$S(this,(function(){return"object"==typeof(n=e)&&null!==n&&"value"in n&&"_event"in n?t.machine.resolveState(e):t.machine.resolveState(BS.from(e,t.machine.context));var n}));return this.options.devTools&&this.attachDev(),this.scheduler.initialize((function(){t.update(n,gS)})),this},e.prototype._stopChildren=function(){this.children.forEach((function(e){rS(e.stop)&&e.stop()})),this.children.clear()},e.prototype._stop=function(){var e,t,n,r,o,i,s,a,l,c;try{for(var d=vk(this.listeners),u=d.next();!u.done;u=d.next()){var h=u.value;this.listeners.delete(h)}}catch(t){e={error:t}}finally{try{u&&!u.done&&(t=d.return)&&t.call(d)}finally{if(e)throw e.error}}try{for(var p=vk(this.stopListeners),f=p.next();!f.done;f=p.next()){(h=f.value)(),this.stopListeners.delete(h)}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=p.return)&&r.call(p)}finally{if(n)throw n.error}}try{for(var m=vk(this.contextListeners),g=m.next();!g.done;g=m.next()){h=g.value;this.contextListeners.delete(h)}}catch(e){o={error:e}}finally{try{g&&!g.done&&(i=m.return)&&i.call(m)}finally{if(o)throw o.error}}try{for(var v=vk(this.doneListeners),b=v.next();!b.done;b=v.next()){h=b.value;this.doneListeners.delete(h)}}catch(e){s={error:e}}finally{try{b&&!b.done&&(a=v.return)&&a.call(v)}finally{if(s)throw s.error}}if(!this.initialized)return this;this.initialized=!1,this.status=YS.Stopped,this._initialState=void 0;try{for(var y=vk(Object.keys(this.delayedEventsMap)),x=y.next();!x.done;x=y.next()){var w=x.value;this.clock.clearTimeout(this.delayedEventsMap[w])}}catch(e){l={error:e}}finally{try{x&&!x.done&&(c=y.return)&&c.call(y)}finally{if(l)throw l.error}}this.scheduler.clear(),this.scheduler=new _S({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=cS({type:"xstate.stop"}),r=$S(e,(function(){var t=Gk(yk([],bk(e.state.configuration),!1).sort((function(e,t){return t.order-e.order})).map((function(t){return yS(t.onExit,e.machine.options.actions)}))),r=bk(SS(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],s=new BS({value:e.state.value,context:i,_event:n,_sessionid:e.sessionId,historyValue:void 0,history:e.state,actions:o.filter((function(e){return!mS(e)})),activities:{},events:[],configuration:[],transitions:[],children:{},done:e.state.done,tags:e.state.tags,machine:e.machine});return s.changed=!0,s}));e.update(r,n),e._stopChildren(),GS(e.sessionId)}})),this},e.prototype.batch=function(e){var t=this;if(this.status===YS.NotStarted&&this.options.deferEvents)zk||tS(!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!==YS.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,s=!1,a=[],l=function(e){var r=cS(e);t.forward(r),i=$S(t,(function(){return t.machine.transition(i,r,void 0,n||void 0)})),a.push.apply(a,yk([],bk(t.machine.config.predictableActionArguments?i.actions:i.actions.map((function(e){return function(e,t){var n=e.exec;return mk(mk({},e),{exec:void 0!==n?function(){return n(t.context,t.event,{action:e,state:t,_event:t._event})}:void 0})}(e,i)}))),!1)),s=s||!!i.changed};try{for(var c=vk(e),d=c.next();!d.done;d=c.next()){l(d.value)}}catch(e){r={error:e}}finally{try{d&&!d.done&&(o=c.return)&&o.call(c)}finally{if(r)throw r.error}}i.changed=s,i.actions=a,t.update(i,cS(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=cS(e);if(0===r.name.indexOf(Lk)&&!this.state.nextEvents.some((function(e){return 0===e.indexOf(Lk)})))throw r.data.data;return $S(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=vk(this.forwardTo),o=r.next();!o.done;o=r.next()){var i=o.value,s=this.children.get(i);if(!s)throw new Error("Unable to forward event '".concat(e,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(i,"'."));s.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),rS(t.stop)&&t.stop())},e.prototype.spawn=function(e,t,n){if(this.status!==YS.Running)return MS(e,t);if(Yk(e))return this.spawnPromise(Promise.resolve(e),t);if(rS(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&&rS(e.subscribe)}catch(e){return!1}}(e))return this.spawnObservable(e,t);if(aS(e))return this.spawnMachine(e,mk(mk({},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,mk(mk({},this.options),{parent:this,id:n.id||t.id})),i=mk(mk({},QS),n);i.sync&&o.onTransition((function(e){r.send(Rk,{state:e,id:o.id})}));var s=o;return this.children.set(o.id,s),i.autoForward&&this.forwardTo.add(o.id),o.onDone((function(e){r.removeChild(o.id),r.send(cS(e,{origin:o.id}))})).start(),s},e.prototype.spawnBehavior=function(e,t){var n=XS(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(cS(CS(t,e),{origin:t})))}),(function(e){if(!i){o.removeChild(t);var n=kS(t,e);try{o.send(cS(n,{origin:t}))}catch(r){!function(e,t,n){if(!zk){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 s=((n={id:t,send:function(){},subscribe:function(t,n,r){var o=pS(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}})[sS]=function(){return this},n);return this.children.set(t,s),s},e.prototype.spawnCallback=function(e,t){var n,r,o,i=this,s=!1,a=new Set,l=new Set;try{o=e((function(e){r=e,l.forEach((function(t){return t(e)})),s||i.send(cS(e,{origin:t}))}),(function(e){a.add(e)}))}catch(e){this.send(kS(t,e))}if(Yk(o))return this.spawnPromise(o,t);var c=((n={id:t,send:function(e){return a.forEach((function(t){return t(e)}))},subscribe:function(e){var t=pS(e);return l.add(t.next),{unsubscribe:function(){l.delete(t.next)}}},stop:function(){s=!0,rS(o)&&o()},toJSON:function(){return{id:t}},getSnapshot:function(){return r}})[sS]=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(cS(e,{origin:t}))}),(function(e){o.removeChild(t),o.send(cS(kS(t,e),{origin:t}))}),(function(){o.removeChild(t),o.send(cS(CS(t),{origin:t}))})),s=((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}}})[sS]=function(){return this},n);return this.children.set(t,s),s},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 zk||tS(!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}}})[sS]=function(){return this},n))},e.prototype.attachDev=function(){var e=ZS();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(mk(mk({name:this.id,autoPause:!0,stateSanitizer:function(e){return{value:e.value,context:e.context,actions:e.actions}}},t),{features:mk({jump:!1,skip:!1},t?t.features:void 0)}),this.machine),this.devTools.init(this.state)}JS(this)}},e.prototype.toJSON=function(){return{id:this.id}},e.prototype[sS]=function(){return this},e.prototype.getSnapshot=function(){return this.status===YS.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=t$,e}();function t$(e,t){return new e$(e,t)}function n$(e){if("string"==typeof e){var t={type:e,toString:function(){return e}};return t}return e}function r$(e){return mk(mk({type:Tk},e),{toJSON:function(){e.onDone,e.onError;var t=gk(e,["onDone","onError"]);return mk(mk({},t),{type:Tk,src:n$(e.src)})}})}var o$="",i$="*",s$={},a$=function(e){return"#"===e[0]},l$=function(){function e(t,n,r,o){void 0===r&&(r="context"in t?t.context:void 0);var i,s=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||yk([this.machine.key],bk(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,zk||tS(!("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?qk(this.config.states,(function(t,n){var r,o=new e(t,{},void 0,{parent:s,key:n});return Object.assign(s.idMap,mk(((r={})[o.id]=o,r),o.idMap)),o})):s$;var a=0;!function e(t){var n,r;t.order=a++;try{for(var o=vk(TS(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===o$})):o$ in this.config.on),this.strict=!!this.config.strict,this.onEntry=Jk(this.config.entry||this.config.onEntry).map((function(e){return bS(e)})),this.onExit=Jk(this.config.exit||this.config.onExit).map((function(e){return bS(e)})),this.meta=this.config.meta,this.doneData="final"===this.type?this.config.data:void 0,this.invoke=Jk(this.config.invoke).map((function(e,t){var n,r;if(aS(e)){var o=fS(s.id,t);return s.machine.options.services=mk(((n={})[o]=e,n),s.machine.options.services),r$({src:o,id:o})}if(oS(e.src)){o=e.id||fS(s.id,t);return r$(mk(mk({},e),{id:o,src:e.src}))}if(aS(e.src)||rS(e.src)){o=e.id||fS(s.id,t);return s.machine.options.services=mk(((r={})[o]=e.src,r),s.machine.options.services),r$(mk(mk({id:o},e),{src:o}))}var i=e.src;return r$(mk(mk({id:fS(s.id,t)},e),{src:i}))})),this.activities=Jk(this.config.activities).concat(this.invoke).map((function(e){return xS(e)})),this.transition=this.transition.bind(this),this.tags=Jk(this.config.tags)}return e.prototype._init=function(){this.__cache.transitions||LS(this).forEach((function(e){return e.on}))},e.prototype.withConfig=function(t,n){var r=this.options,o=r.actions,i=r.activities,s=r.guards,a=r.services,l=r.delays;return new e(this.config,{actions:mk(mk({},o),t.actions),activities:mk(mk({},i),t.activities),guards:mk(mk({},s),t.guards),services:mk(mk({},a),t.services),delays:mk(mk({},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 rS(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:qk(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===o$,n=this.transitions.filter((function(n){var r=n.eventType===e;return t?r:r||n.eventType===i$}));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(pk.After,"(").concat(e,")").concat(n)}(rS(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:kk,event:rS(e)?e:lS(e),delay:t?t.delay:void 0,id:t&&void 0!==t.id?t.id:rS(e)?e.name:Bk(e)}}(r,{delay:t})),e.onExit.push({type:Sk,sendId:r}),r},r=nS(t)?t.map((function(e,t){var r=n(e.delay,t);return mk(mk({},e),{event:r})})):Gk(Object.keys(t).map((function(e,r){var o=t[e],i=oS(o)?{target:o}:o,s=isNaN(+e)?e:+e,a=n(s,r);return Jk(i).map((function(e){return mk(mk({},e),{event:a,delay:s})}))})));return r.map((function(t){var n=t.delay;return mk(mk({},e.formatTransition(t)),{delay:n})}))},e.prototype.getStateNodes=function(e){var t,n=this;if(!e)return[];var r=e instanceof BS?e.value:_k(e,this.delimiter);if(oS(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),s=[this];return s.push.apply(s,yk([],bk(Gk(i.map((function(e){return n.getStateNode(e).getStateNodes(r[e])})))),!1)),s},e.prototype.handles=function(e){var t=Bk(e);return this.events.includes(t)},e.prototype.resolveState=function(e){var t=e instanceof BS?e:BS.create(e),n=Array.from(AS([],this.getStateNodes(t.value)));return new BS(mk(mk({},t),{value:this.resolve(t.value),configuration:n,done:PS(n,this),tags:zS(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 s=vk(Object.keys(e)),a=s.next();!a.done;a=s.next()){var l=a.value,c=e[l];if(c){var d=this.getStateNode(l)._transition(c,t,n);d&&(i[l]=d)}}}catch(e){r={error:e}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}var u=Object.keys(i).map((function(e){return i[e]})),h=Gk(u.map((function(e){return e.transitions})));if(!u.some((function(e){return e.transitions.length>0})))return this.next(t,n);var p=Gk(Object.keys(i).map((function(e){return i[e].configuration})));return{transitions:h,exitSet:Gk(u.map((function(e){return e.exitSet}))),configuration:p,source:t,actions:Gk(Object.keys(i).map((function(e){return i[e].actions})))}},e.prototype._transition=function(e,t,n){return oS(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,cS(t))},e.prototype.next=function(e,t){var n,r,o,i=this,s=t.name,a=[],l=[];try{for(var c=vk(this.getCandidates(s)),d=c.next();!d.done;d=c.next()){var u=d.value,h=u.cond,p=u.in,f=e.context,m=!p||(oS(p)&&a$(p)?e.matches(_k(this.getStateNodeById(p).path,this.delimiter)):Vk(_k(p,this.delimiter),Uk(this.path.slice(0,-2))(e.value))),g=!1;try{g=!h||uS(this.machine,h,f,t,e)}catch(e){throw new Error("Unable to evaluate guard '".concat(h.name||h.type,"' in transition for event '").concat(s,"' in state node '").concat(this.id,"':\n").concat(e.message))}if(g&&m){void 0!==u.target&&(l=u.target),a.push.apply(a,yk([],bk(u.actions),!1)),o=u;break}}}catch(e){n={error:e}}finally{try{d&&!d.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:a};var v=Gk(l.map((function(t){return i.getRelativeStateNodes(t,e.historyValue)})));return{transitions:[o],exitSet:!!o.internal?[]:Gk(l.map((function(e){return i.getPotentiallyReenteringNodes(e)}))),configuration:v,source:e,actions:a}}},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,s){var a,l,c,d,u=this,h=i?AS([],this.getStateNodes(i.value)):[],p=new Set;try{for(var f=vk(Array.from(e).sort((function(e,t){return e.order-t.order}))),m=f.next();!m.done;m=f.next()){(!IS(h,b=m.value)||IS(n.exitSet,b)||b.parent&&p.has(b.parent))&&p.add(b)}}catch(e){a={error:e}}finally{try{m&&!m.done&&(l=f.return)&&l.call(f)}finally{if(a)throw a.error}}try{for(var g=vk(h),v=g.next();!v.done;v=g.next()){var b;IS(e,b=v.value)&&!IS(n.exitSet,b.parent)||n.exitSet.push(b)}}catch(e){c={error:e}}finally{try{v&&!v.done&&(d=g.return)&&d.call(g)}finally{if(c)throw c.error}}n.exitSet.sort((function(e,t){return t.order-e.order}));var y=Array.from(p).sort((function(e,t){return e.order-t.order})),x=new Set(n.exitSet),w=Gk(y.map((function(e){var t=[];if("final"!==e.type)return t;var i=e.parent;if(!i.parent)return t;t.push(wS(e.id,e.doneData),wS(i.id,e.doneData?Xk(e.doneData,r,o):void 0));var s=i.parent;return"parallel"===s.type&&OS(s).every((function(e){return PS(n.configuration,e)}))&&t.push(wS(s.id)),t}))),C=y.map((function(e){var t=e.onEntry,n=e.activities.map((function(e){return function(e){var t=xS(e);return{type:pk.Start,activity:t,exec:void 0}}(e)}));return{type:"entry",actions:yS(s?yk(yk([],bk(t),!1),bk(n),!1):yk(yk([],bk(n),!1),bk(t),!1),u.machine.options.actions)}})).concat({type:"state_done",actions:w.map((function(e){return function(e,t){return{type:Ck,event:"function"==typeof e?e:lS(e),delay:t?t.delay:void 0,id:null==t?void 0:t.id}}(e)}))}),k=Array.from(x).map((function(e){return{type:"exit",actions:yS(yk(yk([],bk(e.onExit),!1),bk(e.activities.map((function(e){return function(e){var t=rS(e)?e:xS(e);return{type:pk.Stop,activity:t,exec:void 0}}(e)}))),!1),u.machine.options.actions)}})).concat({type:"transition",actions:yS(n.actions,this.machine.options.actions)}).concat(C);if(t){var S=yS(Gk(yk([],bk(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!mS(e)}));return k.concat({type:"stop",actions:S})}return k},e.prototype.transition=function(e,t,n,r){void 0===e&&(e=this.initialState);var o,i,s=cS(t);if(e instanceof BS)o=void 0===n?e:this.resolveState(BS.from(e,n));else{var a=oS(e)?this.resolve(Fk(this.getResolvedPath(e))):this.resolve(e),l=null!=n?n:this.machine.context;o=this.resolveState(BS.from(a,l))}if(!zk&&s.name===i$)throw new Error("An event cannot have the wildcard type ('".concat(i$,"')"));if(this.strict&&!this.events.includes(s.name)&&(i=s.name,!/^(done|error)\./.test(i)))throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(s.name,"'"));var c=this._transition(o.value,o,s)||{transitions:[],configuration:[],exitSet:[],source:o,actions:[]},d=AS([],this.getStateNodes(o.value)),u=c.configuration.length?AS(d,c.configuration):d;return c.configuration=yk([],bk(u),!1),this.resolveTransition(c,o,o.context,r,s)},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,yk([],bk(i),!1)),e},e.prototype.resolveTransition=function(e,t,n,r,o){var i,s,a,l,c=this;void 0===o&&(o=gS);var d=e.configuration,u=!t||e.transitions.length>0,h=u?e.configuration:t?t.configuration:[],p=PS(h,this),f=u?DS(this.machine,d):void 0,m=t?t.historyValue?t.historyValue:e.source?this.machine.historyValue(t.value):void 0:void 0,g=this.getActions(new Set(h),p,e,n,o,t,r),v=t?mk({},t.activities):{};try{for(var b=vk(g),y=b.next();!y.done;y=b.next()){var x=y.value;try{for(var w=(a=void 0,vk(x.actions)),C=w.next();!C.done;C=w.next()){var k=C.value;k.type===xk?v[k.activity.id||k.activity.type]=k:k.type===wk&&(v[k.activity.id||k.activity.type]=!1)}}catch(e){a={error:e}}finally{try{C&&!C.done&&(l=w.return)&&l.call(w)}finally{if(a)throw a.error}}}}catch(e){i={error:e}}finally{try{y&&!y.done&&(s=b.return)&&s.call(b)}finally{if(i)throw i.error}}var S,$,j=bk(SS(this,t,n,o,g,r,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),M=j[0],E=j[1],T=bk(function(e,t){var n,r,o=bk([[],[]],2),i=o[0],s=o[1];try{for(var a=vk(e),l=a.next();!l.done;l=a.next()){var c=l.value;t(c)?i.push(c):s.push(c)}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return[i,s]}(M,mS),2),O=T[0],L=T[1],A=M.filter((function(e){var t;return e.type===xk&&(null===(t=e.activity)||void 0===t?void 0:t.type)===Tk})),R=A.reduce((function(e,t){return e[t.activity.id]=function(e,t,n,r){var o,i=hS(e.src),s=null===(o=null==t?void 0:t.options.services)||void 0===o?void 0:o[i.type],a=e.data?Xk(e.data,n,r):void 0,l=s?MS(s,e.id,a):jS(e.id);return l.meta=e,l}(t.activity,c.machine,E,o),e}),t?mk({},t.children):{}),N=new BS({value:f||t.value,context:E,_event:o,_sessionid:t?t._sessionid:null,historyValue:f?m?(S=m,$=f,{current:$,states:Qk(S,$)}):void 0:t?t.historyValue:void 0,history:!f||e.source?t:void 0,actions:f?L:[],activities:f?v:t?t.activities:{},events:[],configuration:h,transitions:e.transitions,children:R,done:p,tags:zS(h),machine:this}),D=n!==E;N.changed=o.name===Rk||D;var I=N.history;I&&delete I.history;var P=!p&&(this._transient||d.some((function(e){return e._transient})));if(!(u||P&&o.name!==o$))return N;var z=N;if(!p)for(P&&(z=this.resolveRaisedTransition(z,{type:$k},o,r));O.length;){var V=O.shift();z=this.resolveRaisedTransition(z,V._event,o,r)}var B=z.changed||(I?!!z.actions.length||D||typeof I.value!=typeof z.value||!VS(z.value,I.value):void 0);return z.changed=B,z.history=I,z},e.prototype.getStateNode=function(e){if(a$(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=a$(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&&a$(e))try{return this.getStateNodeById(e.slice(1))}catch(e){}for(var t=Hk(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||s$;switch(this.type){case"parallel":return qk(this.initialStateValue,(function(t,r){return t?n.getStateNode(r).resolve(e[r]||t):s$}));case"compound":if(oS(e)){var r=this.getStateNode(e);return"parallel"===r.type||"compound"===r.type?((t={})[e]=r.initialStateValue,t):e}return Object.keys(e).length?qk(e,(function(e,t){return e?n.getStateNode(t).resolve(e):s$})):this.initialStateValue||{};default:return e||s$}},e.prototype.getResolvedPath=function(e){if(a$(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 Hk(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=Wk(this.states,(function(e){return e.initialStateValue||s$}),(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=ES(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=oS(t.target)&&a$(t.target)?Fk(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 ES(this)?[this]:"compound"!==this.type||this.initial?Gk(Kk(this.initialStateValue).map((function(t){return e.getFromRelativePath(t)}))):(zk||tS(!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=bk(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:Wk(this.states,(function(t,n){if(!e)return t.historyValue();var r=oS(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?Gk(Kk(r).map((function(e){return n.getFromRelativePath(e)}))):n.initialStateNodes}var o,i,s=(o=n.path,i="states",function(e){var t,n,r=e;try{for(var s=vk(o),a=s.next();!a.done;a=s.next()){var l=a.value;r=r[i][l]}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return r})(e).current;return oS(s)?[n.getStateNode(s)]:Gk(Kk(s).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=Gk(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 s=vk(Object.keys(o)),a=s.next();!a.done;a=s.next()){var l=o[a.value];if(l.states)try{for(var c=(n=void 0,vk(l.events)),d=c.next();!d.done;d=c.next()){var u=d.value;i.add("".concat(u))}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=s.return)&&t.call(s)}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(!oS(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 Jk(e)}(e.target),r="internal"in e?e.internal:!n||n.some((function(e){return oS(e)&&e[0]===t.delimiter})),o=this.machine.options.guards,i=this.resolveTarget(n),s=mk(mk({},e),{actions:yS(Jk(e.actions)),cond:iS(e.cond,o),target:i,source:this,internal:r,eventType:e.event,toJSON:function(){return mk(mk({},s),{target:s.target?s.target.map((function(e){return"#".concat(e.id)})):void 0,source:"#".concat(t.id)})}});return s},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=i$,s=o[i],a=void 0===s?[]:s,l=gk(o,["*"]);n=Gk(Object.keys(l).map((function(e){zk||e!==o$||tS(!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=dS(e,l[e]);return zk||function(e,t,n){var r=n.slice(0,-1).some((function(e){return!("cond"in e)&&!("in"in e)&&(oS(e.target)||aS(e.target))})),o=t===o$?"the transient event":"event '".concat(t,"'");tS(!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(dS(i$,a)))}else n=[];var c=this.config.always?dS("",this.config.always):[],d=this.config.onDone?dS(String(wS(this.id)),this.config.onDone):[];zk||tS(!(this.config.onDone&&!this.parent),'Root nodes cannot have an ".onDone" transition. Please check the config of "'.concat(this.id,'".'));var u=Gk(this.invoke.map((function(e){var t=[];return e.onDone&&t.push.apply(t,yk([],bk(dS(String(CS(e.id)),e.onDone)),!1)),e.onError&&t.push.apply(t,yk([],bk(dS(String(kS(e.id)),e.onError)),!1)),t}))),h=this.after,p=Gk(yk(yk(yk(yk([],bk(d),!1),bk(u),!1),bk(n),!1),bk(c),!1).map((function(e){return Jk(e).map((function(e){return r.formatTransition(e)}))})));try{for(var f=vk(h),m=f.next();!m.done;m=f.next()){var g=m.value;p.push(g)}}catch(t){e={error:t}}finally{try{m&&!m.done&&(t=f.return)&&t.call(f)}finally{if(e)throw e.error}}return p},e}();var c$,d$=function(e){return{type:jk,assignment:e}};!function(e){e[e.Effect=1]="Effect",e[e.LayoutEffect=2]="LayoutEffect"}(c$||(c$={}));var u$="undefined"!=typeof document?n.useLayoutEffect:function(){};function h$(e){var t=l.useRef();return t.current||(t.current={v:e()}),t.current.v}var p$=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.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 s},f$=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 m$=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.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 s},g$=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 v$(e,t){(0,e.exec)(t.context,t._event.data,{action:e,state:t,_event:t._event})()}function b$(e){var t=n.useRef([]),r=n.useRef([]);u$((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})),s=m$(function(e,t){var n,r,o=p$([[],[]],2),i=o[0],s=o[1];try{for(var a=f$(e),l=a.next();!l.done;l=a.next()){var c=l.value;t(c)?i.push(c):s.push(c)}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return[i,s]}(i,(function(e){return e.exec.__effect===c$.Effect})),2),a=s[0],l=s[1];(n=t.current).push.apply(n,g$([],m$(a.map((function(t){return[t,e]}))),!1)),(o=r.current).push.apply(o,g$([],m$(l.map((function(t){return[t,e]}))),!1))}}));return function(){n.unsubscribe()}}),[]),u$((function(){for(;r.current.length;){var e=m$(r.current.shift(),2);v$(e[0],e[1])}})),n.useEffect((function(){for(;t.current.length;){var e=m$(t.current.shift(),2);v$(e[0],e[1])}}))}var y$=function(){return y$=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},y$.apply(this,arguments)},x$=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},w$=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.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 s};var C$=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.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 s};function k$(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)&&a(e)}),[]),o=function(e,t,r){void 0===t&&(t={});var o=h$((function(){return"function"==typeof e?e():e}));if("production"!==process.env.NODE_ENV&&"function"!=typeof e){var i=w$(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 s=t.context,a=t.guards,l=t.actions,c=t.activities,d=t.services,u=t.delays,h=t.state,p=x$(t,["context","guards","actions","activities","services","delays","state"]),f=h$((function(){var e={context:s,guards:a,actions:l,activities:c,services:d,delays:u};return t$(o.withConfig(e,(function(){return y$(y$({},o.context),s)})),y$({deferEvents:!0},p))}));return u$((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]),u$((function(){return f.start(h?BS.create(h):void 0),function(){f.stop()}}),[]),u$((function(){Object.assign(f.machine.options.actions,l),Object.assign(f.machine.options.guards,a),Object.assign(f.machine.options.activities,c),Object.assign(f.machine.options.services,d),Object.assign(f.machine.options.delays,u)}),[l,a,c,d,u]),b$(f),f}(e,t,r),i=C$(n.useState((function(){var e=o.machine.initialState;return t.state?BS.create(t.state):e})),2),s=i[0],a=i[1];return[s,o.send,o]}function S$(){return S$=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},S$.apply(null,arguments)}function $$(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 j$={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(j$.str(e)||j$.num(e))return e===t;if(j$.obj(e)&&j$.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!j$.und(n)||e===t}};function M$(e,t){return j$.und(e)||j$.nul(e)?t:e}function E$(e){return j$.und(e)?[]:j$.arr(e)?e:[e]}function T$(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 j$.fun(e)?e(...n):e}function O$(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,$$(e,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}(e);if(j$.und(t))return S$({to:t},e);const n=Object.keys(e).reduce(((n,r)=>j$.und(t[r])?S$({},n,{[r]:e[r]}):n),{});return S$({to:t},n)}class L${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 A$ extends L${constructor(){super(...arguments),this.payload=[],this.attach=()=>this.payload.forEach((e=>e instanceof L$&&e.addChild(this))),this.detach=()=>this.payload.forEach((e=>e instanceof L$&&e.removeChild(this)))}}class R$ extends L${constructor(){super(...arguments),this.payload={},this.attach=()=>Object.values(this.payload).forEach((e=>e instanceof L$&&e.addChild(this))),this.detach=()=>Object.values(this.payload).forEach((e=>e instanceof L$&&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 L$)&&(t[n]=r instanceof L$?r[e?"getAnimatedValue":"getValue"]():r)}return t}getAnimatedValue(){return this.getValue(!0)}}let N$,D$;let I$,P$=e=>"undefined"!=typeof window?window.requestAnimationFrame(e):-1;let z$,V$=()=>Date.now();class B$ extends R${constructor(e,t){super(),this.update=void 0,this.payload=e.style?S$({},e,{style:z$(e.style)}):e,this.update=t,this.attach()}}let H$=!1;const _$=new Set,F$=()=>{if(!H$)return!1;let e=V$();for(let t of _$){let n=!1;for(let r=0;r<t.configs.length;r++){let o,i,s=t.configs[r];for(let t=0;t<s.animatedValues.length;t++){let r=s.animatedValues[t];if(r.done)continue;let a=s.fromValues[t],l=s.toValues[t],c=r.lastPosition,d=l instanceof L$,u=Array.isArray(s.initialVelocity)?s.initialVelocity[t]:s.initialVelocity;if(d&&(l=l.getValue()),s.immediate)r.setValue(l),r.done=!0;else if("string"!=typeof a&&"string"!=typeof l){if(void 0!==s.duration)c=a+s.easing((e-r.startTime)/s.duration)*(l-a),o=e>=r.startTime+s.duration;else if(s.decay)c=a+u/(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,u=void 0!==r.lastVelocity?r.lastVelocity:s.initialVelocity,e>i+64&&(i=e);let t=Math.floor(e-i);for(let e=0;e<t;++e){u+=1*((-s.tension*(c-l)+-s.friction*u)/s.mass)/1e3,c+=1*u/1e3}let n=!(!s.clamp||0===s.tension)&&(a<l?c>l:c<l),d=Math.abs(u)<=s.precision,h=0===s.tension||Math.abs(l-c)<=s.precision;o=n||d&&h,r.lastVelocity=u,r.lastTime=e}d&&!s.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[s.name]=s.interpolation.getValue())}t.props.onFrame&&t.props.onFrame(t.values),n||(_$.delete(t),t.stop(!0))}return _$.size?P$(F$):H$=!1,H$};function q$(e,t,n){if("function"==typeof e)return e;if(Array.isArray(e))return q$({range:e,output:t,extrapolate:n});if(I$&&"string"==typeof e.output[0])return I$(e);const r=e,o=r.output,i=r.range||[0,1],s=r.extrapolateLeft||r.extrapolate||"extend",a=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,s,a,l){let c=l?l(e):e;if(c<t){if("identity"===s)return c;"clamp"===s&&(c=t)}if(c>n){if("identity"===a)return c;"clamp"===a&&(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,s,a,r.map)}}class W$ extends A${constructor(e,t,n,r){super(),this.calc=void 0,this.payload=e instanceof A$&&!(e instanceof W$)?e.getPayload():Array.isArray(e)?e:[e],this.calc=q$(t,n,r)}getValue(){return this.calc(...this.payload.map((e=>e.getValue())))}updateConfig(e,t,n){this.calc=q$(e,t,n)}interpolate(e,t,n){return new W$(this,e,t,n)}}const U$=(e,t,n)=>e&&new W$(e,t,n);function K$(e,t){"update"in e?t.add(e):e.getChildren().forEach((e=>K$(e,t)))}class G$ extends L${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&&K$(this,this.animatedStyles),this.animatedStyles.forEach((e=>e.update()))}clearStyles(){this.animatedStyles.clear()}getValue(){return this.value}interpolate(e,t,n){return new W$(this,e,t,n)}}class Z$ extends A${constructor(e){super(),this.payload=e.map((e=>new G$(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 W$(this,e,t)}}let J$=0,X$=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=J$++}update(e){if(!e)return this;const t=O$(e),n=t.delay,r=void 0===n?0:n,o=t.to,i=$$(t,["delay","to"]);if(j$.arr(o)||j$.fun(o))this.queue.push(S$({},i,{delay:r,to:o}));else if(o){let e={};Object.entries(o).forEach((t=>{let n=t[0],o=t[1];const s=S$({to:{[n]:o},delay:T$(r,n)},i),a=e[s.delay]&&e[s.delay].to;e[s.delay]=S$({},e[s.delay],s,{to:S$({},a,s.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;j$.obj(n)&&(this.merged=S$({},n,this.merged)),j$.obj(o)&&(this.merged=S$({},this.merged,o))}));const t=this.local=++this.guid,n=this.localQueue=this.queue;this.queue=[],n.forEach(((r,o)=>{let i=r.delay,s=$$(r,["delay"]);const a=r=>{o===n.length-1&&t===this.guid&&r&&(this.idle=!0,this.props.onRest&&this.props.onRest(this.merged)),e&&e()};let l=j$.arr(s.to)||j$.fun(s.to);i?setTimeout((()=>{t===this.guid&&(l?this.runAsync(s,a):this.diff(s).start(a))}),i):l?this.runAsync(s,a):this.diff(s).start(a)}))}else j$.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),t=this,_$.has(t)||_$.add(t),H$||(H$=!0,P$(F$));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,_$.has(t)&&_$.delete(t)),this}runAsync(e,t){var n=this;e.delay;let r=$$(e,["delay"]);const o=this.local;let i=Promise.resolve(void 0);if(j$.arr(r.to))for(let e=0;e<r.to.length;e++){const t=e,n=S$({},r,O$(r.to[t]));j$.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(j$.fun(r.to)){let e,t=0;i=i.then((()=>r.to((n=>{const i=S$({},r,O$(n));if(j$.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=S$({},this.props,e);let t=this.props,n=t.from,r=void 0===n?{}:n,o=t.to,i=void 0===o?{}:o,s=t.config,a=void 0===s?{}:s,l=t.reverse,c=t.attach,d=t.reset,u=t.immediate;if(l){var h=[i,r];r=h[0],i=h[1]}this.merged=S$({},r,this.merged,i),this.hasChanged=!1;let p=c&&c(this);if(this.animations=Object.entries(this.merged).reduce(((e,t)=>{let n=t[0],o=t[1],i=e[n]||{};const s=j$.num(o),l=j$.str(o)&&!o.startsWith("#")&&!/\d/.test(o)&&!D$[o],c=j$.arr(o),h=!s&&!c&&!l;let f=j$.und(r[n])?o:r[n],m=s||c||l?o:1,g=T$(a,n);p&&(m=p.animations[n].parent);let v,b=i.parent,y=i.interpolation,x=E$(p?m.getPayload():m),w=o;h&&(w=I$({range:[0,1],output:[o,o]})(1));let C=y&&y.getValue();const k=!j$.und(b)&&i.animatedValues.some((e=>!e.done)),S=!j$.equ(w,C),$=!j$.equ(w,i.previous),j=!j$.equ(g,i.config);if(d||$&&S||j){if(s||l)b=y=i.parent||new G$(f);else if(c)b=y=i.parent||new Z$(f);else if(h){let e=i.interpolation&&i.interpolation.calc(i.parent.value);e=void 0===e||d?f:e,i.parent?(b=i.parent,b.setValue(0,!1)):b=new G$(0);const t={output:[e,o]};i.interpolation?(y=i.interpolation,i.interpolation.updateConfig(t)):y=b.interpolate(t)}return x=E$(p?m.getPayload():m),v=E$(b.getPayload()),d&&!h&&b.setValue(f,!1),this.hasChanged=!0,v.forEach((e=>{e.startPosition=e.value,e.lastPosition=e.value,e.lastVelocity=k?e.lastVelocity:void 0,e.lastTime=k?e.lastTime:void 0,e.startTime=V$(),e.done=!1,e.animatedStyles.clear()})),T$(u,n)&&b.setValue(h?m:o,!1),S$({},e,{[n]:S$({},i,{name:n,parent:b,interpolation:y,animatedValues:v,toValues:x,previous:w,config:g,fromValues:E$(b.getValue()),immediate:T$(u,n),initialVelocity:M$(g.velocity,0),clamp:M$(g.clamp,!1),precision:M$(g.precision,.01),tension:M$(g.tension,170),friction:M$(g.friction,26),mass:M$(g.mass,1),duration:g.duration,easing:M$(g.easing,(e=>e)),decay:g.decay})})}return S?e:(h&&(b.setValue(1,!1),y.updateConfig({output:[w,w]})),b.done=!0,this.hasChanged=!0,S$({},e,{[n]:S$({},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 Y$=e=>{const t=j$.fun(e),r=((e,t)=>{const r=n.useRef(!1),o=n.useRef(),i=j$.fun(t),s=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 X$,s=i?T$(t,r,o):t[r];return 0===r&&(n=s.ref),o.update(s),n||o.start(),o})),n]}),[e]),a=s[0],l=s[1];o.current=a,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?T$(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 d=o.current.map((e=>e.getValues()));return i?[d,c,e=>o.current.forEach((t=>t.pause(e)))]:d})(1,t?e:[e]),o=r[0],i=r[1],s=r[2];return t?[o[0],i,s]:o};class Q$ extends R${constructor(e){void 0===e&&(e={}),super(),!e.transform||e.transform instanceof L$||(e=N$.transform(e)),this.payload=e}}const ej={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},tj="[-+]?\\d*\\.?\\d+",nj=tj+"%";function rj(){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 oj=new RegExp("rgb"+rj(tj,tj,tj)),ij=new RegExp("rgba"+rj(tj,tj,tj,tj)),sj=new RegExp("hsl"+rj(tj,nj,nj)),aj=new RegExp("hsla"+rj(tj,nj,nj,tj)),lj=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,cj=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,dj=/^#([0-9a-fA-F]{6})$/,uj=/^#([0-9a-fA-F]{8})$/;function hj(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 pj(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,i=hj(o,r,e+1/3),s=hj(o,r,e),a=hj(o,r,e-1/3);return Math.round(255*i)<<24|Math.round(255*s)<<16|Math.round(255*a)<<8}function fj(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function mj(e){return(parseFloat(e)%360+360)%360/360}function gj(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function vj(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function bj(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=dj.exec(e))?parseInt(t[1]+"ff",16)>>>0:ej.hasOwnProperty(e)?ej[e]:(t=oj.exec(e))?(fj(t[1])<<24|fj(t[2])<<16|fj(t[3])<<8|255)>>>0:(t=ij.exec(e))?(fj(t[1])<<24|fj(t[2])<<16|fj(t[3])<<8|gj(t[4]))>>>0:(t=lj.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=uj.exec(e))?parseInt(t[1],16)>>>0:(t=cj.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=sj.exec(e))?(255|pj(mj(t[1]),vj(t[2]),vj(t[3])))>>>0:(t=aj.exec(e))?(pj(mj(t[1]),vj(t[2]),vj(t[3]))|gj(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 yj=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,xj=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,wj=new RegExp(`(${Object.keys(ej).join("|")})`,"g");let Cj={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 kj=["Webkit","Ms","Moz","O"];function Sj(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||Cj.hasOwnProperty(e)&&Cj[e]?(""+t).trim():t+"px"}Cj=Object.keys(Cj).reduce(((e,t)=>(kj.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),Cj);const $j={};var jj,Mj;jj=e=>new Q$(e),z$=jj,Mj=e=>{const t=e.output.map((e=>e.replace(xj,bj))).map((e=>e.replace(wj,bj))),n=t[0].match(yj).map((()=>[]));t.forEach((e=>{e.match(yj).forEach(((e,t)=>n[t].push(+e)))}));const r=t[0].match(yj).map(((t,r)=>q$(S$({},e,{output:n[r]}))));return e=>{let n=0;return t[0].replace(yj,(()=>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})`))}},I$=Mj,D$=ej,function(e,t){N$={fn:e,transform:t}}(((e,t)=>{if(!e.nodeType||void 0===e.setAttribute)return!1;{const o=t.style,i=t.children,s=t.scrollTop,a=t.scrollLeft,l=$$(t,["style","children","scrollTop","scrollLeft"]),c="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;void 0!==s&&(e.scrollTop=s),void 0!==a&&(e.scrollLeft=a),void 0!==i&&(e.textContent=i);for(let t in o)if(o.hasOwnProperty(t)){var n=0===t.indexOf("--"),r=Sj(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:$j[t]||($j[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())));void 0!==e.getAttribute(n)&&e.setAttribute(n,l[t])}}}),(e=>e));var Ej;const Tj=(Ej=e=>n.forwardRef(((t,r)=>{const o=function(){const e=n.useState(!1)[1];return n.useCallback((()=>e((e=>!e))),[])}(),i=n.useRef(!0),s=n.useRef(null),a=n.useRef(null),l=n.useCallback((e=>{const t=s.current;s.current=new B$(e,(()=>{let e=!1;a.current&&(e=N$.fn(a.current,s.current.getAnimatedValue())),a.current&&!1!==e||o()})),t&&t.detach()}),[]);n.useEffect((()=>()=>{i.current=!1,s.current&&s.current.detach()}),[]),n.useImperativeHandle(r,(()=>(e=>e.current)(a))),l(t);const c=s.current.getValue();c.scrollTop,c.scrollLeft;const d=$$(c,["scrollTop","scrollLeft"]),u=(h=e,!j$.fun(h)||h.prototype instanceof n.Component?e=>a.current=function(e,t){return t&&(j$.fun(t)?t(e):j$.obj(t)&&(t.current=e)),e}(e,r):void 0);var h;return n.createElement(e,S$({},d,{ref:u}))})),e=>(j$.arr(e)?e:Object.keys(e)).reduce(((e,t)=>{const n=t;return e[n]=Ej(n),e}),Ej))(["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 Oj(e,t){return e.map((function(e,n){return e+t[n]}))}function Lj(e,t){return e.map((function(e,n){return e-t[n]}))}function Aj(e){return Math.hypot.apply(Math,e)}function Rj(e){return Math.sign?Math.sign(e):Number(e>0)-Number(e<0)||+e}function Nj(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 Dj(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?-Nj(t-e,n-t,r)+t:e>n?+Nj(e-n,n-t,r)+n:e}function Ij(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 Pj(){return Pj=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},Pj.apply(this,arguments)}function zj(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Vj(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Bj(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 Hj(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 Bj(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)?Bj(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 _j(){}function Fj(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?_j:1===t.length?t[0]:function(){for(var e,n,r=Hj(t);!(n=r()).done;){e=n.value.apply(this,arguments)||e}return e}}function qj(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 Wj(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 Uj(e,t){void 0===e&&(e={});for(var n={},r=0,o=Object.entries(t);r<o.length;r++){var i=o[r],s=i[0],a=i[1];switch(typeof a){case"function":n[s]=a.call(n,e[s],s,e);break;case"object":n[s]=Uj(e[s],a);break;case"boolean":a&&(n[s]=e[s])}}return n}var Kj=Pj({},{threshold:function(e){return void 0===e&&(e=0),qj(e)},rubberband:function(e){switch(void 0===e&&(e=0),e){case!0:return qj(.15);case!1:return qj(0);default:return qj(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:qj(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 Kj.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,s=t.top,a=void 0===s?-1/0:s,l=t.bottom;return[[r,i],[a,void 0===l?1/0:l]]}}),Gj="undefined"!=typeof window&&window.document&&window.document.createElement,Zj={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=Gj?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}}},Jj=Pj({},Kj,{threshold:function(e,t,n){var r=n.filterTaps,o=void 0!==r&&r,i=n.lockDirection,s=void 0!==i&&i,a=n.axis,l=qj(e,o?3:s||(void 0===a?void 0:a)?1:0);return this.filterTaps=o||l[0]+l[1]>0,l},swipeVelocity:function(e){return void 0===e&&(e=.5),qj(e)},swipeDistance:function(e){return void 0===e&&(e=60),qj(e)},delay:function(e){switch(void 0===e&&(e=0),e){case!0:return 180;case!1:return 0;default:return e}}});function Xj(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"]),s=function(e){return void 0===e&&(e={}),Uj(e,Zj)}({domTarget:t,eventOptions:n,window:r,enabled:o});return s.drag=function(e){return void 0===e&&(e={}),Uj(e,Jj)}(i),s}function Yj(e){return Pj({_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:_j,canceled:!1,memo:void 0,args:void 0},e)}function Qj(){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:Yj({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:Yj({da:[0,0],vdva:[0,0],origin:void 0,turns:0}),wheel:Yj({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),move:Yj({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),scroll:Yj({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0})}}var eM=new Map,tM=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),s=2;s<o;s++)i[s-2]=arguments[s];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=Pj({},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,s=this.state,a=s._bounds,l=s._initial,c=s._active,d=s._intentional,u=s.lastOffset,h=s.movement,p=this.getInternalMovement(e,this.state),f=!1===d[0]?nM(p[0],i[0]):d[0],m=!1===d[1]?nM(p[1],i[1]):d[1],g=this.checkIntentionality([f,m],p);if(g._blocked)return Pj({},g,{_movement:p,delta:[0,0]});var v,b,y,x,w=g._intentional,C=p;(!1!==w[0]&&!1===d[0]&&(b=Wj(n,this.state),v=Wj(r,this.state),l[0]=b[0],a[0]=v[0]),!1!==w[1]&&!1===d[1])&&(b=null!=(y=b)?y:Wj(n,this.state),v=null!=(x=v)?x:Wj(r,this.state),l[1]=b[1],a[1]=v[1]);var k=[!1!==w[0]?p[0]-w[0]:l[0],!1!==w[1]?p[1]-w[1]:l[1]],S=Oj(k,u),$=c?o:[0,0];return k=rM(a,Oj(k,l),$),Pj({},g,{intentional:!1!==w[0]||!1!==w[1],_initial:l,_movement:C,movement:k,values:e,offset:rM(a,S,$),delta:Lj(k,h)})},t.clean=function(){this.clearTimeout()},Ij(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 nM(e,t){return Math.abs(e)>=t&&Rj(e)*t}function rM(e,t,n){var r=t[0],o=t[1],i=n[0],s=n[1],a=e[0],l=a[0],c=a[1],d=e[1],u=d[0],h=d[1];return[Dj(r,l,c,i),Dj(o,u,h,s)]}function oM(e,t,n){var r=e.state,o=e.args,i=t.timeStamp,s=t.type,a=r.values;return{_lastEventType:s,event:t,timeStamp:i,elapsedTime:n?0:i-r.startTime,args:o,previous:a}}function iM(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,Pj({},t,{event:n})].concat(o))}}var sM=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,s=Hj(t.classes);!(i=s()).done;){new(0,i.value)(t,r).addBindings(e)}for(var a=0,l=Object.entries(t.nativeRefs);a<l.length;a++){var c=l[a];cM(e,c[0],iM(c[1],Pj({},t.state.shared,{args:r})))}return t.config.domTarget?function(e,t){var n=e.config,r=e.domListeners,o=lM(n);if(!o)throw new Error("domTarget must be defined");var i=n.eventOptions;uM(o,aM(r),i);for(var s=0,a=Object.entries(t);s<a.length;s++){var l=a[s],c=l[0],d=l[1],u=c.slice(2).toLowerCase();r.push([u,Fj.apply(void 0,d)])}dM(o,r,i)}(t,e):function(e,t){for(var n=e.config,r={},o=n.eventOptions.capture?"Capture":"",i=0,s=Object.entries(t);i<s.length;i++){var a=s[i],l=a[0],c=a[1],d=Array.isArray(c)?c:[c];r[l+o]=Fj.apply(void 0,d)}return r}(t,e)},this.effect=function(){return t.config.domTarget&&t.bind(),t.clean},this.clean=function(){var e=lM(t.config),n=t.config.eventOptions;e&&uM(e,aM(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){uM(n,o[i],r)}e.windowListeners={}}(t)},this.state=Qj(),this.timeouts={},this.domListeners=[],this.windowListeners={}};function aM(e){return void 0===e&&(e=[]),e.splice(0,e.length)}function lM(e){var t=e.domTarget;return t&&"current"in t?t.current:t}function cM(e,t,n){e[t]||(e[t]=[]),e[t].push(n)}function dM(e,t,n){void 0===t&&(t=[]),void 0===n&&(n={});for(var r,o=Hj(t);!(r=o()).done;){var i=r.value,s=i[0],a=i[1];e.addEventListener(s,a,n)}}function uM(e,t,n){void 0===t&&(t=[]),void 0===n&&(n={});for(var r,o=Hj(t);!(r=o()).done;){var i=r.value,s=i[0],a=i[1];e.removeEventListener(s,a,n)}}function hM(e,t,r){void 0===r&&(r={});var o=function(e){var t=new Set;e.drag&&t.add(eM.get("drag"));e.wheel&&t.add(eM.get("wheel"));e.scroll&&t.add(eM.get("scroll"));e.move&&t.add(eM.get("move"));e.pinch&&t.add(eM.get("pinch"));e.hover&&t.add(eM.get("hover"));return t}(e),i=n.useMemo((function(){return new sM(o)}),[]);return i.config=t,i.handlers=e,i.nativeRefs=r,n.useEffect(i.effect,[]),i.config.domTarget?pM:i.bind}function pM(){"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`.")}var fM=function(e){function t(){return e.apply(this,arguments)||this}zj(t,e);var n=t.prototype;return n.getInternalMovement=function(e,t){return Lj(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=Aj(t),o=0===r?0:1/r,i=0===n?0:1/n,s=i*r,a=t.map((function(e){return i*e})),l=t.map((function(e){return o*e}));return{velocities:a,velocity:s,distance:Aj(e),direction:l}}(n.movement,n.delta,r))}return n},n.mapStateValues=function(e){return{xy:e.values,vxvy:e.velocities}},t}(tM);function mM(e){if("touches"in e){var t=e.targetTouches,n=e.changedTouches;return t.length>0?t:n}return null}function gM(e){var t="buttons"in e?e.buttons:0,n=mM(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 vM(e){var t=mM(e),n=t?t[0]:e;return[n.clientX,n.clientY]}var bM=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&&(uM(r.window,o[t],r.eventOptions),dM(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(Vj(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=gM(e);if(n.down){t.updateSharedState(n);var r=vM(e),o=t.getKinematics(r,e),i=oM(Vj(t),e),s=t.state._isTap,a=Aj(o._movement);s&&a>=3&&(s=!1),t.updateGestureState(Pj({},i,o,{_isTap:s})),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],s=t.state.movement,a=s[0],l=s[1],c=t.state._intentional,d=c[0],u=c[1],h=t.config.swipeVelocity,p=h[0],f=h[1],m=t.config.swipeDistance,g=m[0],v=m[1],b=Pj({},oM(Vj(t),e),t.getMovement(t.state.values)),y=[0,0];b.elapsedTime<220&&(!1!==d&&Math.abs(o)>p&&Math.abs(a)>g&&(y[0]=Rj(o)),!1!==u&&Math.abs(i)>f&&Math.abs(l)>v&&(y[1]=Rj(i))),t.updateGestureState(Pj({},b,{tap:n,swipe:y})),t.fireGestureHandler(!0===n)}},t.clean=function(){e.prototype.clean.call(Vj(t)),t.state._delayedEvent=!1,function(e,t){var n=e.config,r=e.windowListeners;n.window&&(uM(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}zj(t,e);var n=t.prototype;return n.startDrag=function(e){var t=vM(e);this.updateSharedState(gM(e)),this.updateGestureState(Pj({},function(e,t,n){var r=e.state.offset,o=n.timeStamp;return Pj({},Qj()[e.stateKey],{_active:!0,values:t,initial:t,offset:r,lastOffset:r,startTime:o})}(this,t,e),oM(this,e,!0),{_pointerId:e.pointerId,cancel:this.onCancel})),this.updateGestureState(this.getMovement(t)),this.fireGestureHandler()},n.addBindings=function(e){(cM(e,"onPointerDown",this.onDragStart),this.config.filterTaps)&&cM(e,this.controller.config.eventOptions.capture?"onClick":"onClickCapture",this.onClick)},t}(fM);function yM(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(!yM(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(!yM(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||yM(e[o[r]],t[o[r]])))return!1;return!0}return e!=e&&t!=t}function xM(e,t){try{return yM(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 wM(e,t){void 0===t&&(t={}),eM.set("drag",bM);var r=n.useRef();return r.current||(r.current=function(e,t){var n,r,o=[],i=!1;return function(){for(var s=arguments.length,a=new Array(s),l=0;l<s;l++)a[l]=arguments[l];return i&&n===this&&t(a,o)||(r=e.apply(this,a),i=!0,n=this,o=a),r}}(Xj,xM)),hM({drag:e},r.current(t))}
2589
+ ***************************************************************************** */var fk,mk,gk=function(){return gk=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},gk.apply(this,arguments)};function vk(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 bk(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 yk(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.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 s}function xk(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"}(fk||(fk={})),function(e){e.Parent="#_parent",e.Internal="#_internal"}(mk||(mk={}));var wk=fk.Start,Ck=fk.Stop,kk=fk.Raise,Sk=fk.Send,$k=fk.Cancel,jk=fk.NullEvent,Mk=fk.Assign;fk.After,fk.DoneState;var Ek=fk.Log,Tk=fk.Init,Ok=fk.Invoke;fk.ErrorExecution;var Lk,Ak=fk.ErrorPlatform,Rk=fk.ErrorCustom,Nk=fk.Update,Dk=fk.Choose,Ik=fk.Pure,Pk={},zk="xstate.guard",Vk="production"===process.env.NODE_ENV;function Bk(e,t,n){void 0===n&&(n=".");var r=Fk(e,n),o=Fk(t,n);return iS(o)?!!iS(r)&&o===r:iS(r)?r in o:Object.keys(r).every((function(e){return e in o&&Bk(r[e],o[e])}))}function Hk(e){try{return iS(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 _k(e,t){try{return rS(e)?e:e.toString().split(t)}catch(t){throw new Error("'".concat(e,"' is not a valid state path."))}}function Fk(e,t){return"object"==typeof(n=e)&&"value"in n&&"context"in n&&"event"in n&&"_event"in n?e.value:rS(e)?qk(e):"string"!=typeof e?e:qk(_k(e,t));var n}function qk(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 Wk(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 Uk(e,t,n){var r,o,i={};try{for(var s=bk(Object.keys(e)),a=s.next();!a.done;a=s.next()){var l=a.value,c=e[l];n(c)&&(i[l]=t(c,l,e))}}catch(e){r={error:e}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}return i}var Kk=function(e){return function(t){var n,r,o=t;try{for(var i=bk(e),s=i.next();!s.done;s=i.next()){o=o[s.value]}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return o}};function Gk(e){return e?iS(e)?[[e]]:Zk(Object.keys(e).map((function(t){var n=e[t];return"string"==typeof n||n&&Object.keys(n).length?Gk(e[t]).map((function(e){return[t].concat(e)})):[[t]]}))):[[]]}function Zk(e){var t;return(t=[]).concat.apply(t,xk([],yk(e),!1))}function Jk(e){return rS(e)?e:[e]}function Xk(e){return void 0===e?[]:Jk(e)}function Yk(e,t,n){var r,o;if(oS(e))return e(t,n.data);var i={};try{for(var s=bk(Object.keys(e)),a=s.next();!a.done;a=s.next()){var l=a.value,c=e[l];oS(c)?i[l]=c(t,n.data):i[l]=c}}catch(e){r={error:e}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}return i}function Qk(e){return e instanceof Promise||!(null===e||!oS(e)&&"object"!=typeof e||!oS(e.then))}function eS(e,t){return Wk(e.states,(function(e,n){if(e){var r=(iS(t)?void 0:t[n])||(e?e.current:void 0);if(r)return{current:r,states:eS(e,r)}}}))}function tS(e,t,n,r){Vk||nS(!!e,"Attempting to update undefined context");var o=e?n.reduce((function(e,n){var o,i,s=n.assignment,a={state:r,action:n,_event:t},l={};if(oS(s))l=s(e,t.data,a);else try{for(var c=bk(Object.keys(s)),d=c.next();!d.done;d=c.next()){var u=d.value,h=s[u];l[u]=oS(h)?h(e,t.data,a):h}}catch(e){o={error:e}}finally{try{d&&!d.done&&(i=c.return)&&i.call(c)}finally{if(o)throw o.error}}return Object.assign({},e,l)}),e):e;return o}var nS=function(){};function rS(e){return Array.isArray(e)}function oS(e){return"function"==typeof e}function iS(e){return"string"==typeof e}function sS(e,t){if(e)return iS(e)?{type:zk,name:e,predicate:t?t[e]:void 0}:oS(e)?{type:zk,name:e.name,predicate:e}:e}Vk||(nS=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 aS=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}();function lS(e){return!!e&&"__xstatenode"in e}function cS(e,t){return iS(e)||"number"==typeof e?gk({type:e},t):e}function dS(e,t){if(!iS(e)&&"$$type"in e&&"scxml"===e.$$type)return e;var n=cS(e);return gk({name:n.type,data:n,$$type:"scxml",type:"external"},t)}function uS(e,t){return Jk(t).map((function(t){return void 0===t||"string"==typeof t||lS(t)?{target:t,event:e}:gk(gk({},t),{event:e})}))}function hS(e,t,n,r,o){var i=e.options.guards,s={state:o,cond:t,_event:r};if(t.type===zk)return((null==i?void 0:i[t.name])||t.predicate)(n,r.data,s);var a=null==i?void 0:i[t.type];if(!a)throw new Error("Guard '".concat(t.type,"' is not implemented on machine '").concat(e.id,"'."));return a(n,r.data,s)}function pS(e){return"string"==typeof e?{type:e}:e}function fS(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 mS(e,t){return"".concat(e,":invocation[").concat(t,"]")}function gS(e){return(e.type===kk||e.type===Sk&&e.to===mk.Internal)&&"number"!=typeof e.delay}(Lk={})[aS]=function(){return this},Lk[Symbol.observable]=function(){return this};var vS=dS({type:Tk});function bS(e,t){return t&&t[e]||void 0}function yS(e,t){var n;if(iS(e)||"number"==typeof e)n=oS(r=bS(e,t))?{type:e,exec:r}:r||{type:e,exec:void 0};else if(oS(e))n={type:e.name||e.toString(),exec:e};else{var r;if(oS(r=bS(e.type,t)))n=gk(gk({},e),{exec:r});else if(r){var o=r.type||e.type;n=gk(gk(gk({},r),e),{type:o})}else n=e}return n}var xS=function(e,t){return e?(rS(e)?e:[e]).map((function(e){return yS(e,t)})):[]};function wS(e){var t=yS(e);return gk(gk({id:iS(e)?e:t.id},t),{type:t.type})}function CS(e,t){var n="".concat(fk.DoneState,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function kS(e,t){var n="".concat(fk.DoneInvoke,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function SS(e,t){var n="".concat(fk.ErrorPlatform,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function $S(e,t,n,r,o,i,s){void 0===s&&(s=!1);var a=s?[]:function(e){var t,n,r=[];try{for(var o=bk(e),i=o.next();!i.done;i=o.next())for(var s=i.value,a=0;a<s.actions.length;)s.actions[a].type!==Mk?a++:(r.push(s.actions[a]),s.actions.splice(a,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=a.length?tS(n,r,a,t):n,c=s?[n]:void 0,d=[];function u(o,a){var u;switch(a.type){case kk:var h=function(e,t,n,r){var o,i={_event:n},s=dS(oS(e.event)?e.event(t,n.data,i):e.event);if(iS(e.delay)){var a=r&&r[e.delay];o=oS(a)?a(t,n.data,i):a}else o=oS(e.delay)?e.delay(t,n.data,i):e.delay;return gk(gk({},e),{type:kk,_event:s,delay:o})}(a,l,r,e.options.delays);return i&&"number"==typeof h.delay&&i(h,l,r),h;case Sk:var p=function(e,t,n,r){var o,i={_event:n},s=dS(oS(e.event)?e.event(t,n.data,i):e.event);if(iS(e.delay)){var a=r&&r[e.delay];o=oS(a)?a(t,n.data,i):a}else o=oS(e.delay)?e.delay(t,n.data,i):e.delay;var l=oS(e.to)?e.to(t,n.data,i):e.to;return gk(gk({},e),{to:l,_event:s,event:s.data,delay:o})}(a,l,r,e.options.delays);if(!Vk){var f=a.delay;nS(!iS(f)||"number"==typeof p.delay,"No delay reference for delay expression '".concat(f,"' was found on machine '").concat(e.id,"'"))}return i&&p.to!==mk.Internal&&("entry"===o?d.push(p):i(p,l,r)),p;case Ek:var m=function(e,t,n){return gk(gk({},e),{value:iS(e.expr)?e.expr:e.expr(t,n.data,{_event:n})})}(a,l,r);return null==i||i(m,l,r),m;case Dk:if(!(y=null===(u=a.conds.find((function(n){var o=sS(n.cond,e.options.guards);return!o||hS(e,o,l,r,i?void 0:t)})))||void 0===u?void 0:u.actions))return[];var g=yk($S(e,t,l,r,[{type:o,actions:xS(Xk(y),e.options.actions)}],i,s),2),v=g[0],b=g[1];return l=b,null==c||c.push(l),v;case Ik:var y;if(!(y=a.get(l,r.data)))return[];var x=yk($S(e,t,l,r,[{type:o,actions:xS(Xk(y),e.options.actions)}],i,s),2),w=x[0],C=x[1];return l=C,null==c||c.push(l),w;case Ck:m=function(e,t,n){var r=oS(e.activity)?e.activity(t,n.data):e.activity,o="string"==typeof r?{id:r}:r;return{type:fk.Stop,activity:o}}(a,l,r);return null==i||i(m,n,r),m;case Mk:l=tS(l,r,[a],i?void 0:t),null==c||c.push(l);break;default:var k=yS(a,e.options.actions),S=k.exec;if(i)i(k,l,r);else if(S&&c){var $=c.length-1,j=gk(gk({},k),{exec:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];S.apply(void 0,xk([c[$]],yk(t),!1))}});k=j}return k}}var h=Zk(o.map((function(e){var t,n,o=[];try{for(var s=bk(e.actions),a=s.next();!a.done;a=s.next()){var c=a.value,h=u(e.type,c);h&&(o=o.concat(h))}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return d.forEach((function(e){i(e,l,r)})),d.length=0,o})));return[h,l]}var jS=function(e,t){return t(e)};function MS(e){var t;return(t={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:e}}})[aS]=function(){return this},t}function ES(e,t,n){var r=MS(t);if(r.deferred=!0,lS(e)){var o=r.state=jS(void 0,(function(){return(n?e.withContext(n):e).initialState}));r.getSnapshot=function(){return o}}return r}var TS=function(e){return"atomic"===e.type||"final"===e.type};function OS(e){return Object.keys(e.states).map((function(t){return e.states[t]}))}function LS(e){return OS(e).filter((function(e){return"history"!==e.type}))}function AS(e){var t=[e];return TS(e)?t:t.concat(Zk(LS(e).map(AS)))}function RS(e,t){var n,r,o,i,s,a,l,c,d=DS(new Set(e)),u=new Set(t);try{for(var h=bk(u),p=h.next();!p.done;p=h.next())for(var f=(k=p.value).parent;f&&!u.has(f);)u.add(f),f=f.parent}catch(e){n={error:e}}finally{try{p&&!p.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}var m=DS(u);try{for(var g=bk(u),v=g.next();!v.done;v=g.next()){if("compound"!==(k=v.value).type||m.get(k)&&m.get(k).length){if("parallel"===k.type)try{for(var b=(s=void 0,bk(LS(k))),y=b.next();!y.done;y=b.next()){var x=y.value;u.has(x)||(u.add(x),d.get(x)?d.get(x).forEach((function(e){return u.add(e)})):x.initialStateNodes.forEach((function(e){return u.add(e)})))}}catch(e){s={error:e}}finally{try{y&&!y.done&&(a=b.return)&&a.call(b)}finally{if(s)throw s.error}}}else d.get(k)?d.get(k).forEach((function(e){return u.add(e)})):k.initialStateNodes.forEach((function(e){return u.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=bk(u),C=w.next();!C.done;C=w.next()){var k;for(f=(k=C.value).parent;f&&!u.has(f);)u.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 u}function NS(e,t){var n=t.get(e);if(!n)return{};if("compound"===e.type){var r=n[0];if(!r)return{};if(TS(r))return r.key}var o={};return n.forEach((function(e){o[e.key]=NS(e,t)})),o}function DS(e){var t,n,r=new Map;try{for(var o=bk(e),i=o.next();!i.done;i=o.next()){var s=i.value;r.has(s)||r.set(s,[]),s.parent&&(r.has(s.parent)||r.set(s.parent,[]),r.get(s.parent).push(s))}}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 IS(e,t){return NS(e,DS(RS([e],t)))}function PS(e,t){return Array.isArray(e)?e.some((function(e){return e===t})):e instanceof Set&&e.has(t)}function zS(e,t){return"compound"===t.type?LS(t).some((function(t){return"final"===t.type&&PS(e,t)})):"parallel"===t.type&&LS(t).every((function(t){return zS(e,t)}))}function VS(e){return new Set(Zk(e.map((function(e){return e.tags}))))}function BS(e,t){if(e===t)return!0;if(void 0===e||void 0===t)return!1;if(iS(e)||iS(t))return e===t;var n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every((function(n){return BS(e[n],t[n])}))}var HS=function(){function e(e){var t,n,r=this;this.actions=[],this.activities=Pk,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||Pk,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 xk([],yk(new Set(Zk(xk([],yk(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:vS,_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=vS;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="."),iS(e))return[e];var r=Object.keys(e);return r.concat.apply(r,xk([],yk(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=vk(e,["configuration","transitions","tags","machine"]);return gk(gk({},n),{tags:Array.from(t)})},e.prototype.matches=function(e){return Bk(e,this.value)},e.prototype.hasTag=function(e){return this.tags.has(e)},e.prototype.can=function(e){var t;Vk&&nS(!!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}(),_S={deferEvents:!1},FS=function(){function e(e){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=gk(gk({},_S),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}(),qS=new Map,WS=0,US=function(){return"x:".concat(WS++)},KS=function(e,t){return qS.set(e,t),e},GS=function(e){return qS.get(e)},ZS=function(e){qS.delete(e)};function JS(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void(Vk||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 XS(e){if(JS()){var t=function(){var e=JS();if(e&&"__xstate__"in e)return e.__xstate__}();t&&t.register(e)}}function YS(e,t){void 0===t&&(t={});var n=e.initialState,r=new Set,o=[],i=!1,s=function(e){var t;return gk(((t={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}})[aS]=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,a),r.forEach((function(e){return e.next(n)}))}i=!1}}()},getSnapshot:function(){return n},subscribe:function(e,t,o){var i=fS(e,t,o);return r.add(i),i.next(n),{unsubscribe:function(){r.delete(i)}}}}),a={parent:t.parent,self:s,id:t.id||"anonymous",observers:r};return n=e.start?e.start(a):n,s}var QS,e$={sync:!1,autoForward:!1};!function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(QS||(QS={}));var t$=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=QS.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(e,t){if(rS(e))return r.batch(e),r.state;var n=dS(cS(e,t));if(r.status===QS.Stopped)return Vk||nS(!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!==QS.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===mk.Parent||r.parent.id===t),s=i?r.parent:iS(t)?t===mk.Internal?r:r.children.get(t)||GS(t):(o=t)&&"function"==typeof o.send?t:void 0;if(s)if("machine"in s){if(r.status!==QS.Stopped||r.parent!==s||r.state.done){var a=gk(gk({},e),{name:e.name===Rk?"".concat(SS(r.id)):e.name,origin:r.sessionId});!n&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([s,a]):s.send(a)}}else!n&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([s,e.data]):s.send(e.data);else{if(!i)throw new Error("Unable to send event to child '".concat(t,"' from service '").concat(r.id,"'."));Vk||nS(!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||bS(e.type,o),s=oS(i)?i:i?i.exec:e.exec;if(s)try{return s(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 kk:var a=e;r.defer(a);break;case Sk:var l=e;if("number"==typeof l.delay)return void r.defer(l);l.to?r.sendTo(l._event,l.to,n===vS):r.send(l._event);break;case $k:r.cancel(e.sendId);break;case wk:if(r.status!==QS.Running)return;var c=e.activity;if(!r.machine.config.predictableActionArguments&&!r.state.activities[c.id||c.type])break;if(c.type===fk.Invoke){var d=pS(c.src),u=r.machine.options.services?r.machine.options.services[d.type]:void 0,h=c.id,p=c.data;Vk||nS(!("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(!u)return void(Vk||nS(!1,"No service found for invocation '".concat(c.src,"' in machine '").concat(r.machine.id,"'.")));var m=p?Yk(p,t,n):void 0;if("string"==typeof u)return;var g=oS(u)?u(t,n.data,{data:m,src:d,meta:c.meta}):u;if(!g)return;var v=void 0;lS(g)&&(g=m?g.withContext(m):g,v={autoForward:f}),r.spawn(g,h,v)}else r.spawnActivity(c);break;case Ck:r.stopChild(e.activity.id);break;case Ek:var b=e,y=b.label,x=b.value;y?r.logger(y,x):r.logger(x);break;default:Vk||nS(!1,"No implementation found for action type '".concat(e.type,"'"))}};var o=gk(gk({},e.defaultOptions),n),i=o.clock,s=o.logger,a=o.parent,l=o.id,c=void 0!==l?l:t.id;this.id=c,this.logger=s,this.clock=i,this.parent=a,this.options=o,this.scheduler=new FS({deferEvents:this.options.deferEvents}),this.sessionId=US()}return Object.defineProperty(e.prototype,"initialState",{get:function(){var e=this;return this._initialState?this._initialState:jS(this,(function(){return e._initialState=e.machine.initialState,e._initialState}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return Vk||nS(this.status!==QS.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=bk(e.actions),i=o.next();!i.done;i=o.next()){var s=i.value;this.exec(s,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,s,a,l,c,d=this;if(e._sessionid=this.sessionId,this._state=e,this.machine.config.predictableActionArguments&&t!==vS||!this.options.execute)for(var u=void 0;u=this._outgoingQueue.shift();)u[0].send(u[1]);else this.execute(this.state);if(this.children.forEach((function(e){d.state.children[e.id]=e})),this.devTools&&this.devTools.send(t.data,e),e.event)try{for(var h=bk(this.eventListeners),p=h.next();!p.done;p=h.next()){(0,p.value)(e.event)}}catch(e){n={error:e}}finally{try{p&&!p.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}try{for(var f=bk(this.listeners),m=f.next();!m.done;m=f.next()){(0,m.value)(e,e.event)}}catch(e){o={error:e}}finally{try{m&&!m.done&&(i=f.return)&&i.call(f)}finally{if(o)throw o.error}}try{for(var g=bk(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){s={error:e}}finally{try{v&&!v.done&&(a=g.return)&&a.call(g)}finally{if(s)throw s.error}}if(this.state.done){var b=e.configuration.find((function(e){return"final"===e.type&&e.parent===d.machine})),y=b&&b.doneData?Yk(b.doneData,e.context,t):void 0;this._doneEvent=kS(this.id,y);try{for(var x=bk(this.doneListeners),w=x.next();!w.done;w=x.next()){(0,w.value)(this._doneEvent)}}catch(e){l={error:e}}finally{try{w&&!w.done&&(c=x.return)&&c.call(x)}finally{if(l)throw l.error}}this._stop(),this._stopChildren(),ZS(this.sessionId)}},e.prototype.onTransition=function(e){return this.listeners.add(e),this.status===QS.Running&&e(this.state,this.state.event),this},e.prototype.subscribe=function(e,t,n){var r=this,o=fS(e,t,n);this.listeners.add(o.next),this.status!==QS.NotStarted&&o.next(this.state);var i=function(){r.doneListeners.delete(i),r.stopListeners.delete(i),o.complete()};return this.status===QS.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===QS.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===QS.Running)return this;this.machine._init(),KS(this.sessionId,this),this.initialized=!0,this.status=QS.Running;var n=void 0===e?this.initialState:jS(this,(function(){return"object"==typeof(n=e)&&null!==n&&"value"in n&&"_event"in n?t.machine.resolveState(e):t.machine.resolveState(HS.from(e,t.machine.context));var n}));return this.options.devTools&&this.attachDev(),this.scheduler.initialize((function(){t.update(n,vS)})),this},e.prototype._stopChildren=function(){this.children.forEach((function(e){oS(e.stop)&&e.stop()})),this.children.clear()},e.prototype._stop=function(){var e,t,n,r,o,i,s,a,l,c;try{for(var d=bk(this.listeners),u=d.next();!u.done;u=d.next()){var h=u.value;this.listeners.delete(h)}}catch(t){e={error:t}}finally{try{u&&!u.done&&(t=d.return)&&t.call(d)}finally{if(e)throw e.error}}try{for(var p=bk(this.stopListeners),f=p.next();!f.done;f=p.next()){(h=f.value)(),this.stopListeners.delete(h)}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=p.return)&&r.call(p)}finally{if(n)throw n.error}}try{for(var m=bk(this.contextListeners),g=m.next();!g.done;g=m.next()){h=g.value;this.contextListeners.delete(h)}}catch(e){o={error:e}}finally{try{g&&!g.done&&(i=m.return)&&i.call(m)}finally{if(o)throw o.error}}try{for(var v=bk(this.doneListeners),b=v.next();!b.done;b=v.next()){h=b.value;this.doneListeners.delete(h)}}catch(e){s={error:e}}finally{try{b&&!b.done&&(a=v.return)&&a.call(v)}finally{if(s)throw s.error}}if(!this.initialized)return this;this.initialized=!1,this.status=QS.Stopped,this._initialState=void 0;try{for(var y=bk(Object.keys(this.delayedEventsMap)),x=y.next();!x.done;x=y.next()){var w=x.value;this.clock.clearTimeout(this.delayedEventsMap[w])}}catch(e){l={error:e}}finally{try{x&&!x.done&&(c=y.return)&&c.call(y)}finally{if(l)throw l.error}}this.scheduler.clear(),this.scheduler=new FS({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=dS({type:"xstate.stop"}),r=jS(e,(function(){var t=Zk(xk([],yk(e.state.configuration),!1).sort((function(e,t){return t.order-e.order})).map((function(t){return xS(t.onExit,e.machine.options.actions)}))),r=yk($S(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],s=new HS({value:e.state.value,context:i,_event:n,_sessionid:e.sessionId,historyValue:void 0,history:e.state,actions:o.filter((function(e){return!gS(e)})),activities:{},events:[],configuration:[],transitions:[],children:{},done:e.state.done,tags:e.state.tags,machine:e.machine});return s.changed=!0,s}));e.update(r,n),e._stopChildren(),ZS(e.sessionId)}})),this},e.prototype.batch=function(e){var t=this;if(this.status===QS.NotStarted&&this.options.deferEvents)Vk||nS(!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!==QS.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,s=!1,a=[],l=function(e){var r=dS(e);t.forward(r),i=jS(t,(function(){return t.machine.transition(i,r,void 0,n||void 0)})),a.push.apply(a,xk([],yk(t.machine.config.predictableActionArguments?i.actions:i.actions.map((function(e){return function(e,t){var n=e.exec;return gk(gk({},e),{exec:void 0!==n?function(){return n(t.context,t.event,{action:e,state:t,_event:t._event})}:void 0})}(e,i)}))),!1)),s=s||!!i.changed};try{for(var c=bk(e),d=c.next();!d.done;d=c.next()){l(d.value)}}catch(e){r={error:e}}finally{try{d&&!d.done&&(o=c.return)&&o.call(c)}finally{if(r)throw r.error}}i.changed=s,i.actions=a,t.update(i,dS(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=dS(e);if(0===r.name.indexOf(Ak)&&!this.state.nextEvents.some((function(e){return 0===e.indexOf(Ak)})))throw r.data.data;return jS(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=bk(this.forwardTo),o=r.next();!o.done;o=r.next()){var i=o.value,s=this.children.get(i);if(!s)throw new Error("Unable to forward event '".concat(e,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(i,"'."));s.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),oS(t.stop)&&t.stop())},e.prototype.spawn=function(e,t,n){if(this.status!==QS.Running)return ES(e,t);if(Qk(e))return this.spawnPromise(Promise.resolve(e),t);if(oS(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&&oS(e.subscribe)}catch(e){return!1}}(e))return this.spawnObservable(e,t);if(lS(e))return this.spawnMachine(e,gk(gk({},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,gk(gk({},this.options),{parent:this,id:n.id||t.id})),i=gk(gk({},e$),n);i.sync&&o.onTransition((function(e){r.send(Nk,{state:e,id:o.id})}));var s=o;return this.children.set(o.id,s),i.autoForward&&this.forwardTo.add(o.id),o.onDone((function(e){r.removeChild(o.id),r.send(dS(e,{origin:o.id}))})).start(),s},e.prototype.spawnBehavior=function(e,t){var n=YS(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(dS(kS(t,e),{origin:t})))}),(function(e){if(!i){o.removeChild(t);var n=SS(t,e);try{o.send(dS(n,{origin:t}))}catch(r){!function(e,t,n){if(!Vk){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 s=((n={id:t,send:function(){},subscribe:function(t,n,r){var o=fS(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}})[aS]=function(){return this},n);return this.children.set(t,s),s},e.prototype.spawnCallback=function(e,t){var n,r,o,i=this,s=!1,a=new Set,l=new Set;try{o=e((function(e){r=e,l.forEach((function(t){return t(e)})),s||i.send(dS(e,{origin:t}))}),(function(e){a.add(e)}))}catch(e){this.send(SS(t,e))}if(Qk(o))return this.spawnPromise(o,t);var c=((n={id:t,send:function(e){return a.forEach((function(t){return t(e)}))},subscribe:function(e){var t=fS(e);return l.add(t.next),{unsubscribe:function(){l.delete(t.next)}}},stop:function(){s=!0,oS(o)&&o()},toJSON:function(){return{id:t}},getSnapshot:function(){return r}})[aS]=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(dS(e,{origin:t}))}),(function(e){o.removeChild(t),o.send(dS(SS(t,e),{origin:t}))}),(function(){o.removeChild(t),o.send(dS(kS(t),{origin:t}))})),s=((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}}})[aS]=function(){return this},n);return this.children.set(t,s),s},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 Vk||nS(!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}}})[aS]=function(){return this},n))},e.prototype.attachDev=function(){var e=JS();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(gk(gk({name:this.id,autoPause:!0,stateSanitizer:function(e){return{value:e.value,context:e.context,actions:e.actions}}},t),{features:gk({jump:!1,skip:!1},t?t.features:void 0)}),this.machine),this.devTools.init(this.state)}XS(this)}},e.prototype.toJSON=function(){return{id:this.id}},e.prototype[aS]=function(){return this},e.prototype.getSnapshot=function(){return this.status===QS.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=n$,e}();function n$(e,t){return new t$(e,t)}function r$(e){if("string"==typeof e){var t={type:e,toString:function(){return e}};return t}return e}function o$(e){return gk(gk({type:Ok},e),{toJSON:function(){e.onDone,e.onError;var t=vk(e,["onDone","onError"]);return gk(gk({},t),{type:Ok,src:r$(e.src)})}})}var i$="",s$="*",a$={},l$=function(e){return"#"===e[0]},c$=function(){function e(t,n,r,o){void 0===r&&(r="context"in t?t.context:void 0);var i,s=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||xk([this.machine.key],yk(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,Vk||nS(!("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?Wk(this.config.states,(function(t,n){var r,o=new e(t,{},void 0,{parent:s,key:n});return Object.assign(s.idMap,gk(((r={})[o.id]=o,r),o.idMap)),o})):a$;var a=0;!function e(t){var n,r;t.order=a++;try{for(var o=bk(OS(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===i$})):i$ in this.config.on),this.strict=!!this.config.strict,this.onEntry=Xk(this.config.entry||this.config.onEntry).map((function(e){return yS(e)})),this.onExit=Xk(this.config.exit||this.config.onExit).map((function(e){return yS(e)})),this.meta=this.config.meta,this.doneData="final"===this.type?this.config.data:void 0,this.invoke=Xk(this.config.invoke).map((function(e,t){var n,r;if(lS(e)){var o=mS(s.id,t);return s.machine.options.services=gk(((n={})[o]=e,n),s.machine.options.services),o$({src:o,id:o})}if(iS(e.src)){o=e.id||mS(s.id,t);return o$(gk(gk({},e),{id:o,src:e.src}))}if(lS(e.src)||oS(e.src)){o=e.id||mS(s.id,t);return s.machine.options.services=gk(((r={})[o]=e.src,r),s.machine.options.services),o$(gk(gk({id:o},e),{src:o}))}var i=e.src;return o$(gk(gk({id:mS(s.id,t)},e),{src:i}))})),this.activities=Xk(this.config.activities).concat(this.invoke).map((function(e){return wS(e)})),this.transition=this.transition.bind(this),this.tags=Xk(this.config.tags)}return e.prototype._init=function(){this.__cache.transitions||AS(this).forEach((function(e){return e.on}))},e.prototype.withConfig=function(t,n){var r=this.options,o=r.actions,i=r.activities,s=r.guards,a=r.services,l=r.delays;return new e(this.config,{actions:gk(gk({},o),t.actions),activities:gk(gk({},i),t.activities),guards:gk(gk({},s),t.guards),services:gk(gk({},a),t.services),delays:gk(gk({},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 oS(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:Wk(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===i$,n=this.transitions.filter((function(n){var r=n.eventType===e;return t?r:r||n.eventType===s$}));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(fk.After,"(").concat(e,")").concat(n)}(oS(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:Sk,event:oS(e)?e:cS(e),delay:t?t.delay:void 0,id:t&&void 0!==t.id?t.id:oS(e)?e.name:Hk(e)}}(r,{delay:t})),e.onExit.push({type:$k,sendId:r}),r},r=rS(t)?t.map((function(e,t){var r=n(e.delay,t);return gk(gk({},e),{event:r})})):Zk(Object.keys(t).map((function(e,r){var o=t[e],i=iS(o)?{target:o}:o,s=isNaN(+e)?e:+e,a=n(s,r);return Xk(i).map((function(e){return gk(gk({},e),{event:a,delay:s})}))})));return r.map((function(t){var n=t.delay;return gk(gk({},e.formatTransition(t)),{delay:n})}))},e.prototype.getStateNodes=function(e){var t,n=this;if(!e)return[];var r=e instanceof HS?e.value:Fk(e,this.delimiter);if(iS(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),s=[this];return s.push.apply(s,xk([],yk(Zk(i.map((function(e){return n.getStateNode(e).getStateNodes(r[e])})))),!1)),s},e.prototype.handles=function(e){var t=Hk(e);return this.events.includes(t)},e.prototype.resolveState=function(e){var t=e instanceof HS?e:HS.create(e),n=Array.from(RS([],this.getStateNodes(t.value)));return new HS(gk(gk({},t),{value:this.resolve(t.value),configuration:n,done:zS(n,this),tags:VS(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 s=bk(Object.keys(e)),a=s.next();!a.done;a=s.next()){var l=a.value,c=e[l];if(c){var d=this.getStateNode(l)._transition(c,t,n);d&&(i[l]=d)}}}catch(e){r={error:e}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}var u=Object.keys(i).map((function(e){return i[e]})),h=Zk(u.map((function(e){return e.transitions})));if(!u.some((function(e){return e.transitions.length>0})))return this.next(t,n);var p=Zk(Object.keys(i).map((function(e){return i[e].configuration})));return{transitions:h,exitSet:Zk(u.map((function(e){return e.exitSet}))),configuration:p,source:t,actions:Zk(Object.keys(i).map((function(e){return i[e].actions})))}},e.prototype._transition=function(e,t,n){return iS(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,dS(t))},e.prototype.next=function(e,t){var n,r,o,i=this,s=t.name,a=[],l=[];try{for(var c=bk(this.getCandidates(s)),d=c.next();!d.done;d=c.next()){var u=d.value,h=u.cond,p=u.in,f=e.context,m=!p||(iS(p)&&l$(p)?e.matches(Fk(this.getStateNodeById(p).path,this.delimiter)):Bk(Fk(p,this.delimiter),Kk(this.path.slice(0,-2))(e.value))),g=!1;try{g=!h||hS(this.machine,h,f,t,e)}catch(e){throw new Error("Unable to evaluate guard '".concat(h.name||h.type,"' in transition for event '").concat(s,"' in state node '").concat(this.id,"':\n").concat(e.message))}if(g&&m){void 0!==u.target&&(l=u.target),a.push.apply(a,xk([],yk(u.actions),!1)),o=u;break}}}catch(e){n={error:e}}finally{try{d&&!d.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:a};var v=Zk(l.map((function(t){return i.getRelativeStateNodes(t,e.historyValue)})));return{transitions:[o],exitSet:!!o.internal?[]:Zk(l.map((function(e){return i.getPotentiallyReenteringNodes(e)}))),configuration:v,source:e,actions:a}}},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,s){var a,l,c,d,u=this,h=i?RS([],this.getStateNodes(i.value)):[],p=new Set;try{for(var f=bk(Array.from(e).sort((function(e,t){return e.order-t.order}))),m=f.next();!m.done;m=f.next()){(!PS(h,b=m.value)||PS(n.exitSet,b)||b.parent&&p.has(b.parent))&&p.add(b)}}catch(e){a={error:e}}finally{try{m&&!m.done&&(l=f.return)&&l.call(f)}finally{if(a)throw a.error}}try{for(var g=bk(h),v=g.next();!v.done;v=g.next()){var b;PS(e,b=v.value)&&!PS(n.exitSet,b.parent)||n.exitSet.push(b)}}catch(e){c={error:e}}finally{try{v&&!v.done&&(d=g.return)&&d.call(g)}finally{if(c)throw c.error}}n.exitSet.sort((function(e,t){return t.order-e.order}));var y=Array.from(p).sort((function(e,t){return e.order-t.order})),x=new Set(n.exitSet),w=Zk(y.map((function(e){var t=[];if("final"!==e.type)return t;var i=e.parent;if(!i.parent)return t;t.push(CS(e.id,e.doneData),CS(i.id,e.doneData?Yk(e.doneData,r,o):void 0));var s=i.parent;return"parallel"===s.type&&LS(s).every((function(e){return zS(n.configuration,e)}))&&t.push(CS(s.id)),t}))),C=y.map((function(e){var t=e.onEntry,n=e.activities.map((function(e){return function(e){var t=wS(e);return{type:fk.Start,activity:t,exec:void 0}}(e)}));return{type:"entry",actions:xS(s?xk(xk([],yk(t),!1),yk(n),!1):xk(xk([],yk(n),!1),yk(t),!1),u.machine.options.actions)}})).concat({type:"state_done",actions:w.map((function(e){return function(e,t){return{type:kk,event:"function"==typeof e?e:cS(e),delay:t?t.delay:void 0,id:null==t?void 0:t.id}}(e)}))}),k=Array.from(x).map((function(e){return{type:"exit",actions:xS(xk(xk([],yk(e.onExit),!1),yk(e.activities.map((function(e){return function(e){var t=oS(e)?e:wS(e);return{type:fk.Stop,activity:t,exec:void 0}}(e)}))),!1),u.machine.options.actions)}})).concat({type:"transition",actions:xS(n.actions,this.machine.options.actions)}).concat(C);if(t){var S=xS(Zk(xk([],yk(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!gS(e)}));return k.concat({type:"stop",actions:S})}return k},e.prototype.transition=function(e,t,n,r){void 0===e&&(e=this.initialState);var o,i,s=dS(t);if(e instanceof HS)o=void 0===n?e:this.resolveState(HS.from(e,n));else{var a=iS(e)?this.resolve(qk(this.getResolvedPath(e))):this.resolve(e),l=null!=n?n:this.machine.context;o=this.resolveState(HS.from(a,l))}if(!Vk&&s.name===s$)throw new Error("An event cannot have the wildcard type ('".concat(s$,"')"));if(this.strict&&!this.events.includes(s.name)&&(i=s.name,!/^(done|error)\./.test(i)))throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(s.name,"'"));var c=this._transition(o.value,o,s)||{transitions:[],configuration:[],exitSet:[],source:o,actions:[]},d=RS([],this.getStateNodes(o.value)),u=c.configuration.length?RS(d,c.configuration):d;return c.configuration=xk([],yk(u),!1),this.resolveTransition(c,o,o.context,r,s)},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,xk([],yk(i),!1)),e},e.prototype.resolveTransition=function(e,t,n,r,o){var i,s,a,l,c=this;void 0===o&&(o=vS);var d=e.configuration,u=!t||e.transitions.length>0,h=u?e.configuration:t?t.configuration:[],p=zS(h,this),f=u?IS(this.machine,d):void 0,m=t?t.historyValue?t.historyValue:e.source?this.machine.historyValue(t.value):void 0:void 0,g=this.getActions(new Set(h),p,e,n,o,t,r),v=t?gk({},t.activities):{};try{for(var b=bk(g),y=b.next();!y.done;y=b.next()){var x=y.value;try{for(var w=(a=void 0,bk(x.actions)),C=w.next();!C.done;C=w.next()){var k=C.value;k.type===wk?v[k.activity.id||k.activity.type]=k:k.type===Ck&&(v[k.activity.id||k.activity.type]=!1)}}catch(e){a={error:e}}finally{try{C&&!C.done&&(l=w.return)&&l.call(w)}finally{if(a)throw a.error}}}}catch(e){i={error:e}}finally{try{y&&!y.done&&(s=b.return)&&s.call(b)}finally{if(i)throw i.error}}var S,$,j=yk($S(this,t,n,o,g,r,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),M=j[0],E=j[1],T=yk(function(e,t){var n,r,o=yk([[],[]],2),i=o[0],s=o[1];try{for(var a=bk(e),l=a.next();!l.done;l=a.next()){var c=l.value;t(c)?i.push(c):s.push(c)}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return[i,s]}(M,gS),2),O=T[0],L=T[1],A=M.filter((function(e){var t;return e.type===wk&&(null===(t=e.activity)||void 0===t?void 0:t.type)===Ok})),R=A.reduce((function(e,t){return e[t.activity.id]=function(e,t,n,r){var o,i=pS(e.src),s=null===(o=null==t?void 0:t.options.services)||void 0===o?void 0:o[i.type],a=e.data?Yk(e.data,n,r):void 0,l=s?ES(s,e.id,a):MS(e.id);return l.meta=e,l}(t.activity,c.machine,E,o),e}),t?gk({},t.children):{}),N=new HS({value:f||t.value,context:E,_event:o,_sessionid:t?t._sessionid:null,historyValue:f?m?(S=m,$=f,{current:$,states:eS(S,$)}):void 0:t?t.historyValue:void 0,history:!f||e.source?t:void 0,actions:f?L:[],activities:f?v:t?t.activities:{},events:[],configuration:h,transitions:e.transitions,children:R,done:p,tags:VS(h),machine:this}),D=n!==E;N.changed=o.name===Nk||D;var I=N.history;I&&delete I.history;var P=!p&&(this._transient||d.some((function(e){return e._transient})));if(!(u||P&&o.name!==i$))return N;var z=N;if(!p)for(P&&(z=this.resolveRaisedTransition(z,{type:jk},o,r));O.length;){var V=O.shift();z=this.resolveRaisedTransition(z,V._event,o,r)}var B=z.changed||(I?!!z.actions.length||D||typeof I.value!=typeof z.value||!BS(z.value,I.value):void 0);return z.changed=B,z.history=I,z},e.prototype.getStateNode=function(e){if(l$(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=l$(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&&l$(e))try{return this.getStateNodeById(e.slice(1))}catch(e){}for(var t=_k(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||a$;switch(this.type){case"parallel":return Wk(this.initialStateValue,(function(t,r){return t?n.getStateNode(r).resolve(e[r]||t):a$}));case"compound":if(iS(e)){var r=this.getStateNode(e);return"parallel"===r.type||"compound"===r.type?((t={})[e]=r.initialStateValue,t):e}return Object.keys(e).length?Wk(e,(function(e,t){return e?n.getStateNode(t).resolve(e):a$})):this.initialStateValue||{};default:return e||a$}},e.prototype.getResolvedPath=function(e){if(l$(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 _k(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=Uk(this.states,(function(e){return e.initialStateValue||a$}),(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=TS(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=iS(t.target)&&l$(t.target)?qk(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 TS(this)?[this]:"compound"!==this.type||this.initial?Zk(Gk(this.initialStateValue).map((function(t){return e.getFromRelativePath(t)}))):(Vk||nS(!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=yk(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:Uk(this.states,(function(t,n){if(!e)return t.historyValue();var r=iS(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?Zk(Gk(r).map((function(e){return n.getFromRelativePath(e)}))):n.initialStateNodes}var o,i,s=(o=n.path,i="states",function(e){var t,n,r=e;try{for(var s=bk(o),a=s.next();!a.done;a=s.next()){var l=a.value;r=r[i][l]}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return r})(e).current;return iS(s)?[n.getStateNode(s)]:Zk(Gk(s).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=Zk(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 s=bk(Object.keys(o)),a=s.next();!a.done;a=s.next()){var l=o[a.value];if(l.states)try{for(var c=(n=void 0,bk(l.events)),d=c.next();!d.done;d=c.next()){var u=d.value;i.add("".concat(u))}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=s.return)&&t.call(s)}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(!iS(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 Xk(e)}(e.target),r="internal"in e?e.internal:!n||n.some((function(e){return iS(e)&&e[0]===t.delimiter})),o=this.machine.options.guards,i=this.resolveTarget(n),s=gk(gk({},e),{actions:xS(Xk(e.actions)),cond:sS(e.cond,o),target:i,source:this,internal:r,eventType:e.event,toJSON:function(){return gk(gk({},s),{target:s.target?s.target.map((function(e){return"#".concat(e.id)})):void 0,source:"#".concat(t.id)})}});return s},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=s$,s=o[i],a=void 0===s?[]:s,l=vk(o,["*"]);n=Zk(Object.keys(l).map((function(e){Vk||e!==i$||nS(!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=uS(e,l[e]);return Vk||function(e,t,n){var r=n.slice(0,-1).some((function(e){return!("cond"in e)&&!("in"in e)&&(iS(e.target)||lS(e.target))})),o=t===i$?"the transient event":"event '".concat(t,"'");nS(!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(uS(s$,a)))}else n=[];var c=this.config.always?uS("",this.config.always):[],d=this.config.onDone?uS(String(CS(this.id)),this.config.onDone):[];Vk||nS(!(this.config.onDone&&!this.parent),'Root nodes cannot have an ".onDone" transition. Please check the config of "'.concat(this.id,'".'));var u=Zk(this.invoke.map((function(e){var t=[];return e.onDone&&t.push.apply(t,xk([],yk(uS(String(kS(e.id)),e.onDone)),!1)),e.onError&&t.push.apply(t,xk([],yk(uS(String(SS(e.id)),e.onError)),!1)),t}))),h=this.after,p=Zk(xk(xk(xk(xk([],yk(d),!1),yk(u),!1),yk(n),!1),yk(c),!1).map((function(e){return Xk(e).map((function(e){return r.formatTransition(e)}))})));try{for(var f=bk(h),m=f.next();!m.done;m=f.next()){var g=m.value;p.push(g)}}catch(t){e={error:t}}finally{try{m&&!m.done&&(t=f.return)&&t.call(f)}finally{if(e)throw e.error}}return p},e}();var d$,u$=function(e){return{type:Mk,assignment:e}};!function(e){e[e.Effect=1]="Effect",e[e.LayoutEffect=2]="LayoutEffect"}(d$||(d$={}));var h$="undefined"!=typeof document?n.useLayoutEffect:function(){};function p$(e){var t=l.useRef();return t.current||(t.current={v:e()}),t.current.v}var f$=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.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 s},m$=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 g$=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.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 s},v$=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 b$(e,t){(0,e.exec)(t.context,t._event.data,{action:e,state:t,_event:t._event})()}function y$(e){var t=n.useRef([]),r=n.useRef([]);h$((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})),s=g$(function(e,t){var n,r,o=f$([[],[]],2),i=o[0],s=o[1];try{for(var a=m$(e),l=a.next();!l.done;l=a.next()){var c=l.value;t(c)?i.push(c):s.push(c)}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return[i,s]}(i,(function(e){return e.exec.__effect===d$.Effect})),2),a=s[0],l=s[1];(n=t.current).push.apply(n,v$([],g$(a.map((function(t){return[t,e]}))),!1)),(o=r.current).push.apply(o,v$([],g$(l.map((function(t){return[t,e]}))),!1))}}));return function(){n.unsubscribe()}}),[]),h$((function(){for(;r.current.length;){var e=g$(r.current.shift(),2);b$(e[0],e[1])}})),n.useEffect((function(){for(;t.current.length;){var e=g$(t.current.shift(),2);b$(e[0],e[1])}}))}var x$=function(){return x$=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},x$.apply(this,arguments)},w$=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},C$=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.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 s};var k$=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.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 s};function S$(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)&&a(e)}),[]),o=function(e,t,r){void 0===t&&(t={});var o=p$((function(){return"function"==typeof e?e():e}));if("production"!==process.env.NODE_ENV&&"function"!=typeof e){var i=C$(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 s=t.context,a=t.guards,l=t.actions,c=t.activities,d=t.services,u=t.delays,h=t.state,p=w$(t,["context","guards","actions","activities","services","delays","state"]),f=p$((function(){var e={context:s,guards:a,actions:l,activities:c,services:d,delays:u};return n$(o.withConfig(e,(function(){return x$(x$({},o.context),s)})),x$({deferEvents:!0},p))}));return h$((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]),h$((function(){return f.start(h?HS.create(h):void 0),function(){f.stop()}}),[]),h$((function(){Object.assign(f.machine.options.actions,l),Object.assign(f.machine.options.guards,a),Object.assign(f.machine.options.activities,c),Object.assign(f.machine.options.services,d),Object.assign(f.machine.options.delays,u)}),[l,a,c,d,u]),y$(f),f}(e,t,r),i=k$(n.useState((function(){var e=o.machine.initialState;return t.state?HS.create(t.state):e})),2),s=i[0],a=i[1];return[s,o.send,o]}function $$(){return $$=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},$$.apply(null,arguments)}function j$(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 M$={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(M$.str(e)||M$.num(e))return e===t;if(M$.obj(e)&&M$.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!M$.und(n)||e===t}};function E$(e,t){return M$.und(e)||M$.nul(e)?t:e}function T$(e){return M$.und(e)?[]:M$.arr(e)?e:[e]}function O$(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 M$.fun(e)?e(...n):e}function L$(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,j$(e,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}(e);if(M$.und(t))return $$({to:t},e);const n=Object.keys(e).reduce(((n,r)=>M$.und(t[r])?$$({},n,{[r]:e[r]}):n),{});return $$({to:t},n)}class A${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 R$ extends A${constructor(){super(...arguments),this.payload=[],this.attach=()=>this.payload.forEach((e=>e instanceof A$&&e.addChild(this))),this.detach=()=>this.payload.forEach((e=>e instanceof A$&&e.removeChild(this)))}}class N$ extends A${constructor(){super(...arguments),this.payload={},this.attach=()=>Object.values(this.payload).forEach((e=>e instanceof A$&&e.addChild(this))),this.detach=()=>Object.values(this.payload).forEach((e=>e instanceof A$&&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 A$)&&(t[n]=r instanceof A$?r[e?"getAnimatedValue":"getValue"]():r)}return t}getAnimatedValue(){return this.getValue(!0)}}let D$,I$;let P$,z$=e=>"undefined"!=typeof window?window.requestAnimationFrame(e):-1;let V$,B$=()=>Date.now();class H$ extends N${constructor(e,t){super(),this.update=void 0,this.payload=e.style?$$({},e,{style:V$(e.style)}):e,this.update=t,this.attach()}}let _$=!1;const F$=new Set,q$=()=>{if(!_$)return!1;let e=B$();for(let t of F$){let n=!1;for(let r=0;r<t.configs.length;r++){let o,i,s=t.configs[r];for(let t=0;t<s.animatedValues.length;t++){let r=s.animatedValues[t];if(r.done)continue;let a=s.fromValues[t],l=s.toValues[t],c=r.lastPosition,d=l instanceof A$,u=Array.isArray(s.initialVelocity)?s.initialVelocity[t]:s.initialVelocity;if(d&&(l=l.getValue()),s.immediate)r.setValue(l),r.done=!0;else if("string"!=typeof a&&"string"!=typeof l){if(void 0!==s.duration)c=a+s.easing((e-r.startTime)/s.duration)*(l-a),o=e>=r.startTime+s.duration;else if(s.decay)c=a+u/(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,u=void 0!==r.lastVelocity?r.lastVelocity:s.initialVelocity,e>i+64&&(i=e);let t=Math.floor(e-i);for(let e=0;e<t;++e){u+=1*((-s.tension*(c-l)+-s.friction*u)/s.mass)/1e3,c+=1*u/1e3}let n=!(!s.clamp||0===s.tension)&&(a<l?c>l:c<l),d=Math.abs(u)<=s.precision,h=0===s.tension||Math.abs(l-c)<=s.precision;o=n||d&&h,r.lastVelocity=u,r.lastTime=e}d&&!s.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[s.name]=s.interpolation.getValue())}t.props.onFrame&&t.props.onFrame(t.values),n||(F$.delete(t),t.stop(!0))}return F$.size?z$(q$):_$=!1,_$};function W$(e,t,n){if("function"==typeof e)return e;if(Array.isArray(e))return W$({range:e,output:t,extrapolate:n});if(P$&&"string"==typeof e.output[0])return P$(e);const r=e,o=r.output,i=r.range||[0,1],s=r.extrapolateLeft||r.extrapolate||"extend",a=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,s,a,l){let c=l?l(e):e;if(c<t){if("identity"===s)return c;"clamp"===s&&(c=t)}if(c>n){if("identity"===a)return c;"clamp"===a&&(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,s,a,r.map)}}class U$ extends R${constructor(e,t,n,r){super(),this.calc=void 0,this.payload=e instanceof R$&&!(e instanceof U$)?e.getPayload():Array.isArray(e)?e:[e],this.calc=W$(t,n,r)}getValue(){return this.calc(...this.payload.map((e=>e.getValue())))}updateConfig(e,t,n){this.calc=W$(e,t,n)}interpolate(e,t,n){return new U$(this,e,t,n)}}const K$=(e,t,n)=>e&&new U$(e,t,n);function G$(e,t){"update"in e?t.add(e):e.getChildren().forEach((e=>G$(e,t)))}class Z$ extends A${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&&G$(this,this.animatedStyles),this.animatedStyles.forEach((e=>e.update()))}clearStyles(){this.animatedStyles.clear()}getValue(){return this.value}interpolate(e,t,n){return new U$(this,e,t,n)}}class J$ extends R${constructor(e){super(),this.payload=e.map((e=>new Z$(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 U$(this,e,t)}}let X$=0,Y$=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=X$++}update(e){if(!e)return this;const t=L$(e),n=t.delay,r=void 0===n?0:n,o=t.to,i=j$(t,["delay","to"]);if(M$.arr(o)||M$.fun(o))this.queue.push($$({},i,{delay:r,to:o}));else if(o){let e={};Object.entries(o).forEach((t=>{let n=t[0],o=t[1];const s=$$({to:{[n]:o},delay:O$(r,n)},i),a=e[s.delay]&&e[s.delay].to;e[s.delay]=$$({},e[s.delay],s,{to:$$({},a,s.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;M$.obj(n)&&(this.merged=$$({},n,this.merged)),M$.obj(o)&&(this.merged=$$({},this.merged,o))}));const t=this.local=++this.guid,n=this.localQueue=this.queue;this.queue=[],n.forEach(((r,o)=>{let i=r.delay,s=j$(r,["delay"]);const a=r=>{o===n.length-1&&t===this.guid&&r&&(this.idle=!0,this.props.onRest&&this.props.onRest(this.merged)),e&&e()};let l=M$.arr(s.to)||M$.fun(s.to);i?setTimeout((()=>{t===this.guid&&(l?this.runAsync(s,a):this.diff(s).start(a))}),i):l?this.runAsync(s,a):this.diff(s).start(a)}))}else M$.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),t=this,F$.has(t)||F$.add(t),_$||(_$=!0,z$(q$));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,F$.has(t)&&F$.delete(t)),this}runAsync(e,t){var n=this;e.delay;let r=j$(e,["delay"]);const o=this.local;let i=Promise.resolve(void 0);if(M$.arr(r.to))for(let e=0;e<r.to.length;e++){const t=e,n=$$({},r,L$(r.to[t]));M$.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(M$.fun(r.to)){let e,t=0;i=i.then((()=>r.to((n=>{const i=$$({},r,L$(n));if(M$.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=$$({},this.props,e);let t=this.props,n=t.from,r=void 0===n?{}:n,o=t.to,i=void 0===o?{}:o,s=t.config,a=void 0===s?{}:s,l=t.reverse,c=t.attach,d=t.reset,u=t.immediate;if(l){var h=[i,r];r=h[0],i=h[1]}this.merged=$$({},r,this.merged,i),this.hasChanged=!1;let p=c&&c(this);if(this.animations=Object.entries(this.merged).reduce(((e,t)=>{let n=t[0],o=t[1],i=e[n]||{};const s=M$.num(o),l=M$.str(o)&&!o.startsWith("#")&&!/\d/.test(o)&&!I$[o],c=M$.arr(o),h=!s&&!c&&!l;let f=M$.und(r[n])?o:r[n],m=s||c||l?o:1,g=O$(a,n);p&&(m=p.animations[n].parent);let v,b=i.parent,y=i.interpolation,x=T$(p?m.getPayload():m),w=o;h&&(w=P$({range:[0,1],output:[o,o]})(1));let C=y&&y.getValue();const k=!M$.und(b)&&i.animatedValues.some((e=>!e.done)),S=!M$.equ(w,C),$=!M$.equ(w,i.previous),j=!M$.equ(g,i.config);if(d||$&&S||j){if(s||l)b=y=i.parent||new Z$(f);else if(c)b=y=i.parent||new J$(f);else if(h){let e=i.interpolation&&i.interpolation.calc(i.parent.value);e=void 0===e||d?f:e,i.parent?(b=i.parent,b.setValue(0,!1)):b=new Z$(0);const t={output:[e,o]};i.interpolation?(y=i.interpolation,i.interpolation.updateConfig(t)):y=b.interpolate(t)}return x=T$(p?m.getPayload():m),v=T$(b.getPayload()),d&&!h&&b.setValue(f,!1),this.hasChanged=!0,v.forEach((e=>{e.startPosition=e.value,e.lastPosition=e.value,e.lastVelocity=k?e.lastVelocity:void 0,e.lastTime=k?e.lastTime:void 0,e.startTime=B$(),e.done=!1,e.animatedStyles.clear()})),O$(u,n)&&b.setValue(h?m:o,!1),$$({},e,{[n]:$$({},i,{name:n,parent:b,interpolation:y,animatedValues:v,toValues:x,previous:w,config:g,fromValues:T$(b.getValue()),immediate:O$(u,n),initialVelocity:E$(g.velocity,0),clamp:E$(g.clamp,!1),precision:E$(g.precision,.01),tension:E$(g.tension,170),friction:E$(g.friction,26),mass:E$(g.mass,1),duration:g.duration,easing:E$(g.easing,(e=>e)),decay:g.decay})})}return S?e:(h&&(b.setValue(1,!1),y.updateConfig({output:[w,w]})),b.done=!0,this.hasChanged=!0,$$({},e,{[n]:$$({},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 Q$=e=>{const t=M$.fun(e),r=((e,t)=>{const r=n.useRef(!1),o=n.useRef(),i=M$.fun(t),s=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 Y$,s=i?O$(t,r,o):t[r];return 0===r&&(n=s.ref),o.update(s),n||o.start(),o})),n]}),[e]),a=s[0],l=s[1];o.current=a,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?O$(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 d=o.current.map((e=>e.getValues()));return i?[d,c,e=>o.current.forEach((t=>t.pause(e)))]:d})(1,t?e:[e]),o=r[0],i=r[1],s=r[2];return t?[o[0],i,s]:o};class ej extends N${constructor(e){void 0===e&&(e={}),super(),!e.transform||e.transform instanceof A$||(e=D$.transform(e)),this.payload=e}}const tj={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},nj="[-+]?\\d*\\.?\\d+",rj=nj+"%";function oj(){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 ij=new RegExp("rgb"+oj(nj,nj,nj)),sj=new RegExp("rgba"+oj(nj,nj,nj,nj)),aj=new RegExp("hsl"+oj(nj,rj,rj)),lj=new RegExp("hsla"+oj(nj,rj,rj,nj)),cj=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,dj=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,uj=/^#([0-9a-fA-F]{6})$/,hj=/^#([0-9a-fA-F]{8})$/;function pj(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 fj(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,i=pj(o,r,e+1/3),s=pj(o,r,e),a=pj(o,r,e-1/3);return Math.round(255*i)<<24|Math.round(255*s)<<16|Math.round(255*a)<<8}function mj(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function gj(e){return(parseFloat(e)%360+360)%360/360}function vj(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function bj(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function yj(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=uj.exec(e))?parseInt(t[1]+"ff",16)>>>0:tj.hasOwnProperty(e)?tj[e]:(t=ij.exec(e))?(mj(t[1])<<24|mj(t[2])<<16|mj(t[3])<<8|255)>>>0:(t=sj.exec(e))?(mj(t[1])<<24|mj(t[2])<<16|mj(t[3])<<8|vj(t[4]))>>>0:(t=cj.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=hj.exec(e))?parseInt(t[1],16)>>>0:(t=dj.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=aj.exec(e))?(255|fj(gj(t[1]),bj(t[2]),bj(t[3])))>>>0:(t=lj.exec(e))?(fj(gj(t[1]),bj(t[2]),bj(t[3]))|vj(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 xj=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,wj=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Cj=new RegExp(`(${Object.keys(tj).join("|")})`,"g");let kj={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 Sj=["Webkit","Ms","Moz","O"];function $j(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||kj.hasOwnProperty(e)&&kj[e]?(""+t).trim():t+"px"}kj=Object.keys(kj).reduce(((e,t)=>(Sj.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),kj);const jj={};var Mj,Ej;Mj=e=>new ej(e),V$=Mj,Ej=e=>{const t=e.output.map((e=>e.replace(wj,yj))).map((e=>e.replace(Cj,yj))),n=t[0].match(xj).map((()=>[]));t.forEach((e=>{e.match(xj).forEach(((e,t)=>n[t].push(+e)))}));const r=t[0].match(xj).map(((t,r)=>W$($$({},e,{output:n[r]}))));return e=>{let n=0;return t[0].replace(xj,(()=>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})`))}},P$=Ej,I$=tj,function(e,t){D$={fn:e,transform:t}}(((e,t)=>{if(!e.nodeType||void 0===e.setAttribute)return!1;{const o=t.style,i=t.children,s=t.scrollTop,a=t.scrollLeft,l=j$(t,["style","children","scrollTop","scrollLeft"]),c="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;void 0!==s&&(e.scrollTop=s),void 0!==a&&(e.scrollLeft=a),void 0!==i&&(e.textContent=i);for(let t in o)if(o.hasOwnProperty(t)){var n=0===t.indexOf("--"),r=$j(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:jj[t]||(jj[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())));void 0!==e.getAttribute(n)&&e.setAttribute(n,l[t])}}}),(e=>e));var Tj;const Oj=(Tj=e=>n.forwardRef(((t,r)=>{const o=function(){const e=n.useState(!1)[1];return n.useCallback((()=>e((e=>!e))),[])}(),i=n.useRef(!0),s=n.useRef(null),a=n.useRef(null),l=n.useCallback((e=>{const t=s.current;s.current=new H$(e,(()=>{let e=!1;a.current&&(e=D$.fn(a.current,s.current.getAnimatedValue())),a.current&&!1!==e||o()})),t&&t.detach()}),[]);n.useEffect((()=>()=>{i.current=!1,s.current&&s.current.detach()}),[]),n.useImperativeHandle(r,(()=>(e=>e.current)(a))),l(t);const c=s.current.getValue();c.scrollTop,c.scrollLeft;const d=j$(c,["scrollTop","scrollLeft"]),u=(h=e,!M$.fun(h)||h.prototype instanceof n.Component?e=>a.current=function(e,t){return t&&(M$.fun(t)?t(e):M$.obj(t)&&(t.current=e)),e}(e,r):void 0);var h;return n.createElement(e,$$({},d,{ref:u}))})),e=>(M$.arr(e)?e:Object.keys(e)).reduce(((e,t)=>{const n=t;return e[n]=Tj(n),e}),Tj))(["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 Lj(e,t){return e.map((function(e,n){return e+t[n]}))}function Aj(e,t){return e.map((function(e,n){return e-t[n]}))}function Rj(e){return Math.hypot.apply(Math,e)}function Nj(e){return Math.sign?Math.sign(e):Number(e>0)-Number(e<0)||+e}function Dj(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 Ij(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?-Dj(t-e,n-t,r)+t:e>n?+Dj(e-n,n-t,r)+n:e}function Pj(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 zj(){return zj=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},zj.apply(this,arguments)}function Vj(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Bj(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Hj(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 _j(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 Hj(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)?Hj(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 Fj(){}function qj(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?Fj:1===t.length?t[0]:function(){for(var e,n,r=_j(t);!(n=r()).done;){e=n.value.apply(this,arguments)||e}return e}}function Wj(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 Uj(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 Kj(e,t){void 0===e&&(e={});for(var n={},r=0,o=Object.entries(t);r<o.length;r++){var i=o[r],s=i[0],a=i[1];switch(typeof a){case"function":n[s]=a.call(n,e[s],s,e);break;case"object":n[s]=Kj(e[s],a);break;case"boolean":a&&(n[s]=e[s])}}return n}var Gj=zj({},{threshold:function(e){return void 0===e&&(e=0),Wj(e)},rubberband:function(e){switch(void 0===e&&(e=0),e){case!0:return Wj(.15);case!1:return Wj(0);default:return Wj(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:Wj(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 Gj.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,s=t.top,a=void 0===s?-1/0:s,l=t.bottom;return[[r,i],[a,void 0===l?1/0:l]]}}),Zj="undefined"!=typeof window&&window.document&&window.document.createElement,Jj={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=Zj?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}}},Xj=zj({},Gj,{threshold:function(e,t,n){var r=n.filterTaps,o=void 0!==r&&r,i=n.lockDirection,s=void 0!==i&&i,a=n.axis,l=Wj(e,o?3:s||(void 0===a?void 0:a)?1:0);return this.filterTaps=o||l[0]+l[1]>0,l},swipeVelocity:function(e){return void 0===e&&(e=.5),Wj(e)},swipeDistance:function(e){return void 0===e&&(e=60),Wj(e)},delay:function(e){switch(void 0===e&&(e=0),e){case!0:return 180;case!1:return 0;default:return e}}});function Yj(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"]),s=function(e){return void 0===e&&(e={}),Kj(e,Jj)}({domTarget:t,eventOptions:n,window:r,enabled:o});return s.drag=function(e){return void 0===e&&(e={}),Kj(e,Xj)}(i),s}function Qj(e){return zj({_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:Fj,canceled:!1,memo:void 0,args:void 0},e)}function eM(){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:Qj({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:Qj({da:[0,0],vdva:[0,0],origin:void 0,turns:0}),wheel:Qj({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),move:Qj({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),scroll:Qj({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0})}}var tM=new Map,nM=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),s=2;s<o;s++)i[s-2]=arguments[s];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=zj({},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,s=this.state,a=s._bounds,l=s._initial,c=s._active,d=s._intentional,u=s.lastOffset,h=s.movement,p=this.getInternalMovement(e,this.state),f=!1===d[0]?rM(p[0],i[0]):d[0],m=!1===d[1]?rM(p[1],i[1]):d[1],g=this.checkIntentionality([f,m],p);if(g._blocked)return zj({},g,{_movement:p,delta:[0,0]});var v,b,y,x,w=g._intentional,C=p;(!1!==w[0]&&!1===d[0]&&(b=Uj(n,this.state),v=Uj(r,this.state),l[0]=b[0],a[0]=v[0]),!1!==w[1]&&!1===d[1])&&(b=null!=(y=b)?y:Uj(n,this.state),v=null!=(x=v)?x:Uj(r,this.state),l[1]=b[1],a[1]=v[1]);var k=[!1!==w[0]?p[0]-w[0]:l[0],!1!==w[1]?p[1]-w[1]:l[1]],S=Lj(k,u),$=c?o:[0,0];return k=oM(a,Lj(k,l),$),zj({},g,{intentional:!1!==w[0]||!1!==w[1],_initial:l,_movement:C,movement:k,values:e,offset:oM(a,S,$),delta:Aj(k,h)})},t.clean=function(){this.clearTimeout()},Pj(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 rM(e,t){return Math.abs(e)>=t&&Nj(e)*t}function oM(e,t,n){var r=t[0],o=t[1],i=n[0],s=n[1],a=e[0],l=a[0],c=a[1],d=e[1],u=d[0],h=d[1];return[Ij(r,l,c,i),Ij(o,u,h,s)]}function iM(e,t,n){var r=e.state,o=e.args,i=t.timeStamp,s=t.type,a=r.values;return{_lastEventType:s,event:t,timeStamp:i,elapsedTime:n?0:i-r.startTime,args:o,previous:a}}function sM(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,zj({},t,{event:n})].concat(o))}}var aM=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,s=_j(t.classes);!(i=s()).done;){new(0,i.value)(t,r).addBindings(e)}for(var a=0,l=Object.entries(t.nativeRefs);a<l.length;a++){var c=l[a];dM(e,c[0],sM(c[1],zj({},t.state.shared,{args:r})))}return t.config.domTarget?function(e,t){var n=e.config,r=e.domListeners,o=cM(n);if(!o)throw new Error("domTarget must be defined");var i=n.eventOptions;hM(o,lM(r),i);for(var s=0,a=Object.entries(t);s<a.length;s++){var l=a[s],c=l[0],d=l[1],u=c.slice(2).toLowerCase();r.push([u,qj.apply(void 0,d)])}uM(o,r,i)}(t,e):function(e,t){for(var n=e.config,r={},o=n.eventOptions.capture?"Capture":"",i=0,s=Object.entries(t);i<s.length;i++){var a=s[i],l=a[0],c=a[1],d=Array.isArray(c)?c:[c];r[l+o]=qj.apply(void 0,d)}return r}(t,e)},this.effect=function(){return t.config.domTarget&&t.bind(),t.clean},this.clean=function(){var e=cM(t.config),n=t.config.eventOptions;e&&hM(e,lM(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){hM(n,o[i],r)}e.windowListeners={}}(t)},this.state=eM(),this.timeouts={},this.domListeners=[],this.windowListeners={}};function lM(e){return void 0===e&&(e=[]),e.splice(0,e.length)}function cM(e){var t=e.domTarget;return t&&"current"in t?t.current:t}function dM(e,t,n){e[t]||(e[t]=[]),e[t].push(n)}function uM(e,t,n){void 0===t&&(t=[]),void 0===n&&(n={});for(var r,o=_j(t);!(r=o()).done;){var i=r.value,s=i[0],a=i[1];e.addEventListener(s,a,n)}}function hM(e,t,n){void 0===t&&(t=[]),void 0===n&&(n={});for(var r,o=_j(t);!(r=o()).done;){var i=r.value,s=i[0],a=i[1];e.removeEventListener(s,a,n)}}function pM(e,t,r){void 0===r&&(r={});var o=function(e){var t=new Set;e.drag&&t.add(tM.get("drag"));e.wheel&&t.add(tM.get("wheel"));e.scroll&&t.add(tM.get("scroll"));e.move&&t.add(tM.get("move"));e.pinch&&t.add(tM.get("pinch"));e.hover&&t.add(tM.get("hover"));return t}(e),i=n.useMemo((function(){return new aM(o)}),[]);return i.config=t,i.handlers=e,i.nativeRefs=r,n.useEffect(i.effect,[]),i.config.domTarget?fM:i.bind}function fM(){"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`.")}var mM=function(e){function t(){return e.apply(this,arguments)||this}Vj(t,e);var n=t.prototype;return n.getInternalMovement=function(e,t){return Aj(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=Rj(t),o=0===r?0:1/r,i=0===n?0:1/n,s=i*r,a=t.map((function(e){return i*e})),l=t.map((function(e){return o*e}));return{velocities:a,velocity:s,distance:Rj(e),direction:l}}(n.movement,n.delta,r))}return n},n.mapStateValues=function(e){return{xy:e.values,vxvy:e.velocities}},t}(nM);function gM(e){if("touches"in e){var t=e.targetTouches,n=e.changedTouches;return t.length>0?t:n}return null}function vM(e){var t="buttons"in e?e.buttons:0,n=gM(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 bM(e){var t=gM(e),n=t?t[0]:e;return[n.clientX,n.clientY]}var yM=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&&(hM(r.window,o[t],r.eventOptions),uM(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(Bj(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=vM(e);if(n.down){t.updateSharedState(n);var r=bM(e),o=t.getKinematics(r,e),i=iM(Bj(t),e),s=t.state._isTap,a=Rj(o._movement);s&&a>=3&&(s=!1),t.updateGestureState(zj({},i,o,{_isTap:s})),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],s=t.state.movement,a=s[0],l=s[1],c=t.state._intentional,d=c[0],u=c[1],h=t.config.swipeVelocity,p=h[0],f=h[1],m=t.config.swipeDistance,g=m[0],v=m[1],b=zj({},iM(Bj(t),e),t.getMovement(t.state.values)),y=[0,0];b.elapsedTime<220&&(!1!==d&&Math.abs(o)>p&&Math.abs(a)>g&&(y[0]=Nj(o)),!1!==u&&Math.abs(i)>f&&Math.abs(l)>v&&(y[1]=Nj(i))),t.updateGestureState(zj({},b,{tap:n,swipe:y})),t.fireGestureHandler(!0===n)}},t.clean=function(){e.prototype.clean.call(Bj(t)),t.state._delayedEvent=!1,function(e,t){var n=e.config,r=e.windowListeners;n.window&&(hM(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}Vj(t,e);var n=t.prototype;return n.startDrag=function(e){var t=bM(e);this.updateSharedState(vM(e)),this.updateGestureState(zj({},function(e,t,n){var r=e.state.offset,o=n.timeStamp;return zj({},eM()[e.stateKey],{_active:!0,values:t,initial:t,offset:r,lastOffset:r,startTime:o})}(this,t,e),iM(this,e,!0),{_pointerId:e.pointerId,cancel:this.onCancel})),this.updateGestureState(this.getMovement(t)),this.fireGestureHandler()},n.addBindings=function(e){(dM(e,"onPointerDown",this.onDragStart),this.config.filterTaps)&&dM(e,this.controller.config.eventOptions.capture?"onClick":"onClickCapture",this.onClick)},t}(mM);function xM(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(!xM(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(!xM(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||xM(e[o[r]],t[o[r]])))return!1;return!0}return e!=e&&t!=t}function wM(e,t){try{return xM(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 CM(e,t){void 0===t&&(t={}),tM.set("drag",yM);var r=n.useRef();return r.current||(r.current=function(e,t){var n,r,o=[],i=!1;return function(){for(var s=arguments.length,a=new Array(s),l=0;l<s;l++)a[l]=arguments[l];return i&&n===this&&t(a,o)||(r=e.apply(this,a),i=!0,n=this,o=a),r}}(Yj,wM)),pM({drag:e},r.current(t))}
2579
2590
  /*!
2580
2591
  * tabbable 5.3.3
2581
2592
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
2582
- */var CM=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],kM=CM.join(","),SM="undefined"==typeof Element,$M=SM?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,jM=!SM&&Element.prototype.getRootNode?function(e){return e.getRootNode()}:function(e){return e.ownerDocument},MM=function(e,t,n){var r=Array.prototype.slice.apply(e.querySelectorAll(kM));return t&&$M.call(e,kM)&&r.unshift(e),r=r.filter(n)},EM=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var s=i.shift();if("SLOT"===s.tagName){var a=s.assignedElements(),l=e(a.length?a:s.children,!0,r);r.flatten?o.push.apply(o,l):o.push({scope:s,candidates:l})}else{$M.call(s,kM)&&r.filter(s)&&(n||!t.includes(s))&&o.push(s);var c=s.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(s),d=!r.shadowRootFilter||r.shadowRootFilter(s);if(c&&d){var u=e(!0===c?s.children:c.children,!0,r);r.flatten?o.push.apply(o,u):o.push({scope:s,candidates:u})}else i.unshift.apply(i,s.children)}}return o},TM=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},OM=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},LM=function(e){return"INPUT"===e.tagName},AM=function(e){return function(e){return LM(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||jM(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)},RM=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},NM=function(e,t){return!(t.disabled||function(e){return LM(e)&&"hidden"===e.type}(t)||function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var o=$M.call(e,"details>summary:first-of-type")?e.parentElement:e;if($M.call(o,"details:not([open]) *"))return!0;var i=jM(e).host,s=(null==i?void 0:i.ownerDocument.contains(i))||e.ownerDocument.contains(e);if(n&&"full"!==n){if("non-zero-area"===n)return RM(e)}else{if("function"==typeof r){for(var a=e;e;){var l=e.parentElement,c=jM(e);if(l&&!l.shadowRoot&&!0===r(l))return RM(e);e=e.assignedSlot?e.assignedSlot:l||c===e.ownerDocument?l:c.host}e=a}if(s)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!!$M.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},DM=function(e,t){return!(AM(t)||TM(t)<0||!NM(e,t))},IM=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},PM=function e(t){var n=[],r=[];return t.forEach((function(t,o){var i=!!t.scope,s=i?t.scope:t,a=TM(s,i),l=i?e(t.candidates):s;0===a?i?n.push.apply(n,l):n.push(s):r.push({documentOrder:o,tabIndex:a,item:t,isScope:i,content:l})})),r.sort(OM).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)},zM=function(e,t){var n;return n=(t=t||{}).getShadowRoot?EM([e],t.includeContainer,{filter:DM.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:IM}):MM(e,t.includeContainer,DM.bind(null,t)),PM(n)},VM=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==$M.call(e,kM)&&DM(t,e)},BM=CM.concat("iframe").join(","),HM=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==$M.call(e,BM)&&NM(t,e)};
2593
+ */var kM=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],SM=kM.join(","),$M="undefined"==typeof Element,jM=$M?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,MM=!$M&&Element.prototype.getRootNode?function(e){return e.getRootNode()}:function(e){return e.ownerDocument},EM=function(e,t,n){var r=Array.prototype.slice.apply(e.querySelectorAll(SM));return t&&jM.call(e,SM)&&r.unshift(e),r=r.filter(n)},TM=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var s=i.shift();if("SLOT"===s.tagName){var a=s.assignedElements(),l=e(a.length?a:s.children,!0,r);r.flatten?o.push.apply(o,l):o.push({scope:s,candidates:l})}else{jM.call(s,SM)&&r.filter(s)&&(n||!t.includes(s))&&o.push(s);var c=s.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(s),d=!r.shadowRootFilter||r.shadowRootFilter(s);if(c&&d){var u=e(!0===c?s.children:c.children,!0,r);r.flatten?o.push.apply(o,u):o.push({scope:s,candidates:u})}else i.unshift.apply(i,s.children)}}return o},OM=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},LM=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},AM=function(e){return"INPUT"===e.tagName},RM=function(e){return function(e){return AM(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||MM(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)},NM=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},DM=function(e,t){return!(t.disabled||function(e){return AM(e)&&"hidden"===e.type}(t)||function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var o=jM.call(e,"details>summary:first-of-type")?e.parentElement:e;if(jM.call(o,"details:not([open]) *"))return!0;var i=MM(e).host,s=(null==i?void 0:i.ownerDocument.contains(i))||e.ownerDocument.contains(e);if(n&&"full"!==n){if("non-zero-area"===n)return NM(e)}else{if("function"==typeof r){for(var a=e;e;){var l=e.parentElement,c=MM(e);if(l&&!l.shadowRoot&&!0===r(l))return NM(e);e=e.assignedSlot?e.assignedSlot:l||c===e.ownerDocument?l:c.host}e=a}if(s)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!!jM.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},IM=function(e,t){return!(RM(t)||OM(t)<0||!DM(e,t))},PM=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},zM=function e(t){var n=[],r=[];return t.forEach((function(t,o){var i=!!t.scope,s=i?t.scope:t,a=OM(s,i),l=i?e(t.candidates):s;0===a?i?n.push.apply(n,l):n.push(s):r.push({documentOrder:o,tabIndex:a,item:t,isScope:i,content:l})})),r.sort(LM).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)},VM=function(e,t){var n;return n=(t=t||{}).getShadowRoot?TM([e],t.includeContainer,{filter:IM.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:PM}):EM(e,t.includeContainer,IM.bind(null,t)),zM(n)},BM=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==jM.call(e,SM)&&IM(t,e)},HM=kM.concat("iframe").join(","),_M=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==jM.call(e,HM)&&DM(t,e)};
2583
2594
  /*!
2584
2595
  * focus-trap 6.9.4
2585
2596
  * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
2586
2597
  */
2587
- function _M(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 FM(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_M(Object(n),!0).forEach((function(t){qM(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_M(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function qM(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var WM,UM=(WM=[],{activateTrap:function(e){if(WM.length>0){var t=WM[WM.length-1];t!==e&&t.pause()}var n=WM.indexOf(e);-1===n||WM.splice(n,1),WM.push(e)},deactivateTrap:function(e){var t=WM.indexOf(e);-1!==t&&WM.splice(t,1),WM.length>0&&WM[WM.length-1].unpause()}}),KM=function(e){return setTimeout(e,0)},GM=function(e,t){var n=-1;return e.every((function(e,r){return!t(e)||(n=r,!1)})),n},ZM=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},JM=function(e){return e.target.shadowRoot&&"function"==typeof e.composedPath?e.composedPath()[0]:e.target},XM=function(e,t){var n,r=(null==t?void 0:t.document)||document,o=FM({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},t),i={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},s=function(e,t,n){return e&&void 0!==e[t]?e[t]:o[n||t]},a=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),s=1;s<n;s++)i[s-1]=arguments[s];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 a=t;if("string"==typeof t&&!(a=r.querySelector(t)))throw new Error("`".concat(e,"` as selector refers to no known node"));return a},c=function(){var e=l("initialFocus");if(!1===e)return!1;if(void 0===e)if(a(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},d=function(){if(i.containerGroups=i.containers.map((function(e){var t,n,r=zM(e,o.tabbableOptions),i=(t=e,(n=(n=o.tabbableOptions)||{}).getShadowRoot?EM([t],n.includeContainer,{filter:NM.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):MM(t,n.includeContainer,NM.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 VM(e,o.tabbableOptions)})):i.slice(0,n).reverse().find((function(e){return VM(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")},u=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()))},h=function(e){var t=l("setReturnFocus",e);return t||!1!==t&&e},p=function(e){var t=JM(e);a(t)>=0||(ZM(o.clickOutsideDeactivates,e)?n.deactivate({returnFocus:o.returnFocusOnDeactivate&&!HM(t,o.tabbableOptions)}):ZM(o.allowOutsideClick,e)||e.preventDefault())},f=function(e){var t=JM(e),n=a(t)>=0;n||t instanceof Document?n&&(i.mostRecentlyFocusedNode=t):(e.stopImmediatePropagation(),u(i.mostRecentlyFocusedNode||c()))},m=function(e){if(function(e){return"Escape"===e.key||"Esc"===e.key||27===e.keyCode}(e)&&!1!==ZM(o.escapeDeactivates,e))return e.preventDefault(),void n.deactivate();(function(e){return"Tab"===e.key||9===e.keyCode})(e)&&function(e){var t=JM(e);d();var n=null;if(i.tabbableGroups.length>0){var r=a(t),s=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=GM(i.tabbableGroups,(function(e){var n=e.firstTabbableNode;return t===n}));if(c<0&&(s.container===t||HM(t,o.tabbableOptions)&&!VM(t,o.tabbableOptions)&&!s.nextTabbableNode(t,!1))&&(c=r),c>=0){var h=0===c?i.tabbableGroups.length-1:c-1;n=i.tabbableGroups[h].lastTabbableNode}}else{var p=GM(i.tabbableGroups,(function(e){var n=e.lastTabbableNode;return t===n}));if(p<0&&(s.container===t||HM(t,o.tabbableOptions)&&!VM(t,o.tabbableOptions)&&!s.nextTabbableNode(t))&&(p=r),p>=0){var f=p===i.tabbableGroups.length-1?0:p+1;n=i.tabbableGroups[f].firstTabbableNode}}}else n=l("fallbackFocus");n&&(e.preventDefault(),u(n))}(e)},g=function(e){var t=JM(e);a(t)>=0||ZM(o.clickOutsideDeactivates,e)||ZM(o.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},v=function(){if(i.active)return UM.activateTrap(n),i.delayInitialFocusTimer=o.delayInitialFocus?KM((function(){u(c())})):u(c()),r.addEventListener("focusin",f,!0),r.addEventListener("mousedown",p,{capture:!0,passive:!1}),r.addEventListener("touchstart",p,{capture:!0,passive:!1}),r.addEventListener("click",g,{capture:!0,passive:!1}),r.addEventListener("keydown",m,{capture:!0,passive:!1}),n},b=function(){if(i.active)return r.removeEventListener("focusin",f,!0),r.removeEventListener("mousedown",p,!0),r.removeEventListener("touchstart",p,!0),r.removeEventListener("click",g,!0),r.removeEventListener("keydown",m,!0),n};return(n={get active(){return i.active},get paused(){return i.paused},activate:function(e){if(i.active)return this;var t=s(e,"onActivate"),n=s(e,"onPostActivate"),o=s(e,"checkCanFocusTrap");o||d(),i.active=!0,i.paused=!1,i.nodeFocusedBeforeActivation=r.activeElement,t&&t();var a=function(){o&&d(),v(),n&&n()};return o?(o(i.containers.concat()).then(a,a),this):(a(),this)},deactivate:function(e){if(!i.active)return this;var t=FM({onDeactivate:o.onDeactivate,onPostDeactivate:o.onPostDeactivate,checkCanReturnFocus:o.checkCanReturnFocus},e);clearTimeout(i.delayInitialFocusTimer),i.delayInitialFocusTimer=void 0,b(),i.active=!1,i.paused=!1,UM.deactivateTrap(n);var r=s(t,"onDeactivate"),a=s(t,"onPostDeactivate"),l=s(t,"checkCanReturnFocus"),c=s(t,"returnFocus","returnFocusOnDeactivate");r&&r();var d=function(){KM((function(){c&&u(h(i.nodeFocusedBeforeActivation)),a&&a()}))};return c&&l?(l(h(i.nodeFocusedBeforeActivation)).then(d,d),this):(d(),this)},pause:function(){return i.paused||!i.active||(i.paused=!0,b()),this},unpause:function(){return i.paused&&i.active?(i.paused=!1,d(),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&&d(),this}}).updateContainerElements(e),n};var YM=!1;if("undefined"!=typeof window){var QM={get passive(){YM=!0}};window.addEventListener("testPassive",null,QM),window.removeEventListener("testPassive",null,QM)}var eE,tE="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1),nE=[],rE=!1,oE=-1,iE=void 0,sE=void 0,aE=function(e){return nE.some((function(t){return!(!t.options.allowTouchMove||!t.options.allowTouchMove(e))}))},lE=function(e){var t=e||window.event;return!!aE(t.target)||(t.touches.length>1||(t.preventDefault&&t.preventDefault(),!1))},cE=function(e,t){if(e){if(!nE.some((function(t){return t.targetElement===e}))){var n={targetElement:e,options:t||{}};nE=[].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)}(nE),[n]),tE?(e.ontouchstart=function(e){1===e.targetTouches.length&&(oE=e.targetTouches[0].clientY)},e.ontouchmove=function(t){1===t.targetTouches.length&&function(e,t){var n=e.targetTouches[0].clientY-oE;!aE(e.target)&&(t&&0===t.scrollTop&&n>0||function(e){return!!e&&e.scrollHeight-e.scrollTop<=e.clientHeight}(t)&&n<0?lE(e):e.stopPropagation())}(t,e)},rE||(document.addEventListener("touchmove",lE,YM?{passive:!1}:void 0),rE=!0)):function(e){if(void 0===sE){var t=!!e&&!0===e.reserveScrollBarGap,n=window.innerWidth-document.documentElement.clientWidth;t&&n>0&&(sE=document.body.style.paddingRight,document.body.style.paddingRight=n+"px")}void 0===iE&&(iE=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.")},dE=function(e){e?(nE=nE.filter((function(t){return t.targetElement!==e})),tE?(e.ontouchstart=null,e.ontouchmove=null,rE&&0===nE.length&&(document.removeEventListener("touchmove",lE,YM?{passive:!1}:void 0),rE=!1)):nE.length||(void 0!==sE&&(document.body.style.paddingRight=sE,sE=void 0),void 0!==iE&&(document.body.style.overflow=iE,iE=void 0))):console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.")},uE=[],hE="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"}(eE||(eE={}));var pE,fE=function(e){return Object.freeze(e)},mE=function(e,t){this.inlineSize=e,this.blockSize=t,fE(this)},gE=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,fE(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}(),vE=function(e){return e instanceof SVGElement&&"getBBox"in e},bE=function(e){if(vE(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var o=e,i=o.offsetWidth,s=o.offsetHeight;return!(i||s||e.getClientRects().length)},yE=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)},xE="undefined"!=typeof window?window:{},wE=new WeakMap,CE=/auto|scroll/,kE=/^tb|vertical/,SE=/msie|trident/i.test(xE.navigator&&xE.navigator.userAgent),$E=function(e){return parseFloat(e||"0")},jE=function(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=!1),new mE((n?t:e)||0,(n?e:t)||0)},ME=fE({devicePixelContentBoxSize:jE(),borderBoxSize:jE(),contentBoxSize:jE(),contentRect:new gE(0,0,0,0)}),EE=function(e,t){if(void 0===t&&(t=!1),wE.has(e)&&!t)return wE.get(e);if(bE(e))return wE.set(e,ME),ME;var n=getComputedStyle(e),r=vE(e)&&e.ownerSVGElement&&e.getBBox(),o=!SE&&"border-box"===n.boxSizing,i=kE.test(n.writingMode||""),s=!r&&CE.test(n.overflowY||""),a=!r&&CE.test(n.overflowX||""),l=r?0:$E(n.paddingTop),c=r?0:$E(n.paddingRight),d=r?0:$E(n.paddingBottom),u=r?0:$E(n.paddingLeft),h=r?0:$E(n.borderTopWidth),p=r?0:$E(n.borderRightWidth),f=r?0:$E(n.borderBottomWidth),m=u+c,g=l+d,v=(r?0:$E(n.borderLeftWidth))+p,b=h+f,y=a?e.offsetHeight-b-e.clientHeight:0,x=s?e.offsetWidth-v-e.clientWidth:0,w=o?m+v:0,C=o?g+b:0,k=r?r.width:$E(n.width)-w-x,S=r?r.height:$E(n.height)-C-y,$=k+m+x+v,j=S+g+y+b,M=fE({devicePixelContentBoxSize:jE(Math.round(k*devicePixelRatio),Math.round(S*devicePixelRatio),i),borderBoxSize:jE($,j,i),contentBoxSize:jE(k,S,i),contentRect:new gE(u,l,k,S)});return wE.set(e,M),M},TE=function(e,t,n){var r=EE(e,n),o=r.borderBoxSize,i=r.contentBoxSize,s=r.devicePixelContentBoxSize;switch(t){case eE.DEVICE_PIXEL_CONTENT_BOX:return s;case eE.BORDER_BOX:return o;default:return i}},OE=function(e){var t=EE(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=fE([t.borderBoxSize]),this.contentBoxSize=fE([t.contentBoxSize]),this.devicePixelContentBoxSize=fE([t.devicePixelContentBoxSize])},LE=function(e){if(bE(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},AE=function(){var e=1/0,t=[];uE.forEach((function(n){if(0!==n.activeTargets.length){var r=[];n.activeTargets.forEach((function(t){var n=new OE(t.target),o=LE(t.target);r.push(n),t.lastReportedSize=TE(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},RE=function(e){uE.forEach((function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach((function(n){n.isActive()&&(LE(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))}))}))},NE=function(){var e=0;for(RE(e);uE.some((function(e){return e.activeTargets.length>0}));)e=AE(),RE(e);return uE.some((function(e){return e.skippedTargets.length>0}))&&function(){var e;"function"==typeof ErrorEvent?e=new ErrorEvent("error",{message:hE}):((e=document.createEvent("Event")).initEvent("error",!1,!1),e.message=hE),window.dispatchEvent(e)}(),e>0},DE=[],IE=function(e){if(!pE){var t=0,n=document.createTextNode("");new MutationObserver((function(){return DE.splice(0).forEach((function(e){return e()}))})).observe(n,{characterData:!0}),pE=function(){n.textContent="".concat(t?t--:t++)}}DE.push(e),pE()},PE=0,zE={attributes:!0,characterData:!0,childList:!0,subtree:!0},VE=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],BE=function(e){return void 0===e&&(e=0),Date.now()+e},HE=!1,_E=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),!HE){HE=!0;var n,r=BE(e);n=function(){var n=!1;try{n=NE()}finally{if(HE=!1,e=r-BE(),!PE)return;n?t.run(1e3):e>0?t.run(e):t.start()}},IE((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,zE)};document.body?t():xE.addEventListener("DOMContentLoaded",t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),VE.forEach((function(t){return xE.addEventListener(t,e.listener,!0)})))},e.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),VE.forEach((function(t){return xE.removeEventListener(t,e.listener,!0)})),this.stopped=!0)},e}()),FE=function(e){!PE&&e>0&&_E.start(),!(PE+=e)&&_E.stop()},qE=function(){function e(e,t){this.target=e,this.observedBox=t||eE.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e=TE(this.target,this.observedBox,!0);return function(e){return!vE(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}(),WE=function(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t},UE=new WeakMap,KE=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},GE=function(){function e(){}return e.connect=function(e,t){var n=new WE(e,t);UE.set(e,n)},e.observe=function(e,t,n){var r=UE.get(e),o=0===r.observationTargets.length;KE(r.observationTargets,t)<0&&(o&&uE.push(r),r.observationTargets.push(new qE(t,n&&n.box)),FE(1),_E.schedule())},e.unobserve=function(e,t){var n=UE.get(e),r=KE(n.observationTargets,t),o=1===n.observationTargets.length;r>=0&&(o&&uE.splice(uE.indexOf(n),1),n.observationTargets.splice(r,1),FE(-1))},e.disconnect=function(e){var t=this,n=UE.get(e);n.observationTargets.slice().forEach((function(n){return t.unobserve(e,n.target)})),n.activeTargets.splice(0,n.activeTargets.length)},e}(),ZE=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.");GE.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(!yE(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");GE.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(!yE(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");GE.unobserve(this,e)},e.prototype.disconnect=function(){GE.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();function JE(){return JE=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},JE.apply(this,arguments)}function XE(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 YE="undefined"!=typeof window?n.useLayoutEffect:n.useEffect;function QE(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 eT(e){var t=Math.round(e);if(Number.isNaN(e))throw new TypeError("Found a NaN! Check your snapPoints / defaultSnap / snapTo ");return t}var tT={box:"border-box"};function nT(e,t){var r=t.label,o=t.enabled,i=t.resizeSourceRef,s=n.useState(0),a=s[0],l=s[1];n.useDebugValue(r+": "+a);var c=n.useCallback((function(e){l(e[0].borderBoxSize[0].blockSize),i.current="element"}),[i]);return YE((function(){if(e.current&&o){var t=new ZE(c);return t.observe(e.current,tT),function(){t.disconnect()}}}),[e,c,o]),o?a:0}function rT(e){return void 0===e&&(e=1e3),new Promise((function(t){return setTimeout(t,e)}))}var oT={DRAG:{target:"#overlay.dragging",actions:"onOpenEnd"}},iT={RESIZE:{target:"#overlay.resizing",actions:"onOpenEnd"}},sT=function(e,t,n){return void 0===n&&(n=e.context),new l$(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:JE({},oT,iT)}}},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:JE({},oT,iT)}}},end:{invoke:{src:"onOpenEnd",onDone:"done"},on:{CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:JE({},{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:[d$({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(rT()).then((function(){}))}catch(e){return Promise.reject(e)}},onOpenStart:function(){try{return Promise.resolve(rT()).then((function(){}))}catch(e){return Promise.reject(e)}},onCloseStart:function(){try{return Promise.resolve(rT()).then((function(){}))}catch(e){return Promise.reject(e)}},onResizeStart:function(){try{return Promise.resolve(rT()).then((function(){}))}catch(e){return Promise.reject(e)}},onSnapEnd:function(){try{return Promise.resolve(rT()).then((function(){}))}catch(e){return Promise.reject(e)}},onOpenEnd:function(){try{return Promise.resolve(rT()).then((function(){}))}catch(e){return Promise.reject(e)}},onCloseEnd:function(){try{return Promise.resolve(rT()).then((function(){}))}catch(e){return Promise.reject(e)}},onResizeEnd:function(){try{return Promise.resolve(rT()).then((function(){}))}catch(e){return Promise.reject(e)}},renderVisuallyHidden:function(e,t){try{return Promise.resolve(rT()).then((function(){}))}catch(e){return Promise.reject(e)}},activate:function(e,t){try{return Promise.resolve(rT()).then((function(){}))}catch(e){return Promise.reject(e)}},deactivate:function(e,t){try{return Promise.resolve(rT()).then((function(){}))}catch(e){return Promise.reject(e)}},openSmoothly:function(e,t){try{return Promise.resolve(rT()).then((function(){}))}catch(e){return Promise.reject(e)}},openImmediately:function(e,t){try{return Promise.resolve(rT()).then((function(){}))}catch(e){return Promise.reject(e)}},snapSmoothly:function(e,t){try{return Promise.resolve(rT()).then((function(){}))}catch(e){return Promise.reject(e)}},resizeSmoothly:function(e,t){try{return Promise.resolve(rT()).then((function(){}))}catch(e){return Promise.reject(e)}},closeSmoothly:function(e,t){try{return Promise.resolve(rT()).then((function(){}))}catch(e){return Promise.reject(e)}}},guards:{initiallyClosed:function(e){return"CLOSED"===e.initialState},initiallyOpen:function(e){return"OPEN"===e.initialState}}}),aT=["children","sibling","className","footer","header","open","initialState","lastSnapRef","initialFocusRef","onDismiss","maxHeight","defaultSnap","snapPoints","blocking","scrollLocking","style","onSpringStart","onSpringCancel","onSpringEnd","reserveScrollBarGap","expandOnContentDrag"],lT=["velocity"],cT=["onRest","config"],dT={tension:170,friction:26},uT=dT.tension,hT=dT.friction,pT=n.forwardRef((function(e,t){var r=e.children,o=e.sibling,i=e.className,s=e.footer,a=e.header,l=e.open,c=e.initialState,d=e.lastSnapRef,u=e.initialFocusRef,h=e.onDismiss,p=e.maxHeight,f=e.defaultSnap,m=void 0===f?mT:f,g=e.snapPoints,v=void 0===g?gT:g,b=e.blocking,y=void 0===b||b,x=e.scrollLocking,w=void 0===x||x,C=e.style,k=e.onSpringStart,S=e.onSpringCancel,$=e.onSpringEnd,j=e.reserveScrollBarGap,M=void 0===j?y:j,E=e.expandOnContentDrag,T=void 0!==E&&E,O=XE(e,aT),L=function(){var e=n.useState(!1),t=e[0],r=e[1],o=n.useState({}),i=o[0],s=o[1],a=n.useCallback((function(e){return s((function(t){var n;return JE({},t,((n={})[e]=!1,n))})),function(){s((function(t){var n;return JE({},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:a}}(),A=L.ready,R=L.registerReady,N=n.useRef(!1),D=n.useRef(k),I=n.useRef(S),P=n.useRef($);n.useEffect((function(){D.current=k,I.current=S,P.current=$}),[S,k,$]);var z,V,B=Y$((function(){return{y:0,ready:0,maxHeight:0,minSnap:0,maxSnap:0}})),H=B[0],_=B[1],F=n.useRef(null),q=n.useRef(null),W=n.useRef(null),U=n.useRef(null),K=n.useRef(null),G=n.useRef(null),Z=n.useRef(0),J=n.useRef(),X=n.useRef(!1),Y=(z=n.useMemo((function(){return"undefined"!=typeof window?window.matchMedia("(prefers-reduced-motion: reduce)"):null}),[]),V=n.useRef(null==z?void 0:z.matches),n.useDebugValue(V.current?"reduce":"no-preference"),n.useEffect((function(){var e=function(e){V.current=e.matches};return null==z||z.addListener(e),function(){return null==z?void 0:z.removeListener(e)}}),[z]),V),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,cE(e,{allowTouchMove:function(e){return e.closest("[data-body-scroll-lock-ignore]")},reserveScrollBarGap:o}))},deactivate:function(){n&&(n=!1,dE(e))}}}),[r,t,o]),i}({targetRef:q,enabled:A&&w,reserveScrollBarGap:M}),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=[],s=[];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),s.push(e),e.setAttribute("aria-hidden","true"))}}))}},deactivate:function(){n&&(n=!1,s.forEach((function(e,t){var n=i[t];null===n?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",n)})),i=[],s=[])}}}),[t,r]),o}({targetRef:F,enabled:A&&y}),te=function(e){var t=e.targetRef,r=e.fallbackRef,o=e.initialFocusRef,i=e.enabled,s=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 s.current.deactivate(),void(s.current={activate:function(){},deactivate:function(){}});var e=r.current,n=XM(t.current,{onActivate:void 0,initialFocus:o?function(){return(null==o?void 0:o.current)||e}:void 0,fallbackFocus:e,escapeDeactivates:!1,clickOutsideDeactivates:!1}),a=!1;s.current={activate:function(){try{return a?Promise.resolve():(a=!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(){a&&(a=!1,n.deactivate())}}}),[i,r,o,t]),s}({targetRef:F,fallbackRef:G,initialFocusRef:u||void 0,enabled:A&&y&&!1!==u}),ne=function(e){var t=e.getSnapPoints,r=e.heightRef,o=e.lastSnapRef,i=e.ready,s=function(e){var t=e.contentRef,r=e.controlledMaxHeight,o=e.footerEnabled,i=e.footerRef,s=e.headerEnabled,a=e.headerRef,l=e.registerReady,c=e.resizeSourceRef,d=n.useMemo((function(){return l("contentHeight")}),[l]),u=function(e,t,r){var o=n.useMemo((function(){return t("maxHeight")}),[t]),i=n.useState((function(){return eT(e)||"undefined"!=typeof window?window.innerHeight:0})),s=i[0],a=i[1],l=s>0,c=n.useRef(0);return n.useDebugValue(e?"controlled":"auto"),n.useEffect((function(){l&&o()}),[l,o]),YE((function(){if(e)return a(eT(e)),void(r.current="maxheightprop");var t=function(){c.current||(c.current=requestAnimationFrame((function(){a(window.innerHeight),r.current="window",c.current=0})))};return window.addEventListener("resize",t),a(window.innerHeight),r.current="window",o(),function(){window.removeEventListener("resize",t),cancelAnimationFrame(c.current)}}),[e,o,r]),s}(r,l,c),h=nT(a,{label:"headerHeight",enabled:s,resizeSourceRef:c}),p=nT(t,{label:"contentHeight",enabled:!0,resizeSourceRef:c}),f=nT(i,{label:"footerHeight",enabled:o,resizeSourceRef:c}),m=Math.min(u-h-f,p)+h+f;n.useDebugValue("minHeight: "+m);var g=p>0;return n.useEffect((function(){g&&d()}),[g,d]),{maxHeight:u,minHeight:m,headerHeight:h,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}),a=s.maxHeight,l=s.minHeight,c=s.headerHeight,d=s.footerHeight,u=function(e,t){var n=[].concat(e).map(eT).reduce((function(e,n){return e.add(QE(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:d,headerHeight:c,minHeight:l,maxHeight:a}):[0],a),h=u.snapPoints,p=u.minSnap,f=u.maxSnap;return n.useDebugValue("minSnap: "+p+", maxSnap:"+f),{minSnap:p,maxSnap:f,findSnap:function(e){var t=eT("function"==typeof e?e({footerHeight:d,headerHeight:c,height:r.current,minHeight:l,maxHeight:a,snapPoints:h,lastSnap:o.current}):e);return h.reduce((function(e,n){return Math.abs(n-t)<Math.abs(e-t)?n:e}),p)},maxHeight:a}}({contentRef:W,controlledMaxHeight:p,footerEnabled:!!s,footerRef:K,getSnapPoints:v,headerEnabled:!1!==a,headerRef:U,heightRef:Z,lastSnapRef:d,ready:A,registerReady:R,resizeSourceRef:J}),re=ne.minSnap,oe=ne.maxSnap,ie=ne.maxHeight,se=ne.findSnap,ae=n.useRef(ie),le=n.useRef(re),ce=n.useRef(oe),de=n.useRef(se),ue=n.useRef(0);YE((function(){ae.current=ie,ce.current=oe,le.current=re,de.current=se,ue.current=se(m)}),[se,m,ie,oe,re]);var he=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=XE(n,lT),s=XE(e,cT);return new Promise((function(e){return _(JE({},s,{config:JE({velocity:o},i,{mass:1,tension:uT,friction:Math.max(hT,hT+(hT-hT*o))}),onRest:function(){var n=[].slice.call(arguments);e.apply(void 0,n),null==t||t.apply(void 0,n)}}))}))}),[_]),pe=k$(sT,{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:J.current})}),[]),onOpenEnd:n.useCallback((function(){return null==P.current?void 0:P.current({type:"OPEN"})}),[]),onSnapEnd:n.useCallback((function(e,t){return null==P.current?void 0:P.current({type:"SNAP",source:e.snapSource})}),[]),onResizeEnd:n.useCallback((function(){return null==P.current?void 0:P.current({type:"RESIZE",source:J.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:J.current}))}catch(e){return Promise.reject(e)}}),[]),onSnapEnd:n.useCallback((function(e,t){try{return Promise.resolve(null==P.current?void 0:P.current({type:"SNAP",source:e.snapSource}))}catch(e){return Promise.reject(e)}}),[]),onOpenEnd:n.useCallback((function(){try{return Promise.resolve(null==P.current?void 0:P.current({type:"OPEN"}))}catch(e){return Promise.reject(e)}}),[]),onCloseEnd:n.useCallback((function(){try{return Promise.resolve(null==P.current?void 0:P.current({type:"CLOSE"}))}catch(e){return Promise.reject(e)}}),[]),onResizeEnd:n.useCallback((function(){try{return Promise.resolve(null==P.current?void 0:P.current({type:"RESIZE",source:J.current}))}catch(e){return Promise.reject(e)}}),[]),renderVisuallyHidden:n.useCallback((function(e,t){try{return Promise.resolve(he({y:ue.current,ready:0,maxHeight:ae.current,maxSnap:ce.current,minSnap:ue.current,immediate:!0})).then((function(){}))}catch(e){return Promise.reject(e)}}),[he]),activate:n.useCallback((function(e,t){try{return N.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(),N.current=!1,Promise.resolve()}catch(e){return Promise.reject(e)}}),[ee,te,Q]),openImmediately:n.useCallback((function(){try{return Z.current=ue.current,Promise.resolve(he({y:ue.current,ready:1,maxHeight:ae.current,maxSnap:ce.current,minSnap:ue.current,immediate:!0})).then((function(){}))}catch(e){return Promise.reject(e)}}),[he]),openSmoothly:n.useCallback((function(){try{return Promise.resolve(he({y:0,ready:1,maxHeight:ae.current,maxSnap:ce.current,minSnap:ue.current,immediate:!0})).then((function(){return Z.current=ue.current,Promise.resolve(he({y:ue.current,ready:1,maxHeight:ae.current,maxSnap:ce.current,minSnap:ue.current,immediate:Y.current})).then((function(){}))}))}catch(e){return Promise.reject(e)}}),[he,Y]),snapSmoothly:n.useCallback((function(e,t){try{var n=de.current(e.y);return Z.current=n,d.current=n,Promise.resolve(he({y:n,ready:1,maxHeight:ae.current,maxSnap:ce.current,minSnap:le.current,immediate:Y.current,config:{velocity:e.velocity}})).then((function(){}))}catch(e){return Promise.reject(e)}}),[he,d,Y]),resizeSmoothly:n.useCallback((function(){try{var e=de.current(Z.current);return Z.current=e,d.current=e,Promise.resolve(he({y:e,ready:1,maxHeight:ae.current,maxSnap:ce.current,minSnap:le.current,immediate:"element"!==J.current||Y.current})).then((function(){}))}catch(e){return Promise.reject(e)}}),[he,d,Y]),closeSmoothly:n.useCallback((function(e,t){try{return he({minSnap:Z.current,immediate:!0}),Z.current=0,Promise.resolve(he({y:0,maxHeight:ae.current,maxSnap:ce.current,immediate:Y.current})).then((function(){return Promise.resolve(he({ready:0,immediate:!0})).then((function(){}))}))}catch(e){return Promise.reject(e)}}),[he,Y])}}),fe=pe[0],me=pe[1];n.useEffect((function(){A&&me(l?"OPEN":"CLOSE")}),[l,me,A]),YE((function(){(ie||oe||re)&&me("RESIZE")}),[ie,oe,re,me]),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,s=void 0===i?"custom":i;me("SNAP",{payload:{y:de.current(e),velocity:o,source:s}})},get height(){return Z.current}}}),[me]),n.useEffect((function(){var e=q.current,t=function(e){X.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 T&&(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)}}),[T,q]);var ge=wM((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,s=void 0!==i&&i,a=e.cancel,l=e.direction[1],c=e.down,d=e.first,u=e.last,p=e.memo,f=void 0===p?H.y.getValue():p,m=e.tap,g=e.velocity,v=-1*e.movement[1];if(!N.current)return a(),f;if(h&&o&&m)return a(),setTimeout((function(){return h()}),0),f;if(m)return f;var b=f+v,y=v*g,x=Math.max(le.current,Math.min(ce.current,b+2*y));if(!c&&h&&l>0&&b+y<le.current/2)return a(),h(),f;var w=c?h||le.current!==ce.current?Dj(b,h?0:le.current,ce.current,.55):b<le.current?Dj(b,le.current,2*ce.current,.55):Dj(b,le.current/2,ce.current,.55):x;return T&&s?(w>=ce.current&&(w=ce.current),f===ce.current&&q.current.scrollTop>0&&(w=ce.current),X.current=w<ce.current):X.current=!1,d&&me("DRAG"),u?(me("SNAP",{payload:{y:w,velocity:g>.05?g:1,source:"dragging"}}),f):(_({y:w,ready:1,maxHeight:ae.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=U$([n.y,n.maxHeight],(function(e,t){return Math.round(QE(t-e,0,16))+"px"})),o=U$([n.y,n.minSnap,n.maxSnap],(function(e,t,n){return QE(e,t,n)+"px"})),i=U$([n.y,n.minSnap,n.maxSnap],(function(e,t,n){return e<t?t-e+"px":e>n?n-e+"px":"0px"})),s=U$([n.y,n.maxSnap],(function(e,t){return e>=t?Math.ceil(e-t):0})),a=U$([n.y,n.minSnap],(function(e,t){if(!t)return 0;var n=Math.max(t/2-45,0);return QE((e-n)*(1/(Math.min(t/2+45,t)-n)+0),0,1)})),l=U$([n.y,n.minSnap],(function(e,t){return t?QE(e/t,0,1):0}));return(t={})["--rsbs-content-opacity"]=a,t["--rsbs-backdrop-opacity"]=l,t["--rsbs-antigap-scale-y"]=s,t["--rsbs-overlay-translate-y"]=i,t["--rsbs-overlay-rounded"]=r,t["--rsbs-overlay-h"]=o,t}({spring:H});return n.createElement(Tj.div,JE({},O,{"data-rsbs-root":!0,"data-rsbs-state":fT.find(fe.matches),"data-rsbs-is-blocking":y,"data-rsbs-is-dismissable":!!h,"data-rsbs-has-header":!!a,"data-rsbs-has-footer":!!s,className:i,ref:F,style:JE({},ve,C,{opacity:H.ready})}),o,y&&n.createElement("div",JE({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:G,onKeyDown:function(e){"Escape"===e.key&&(e.stopPropagation(),h&&h())}},!1!==a&&n.createElement("div",JE({key:"header","data-rsbs-header":!0,ref:U},ge()),a),n.createElement("div",JE({key:"scroll","data-rsbs-scroll":!0,ref:q},T?ge({isContentDragging:!0}):{}),n.createElement("div",{"data-rsbs-content":!0,ref:W},r)),s&&n.createElement("div",JE({key:"footer",ref:K,"data-rsbs-footer":!0},ge()),s)))})),fT=["closed","opening","open","closing","dragging","snapping","resizing"];function mT(e){var t=e.lastSnap;return null!=t?t:Math.min.apply(Math,e.snapPoints)}function gT(e){return e.minHeight}var vT=["onSpringStart","onSpringEnd","skipInitialTransition"],bT=n.forwardRef((function(e,t){var r=e.onSpringStart,o=e.onSpringEnd,i=e.skipInitialTransition,s=XE(e,vT),a=n.useState(!1),l=a[0],c=a[1],d=n.useRef(),u=n.useRef(null),h=n.useRef(i&&s.open?"OPEN":"CLOSED");YE((function(){if(s.open)return cancelAnimationFrame(d.current),c(!0),function(){h.current="CLOSED"}}),[s.open]);var p=n.useCallback((function(e){return Promise.resolve(null==r?void 0:r(e)).then((function(){"OPEN"===e.type&&cancelAnimationFrame(d.current)}))}),[r]),f=n.useCallback((function(e){return Promise.resolve(null==o?void 0:o(e)).then((function(){"CLOSE"===e.type&&(d.current=requestAnimationFrame((function(){return c(!1)})))}))}),[o]);return l?n.createElement(hk,{"data-rsbs-portal":!0},n.createElement(pT,JE({},s,{lastSnapRef:u,ref:t,initialState:h.current,onSpringStart:p,onSpringEnd:f}))):null}));const yT=i.css`
2598
+ function FM(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 qM(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?FM(Object(n),!0).forEach((function(t){WM(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FM(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function WM(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var UM,KM=(UM=[],{activateTrap:function(e){if(UM.length>0){var t=UM[UM.length-1];t!==e&&t.pause()}var n=UM.indexOf(e);-1===n||UM.splice(n,1),UM.push(e)},deactivateTrap:function(e){var t=UM.indexOf(e);-1!==t&&UM.splice(t,1),UM.length>0&&UM[UM.length-1].unpause()}}),GM=function(e){return setTimeout(e,0)},ZM=function(e,t){var n=-1;return e.every((function(e,r){return!t(e)||(n=r,!1)})),n},JM=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},XM=function(e){return e.target.shadowRoot&&"function"==typeof e.composedPath?e.composedPath()[0]:e.target},YM=function(e,t){var n,r=(null==t?void 0:t.document)||document,o=qM({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},t),i={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},s=function(e,t,n){return e&&void 0!==e[t]?e[t]:o[n||t]},a=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),s=1;s<n;s++)i[s-1]=arguments[s];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 a=t;if("string"==typeof t&&!(a=r.querySelector(t)))throw new Error("`".concat(e,"` as selector refers to no known node"));return a},c=function(){var e=l("initialFocus");if(!1===e)return!1;if(void 0===e)if(a(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},d=function(){if(i.containerGroups=i.containers.map((function(e){var t,n,r=VM(e,o.tabbableOptions),i=(t=e,(n=(n=o.tabbableOptions)||{}).getShadowRoot?TM([t],n.includeContainer,{filter:DM.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):EM(t,n.includeContainer,DM.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 BM(e,o.tabbableOptions)})):i.slice(0,n).reverse().find((function(e){return BM(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")},u=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()))},h=function(e){var t=l("setReturnFocus",e);return t||!1!==t&&e},p=function(e){var t=XM(e);a(t)>=0||(JM(o.clickOutsideDeactivates,e)?n.deactivate({returnFocus:o.returnFocusOnDeactivate&&!_M(t,o.tabbableOptions)}):JM(o.allowOutsideClick,e)||e.preventDefault())},f=function(e){var t=XM(e),n=a(t)>=0;n||t instanceof Document?n&&(i.mostRecentlyFocusedNode=t):(e.stopImmediatePropagation(),u(i.mostRecentlyFocusedNode||c()))},m=function(e){if(function(e){return"Escape"===e.key||"Esc"===e.key||27===e.keyCode}(e)&&!1!==JM(o.escapeDeactivates,e))return e.preventDefault(),void n.deactivate();(function(e){return"Tab"===e.key||9===e.keyCode})(e)&&function(e){var t=XM(e);d();var n=null;if(i.tabbableGroups.length>0){var r=a(t),s=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=ZM(i.tabbableGroups,(function(e){var n=e.firstTabbableNode;return t===n}));if(c<0&&(s.container===t||_M(t,o.tabbableOptions)&&!BM(t,o.tabbableOptions)&&!s.nextTabbableNode(t,!1))&&(c=r),c>=0){var h=0===c?i.tabbableGroups.length-1:c-1;n=i.tabbableGroups[h].lastTabbableNode}}else{var p=ZM(i.tabbableGroups,(function(e){var n=e.lastTabbableNode;return t===n}));if(p<0&&(s.container===t||_M(t,o.tabbableOptions)&&!BM(t,o.tabbableOptions)&&!s.nextTabbableNode(t))&&(p=r),p>=0){var f=p===i.tabbableGroups.length-1?0:p+1;n=i.tabbableGroups[f].firstTabbableNode}}}else n=l("fallbackFocus");n&&(e.preventDefault(),u(n))}(e)},g=function(e){var t=XM(e);a(t)>=0||JM(o.clickOutsideDeactivates,e)||JM(o.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},v=function(){if(i.active)return KM.activateTrap(n),i.delayInitialFocusTimer=o.delayInitialFocus?GM((function(){u(c())})):u(c()),r.addEventListener("focusin",f,!0),r.addEventListener("mousedown",p,{capture:!0,passive:!1}),r.addEventListener("touchstart",p,{capture:!0,passive:!1}),r.addEventListener("click",g,{capture:!0,passive:!1}),r.addEventListener("keydown",m,{capture:!0,passive:!1}),n},b=function(){if(i.active)return r.removeEventListener("focusin",f,!0),r.removeEventListener("mousedown",p,!0),r.removeEventListener("touchstart",p,!0),r.removeEventListener("click",g,!0),r.removeEventListener("keydown",m,!0),n};return(n={get active(){return i.active},get paused(){return i.paused},activate:function(e){if(i.active)return this;var t=s(e,"onActivate"),n=s(e,"onPostActivate"),o=s(e,"checkCanFocusTrap");o||d(),i.active=!0,i.paused=!1,i.nodeFocusedBeforeActivation=r.activeElement,t&&t();var a=function(){o&&d(),v(),n&&n()};return o?(o(i.containers.concat()).then(a,a),this):(a(),this)},deactivate:function(e){if(!i.active)return this;var t=qM({onDeactivate:o.onDeactivate,onPostDeactivate:o.onPostDeactivate,checkCanReturnFocus:o.checkCanReturnFocus},e);clearTimeout(i.delayInitialFocusTimer),i.delayInitialFocusTimer=void 0,b(),i.active=!1,i.paused=!1,KM.deactivateTrap(n);var r=s(t,"onDeactivate"),a=s(t,"onPostDeactivate"),l=s(t,"checkCanReturnFocus"),c=s(t,"returnFocus","returnFocusOnDeactivate");r&&r();var d=function(){GM((function(){c&&u(h(i.nodeFocusedBeforeActivation)),a&&a()}))};return c&&l?(l(h(i.nodeFocusedBeforeActivation)).then(d,d),this):(d(),this)},pause:function(){return i.paused||!i.active||(i.paused=!0,b()),this},unpause:function(){return i.paused&&i.active?(i.paused=!1,d(),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&&d(),this}}).updateContainerElements(e),n};var QM=!1;if("undefined"!=typeof window){var eE={get passive(){QM=!0}};window.addEventListener("testPassive",null,eE),window.removeEventListener("testPassive",null,eE)}var tE,nE="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1),rE=[],oE=!1,iE=-1,sE=void 0,aE=void 0,lE=function(e){return rE.some((function(t){return!(!t.options.allowTouchMove||!t.options.allowTouchMove(e))}))},cE=function(e){var t=e||window.event;return!!lE(t.target)||(t.touches.length>1||(t.preventDefault&&t.preventDefault(),!1))},dE=function(e,t){if(e){if(!rE.some((function(t){return t.targetElement===e}))){var n={targetElement:e,options:t||{}};rE=[].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)}(rE),[n]),nE?(e.ontouchstart=function(e){1===e.targetTouches.length&&(iE=e.targetTouches[0].clientY)},e.ontouchmove=function(t){1===t.targetTouches.length&&function(e,t){var n=e.targetTouches[0].clientY-iE;!lE(e.target)&&(t&&0===t.scrollTop&&n>0||function(e){return!!e&&e.scrollHeight-e.scrollTop<=e.clientHeight}(t)&&n<0?cE(e):e.stopPropagation())}(t,e)},oE||(document.addEventListener("touchmove",cE,QM?{passive:!1}:void 0),oE=!0)):function(e){if(void 0===aE){var t=!!e&&!0===e.reserveScrollBarGap,n=window.innerWidth-document.documentElement.clientWidth;t&&n>0&&(aE=document.body.style.paddingRight,document.body.style.paddingRight=n+"px")}void 0===sE&&(sE=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.")},uE=function(e){e?(rE=rE.filter((function(t){return t.targetElement!==e})),nE?(e.ontouchstart=null,e.ontouchmove=null,oE&&0===rE.length&&(document.removeEventListener("touchmove",cE,QM?{passive:!1}:void 0),oE=!1)):rE.length||(void 0!==aE&&(document.body.style.paddingRight=aE,aE=void 0),void 0!==sE&&(document.body.style.overflow=sE,sE=void 0))):console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.")},hE=[],pE="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"}(tE||(tE={}));var fE,mE=function(e){return Object.freeze(e)},gE=function(e,t){this.inlineSize=e,this.blockSize=t,mE(this)},vE=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,mE(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}(),bE=function(e){return e instanceof SVGElement&&"getBBox"in e},yE=function(e){if(bE(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var o=e,i=o.offsetWidth,s=o.offsetHeight;return!(i||s||e.getClientRects().length)},xE=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)},wE="undefined"!=typeof window?window:{},CE=new WeakMap,kE=/auto|scroll/,SE=/^tb|vertical/,$E=/msie|trident/i.test(wE.navigator&&wE.navigator.userAgent),jE=function(e){return parseFloat(e||"0")},ME=function(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=!1),new gE((n?t:e)||0,(n?e:t)||0)},EE=mE({devicePixelContentBoxSize:ME(),borderBoxSize:ME(),contentBoxSize:ME(),contentRect:new vE(0,0,0,0)}),TE=function(e,t){if(void 0===t&&(t=!1),CE.has(e)&&!t)return CE.get(e);if(yE(e))return CE.set(e,EE),EE;var n=getComputedStyle(e),r=bE(e)&&e.ownerSVGElement&&e.getBBox(),o=!$E&&"border-box"===n.boxSizing,i=SE.test(n.writingMode||""),s=!r&&kE.test(n.overflowY||""),a=!r&&kE.test(n.overflowX||""),l=r?0:jE(n.paddingTop),c=r?0:jE(n.paddingRight),d=r?0:jE(n.paddingBottom),u=r?0:jE(n.paddingLeft),h=r?0:jE(n.borderTopWidth),p=r?0:jE(n.borderRightWidth),f=r?0:jE(n.borderBottomWidth),m=u+c,g=l+d,v=(r?0:jE(n.borderLeftWidth))+p,b=h+f,y=a?e.offsetHeight-b-e.clientHeight:0,x=s?e.offsetWidth-v-e.clientWidth:0,w=o?m+v:0,C=o?g+b:0,k=r?r.width:jE(n.width)-w-x,S=r?r.height:jE(n.height)-C-y,$=k+m+x+v,j=S+g+y+b,M=mE({devicePixelContentBoxSize:ME(Math.round(k*devicePixelRatio),Math.round(S*devicePixelRatio),i),borderBoxSize:ME($,j,i),contentBoxSize:ME(k,S,i),contentRect:new vE(u,l,k,S)});return CE.set(e,M),M},OE=function(e,t,n){var r=TE(e,n),o=r.borderBoxSize,i=r.contentBoxSize,s=r.devicePixelContentBoxSize;switch(t){case tE.DEVICE_PIXEL_CONTENT_BOX:return s;case tE.BORDER_BOX:return o;default:return i}},LE=function(e){var t=TE(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=mE([t.borderBoxSize]),this.contentBoxSize=mE([t.contentBoxSize]),this.devicePixelContentBoxSize=mE([t.devicePixelContentBoxSize])},AE=function(e){if(yE(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},RE=function(){var e=1/0,t=[];hE.forEach((function(n){if(0!==n.activeTargets.length){var r=[];n.activeTargets.forEach((function(t){var n=new LE(t.target),o=AE(t.target);r.push(n),t.lastReportedSize=OE(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},NE=function(e){hE.forEach((function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach((function(n){n.isActive()&&(AE(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))}))}))},DE=function(){var e=0;for(NE(e);hE.some((function(e){return e.activeTargets.length>0}));)e=RE(),NE(e);return hE.some((function(e){return e.skippedTargets.length>0}))&&function(){var e;"function"==typeof ErrorEvent?e=new ErrorEvent("error",{message:pE}):((e=document.createEvent("Event")).initEvent("error",!1,!1),e.message=pE),window.dispatchEvent(e)}(),e>0},IE=[],PE=function(e){if(!fE){var t=0,n=document.createTextNode("");new MutationObserver((function(){return IE.splice(0).forEach((function(e){return e()}))})).observe(n,{characterData:!0}),fE=function(){n.textContent="".concat(t?t--:t++)}}IE.push(e),fE()},zE=0,VE={attributes:!0,characterData:!0,childList:!0,subtree:!0},BE=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],HE=function(e){return void 0===e&&(e=0),Date.now()+e},_E=!1,FE=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),!_E){_E=!0;var n,r=HE(e);n=function(){var n=!1;try{n=DE()}finally{if(_E=!1,e=r-HE(),!zE)return;n?t.run(1e3):e>0?t.run(e):t.start()}},PE((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,VE)};document.body?t():wE.addEventListener("DOMContentLoaded",t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),BE.forEach((function(t){return wE.addEventListener(t,e.listener,!0)})))},e.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),BE.forEach((function(t){return wE.removeEventListener(t,e.listener,!0)})),this.stopped=!0)},e}()),qE=function(e){!zE&&e>0&&FE.start(),!(zE+=e)&&FE.stop()},WE=function(){function e(e,t){this.target=e,this.observedBox=t||tE.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e=OE(this.target,this.observedBox,!0);return function(e){return!bE(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}(),UE=function(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t},KE=new WeakMap,GE=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},ZE=function(){function e(){}return e.connect=function(e,t){var n=new UE(e,t);KE.set(e,n)},e.observe=function(e,t,n){var r=KE.get(e),o=0===r.observationTargets.length;GE(r.observationTargets,t)<0&&(o&&hE.push(r),r.observationTargets.push(new WE(t,n&&n.box)),qE(1),FE.schedule())},e.unobserve=function(e,t){var n=KE.get(e),r=GE(n.observationTargets,t),o=1===n.observationTargets.length;r>=0&&(o&&hE.splice(hE.indexOf(n),1),n.observationTargets.splice(r,1),qE(-1))},e.disconnect=function(e){var t=this,n=KE.get(e);n.observationTargets.slice().forEach((function(n){return t.unobserve(e,n.target)})),n.activeTargets.splice(0,n.activeTargets.length)},e}(),JE=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.");ZE.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(!xE(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");ZE.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(!xE(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");ZE.unobserve(this,e)},e.prototype.disconnect=function(){ZE.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();function XE(){return XE=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},XE.apply(this,arguments)}function YE(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 QE="undefined"!=typeof window?n.useLayoutEffect:n.useEffect;function eT(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 tT(e){var t=Math.round(e);if(Number.isNaN(e))throw new TypeError("Found a NaN! Check your snapPoints / defaultSnap / snapTo ");return t}var nT={box:"border-box"};function rT(e,t){var r=t.label,o=t.enabled,i=t.resizeSourceRef,s=n.useState(0),a=s[0],l=s[1];n.useDebugValue(r+": "+a);var c=n.useCallback((function(e){l(e[0].borderBoxSize[0].blockSize),i.current="element"}),[i]);return QE((function(){if(e.current&&o){var t=new JE(c);return t.observe(e.current,nT),function(){t.disconnect()}}}),[e,c,o]),o?a:0}function oT(e){return void 0===e&&(e=1e3),new Promise((function(t){return setTimeout(t,e)}))}var iT={DRAG:{target:"#overlay.dragging",actions:"onOpenEnd"}},sT={RESIZE:{target:"#overlay.resizing",actions:"onOpenEnd"}},aT=function(e,t,n){return void 0===n&&(n=e.context),new c$(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:XE({},iT,sT)}}},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:XE({},iT,sT)}}},end:{invoke:{src:"onOpenEnd",onDone:"done"},on:{CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:XE({},{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:[u$({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(oT()).then((function(){}))}catch(e){return Promise.reject(e)}},onOpenStart:function(){try{return Promise.resolve(oT()).then((function(){}))}catch(e){return Promise.reject(e)}},onCloseStart:function(){try{return Promise.resolve(oT()).then((function(){}))}catch(e){return Promise.reject(e)}},onResizeStart:function(){try{return Promise.resolve(oT()).then((function(){}))}catch(e){return Promise.reject(e)}},onSnapEnd:function(){try{return Promise.resolve(oT()).then((function(){}))}catch(e){return Promise.reject(e)}},onOpenEnd:function(){try{return Promise.resolve(oT()).then((function(){}))}catch(e){return Promise.reject(e)}},onCloseEnd:function(){try{return Promise.resolve(oT()).then((function(){}))}catch(e){return Promise.reject(e)}},onResizeEnd:function(){try{return Promise.resolve(oT()).then((function(){}))}catch(e){return Promise.reject(e)}},renderVisuallyHidden:function(e,t){try{return Promise.resolve(oT()).then((function(){}))}catch(e){return Promise.reject(e)}},activate:function(e,t){try{return Promise.resolve(oT()).then((function(){}))}catch(e){return Promise.reject(e)}},deactivate:function(e,t){try{return Promise.resolve(oT()).then((function(){}))}catch(e){return Promise.reject(e)}},openSmoothly:function(e,t){try{return Promise.resolve(oT()).then((function(){}))}catch(e){return Promise.reject(e)}},openImmediately:function(e,t){try{return Promise.resolve(oT()).then((function(){}))}catch(e){return Promise.reject(e)}},snapSmoothly:function(e,t){try{return Promise.resolve(oT()).then((function(){}))}catch(e){return Promise.reject(e)}},resizeSmoothly:function(e,t){try{return Promise.resolve(oT()).then((function(){}))}catch(e){return Promise.reject(e)}},closeSmoothly:function(e,t){try{return Promise.resolve(oT()).then((function(){}))}catch(e){return Promise.reject(e)}}},guards:{initiallyClosed:function(e){return"CLOSED"===e.initialState},initiallyOpen:function(e){return"OPEN"===e.initialState}}}),lT=["children","sibling","className","footer","header","open","initialState","lastSnapRef","initialFocusRef","onDismiss","maxHeight","defaultSnap","snapPoints","blocking","scrollLocking","style","onSpringStart","onSpringCancel","onSpringEnd","reserveScrollBarGap","expandOnContentDrag"],cT=["velocity"],dT=["onRest","config"],uT={tension:170,friction:26},hT=uT.tension,pT=uT.friction,fT=n.forwardRef((function(e,t){var r=e.children,o=e.sibling,i=e.className,s=e.footer,a=e.header,l=e.open,c=e.initialState,d=e.lastSnapRef,u=e.initialFocusRef,h=e.onDismiss,p=e.maxHeight,f=e.defaultSnap,m=void 0===f?gT:f,g=e.snapPoints,v=void 0===g?vT:g,b=e.blocking,y=void 0===b||b,x=e.scrollLocking,w=void 0===x||x,C=e.style,k=e.onSpringStart,S=e.onSpringCancel,$=e.onSpringEnd,j=e.reserveScrollBarGap,M=void 0===j?y:j,E=e.expandOnContentDrag,T=void 0!==E&&E,O=YE(e,lT),L=function(){var e=n.useState(!1),t=e[0],r=e[1],o=n.useState({}),i=o[0],s=o[1],a=n.useCallback((function(e){return s((function(t){var n;return XE({},t,((n={})[e]=!1,n))})),function(){s((function(t){var n;return XE({},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:a}}(),A=L.ready,R=L.registerReady,N=n.useRef(!1),D=n.useRef(k),I=n.useRef(S),P=n.useRef($);n.useEffect((function(){D.current=k,I.current=S,P.current=$}),[S,k,$]);var z,V,B=Q$((function(){return{y:0,ready:0,maxHeight:0,minSnap:0,maxSnap:0}})),H=B[0],_=B[1],F=n.useRef(null),q=n.useRef(null),W=n.useRef(null),U=n.useRef(null),K=n.useRef(null),G=n.useRef(null),Z=n.useRef(0),J=n.useRef(),X=n.useRef(!1),Y=(z=n.useMemo((function(){return"undefined"!=typeof window?window.matchMedia("(prefers-reduced-motion: reduce)"):null}),[]),V=n.useRef(null==z?void 0:z.matches),n.useDebugValue(V.current?"reduce":"no-preference"),n.useEffect((function(){var e=function(e){V.current=e.matches};return null==z||z.addListener(e),function(){return null==z?void 0:z.removeListener(e)}}),[z]),V),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,dE(e,{allowTouchMove:function(e){return e.closest("[data-body-scroll-lock-ignore]")},reserveScrollBarGap:o}))},deactivate:function(){n&&(n=!1,uE(e))}}}),[r,t,o]),i}({targetRef:q,enabled:A&&w,reserveScrollBarGap:M}),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=[],s=[];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),s.push(e),e.setAttribute("aria-hidden","true"))}}))}},deactivate:function(){n&&(n=!1,s.forEach((function(e,t){var n=i[t];null===n?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",n)})),i=[],s=[])}}}),[t,r]),o}({targetRef:F,enabled:A&&y}),te=function(e){var t=e.targetRef,r=e.fallbackRef,o=e.initialFocusRef,i=e.enabled,s=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 s.current.deactivate(),void(s.current={activate:function(){},deactivate:function(){}});var e=r.current,n=YM(t.current,{onActivate:void 0,initialFocus:o?function(){return(null==o?void 0:o.current)||e}:void 0,fallbackFocus:e,escapeDeactivates:!1,clickOutsideDeactivates:!1}),a=!1;s.current={activate:function(){try{return a?Promise.resolve():(a=!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(){a&&(a=!1,n.deactivate())}}}),[i,r,o,t]),s}({targetRef:F,fallbackRef:G,initialFocusRef:u||void 0,enabled:A&&y&&!1!==u}),ne=function(e){var t=e.getSnapPoints,r=e.heightRef,o=e.lastSnapRef,i=e.ready,s=function(e){var t=e.contentRef,r=e.controlledMaxHeight,o=e.footerEnabled,i=e.footerRef,s=e.headerEnabled,a=e.headerRef,l=e.registerReady,c=e.resizeSourceRef,d=n.useMemo((function(){return l("contentHeight")}),[l]),u=function(e,t,r){var o=n.useMemo((function(){return t("maxHeight")}),[t]),i=n.useState((function(){return tT(e)||"undefined"!=typeof window?window.innerHeight:0})),s=i[0],a=i[1],l=s>0,c=n.useRef(0);return n.useDebugValue(e?"controlled":"auto"),n.useEffect((function(){l&&o()}),[l,o]),QE((function(){if(e)return a(tT(e)),void(r.current="maxheightprop");var t=function(){c.current||(c.current=requestAnimationFrame((function(){a(window.innerHeight),r.current="window",c.current=0})))};return window.addEventListener("resize",t),a(window.innerHeight),r.current="window",o(),function(){window.removeEventListener("resize",t),cancelAnimationFrame(c.current)}}),[e,o,r]),s}(r,l,c),h=rT(a,{label:"headerHeight",enabled:s,resizeSourceRef:c}),p=rT(t,{label:"contentHeight",enabled:!0,resizeSourceRef:c}),f=rT(i,{label:"footerHeight",enabled:o,resizeSourceRef:c}),m=Math.min(u-h-f,p)+h+f;n.useDebugValue("minHeight: "+m);var g=p>0;return n.useEffect((function(){g&&d()}),[g,d]),{maxHeight:u,minHeight:m,headerHeight:h,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}),a=s.maxHeight,l=s.minHeight,c=s.headerHeight,d=s.footerHeight,u=function(e,t){var n=[].concat(e).map(tT).reduce((function(e,n){return e.add(eT(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:d,headerHeight:c,minHeight:l,maxHeight:a}):[0],a),h=u.snapPoints,p=u.minSnap,f=u.maxSnap;return n.useDebugValue("minSnap: "+p+", maxSnap:"+f),{minSnap:p,maxSnap:f,findSnap:function(e){var t=tT("function"==typeof e?e({footerHeight:d,headerHeight:c,height:r.current,minHeight:l,maxHeight:a,snapPoints:h,lastSnap:o.current}):e);return h.reduce((function(e,n){return Math.abs(n-t)<Math.abs(e-t)?n:e}),p)},maxHeight:a}}({contentRef:W,controlledMaxHeight:p,footerEnabled:!!s,footerRef:K,getSnapPoints:v,headerEnabled:!1!==a,headerRef:U,heightRef:Z,lastSnapRef:d,ready:A,registerReady:R,resizeSourceRef:J}),re=ne.minSnap,oe=ne.maxSnap,ie=ne.maxHeight,se=ne.findSnap,ae=n.useRef(ie),le=n.useRef(re),ce=n.useRef(oe),de=n.useRef(se),ue=n.useRef(0);QE((function(){ae.current=ie,ce.current=oe,le.current=re,de.current=se,ue.current=se(m)}),[se,m,ie,oe,re]);var he=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=YE(n,cT),s=YE(e,dT);return new Promise((function(e){return _(XE({},s,{config:XE({velocity:o},i,{mass:1,tension:hT,friction:Math.max(pT,pT+(pT-pT*o))}),onRest:function(){var n=[].slice.call(arguments);e.apply(void 0,n),null==t||t.apply(void 0,n)}}))}))}),[_]),pe=S$(aT,{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:J.current})}),[]),onOpenEnd:n.useCallback((function(){return null==P.current?void 0:P.current({type:"OPEN"})}),[]),onSnapEnd:n.useCallback((function(e,t){return null==P.current?void 0:P.current({type:"SNAP",source:e.snapSource})}),[]),onResizeEnd:n.useCallback((function(){return null==P.current?void 0:P.current({type:"RESIZE",source:J.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:J.current}))}catch(e){return Promise.reject(e)}}),[]),onSnapEnd:n.useCallback((function(e,t){try{return Promise.resolve(null==P.current?void 0:P.current({type:"SNAP",source:e.snapSource}))}catch(e){return Promise.reject(e)}}),[]),onOpenEnd:n.useCallback((function(){try{return Promise.resolve(null==P.current?void 0:P.current({type:"OPEN"}))}catch(e){return Promise.reject(e)}}),[]),onCloseEnd:n.useCallback((function(){try{return Promise.resolve(null==P.current?void 0:P.current({type:"CLOSE"}))}catch(e){return Promise.reject(e)}}),[]),onResizeEnd:n.useCallback((function(){try{return Promise.resolve(null==P.current?void 0:P.current({type:"RESIZE",source:J.current}))}catch(e){return Promise.reject(e)}}),[]),renderVisuallyHidden:n.useCallback((function(e,t){try{return Promise.resolve(he({y:ue.current,ready:0,maxHeight:ae.current,maxSnap:ce.current,minSnap:ue.current,immediate:!0})).then((function(){}))}catch(e){return Promise.reject(e)}}),[he]),activate:n.useCallback((function(e,t){try{return N.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(),N.current=!1,Promise.resolve()}catch(e){return Promise.reject(e)}}),[ee,te,Q]),openImmediately:n.useCallback((function(){try{return Z.current=ue.current,Promise.resolve(he({y:ue.current,ready:1,maxHeight:ae.current,maxSnap:ce.current,minSnap:ue.current,immediate:!0})).then((function(){}))}catch(e){return Promise.reject(e)}}),[he]),openSmoothly:n.useCallback((function(){try{return Promise.resolve(he({y:0,ready:1,maxHeight:ae.current,maxSnap:ce.current,minSnap:ue.current,immediate:!0})).then((function(){return Z.current=ue.current,Promise.resolve(he({y:ue.current,ready:1,maxHeight:ae.current,maxSnap:ce.current,minSnap:ue.current,immediate:Y.current})).then((function(){}))}))}catch(e){return Promise.reject(e)}}),[he,Y]),snapSmoothly:n.useCallback((function(e,t){try{var n=de.current(e.y);return Z.current=n,d.current=n,Promise.resolve(he({y:n,ready:1,maxHeight:ae.current,maxSnap:ce.current,minSnap:le.current,immediate:Y.current,config:{velocity:e.velocity}})).then((function(){}))}catch(e){return Promise.reject(e)}}),[he,d,Y]),resizeSmoothly:n.useCallback((function(){try{var e=de.current(Z.current);return Z.current=e,d.current=e,Promise.resolve(he({y:e,ready:1,maxHeight:ae.current,maxSnap:ce.current,minSnap:le.current,immediate:"element"!==J.current||Y.current})).then((function(){}))}catch(e){return Promise.reject(e)}}),[he,d,Y]),closeSmoothly:n.useCallback((function(e,t){try{return he({minSnap:Z.current,immediate:!0}),Z.current=0,Promise.resolve(he({y:0,maxHeight:ae.current,maxSnap:ce.current,immediate:Y.current})).then((function(){return Promise.resolve(he({ready:0,immediate:!0})).then((function(){}))}))}catch(e){return Promise.reject(e)}}),[he,Y])}}),fe=pe[0],me=pe[1];n.useEffect((function(){A&&me(l?"OPEN":"CLOSE")}),[l,me,A]),QE((function(){(ie||oe||re)&&me("RESIZE")}),[ie,oe,re,me]),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,s=void 0===i?"custom":i;me("SNAP",{payload:{y:de.current(e),velocity:o,source:s}})},get height(){return Z.current}}}),[me]),n.useEffect((function(){var e=q.current,t=function(e){X.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 T&&(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)}}),[T,q]);var ge=CM((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,s=void 0!==i&&i,a=e.cancel,l=e.direction[1],c=e.down,d=e.first,u=e.last,p=e.memo,f=void 0===p?H.y.getValue():p,m=e.tap,g=e.velocity,v=-1*e.movement[1];if(!N.current)return a(),f;if(h&&o&&m)return a(),setTimeout((function(){return h()}),0),f;if(m)return f;var b=f+v,y=v*g,x=Math.max(le.current,Math.min(ce.current,b+2*y));if(!c&&h&&l>0&&b+y<le.current/2)return a(),h(),f;var w=c?h||le.current!==ce.current?Ij(b,h?0:le.current,ce.current,.55):b<le.current?Ij(b,le.current,2*ce.current,.55):Ij(b,le.current/2,ce.current,.55):x;return T&&s?(w>=ce.current&&(w=ce.current),f===ce.current&&q.current.scrollTop>0&&(w=ce.current),X.current=w<ce.current):X.current=!1,d&&me("DRAG"),u?(me("SNAP",{payload:{y:w,velocity:g>.05?g:1,source:"dragging"}}),f):(_({y:w,ready:1,maxHeight:ae.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=K$([n.y,n.maxHeight],(function(e,t){return Math.round(eT(t-e,0,16))+"px"})),o=K$([n.y,n.minSnap,n.maxSnap],(function(e,t,n){return eT(e,t,n)+"px"})),i=K$([n.y,n.minSnap,n.maxSnap],(function(e,t,n){return e<t?t-e+"px":e>n?n-e+"px":"0px"})),s=K$([n.y,n.maxSnap],(function(e,t){return e>=t?Math.ceil(e-t):0})),a=K$([n.y,n.minSnap],(function(e,t){if(!t)return 0;var n=Math.max(t/2-45,0);return eT((e-n)*(1/(Math.min(t/2+45,t)-n)+0),0,1)})),l=K$([n.y,n.minSnap],(function(e,t){return t?eT(e/t,0,1):0}));return(t={})["--rsbs-content-opacity"]=a,t["--rsbs-backdrop-opacity"]=l,t["--rsbs-antigap-scale-y"]=s,t["--rsbs-overlay-translate-y"]=i,t["--rsbs-overlay-rounded"]=r,t["--rsbs-overlay-h"]=o,t}({spring:H});return n.createElement(Oj.div,XE({},O,{"data-rsbs-root":!0,"data-rsbs-state":mT.find(fe.matches),"data-rsbs-is-blocking":y,"data-rsbs-is-dismissable":!!h,"data-rsbs-has-header":!!a,"data-rsbs-has-footer":!!s,className:i,ref:F,style:XE({},ve,C,{opacity:H.ready})}),o,y&&n.createElement("div",XE({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:G,onKeyDown:function(e){"Escape"===e.key&&(e.stopPropagation(),h&&h())}},!1!==a&&n.createElement("div",XE({key:"header","data-rsbs-header":!0,ref:U},ge()),a),n.createElement("div",XE({key:"scroll","data-rsbs-scroll":!0,ref:q},T?ge({isContentDragging:!0}):{}),n.createElement("div",{"data-rsbs-content":!0,ref:W},r)),s&&n.createElement("div",XE({key:"footer",ref:K,"data-rsbs-footer":!0},ge()),s)))})),mT=["closed","opening","open","closing","dragging","snapping","resizing"];function gT(e){var t=e.lastSnap;return null!=t?t:Math.min.apply(Math,e.snapPoints)}function vT(e){return e.minHeight}var bT=["onSpringStart","onSpringEnd","skipInitialTransition"],yT=n.forwardRef((function(e,t){var r=e.onSpringStart,o=e.onSpringEnd,i=e.skipInitialTransition,s=YE(e,bT),a=n.useState(!1),l=a[0],c=a[1],d=n.useRef(),u=n.useRef(null),h=n.useRef(i&&s.open?"OPEN":"CLOSED");QE((function(){if(s.open)return cancelAnimationFrame(d.current),c(!0),function(){h.current="CLOSED"}}),[s.open]);var p=n.useCallback((function(e){return Promise.resolve(null==r?void 0:r(e)).then((function(){"OPEN"===e.type&&cancelAnimationFrame(d.current)}))}),[r]),f=n.useCallback((function(e){return Promise.resolve(null==o?void 0:o(e)).then((function(){"CLOSE"===e.type&&(d.current=requestAnimationFrame((function(){return c(!1)})))}))}),[o]);return l?n.createElement(pk,{"data-rsbs-portal":!0},n.createElement(fT,XE({},s,{lastSnapRef:u,ref:t,initialState:h.current,onSpringStart:p,onSpringEnd:f}))):null}));const xT=i.css`
2588
2599
  width: ${k(1e3)};
2589
2600
  border-radius: ${$(300)};
2590
2601
  background: transparent;
@@ -2598,7 +2609,7 @@ function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2598
2609
  margin: 0;
2599
2610
  background: ${w("neutral",300)};
2600
2611
  }
2601
- `,xT=(e,t)=>i.css`
2612
+ `,wT=(e,t)=>i.css`
2602
2613
  [data-rsbs-overlay] {
2603
2614
  border-top-left-radius: ${$(500)};
2604
2615
  border-top-right-radius: ${$(500)};
@@ -2624,7 +2635,7 @@ function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2624
2635
  padding: 0;
2625
2636
  min-height: ${k(1600)};
2626
2637
  }
2627
- `;!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 wT=(e,t)=>{let n=0,r=1/0;return t.forEach(((t,o)=>{const i=Math.abs(t-e);i<r&&(r=i,n=o)})),n},CT=(e,t)=>{let n="14.875rem";return"full-width"===e?n="100%":"large"===e&&(n="22.875rem"),i.css`
2638
+ `;!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 CT=(e,t)=>{let n=0,r=1/0;return t.forEach(((t,o)=>{const i=Math.abs(t-e);i<r&&(r=i,n=o)})),n},kT=(e,t)=>{let n="14.875rem";return"full-width"===e?n="100%":"large"===e&&(n="22.875rem"),i.css`
2628
2639
  width: 100%;
2629
2640
  max-width: ${n};
2630
2641
  border-radius: ${$(300)};
@@ -2638,7 +2649,7 @@ function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2638
2649
  button {
2639
2650
  margin-left: ${t?0:k(600)};
2640
2651
  }
2641
- `},kT=i.css`
2652
+ `},ST=i.css`
2642
2653
  display: flex;
2643
2654
  align-items: flex-start;
2644
2655
  gap: ${k(200)};
@@ -2646,14 +2657,14 @@ function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2646
2657
  svg {
2647
2658
  margin-top: 0.1875rem;
2648
2659
  }
2649
- `,ST=e=>i.css`
2660
+ `,$T=e=>i.css`
2650
2661
  max-width: 45rem;
2651
2662
  color: ${w("neutral",800)};
2652
2663
  font-size: ${C("small"===e?300:500)};
2653
2664
  line-height: ${S("small"===e?500:700)};
2654
2665
  font-weight: 400;
2655
2666
  text-align: left;
2656
- `,$T=(e,t)=>i.css`
2667
+ `,jT=(e,t)=>i.css`
2657
2668
  max-width: 45rem;
2658
2669
  color: ${w("neutral",700)};
2659
2670
  font-size: ${C("small"===e?200:400)};
@@ -2661,7 +2672,7 @@ function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2661
2672
  font-weight: 400;
2662
2673
  margin-left: ${t?k(600):"0"};
2663
2674
  text-align: left;
2664
- `,jT=(e,t)=>i.css`
2675
+ `,MT=(e,t)=>i.css`
2665
2676
  max-width: 45rem;
2666
2677
  color: ${w("neutral",700)};
2667
2678
  font-size: ${C("small"===e?200:400)};
@@ -2669,15 +2680,15 @@ function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2669
2680
  font-weight: 400;
2670
2681
  margin-left: ${t?k(600):"0"};
2671
2682
  text-align: left;
2672
- `,MT=i.css`
2683
+ `,ET=i.css`
2673
2684
  background-color: ${w("neutral",100)};
2674
2685
  border: ${j(100)} solid ${w("neutral",300)};
2675
2686
  color: ${w("neutral",700)};
2676
- `,ET=i.css`
2687
+ `,TT=i.css`
2677
2688
  background-color: ${w("neutral",200)};
2678
2689
  border: ${j(100)} solid ${w("neutral",300)};
2679
2690
  color: ${w("neutral",700)};
2680
- `,TT=i.css`
2691
+ `,OT=i.css`
2681
2692
  background-color: ${w("success",100)};
2682
2693
  border: ${j(100)} solid ${w("success",300)};
2683
2694
  color: ${w("success",500)};
@@ -2685,7 +2696,7 @@ function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2685
2696
  p {
2686
2697
  color: ${w("success",900)};
2687
2698
  }
2688
- `,OT=i.css`
2699
+ `,LT=i.css`
2689
2700
  background-color: ${w("warning",100)};
2690
2701
  border: ${j(100)} solid ${w("warning",300)};
2691
2702
  color: ${w("warning",500)};
@@ -2693,7 +2704,7 @@ function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2693
2704
  p {
2694
2705
  color: ${w("warning",900)};
2695
2706
  }
2696
- `,LT=i.css`
2707
+ `,AT=i.css`
2697
2708
  background-color: ${w("error",100)};
2698
2709
  border: ${j(100)} solid ${w("error",300)};
2699
2710
  color: ${w("error",500)};
@@ -2701,52 +2712,52 @@ function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2701
2712
  p {
2702
2713
  color: ${w("error",900)};
2703
2714
  }
2704
- `,AT=({label:e,caption:t,variant:n,size:o="large",icon:i=r.jsx(Df,{height:"1rem",width:"1rem"}),onActionClick:s,actionLabel:a,isButtonRight:l,buttonLeftIcon:c,buttonRightIcon:d,labels:u})=>{const h=Mf("InlineMessage",u);let p=MT;"info-grey"===n?p=ET:"success"===n?p=TT:"warning"===n?p=OT:"error"===n&&(p=LT);const f="error"===n||"warning"===n?"alert":"status",m="alert"===f?"assertive":"polite";return r.jsxs("div",{css:[CT(o,l),p],role:f,"aria-live":m,"aria-roledescription":h.roleDescription,children:[r.jsxs("div",{children:[r.jsxs("div",{css:kT,children:[i,r.jsx("p",{css:ST(o),children:e})]}),t&&"string"==typeof t?r.jsx("p",{css:$T(o,!!i),children:t}):t?r.jsx("div",{css:jT(o,!!i),children:t}):null]}),a?r.jsx(Ef,{label:a,variant:"info-white"===n||"info-grey"===n?"primary":"secondary",size:"large"===o?"default":"small",onClick:s,leftIcon:c,rightIcon:d}):null]})},RT=i.css`
2715
+ `,RT=({label:e,caption:t,variant:n,size:o="large",icon:i=r.jsx(Df,{height:"1rem",width:"1rem"}),onActionClick:s,actionLabel:a,isButtonRight:l,buttonLeftIcon:c,buttonRightIcon:d,labels:u})=>{const h=Mf("InlineMessage",u);let p=ET;"info-grey"===n?p=TT:"success"===n?p=OT:"warning"===n?p=LT:"error"===n&&(p=AT);const f="error"===n||"warning"===n?"alert":"status",m="alert"===f?"assertive":"polite";return r.jsxs("div",{css:[kT(o,l),p],role:f,"aria-live":m,"aria-roledescription":h.roleDescription,children:[r.jsxs("div",{children:[r.jsxs("div",{css:ST,children:[i,r.jsx("p",{css:$T(o),children:e})]}),t&&"string"==typeof t?r.jsx("p",{css:jT(o,!!i),children:t}):t?r.jsx("div",{css:MT(o,!!i),children:t}):null]}),a?r.jsx(Ef,{label:a,variant:"info-white"===n||"info-grey"===n?"primary":"secondary",size:"large"===o?"default":"small",onClick:s,leftIcon:c,rightIcon:d}):null]})},NT=i.css`
2705
2716
  width: 100%;
2706
2717
  min-height: calc(${k(1200)} * 12);
2707
2718
  background-color: ${w("neutral",100)};
2708
2719
  display: flex;
2709
2720
  flex-direction: column;
2710
- `,NT=i.css`
2721
+ `,DT=i.css`
2711
2722
  background-color: ${w("neutral",200)};
2712
2723
  padding: ${k(300)};
2713
2724
  display: flex;
2714
2725
  align-items: center;
2715
2726
  gap: ${k(300)};
2716
- `,DT=i.css`
2727
+ `,IT=i.css`
2717
2728
  flex: 1;
2718
2729
 
2719
2730
  .ds-text-input-container {
2720
2731
  margin-bottom: 0;
2721
2732
  }
2722
- `,IT=i.css`
2733
+ `,PT=i.css`
2723
2734
  flex-shrink: 0;
2724
2735
  color: ${w("neutral",700)};
2725
2736
  font-size: ${C(400)};
2726
2737
  font-style: normal;
2727
2738
  font-weight: 400;
2728
- `,PT=i.css`
2739
+ `,zT=i.css`
2729
2740
  flex: 1;
2730
2741
  min-height: 0;
2731
2742
  padding: ${k(400)};
2732
2743
  display: flex;
2733
2744
  flex-direction: column;
2734
2745
  gap: ${k(300)};
2735
- `,zT=i.css`
2746
+ `,VT=i.css`
2736
2747
  color: ${w("neutral",700)};
2737
2748
  font-size: ${C(400)};
2738
2749
  line-height: ${S(600)};
2739
2750
  font-weight: 700;
2740
- `,VT=i.css`
2741
- width: 100%;
2742
2751
  `,BT=i.css`
2752
+ width: 100%;
2753
+ `,HT=i.css`
2743
2754
  flex: 1;
2744
2755
  min-height: 0;
2745
2756
  overflow-y: auto;
2746
2757
  display: flex;
2747
2758
  flex-direction: column;
2748
2759
  gap: ${k(200)};
2749
- `,HT=i.css`
2760
+ `,_T=i.css`
2750
2761
  background-color: ${w("neutral",200)};
2751
2762
  border: ${j(100)} solid ${w("neutral",300)};
2752
2763
  border-radius: ${$(300)};
@@ -2772,13 +2783,13 @@ function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2772
2783
  &:active {
2773
2784
  background-color: ${w("neutral",300)};
2774
2785
  }
2775
- `,_T=i.css`
2786
+ `,FT=i.css`
2776
2787
  display: flex;
2777
2788
  flex: 1;
2778
2789
  min-width: 0;
2779
2790
  flex-direction: column;
2780
2791
  gap: ${k(50)};
2781
- `,FT=i.css`
2792
+ `,qT=i.css`
2782
2793
  color: ${w("neutral",900)};
2783
2794
  font-size: ${C(300)};
2784
2795
  line-height: ${S(500)};
@@ -2786,7 +2797,7 @@ function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2786
2797
  overflow: hidden;
2787
2798
  text-overflow: ellipsis;
2788
2799
  white-space: nowrap;
2789
- `,qT=i.css`
2800
+ `,WT=i.css`
2790
2801
  color: ${w("neutral",700)};
2791
2802
  font-size: ${C(300)};
2792
2803
  line-height: ${S(500)};
@@ -2794,7 +2805,7 @@ function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2794
2805
  overflow: hidden;
2795
2806
  text-overflow: ellipsis;
2796
2807
  white-space: nowrap;
2797
- `,WT=e=>i.css`
2808
+ `,UT=e=>i.css`
2798
2809
  a,
2799
2810
  p {
2800
2811
  font-size: ${C("small"===e?200:400)};
@@ -2826,19 +2837,19 @@ function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2826
2837
  a:hover {
2827
2838
  text-decoration: underline;
2828
2839
  }
2829
- `,UT=e=>i.css`
2840
+ `,KT=e=>i.css`
2830
2841
  svg {
2831
2842
  height: ${k("small"===e?200:300)};
2832
2843
  width: ${k("small"===e?200:300)};
2833
2844
  color: ${w("neutral",600)};
2834
2845
  }
2835
- `,KT=i.css`
2846
+ `,GT=i.css`
2836
2847
  cursor: pointer;
2837
2848
  color: ${w("neutral",600)};
2838
2849
  display: flex;
2839
2850
  justify-content: center;
2840
2851
  align-items: center;
2841
- `,GT=(e,t)=>i.css`
2852
+ `,ZT=(e,t)=>i.css`
2842
2853
  min-height: ${k(1400)};
2843
2854
  width: 100vw;
2844
2855
  position: ${e?"sticky":"absolute"};
@@ -2848,7 +2859,7 @@ function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2848
2859
  border-top: ${j(100)} solid
2849
2860
  ${w("neutral",400)};
2850
2861
  z-index: 101;
2851
- `,ZT=e=>i.css`
2862
+ `,JT=e=>i.css`
2852
2863
  height: 100%;
2853
2864
  width: 100%;
2854
2865
  max-width: ${null!=e?u(e):"100%"};
@@ -2863,7 +2874,7 @@ function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2863
2874
  flex-direction: column;
2864
2875
  align-items: flex-start;
2865
2876
  }
2866
- `,JT=i.css`
2877
+ `,XT=i.css`
2867
2878
  display: flex;
2868
2879
  align-items: center;
2869
2880
  flex-wrap: wrap;
@@ -2876,7 +2887,7 @@ function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2876
2887
  color: ${w("neutral",700)};
2877
2888
  text-decoration: underline;
2878
2889
  }
2879
- `,XT=i.css`
2890
+ `,YT=i.css`
2880
2891
  width: 15rem;
2881
2892
  font-size: ${C(300)};
2882
2893
  line-height: ${S(500)};
@@ -2887,17 +2898,17 @@ function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2887
2898
  @media screen and (max-width: 48rem) {
2888
2899
  text-align: left;
2889
2900
  }
2890
- `,YT=i.css`
2901
+ `,QT=i.css`
2891
2902
  display: flex;
2892
2903
  align-items: center;
2893
2904
  gap: ${k(400)};
2894
- `,QT=i.css`
2905
+ `,eO=i.css`
2895
2906
  width: 100%;
2896
2907
  display: flex;
2897
2908
  align-items: center;
2898
2909
  height: ${k(1400)};
2899
2910
  background-color: ${w("neutral",200)};
2900
- `,eO=i.css`
2911
+ `,tO=i.css`
2901
2912
  height: ${k(1400)};
2902
2913
  width: 99%;
2903
2914
  background-color: ${w("neutral",200)};
@@ -2993,9 +3004,9 @@ function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2993
3004
  opacity: 1;
2994
3005
  }
2995
3006
  }
2996
- `,tO=i.css`
2997
- position: relative;
2998
3007
  `,nO=i.css`
3008
+ position: relative;
3009
+ `,rO=i.css`
2999
3010
  position: absolute;
3000
3011
  top: -0.3125rem;
3001
3012
  right: -0.3125rem;
@@ -3010,7 +3021,7 @@ function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3010
3021
  display: flex;
3011
3022
  justify-content: center;
3012
3023
  align-items: center;
3013
- `,rO=(e,t)=>Math.max(0,e.findIndex((e=>e.value===t))),oO=(e,t,n,r,o)=>{let s="3rem";return e?s="6rem":o&&(s="1.75rem"),i.css`
3024
+ `,oO=(e,t)=>Math.max(0,e.findIndex((e=>e.value===t))),iO=(e,t,n,r,o)=>{let s="3rem";return e?s="6rem":o&&(s="1.75rem"),i.css`
3014
3025
  max-height: ${s};
3015
3026
  width: 100%;
3016
3027
  background-color: ${n??w("neutral","dark"===r?800:100)};
@@ -3020,7 +3031,7 @@ function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3020
3031
  z-index: 102;
3021
3032
  border-bottom: ${j(100)} solid
3022
3033
  ${w("neutral",400)};
3023
- `},iO=(e,t)=>i.css`
3034
+ `},sO=(e,t)=>i.css`
3024
3035
  height: ${k(t?700:1200)};
3025
3036
  width: 100%;
3026
3037
  background-color: ${w("neutral","dark"===e?800:100)};
@@ -3031,7 +3042,7 @@ function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3031
3042
  justify-content: flex-start;
3032
3043
  gap: 0;
3033
3044
  padding: ${t?0:`${k(200)} ${k(400)}`};
3034
- `,sO=(e,t,n)=>i.css`
3045
+ `,aO=(e,t,n)=>i.css`
3035
3046
  height: ${k(n?700:1200)};
3036
3047
  width: 100%;
3037
3048
  max-width: ${t?u(t):"100%"};
@@ -3042,13 +3053,13 @@ function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3042
3053
  justify-content: space-between;
3043
3054
  margin: 0 auto;
3044
3055
  padding: ${n?0:`${k(200)} ${k(400)}`};
3045
- `,aO=(e,t)=>i.css`
3056
+ `,lO=(e,t)=>i.css`
3046
3057
  display: flex;
3047
3058
  margin: ${t?"-0.0625rem":"0rem"};
3048
3059
  justify-content: flex-start;
3049
3060
  gap: ${k(300)};
3050
3061
  color: ${w("neutral",e?100:900)};
3051
- `,lO=i.css`
3062
+ `,cO=i.css`
3052
3063
  outline: none;
3053
3064
 
3054
3065
  a {
@@ -3060,12 +3071,12 @@ function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3060
3071
  outline-width: ${k(50)};
3061
3072
  }
3062
3073
  }
3063
- `,cO=e=>i.css`
3074
+ `,dO=e=>i.css`
3064
3075
  display: ${e?"none":"flex"};
3065
3076
  align-items: center;
3066
3077
  justify-content: flex-start;
3067
3078
  gap: 0rem;
3068
- `,dO=(e,t,n)=>i.css`
3079
+ `,uO=(e,t,n)=>i.css`
3069
3080
  font-size: ${C(n?300:400)};
3070
3081
  line-height: ${S(600)};
3071
3082
  font-weight: 400;
@@ -3090,12 +3101,12 @@ function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3090
3101
  font-weight: 700;
3091
3102
  color: ${w("accessible","controls-on-neutral-lights")};
3092
3103
  `:""}
3093
- `,uO=e=>i.css`
3104
+ `,hO=e=>i.css`
3094
3105
  height: ${k(e?700:1200)};
3095
3106
  display: flex;
3096
3107
  align-items: center;
3097
3108
  justify-content: flex-end;
3098
- `,hO=e=>i.css`
3109
+ `,pO=e=>i.css`
3099
3110
  height: 100%;
3100
3111
  font-size: ${C(400)};
3101
3112
  line-height: ${S(600)};
@@ -3115,7 +3126,7 @@ function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3115
3126
  }
3116
3127
  }
3117
3128
  `:""}
3118
- `,pO=e=>i.css`
3129
+ `,fO=e=>i.css`
3119
3130
  height: 100%;
3120
3131
  display: flex;
3121
3132
  align-items: center;
@@ -3124,7 +3135,7 @@ function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3124
3135
  padding-left: ${k(400)};
3125
3136
  border-left: ${j(100)} solid
3126
3137
  ${w("neutral",e?700:300)};
3127
- `,fO=(e="light",t)=>i.css`
3138
+ `,mO=(e="light",t)=>i.css`
3128
3139
  background-color: none;
3129
3140
  border: none;
3130
3141
  cursor: pointer;
@@ -3150,7 +3161,7 @@ function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3150
3161
  outline-width: ${j(200)};
3151
3162
  background-color: ${w("neutral",200)};
3152
3163
  }
3153
- `,mO=(e,t)=>i.css`
3164
+ `,gO=(e,t)=>i.css`
3154
3165
  position: absolute;
3155
3166
  top: ${k(t?700:1200)};
3156
3167
  right: 0;
@@ -3165,10 +3176,10 @@ function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3165
3176
  justify-content: flex-start;
3166
3177
  gap: ${k(400)};
3167
3178
  transition: width 0.5s ease-in-out;
3168
- `,gO=i.css`
3179
+ `,vO=i.css`
3169
3180
  height: 100%;
3170
3181
  width: 100%;
3171
- `,vO=e=>i.css`
3182
+ `,bO=e=>i.css`
3172
3183
  background-color: ${w("neutral","dark"===e?800:200)};
3173
3184
  border-bottom: ${j(100)} solid
3174
3185
  ${w("neutral",300)};
@@ -3189,13 +3200,13 @@ function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3189
3200
  margin-left: -${k(300)};
3190
3201
  }
3191
3202
  }
3192
- `,bO=i.css`
3193
- background-color: ${w("neutral",100)};
3194
3203
  `,yO=i.css`
3204
+ background-color: ${w("neutral",100)};
3205
+ `,xO=i.css`
3195
3206
  min-height: 100vh;
3196
3207
  width: 100%;
3197
3208
  overflow-y: scroll;
3198
- `;i.css``;const xO=e=>i.css`
3209
+ `;i.css``;const wO=e=>i.css`
3199
3210
  display: inline-block;
3200
3211
  width: 100%;
3201
3212
  padding: ${k(300)} ${k(400)};
@@ -3224,7 +3235,7 @@ function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3224
3235
  outline-width: ${j(200)};
3225
3236
  background-color: ${w("neutral",200)};
3226
3237
  }
3227
- `,wO=i.css`
3238
+ `,CO=i.css`
3228
3239
  width: 100%;
3229
3240
  padding: ${k(300)} ${k(400)};
3230
3241
  display: flex;
@@ -3248,7 +3259,7 @@ function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3248
3259
  outline-width: ${j(200)};
3249
3260
  background-color: ${w("neutral",200)};
3250
3261
  }
3251
- `,CO=e=>i.css`
3262
+ `,kO=e=>i.css`
3252
3263
  position: absolute;
3253
3264
  top: 0rem;
3254
3265
  right: 0;
@@ -3260,7 +3271,7 @@ function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3260
3271
  align-items: flex-start;
3261
3272
  justify-content: flex-start;
3262
3273
  transition: width 0.5s ease-in-out;
3263
- `,kO=i.css`
3274
+ `,SO=i.css`
3264
3275
  height: ${k(1200)};
3265
3276
  width: 100%;
3266
3277
  display: flex;
@@ -3272,7 +3283,7 @@ function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3272
3283
  position: relative;
3273
3284
  top: 0;
3274
3285
  left: 0;
3275
- `,SO=i.css`
3286
+ `,$O=i.css`
3276
3287
  position: absolute;
3277
3288
  bottom: 0;
3278
3289
  left: 0;
@@ -3287,7 +3298,7 @@ function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3287
3298
  button {
3288
3299
  width: calc(48% - 1.5rem);
3289
3300
  }
3290
- `,$O=({theme:e="light",variant:t,navigationSection:o,utilitySection:i,actionsSection:s,linkRouter:a,isOpen:l,setIsOpen:c,pathname:d,resolvedLabels:u})=>{const h="condensed"===t,[p,f]=n.useState(void 0),[m,g]=n.useState(-1),v=n.useRef(null),b=n.useRef([]),y=a;return r.jsxs(r.Fragment,{children:[r.jsx("div",{css:mO(l,h),children:l&&r.jsxs("div",{css:gO,children:[r.jsxs("div",{style:{overflowY:"scroll",width:"100%",height:"100%",paddingBottom:"4.5rem"},children:[i?r.jsx("div",{css:vO(e),children:i?.map((e=>r.jsx("div",{className:"ds-utility-item",children:e})))}):null,o?r.jsx("div",{css:bO,children:o.map(((e,t)=>e.link?r.jsx(y,{to:e.link,href:e.link,onClick:()=>{f(void 0),g(-1),c(!1)},css:xO(d===e.link),children:e.label},e.label):r.jsxs("button",{css:wO,type:"button",ref:e=>{b.current[t]=e},onClick:()=>{e.items&&(f(e),g(t),setTimeout((()=>{v.current?.focus()}),100))},children:[e.label,e.items?r.jsx(If,{rotate:"270",color:"var(--chakra-colors-neutral-700)"}):null]},e.label)))}):null]}),s?r.jsx("div",{css:SO,children:s.map((e=>r.jsx(Ef,{...e,onClick:t=>{e?.onClick?.(t),f(void 0),g(-1),c(!1)}},e.ariaLabel)))}):null]})}),r.jsx("div",{css:CO(!!p?.items),children:p?.items?r.jsxs(r.Fragment,{children:[r.jsxs("div",{css:kO,children:[r.jsxs("button",{type:"button",onClick:()=>{f(void 0),g(-1),b.current[m]?.focus()},"aria-label":u.goBackLabel,css:fO(e),ref:v,children:[r.jsx(If,{rotate:"90",color:"var(--chakra-colors-neutral-700)"}),p?.label]}),r.jsxs("button",{type:"button",onClick:()=>{f(void 0),g(-1),c(!1)},"aria-label":u.closeMenuLabel,css:fO(e),children:[u.closeButtonText,r.jsx(zf,{height:"1rem",width:"1rem"})]})]}),r.jsx("div",{css:yO,children:p?.items?.map((e=>r.jsx(y,{to:e.link,href:e.link,css:xO(),onClick:()=>{f(void 0),g(-1),c(!1)},children:e.label},e.label)))})]}):null})]})},jO=1023,MO=i.css`
3301
+ `,jO=({theme:e="light",variant:t,navigationSection:o,utilitySection:i,actionsSection:s,linkRouter:a,isOpen:l,setIsOpen:c,pathname:d,resolvedLabels:u})=>{const h="condensed"===t,[p,f]=n.useState(void 0),[m,g]=n.useState(-1),v=n.useRef(null),b=n.useRef([]),y=a;return r.jsxs(r.Fragment,{children:[r.jsx("div",{css:gO(l,h),children:l&&r.jsxs("div",{css:vO,children:[r.jsxs("div",{style:{overflowY:"scroll",width:"100%",height:"100%",paddingBottom:"4.5rem"},children:[i?r.jsx("div",{css:bO(e),children:i?.map((e=>r.jsx("div",{className:"ds-utility-item",children:e})))}):null,o?r.jsx("div",{css:yO,children:o.map(((e,t)=>e.link?r.jsx(y,{to:e.link,href:e.link,onClick:()=>{f(void 0),g(-1),c(!1)},css:wO(d===e.link),children:e.label},e.label):r.jsxs("button",{css:CO,type:"button",ref:e=>{b.current[t]=e},onClick:()=>{e.items&&(f(e),g(t),setTimeout((()=>{v.current?.focus()}),100))},children:[e.label,e.items?r.jsx(If,{rotate:"270",color:"var(--chakra-colors-neutral-700)"}):null]},e.label)))}):null]}),s?r.jsx("div",{css:$O,children:s.map((e=>r.jsx(Ef,{...e,onClick:t=>{e?.onClick?.(t),f(void 0),g(-1),c(!1)}},e.ariaLabel)))}):null]})}),r.jsx("div",{css:kO(!!p?.items),children:p?.items?r.jsxs(r.Fragment,{children:[r.jsxs("div",{css:SO,children:[r.jsxs("button",{type:"button",onClick:()=>{f(void 0),g(-1),b.current[m]?.focus()},"aria-label":u.goBackLabel,css:mO(e),ref:v,children:[r.jsx(If,{rotate:"90",color:"var(--chakra-colors-neutral-700)"}),p?.label]}),r.jsxs("button",{type:"button",onClick:()=>{f(void 0),g(-1),c(!1)},"aria-label":u.closeMenuLabel,css:mO(e),children:[u.closeButtonText,r.jsx(zf,{height:"1rem",width:"1rem"})]})]}),r.jsx("div",{css:xO,children:p?.items?.map((e=>r.jsx(y,{to:e.link,href:e.link,css:wO(),onClick:()=>{f(void 0),g(-1),c(!1)},children:e.label},e.label)))})]}):null})]})},MO=1023,EO=i.css`
3291
3302
  width: ${k(1600)};
3292
3303
  height: 100%;
3293
3304
  z-index: 100;
@@ -3297,7 +3308,7 @@ function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3297
3308
  display: flex;
3298
3309
  flex-direction: column;
3299
3310
  justify-content: space-between;
3300
- `,EO=i.css`
3311
+ `,TO=i.css`
3301
3312
  width: ${k(1600)};
3302
3313
  height: ${k(1600)};
3303
3314
  background-color: ${w("neutral",200)};
@@ -3388,7 +3399,7 @@ function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3388
3399
  }
3389
3400
  }
3390
3401
  }
3391
- `,TO=i.css`
3402
+ `,OO=i.css`
3392
3403
  display: flex;
3393
3404
  justify-content: center;
3394
3405
  align-items: center;
@@ -3401,7 +3412,7 @@ function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3401
3412
  fill: ${w("neutral",600)};
3402
3413
  }
3403
3414
  }
3404
- `,OO=i.css`
3415
+ `,LO=i.css`
3405
3416
  width: ${k(1600)};
3406
3417
  height: ${k(1600)};
3407
3418
  background-color: ${w("neutral",200)};
@@ -3439,7 +3450,7 @@ function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3439
3450
  text-align: center;
3440
3451
  color: ${w("neutral",600)};
3441
3452
  }
3442
- `,LO=i.css`
3453
+ `,AO=i.css`
3443
3454
  width: 20rem;
3444
3455
  height: 100%;
3445
3456
  z-index: 100;
@@ -3449,7 +3460,7 @@ function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3449
3460
  overflow-x: hidden;
3450
3461
  border-right: ${j(100)} solid
3451
3462
  ${w("neutral",300)};
3452
- `,AO=e=>i.css`
3463
+ `,RO=e=>i.css`
3453
3464
  width: 100%;
3454
3465
  display: flex;
3455
3466
  align-items: center;
@@ -3458,7 +3469,7 @@ function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3458
3469
  ${"view"===e&&`\n border: ${j(100)} solid ${w("neutral",400)};\n background-color: ${w("neutral",200)};\n border-radius: ${$(300)};\n padding: ${k(100)};\n `}
3459
3470
 
3460
3471
  ${"transparent"===e&&`\n border: none;\n background-color: transparent;\n border-radius: ${$(300)};\n padding: 0 ${k(400)};\n\n .chakra-tabs__list {\n gap: ${k(800)};\n }\n `}
3461
- `,RO=i.css`
3472
+ `,NO=i.css`
3462
3473
  width: 99%;
3463
3474
  height: ${k(1e3)};
3464
3475
  padding: ${k(200)} ${k(400)};
@@ -3474,7 +3485,7 @@ function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3474
3485
  &:focus-visible {
3475
3486
  box-shadow: none;
3476
3487
  }
3477
- `,NO=i.css`
3488
+ `,DO=i.css`
3478
3489
  background-color: ${w("neutral",200)};
3479
3490
  color: ${w("neutral",700)};
3480
3491
 
@@ -3531,11 +3542,11 @@ function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3531
3542
  opacity: 1;
3532
3543
  }
3533
3544
  }
3534
- `,DO=i.css`
3545
+ `,IO=i.css`
3535
3546
  width: ${k(100)};
3536
3547
  height: ${k(600)};
3537
3548
  background-color: ${w("neutral",400)};
3538
- `,IO=i.css`
3549
+ `,PO=i.css`
3539
3550
  height: ${k(800)};
3540
3551
  border-radius: ${$(200)};
3541
3552
  background-color: ${w("neutral",200)};
@@ -3610,7 +3621,7 @@ function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3610
3621
  opacity: 1;
3611
3622
  }
3612
3623
  }
3613
- `,PO=i.css`
3624
+ `,zO=i.css`
3614
3625
  background-color: transparent;
3615
3626
  color: ${w("neutral",600)};
3616
3627
  width: auto;
@@ -3687,7 +3698,7 @@ function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3687
3698
  }
3688
3699
  }
3689
3700
  }
3690
- `,zO=(e,t)=>Math.max(0,e.findIndex((e=>e.value===t))),VO=e=>1===e?"none":2===e?"left":"right",BO=({text:e,query:n})=>{if(!n)return e;const r=new RegExp(`(${n})`,"ig"),o=e.split(r);return t.jsx(t.Fragment,{children:o.map((e=>r.test(e)?t.jsx("strong",{children:e},e):t.jsx("span",{children:e},e)))})},HO=({items:r,query:o,onSelect:i,highlightedIndex:s})=>{const a=n.useRef(null);return n.useEffect((()=>{if(!a.current)return;const e=a.current.children[s];e&&e.scrollIntoView({block:"nearest"})}),[s]),t.jsx(e.Box,{padding:"0.5rem",children:r.map(((n,r)=>t.jsx(e.Box,{ref:a,padding:"0.375rem 0.5rem",borderRadius:"md",cursor:"pointer",bg:r===s?"gray.100":void 0,_hover:{background:"gray.50"},onClick:()=>i(n.id||n.label),children:t.jsx(BO,{text:n.label,query:o})},n.id)))})},_O={small:k(400),medium:k(600),large:k(1e3),default:k(400)};function FO(e,t,n,r){const o=function(e,t){return null!=t&&""!==t?u(t):e&&_O[e]?_O[e]:_O.default}(e,t),s=n?w("neutral",200):w("primary",300),a=r??s,l=r&&n?"opacity: 0.7;":"",c=w("neutral",n?400:800);return i.css`
3701
+ `,VO=(e,t)=>Math.max(0,e.findIndex((e=>e.value===t))),BO=e=>1===e?"none":2===e?"left":"right",HO=({text:e,query:n})=>{if(!n)return e;const r=new RegExp(`(${n})`,"ig"),o=e.split(r);return t.jsx(t.Fragment,{children:o.map((e=>r.test(e)?t.jsx("strong",{children:e},e):t.jsx("span",{children:e},e)))})},_O=({items:r,query:o,onSelect:i,highlightedIndex:s})=>{const a=n.useRef(null);return n.useEffect((()=>{if(!a.current)return;const e=a.current.children[s];e&&e.scrollIntoView({block:"nearest"})}),[s]),t.jsx(e.Box,{padding:"0.5rem",children:r.map(((n,r)=>t.jsx(e.Box,{ref:a,padding:"0.375rem 0.5rem",borderRadius:"md",cursor:"pointer",bg:r===s?"gray.100":void 0,_hover:{background:"gray.50"},onClick:()=>i(n.id||n.label),children:t.jsx(HO,{text:n.label,query:o})},n.id)))})},FO={small:k(400),medium:k(600),large:k(1e3),default:k(400)};function qO(e,t,n,r){const o=function(e,t){return null!=t&&""!==t?u(t):e&&FO[e]?FO[e]:FO.default}(e,t),s=n?w("neutral",200):w("primary",300),a=r??s,l=r&&n?"opacity: 0.7;":"",c=w("neutral",n?400:800);return i.css`
3691
3702
  height: ${o};
3692
3703
  width: ${o};
3693
3704
  border-radius: 50%;
@@ -3722,17 +3733,17 @@ function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3722
3733
  background-color: ${w("primary",500)};
3723
3734
  }
3724
3735
  }
3725
- `}const qO=e=>i.css`
3736
+ `}const WO=e=>i.css`
3726
3737
  width: ${e||k(400)};
3727
3738
  position: absolute;
3728
3739
  top: -${k(200)};
3729
3740
  left: 0.9375rem;
3730
- `,WO=i.css`
3741
+ `,UO=i.css`
3731
3742
  font-size: ${C(200)};
3732
3743
  line-height: ${S(400)};
3733
3744
  font-weight: 700;
3734
3745
  color: ${w("primary",800)};
3735
- `,UO=n.forwardRef((({name:t,ariaLabel:n,size:o="medium",customSize:s,src:a,srcSet:l,onClick:c,notificationCount:d,disabled:u=!0,customBackgroundColor:h="",labels:p},f)=>{const m=Mf("Avatar",p),g=()=>{u||c?.()},v=(()=>{let e="";return d&&d>0&&(e=`${d>99?"99+":d}`),e})();let b="1rem";d&&d>99?b="1.75rem":d&&d>9&&(b="1.375rem");const y=!!a||!!l,x=c&&!u;return r.jsxs(e.Avatar.Root,{"aria-label":n||t,ref:f,css:FO(o,s,u,h),onClick:g,onKeyDown:e=>{u||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),g())},role:x?"button":"img",tabIndex:x?0:void 0,"aria-disabled":x?u:void 0,children:[y&&r.jsx(e.Avatar.Image,{src:a,srcSet:l,alt:n||t||"Avatar image"}),!y&&t&&r.jsx(e.Avatar.Fallback,{name:t,css:WO}),!y&&!t&&r.jsx(cm,{size:"100%",style:{padding:"15%",color:u?w("neutral",400):void 0}}),v.length>0?r.jsx("div",{css:qO(b),children:r.jsx("div",{css:i.css`
3746
+ `,KO=n.forwardRef((({name:t,ariaLabel:n,size:o="medium",customSize:s,src:a,srcSet:l,onClick:c,notificationCount:d,disabled:u=!0,customBackgroundColor:h="",labels:p},f)=>{const m=Mf("Avatar",p),g=()=>{u||c?.()},v=(()=>{let e="";return d&&d>0&&(e=`${d>99?"99+":d}`),e})();let b="1rem";d&&d>99?b="1.75rem":d&&d>9&&(b="1.375rem");const y=!!a||!!l,x=c&&!u;return r.jsxs(e.Avatar.Root,{"aria-label":n||t,ref:f,css:qO(o,s,u,h),onClick:g,onKeyDown:e=>{u||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),g())},role:x?"button":"img",tabIndex:x?0:void 0,"aria-disabled":x?u:void 0,children:[y&&r.jsx(e.Avatar.Image,{src:a,srcSet:l,alt:n||t||"Avatar image"}),!y&&t&&r.jsx(e.Avatar.Fallback,{name:t,css:UO}),!y&&!t&&r.jsx(cm,{size:"100%",style:{padding:"15%",color:u?w("neutral",400):void 0}}),v.length>0?r.jsx("div",{css:WO(b),children:r.jsx("div",{css:i.css`
3736
3747
  height: ${k(400)};
3737
3748
  width: auto;
3738
3749
  background-color: ${w("error",500)};
@@ -3745,16 +3756,16 @@ function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3745
3756
  line-height: ${S(400)};
3746
3757
  font-weight: 700;
3747
3758
  color: ${w("error",100)};
3748
- `,children:r.jsx("p",{"aria-label":m.unreadMessagesLabel(d||0),children:v})})}):null]})})),KO=i.css`
3759
+ `,children:r.jsx("p",{"aria-label":m.unreadMessagesLabel(d||0),children:v})})}):null]})})),GO=i.css`
3749
3760
  display: flex;
3750
3761
  justify-content: flex-start;
3751
3762
  align-items: center;
3752
3763
  gap: ${k(200)};
3753
- `,GO=e=>i.css`
3764
+ `,ZO=e=>i.css`
3754
3765
  width: ${e||k(400)};
3755
3766
  position: relative;
3756
3767
  display: flex;
3757
- `,ZO=i.css`
3768
+ `,JO=i.css`
3758
3769
  height: ${k(100)};
3759
3770
  width: ${k(100)};
3760
3771
  background-color: ${w("error",500)};
@@ -3762,7 +3773,7 @@ function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3762
3773
  position: absolute;
3763
3774
  top: 0rem;
3764
3775
  right: 0rem;
3765
- `,JO=i.css`
3776
+ `,XO=i.css`
3766
3777
  height: 0.625rem;
3767
3778
  background-color: ${w("error",500)};
3768
3779
  padding: 0 0.1875rem 0.0625rem 0.1875rem;
@@ -3773,12 +3784,12 @@ function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3773
3784
  position: absolute;
3774
3785
  top: -${k(50)};
3775
3786
  left: 0.5625rem;
3776
- `,XO=i.css`
3787
+ `,YO=i.css`
3777
3788
  font-size: ${C(200)};
3778
3789
  line-height: ${S(400)};
3779
3790
  font-weight: 700;
3780
3791
  color: ${w("error",100)};
3781
- `,YO=i.css`
3792
+ `,QO=i.css`
3782
3793
  height: ${k(400)};
3783
3794
  min-width: ${k(400)};
3784
3795
  background-color: ${w("error",500)};
@@ -3787,44 +3798,44 @@ function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3787
3798
  justify-content: center;
3788
3799
  align-items: center;
3789
3800
  padding: 0rem ${k(100)} 0.0625rem ${k(100)};
3790
- `,QO=i.css`
3801
+ `,eL=i.css`
3791
3802
  font-size: ${C(400)};
3792
3803
  line-height: ${S(600)};
3793
3804
  font-weight: 700;
3794
3805
  color: ${w("error",100)};
3795
- `,eL=e=>{let t="",n="",r="";return"success"===e?(t=w("success",100),n=w("success",500),r=w("success",300)):"warning"===e?(t=w("warning",100),n=w("warning",500),r=w("warning",300)):"error"===e?(t=w("error",100),n=w("error",500),r=w("error",300)):"information"===e?(t=w("secondary",100),n=w("secondary",500),r=w("secondary",200)):"general-grey"===e?(t=w("neutral",200),n=w("neutral",700),r=w("neutral",300)):(t=w("neutral",100),n=w("neutral",700),r=w("neutral",300)),i.css`
3806
+ `,tL=e=>{let t="",n="",r="";return"success"===e?(t=w("success",100),n=w("success",500),r=w("success",300)):"warning"===e?(t=w("warning",100),n=w("warning",500),r=w("warning",300)):"error"===e?(t=w("error",100),n=w("error",500),r=w("error",300)):"information"===e?(t=w("secondary",100),n=w("secondary",500),r=w("secondary",200)):"general-grey"===e?(t=w("neutral",200),n=w("neutral",700),r=w("neutral",300)):(t=w("neutral",100),n=w("neutral",700),r=w("neutral",300)),i.css`
3796
3807
  display: flex;
3797
3808
  color: ${n};
3798
3809
  align-items: center;
3799
3810
  background-color: ${t};
3800
3811
  border-bottom: ${j(100)} solid ${r};
3801
3812
  border-radius: 0;
3802
- `},tL=l.forwardRef((({title:t,children:n,icon:o,variant:i,onClose:s,labels:a},c)=>{const d=Mf("AlertBanner",a),[u,h]=l.useState(!0),p="success"===i?r.jsx(_f,{}):"warning"===i?r.jsx(Ff,{}):r.jsx(Df,{});return u?r.jsxs(e.Alert.Root,{css:eL(i),children:[r.jsx(e.Alert.Indicator,{children:o||p}),n?r.jsx(e.Alert.Content,{children:r.jsxs("div",{style:{display:"flex",gap:"0.75rem",alignItems:"center"},children:[r.jsx(e.Alert.Title,{children:t}),r.jsx(e.Alert.Description,{children:n})]})}):r.jsx(e.Alert.Title,{flex:"1",children:t}),r.jsx(e.CloseButton,{"aria-label":d.closeAlertLabel,pos:"absolute",insetEnd:"2",_hover:{bg:"gray.200"},onClick:()=>{h(!1),s?.()}})]}):null})),nL=i.css`
3813
+ `},nL=l.forwardRef((({title:t,children:n,icon:o,variant:i,onClose:s,labels:a},c)=>{const d=Mf("AlertBanner",a),[u,h]=l.useState(!0),p="success"===i?r.jsx(_f,{}):"warning"===i?r.jsx(Ff,{}):r.jsx(Df,{});return u?r.jsxs(e.Alert.Root,{css:tL(i),children:[r.jsx(e.Alert.Indicator,{children:o||p}),n?r.jsx(e.Alert.Content,{children:r.jsxs("div",{style:{display:"flex",gap:"0.75rem",alignItems:"center"},children:[r.jsx(e.Alert.Title,{children:t}),r.jsx(e.Alert.Description,{children:n})]})}):r.jsx(e.Alert.Title,{flex:"1",children:t}),r.jsx(e.CloseButton,{"aria-label":d.closeAlertLabel,pos:"absolute",insetEnd:"2",_hover:{bg:"gray.200"},onClick:()=>{h(!1),s?.()}})]}):null})),rL=i.css`
3803
3814
  height: ${k(200)};
3804
3815
  width: 100%;
3805
3816
  background-color: ${w("neutral",300)};
3806
3817
  display: flex;
3807
3818
  align-items: center;
3808
3819
  justify-content: flex-start;
3809
- `,rL=e=>i.css`
3820
+ `,oL=e=>i.css`
3810
3821
  height: 100%;
3811
3822
  width: ${e}%;
3812
3823
  background-color: ${w("primary",500)};
3813
3824
  transition: width 0.5s ease-in-out;
3814
- `,oL=i.css`
3825
+ `,iL=i.css`
3815
3826
  width: 100%;
3816
3827
  display: flex;
3817
3828
  align-items: center;
3818
3829
  justify-content: space-between;
3819
3830
  position: relative;
3820
- `,iL=i.css`
3831
+ `,sL=i.css`
3821
3832
  height: 3.75rem;
3822
3833
  width: ${k(2e3)};
3823
3834
  display: flex;
3824
3835
  flex-direction: column;
3825
3836
  align-items: center;
3826
3837
  justify-content: space-between;
3827
- `,sL=(e,t)=>i.css`
3838
+ `,aL=(e,t)=>i.css`
3828
3839
  height: ${k(800)};
3829
3840
  width: ${k(800)};
3830
3841
  display: flex;
@@ -3860,12 +3871,12 @@ function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3860
3871
  }
3861
3872
 
3862
3873
  ${t?`\n background-color: ${w("neutral",300)};\n \n &:hover {\n background-color: ${w("neutral",300)};\n box-shadow: none;\n }\n `:""}
3863
- `,aL=e=>i.css`
3874
+ `,lL=e=>i.css`
3864
3875
  color: ${w("neutral",e?800:600)};
3865
3876
  font-size: ${C(300)};
3866
3877
  line-height: ${S(500)};
3867
3878
  font-weight: 400;
3868
- `,lL=i.css`
3879
+ `,cL=i.css`
3869
3880
  height: ${j(100)};
3870
3881
  width: 100%;
3871
3882
  padding: 0 1.875rem;
@@ -3873,25 +3884,25 @@ function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3873
3884
  top: ${k(400)};
3874
3885
  left: 0;
3875
3886
  z-index: -1;
3876
- `,cL=i.css`
3887
+ `,dL=i.css`
3877
3888
  height: ${j(100)};
3878
3889
  width: 100%;
3879
3890
  background-color: ${w("neutral",400)};
3880
- `,dL=i.css`
3891
+ `,uL=i.css`
3881
3892
  font-size: ${C(500)};
3882
3893
  line-height: ${S(700)};
3883
3894
  font-weight: 400;
3884
3895
  color: ${w("neutral",800)};
3885
- `,uL=i.css`
3896
+ `,hL=i.css`
3886
3897
  font-size: ${C(400)};
3887
3898
  line-height: ${S(600)};
3888
3899
  font-weight: 400;
3889
3900
  color: ${w("neutral",700)};
3890
- `,hL=i.css`
3891
- padding: 0.375rem;
3892
3901
  `,pL=i.css`
3893
3902
  padding: 0.375rem;
3894
- `,fL={pauseOnPageIdle:!0,offsets:"1.5rem"},mL={"top-start":e.createToaster({placement:"top-start",...fL}),top:e.createToaster({placement:"top",...fL}),"top-end":e.createToaster({placement:"top-end",...fL}),"bottom-start":e.createToaster({placement:"bottom-start",...fL}),bottom:e.createToaster({placement:"bottom",...fL}),"bottom-end":e.createToaster({placement:"bottom-end",...fL})};exports.AlertBanner=tL,exports.AnalysisWidget=({children:t,header:o,footer:i,expanded:s=!0,collapsible:a=!0,actions:l,showFooterOnCollapsed:c=!1,labels:d})=>{Mf("AnalysisWidget",d);const u="analysis-widget-item",[h,p]=n.useState(s),f=`analysis-widget-header-${u}`;return r.jsx(e.Box,{as:"section","aria-labelledby":f,css:Qw,children:r.jsxs(e.Accordion.Root,{multiple:!0,value:a?void 0:[u],defaultValue:s?[u]:[],children:[r.jsxs(e.Accordion.Item,{css:tC,value:u,children:[o&&r.jsx(e.Accordion.ItemTrigger,{id:f,"aria-expanded":h,css:eC,pointerEvents:a?"auto":"none",onClick:a?()=>{p(!h)}:void 0,children:r.jsxs(e.Flex,{gap:3,flex:"1",overflow:"hidden",alignItems:"top",justifyContent:"space-between",children:[o,l&&l.map((e=>r.jsx(Ef,{variant:"secondary",size:"small",label:e.label,onClick:t=>{e.onClick(),t.preventDefault(),t.stopPropagation()},leftIcon:e?.icon},e.label))),a&&r.jsx(e.Accordion.ItemIndicator,{height:"1rem",marginTop:"0.5rem",display:"flex",children:r.jsx(If,{"aria-hidden":"true",color:"var(--chakra-colors-neutral-700)",height:"1rem",width:"1rem"})})]})}),r.jsxs("div",{className:h?"item-content-open":"item-content-closed","aria-hidden":!h,children:[t,!c&&i&&r.jsx(e.Box,{css:nC,children:i})]})]}),c&&i&&r.jsx(e.Box,{css:nC,children:i})]})})},exports.Avatar=UO,exports.Badge=({hasNotification:e,notificationCount:t,label:o,labels:i})=>{const s=Mf("Badge",i),[a,l]=n.useState(!1);n.useEffect((()=>{const e=()=>{window.innerWidth<1024?l(!0):l(!1)};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]);const c=(()=>{let e="";return t&&t>0&&(e=`${t>99?"99+":t}`),e})();let d="1rem";return t&&t>99?d="1.75rem":t&&t>9&&(d="1.375rem"),a?r.jsxs("div",{css:KO,role:"status","aria-live":"polite",children:[r.jsxs("div",{css:GO(),children:[r.jsx(Uf,{color:"currentColor",height:"1rem",width:"1rem"}),!e||t||o?null:r.jsx("div",{css:ZO,"aria-hidden":!0})]}),o?r.jsx("p",{children:o}):null,c.length>0?r.jsx("div",{css:YO,children:r.jsx("p",{css:QO,"aria-label":s.unreadMessagesLabel(t||0),children:c})}):null]}):r.jsxs("div",{css:KO,role:"status","aria-live":"polite",children:[o?r.jsx("p",{children:o}):null,r.jsxs("div",{css:GO(d),children:[c.length>0?r.jsx("div",{css:JO,children:r.jsx("p",{css:XO,"aria-label":s.unreadMessagesLabel(t||0),children:c})}):null,e&&!t?r.jsx("div",{css:ZO,"aria-hidden":!0}):null,r.jsx(Uf,{color:"currentColor",height:"1rem",width:"1rem"})]})]})},exports.BaseMap=({title:e,caption:t,additionalSettings:o,options:s,onOptionSelected:a,maxHeight:l="25rem",maxWidth:c="16.25rem",labels:d})=>{const u=Mf("BaseMap",d),h=n.useRef(null),p=n.useRef(null);return n.useEffect((()=>{const e=h.current,t=p.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)}),[]),r.jsx("div",{ref:p,css:lb(l,c),children:r.jsxs("div",{className:"ds-base-map-scroll-content",children:[r.jsxs("div",{css:cb,children:[r.jsx("h2",{ref:h,className:"ds-base-map-header-title",tabIndex:-1,children:e}),r.jsx("p",{className:"ds-base-map-header-caption",children:t})]}),r.jsxs("div",{css:db,children:[o?r.jsx("div",{css:ub,children:o.map((e=>r.jsxs("div",{children:[r.jsx(kg,{css:{},checked:e.checked,onCheckedChange:({checked:t})=>e.onCheckedChange({checked:Boolean(t)}),children:e.label}),e.checked&&e.children?r.jsx("div",{css:hb,children:e.children}):null]},e.label)))}):null,s?r.jsx("div",{css:pb,children:s.map((e=>{return r.jsxs("div",{css:fb(e.active),role:"button","aria-label":`${e.label}${e.caption?`, ${e.caption}`:""}`,onClick:()=>a?.(e),tabIndex:0,onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),a?.(e))},children:[r.jsx("div",{css:(t=e.imageUrl,i.css`
3903
+ `,fL=i.css`
3904
+ padding: 0.375rem;
3905
+ `,mL={pauseOnPageIdle:!0,offsets:"1.5rem"},gL={"top-start":e.createToaster({placement:"top-start",...mL}),top:e.createToaster({placement:"top",...mL}),"top-end":e.createToaster({placement:"top-end",...mL}),"bottom-start":e.createToaster({placement:"bottom-start",...mL}),bottom:e.createToaster({placement:"bottom",...mL}),"bottom-end":e.createToaster({placement:"bottom-end",...mL})};exports.AlertBanner=nL,exports.AnalysisWidget=({children:t,header:o,footer:i,expanded:s=!0,collapsible:a=!0,actions:l,showFooterOnCollapsed:c=!1,labels:d})=>{Mf("AnalysisWidget",d);const u="analysis-widget-item",[h,p]=n.useState(s),f=`analysis-widget-header-${u}`;return r.jsx(e.Box,{as:"section","aria-labelledby":f,css:eC,children:r.jsxs(e.Accordion.Root,{multiple:!0,value:a?void 0:[u],defaultValue:s?[u]:[],children:[r.jsxs(e.Accordion.Item,{css:nC,value:u,children:[o&&r.jsx(e.Accordion.ItemTrigger,{id:f,"aria-expanded":h,css:tC,pointerEvents:a?"auto":"none",onClick:a?()=>{p(!h)}:void 0,children:r.jsxs(e.Flex,{gap:3,flex:"1",overflow:"hidden",alignItems:"top",justifyContent:"space-between",children:[o,l&&l.map((e=>r.jsx(Ef,{variant:"secondary",size:"small",label:e.label,onClick:t=>{e.onClick(),t.preventDefault(),t.stopPropagation()},leftIcon:e?.icon},e.label))),a&&r.jsx(e.Accordion.ItemIndicator,{height:"1rem",marginTop:"0.5rem",display:"flex",children:r.jsx(If,{"aria-hidden":"true",color:"var(--chakra-colors-neutral-700)",height:"1rem",width:"1rem"})})]})}),r.jsxs("div",{className:h?"item-content-open":"item-content-closed","aria-hidden":!h,children:[t,!c&&i&&r.jsx(e.Box,{css:rC,children:i})]})]}),c&&i&&r.jsx(e.Box,{css:rC,children:i})]})})},exports.Avatar=KO,exports.Badge=({hasNotification:e,notificationCount:t,label:o,labels:i})=>{const s=Mf("Badge",i),[a,l]=n.useState(!1);n.useEffect((()=>{const e=()=>{window.innerWidth<1024?l(!0):l(!1)};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]);const c=(()=>{let e="";return t&&t>0&&(e=`${t>99?"99+":t}`),e})();let d="1rem";return t&&t>99?d="1.75rem":t&&t>9&&(d="1.375rem"),a?r.jsxs("div",{css:GO,role:"status","aria-live":"polite",children:[r.jsxs("div",{css:ZO(),children:[r.jsx(Uf,{color:"currentColor",height:"1rem",width:"1rem"}),!e||t||o?null:r.jsx("div",{css:JO,"aria-hidden":!0})]}),o?r.jsx("p",{children:o}):null,c.length>0?r.jsx("div",{css:QO,children:r.jsx("p",{css:eL,"aria-label":s.unreadMessagesLabel(t||0),children:c})}):null]}):r.jsxs("div",{css:GO,role:"status","aria-live":"polite",children:[o?r.jsx("p",{children:o}):null,r.jsxs("div",{css:ZO(d),children:[c.length>0?r.jsx("div",{css:XO,children:r.jsx("p",{css:YO,"aria-label":s.unreadMessagesLabel(t||0),children:c})}):null,e&&!t?r.jsx("div",{css:JO,"aria-hidden":!0}):null,r.jsx(Uf,{color:"currentColor",height:"1rem",width:"1rem"})]})]})},exports.BaseMap=({title:e,caption:t,additionalSettings:o,options:s,onOptionSelected:a,maxHeight:l="25rem",maxWidth:c="16.25rem",labels:d})=>{const u=Mf("BaseMap",d),h=n.useRef(null),p=n.useRef(null);return n.useEffect((()=>{const e=h.current,t=p.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)}),[]),r.jsx("div",{ref:p,css:lb(l,c),children:r.jsxs("div",{className:"ds-base-map-scroll-content",children:[r.jsxs("div",{css:cb,children:[r.jsx("h2",{ref:h,className:"ds-base-map-header-title",tabIndex:-1,children:e}),r.jsx("p",{className:"ds-base-map-header-caption",children:t})]}),r.jsxs("div",{css:db,children:[o?r.jsx("div",{css:ub,children:o.map((e=>r.jsxs("div",{children:[r.jsx(kg,{css:{},checked:e.checked,onCheckedChange:({checked:t})=>e.onCheckedChange({checked:Boolean(t)}),children:e.label}),e.checked&&e.children?r.jsx("div",{css:hb,children:e.children}):null]},e.label)))}):null,s?r.jsx("div",{css:pb,children:s.map((e=>{return r.jsxs("div",{css:fb(e.active),role:"button","aria-label":`${e.label}${e.caption?`, ${e.caption}`:""}`,onClick:()=>a?.(e),tabIndex:0,onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),a?.(e))},children:[r.jsx("div",{css:(t=e.imageUrl,i.css`
3895
3906
  height: ${k(800)};
3896
3907
  width: ${k(800)};
3897
3908
  border: ${j(100)} solid ${w("neutral",300)};
@@ -3899,7 +3910,7 @@ function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3899
3910
  background-image: url(${t});
3900
3911
  background-size: cover;
3901
3912
  background-position: center;
3902
- `)}),r.jsxs("div",{css:mb,children:[r.jsxs("div",{className:"ds-base-map-title-container",children:[r.jsx("p",{className:"ds-base-map-title",children:e.label}),e.active?r.jsx(Nv,{label:u.activeLabel,variant:"warning",size:"small",icon:r.jsx(Rf,{})}):null]}),r.jsx("p",{className:"ds-base-map-caption",children:e.caption}),e.active&&e.children?r.jsx("div",{className:"ds-base-map-children",children:e.children}):null]})]},e.label);var t}))}):null]})]})})},exports.Breadcrumb=({links:t,separator:o,maxItems:i=99,linkRouter:s,size:a="default"})=>{const[l,c]=n.useState(t.length>i);n.useEffect((()=>{c(t.length>i)}),[t.length]);const d=s;return r.jsx(e.Breadcrumb.Root,{children:r.jsx(e.Breadcrumb.List,{gap:"small"===a?"0.375rem":"0.625rem",children:l?r.jsxs(r.Fragment,{children:[r.jsx(e.Breadcrumb.Item,{css:WT(a),children:r.jsxs(d,{to:t[0].link,href:t[0].link,children:[t[0].icon,t[0].label]})}),r.jsx(e.Breadcrumb.Separator,{css:UT(a),children:o||r.jsx(If,{rotate:"270"})}),r.jsx("li",{className:"chakra-breadcrumb__item",children:r.jsx("button",{css:KT,type:"button",onClick:()=>c(!1),children:"..."})}),r.jsx(e.Breadcrumb.Separator,{css:UT(a),children:o||r.jsx(If,{rotate:"270"})}),r.jsx(e.Breadcrumb.Item,{css:WT(a),children:r.jsxs("p",{"aria-current":"page","aria-label":t[t.length-1].label,children:[t[t.length-1].icon,t[t.length-1].label]})})]}):t.map(((i,s)=>i?.label?r.jsxs(n.Fragment,{children:[r.jsx(e.Breadcrumb.Item,{css:WT(a),children:s<t.length-1?r.jsxs(d,{to:i.link,href:i.link,children:[i.icon,i.label]}):r.jsxs("p",{"aria-current":"page","aria-label":i.label,children:[i.label&&i.icon?i.icon:"",i.label]})}),s<t.length-1?r.jsx(e.Breadcrumb.Separator,{css:UT(a),children:o||r.jsx(If,{rotate:"270"})}):null]},i.label):null))})})},exports.Button=Ef,exports.Checkbox=kg,exports.CheckboxList=({label:t,caption:o,checkboxes:s,defaultValues:a,onCheckedChange:l,errorMessage:c,horizontal:d,required:u,hideCheckedCounter:h=!1,hideExpandToggle:p=!1,labels:f})=>{const m=Mf("CheckboxList",f),g=Array.isArray(a)?a:[],v=n.useMemo((()=>new Set(g)),[g]),[b,y]=n.useState((()=>s.filter((e=>e.name)).reduce(((e,t)=>{const n=t.name;return e[n]="boolean"==typeof t.checked?t.checked:v.has(n),e}),{}))),[x,w]=n.useState(!0);n.useEffect((()=>{y((e=>{const t=s.filter((e=>e.name)).reduce(((t,n)=>{const r=n.name;return t[r]="boolean"==typeof n.checked?n.checked:e[r]??v.has(r),t}),{});return Object.keys(e).length===Object.keys(t).length&&Object.entries(t).every((([t,n])=>e[t]===n))?e:t}))}),[s,v]);const C="string"!=typeof t,k=s.filter((e=>e.name)).reduce(((e,t)=>{const n=t.name;return e[n]="boolean"==typeof t.checked?t.checked:!!b[n],e}),{}),S=s.length>0&&s.every((e=>e.name&&k[e.name])),$=s.some((e=>e.name&&k[e.name]))&&!S,j=s.length,M=`${s.filter((e=>e?.name&&k[e.name])).length} / ${j}`,E=o?`${o}.`:"",T=u?m.requiredLabel:m.optionalLabel,O=c?`${m.errorPrefix} ${c}.`:"",L=`${C?t.label:t}. ${E} ${T} ${O} `;return r.jsxs(e.Group,{css:Yg,"aria-label":L,children:[c?r.jsx("div",{css:nv}):null,r.jsxs("div",{css:(A=!!c,i.css`
3913
+ `)}),r.jsxs("div",{css:mb,children:[r.jsxs("div",{className:"ds-base-map-title-container",children:[r.jsx("p",{className:"ds-base-map-title",children:e.label}),e.active?r.jsx(Nv,{label:u.activeLabel,variant:"warning",size:"small",icon:r.jsx(Rf,{})}):null]}),r.jsx("p",{className:"ds-base-map-caption",children:e.caption}),e.active&&e.children?r.jsx("div",{className:"ds-base-map-children",children:e.children}):null]})]},e.label);var t}))}):null]})]})})},exports.Breadcrumb=({links:t,separator:o,maxItems:i=99,linkRouter:s,size:a="default"})=>{const[l,c]=n.useState(t.length>i);n.useEffect((()=>{c(t.length>i)}),[t.length]);const d=s;return r.jsx(e.Breadcrumb.Root,{children:r.jsx(e.Breadcrumb.List,{gap:"small"===a?"0.375rem":"0.625rem",children:l?r.jsxs(r.Fragment,{children:[r.jsx(e.Breadcrumb.Item,{css:UT(a),children:r.jsxs(d,{to:t[0].link,href:t[0].link,children:[t[0].icon,t[0].label]})}),r.jsx(e.Breadcrumb.Separator,{css:KT(a),children:o||r.jsx(If,{rotate:"270"})}),r.jsx("li",{className:"chakra-breadcrumb__item",children:r.jsx("button",{css:GT,type:"button",onClick:()=>c(!1),children:"..."})}),r.jsx(e.Breadcrumb.Separator,{css:KT(a),children:o||r.jsx(If,{rotate:"270"})}),r.jsx(e.Breadcrumb.Item,{css:UT(a),children:r.jsxs("p",{"aria-current":"page","aria-label":t[t.length-1].label,children:[t[t.length-1].icon,t[t.length-1].label]})})]}):t.map(((i,s)=>i?.label?r.jsxs(n.Fragment,{children:[r.jsx(e.Breadcrumb.Item,{css:UT(a),children:s<t.length-1?r.jsxs(d,{to:i.link,href:i.link,children:[i.icon,i.label]}):r.jsxs("p",{"aria-current":"page","aria-label":i.label,children:[i.label&&i.icon?i.icon:"",i.label]})}),s<t.length-1?r.jsx(e.Breadcrumb.Separator,{css:KT(a),children:o||r.jsx(If,{rotate:"270"})}):null]},i.label):null))})})},exports.Button=Ef,exports.Checkbox=kg,exports.CheckboxList=({label:t,caption:o,checkboxes:s,defaultValues:a,onCheckedChange:l,errorMessage:c,horizontal:d,required:u,hideCheckedCounter:h=!1,hideExpandToggle:p=!1,labels:f})=>{const m=Mf("CheckboxList",f),g=Array.isArray(a)?a:[],v=n.useMemo((()=>new Set(g)),[g]),[b,y]=n.useState((()=>s.filter((e=>e.name)).reduce(((e,t)=>{const n=t.name;return e[n]="boolean"==typeof t.checked?t.checked:v.has(n),e}),{}))),[x,w]=n.useState(!0);n.useEffect((()=>{y((e=>{const t=s.filter((e=>e.name)).reduce(((t,n)=>{const r=n.name;return t[r]="boolean"==typeof n.checked?n.checked:e[r]??v.has(r),t}),{});return Object.keys(e).length===Object.keys(t).length&&Object.entries(t).every((([t,n])=>e[t]===n))?e:t}))}),[s,v]);const C="string"!=typeof t,k=s.filter((e=>e.name)).reduce(((e,t)=>{const n=t.name;return e[n]="boolean"==typeof t.checked?t.checked:!!b[n],e}),{}),S=s.length>0&&s.every((e=>e.name&&k[e.name])),$=s.some((e=>e.name&&k[e.name]))&&!S,j=s.length,M=`${s.filter((e=>e?.name&&k[e.name])).length} / ${j}`,E=o?`${o}.`:"",T=u?m.requiredLabel:m.optionalLabel,O=c?`${m.errorPrefix} ${c}.`:"",L=`${C?t.label:t}. ${E} ${T} ${O} `;return r.jsxs(e.Group,{css:Yg,"aria-label":L,children:[c?r.jsx("div",{css:nv}):null,r.jsxs("div",{css:(A=!!c,i.css`
3903
3914
  margin-left: ${A?"1.1875rem":"0"};
3904
3915
  width: 100%;
3905
3916
  `),children:[r.jsx("div",{css:Qg,children:"string"==typeof t?r.jsxs(r.Fragment,{children:[u&&r.jsx("span",{id:"required-symbol","aria-label":m.requiredSymbolLabel,children:"*"}),t]}):r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%"},children:[r.jsxs(kg,{checked:S,indeterminate:$,onCheckedChange:e=>(e=>{const t=s.filter((e=>void 0!==e.name)).reduce(((t,n)=>(t[n.name]=e,t)),{});y(t),l?.(t)})(!!e.checked),children:[t.label," ",!h&&r.jsx("span",{"aria-hidden":"true",css:ov,children:M})]}),!p&&r.jsxs("button",{type:"button",onClick:()=>w((e=>!e)),"aria-expanded":x,"aria-controls":"checkbox-list",css:iv,children:[x?m.hideLabel:m.expandLabel,r.jsx("span",{"aria-hidden":"true",children:x?r.jsx(If,{style:{transform:"rotate(180deg)"}}):r.jsx(If,{})})]})]})}),r.jsx("p",{css:ev,"aria-label":o,children:o}),c?r.jsx("p",{css:rv,"aria-label":c,children:c}):null,r.jsx("div",{id:"checkbox-list",css:tv(d,x),children:s.map((e=>{const{onCheckedChange:t,...n}=e;return r.jsx(kg,{ms:C&&!d?"6":"",css:{},checked:!!e?.name&&!!k[e.name],onCheckedChange:({checked:n})=>{((e,t)=>{const n={...b};t&&(n[t]=e,y(n)),l&&l(n)})(n,e.name),t?.({checked:!!n})},...n},e.name)}))})]})]});var A},exports.CheckboxOptionCard=({defaultValue:t,items:n,onValueChange:o})=>r.jsx(e.CheckboxGroup,{defaultValue:t,onValueChange:o,children:r.jsx(e.HStack,{alignItems:"flex-start",flexWrap:"wrap",gap:"0.75rem",children:n.map((n=>{return r.jsxs(e.CheckboxCard.Root,{css:Sg,defaultChecked:-1!==t?.indexOf(n.value),disabled:n.disabled,value:n.value,children:[r.jsx(e.CheckboxCard.HiddenInput,{}),r.jsxs(e.CheckboxCard.Control,{css:$g,children:[r.jsxs(e.CheckboxCard.Content,{css:(s=n.variant,i.css`
@@ -3915,7 +3926,7 @@ function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3915
3926
  padding: 0;
3916
3927
  padding-top: ${k(200)};
3917
3928
  color: ${o?w("neutral",500):"inherit"};
3918
- `),children:n.children}):null]},`${n.label}-${n.value}`);var o,s}))})}),exports.CloseButton=sg,exports.ClusterPoint=({onClick:e,triggerRef:n,showFocusState:r,count:o,mode:i,variant:s="cluster"})=>t.jsx(vb,{count:o,mode:i,onClick:e,ref:n,showFocusState:r,variant:s}),exports.Combobox=({label:t,required:o,caption:i,errorMessage:s,size:a,disabled:l,showOptionalLabel:c=!0,placeholder:d,labels:u,noMarginBottom:h,initialItems:p=[],multiple:f=!1,showSelectedItems:m=!1})=>{const[g,v]=n.useState([]),b=Mf("Combobox",u),{contains:y}=e.useFilter({sensitivity:"base"}),{collection:x,filter:w}=e.useListCollection({initialItems:p,filter:y});return r.jsxs("div",{css:Um(a,h),className:"ds-text-input-container",children:[s?r.jsx("div",{css:Km}):null,r.jsxs(e.Field.Root,{required:o,invalid:!!s,gap:"0",style:{marginLeft:s?"1.1875rem":"0px"},children:[t?r.jsxs(e.Field.Label,{css:Gm(a,l),"aria-label":t,children:[r.jsx(e.Field.RequiredIndicator,{"aria-label":b.requiredSymbolLabel}),t,!o&&c?r.jsx("span",{children:b.optionalSuffix}):null]}):null,i?r.jsx(e.Field.HelperText,{css:Zm(a,l),"aria-label":i,children:i}):null,s?r.jsx(e.Field.ErrorText,{css:Jm(a),"aria-label":s,children:s}):null,r.jsxs(e.Combobox.Root,{multiple:f,onValueChange:e=>{v(e.items.map((e=>({label:e.label,value:e.value}))))},value:g.map((e=>e.value)),collection:x,onInputValueChange:e=>w(e.inputValue),width:"20rem",size:"small"===a?"sm":"md",children:[r.jsxs(e.Combobox.Control,{children:[r.jsx(e.Combobox.Input,{placeholder:d,css:Xm(a),disabled:l,"aria-label":t||d||b.defaultInputAriaLabel}),r.jsxs(e.Combobox.IndicatorGroup,{children:[r.jsx(e.Combobox.ClearTrigger,{"aria-label":b.clearSelectionLabel}),r.jsx(e.Combobox.Trigger,{"aria-label":b.toggleOptionsLabel})]})]}),r.jsx(e.Portal,{children:r.jsx(e.Combobox.Positioner,{children:r.jsxs(e.Combobox.Content,{children:[r.jsx(e.Combobox.Empty,{children:b.noItemsFoundLabel}),x.items.map((t=>r.jsxs(e.Combobox.Item,{item:t,children:[t.label,r.jsx(e.Combobox.ItemIndicator,{})]},t.value)))]})})}),r.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",gap:"0.25rem",paddingTop:"0.5rem"},children:m&&g.map((e=>r.jsx(Nv,{label:e.label,variant:"info-white",onClose:()=>v((t=>t.filter((t=>t.value!==e.value)))),closable:!0},e.value)))})]})]})]})},exports.DesignSystemLocaleProvider=({labels:e,children:r})=>{const o=n.useMemo((()=>({labels:e})),[e]);return t.jsx(M.Provider,{value:o,children:r})},exports.ExtendableCard=({children:t,header:n,footer:o})=>r.jsx(e.Box,{css:Xw,children:r.jsx(e.Accordion.Root,{multiple:!0,children:r.jsxs(e.Accordion.Item,{value:"extendable-card-item",children:[r.jsxs(e.Accordion.ItemTrigger,{css:Yw,alignItems:"center",children:[r.jsx(e.Flex,{gap:3,flex:"1",overflow:"hidden",alignItems:"center",children:n}),r.jsx(e.Accordion.ItemIndicator,{children:r.jsx(If,{color:"var(--chakra-colors-neutral-700)",height:"1rem",width:"1rem"})})]}),r.jsxs(e.Accordion.ItemContent,{children:[t,o]})]})})}),exports.Footer=({children:e,label:t="© World Resources Institute",fixed:n,filled:o,maxWidth:i,additionalLogos:s})=>{const a=(new Date).getFullYear();return r.jsx("footer",{css:GT(n,o),children:r.jsxs("div",{css:ZT(i),children:[r.jsxs("div",{css:YT,children:[r.jsx(Wf,{height:"2rem",width:"5.6875rem"}),s&&s.map(((e,t)=>r.jsx("div",{children:e},t)))]}),r.jsx("div",{css:JT,children:e}),r.jsx("div",{children:r.jsxs("p",{css:XT,children:[t," ",a]})})]})})},exports.FormContainer=({label:e,error:t,children:o})=>{const i=n.useId(),s=e?`${i}-label`:void 0,a=t?`${i}-error`:void 0;return r.jsxs("div",{css:bg,role:"group","aria-labelledby":s,"aria-describedby":a,children:[t?r.jsx("div",{css:xg}):null,r.jsxs("div",{children:[e?r.jsx("p",{id:s,css:yg,children:e}):null,t?r.jsx("p",{id:a,css:wg,children:t}):null,o]})]})},exports.IconButton=Of,exports.InlineMessage=AT,exports.InputWithUnits=({label:t,caption:o,errorMessage:i,units:s,unitsPosition:a="end",defaultUnit:l="",defaultValue:c="",onChange:d,required:u,disabled:h})=>{const[p,f]=n.useState(c),[m,g]=n.useState(l?[l]:[s[0].value]),v=(e,t)=>{d&&d("end"===a?""+(t?`${p} ${e}`:`${e} ${m}`):""+(t?`${e} ${p}`:`${m} ${e}`))};return r.jsxs("div",{css:sv,children:[i?r.jsx("div",{css:cv}):null,r.jsxs("div",{style:{marginLeft:i?"1.1875rem":"0px"},children:[r.jsxs("p",{css:av(h),"aria-label":t,children:[u?r.jsx("span",{children:"*"}):null,t]}),r.jsx("p",{css:lv(h),"aria-label":o,children:o}),i?r.jsx("p",{css:dv,"aria-label":i,children:i}):null,r.jsxs(e.Group,{css:uv(!!i,a),attached:!0,children:["start"===a?r.jsx(Pv,{placeholder:"","aria-label":`${t} unit`,value:m,items:s,disabled:h,onChange:e=>{g(e),v(e?.[0],!0)}}):null,r.jsx(Ym,{type:"number","aria-label":`${t} value`,value:p,disabled:h,onChange:e=>{f(e.target.value),v(e.target.value)}}),"end"===a?r.jsx(Pv,{placeholder:"","aria-label":`${t} unit`,value:m,items:s,disabled:h,onChange:e=>{g(e),v(e?.[0],!0)}}):null]})]})]})},exports.ItemCount=ww,exports.LayerGroup=({label:t,caption:o,value:i,layerItems:s,onChangeForRadioVariant:a,labels:l})=>{const c=Mf("LayerGroup",l),[d,u]=n.useState({}),[h]=n.useState((e=>{const t=e.find((e=>"radio"===e.variant&&e.isDefaultSelected));return t?.name})(s));n.useEffect((()=>{let e={...d};s.forEach((n=>{n.isDefaultSelected&&(e={...e,["radio"===n.variant?t:n.name]:n.isDefaultSelected})})),u(e)}),[]);const p=(e,t,n,r)=>{const o={...d,[e]:t};u(o),n&&n(e,t,r)},f=Object.values(d).filter((e=>!0===e)).length,m=c.groupAriaLabel(t,f,o);return r.jsxs(e.Accordion.Item,{value:i,width:"100%",children:[r.jsxs(e.Accordion.ItemTrigger,{css:Nx,alignItems:"flex-start","aria-label":m,children:[r.jsxs(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:[r.jsxs("span",{css:Dx,children:[t,r.jsx(Nv,{label:c.activeTagLabel(f),size:"small",variant:f>0?"success":"info-grey"})]}),r.jsx("div",{css:Ix,children:o})]}),r.jsx(e.Accordion.ItemIndicator,{display:"flex",children:r.jsx(If,{color:"var(--chakra-colors-neutral-700)",height:"1rem",width:"1rem"})})]}),r.jsx(e.Accordion.ItemContent,{paddingLeft:"1rem",paddingRight:"1rem",children:r.jsx(Bg,{name:t,value:h,customGap:"0",onChange:(e,t)=>p(e,!!t,a,t),children:s.map((e=>r.jsx(_x,{...e,onChange:(t,n)=>p(t,n,e.onChange)},e.label)))})})]})},exports.LayerGroupContainer=({children:t,defaultValue:n,...o})=>r.jsx("div",{css:Rx,style:{width:"100%"},children:r.jsx(e.Accordion.Root,{css:{},defaultValue:n,multiple:!0,...o,children:t})}),exports.LayerItem=_x,exports.LayerParameters=({label:t,children:o,openedByDefault:i})=>r.jsx("div",{children:r.jsx(e.Accordion.Root,{defaultValue:i?[t]:[],multiple:!0,children:r.jsxs(e.Accordion.Item,{css:Fx,value:t,children:[r.jsxs(e.Accordion.ItemTrigger,{css:qx,children:[r.jsx(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:r.jsx("p",{css:Wx,children:t})}),r.jsx(e.Accordion.ItemIndicator,{display:"flex",children:r.jsx(If,{color:"var(--chakra-colors-neutral-700)",height:"1rem",width:"1rem"})})]}),r.jsx(e.Accordion.ItemContent,{css:Ux,children:n.Children.map(o,(e=>r.jsx("div",{className:"ds-layer-parameters-item-child",children:e})))})]})})}),exports.LegendItem=({layerName:e,dataUnit:t,onDrag:n,onUpClick:o,onDownClick:i,onRemoveClick:s,children:a,onInfoClick:l,onOpacityChanged:c,labels:d})=>{const u=Mf("LegendItem",d);return r.jsxs("div",{css:Kx,children:[r.jsx("div",{css:Gx,children:r.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"0.75rem"},children:[r.jsx(Of,{icon:r.jsx(If,{rotate:"180"}),"aria-label":u.upLabel,onClick:o}),r.jsx(Of,{icon:r.jsx(If,{}),"aria-label":u.downLabel,onClick:i})]})}),r.jsxs("div",{style:{width:"100%"},children:[r.jsxs("div",{css:Zx,children:[r.jsxs("div",{children:[r.jsx("h3",{css:Jx,children:e}),r.jsx("p",{css:Xx,children:t})]}),r.jsx(Ef,{label:u.removeLabel,size:"small",variant:"secondary",rightIcon:r.jsx(zf,{}),onClick:s})]}),a,r.jsxs("div",{css:Yx,children:[r.jsx(Ef,{label:u.aboutDataLabel,size:"small",variant:"secondary",leftIcon:r.jsx(Df,{}),onClick:l}),r.jsx(rw,{defaultValue:80,onOpacityChanged:c})]})]})]})},exports.List=Ow,exports.MapControlsToolbar=({onZoomInClick:e,onZoomOutClick:n,onExpandClick:r,onShareClick:o,onPrintClick:i,onSettingsClick:s,onQuestionClick:a,vertical:l,expanded:c,showExpandedToggle:d,ariaLabel:u,labels:h})=>{const p=Mf("MapControlsToolbar",h),f=[{icon:t.jsx(Kf,{}),label:p.zoomInLabel,ariaLabel:p.zoomInAriaLabel,onClick:e},{icon:t.jsx(Gf,{}),label:p.zoomOutLabel,ariaLabel:p.zoomOutAriaLabel,onClick:n,gap:!0},{icon:t.jsx(Zf,{}),label:p.expandLabel,ariaLabel:p.expandAriaLabel,onClick:r,gap:!0},{icon:t.jsx(Jf,{}),label:p.shareLabel,ariaLabel:p.shareAriaLabel,onClick:o,gap:!0},{icon:t.jsx(Xf,{}),label:p.printLabel,ariaLabel:p.printAriaLabel,onClick:i,gap:!0},{icon:t.jsx(Yf,{}),label:p.settingsLabel,ariaLabel:p.settingsAriaLabel,onClick:s,gap:!0},{icon:t.jsx(Qf,{}),label:p.helpLabel,ariaLabel:p.helpAriaLabel,onClick:a}];return t.jsx(ug,{items:f,vertical:l,expanded:c,showExpandedToggle:d,ariaLabel:u||p.toolbarAriaLabel})},exports.MapMarker=vb,exports.MapMarkers=bb,exports.MapPopUp=({open:e,onOpenChange:t,anchorRef:o,header:i,content:s,footer:a,placement:c="bottom",offset:d=30,closeOnEscape:u=!0,closeOnOutsideClick:h=!1,labels:p})=>{const f=Mf("MapPopUp",p),m=n.useRef(null),{refs:g,floatingStyles:v,context:b,middlewareData:y,placement:x}=Sx({open:e,onOpenChange:t,placement:c,whileElementsMounted:Uy,middleware:[ox(d),(w={fallbackAxisSideDirection:"start"},{...Zy(w),options:[w,C]}),ix({padding:8}),sx({element:m})]});var w,C;n.useEffect((()=>{o?.current&&g.setReference(o.current)}),[o,g]);const k=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:s=!0,escapeKey:a=!0,outsidePress:c=!0,outsidePressEvent:d="pointerdown",referencePress:u=!1,referencePressEvent:h="pointerdown",ancestorScroll:p=!1,bubbles:f,capture:m}=t,g=yx(),v=$y("function"==typeof c?c:()=>!1),b="function"==typeof c?v:c,y=l.useRef(!1),{escapeKey:x,outsidePress:w}=Cx(f),{escapeKey:C,outsidePress:k}=Cx(m),S=l.useRef(!1),$=$y((e=>{var t;if(!n||!s||!a||"Escape"!==e.key)return;if(S.current)return;const o=null==(t=i.current.floatingContext)?void 0:t.nodeId,l=g?Cy(g.nodesRef.current,o):[];if(!x&&(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")})),j=$y((e=>{var t;const n=()=>{var t;$(e),null==(t=yy(e))||t.removeEventListener("keydown",n)};null==(t=yy(e))||t.addEventListener("keydown",n)})),M=$y((e=>{var t;const n=i.current.insideReactTree;i.current.insideReactTree=!1;const s=y.current;if(y.current=!1,"click"===d&&s)return;if(n)return;if("function"==typeof b&&!b(e))return;const a=yy(e),l="[data-floating-ui-inert]",c=wy(o.floating).querySelectorAll(l);let u=Sb(a)?a:null;for(;u&&!Vb(u);){const e=_b(u);if(Vb(e)||!Sb(e))break;u=e}if(c.length&&Sb(a)&&!a.matches("html,body")&&!by(a,o.floating)&&Array.from(c).every((e=>!by(u,e))))return;if($b(a)&&O){const t=Vb(a),n=Bb(a),r=/auto|scroll/,o=t||r.test(n.overflowX),i=t||r.test(n.overflowY),s=o&&a.clientWidth>0&&a.scrollWidth>a.clientWidth,l=i&&a.clientHeight>0&&a.scrollHeight>a.clientHeight,c="rtl"===n.direction,d=l&&(c?e.offsetX<=a.offsetWidth-a.clientWidth:e.offsetX>a.clientWidth),u=s&&e.offsetY>a.clientHeight;if(d||u)return}const h=null==(t=i.current.floatingContext)?void 0:t.nodeId,p=g&&Cy(g.nodesRef.current,h).some((t=>{var n;return xy(e,null==(n=t.context)?void 0:n.elements.floating)}));if(xy(e,o.floating)||xy(e,o.domReference)||p)return;const f=g?Cy(g.nodesRef.current,h):[];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")})),E=$y((e=>{var t;const n=()=>{var t;M(e),null==(t=yy(e))||t.removeEventListener(d,n)};null==(t=yy(e))||t.addEventListener(d,n)}));l.useEffect((()=>{if(!n||!s)return;i.current.__escapeKeyBubbles=x,i.current.__outsidePressBubbles=w;let e=-1;function t(e){r(!1,e,"ancestor-scroll")}function l(){window.clearTimeout(e),S.current=!0}function c(){e=window.setTimeout((()=>{S.current=!1}),Pb()?5:0)}const u=wy(o.floating);a&&(u.addEventListener("keydown",C?j:$,C),u.addEventListener("compositionstart",l),u.addEventListener("compositionend",c)),b&&u.addEventListener(d,k?E:M,k);let h=[];return p&&(Sb(o.domReference)&&(h=qb(o.domReference)),Sb(o.floating)&&(h=h.concat(qb(o.floating))),!Sb(o.reference)&&o.reference&&o.reference.contextElement&&(h=h.concat(qb(o.reference.contextElement)))),h=h.filter((e=>{var t;return e!==(null==(t=u.defaultView)?void 0:t.visualViewport)})),h.forEach((e=>{e.addEventListener("scroll",t,{passive:!0})})),()=>{a&&(u.removeEventListener("keydown",C?j:$,C),u.removeEventListener("compositionstart",l),u.removeEventListener("compositionend",c)),b&&u.removeEventListener(d,k?E:M,k),h.forEach((e=>{e.removeEventListener("scroll",t)})),window.clearTimeout(e)}}),[i,o,a,b,d,n,r,p,s,x,w,$,C,j,M,k,E]),l.useEffect((()=>{i.current.insideReactTree=!1}),[i,b,d]);const T=l.useMemo((()=>({onKeyDown:$,...u&&{[xx[h]]:e=>{r(!1,e.nativeEvent,"reference-press")},..."click"!==h&&{onClick(e){r(!1,e.nativeEvent,"reference-press")}}}})),[$,r,u,h]),O=l.useMemo((()=>({onKeyDown:$,onMouseDown(){y.current=!0},onMouseUp(){y.current=!0},[wx[d]]:()=>{i.current.insideReactTree=!0}})),[$,d,i]);return l.useMemo((()=>s?{reference:T,floating:O}:{}),[s,T,O])}(b,{escapeKey:u,outsidePress:h}),S=Mx(b,{role:"dialog"}),{getFloatingProps:$}=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=>$x(t,e,"reference")),t),i=l.useCallback((t=>$x(t,e,"floating")),n),s=l.useCallback((t=>$x(t,e,"item")),r);return l.useMemo((()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s})),[o,i,s])}([k,S]),{x:j,y:M}=y.arrow??{x:null,y:null},E={top:"bottom",right:"left",bottom:"top",left:"right"}[x.split("-")[0]];if(!e)return null;let T=d-1,O=4;return"left"!==E&&"right"!==E||(T=4,O=d-1),r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:g.setFloating,style:v,"aria-label":f.dialogAriaLabel,"aria-modal":!0,...$(),css:Ex,children:[r.jsxs("div",{css:Tx,children:[i,r.jsx(sg,{onClick:()=>t(!1),className:"ds-map-pop-up-close-button","aria-label":f.closeLabel})]}),r.jsx("div",{css:Ox,children:s}),a?r.jsx("div",{css:Lx,children:a}):null,r.jsx("div",{ref:m,css:Ax(T,O,j,M,E,d)})]}),r.jsx("div",{className:"fixed inset-0 z-[999] bg-black/20 backdrop-blur-[1px]",onClick:()=>h&&t(!1)})]})},exports.Menu=jm,exports.MobileSearch=({value:t,placeholder:o,showInfoMessage:i=!0,items:s=[],disabled:a,readOnly:l,id:c,name:d,autoFocus:u,autoComplete:h,onBlur:p,onFocus:f,onQueryChange:m,onCancel:g,onItemClick:v,onChange:b,labels:y})=>{const x=Mf("MobileSearch",y),[C,k]=n.useState(t??""),[S,$]=n.useState(!0),[j,M]=n.useState(!1),E=n.useRef(null),T="string"==typeof t,O=T?t:C;n.useEffect((()=>{T&&k(t)}),[T,t]),n.useEffect((()=>{m?.(O)}),[O,m]);const L=n.useMemo((()=>{const e=O.trim().toLowerCase();return e?s.filter((t=>`${t.id??""} ${t.label} ${t.caption??""}`.toLowerCase().includes(e))):s}),[s,O]),A=O.trim().length?x.matchingResultsTitle(L.length):x.recentSearchesTitle,R=O.length?r.jsx(sg,{onClick:()=>{T||k("");const e=E.current?.querySelector("input");e&&(e.value="",e.focus()),$(!0)}}):null;let N=w("neutral",500);return a?N=w("neutral",500):j&&(N=w("primary",700)),r.jsxs("div",{ref:E,css:RT,children:[r.jsxs("div",{css:NT,children:[r.jsx("div",{css:DT,children:r.jsx(e.InputGroup,{startElement:r.jsx(hm,{width:"1.25rem",height:"1.25rem",fill:N,"aria-hidden":"true"}),endElement:R,children:r.jsx(Ym,{label:"",value:O,placeholder:o??x.inputAriaLabel,onChange:e=>{T||k(e.target.value),$(!0),b?.(e)},onFocus:e=>{M(!0),$(!0),f?.(e)},onBlur:e=>{M(!1),p?.(e)},noMarginBottom:!0,type:"search","aria-label":o??x.inputAriaLabel,disabled:a,readOnly:l,id:c,name:d,autoFocus:u??!0,autoComplete:h,style:{paddingLeft:"2.5rem"}})})}),r.jsx(Ef,{css:IT,variant:"borderless",label:x.cancelLabel,onClick:()=>{T||k(""),$(!1);const e=E.current?.querySelector("input");e&&(e.value="",e.blur()),g?.()}})]}),S?r.jsxs("div",{css:PT,children:[r.jsx("h3",{css:zT,children:A}),i?r.jsx("div",{css:VT,children:r.jsx(AT,{label:x.infoLabel,variant:"info-white",size:"full-width"})}):null,r.jsx("ul",{css:BT,"aria-label":A,children:L.map((t=>r.jsx("li",{children:r.jsxs(e.chakra.button,{type:"button",css:HT,onClick:()=>(e=>{v?.(e)})(t),"aria-label":`${t.label}, ${t.caption??""}`,style:{width:"100%"},children:[t.icon??null,r.jsxs("div",{css:_T,children:[r.jsx("p",{css:FT,children:t.label}),r.jsx("p",{css:qT,children:t.caption})]})]})},t.id)))})]}):null]})},exports.MobileTabBar=({defaultValue:t,tabs:o,onTabClick:i,hideLabels:s,activationMode:a="manual",labels:l})=>{const c=Mf("MobileTabBar",l),d=o.length,[u,h]=n.useState((()=>rO(o,t)));return r.jsx("div",{css:QT,children:r.jsx(e.Tabs.Root,{width:"full",defaultValue:t||o?.[0]?.value,onValueChange:({value:e})=>(e=>{const t=rO(o,e);h(t),i&&i(e)})(e),activationMode:a,children:r.jsx(e.Tabs.List,{alignItems:"center",border:"none",children:o.map(((t,n)=>{const{label:o,icon:i,bagdeCount:a,"aria-label":l,"aria-describedby":h,disabled:p,...f}=t,m=`${t.value}-str-status`,g=u===n,v=[c.tabPositionStatus(n+1,d),g?c.selectedStatus:c.notSelectedStatus];p&&v.push(c.disabledStatus);const b=[h,m].filter(Boolean).join(" ")||void 0;return r.jsxs(e.Tabs.Trigger,{css:eO,"aria-label":l||o,"aria-disabled":!!p||void 0,"aria-describedby":b,disabled:p,...f,children:[r.jsxs("div",{css:tO,children:[i,a?r.jsx("div",{css:nO,className:"ds-badge-count",children:a}):null]}),s?null:r.jsx("p",{children:o}),r.jsx(e.VisuallyHidden,{id:m,children:v.join(", ")})]},t.value)}))})})})},exports.Modal=({header:t,content:o,footer:i,size:s="medium",width:a,height:l,maxHeight:c,draggable:d,blocking:u,open:h,onClose:p,labels:f})=>{const m=Mf("Modal",f),g=n.useRef(null);return h?r.jsx(e.Dialog.Root,{open:h,onOpenChange:p,placement:"center",scrollBehavior:"inside",closeOnInteractOutside:!d&&!u,preventScroll:!d&&!u,closeOnEscape:!u,defaultOpen:!0,children:r.jsxs(e.Portal,{children:[d?null:r.jsx(e.Dialog.Backdrop,{css:{background:"rgba(0, 0, 0, 0.64)"}}),r.jsx(XC,{disabled:!d,nodeRef:g,children:r.jsx(e.Dialog.Positioner,{ref:g,children:r.jsxs(e.Dialog.Content,{"aria-label":m.dialogAriaLabel,css:YC(s,a,l,c),children:[r.jsxs(e.Dialog.Header,{css:QC,children:[t,u?null:r.jsx(e.Dialog.CloseTrigger,{css:ek,asChild:!0,children:r.jsx(sg,{})})]}),r.jsx(e.Dialog.Body,{css:tk,children:o}),i?r.jsx(e.Dialog.Footer,{padding:"0.75rem",children:i}):null]})})})]})}):null},exports.MultiActionButton=({variant:t="primary",size:o="default",mainActionLabel:i,mainActionOnClick:s=()=>{},otherActions:a=[],disabled:l,mainActionLeftIcon:c,mainActionRightIcon:d,...u})=>{const[h,p]=n.useState(!1),f=l?`${i} action button with menu, disabled`:void 0;return r.jsxs(e.Group,{css:mg,attached:!0,tabIndex:l?0:void 0,"aria-disabled":l,"aria-label":f,role:"group",children:[r.jsx(Ef,{css:{},label:i,variant:t,size:o,onClick:s,disabled:l,leftIcon:c,rightIcon:d,...u}),r.jsxs(e.Menu.Root,{onOpenChange:({open:e})=>p(e),positioning:{placement:"bottom-end"},children:[r.jsx(e.Menu.Trigger,{css:pg(t),"data-group-item":!0,"data-last":!0,asChild:!0,children:r.jsx(Ef,{style:gg,"aria-label":`Open ${i} options`,"aria-haspopup":"menu","aria-expanded":h,variant:t,size:o,leftIcon:r.jsx(If,{"aria-hidden":"true",rotate:h?"180":"0",color:w("accessible","text-on-primary-mids")||w("primary",900)}),disabled:l})}),r.jsx(vg,{children:a.map((({label:t,value:n,onClick:i})=>r.jsx(e.Menu.Item,{css:fg(o),onClick:i,value:n,children:t},n)))})]})]})},exports.Navbar=({variant:e="default",theme:t="light",logo:o,linkRouter:i,pathname:s,navigationSection:a,utilitySection:l,actionsSection:c,maxWidth:d,fixed:u,onNavbarHeightChange:h,backgroundColor:p,labels:f})=>{const m=Mf("Navbar",f),g=n.useRef(null),v=n.useRef(null),b=n.useRef(null),[y,x]=n.useState(!1),[w,C]=n.useState(-1),[k,S]=n.useState("undefined"!=typeof window&&window?.innerWidth<=jO),[$,j]=n.useState(!1),M=i,E=n.useCallback((()=>{if(v.current&&g.current&&b.current){const e=g.current.getBoundingClientRect(),t=v.current.getBoundingClientRect(),n=b.current.getBoundingClientRect();t.width,e.width,window.innerWidth<=jO||window.innerWidth<=w?(h?.(96),x(!0)):window.innerWidth>jO&&window.innerWidth<=1440?e.right>=t.left?(h?.(96),x(!0),C(window.innerWidth)):window.innerWidth>w&&(h?.(48),x(!1),C(-1)):(h?.(48),x(!1),C(-1)),y&&(window.innerWidth<=jO||n.right>=t.left?(S(!0),h?.(48)):(S(!1),h?.(96)))}}),[w,y]);n.useEffect((()=>(E(),window.addEventListener("resize",E),()=>{window.removeEventListener("resize",E)})),[E]);const T="condensed"===e;return r.jsxs("nav",{css:oO(y&&!k,u,p,t,T),children:[r.jsxs("div",{css:sO(y&&!k,d,T),children:[r.jsxs("div",{css:aO(y&&!k||"dark"===t,T),ref:g,children:[o?r.jsx("div",{ref:b,css:lO,children:o}):null,r.jsx("div",{css:cO(y),children:a?.map((e=>e.link?r.jsx(M,{to:e.link,href:e.link,css:dO(s===e.link,t,T),children:e.label},e.label):r.jsx(jm,{theme:t,label:e.label,fontSize:T?"0.875rem":"1rem",items:e.items||[]},e.label)))})]}),r.jsx("div",{css:uO(T),ref:v,children:k?r.jsxs("button",{type:"button",onClick:()=>j(!$),"aria-label":$?m.closeMenuLabel:m.openMenuLabel,"aria-expanded":$,css:fO(t),children:[$?m.closeLabel:m.menuLabel,$?r.jsx(zf,{height:T?"0.75rem":"1rem",width:T?"0.75rem":"1rem"}):r.jsx(lm,{height:T?"0.75rem":"1rem",width:T?"0.75rem":"1rem"})]}):r.jsxs(r.Fragment,{children:[r.jsx("div",{css:uO(T),children:l?.map(((e,t)=>r.jsx("div",{css:hO(y),children:e},t)))}),c?.length?r.jsx("div",{css:pO(y),children:c.map((e=>r.jsx(Ef,{...e},e.ariaLabel)))}):null]})})]}),y&&!k?r.jsx("div",{css:iO(t,T),children:a?.map((e=>e.link?r.jsx(M,{to:e.link,href:e.link,css:dO(s===e.link,t,T),children:e.label},e.label):r.jsx(jm,{theme:t,label:e.label,fontSize:T?"0.875rem":"1rem",items:e.items||[]},e.label)))}):null,k?r.jsx($O,{theme:t,variant:e,navigationSection:a,utilitySection:l,actionsSection:c,linkRouter:i,isOpen:$,setIsOpen:j,pathname:s,resolvedLabels:m}):null]})},exports.NavigationRail=({tabs:t=[],defaultValue:o,onTabClick:i,children:s,onOpenChange:a,labels:l})=>{const c=Mf("NavigationRail",l),[d,u]=n.useState(!1),[h,p]=n.useState(o||t?.[0]?.value),f=e=>{p(e),i&&i(e)},[m]=e.useMediaQuery(["(max-width: 48rem)"]);return m?r.jsxs(e.Tabs.Root,{defaultValue:h,onValueChange:({value:e})=>f(e),children:[r.jsx(e.Tabs.List,{style:{display:"flex",overflowX:"auto",whiteSpace:"nowrap",padding:"0.5rem",gap:"0.5rem"},children:t.map((t=>r.jsx(e.Tabs.Trigger,{value:t.value,css:{"--indicator-color":w("primary",500),flexShrink:0,padding:"0.625rem 1rem",color:w("neutral",600),"&[data-selected]":{color:w("neutral",800),fontWeight:600}},children:t.label},t.value)))}),t.map((t=>r.jsx(e.Tabs.Content,{value:t.value,children:s},t.value)))]}):r.jsxs("div",{style:{height:"calc(100vh - 3rem - 3.5rem)",position:"fixed",top:"3rem",left:0,display:"flex"},children:[r.jsxs("div",{css:MO,children:[r.jsx(e.Tabs.Root,{defaultValue:o||t?.[0]?.value,orientation:"horizontal",width:"full",onValueChange:({value:e})=>{f(e)},children:r.jsx(e.Tabs.List,{alignItems:"center",border:"none",style:{flexDirection:"column"},children:t.map((t=>r.jsx(e.Tabs.Trigger,{css:EO,"aria-label":t["aria-label"]||t.label,...t,children:r.jsxs(e.Box,{display:"flex",alignItems:"center",flexDirection:"column",gap:"0.3125rem",className:"ds-tab-label",children:[t.icon?r.jsx("div",{css:TO,children:t.icon}):null,r.jsx("p",{children:t.label})]})},t.label)))})}),s?r.jsx(e.Collapsible.Root,{onOpenChange:({open:e})=>{u(e),a&&a(!e)},children:r.jsxs(e.Collapsible.Trigger,{css:OO,children:[r.jsx("div",{css:TO,children:d?r.jsx(Af,{}):r.jsx(Lf,{})}),r.jsxs("div",{className:"ds-tab-label",children:[r.jsx("p",{children:d?c.showLabel:c.hideLabel}),r.jsx("p",{children:c.sidebarLabel})]})]})}):null]}),s?r.jsx(e.Collapsible.Root,{defaultOpen:!0,open:!d,children:r.jsx(e.Collapsible.Content,{height:"100%",children:r.jsx("div",{css:LO,role:"tabpanel","aria-labelledby":h,children:s})})}):null]})},exports.OptionCard=({defaultValue:t,items:n,onValueChange:o,variant:s,itemWidth:a,hideControl:l})=>r.jsx(e.RadioCard.Root,{defaultValue:t,onValueChange:o,children:r.jsx(e.HStack,{alignItems:"flex-start",flexWrap:"wrap",gap:"0.75rem",children:n?.map((t=>{return r.jsxs(e.RadioCard.Item,{css:(o=a,c=t.selectedColor,d=t.selectedBackgroundColor,i.css`
3929
+ `),children:n.children}):null]},`${n.label}-${n.value}`);var o,s}))})}),exports.CloseButton=sg,exports.ClusterPoint=({onClick:e,triggerRef:n,showFocusState:r,count:o,mode:i,variant:s="cluster"})=>t.jsx(vb,{count:o,mode:i,onClick:e,ref:n,showFocusState:r,variant:s}),exports.Combobox=({label:t,required:o,caption:i,errorMessage:s,size:a,disabled:l,showOptionalLabel:c=!0,placeholder:d,labels:u,noMarginBottom:h,initialItems:p=[],multiple:f=!1,showSelectedItems:m=!1})=>{const[g,v]=n.useState([]),b=Mf("Combobox",u),{contains:y}=e.useFilter({sensitivity:"base"}),{collection:x,filter:w}=e.useListCollection({initialItems:p,filter:y});return r.jsxs("div",{css:Um(a,h),className:"ds-text-input-container",children:[s?r.jsx("div",{css:Km}):null,r.jsxs(e.Field.Root,{required:o,invalid:!!s,gap:"0",style:{marginLeft:s?"1.1875rem":"0px"},children:[t?r.jsxs(e.Field.Label,{css:Gm(a,l),"aria-label":t,children:[r.jsx(e.Field.RequiredIndicator,{"aria-label":b.requiredSymbolLabel}),t,!o&&c?r.jsx("span",{children:b.optionalSuffix}):null]}):null,i?r.jsx(e.Field.HelperText,{css:Zm(a,l),"aria-label":i,children:i}):null,s?r.jsx(e.Field.ErrorText,{css:Jm(a),"aria-label":s,children:s}):null,r.jsxs(e.Combobox.Root,{multiple:f,onValueChange:e=>{v(e.items.map((e=>({label:e.label,value:e.value}))))},value:g.map((e=>e.value)),collection:x,onInputValueChange:e=>w(e.inputValue),width:"20rem",size:"small"===a?"sm":"md",children:[r.jsxs(e.Combobox.Control,{children:[r.jsx(e.Combobox.Input,{placeholder:d,css:Xm(a),disabled:l,"aria-label":t||d||b.defaultInputAriaLabel}),r.jsxs(e.Combobox.IndicatorGroup,{children:[r.jsx(e.Combobox.ClearTrigger,{"aria-label":b.clearSelectionLabel}),r.jsx(e.Combobox.Trigger,{"aria-label":b.toggleOptionsLabel})]})]}),r.jsx(e.Portal,{children:r.jsx(e.Combobox.Positioner,{children:r.jsxs(e.Combobox.Content,{children:[r.jsx(e.Combobox.Empty,{children:b.noItemsFoundLabel}),x.items.map((t=>r.jsxs(e.Combobox.Item,{item:t,children:[t.label,r.jsx(e.Combobox.ItemIndicator,{})]},t.value)))]})})}),r.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",gap:"0.25rem",paddingTop:"0.5rem"},children:m&&g.map((e=>r.jsx(Nv,{label:e.label,variant:"info-white",onClose:()=>v((t=>t.filter((t=>t.value!==e.value)))),closable:!0},e.value)))})]})]})]})},exports.DesignSystemLocaleProvider=({labels:e,children:r})=>{const o=n.useMemo((()=>({labels:e})),[e]);return t.jsx(M.Provider,{value:o,children:r})},exports.ExtendableCard=({children:t,header:n,footer:o})=>r.jsx(e.Box,{css:Yw,children:r.jsx(e.Accordion.Root,{multiple:!0,children:r.jsxs(e.Accordion.Item,{value:"extendable-card-item",children:[r.jsxs(e.Accordion.ItemTrigger,{css:Qw,alignItems:"center",children:[r.jsx(e.Flex,{gap:3,flex:"1",overflow:"hidden",alignItems:"center",children:n}),r.jsx(e.Accordion.ItemIndicator,{children:r.jsx(If,{color:"var(--chakra-colors-neutral-700)",height:"1rem",width:"1rem"})})]}),r.jsxs(e.Accordion.ItemContent,{children:[t,o]})]})})}),exports.Footer=({children:e,label:t="© World Resources Institute",fixed:n,filled:o,maxWidth:i,additionalLogos:s})=>{const a=(new Date).getFullYear();return r.jsx("footer",{css:ZT(n,o),children:r.jsxs("div",{css:JT(i),children:[r.jsxs("div",{css:QT,children:[r.jsx(Wf,{height:"2rem",width:"5.6875rem"}),s&&s.map(((e,t)=>r.jsx("div",{children:e},t)))]}),r.jsx("div",{css:XT,children:e}),r.jsx("div",{children:r.jsxs("p",{css:YT,children:[t," ",a]})})]})})},exports.FormContainer=({label:e,error:t,children:o})=>{const i=n.useId(),s=e?`${i}-label`:void 0,a=t?`${i}-error`:void 0;return r.jsxs("div",{css:bg,role:"group","aria-labelledby":s,"aria-describedby":a,children:[t?r.jsx("div",{css:xg}):null,r.jsxs("div",{children:[e?r.jsx("p",{id:s,css:yg,children:e}):null,t?r.jsx("p",{id:a,css:wg,children:t}):null,o]})]})},exports.IconButton=Of,exports.InlineMessage=RT,exports.InputWithUnits=({label:t,caption:o,errorMessage:i,units:s,unitsPosition:a="end",defaultUnit:l="",defaultValue:c="",onChange:d,required:u,disabled:h})=>{const[p,f]=n.useState(c),[m,g]=n.useState(l?[l]:[s[0].value]),v=(e,t)=>{d&&d("end"===a?""+(t?`${p} ${e}`:`${e} ${m}`):""+(t?`${e} ${p}`:`${m} ${e}`))};return r.jsxs("div",{css:sv,children:[i?r.jsx("div",{css:cv}):null,r.jsxs("div",{style:{marginLeft:i?"1.1875rem":"0px"},children:[r.jsxs("p",{css:av(h),"aria-label":t,children:[u?r.jsx("span",{children:"*"}):null,t]}),r.jsx("p",{css:lv(h),"aria-label":o,children:o}),i?r.jsx("p",{css:dv,"aria-label":i,children:i}):null,r.jsxs(e.Group,{css:uv(!!i,a),attached:!0,children:["start"===a?r.jsx(Pv,{placeholder:"","aria-label":`${t} unit`,value:m,items:s,disabled:h,onChange:e=>{g(e),v(e?.[0],!0)}}):null,r.jsx(Ym,{type:"number","aria-label":`${t} value`,value:p,disabled:h,onChange:e=>{f(e.target.value),v(e.target.value)}}),"end"===a?r.jsx(Pv,{placeholder:"","aria-label":`${t} unit`,value:m,items:s,disabled:h,onChange:e=>{g(e),v(e?.[0],!0)}}):null]})]})]})},exports.ItemCount=ww,exports.LayerGroup=({label:t,caption:o,value:i,layerItems:s,onChangeForRadioVariant:a,labels:l})=>{const c=Mf("LayerGroup",l),[d,u]=n.useState({}),[h]=n.useState((e=>{const t=e.find((e=>"radio"===e.variant&&e.isDefaultSelected));return t?.name})(s));n.useEffect((()=>{let e={...d};s.forEach((n=>{n.isDefaultSelected&&(e={...e,["radio"===n.variant?t:n.name]:n.isDefaultSelected})})),u(e)}),[]);const p=(e,t,n,r)=>{const o={...d,[e]:t};u(o),n&&n(e,t,r)},f=Object.values(d).filter((e=>!0===e)).length,m=c.groupAriaLabel(t,f,o);return r.jsxs(e.Accordion.Item,{value:i,width:"100%",children:[r.jsxs(e.Accordion.ItemTrigger,{css:Nx,alignItems:"flex-start","aria-label":m,children:[r.jsxs(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:[r.jsxs("span",{css:Dx,children:[t,r.jsx(Nv,{label:c.activeTagLabel(f),size:"small",variant:f>0?"success":"info-grey"})]}),r.jsx("div",{css:Ix,children:o})]}),r.jsx(e.Accordion.ItemIndicator,{display:"flex",children:r.jsx(If,{color:"var(--chakra-colors-neutral-700)",height:"1rem",width:"1rem"})})]}),r.jsx(e.Accordion.ItemContent,{paddingLeft:"1rem",paddingRight:"1rem",children:r.jsx(Bg,{name:t,value:h,customGap:"0",onChange:(e,t)=>p(e,!!t,a,t),children:s.map((e=>r.jsx(_x,{...e,onChange:(t,n)=>p(t,n,e.onChange)},e.label)))})})]})},exports.LayerGroupContainer=({children:t,defaultValue:n,...o})=>r.jsx("div",{css:Rx,style:{width:"100%"},children:r.jsx(e.Accordion.Root,{css:{},defaultValue:n,multiple:!0,...o,children:t})}),exports.LayerItem=_x,exports.LayerParameters=({label:t,children:o,openedByDefault:i})=>r.jsx("div",{children:r.jsx(e.Accordion.Root,{defaultValue:i?[t]:[],multiple:!0,children:r.jsxs(e.Accordion.Item,{css:Fx,value:t,children:[r.jsxs(e.Accordion.ItemTrigger,{css:qx,children:[r.jsx(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:r.jsx("p",{css:Wx,children:t})}),r.jsx(e.Accordion.ItemIndicator,{display:"flex",children:r.jsx(If,{color:"var(--chakra-colors-neutral-700)",height:"1rem",width:"1rem"})})]}),r.jsx(e.Accordion.ItemContent,{css:Ux,children:n.Children.map(o,(e=>r.jsx("div",{className:"ds-layer-parameters-item-child",children:e})))})]})})}),exports.LegendItem=({layerName:e,dataUnit:t,onDrag:n,onUpClick:o,onDownClick:i,onRemoveClick:s,children:a,onInfoClick:l,onOpacityChanged:c,labels:d})=>{const u=Mf("LegendItem",d);return r.jsxs("div",{css:Kx,children:[r.jsx("div",{css:Gx,children:r.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"0.75rem"},children:[r.jsx(Of,{icon:r.jsx(If,{rotate:"180"}),"aria-label":u.upLabel,onClick:o}),r.jsx(Of,{icon:r.jsx(If,{}),"aria-label":u.downLabel,onClick:i})]})}),r.jsxs("div",{style:{width:"100%"},children:[r.jsxs("div",{css:Zx,children:[r.jsxs("div",{children:[r.jsx("h3",{css:Jx,children:e}),r.jsx("p",{css:Xx,children:t})]}),r.jsx(Ef,{label:u.removeLabel,size:"small",variant:"secondary",rightIcon:r.jsx(zf,{}),onClick:s})]}),a,r.jsxs("div",{css:Yx,children:[r.jsx(Ef,{label:u.aboutDataLabel,size:"small",variant:"secondary",leftIcon:r.jsx(Df,{}),onClick:l}),r.jsx(rw,{defaultValue:80,onOpacityChanged:c})]})]})]})},exports.List=Ow,exports.MapControlsToolbar=({onZoomInClick:e,onZoomOutClick:n,onExpandClick:r,onShareClick:o,onPrintClick:i,onSettingsClick:s,onQuestionClick:a,vertical:l,expanded:c,showExpandedToggle:d,ariaLabel:u,labels:h})=>{const p=Mf("MapControlsToolbar",h),f=[{icon:t.jsx(Kf,{}),label:p.zoomInLabel,ariaLabel:p.zoomInAriaLabel,onClick:e},{icon:t.jsx(Gf,{}),label:p.zoomOutLabel,ariaLabel:p.zoomOutAriaLabel,onClick:n,gap:!0},{icon:t.jsx(Zf,{}),label:p.expandLabel,ariaLabel:p.expandAriaLabel,onClick:r,gap:!0},{icon:t.jsx(Jf,{}),label:p.shareLabel,ariaLabel:p.shareAriaLabel,onClick:o,gap:!0},{icon:t.jsx(Xf,{}),label:p.printLabel,ariaLabel:p.printAriaLabel,onClick:i,gap:!0},{icon:t.jsx(Yf,{}),label:p.settingsLabel,ariaLabel:p.settingsAriaLabel,onClick:s,gap:!0},{icon:t.jsx(Qf,{}),label:p.helpLabel,ariaLabel:p.helpAriaLabel,onClick:a}];return t.jsx(ug,{items:f,vertical:l,expanded:c,showExpandedToggle:d,ariaLabel:u||p.toolbarAriaLabel})},exports.MapMarker=vb,exports.MapMarkers=bb,exports.MapPopUp=({open:e,onOpenChange:t,anchorRef:o,header:i,content:s,footer:a,placement:c="bottom",offset:d=30,closeOnEscape:u=!0,closeOnOutsideClick:h=!1,labels:p})=>{const f=Mf("MapPopUp",p),m=n.useRef(null),{refs:g,floatingStyles:v,context:b,middlewareData:y,placement:x}=Sx({open:e,onOpenChange:t,placement:c,whileElementsMounted:Uy,middleware:[ox(d),(w={fallbackAxisSideDirection:"start"},{...Zy(w),options:[w,C]}),ix({padding:8}),sx({element:m})]});var w,C;n.useEffect((()=>{o?.current&&g.setReference(o.current)}),[o,g]);const k=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:s=!0,escapeKey:a=!0,outsidePress:c=!0,outsidePressEvent:d="pointerdown",referencePress:u=!1,referencePressEvent:h="pointerdown",ancestorScroll:p=!1,bubbles:f,capture:m}=t,g=yx(),v=$y("function"==typeof c?c:()=>!1),b="function"==typeof c?v:c,y=l.useRef(!1),{escapeKey:x,outsidePress:w}=Cx(f),{escapeKey:C,outsidePress:k}=Cx(m),S=l.useRef(!1),$=$y((e=>{var t;if(!n||!s||!a||"Escape"!==e.key)return;if(S.current)return;const o=null==(t=i.current.floatingContext)?void 0:t.nodeId,l=g?Cy(g.nodesRef.current,o):[];if(!x&&(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")})),j=$y((e=>{var t;const n=()=>{var t;$(e),null==(t=yy(e))||t.removeEventListener("keydown",n)};null==(t=yy(e))||t.addEventListener("keydown",n)})),M=$y((e=>{var t;const n=i.current.insideReactTree;i.current.insideReactTree=!1;const s=y.current;if(y.current=!1,"click"===d&&s)return;if(n)return;if("function"==typeof b&&!b(e))return;const a=yy(e),l="[data-floating-ui-inert]",c=wy(o.floating).querySelectorAll(l);let u=Sb(a)?a:null;for(;u&&!Vb(u);){const e=_b(u);if(Vb(e)||!Sb(e))break;u=e}if(c.length&&Sb(a)&&!a.matches("html,body")&&!by(a,o.floating)&&Array.from(c).every((e=>!by(u,e))))return;if($b(a)&&O){const t=Vb(a),n=Bb(a),r=/auto|scroll/,o=t||r.test(n.overflowX),i=t||r.test(n.overflowY),s=o&&a.clientWidth>0&&a.scrollWidth>a.clientWidth,l=i&&a.clientHeight>0&&a.scrollHeight>a.clientHeight,c="rtl"===n.direction,d=l&&(c?e.offsetX<=a.offsetWidth-a.clientWidth:e.offsetX>a.clientWidth),u=s&&e.offsetY>a.clientHeight;if(d||u)return}const h=null==(t=i.current.floatingContext)?void 0:t.nodeId,p=g&&Cy(g.nodesRef.current,h).some((t=>{var n;return xy(e,null==(n=t.context)?void 0:n.elements.floating)}));if(xy(e,o.floating)||xy(e,o.domReference)||p)return;const f=g?Cy(g.nodesRef.current,h):[];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")})),E=$y((e=>{var t;const n=()=>{var t;M(e),null==(t=yy(e))||t.removeEventListener(d,n)};null==(t=yy(e))||t.addEventListener(d,n)}));l.useEffect((()=>{if(!n||!s)return;i.current.__escapeKeyBubbles=x,i.current.__outsidePressBubbles=w;let e=-1;function t(e){r(!1,e,"ancestor-scroll")}function l(){window.clearTimeout(e),S.current=!0}function c(){e=window.setTimeout((()=>{S.current=!1}),Pb()?5:0)}const u=wy(o.floating);a&&(u.addEventListener("keydown",C?j:$,C),u.addEventListener("compositionstart",l),u.addEventListener("compositionend",c)),b&&u.addEventListener(d,k?E:M,k);let h=[];return p&&(Sb(o.domReference)&&(h=qb(o.domReference)),Sb(o.floating)&&(h=h.concat(qb(o.floating))),!Sb(o.reference)&&o.reference&&o.reference.contextElement&&(h=h.concat(qb(o.reference.contextElement)))),h=h.filter((e=>{var t;return e!==(null==(t=u.defaultView)?void 0:t.visualViewport)})),h.forEach((e=>{e.addEventListener("scroll",t,{passive:!0})})),()=>{a&&(u.removeEventListener("keydown",C?j:$,C),u.removeEventListener("compositionstart",l),u.removeEventListener("compositionend",c)),b&&u.removeEventListener(d,k?E:M,k),h.forEach((e=>{e.removeEventListener("scroll",t)})),window.clearTimeout(e)}}),[i,o,a,b,d,n,r,p,s,x,w,$,C,j,M,k,E]),l.useEffect((()=>{i.current.insideReactTree=!1}),[i,b,d]);const T=l.useMemo((()=>({onKeyDown:$,...u&&{[xx[h]]:e=>{r(!1,e.nativeEvent,"reference-press")},..."click"!==h&&{onClick(e){r(!1,e.nativeEvent,"reference-press")}}}})),[$,r,u,h]),O=l.useMemo((()=>({onKeyDown:$,onMouseDown(){y.current=!0},onMouseUp(){y.current=!0},[wx[d]]:()=>{i.current.insideReactTree=!0}})),[$,d,i]);return l.useMemo((()=>s?{reference:T,floating:O}:{}),[s,T,O])}(b,{escapeKey:u,outsidePress:h}),S=Mx(b,{role:"dialog"}),{getFloatingProps:$}=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=>$x(t,e,"reference")),t),i=l.useCallback((t=>$x(t,e,"floating")),n),s=l.useCallback((t=>$x(t,e,"item")),r);return l.useMemo((()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s})),[o,i,s])}([k,S]),{x:j,y:M}=y.arrow??{x:null,y:null},E={top:"bottom",right:"left",bottom:"top",left:"right"}[x.split("-")[0]];if(!e)return null;let T=d-1,O=4;return"left"!==E&&"right"!==E||(T=4,O=d-1),r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:g.setFloating,style:v,"aria-label":f.dialogAriaLabel,"aria-modal":!0,...$(),css:Ex,children:[r.jsxs("div",{css:Tx,children:[i,r.jsx(sg,{onClick:()=>t(!1),className:"ds-map-pop-up-close-button","aria-label":f.closeLabel})]}),r.jsx("div",{css:Ox,children:s}),a?r.jsx("div",{css:Lx,children:a}):null,r.jsx("div",{ref:m,css:Ax(T,O,j,M,E,d)})]}),r.jsx("div",{className:"fixed inset-0 z-[999] bg-black/20 backdrop-blur-[1px]",onClick:()=>h&&t(!1)})]})},exports.Menu=jm,exports.MobileSearch=({value:t,placeholder:o,showInfoMessage:i=!0,items:s=[],disabled:a,readOnly:l,id:c,name:d,autoFocus:u,autoComplete:h,onBlur:p,onFocus:f,onQueryChange:m,onCancel:g,onItemClick:v,onChange:b,labels:y})=>{const x=Mf("MobileSearch",y),[C,k]=n.useState(t??""),[S,$]=n.useState(!0),[j,M]=n.useState(!1),E=n.useRef(null),T="string"==typeof t,O=T?t:C;n.useEffect((()=>{T&&k(t)}),[T,t]),n.useEffect((()=>{m?.(O)}),[O,m]);const L=n.useMemo((()=>{const e=O.trim().toLowerCase();return e?s.filter((t=>`${t.id??""} ${t.label} ${t.caption??""}`.toLowerCase().includes(e))):s}),[s,O]),A=O.trim().length?x.matchingResultsTitle(L.length):x.recentSearchesTitle,R=O.length?r.jsx(sg,{onClick:()=>{T||k("");const e=E.current?.querySelector("input");e&&(e.value="",e.focus()),$(!0)}}):null;let N=w("neutral",500);return a?N=w("neutral",500):j&&(N=w("primary",700)),r.jsxs("div",{ref:E,css:NT,children:[r.jsxs("div",{css:DT,children:[r.jsx("div",{css:IT,children:r.jsx(e.InputGroup,{startElement:r.jsx(hm,{width:"1.25rem",height:"1.25rem",fill:N,"aria-hidden":"true"}),endElement:R,children:r.jsx(Ym,{label:"",value:O,placeholder:o??x.inputAriaLabel,onChange:e=>{T||k(e.target.value),$(!0),b?.(e)},onFocus:e=>{M(!0),$(!0),f?.(e)},onBlur:e=>{M(!1),p?.(e)},noMarginBottom:!0,type:"search","aria-label":o??x.inputAriaLabel,disabled:a,readOnly:l,id:c,name:d,autoFocus:u??!0,autoComplete:h,style:{paddingLeft:"2.5rem"}})})}),r.jsx(Ef,{css:PT,variant:"borderless",label:x.cancelLabel,onClick:()=>{T||k(""),$(!1);const e=E.current?.querySelector("input");e&&(e.value="",e.blur()),g?.()}})]}),S?r.jsxs("div",{css:zT,children:[r.jsx("h3",{css:VT,children:A}),i?r.jsx("div",{css:BT,children:r.jsx(RT,{label:x.infoLabel,variant:"info-white",size:"full-width"})}):null,r.jsx("ul",{css:HT,"aria-label":A,children:L.map((t=>r.jsx("li",{children:r.jsxs(e.chakra.button,{type:"button",css:_T,onClick:()=>(e=>{v?.(e)})(t),"aria-label":`${t.label}, ${t.caption??""}`,style:{width:"100%"},children:[t.icon??null,r.jsxs("div",{css:FT,children:[r.jsx("p",{css:qT,children:t.label}),r.jsx("p",{css:WT,children:t.caption})]})]})},t.id)))})]}):null]})},exports.MobileTabBar=({defaultValue:t,tabs:o,onTabClick:i,hideLabels:s,activationMode:a="manual",labels:l})=>{const c=Mf("MobileTabBar",l),d=o.length,[u,h]=n.useState((()=>oO(o,t)));return r.jsx("div",{css:eO,children:r.jsx(e.Tabs.Root,{width:"full",defaultValue:t||o?.[0]?.value,onValueChange:({value:e})=>(e=>{const t=oO(o,e);h(t),i&&i(e)})(e),activationMode:a,children:r.jsx(e.Tabs.List,{alignItems:"center",border:"none",children:o.map(((t,n)=>{const{label:o,icon:i,bagdeCount:a,"aria-label":l,"aria-describedby":h,disabled:p,...f}=t,m=`${t.value}-str-status`,g=u===n,v=[c.tabPositionStatus(n+1,d),g?c.selectedStatus:c.notSelectedStatus];p&&v.push(c.disabledStatus);const b=[h,m].filter(Boolean).join(" ")||void 0;return r.jsxs(e.Tabs.Trigger,{css:tO,"aria-label":l||o,"aria-disabled":!!p||void 0,"aria-describedby":b,disabled:p,...f,children:[r.jsxs("div",{css:nO,children:[i,a?r.jsx("div",{css:rO,className:"ds-badge-count",children:a}):null]}),s?null:r.jsx("p",{children:o}),r.jsx(e.VisuallyHidden,{id:m,children:v.join(", ")})]},t.value)}))})})})},exports.Modal=({header:t,content:o,footer:i,size:s="medium",width:a,height:l,maxHeight:c,draggable:d,blocking:u,open:h,onClose:p,labels:f,lazyMount:m,unmountOnExit:g,restoreFocus:v,modal:b,initialFocusEl:y,finalFocusEl:x})=>{const w=Mf("Modal",f),C=n.useRef(null);return h?r.jsx(e.Dialog.Root,{open:h,onOpenChange:p,placement:"center",scrollBehavior:"inside",closeOnInteractOutside:!d&&!u,preventScroll:!d&&!u,closeOnEscape:!u,defaultOpen:!0,lazyMount:m,unmountOnExit:g,restoreFocus:v,modal:b,initialFocusEl:y,finalFocusEl:x,children:r.jsxs(e.Portal,{children:[d?null:r.jsx(e.Dialog.Backdrop,{css:{background:"rgba(0, 0, 0, 0.64)"}}),r.jsx(YC,{disabled:!d,nodeRef:C,children:r.jsx(e.Dialog.Positioner,{ref:C,children:r.jsxs(e.Dialog.Content,{"aria-label":w.dialogAriaLabel,css:QC(s,a,l,c),children:[r.jsxs(e.Dialog.Header,{css:ek,children:[t,u?null:r.jsx(e.Dialog.CloseTrigger,{css:tk,asChild:!0,children:r.jsx(sg,{})})]}),r.jsx(e.Dialog.Body,{css:nk,children:o}),i?r.jsx(e.Dialog.Footer,{padding:"0.75rem",children:i}):null]})})})]})}):null},exports.MultiActionButton=({variant:t="primary",size:o="default",mainActionLabel:i,mainActionOnClick:s=()=>{},otherActions:a=[],disabled:l,mainActionLeftIcon:c,mainActionRightIcon:d,...u})=>{const[h,p]=n.useState(!1),f=l?`${i} action button with menu, disabled`:void 0;return r.jsxs(e.Group,{css:mg,attached:!0,tabIndex:l?0:void 0,"aria-disabled":l,"aria-label":f,role:"group",children:[r.jsx(Ef,{css:{},label:i,variant:t,size:o,onClick:s,disabled:l,leftIcon:c,rightIcon:d,...u}),r.jsxs(e.Menu.Root,{onOpenChange:({open:e})=>p(e),positioning:{placement:"bottom-end"},children:[r.jsx(e.Menu.Trigger,{css:pg(t),"data-group-item":!0,"data-last":!0,asChild:!0,children:r.jsx(Ef,{style:gg,"aria-label":`Open ${i} options`,"aria-haspopup":"menu","aria-expanded":h,variant:t,size:o,leftIcon:r.jsx(If,{"aria-hidden":"true",rotate:h?"180":"0",color:w("accessible","text-on-primary-mids")||w("primary",900)}),disabled:l})}),r.jsx(vg,{children:a.map((({label:t,value:n,onClick:i})=>r.jsx(e.Menu.Item,{css:fg(o),onClick:i,value:n,children:t},n)))})]})]})},exports.Navbar=({variant:e="default",theme:t="light",logo:o,linkRouter:i,pathname:s,navigationSection:a,utilitySection:l,actionsSection:c,maxWidth:d,fixed:u,onNavbarHeightChange:h,backgroundColor:p,labels:f})=>{const m=Mf("Navbar",f),g=n.useRef(null),v=n.useRef(null),b=n.useRef(null),[y,x]=n.useState(!1),[w,C]=n.useState(-1),[k,S]=n.useState("undefined"!=typeof window&&window?.innerWidth<=MO),[$,j]=n.useState(!1),M=i,E=n.useCallback((()=>{if(v.current&&g.current&&b.current){const e=g.current.getBoundingClientRect(),t=v.current.getBoundingClientRect(),n=b.current.getBoundingClientRect();t.width,e.width,window.innerWidth<=MO||window.innerWidth<=w?(h?.(96),x(!0)):window.innerWidth>MO&&window.innerWidth<=1440?e.right>=t.left?(h?.(96),x(!0),C(window.innerWidth)):window.innerWidth>w&&(h?.(48),x(!1),C(-1)):(h?.(48),x(!1),C(-1)),y&&(window.innerWidth<=MO||n.right>=t.left?(S(!0),h?.(48)):(S(!1),h?.(96)))}}),[w,y]);n.useEffect((()=>(E(),window.addEventListener("resize",E),()=>{window.removeEventListener("resize",E)})),[E]);const T="condensed"===e;return r.jsxs("nav",{css:iO(y&&!k,u,p,t,T),children:[r.jsxs("div",{css:aO(y&&!k,d,T),children:[r.jsxs("div",{css:lO(y&&!k||"dark"===t,T),ref:g,children:[o?r.jsx("div",{ref:b,css:cO,children:o}):null,r.jsx("div",{css:dO(y),children:a?.map((e=>e.link?r.jsx(M,{to:e.link,href:e.link,css:uO(s===e.link,t,T),children:e.label},e.label):r.jsx(jm,{theme:t,label:e.label,fontSize:T?"0.875rem":"1rem",items:e.items||[]},e.label)))})]}),r.jsx("div",{css:hO(T),ref:v,children:k?r.jsxs("button",{type:"button",onClick:()=>j(!$),"aria-label":$?m.closeMenuLabel:m.openMenuLabel,"aria-expanded":$,css:mO(t),children:[$?m.closeLabel:m.menuLabel,$?r.jsx(zf,{height:T?"0.75rem":"1rem",width:T?"0.75rem":"1rem"}):r.jsx(lm,{height:T?"0.75rem":"1rem",width:T?"0.75rem":"1rem"})]}):r.jsxs(r.Fragment,{children:[r.jsx("div",{css:hO(T),children:l?.map(((e,t)=>r.jsx("div",{css:pO(y),children:e},t)))}),c?.length?r.jsx("div",{css:fO(y),children:c.map((e=>r.jsx(Ef,{...e},e.ariaLabel)))}):null]})})]}),y&&!k?r.jsx("div",{css:sO(t,T),children:a?.map((e=>e.link?r.jsx(M,{to:e.link,href:e.link,css:uO(s===e.link,t,T),children:e.label},e.label):r.jsx(jm,{theme:t,label:e.label,fontSize:T?"0.875rem":"1rem",items:e.items||[]},e.label)))}):null,k?r.jsx(jO,{theme:t,variant:e,navigationSection:a,utilitySection:l,actionsSection:c,linkRouter:i,isOpen:$,setIsOpen:j,pathname:s,resolvedLabels:m}):null]})},exports.NavigationRail=({tabs:t=[],defaultValue:o,onTabClick:i,children:s,onOpenChange:a,labels:l})=>{const c=Mf("NavigationRail",l),[d,u]=n.useState(!1),[h,p]=n.useState(o||t?.[0]?.value),f=e=>{p(e),i&&i(e)},[m]=e.useMediaQuery(["(max-width: 48rem)"]);return m?r.jsxs(e.Tabs.Root,{defaultValue:h,onValueChange:({value:e})=>f(e),children:[r.jsx(e.Tabs.List,{style:{display:"flex",overflowX:"auto",whiteSpace:"nowrap",padding:"0.5rem",gap:"0.5rem"},children:t.map((t=>r.jsx(e.Tabs.Trigger,{value:t.value,css:{"--indicator-color":w("primary",500),flexShrink:0,padding:"0.625rem 1rem",color:w("neutral",600),"&[data-selected]":{color:w("neutral",800),fontWeight:600}},children:t.label},t.value)))}),t.map((t=>r.jsx(e.Tabs.Content,{value:t.value,children:s},t.value)))]}):r.jsxs("div",{style:{height:"calc(100vh - 3rem - 3.5rem)",position:"fixed",top:"3rem",left:0,display:"flex"},children:[r.jsxs("div",{css:EO,children:[r.jsx(e.Tabs.Root,{defaultValue:o||t?.[0]?.value,orientation:"horizontal",width:"full",onValueChange:({value:e})=>{f(e)},children:r.jsx(e.Tabs.List,{alignItems:"center",border:"none",style:{flexDirection:"column"},children:t.map((t=>r.jsx(e.Tabs.Trigger,{css:TO,"aria-label":t["aria-label"]||t.label,...t,children:r.jsxs(e.Box,{display:"flex",alignItems:"center",flexDirection:"column",gap:"0.3125rem",className:"ds-tab-label",children:[t.icon?r.jsx("div",{css:OO,children:t.icon}):null,r.jsx("p",{children:t.label})]})},t.label)))})}),s?r.jsx(e.Collapsible.Root,{onOpenChange:({open:e})=>{u(e),a&&a(!e)},children:r.jsxs(e.Collapsible.Trigger,{css:LO,children:[r.jsx("div",{css:OO,children:d?r.jsx(Af,{}):r.jsx(Lf,{})}),r.jsxs("div",{className:"ds-tab-label",children:[r.jsx("p",{children:d?c.showLabel:c.hideLabel}),r.jsx("p",{children:c.sidebarLabel})]})]})}):null]}),s?r.jsx(e.Collapsible.Root,{defaultOpen:!0,open:!d,children:r.jsx(e.Collapsible.Content,{height:"100%",children:r.jsx("div",{css:AO,role:"tabpanel","aria-labelledby":h,children:s})})}):null]})},exports.OptionCard=({defaultValue:t,items:n,onValueChange:o,variant:s,itemWidth:a,hideControl:l})=>r.jsx(e.RadioCard.Root,{defaultValue:t,onValueChange:o,children:r.jsx(e.HStack,{alignItems:"flex-start",flexWrap:"wrap",gap:"0.75rem",children:n?.map((t=>{return r.jsxs(e.RadioCard.Item,{css:(o=a,c=t.selectedColor,d=t.selectedBackgroundColor,i.css`
3919
3930
  width: ${o||"15.0625rem"};
3920
3931
  min-height: 4.375rem;
3921
3932
  padding: ${k(300)};
@@ -3973,7 +3984,7 @@ function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3973
3984
  padding: 0;
3974
3985
  padding-top: ${k(200)};
3975
3986
  color: ${n?w("neutral",500):"inherit"};
3976
- `),children:t.children}):null]},`${t.label}-${t.value}`);var n,o,c,d}))})}),exports.Pagination=Dw,exports.Panel=({header:e,content:t,footer:o,variant:i="fixed",width:s})=>{const a=n.useId(),[l,c]=n.useState(void 0),[d,u]=n.useState(void 0),h=n.useRef(null),p=n.useRef(null);n.useEffect((()=>{c(h?.current?.getBoundingClientRect()?.height),u(p?.current?.getBoundingClientRect()?.height)}),[e,o]);return r.jsxs("div",{role:"region","aria-labelledby":e?a:void 0,css:[nk(s),"fixed"===i?rk:ok],children:[e?r.jsx("div",{id:a,css:ik,ref:h,children:e}):null,r.jsx("div",{css:sk(l,d),children:t}),o?r.jsx("div",{css:ak,ref:p,children:o}):null]})},exports.Password=({label:e,caption:t,required:o,disabledRules:s,onChange:a,minLength:l=8,hideValidations:c,labels:d})=>{const u=Mf("Password",d),[h,p]=n.useState(!1),[f,m]=n.useState(""),[g,v]=n.useState({strength:"very-weak",length:!1,uppercase:!1,lowercase:!1,numbers:!1,specialCharacters:!1}),b={"very-weak":u.strengthVeryWeak,weak:u.strengthWeak,medium:u.strengthMedium,strong:u.strengthStrong,"very-strong":u.strengthVeryStrong};return r.jsxs("div",{css:zv,children:[r.jsxs("p",{css:Vv,"aria-label":e,children:[o?r.jsx("span",{children:"*"}):null,e]}),r.jsx("p",{css:Bv,"aria-label":t,children:t}),r.jsxs("div",{css:Hv,children:[r.jsx(Ym,{type:h?"text":"password","aria-label":e,value:f,"aria-describedby":"password-guidelines",onChange:e=>(e=>{const t={...g};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"),m(e),v(t),a&&a({...t,password:e})})(e.target.value)}),r.jsx(Ef,{label:h?u.hideLabel:u.showLabel,variant:"secondary",leftIcon:h?r.jsx(Hf,{}):r.jsx(Bf,{}),"aria-label":h?u.hidePasswordLabel:u.showPasswordLabel,onClick:()=>p(!h),type:"button"})]}),f&&!c?r.jsxs("div",{id:"password-guidelines",css:_v,"aria-live":"polite",children:[r.jsxs("p",{css:(y=g.strength,i.css`
3987
+ `),children:t.children}):null]},`${t.label}-${t.value}`);var n,o,c,d}))})}),exports.Pagination=Dw,exports.Panel=({header:e,content:t,footer:o,variant:i="fixed",width:s})=>{const a=n.useId(),[l,c]=n.useState(void 0),[d,u]=n.useState(void 0),h=n.useRef(null),p=n.useRef(null);n.useEffect((()=>{c(h?.current?.getBoundingClientRect()?.height),u(p?.current?.getBoundingClientRect()?.height)}),[e,o]);return r.jsxs("div",{role:"region","aria-labelledby":e?a:void 0,css:[rk(s),"fixed"===i?ok:ik],children:[e?r.jsx("div",{id:a,css:sk,ref:h,children:e}):null,r.jsx("div",{css:ak(l,d),children:t}),o?r.jsx("div",{css:lk,ref:p,children:o}):null]})},exports.Password=({label:e,caption:t,required:o,disabledRules:s,onChange:a,minLength:l=8,hideValidations:c,labels:d})=>{const u=Mf("Password",d),[h,p]=n.useState(!1),[f,m]=n.useState(""),[g,v]=n.useState({strength:"very-weak",length:!1,uppercase:!1,lowercase:!1,numbers:!1,specialCharacters:!1}),b={"very-weak":u.strengthVeryWeak,weak:u.strengthWeak,medium:u.strengthMedium,strong:u.strengthStrong,"very-strong":u.strengthVeryStrong};return r.jsxs("div",{css:zv,children:[r.jsxs("p",{css:Vv,"aria-label":e,children:[o?r.jsx("span",{children:"*"}):null,e]}),r.jsx("p",{css:Bv,"aria-label":t,children:t}),r.jsxs("div",{css:Hv,children:[r.jsx(Ym,{type:h?"text":"password","aria-label":e,value:f,"aria-describedby":"password-guidelines",onChange:e=>(e=>{const t={...g};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"),m(e),v(t),a&&a({...t,password:e})})(e.target.value)}),r.jsx(Ef,{label:h?u.hideLabel:u.showLabel,variant:"secondary",leftIcon:h?r.jsx(Hf,{}):r.jsx(Bf,{}),"aria-label":h?u.hidePasswordLabel:u.showPasswordLabel,onClick:()=>p(!h),type:"button"})]}),f&&!c?r.jsxs("div",{id:"password-guidelines",css:_v,"aria-live":"polite",children:[r.jsxs("p",{css:(y=g.strength,i.css`
3977
3988
  font-size: ${C(400)};
3978
3989
  line-height: ${S(600)};
3979
3990
  font-weight: 400;
@@ -3984,7 +3995,7 @@ function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3984
3995
  font-weight: 700;
3985
3996
  color: ${w("medium"===y?"warning":"strong"===y||"very-strong"===y?"success":"error",900)};
3986
3997
  }
3987
- `),"aria-live":"polite",role:"status",children:[u.strengthPrefix," ",r.jsx("span",{children:b[g.strength]})]}),r.jsx("div",{css:Fv(g.strength),children:r.jsx("div",{})}),r.jsxs("div",{css:qv(g.length),"aria-label":`${u.minLengthRule(l)}. ${g.length?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.length?r.jsx(Rf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(zf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.minLengthRule(l)})]}),s?.uppercase?null:r.jsxs("div",{css:qv(g.uppercase),"aria-label":`${u.uppercaseRule}. ${g.uppercase?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.uppercase?r.jsx(Rf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(zf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.uppercaseRule})]}),s?.lowercase?null:r.jsxs("div",{css:qv(g.lowercase),"aria-label":`${u.lowercaseRule}. ${g.lowercase?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.lowercase?r.jsx(Rf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(zf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.lowercaseRule})]}),s?.numbers?null:r.jsxs("div",{css:qv(g.numbers),"aria-label":`${u.numberRule}. ${g.numbers?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.numbers?r.jsx(Rf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(zf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.numberRule})]}),s?.specialCharacters?null:r.jsxs("div",{css:qv(g.specialCharacters),"aria-label":`${u.specialCharRule}. ${g.specialCharacters?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.specialCharacters?r.jsx(Rf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(zf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.specialCharRule})]})]}):null]});var y},exports.ProgressBar=({progress:e,labels:t})=>{const n=Mf("ProgressBar",t);let o=e;return o>100&&(o=100),o<0&&(o=0),r.jsx("div",{css:nL,role:"progressbar","aria-label":n.progressAriaLabel(o),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":o,children:r.jsx("div",{css:rL(o)})})},exports.QualitativeAttribute=({type:e,label:t,caption:o,color:i,onActionClick:s,showActionButton:a,pointIcon:l=r.jsx(em,{color:"#006D2C"}),ariaLabelType:c="",labels:d})=>{const u=Mf("QualitativeAttribute",d),[h,p]=n.useState(!0),f=n.useId(),m=n.useId(),g="raster"===e,v="line"===e,b="point"===e,y=n.useId(),x=n.useMemo((()=>{const e=h?u.visibleText:u.hiddenText;let n=c??`${c},`;return v&&(n=u.linePrefix),u.currentlyTemplate(String(t),o,n,e)}),[h,e,t,o,c,u]),w=h?u.hideLabel:u.showLabel;return r.jsxs("div",{css:aw,children:[r.jsx("p",{id:y,css:{position:"absolute",width:1,height:1,margin:-1,padding:0,border:0,clip:"rect(0 0 0 0)",overflow:"hidden"},children:x}),r.jsxs("div",{css:lw,children:[r.jsxs("div",{children:[g&&r.jsx("div",{css:ow(i)}),v&&r.jsx("div",{css:iw(i)}),b&&r.jsx("div",{css:sw(i),children:l})]}),r.jsxs("div",{children:[r.jsx("p",{id:f,css:cw,children:t}),o?r.jsx("p",{id:m,css:dw,children:o}):null]})]}),s&&a?r.jsx("div",{css:uw,children:r.jsx(Ef,{type:"button",variant:"borderless",label:String(w),rightIcon:h?r.jsx(Hf,{}):r.jsx(Bf,{}),"aria-pressed":h,"aria-labelledby":`${y} ${f}`,onClick:()=>{p((e=>!e)),s?.()}})}):null]})},exports.Radio=Vg,exports.RadioGroup=Bg,exports.RadioList=({label:t,caption:n,name:o,radios:s,defaultValue:a,onCheckedChange:l,errorMessage:c,horizontal:d,variant:u="default",required:h,labels:p})=>{const f=Mf("RadioList",p),m=`${t}. ${n?`${n}.`:""} ${h?f.requiredLabel:f.optionalLabel} ${c?`${f.errorPrefix} ${c}.`:""} `;return r.jsxs(e.Group,{css:Wv,"aria-roledescription":"group","aria-label":m,children:[c?r.jsx("div",{css:Zv}):null,r.jsxs("div",{css:(g=!!c,i.css`
3998
+ `),"aria-live":"polite",role:"status",children:[u.strengthPrefix," ",r.jsx("span",{children:b[g.strength]})]}),r.jsx("div",{css:Fv(g.strength),children:r.jsx("div",{})}),r.jsxs("div",{css:qv(g.length),"aria-label":`${u.minLengthRule(l)}. ${g.length?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.length?r.jsx(Rf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(zf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.minLengthRule(l)})]}),s?.uppercase?null:r.jsxs("div",{css:qv(g.uppercase),"aria-label":`${u.uppercaseRule}. ${g.uppercase?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.uppercase?r.jsx(Rf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(zf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.uppercaseRule})]}),s?.lowercase?null:r.jsxs("div",{css:qv(g.lowercase),"aria-label":`${u.lowercaseRule}. ${g.lowercase?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.lowercase?r.jsx(Rf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(zf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.lowercaseRule})]}),s?.numbers?null:r.jsxs("div",{css:qv(g.numbers),"aria-label":`${u.numberRule}. ${g.numbers?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.numbers?r.jsx(Rf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(zf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.numberRule})]}),s?.specialCharacters?null:r.jsxs("div",{css:qv(g.specialCharacters),"aria-label":`${u.specialCharRule}. ${g.specialCharacters?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.specialCharacters?r.jsx(Rf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(zf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.specialCharRule})]})]}):null]});var y},exports.ProgressBar=({progress:e,labels:t})=>{const n=Mf("ProgressBar",t);let o=e;return o>100&&(o=100),o<0&&(o=0),r.jsx("div",{css:rL,role:"progressbar","aria-label":n.progressAriaLabel(o),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":o,children:r.jsx("div",{css:oL(o)})})},exports.QualitativeAttribute=({type:e,label:t,caption:o,color:i,onActionClick:s,showActionButton:a,pointIcon:l=r.jsx(em,{color:"#006D2C"}),ariaLabelType:c="",labels:d})=>{const u=Mf("QualitativeAttribute",d),[h,p]=n.useState(!0),f=n.useId(),m=n.useId(),g="raster"===e,v="line"===e,b="point"===e,y=n.useId(),x=n.useMemo((()=>{const e=h?u.visibleText:u.hiddenText;let n=c??`${c},`;return v&&(n=u.linePrefix),u.currentlyTemplate(String(t),o,n,e)}),[h,e,t,o,c,u]),w=h?u.hideLabel:u.showLabel;return r.jsxs("div",{css:aw,children:[r.jsx("p",{id:y,css:{position:"absolute",width:1,height:1,margin:-1,padding:0,border:0,clip:"rect(0 0 0 0)",overflow:"hidden"},children:x}),r.jsxs("div",{css:lw,children:[r.jsxs("div",{children:[g&&r.jsx("div",{css:ow(i)}),v&&r.jsx("div",{css:iw(i)}),b&&r.jsx("div",{css:sw(i),children:l})]}),r.jsxs("div",{children:[r.jsx("p",{id:f,css:cw,children:t}),o?r.jsx("p",{id:m,css:dw,children:o}):null]})]}),s&&a?r.jsx("div",{css:uw,children:r.jsx(Ef,{type:"button",variant:"borderless",label:String(w),rightIcon:h?r.jsx(Hf,{}):r.jsx(Bf,{}),"aria-pressed":h,"aria-labelledby":`${y} ${f}`,onClick:()=>{p((e=>!e)),s?.()}})}):null]})},exports.Radio=Vg,exports.RadioGroup=Bg,exports.RadioList=({label:t,caption:n,name:o,radios:s,defaultValue:a,onCheckedChange:l,errorMessage:c,horizontal:d,variant:u="default",required:h,labels:p})=>{const f=Mf("RadioList",p),m=`${t}. ${n?`${n}.`:""} ${h?f.requiredLabel:f.optionalLabel} ${c?`${f.errorPrefix} ${c}.`:""} `;return r.jsxs(e.Group,{css:Wv,"aria-roledescription":"group","aria-label":m,children:[c?r.jsx("div",{css:Zv}):null,r.jsxs("div",{css:(g=!!c,i.css`
3988
3999
  margin-left: ${g?"1.1875rem":"0"};
3989
4000
  `),children:[r.jsxs("p",{css:Uv,"aria-label":t,children:[h&&r.jsx("span",{"aria-label":f.requiredSymbolLabel,children:"*"}),t]}),r.jsx("p",{css:Kv,"aria-label":n,children:n}),c?r.jsx("p",{css:Jv,"aria-label":c,children:c}):null,r.jsx("div",{css:Gv,children:r.jsx(Bg,{name:o,value:a,onChange:l,horizontal:d&&"card"!==u,children:s.map((e=>r.jsx(Vg,{css:"card"===u?Xv:{},...e},e.value)))})})]})]});var g},exports.RichTextEditor=({defaultValue:e="",disabled:t=!1,ariaLabel:n,placeholder:o,minHeight:i,visibleControls:s=rg,onChange:a,labels:c})=>{const d=Mf("RichTextEditor",c),u=n||d.editorAriaLabel,h=o||d.placeholder,p=i,f=pf({extensions:[ap.configure({link:!1}),ru.configure({openOnClick:!0,autolink:!0,defaultProtocol:"https"}),oc,ip,qu.configure({placeholder:h,emptyEditorClass:"is-editor-empty"}),Wu,Uu,Ku.configure({types:["paragraph","heading"]}),th],content:e,editable:!t,shouldRerenderOnTransaction:!0,immediatelyRender:!1,onUpdate:({editor:e})=>{a?.(e.getHTML())},editorProps:{attributes:{"aria-label":u}}},[h,u]);return l.useEffect((()=>{f&&f.setEditable(!t)}),[f,t]),r.jsxs(ng.Root,{editor:f,disabled:t,css:{"& .ProseMirror":{minHeight:p||0}},children:[r.jsx(ng.Toolbar,{children:r.jsxs(ng.ControlGroup,{children:[s.includes("undo")?r.jsx(_m,{label:d.undoTooltip}):null,s.includes("redo")?r.jsx(Fm,{label:d.redoTooltip}):null,s.includes("textType")?r.jsx(Rm,{label:d.textTypeTooltip}):null,s.includes("alignment")?r.jsx(Wm,{label:d.alignmentTooltip,alignLeftLabel:d.alignLeftOptionLabel,alignCenterLabel:d.alignCenterOptionLabel,alignRightLabel:d.alignRightOptionLabel,alignJustifyLabel:d.alignJustifyOptionLabel}):null,s.includes("fontSize")?r.jsx(Nm,{label:d.fontSizeTooltip}):null,s.includes("bold")?r.jsx(Dm,{label:d.boldTooltip,icon:r.jsx("strong",{css:{fontSize:C(600),lineHeight:1},children:d.boldIconText})}):null,s.includes("italic")?r.jsx(Im,{label:d.italicTooltip,icon:r.jsx("em",{css:{fontStyle:"italic",fontSize:C(600),lineHeight:1},children:d.italicIconText})}):null,s.includes("underline")?r.jsx(Pm,{label:d.underlineTooltip,icon:r.jsx("span",{css:{fontSize:C(600),lineHeight:1,textDecoration:"underline"},children:d.underlineIconText})}):null,s.includes("strikethrough")?r.jsx(zm,{label:d.strikethroughTooltip,icon:r.jsx("span",{css:{fontSize:C(600),lineHeight:1,textDecoration:"line-through"},children:d.strikethroughIconText})}):null,s.includes("bulletList")?r.jsx(Vm,{label:d.bulletListTooltip}):null,s.includes("orderedList")?r.jsx(Bm,{label:d.orderedListTooltip}):null,s.includes("link")?r.jsx(Qm,{label:d.linkTooltip,urlPlaceholder:d.linkUrlPlaceholder,labelPlaceholder:d.linkLabelPlaceholder,labelInputAriaLabel:d.linkLabelAriaLabel,applyLabel:d.linkApplyLabel,removeLabel:d.linkRemoveLabel,invalidUrlMessage:d.linkInvalidUrlMessage}):null,s.includes("image")?r.jsx(Hm,{label:d.imageTooltip}):null]})}),r.jsx(ng.Content,{})]})},exports.SSOButtons=og,exports.ScaleBar=({colors:e,values:t,subLabels:n,isGradient:o})=>{return r.jsxs("div",{css:hw,children:[o?r.jsx("div",{css:(s=vw(e),i.css`
3990
4001
  height: ${k(500)};
@@ -3993,7 +4004,7 @@ function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3993
4004
  border: ${j(100)} solid ${w("neutral",300)};
3994
4005
  border-radius: ${$(300)};
3995
4006
  ${s?`background: ${s};`:""}
3996
- `)}):r.jsx("div",{css:pw,children:e?.map(((e,n)=>r.jsx("div",{"data-test":`${e}-${t?.[n]}`,style:{backgroundColor:e,width:"100%",height:"100%"}},`${e}-${t?.[n]}`)))}),r.jsx("div",{css:fw,children:t?.map((e=>r.jsx("div",{style:{width:o?"auto":`calc(100% / ${t.length})`,display:"flex",justifyContent:"center"},children:r.jsx("p",{css:mw,children:e})},e)))}),n&&n.length?r.jsx("div",{css:fw,children:n.map((e=>r.jsx("div",{style:{width:o?"auto":`calc(100% / ${t.length})`,display:"flex",justifyContent:"center"},children:r.jsx("p",{css:gw,style:{width:"100%"},children:e})},e)))}):null]});var s},exports.Search=({placeholder:t,disabled:o,size:i="default",options:s=[],resultsMaxHeight:a=50,isLoading:l=!1,displayResults:c="text",onSelect:d,onQueryChange:h,onClear:p,renderResults:f,labels:m})=>{const g=Mf("Search",m),[v,b]=n.useState(""),{open:y,onOpen:x,onClose:C}=e.useDisclosure(),[k,S]=n.useState(s),[$,j]=n.useState(-1),[M,E]=n.useState(!1),T=n.useRef(null),O=`search-results-${n.useId()}`,L=e=>{const t=s.find((t=>t.id===e||t.label===e));t&&(d?.(t),b(""),C())};n.useEffect((()=>{if(h?.(v),!v)return void S(s);const e=s.filter((e=>e.id?.toLowerCase().includes(v.toLowerCase())||e.label.toLowerCase().includes(v.toLowerCase())||e.caption?.toLowerCase().includes(v.toLowerCase()))).map((e=>({id:e.id,label:e.label,caption:e.caption,variant:"select",icon:e.icon,onItemClick:()=>L(e.id||e.label)})));S(e),x()}),[v]),n.useEffect((()=>{function e(e){y&&T.current&&!T.current.contains(e.target)&&C()}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}),[y]);const A=v.length?r.jsx(sg,{onClick:()=>{b(""),p?.()}}):null,R="none"!==c&&!!v.length&&k.length>0&&y;let N=w("neutral",500);o?N=w("neutral",500):M&&(N=w("primary",700));const D="small"===i?"1rem":"1.25rem",I=u(a);return r.jsxs("div",{ref:T,style:{position:"relative",width:"100%"},children:[r.jsx(e.InputGroup,{startElement:r.jsx(hm,{width:D,height:D,fill:N}),endElement:A,children:r.jsx(Ym,{autoComplete:"off",placeholder:t||g.filterPlaceholder,onChange:e=>{const{value:t}=e.target;b(t)},onFocus:()=>E(!0),onBlur:()=>E(!1),value:v,label:"",style:{paddingLeft:"2.5rem"},type:"search","aria-label":t||g.filterAriaLabel,"aria-expanded":R,"aria-controls":O,role:"combobox","aria-autocomplete":"list",disabled:o,size:i,noMarginBottom:!0,onKeyDown:e=>{if(R){if("ArrowDown"===e.key&&(e.preventDefault(),j((e=>Math.min(e+1,k.length-1)))),"ArrowUp"===e.key&&(e.preventDefault(),j((e=>Math.max(e-1,0)))),"Enter"===e.key&&(e.preventDefault(),$>=0)){const e=k[$];L(e.id||e.label)}"Escape"===e.key&&C()}}})}),(R||l&&!!v.length)&&"custom"===c&&f&&!l&&f({items:k,highlightedIndex:$,query:v,onSelect:L}),(R||l&&!!v.length)&&r.jsx(e.Portal,{container:T,children:r.jsxs(e.Box,{position:"absolute",width:"100%",backgroundColor:"white",border:"custom"===c?"none":"0.0625rem solid",borderColor:"gray.200",borderRadius:"md",zIndex:1e3,overflowY:"auto",maxHeight:I,children:[l&&r.jsx(e.Box,{padding:"1rem",children:r.jsx(e.Spinner,{})}),"text"===c&&!l&&r.jsx(HO,{highlightedIndex:$,items:k,query:v,onSelect:L}),"list"===c&&!l&&r.jsx(Ow,{items:k,highlightedIndex:$})]})})]})},exports.Select=Pv,exports.Sheet=({header:e,content:t,footer:o,open:i=!1,onClose:s,minimizedHeight:a,midHeight:l=200,maxFullHeight:c,defaultSnap:d="minimized",className:u,blocking:h,zIndex:p=1e3,labels:f})=>{const m=Mf("Sheet",f),g=n.useRef(null),v=n.useRef([]),[b,y]=n.useState(null),x=window.innerWidth>768,w=v.current;let C=m.expandSheetLabel;if(null!=b){const e=wT(b,w);e>0&&e<w.length-1?C=m.makeFullScreenLabel:e===w.length-1&&(C=m.expandedSheetLabel)}const k=!(null==b||!w.length||wT(b,w)!==w.length-1);return r.jsx(bT,{ref:g,css:xT(!!e,p),className:u,open:i,onDismiss:s,header:r.jsxs("div",{children:[r.jsx("button",{type:"button",disabled:k,"aria-label":C,css:yT,onKeyDown:e=>{if("Enter"!==e.key&&" "!==e.key)return;e.preventDefault();const t=w[w.length-1];if(x)return void g.current?.snapTo?.((()=>t));const n=b??w[0];let r=w.findIndex((e=>e>n));-1===r&&(r=w.length-1);const o=w[r];g.current?.snapTo?.((()=>o))},children:r.jsx("div",{})}),r.jsx("span",{"aria-live":"polite",style:{position:"absolute",width:1,height:1,overflow:"hidden",clip:"rect(0 0 0 0)"},children:C}),e]}),footer:o,snapPoints:({headerHeight:e,maxHeight:t,footerHeight:n})=>{const r=[20,a||e,l+(o?n:0),c||t-t/6];return v.current=r,r},onSpringEnd:()=>{const e=g.current?.height;e&&y(e)},defaultSnap:({headerHeight:e,maxHeight:t,footerHeight:n})=>{let r=20;return"minimized"===d?r=a||e:"mid"===d?r=l+(o?n:0):"full"===d&&(r=c||t-t/6),r},blocking:h,children:i?t:null})},exports.SimpleMapPin=({onClick:e,triggerRef:n,showFocusState:r,count:o,mode:i,variant:s="simple-pin"})=>t.jsx(vb,{count:o,mode:i,onClick:e,ref:n,showFocusState:r,variant:s}),exports.Slider=Zg,exports.SliderInput=({label:e,caption:t,size:o="default",sliderItem:i,required:s,onChange:a})=>{const[l,c]=n.useState(i.value||[]),d=(e,t)=>{const n=e.target.value,r=[...l];let o=n?parseInt(n,10):n;const s=i.min||0,a=i.max||100;o=Number.isNaN(o)?s:o,o=o<s?s:o,o=o>a?a:o,r[t]=o,c(r)},u=(e,t)=>{const n=e.target.value||"0",r=[...l];let o=parseInt(n,10);const s=i.min||0,d=i.max||100;if(o=Number.isNaN(o)?s:o,o=o<s?s:o,o=o>d?d:o,2===l?.length){o=Number.isNaN(o)?s:o;const e=l[0],n=l[1];0===t?(o=o<s?s:o,o=o>n?n:o):1===t&&(o=o<e?e:o,o=o>d?d:o)}r[t]=o,c(r),a&&a(r)};return r.jsxs("div",{children:[r.jsxs("p",{css:Yv(o),"aria-label":e,children:[s?r.jsx("span",{children:"*"}):null,e]}),t?r.jsx("p",{css:Qv(o),"aria-label":t,children:t}):null,r.jsxs("div",{css:eb,children:[i.step&&i.marks?r.jsx(Pv,{items:i.marks.map((e=>({label:`${e.label}`,value:`${e.value}`}))),placeholder:"",style:{width:"5.625rem"},value:[`${l?.[0]}`],onChange:e=>{const t=e.map((e=>parseInt(e,10)));c(t),a&&a(t)}}):r.jsx(Ym,{"aria-label":e,min:i.min,max:i.max,value:l?.[0],type:"number",onChange:e=>d(e,0),onBlur:e=>u(e,0),className:"ds-opacity-control-text-input",onClick:e=>e.target.select()}),r.jsx(Zg,{css:{},...i,value:l,"aria-label":2===l?.length?[`${e} minimum`,`${e} maximum`]:[e],onValueChangeEnd:e=>{c(e.value),a&&a(e.value)}}),2===l?.length?r.jsx(Ym,{"aria-label":e,min:i.min,max:i.max,value:l?.[1],type:"number",onChange:e=>d(e,1),onBlur:e=>u(e,1),className:"ds-opacity-control-text-input",onClick:e=>e.target.select()}):null]})]})},exports.StepProgressIndicator=({steps:e,currentStep:t,labels:n})=>{const o=Mf("StepProgressIndicator",n);return r.jsxs("div",{css:oL,children:[e.map(((e,n)=>r.jsxs("div",{css:iL,children:[r.jsx("button",{css:sL(t>=n+1,t<n+1),type:"button",onClick:e.onClick,"aria-current":t===n+1,"aria-disabled":t<n+1,disabled:t<n+1,"aria-label":o.currentStepLabel(n+1,e.label||"",t>n+1),"data-active":t>=n+1,children:t>n+1?r.jsx(Rf,{height:"1rem",width:"1rem"}):n+1}),e.label?r.jsx("p",{css:aL(t===n+1),children:e.label}):null]},`${e.label}-${n}`))),r.jsx("div",{css:lL,children:r.jsx("div",{css:cL})})]})},exports.Switch=Xg,exports.TabBar=({variant:t="panel",defaultValue:o,tabs:i,onTabClick:s,activationMode:a="manual"})=>{const[l,c]=n.useState(zO(i,o)||0);return r.jsx("div",{css:AO(t),children:r.jsx(e.Tabs.Root,{width:"full",defaultValue:o||i?.[0]?.value,onValueChange:({value:e})=>{return c(zO(i,t=e)),void(s&&s(t));var t},activationMode:a,children:r.jsx(e.Tabs.List,{alignItems:"center",border:"none",children:i.map(((o,i)=>r.jsxs(n.Fragment,{children:["view"===t&&1===i&&"left"===VO(l)?r.jsx("div",{css:DO}):null,r.jsx(e.Tabs.Trigger,{css:[RO,"view"===t&&IO,"panel"===t&&NO,"transparent"===t&&PO],"aria-label":o["aria-label"]||o.label,...o,children:r.jsxs(e.Box,{display:"flex",alignItems:"center",gap:"0.3125rem",children:[o.icon,o.label]})},o.label),"view"===t&&1===i&&"right"===VO(l)?r.jsx("div",{css:DO}):null]},o.label)))})})})},exports.Table=({columns:o,data:i=[],renderRow:s,striped:a,stickyHeader:l,pagination:c,selectable:d,selectedRows:u,variant:h="default",onSortColumn:p,onPageSizeChange:f,onPageChange:m,onAllItemsSelected:g,onRowSelected:v,loading:b,height:y,labels:x})=>{const C=Mf("Table",x),[k,S]=n.useState({key:"",order:""}),$=n.useRef({}),[j,M]=n.useState({}),[E,T]=n.useState([]),{totalItems:O=i.length,currentPage:L=1,pageSize:A=10,showItemCount:R,showItemCountText:N}=c||{},D=Boolean(p),I=n.useMemo((()=>Gw(i,k,D)),[i,D,k]),P=(e,t)=>{S({key:e,order:t}),p&&p({key:e,order:t})},z=u??E,V=I.length>0&&z.length===I.length,B=z.length>0&&z.length<I.length,H=n.useMemo((()=>(e=>e.reduce(((e,t)=>(e[t.key]=t,e)),{}))(o)),[o]),_=n.useMemo((()=>(e=>e.filter((e=>e.sticky)).map((e=>e.key)))(o)),[o]),F=(e=>e.length>0?e[e.length-1]:void 0)(_),q=n.useCallback((()=>{const e=((e,t)=>{const n={};let r=0;return e.filter((e=>e.sticky)).forEach((e=>{n[e.key]=r,r+=t[e.key]?.offsetWidth||0})),n})(o,$.current);M(e)}),[o]);n.useEffect((()=>{q()}),[q,i.length]),n.useEffect((()=>{const e=()=>{q()};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[q]),n.useEffect((()=>{void 0===u&&T((e=>((e,t)=>{const n=e.filter((e=>t.some((t=>t.id===e.id)))),r=n.length===e.length&&n.every(((t,n)=>t.id===e[n]?.id));return r?e:n})(e,i)))}),[i,u]);const W=e=>Kw(j,e.key,F),U=e=>((e,t,n,r)=>({...Uw(e,n),...Kw(t,n,r)}))(H,j,e,F),K=e=>((e,t)=>e.some((e=>e.id===t.id)))(z,e),G=(({columns:n,selectable:r,isRowSelected:o,onRowSelected:i,getSelectRowLabel:s})=>(a,l)=>{const{id:c,name:d}=a;return t.jsxs(e.Table.Row,{className:l?.className,children:[r?t.jsx(e.Table.Cell,{children:t.jsx(kg,{name:`checkbox-${c}`,"aria-label":s(d,c),checked:o(a),onCheckedChange:({checked:e})=>{i(a,e)}})}):null,n.map((n=>t.jsx(e.Table.Cell,{...l?.getCellProps(n.key),children:n.cell?n.cell(a):a?.[n.key]},n.key)))]})})({columns:o,selectable:d,isRowSelected:K,onRowSelected:(e,t)=>{void 0===u&&T((n=>((e,t,n)=>n?e.some((e=>e.id===t.id))?e:[...e,t]:e.filter((e=>e.id!==t.id)))(n,e,t))),v&&v(e,t)},getSelectRowLabel:(e,t)=>C.selectRowLabel(e,t)}),Z=s||G;return r.jsxs("div",{children:[r.jsx("div",{css:y?qw(y):void 0,children:r.jsxs(e.Table.Root,{css:Iw(h,l),striped:a,stickyHeader:l,interactive:!0,children:[r.jsx(e.Table.Header,{css:Pw(h),children:r.jsxs(e.Table.Row,{children:[d?r.jsx(e.Table.ColumnHeader,{children:r.jsx(kg,{name:"header-checkbox","aria-label":C.selectAllRowsLabel,checked:V,indeterminate:B,onCheckedChange:({checked:e})=>{void 0===u&&T(e?I:[]),g&&g(e)}})}):null,o.map((t=>{return r.jsx(e.Table.ColumnHeader,{ref:e=>{$.current[t.key]=e},...(n=t.key,Uw(H,n)),role:t.sortable?"columnheader":void 0,"aria-sort":t.sortable&&"asc"===k.order?"ascending":t.sortable&&"desc"===k.order?"descending":void 0,...W(t),children:r.jsxs("div",{css:zw,children:[t.label,t.sortable?r.jsxs("div",{css:Vw,children:[r.jsx(Of,{css:Bw(k.key===t.key&&"asc"===k.order),icon:r.jsx(If,{style:{transform:"rotate(180deg)"}}),onClick:()=>P(t.key,"asc"),"aria-label":C.ascendingLabel}),r.jsx(Of,{css:Bw(k.key===t.key&&"desc"===k.order),icon:r.jsx(If,{}),onClick:()=>P(t.key,"desc"),"aria-label":C.descendingLabel})]}):null]})},t.key);var n}))]})}),r.jsx(e.Table.Body,{css:Fw,children:I.map((e=>r.jsx(n.Fragment,{children:Z(e,{className:K(e)?"selected":void 0,getCellProps:U})},e.id)))})]})}),b?r.jsx("div",{css:Ww,children:r.jsx(e.Spinner,{size:"lg",color:w("primary",500)})}):null,r.jsxs("div",{css:Hw,children:[r.jsx("div",{children:R?r.jsx(ww,{pageSize:A,currentPage:L,totalItems:O,onPageSizeChange:f,showItemCountText:N}):null}),c?r.jsx("div",{css:_w,children:r.jsx(Dw,{totalItems:O,pageSize:A,currentPage:L,onPageChange:m})}):null]})]})},exports.TableCell=Jw,exports.TableRow=Zw,exports.Tag=Nv,exports.TextInput=Ym,exports.Textarea=({label:t,caption:o,placeholder:i,errorMessage:s,required:a,disabled:l,size:c="default",showOptionalLabel:d=!0,defaultValue:u="",onChange:h,minLength:p,maxLength:f,labels:m,...g})=>{const v=Mf("Textarea",m),[b,y]=n.useState(u),[x,w]=n.useState(!1),[C,k]=n.useState(!1),[S,$]=n.useState(""),j=n.useId(),M=n.useId(),E=n.useId();n.useEffect((()=>{const{length:e}=u;p&&e<p&&e>0?(w(e<p),k(!1),$(v.enterAtLeastChars(p-e))):p&&0===e&&$(v.minChars(p)),f&&e>0?(w(!1),k(e>f),$(v.charsRemaining(f-e))):f&&0===e&&$(v.maxChars(f))}),[]);const T=!!s||x||C,O=[o?j:null,T?M:null,S?E:null].filter(Boolean).join(" ")||void 0;return r.jsxs("div",{css:tb(c),children:[T?r.jsx("div",{css:nb}):null,r.jsxs(e.Field.Root,{required:a,invalid:T,gap:"0",style:{marginLeft:T?"1.1875rem":"0px"},children:[t?r.jsxs(e.Field.Label,{css:rb(c,l),"aria-label":t,children:[r.jsx(e.Field.RequiredIndicator,{"aria-label":v.requiredSymbolLabel}),t,!a&&d?r.jsx("span",{children:v.optionalSuffix}):null]}):null,o?r.jsx(e.Field.HelperText,{id:j,css:ob(c,l),children:o}):null,s?r.jsx(e.Field.ErrorText,{id:M,css:sb,"aria-label":`${v.errorPrefix} ${s}`,"aria-live":"polite",children:s}):null,r.jsx(e.Textarea,{placeholder:i,disabled:l,css:ab(c,b,u),onChange:e=>{y(e.target.value);const{length:t}=e.target.value;p&&f?(w(t<p),k(t>f),$(v.charsRemaining(f-t))):p?(w(t<p),k(!1),$(t<p?v.enterAtLeastChars(p-t):"")):f&&(k(t>f),w(!1),$(v.charsRemaining(f-t))),h&&h(e)},value:b,"aria-label":t||i,"aria-describedby":O,_placeholder:{color:"var(--chakra-colors-neutral-500)"},...g}),x&&p?r.jsx(e.Field.ErrorText,{id:M,css:sb,style:{marginTop:"0.5rem",fontSize:"0.75rem",lineHeight:"1rem"},"aria-live":"polite",children:v.needMoreChars(p-b.length)}):null,C&&f?r.jsx(e.Field.ErrorText,{id:M,css:sb,style:{marginTop:"0.5rem",fontSize:"0.75rem",lineHeight:"1rem"},"aria-live":"polite",children:v.tooManyChars(b.length-f)}):null,!S||C||x?null:r.jsx(e.Field.HelperText,{id:E,css:ib,"aria-live":"polite",children:S})]})]})},exports.Toast=({labels:t})=>{const n=Mf("Toast",t);return Object.keys(mL).map((t=>r.jsx(e.Portal,{children:r.jsx(e.Toaster,{toaster:mL[t],insetInline:{mdDown:"4"},children:o=>{return r.jsxs(e.Toast.Root,{css:(s=o.meta?.maxWidth,i.css`
4007
+ `)}):r.jsx("div",{css:pw,children:e?.map(((e,n)=>r.jsx("div",{"data-test":`${e}-${t?.[n]}`,style:{backgroundColor:e,width:"100%",height:"100%"}},`${e}-${t?.[n]}`)))}),r.jsx("div",{css:fw,children:t?.map((e=>r.jsx("div",{style:{width:o?"auto":`calc(100% / ${t.length})`,display:"flex",justifyContent:"center"},children:r.jsx("p",{css:mw,children:e})},e)))}),n&&n.length?r.jsx("div",{css:fw,children:n.map((e=>r.jsx("div",{style:{width:o?"auto":`calc(100% / ${t.length})`,display:"flex",justifyContent:"center"},children:r.jsx("p",{css:gw,style:{width:"100%"},children:e})},e)))}):null]});var s},exports.Search=({placeholder:t,disabled:o,size:i="default",options:s=[],resultsMaxHeight:a=50,isLoading:l=!1,displayResults:c="text",onSelect:d,onQueryChange:h,onClear:p,renderResults:f,labels:m})=>{const g=Mf("Search",m),[v,b]=n.useState(""),{open:y,onOpen:x,onClose:C}=e.useDisclosure(),[k,S]=n.useState(s),[$,j]=n.useState(-1),[M,E]=n.useState(!1),T=n.useRef(null),O=`search-results-${n.useId()}`,L=e=>{const t=s.find((t=>t.id===e||t.label===e));t&&(d?.(t),b(""),C())};n.useEffect((()=>{if(h?.(v),!v)return void S(s);const e=s.filter((e=>e.id?.toLowerCase().includes(v.toLowerCase())||e.label.toLowerCase().includes(v.toLowerCase())||e.caption?.toLowerCase().includes(v.toLowerCase()))).map((e=>({id:e.id,label:e.label,caption:e.caption,variant:"select",icon:e.icon,onItemClick:()=>L(e.id||e.label)})));S(e),x()}),[v]),n.useEffect((()=>{function e(e){y&&T.current&&!T.current.contains(e.target)&&C()}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}),[y]);const A=v.length?r.jsx(sg,{onClick:()=>{b(""),p?.()}}):null,R="none"!==c&&!!v.length&&k.length>0&&y;let N=w("neutral",500);o?N=w("neutral",500):M&&(N=w("primary",700));const D="small"===i?"1rem":"1.25rem",I=u(a);return r.jsxs("div",{ref:T,style:{position:"relative",width:"100%"},children:[r.jsx(e.InputGroup,{startElement:r.jsx(hm,{width:D,height:D,fill:N}),endElement:A,children:r.jsx(Ym,{autoComplete:"off",placeholder:t||g.filterPlaceholder,onChange:e=>{const{value:t}=e.target;b(t)},onFocus:()=>E(!0),onBlur:()=>E(!1),value:v,label:"",style:{paddingLeft:"2.5rem"},type:"search","aria-label":t||g.filterAriaLabel,"aria-expanded":R,"aria-controls":O,role:"combobox","aria-autocomplete":"list",disabled:o,size:i,noMarginBottom:!0,onKeyDown:e=>{if(R){if("ArrowDown"===e.key&&(e.preventDefault(),j((e=>Math.min(e+1,k.length-1)))),"ArrowUp"===e.key&&(e.preventDefault(),j((e=>Math.max(e-1,0)))),"Enter"===e.key&&(e.preventDefault(),$>=0)){const e=k[$];L(e.id||e.label)}"Escape"===e.key&&C()}}})}),(R||l&&!!v.length)&&"custom"===c&&f&&!l&&f({items:k,highlightedIndex:$,query:v,onSelect:L}),(R||l&&!!v.length)&&r.jsx(e.Portal,{container:T,children:r.jsxs(e.Box,{position:"absolute",width:"100%",backgroundColor:"white",border:"custom"===c?"none":"0.0625rem solid",borderColor:"gray.200",borderRadius:"md",zIndex:1e3,overflowY:"auto",maxHeight:I,children:[l&&r.jsx(e.Box,{padding:"1rem",children:r.jsx(e.Spinner,{})}),"text"===c&&!l&&r.jsx(_O,{highlightedIndex:$,items:k,query:v,onSelect:L}),"list"===c&&!l&&r.jsx(Ow,{items:k,highlightedIndex:$})]})})]})},exports.Select=Pv,exports.Sheet=({header:e,content:t,footer:o,open:i=!1,onClose:s,minimizedHeight:a,midHeight:l=200,maxFullHeight:c,defaultSnap:d="minimized",className:u,blocking:h,zIndex:p=1e3,labels:f})=>{const m=Mf("Sheet",f),g=n.useRef(null),v=n.useRef([]),[b,y]=n.useState(null),x=window.innerWidth>768,w=v.current;let C=m.expandSheetLabel;if(null!=b){const e=CT(b,w);e>0&&e<w.length-1?C=m.makeFullScreenLabel:e===w.length-1&&(C=m.expandedSheetLabel)}const k=!(null==b||!w.length||CT(b,w)!==w.length-1);return r.jsx(yT,{ref:g,css:wT(!!e,p),className:u,open:i,onDismiss:s,header:r.jsxs("div",{children:[r.jsx("button",{type:"button",disabled:k,"aria-label":C,css:xT,onKeyDown:e=>{if("Enter"!==e.key&&" "!==e.key)return;e.preventDefault();const t=w[w.length-1];if(x)return void g.current?.snapTo?.((()=>t));const n=b??w[0];let r=w.findIndex((e=>e>n));-1===r&&(r=w.length-1);const o=w[r];g.current?.snapTo?.((()=>o))},children:r.jsx("div",{})}),r.jsx("span",{"aria-live":"polite",style:{position:"absolute",width:1,height:1,overflow:"hidden",clip:"rect(0 0 0 0)"},children:C}),e]}),footer:o,snapPoints:({headerHeight:e,maxHeight:t,footerHeight:n})=>{const r=[20,a||e,l+(o?n:0),c||t-t/6];return v.current=r,r},onSpringEnd:()=>{const e=g.current?.height;e&&y(e)},defaultSnap:({headerHeight:e,maxHeight:t,footerHeight:n})=>{let r=20;return"minimized"===d?r=a||e:"mid"===d?r=l+(o?n:0):"full"===d&&(r=c||t-t/6),r},blocking:h,children:i?t:null})},exports.SimpleMapPin=({onClick:e,triggerRef:n,showFocusState:r,count:o,mode:i,variant:s="simple-pin"})=>t.jsx(vb,{count:o,mode:i,onClick:e,ref:n,showFocusState:r,variant:s}),exports.Slider=Zg,exports.SliderInput=({label:e,caption:t,size:o="default",sliderItem:i,required:s,onChange:a})=>{const[l,c]=n.useState(i.value||[]),d=(e,t)=>{const n=e.target.value,r=[...l];let o=n?parseInt(n,10):n;const s=i.min||0,a=i.max||100;o=Number.isNaN(o)?s:o,o=o<s?s:o,o=o>a?a:o,r[t]=o,c(r)},u=(e,t)=>{const n=e.target.value||"0",r=[...l];let o=parseInt(n,10);const s=i.min||0,d=i.max||100;if(o=Number.isNaN(o)?s:o,o=o<s?s:o,o=o>d?d:o,2===l?.length){o=Number.isNaN(o)?s:o;const e=l[0],n=l[1];0===t?(o=o<s?s:o,o=o>n?n:o):1===t&&(o=o<e?e:o,o=o>d?d:o)}r[t]=o,c(r),a&&a(r)};return r.jsxs("div",{children:[r.jsxs("p",{css:Yv(o),"aria-label":e,children:[s?r.jsx("span",{children:"*"}):null,e]}),t?r.jsx("p",{css:Qv(o),"aria-label":t,children:t}):null,r.jsxs("div",{css:eb,children:[i.step&&i.marks?r.jsx(Pv,{items:i.marks.map((e=>({label:`${e.label}`,value:`${e.value}`}))),placeholder:"",style:{width:"5.625rem"},value:[`${l?.[0]}`],onChange:e=>{const t=e.map((e=>parseInt(e,10)));c(t),a&&a(t)}}):r.jsx(Ym,{"aria-label":e,min:i.min,max:i.max,value:l?.[0],type:"number",onChange:e=>d(e,0),onBlur:e=>u(e,0),className:"ds-opacity-control-text-input",onClick:e=>e.target.select()}),r.jsx(Zg,{css:{},...i,value:l,"aria-label":2===l?.length?[`${e} minimum`,`${e} maximum`]:[e],onValueChangeEnd:e=>{c(e.value),a&&a(e.value)}}),2===l?.length?r.jsx(Ym,{"aria-label":e,min:i.min,max:i.max,value:l?.[1],type:"number",onChange:e=>d(e,1),onBlur:e=>u(e,1),className:"ds-opacity-control-text-input",onClick:e=>e.target.select()}):null]})]})},exports.StepProgressIndicator=({steps:e,currentStep:t,labels:n})=>{const o=Mf("StepProgressIndicator",n);return r.jsxs("div",{css:iL,children:[e.map(((e,n)=>r.jsxs("div",{css:sL,children:[r.jsx("button",{css:aL(t>=n+1,t<n+1),type:"button",onClick:e.onClick,"aria-current":t===n+1,"aria-disabled":t<n+1,disabled:t<n+1,"aria-label":o.currentStepLabel(n+1,e.label||"",t>n+1),"data-active":t>=n+1,children:t>n+1?r.jsx(Rf,{height:"1rem",width:"1rem"}):n+1}),e.label?r.jsx("p",{css:lL(t===n+1),children:e.label}):null]},`${e.label}-${n}`))),r.jsx("div",{css:cL,children:r.jsx("div",{css:dL})})]})},exports.Switch=Xg,exports.TabBar=({variant:t="panel",defaultValue:o,tabs:i,onTabClick:s,activationMode:a="manual"})=>{const[l,c]=n.useState(VO(i,o)||0);return r.jsx("div",{css:RO(t),children:r.jsx(e.Tabs.Root,{width:"full",defaultValue:o||i?.[0]?.value,onValueChange:({value:e})=>{return c(VO(i,t=e)),void(s&&s(t));var t},activationMode:a,children:r.jsx(e.Tabs.List,{alignItems:"center",border:"none",children:i.map(((o,i)=>r.jsxs(n.Fragment,{children:["view"===t&&1===i&&"left"===BO(l)?r.jsx("div",{css:IO}):null,r.jsx(e.Tabs.Trigger,{css:[NO,"view"===t&&PO,"panel"===t&&DO,"transparent"===t&&zO],"aria-label":o["aria-label"]||o.label,...o,children:r.jsxs(e.Box,{display:"flex",alignItems:"center",gap:"0.3125rem",children:[o.icon,o.label]})},o.label),"view"===t&&1===i&&"right"===BO(l)?r.jsx("div",{css:IO}):null]},o.label)))})})})},exports.Table=({columns:o,data:i=[],renderRow:s,striped:a,stickyHeader:l,pagination:c,selectable:d,selectedRows:u,variant:h="default",onSortColumn:p,onPageSizeChange:f,onPageChange:m,onAllItemsSelected:g,onRowSelected:v,loading:b,height:y,labels:x})=>{const C=Mf("Table",x),[k,S]=n.useState({key:"",order:""}),$=n.useRef({}),j=n.useRef(null),[M,E]=n.useState({}),[T,O]=n.useState([]),{totalItems:L=i.length,currentPage:A=1,pageSize:R=10,showItemCount:N,showItemCountText:D}=c||{},I=Boolean(p),P=n.useMemo((()=>Zw(i,k,I)),[i,I,k]),z=(e,t)=>{S({key:e,order:t}),p&&p({key:e,order:t})},V=u??T,B=P.length>0&&V.length===P.length,H=V.length>0&&V.length<P.length,_=n.useMemo((()=>(e=>e.reduce(((e,t)=>(e[t.key]=t,e)),{}))(o)),[o]),F=n.useMemo((()=>(e=>e.filter((e=>e.sticky)).map((e=>e.key)))(o)),[o]),q=(e=>e.length>0?e[e.length-1]:void 0)([...void 0!==M[Uw]?[Uw]:[],...F]),W=n.useCallback((()=>{const e=((e,t,n)=>{const r={};let o=0;const i=e.filter((e=>e.sticky));return n&&i.length>0&&(r[Uw]=0,o+=n.offsetWidth),i.forEach((e=>{r[e.key]=o,o+=t[e.key]?.offsetWidth||0})),r})(o,$.current,d?j.current:void 0);E(e)}),[o,d]);n.useEffect((()=>{W()}),[W,i.length]),n.useEffect((()=>{const e=()=>{W()};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[W]),n.useEffect((()=>{void 0===u&&O((e=>((e,t)=>{const n=e.filter((e=>t.some((t=>t.id===e.id)))),r=n.length===e.length&&n.every(((t,n)=>t.id===e[n]?.id));return r?e:n})(e,i)))}),[i,u]);const U=e=>Gw(M,e.key,q),K=e=>((e,t,n,r)=>({...Kw(e,n),...Gw(t,n,r)}))(_,M,e,q),G=e=>((e,t)=>e.some((e=>e.id===t.id)))(V,e),Z=(({columns:n,selectable:r,isRowSelected:o,onRowSelected:i,stickyOffsets:s={},lastStickyColumnKey:a,getSelectRowLabel:l})=>(c,d)=>{const{id:u,name:h}=c;return t.jsxs(e.Table.Row,{className:d?.className,children:[r?t.jsx(e.Table.Cell,{...Gw(s,Uw,a),children:t.jsx(kg,{name:`checkbox-${u}`,"aria-label":l(h,u),checked:o(c),onCheckedChange:({checked:e})=>{i(c,e)}})}):null,n.map((n=>t.jsx(e.Table.Cell,{...d?.getCellProps(n.key),children:n.cell?n.cell(c):c?.[n.key]},n.key)))]})})({columns:o,selectable:d,isRowSelected:G,onRowSelected:(e,t)=>{void 0===u&&O((n=>((e,t,n)=>n?e.some((e=>e.id===t.id))?e:[...e,t]:e.filter((e=>e.id!==t.id)))(n,e,t))),v&&v(e,t)},stickyOffsets:M,lastStickyColumnKey:q,getSelectRowLabel:(e,t)=>C.selectRowLabel(e,t)}),J=s||Z;return r.jsxs("div",{children:[r.jsx("div",{css:y?qw(y):void 0,children:r.jsxs(e.Table.Root,{css:Iw(h,l),striped:a,stickyHeader:l,interactive:!0,children:[r.jsx(e.Table.Header,{css:Pw(h),children:r.jsxs(e.Table.Row,{children:[d?r.jsx(e.Table.ColumnHeader,{ref:j,...Gw(M,Uw,q),children:r.jsx(kg,{name:"header-checkbox","aria-label":C.selectAllRowsLabel,checked:B,indeterminate:H,onCheckedChange:({checked:e})=>{void 0===u&&O(e?P:[]),g&&g(e)}})}):null,o.map((t=>{return r.jsx(e.Table.ColumnHeader,{ref:e=>{$.current[t.key]=e},...(n=t.key,Kw(_,n)),role:t.sortable?"columnheader":void 0,"aria-sort":t.sortable&&"asc"===k.order?"ascending":t.sortable&&"desc"===k.order?"descending":void 0,...U(t),children:r.jsxs("div",{css:zw,children:[t.label,t.sortable?r.jsxs("div",{css:Vw,children:[r.jsx(Of,{css:Bw(k.key===t.key&&"asc"===k.order),icon:r.jsx(If,{style:{transform:"rotate(180deg)"}}),onClick:()=>z(t.key,"asc"),"aria-label":C.ascendingLabel}),r.jsx(Of,{css:Bw(k.key===t.key&&"desc"===k.order),icon:r.jsx(If,{}),onClick:()=>z(t.key,"desc"),"aria-label":C.descendingLabel})]}):null]})},t.key);var n}))]})}),r.jsx(e.Table.Body,{css:Fw(a),children:P.map((e=>r.jsx(n.Fragment,{children:J(e,{className:G(e)?"selected":void 0,getCellProps:K})},e.id)))})]})}),b?r.jsx("div",{css:Ww,children:r.jsx(e.Spinner,{size:"lg",color:w("primary",500)})}):null,r.jsxs("div",{css:Hw,children:[r.jsx("div",{children:N?r.jsx(ww,{pageSize:R,currentPage:A,totalItems:L,onPageSizeChange:f,showItemCountText:D}):null}),c?r.jsx("div",{css:_w,children:r.jsx(Dw,{totalItems:L,pageSize:R,currentPage:A,onPageChange:m})}):null]})]})},exports.TableCell=Xw,exports.TableRow=Jw,exports.Tag=Nv,exports.TextInput=Ym,exports.Textarea=({label:t,caption:o,placeholder:i,errorMessage:s,required:a,disabled:l,size:c="default",showOptionalLabel:d=!0,defaultValue:u="",onChange:h,minLength:p,maxLength:f,labels:m,...g})=>{const v=Mf("Textarea",m),[b,y]=n.useState(u),[x,w]=n.useState(!1),[C,k]=n.useState(!1),[S,$]=n.useState(""),j=n.useId(),M=n.useId(),E=n.useId();n.useEffect((()=>{const{length:e}=u;p&&e<p&&e>0?(w(e<p),k(!1),$(v.enterAtLeastChars(p-e))):p&&0===e&&$(v.minChars(p)),f&&e>0?(w(!1),k(e>f),$(v.charsRemaining(f-e))):f&&0===e&&$(v.maxChars(f))}),[]);const T=!!s||x||C,O=[o?j:null,T?M:null,S?E:null].filter(Boolean).join(" ")||void 0;return r.jsxs("div",{css:tb(c),children:[T?r.jsx("div",{css:nb}):null,r.jsxs(e.Field.Root,{required:a,invalid:T,gap:"0",style:{marginLeft:T?"1.1875rem":"0px"},children:[t?r.jsxs(e.Field.Label,{css:rb(c,l),"aria-label":t,children:[r.jsx(e.Field.RequiredIndicator,{"aria-label":v.requiredSymbolLabel}),t,!a&&d?r.jsx("span",{children:v.optionalSuffix}):null]}):null,o?r.jsx(e.Field.HelperText,{id:j,css:ob(c,l),children:o}):null,s?r.jsx(e.Field.ErrorText,{id:M,css:sb,"aria-label":`${v.errorPrefix} ${s}`,"aria-live":"polite",children:s}):null,r.jsx(e.Textarea,{placeholder:i,disabled:l,css:ab(c,b,u),onChange:e=>{y(e.target.value);const{length:t}=e.target.value;p&&f?(w(t<p),k(t>f),$(v.charsRemaining(f-t))):p?(w(t<p),k(!1),$(t<p?v.enterAtLeastChars(p-t):"")):f&&(k(t>f),w(!1),$(v.charsRemaining(f-t))),h&&h(e)},value:b,"aria-label":t||i,"aria-describedby":O,_placeholder:{color:"var(--chakra-colors-neutral-500)"},...g}),x&&p?r.jsx(e.Field.ErrorText,{id:M,css:sb,style:{marginTop:"0.5rem",fontSize:"0.75rem",lineHeight:"1rem"},"aria-live":"polite",children:v.needMoreChars(p-b.length)}):null,C&&f?r.jsx(e.Field.ErrorText,{id:M,css:sb,style:{marginTop:"0.5rem",fontSize:"0.75rem",lineHeight:"1rem"},"aria-live":"polite",children:v.tooManyChars(b.length-f)}):null,!S||C||x?null:r.jsx(e.Field.HelperText,{id:E,css:ib,"aria-live":"polite",children:S})]})]})},exports.Toast=({labels:t})=>{const n=Mf("Toast",t);return Object.keys(gL).map((t=>r.jsx(e.Portal,{children:r.jsx(e.Toaster,{toaster:gL[t],insetInline:{mdDown:"4"},children:o=>{return r.jsxs(e.Toast.Root,{css:(s=o.meta?.maxWidth,i.css`
3997
4008
  justify-content: space-between;
3998
4009
  align-items: center;
3999
4010
  gap: ${k(200)};
@@ -4037,4 +4048,4 @@ function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
4037
4048
  color: ${w("error",900)};
4038
4049
  }
4039
4050
  }
4040
- `),width:{md:"sm"},children:[r.jsxs(e.Stack,{flexDirection:"row",className:"ds-toast-icon-container",alignItems:o.description?"flex-start":"center",children:["info"===o.type?o.meta?.icon?o.meta.icon:r.jsx(Df,{color:"var(--chakra-colors-neutral-700)"}):null,"loading"===o.type?r.jsx(e.Spinner,{size:"lg",borderWidth:"0.1875rem",color:"var(--chakra-colors-primary-500)"}):null,"success"===o.type?o.meta?.icon?o.meta.icon:r.jsx(_f,{color:"var(--chakra-colors-success-500)"}):null,"warning"===o.type?o.meta?.icon?o.meta.icon:r.jsx(Ff,{color:"var(--chakra-colors-warning-500)"}):null,"error"===o.type?o.meta?.icon?o.meta.icon:r.jsx(qf,{color:"var(--chakra-colors-error-500)"}):null,r.jsxs(e.Stack,{gap:"1",flex:"1",maxWidth:"100%",children:[r.jsx(e.Toast.Title,{css:dL,"aria-label":`${o.title}`,children:o.title}),o.description?r.jsx(e.Toast.Title,{css:uL,"aria-label":`${o.description}`,children:o.description}):null]})]}),o.action||o.meta?.closable?r.jsxs(e.Stack,{flexDirection:"row",children:[o.action?r.jsx(Ef,{css:hL,label:o.action.label,size:"small",variant:"info"===o.type?"primary":"secondary",onClick:()=>{o?.action?.onClick&&o.action.onClick(),mL[t].dismiss()}}):null,o.meta?.closable?r.jsx(Ef,{css:pL,label:o.meta.closableLabel,"aria-label":o.meta?.closableLabel||n.dismissLabel,leftIcon:r.jsx(zf,{height:"0.625rem!",width:"0.625rem!"}),size:"small",variant:"secondary",onClick:()=>{o.meta?.onClose&&o.meta.onClose(),mL[t].dismiss()}}):null]}):null]});var s}})},t)))},exports.Toolbar=ug,exports.Tooltip=Tm,exports.closeToast=e=>{Object.values(mL).forEach((t=>{t.dismiss(e)}))},exports.designSystemStyles=x,exports.designSystemStylesForTailwind=y,exports.getThemedBorderWidth=j,exports.getThemedColor=w,exports.getThemedFontSize=C,exports.getThemedLineHeight=S,exports.getThemedRadius=$,exports.getThemedSpacing=k,exports.showToast=e=>{mL[e.placement].create({title:e.label,description:e.caption,duration:e.duration||5e3,meta:{closable:e.closable,icon:e.icon,closableLabel:e.closableLabel,onClose:e.onClose,maxWidth:e.maxWidth},...e})};
4051
+ `),width:{md:"sm"},children:[r.jsxs(e.Stack,{flexDirection:"row",className:"ds-toast-icon-container",alignItems:o.description?"flex-start":"center",children:["info"===o.type?o.meta?.icon?o.meta.icon:r.jsx(Df,{color:"var(--chakra-colors-neutral-700)"}):null,"loading"===o.type?r.jsx(e.Spinner,{size:"lg",borderWidth:"0.1875rem",color:"var(--chakra-colors-primary-500)"}):null,"success"===o.type?o.meta?.icon?o.meta.icon:r.jsx(_f,{color:"var(--chakra-colors-success-500)"}):null,"warning"===o.type?o.meta?.icon?o.meta.icon:r.jsx(Ff,{color:"var(--chakra-colors-warning-500)"}):null,"error"===o.type?o.meta?.icon?o.meta.icon:r.jsx(qf,{color:"var(--chakra-colors-error-500)"}):null,r.jsxs(e.Stack,{gap:"1",flex:"1",maxWidth:"100%",children:[r.jsx(e.Toast.Title,{css:uL,"aria-label":`${o.title}`,children:o.title}),o.description?r.jsx(e.Toast.Title,{css:hL,"aria-label":`${o.description}`,children:o.description}):null]})]}),o.action||o.meta?.closable?r.jsxs(e.Stack,{flexDirection:"row",children:[o.action?r.jsx(Ef,{css:pL,label:o.action.label,size:"small",variant:"info"===o.type?"primary":"secondary",onClick:()=>{o?.action?.onClick&&o.action.onClick(),gL[t].dismiss()}}):null,o.meta?.closable?r.jsx(Ef,{css:fL,label:o.meta.closableLabel,"aria-label":o.meta?.closableLabel||n.dismissLabel,leftIcon:r.jsx(zf,{height:"0.625rem!",width:"0.625rem!"}),size:"small",variant:"secondary",onClick:()=>{o.meta?.onClose&&o.meta.onClose(),gL[t].dismiss()}}):null]}):null]});var s}})},t)))},exports.Toolbar=ug,exports.Tooltip=Tm,exports.closeToast=e=>{Object.values(gL).forEach((t=>{t.dismiss(e)}))},exports.designSystemStyles=x,exports.designSystemStylesForTailwind=y,exports.getThemedBorderWidth=j,exports.getThemedColor=w,exports.getThemedFontSize=C,exports.getThemedLineHeight=S,exports.getThemedRadius=$,exports.getThemedSpacing=k,exports.showToast=e=>{gL[e.placement].create({title:e.label,description:e.caption,duration:e.duration||5e3,meta:{closable:e.closable,icon:e.icon,closableLabel:e.closableLabel,onClose:e.onClose,maxWidth:e.maxWidth},...e})};