From a3fbf599b623c6859bdce88c3c0a6ed8c2bca2b9 Mon Sep 17 00:00:00 2001 From: alexfreska Date: Fri, 27 Oct 2023 14:52:27 +0000 Subject: [PATCH] chore: export renterd/v0.31.0 --- renterd/assets/404.html | 2 +- .../_buildManifest.js | 0 .../_ssgManifest.js | 0 ...-a751c4c67dd0fa56.js => _app-15fd6810a53dc815.js} | 12 ++++++------ renterd/assets/config.html | 2 +- renterd/assets/contracts.html | 2 +- renterd/assets/files/[[...path]].html | 2 +- renterd/assets/hosts.html | 2 +- renterd/assets/index.html | 2 +- renterd/assets/login.html | 2 +- renterd/assets/node.html | 2 +- renterd/assets/wallet.html | 2 +- 12 files changed, 15 insertions(+), 15 deletions(-) rename renterd/assets/_next/static/{bFDe7YzfKD1y_CrVES891 => LHrQ4UOYBW3OovzpYCNr0}/_buildManifest.js (100%) rename renterd/assets/_next/static/{bFDe7YzfKD1y_CrVES891 => LHrQ4UOYBW3OovzpYCNr0}/_ssgManifest.js (100%) rename renterd/assets/_next/static/chunks/pages/{_app-a751c4c67dd0fa56.js => _app-15fd6810a53dc815.js} (66%) diff --git a/renterd/assets/404.html b/renterd/assets/404.html index 43c5887b5..6e6e1efb1 100644 --- a/renterd/assets/404.html +++ b/renterd/assets/404.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/renterd/assets/_next/static/bFDe7YzfKD1y_CrVES891/_buildManifest.js b/renterd/assets/_next/static/LHrQ4UOYBW3OovzpYCNr0/_buildManifest.js similarity index 100% rename from renterd/assets/_next/static/bFDe7YzfKD1y_CrVES891/_buildManifest.js rename to renterd/assets/_next/static/LHrQ4UOYBW3OovzpYCNr0/_buildManifest.js diff --git a/renterd/assets/_next/static/bFDe7YzfKD1y_CrVES891/_ssgManifest.js b/renterd/assets/_next/static/LHrQ4UOYBW3OovzpYCNr0/_ssgManifest.js similarity index 100% rename from renterd/assets/_next/static/bFDe7YzfKD1y_CrVES891/_ssgManifest.js rename to renterd/assets/_next/static/LHrQ4UOYBW3OovzpYCNr0/_ssgManifest.js diff --git a/renterd/assets/_next/static/chunks/pages/_app-a751c4c67dd0fa56.js b/renterd/assets/_next/static/chunks/pages/_app-15fd6810a53dc815.js similarity index 66% rename from renterd/assets/_next/static/chunks/pages/_app-a751c4c67dd0fa56.js rename to renterd/assets/_next/static/chunks/pages/_app-15fd6810a53dc815.js index 433665751..74ccc43e4 100644 --- a/renterd/assets/_next/static/chunks/pages/_app-a751c4c67dd0fa56.js +++ b/renterd/assets/_next/static/chunks/pages/_app-15fd6810a53dc815.js @@ -14,7 +14,7 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,o=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,u=n?Symbol.for("react.context"):60110,c=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,f=n?Symbol.for("react.forward_ref"):60112,h=n?Symbol.for("react.suspense"):60113,p=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,v=n?Symbol.for("react.lazy"):60116,g=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,x=n?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case c:case d:case o:case s:case a:case h:return e;default:switch(e=e&&e.$$typeof){case u:case f:case v:case m:case l:return e;default:return t}}case i:return t}}}function j(e){return w(e)===d}t.AsyncMode=c,t.ConcurrentMode=d,t.ContextConsumer=u,t.ContextProvider=l,t.Element=r,t.ForwardRef=f,t.Fragment=o,t.Lazy=v,t.Memo=m,t.Portal=i,t.Profiler=s,t.StrictMode=a,t.Suspense=h,t.isAsyncMode=function(e){return j(e)||w(e)===c},t.isConcurrentMode=j,t.isContextConsumer=function(e){return w(e)===u},t.isContextProvider=function(e){return w(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return w(e)===f},t.isFragment=function(e){return w(e)===o},t.isLazy=function(e){return w(e)===v},t.isMemo=function(e){return w(e)===m},t.isPortal=function(e){return w(e)===i},t.isProfiler=function(e){return w(e)===s},t.isStrictMode=function(e){return w(e)===a},t.isSuspense=function(e){return w(e)===h},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===d||e===s||e===a||e===h||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===m||e.$$typeof===l||e.$$typeof===u||e.$$typeof===f||e.$$typeof===y||e.$$typeof===b||e.$$typeof===x||e.$$typeof===g)},t.typeOf=w},73887:function(e,t,n){"use strict";e.exports=n(43459)},62333:function(e,t){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */t.read=function(e,t,n,r,i){var o,a,s=8*i-r-1,l=(1<>1,c=-7,d=n?i-1:0,f=n?-1:1,h=e[t+d];for(d+=f,o=h&(1<<-c)-1,h>>=-c,c+=s;c>0;o=256*o+e[t+d],d+=f,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=256*a+e[t+d],d+=f,c-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:(h?-1:1)*(1/0);a+=Math.pow(2,r),o-=u}return(h?-1:1)*a*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var a,s,l,u=8*o-i-1,c=(1<>1,f=23===i?5960464477539062e-23:0,h=r?0:o-1,p=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(isNaN(t=Math.abs(t))||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+d>=1?t+=f/l:t+=f*Math.pow(2,1-d),t*l>=2&&(a++,l/=2),a+d>=c?(s=0,a=c):a+d>=1?(s=(t*l-1)*Math.pow(2,i),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;e[n+h]=255&s,h+=p,s/=256,i-=8);for(a=a<0;e[n+h]=255&a,h+=p,a/=256,u-=8);e[n+h-p]|=128*m}},39515:function(e,t,n){var r=n(38761)(n(37772),"DataView");e.exports=r},89612:function(e,t,n){var r=n(52118),i=n(96909),o=n(98138),a=n(4174),s=n(7942);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1}},34893:function(e){e.exports=function(e,t,n){for(var r=-1,i=null==e?0:e.length;++r=200&&(d=l,f=!1,t=new r(t));t:for(;++c0&&o(c)?n>1?e(c,n-1,o,a,s):r(s,c):a||(s[s.length]=c)}return s}},15308:function(e,t,n){var r=n(55463)();e.exports=r},26548:function(e,t,n){var r=n(15308),i=n(90249);e.exports=function(e,t){return e&&r(e,t,i)}},13324:function(e,t,n){var r=n(17297),i=n(33812);e.exports=function(e,t){t=r(t,e);for(var n=0,o=t.length;null!=e&&n=120&&g.length>=120)?new r(h&&g):void 0}g=e[0];var y=-1,b=p[0];t:for(;++yi?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r=200){var m=t?null:s(e);if(m)return l(m);f=!1,c=a,p=new r}else p=t?[]:h;t:for(;++u=i?e:r(e,t,n)}},79882:function(e,t,n){var r=n(79162);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},92175:function(e,t,n){e=n.nmd(e);var r=n(37772),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i?r.Buffer:void 0,s=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=s?s(n):new e.constructor(n);return e.copy(r),r}},34727:function(e,t,n){var r=n(79882);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},96058:function(e){var t=/\w*$/;e.exports=function(e){var n=new e.constructor(e.source,t.exec(e));return n.lastIndex=e.lastIndex,n}},70169:function(e,t,n){var r=n(50857),i=r?r.prototype:void 0,o=i?i.valueOf:void 0;e.exports=function(e){return o?Object(o.call(e)):{}}},6190:function(e,t,n){var r=n(79882);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},27520:function(e,t,n){var r=n(4795);e.exports=function(e,t){if(e!==t){var n=void 0!==e,i=null===e,o=e==e,a=r(e),s=void 0!==t,l=null===t,u=t==t,c=r(t);if(!l&&!c&&!a&&e>t||a&&s&&u&&!l&&!c||i&&s&&u||!n&&u||!o)return 1;if(!i&&!a&&!c&&e=l)return u;return u*("desc"==n[i]?-1:1)}}return e.index-t.index}},51522:function(e){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(o--,a):void 0,s&&i(n[0],n[1],s)&&(a=o<3?void 0:a,o=1),t=Object(t);++rc))return!1;var f=l.get(e),h=l.get(t);if(f&&h)return f==t&&h==e;var p=-1,m=!0,v=2&n?new r:void 0;for(l.set(e,t),l.set(t,e);++p-1&&e%1==0&&e-1}},94769:function(e,t,n){var r=n(22218);e.exports=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}},92411:function(e,t,n){var r=n(89612),i=n(80235),o=n(10326);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},36417:function(e,t,n){var r=n(27937);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},86928:function(e,t,n){var r=n(27937);e.exports=function(e){return r(this,e).get(e)}},79493:function(e,t,n){var r=n(27937);e.exports=function(e){return r(this,e).has(e)}},24150:function(e,t,n){var r=n(27937);e.exports=function(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}},75179:function(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}},73477:function(e){e.exports=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}},77777:function(e,t,n){var r=n(30733);e.exports=function(e){var t=r(e,function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t}},99191:function(e,t,n){var r=n(38761)(Object,"create");e.exports=r},54248:function(e,t,n){var r=n(60241)(Object.keys,Object);e.exports=r},62966:function(e){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},4146:function(e,t,n){e=n.nmd(e);var r=n(51242),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i&&r.process,s=function(){try{var e=o&&o.require&&o.require("util").types;if(e)return e;return a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=s},37157:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},60241:function(e){e.exports=function(e,t){return function(n){return e(t(n))}}},43114:function(e,t,n){var r=n(49432),i=Math.max;e.exports=function(e,t,n){return t=i(void 0===t?e.length-1:t,0),function(){for(var o=arguments,a=-1,s=i(o.length-t,0),l=Array(s);++a0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},15243:function(e,t,n){var r=n(80235);e.exports=function(){this.__data__=new r,this.size=0}},72858:function(e){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},4417:function(e){e.exports=function(e){return this.__data__.get(e)}},8605:function(e){e.exports=function(e){return this.__data__.has(e)}},71418:function(e,t,n){var r=n(80235),i=n(10326),o=n(96738);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!i||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new o(a)}return n.set(e,t),this.size=n.size,this}},66024:function(e){e.exports=function(e,t,n){for(var r=n-1,i=e.length;++r=t||n<0||v&&r>=c}function x(){var e,n,r,o=i();if(b(o))return w(o);f=setTimeout(x,(e=o-h,n=o-p,r=t-e,v?s(r,c-n):r))}function w(e){return(f=void 0,g&&l)?y(e):(l=u=void 0,d)}function j(){var e,n=i(),r=b(n);if(l=arguments,u=this,h=n,r){if(void 0===f)return p=e=h,f=setTimeout(x,t),m?y(e):d;if(v)return clearTimeout(f),f=setTimeout(x,t),y(h)}return void 0===f&&(f=setTimeout(x,t)),d}return t=o(t)||0,r(n)&&(m=!!n.leading,c=(v="maxWait"in n)?a(o(n.maxWait)||0,t):c,g="trailing"in n?!!n.trailing:g),j.cancel=function(){void 0!==f&&clearTimeout(f),p=0,l=h=u=f=void 0},j.flush=function(){return void 0===f?d:w(i())},j}},97329:function(e,t,n){var r=n(61655),i=n(66188),o=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,a=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");e.exports=function(e){return(e=i(e))&&e.replace(o,r).replace(a,"")}},17335:function(e,t,n){var r=n(85246),i=n(62034),o=n(36060),a=n(93746),s=o(function(e,t){return a(e)?r(e,i(t,1,a,!0)):[]});e.exports=s},45861:function(e,t,n){e.exports=n(28460)},41225:function(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},35676:function(e,t,n){var r=n(62034);e.exports=function(e){return(null==e?0:e.length)?r(e,1):[]}},72579:function(e,t,n){var r=n(13324);e.exports=function(e,t,n){var i=null==e?void 0:r(e,t);return void 0===i?n:i}},3440:function(e,t,n){var r=n(13940),i=n(36740),o=Object.prototype.hasOwnProperty,a=i(function(e,t,n){o.call(e,n)?e[n].push(t):r(e,n,[t])});e.exports=a},93352:function(e,t,n){var r=n(32726),i=n(1369);e.exports=function(e,t){return null!=e&&i(e,t,r)}},95041:function(e,t,n){var r=n(20187),i=n(1369);e.exports=function(e,t){return null!=e&&i(e,t,r)}},23059:function(e){e.exports=function(e){return e}},30898:function(e,t,n){var r=n(50343),i=n(88390),o=n(36060),a=n(5642),s=o(function(e){var t=r(e,a);return t.length&&t[0]===e[0]?i(t):[]});e.exports=s},79631:function(e,t,n){var r=n(15183),i=n(15125),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,l=r(function(){return arguments}())?r:function(e){return i(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=l},86152:function(e){var t=Array.isArray;e.exports=t},67878:function(e,t,n){var r=n(61049),i=n(61158);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},93746:function(e,t,n){var r=n(67878),i=n(15125);e.exports=function(e){return i(e)&&r(e)}},73226:function(e,t,n){e=n.nmd(e);var r=n(37772),i=n(36330),o=t&&!t.nodeType&&t,a=o&&e&&!e.nodeType&&e,s=a&&a.exports===o?r.Buffer:void 0,l=s?s.isBuffer:void 0;e.exports=l||i},18149:function(e,t,n){var r=n(88746);e.exports=function(e,t){return r(e,t)}},61049:function(e,t,n){var r=n(53366),i=n(29259);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},61158:function(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},4714:function(e,t,n){var r=n(74511),i=n(47826),o=n(4146),a=o&&o.isMap,s=a?i(a):r;e.exports=s},29259:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},15125:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},97030:function(e,t,n){var r=n(53366),i=n(47353),o=n(15125),a=Object.prototype,s=Function.prototype.toString,l=a.hasOwnProperty,u=s.call(Object);e.exports=function(e){if(!o(e)||"[object Object]"!=r(e))return!1;var t=i(e);if(null===t)return!0;var n=l.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&s.call(n)==u}},43679:function(e,t,n){var r=n(8109),i=n(47826),o=n(4146),a=o&&o.isSet,s=a?i(a):r;e.exports=s},4795:function(e,t,n){var r=n(53366),i=n(15125);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},77598:function(e,t,n){var r=n(35522),i=n(47826),o=n(4146),a=o&&o.isTypedArray,s=a?i(a):r;e.exports=s},90249:function(e,t,n){var r=n(1634),i=n(86411),o=n(67878);e.exports=function(e){return o(e)?r(e):i(e)}},18582:function(e,t,n){var r=n(1634),i=n(18390),o=n(67878);e.exports=function(e){return o(e)?r(e,!0):i(e)}},56974:function(e){e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},19950:function(e,t,n){var r=n(13940),i=n(26548),o=n(68286);e.exports=function(e,t){var n={};return t=o(t,3),i(e,function(e,i,o){r(n,t(e,i,o),e)}),n}},34519:function(e,t,n){var r=n(13940),i=n(26548),o=n(68286);e.exports=function(e,t){var n={};return t=o(t,3),i(e,function(e,i,o){r(n,i,t(e,i,o))}),n}},30733:function(e,t,n){var r=n(96738);function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(i.Cache||r),n}i.Cache=r,e.exports=i},98537:function(e,t,n){var r=n(84565),i=n(97263)(function(e,t,n){r(e,t,n)});e.exports=i},65680:function(e,t,n){var r=n(2229),i=n(17606),o=n(23059);e.exports=function(e){return e&&e.length?r(e,o,i):void 0}},34291:function(e){e.exports=function(){}},61100:function(e,t,n){var r=n(37772);e.exports=function(){return r.Date.now()}},17620:function(e,t,n){var r=n(50343),i=n(18874),o=n(29078),a=n(17297),s=n(752),l=n(48642),u=n(29097),c=n(76939),d=u(function(e,t){var n={};if(null==e)return n;var u=!1;t=r(t,function(t){return t=a(t,e),u||(u=t.length>1),t}),s(e,c(e),n),u&&(n=i(n,7,l));for(var d=t.length;d--;)o(n,t[d]);return n});e.exports=d},65798:function(e,t,n){var r=n(20256),i=n(82952),o=n(21401),a=n(33812);e.exports=function(e){return o(e)?r(a(e)):i(e)}},57370:function(e,t,n){var r=n(34311)(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()});e.exports=r},829:function(e,t,n){var r=n(62034),i=n(23813),o=n(36060),a=n(82406),s=o(function(e,t){if(null==e)return[];var n=t.length;return n>1&&a(e,t[0],t[1])?t=[]:n>2&&a(t[0],t[1],t[2])&&(t=[t[0]]),i(e,r(t,1),[])});e.exports=s},30981:function(e){e.exports=function(){return[]}},36330:function(e){e.exports=function(){return!1}},12436:function(e,t,n){var r=n(54073),i=n(29259);e.exports=function(e,t,n){var o=!0,a=!0;if("function"!=typeof e)throw TypeError("Expected a function");return i(n)&&(o="leading"in n?!!n.leading:o,a="trailing"in n?!!n.trailing:a),r(e,t,{leading:o,maxWait:t,trailing:a})}},61258:function(e,t,n){var r=n(36473),i=n(89419),o=n(38101),a=Math.min;e.exports=function(e,t){if((e=o(e))<1||e>9007199254740991)return[];var n=4294967295,s=a(e,4294967295);t=i(t),e-=4294967295;for(var l=r(s,t);++n"+t.value+""+i[o].show+""+e.value+"",type:10}):r.push({value:(1!=t.type?"(":"")+t.value+(1!=t.type?")":"")+""+e.value+"",type:1})):2===i[o].type||9===i[o].type?(e=r.pop(),t=r.pop(),r.push({value:(1!=t.type?"(":"")+t.value+(1!=t.type?")":"")+i[o].show+(1!=e.type?"(":"")+e.value+(1!=e.type?")":""),type:i[o].type})):12===i[o].type&&(e=r.pop(),t=r.pop(),n=r.pop(),r.push({value:i[o].show+"("+n.value+","+t.value+","+e.value+")",type:12}));return r[0].value},e.exports=r},66655:function(e,t,n){"use strict";var r=n(72346);function i(e,t){for(var n=0;np.length-2?p.length-1:e.length-l;n>0;n--)if(void 0!==p[n])for(i=0;i0&&kn)s.push(e);else{for(;n>=i&&!c||c&&i1)throw new r.Exception("Uncaught Syntax error");return o[0].value>1e15?"Infinity":parseFloat(o[0].value.toFixed(15))},r.eval=function(e,t,n){return void 0===t?this.lex(e).toPostfix().postfixEval():void 0!==n?this.lex(e,t).toPostfix().postfixEval(n):void 0!==t.length?this.lex(e,t).toPostfix().postfixEval():this.lex(e).toPostfix().postfixEval(t)},e.exports=r},38617:function(e,t,n){"use strict";n.d(t,{F:function(){return u},f:function(){return c}});var r=n(2784);let i=["light","dark"],o="(prefers-color-scheme: dark)",a="undefined"==typeof window,s=(0,r.createContext)(void 0),l={setTheme:e=>{},themes:[]},u=()=>{var e;return null!==(e=(0,r.useContext)(s))&&void 0!==e?e:l},c=e=>(0,r.useContext)(s)?r.createElement(r.Fragment,null,e.children):r.createElement(f,e),d=["light","dark"],f=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:n=!0,enableColorScheme:a=!0,storageKey:l="theme",themes:u=d,defaultTheme:c=n?"system":"light",attribute:f="data-theme",value:g,children:y,nonce:b})=>{let[x,w]=(0,r.useState)(()=>p(l,c)),[j,E]=(0,r.useState)(()=>p(l)),k=g?Object.values(g):u,S=(0,r.useCallback)(e=>{let r=e;if(!r)return;"system"===e&&n&&(r=v());let o=g?g[r]:r,s=t?m():null,l=document.documentElement;if("class"===f?(l.classList.remove(...k),o&&l.classList.add(o)):o?l.setAttribute(f,o):l.removeAttribute(f),a){let e=i.includes(c)?c:null,t=i.includes(r)?r:e;l.style.colorScheme=t}null==s||s()},[]),_=(0,r.useCallback)(e=>{w(e);try{localStorage.setItem(l,e)}catch(e){}},[e]),C=(0,r.useCallback)(t=>{let r=v(t);E(r),"system"===x&&n&&!e&&S("system")},[x,e]);(0,r.useEffect)(()=>{let e=window.matchMedia(o);return e.addListener(C),C(e),()=>e.removeListener(C)},[C]),(0,r.useEffect)(()=>{let e=e=>{e.key===l&&_(e.newValue||c)};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[_]),(0,r.useEffect)(()=>{S(null!=e?e:x)},[e,x]);let O=(0,r.useMemo)(()=>({theme:x,setTheme:_,forcedTheme:e,resolvedTheme:"system"===x?j:x,themes:n?[...u,"system"]:u,systemTheme:n?j:void 0}),[x,_,e,j,n,u]);return r.createElement(s.Provider,{value:O},r.createElement(h,{forcedTheme:e,disableTransitionOnChange:t,enableSystem:n,enableColorScheme:a,storageKey:l,themes:u,defaultTheme:c,attribute:f,value:g,children:y,attrs:k,nonce:b}),y)},h=(0,r.memo)(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:a,enableColorScheme:s,defaultTheme:l,value:u,attrs:c,nonce:d})=>{let f="system"===l,h="class"===n?`var d=document.documentElement,c=d.classList;c.remove(${c.map(e=>`'${e}'`).join(",")});`:`var d=document.documentElement,n='${n}',s='setAttribute';`,p=s?i.includes(l)&&l?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${l}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",m=(e,t=!1,r=!0)=>{let o=u?u[e]:e,a=t?e+"|| ''":`'${o}'`,l="";return s&&r&&!t&&i.includes(e)&&(l+=`d.style.colorScheme = '${e}';`),"class"===n?l+=t||o?`c.add(${a})`:"null":o&&(l+=`d[s](n,${a})`),l},v=e?`!function(){${h}${m(e)}}()`:a?`!function(){try{${h}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${f})){var t='${o}',m=window.matchMedia(t);if(m.media!==t||m.matches){${m("dark")}}else{${m("light")}}}else if(e){${u?`var x=${JSON.stringify(u)};`:""}${m(u?"x[e]":"e",!0)}}${f?"":"else{"+m(l,!1,!1)+"}"}${p}}catch(e){}}()`:`!function(){try{${h}var e=localStorage.getItem('${t}');if(e){${u?`var x=${JSON.stringify(u)};`:""}${m(u?"x[e]":"e",!0)}}else{${m(l,!1,!1)};}${p}}catch(t){}}();`;return r.createElement("script",{nonce:d,dangerouslySetInnerHTML:{__html:v}})},()=>!0),p=(e,t)=>{let n;if(!a){try{n=localStorage.getItem(e)||void 0}catch(e){}return n||t}},m=()=>{let e=document.createElement("style");return e.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(e),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(e)},1)}},v=e=>(e||(e=window.matchMedia(o)),e.matches?"dark":"light")},86570:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return n(48201)}])},4941:function(e,t,n){"use strict";n.d(t,{Ul:function(){return s},WD:function(){return l},fu:function(){return c},o4:function(){return u}});var r=n(52322),i=n(23305),o=n(82851),a=n(99182);function s(e){let{currentPage:t,parentPage:n,commandPage:s,className:l,...u}=e,c=(0,a.U8)(e=>e.search);if((null==n?void 0:n.namespace)===(null==t?void 0:t.namespace)&&!c)return(0,r.jsx)(a.mY.Item,{className:(0,o.cx)((0,i.Vkc)(),"group",l),value:"".concat(null==s?void 0:s.label," ").concat(u.children.toString()),...u})}function l(e){let{currentPage:t,commandPage:n,className:s,...l}=e,u=(0,a.U8)(e=>e.search),c=n.namespace.startsWith((null==t?void 0:t.namespace)||"");if(u&&c||n.namespace===(null==t?void 0:t.namespace))return(0,r.jsx)(a.mY.Item,{className:(0,o.cx)((0,i.Vkc)(),"group",s),value:"".concat(n.label," ").concat(l.children.toString()),...l})}function u(e){let{currentPage:t,commandPage:n,className:s,...l}=e,u=(0,a.U8)(e=>e.search),c=n.namespace.startsWith((null==t?void 0:t.namespace)||"");if(u&&c||!t||n.namespace===(null==t?void 0:t.namespace))return(0,r.jsx)(a.mY.Item,{className:(0,o.cx)((0,i.Vkc)(),"group",s),value:"".concat(n.label," ").concat(l.children.toString()),...l})}function c(e){let{heading:t,currentPage:n,commandPage:o,...s}=e,l=(0,a.U8)(e=>e.search);return(0,r.jsx)(a.mY.Group,{heading:l&&(null==n?void 0:n.namespace)!==o.namespace&&(0,r.jsx)(i.__J,{className:"px-1",size:"12",children:o.label}),...s})}n(2784)},82459:function(e,t,n){"use strict";n.d(t,{F:function(){return g}});var r=n(52322),i=n(23305),o=n(88242),a=n(9969),s=n(71930),l=n(5632),u=n(13242),c=n(19513),d=n(33571),f=n(98358),h=n(31781),p=n(24801),m=n(86450),v=n(2784);function g(e){var t,n;let{id:g,address:y,publicKey:b,contentProps:x,buttonProps:w}=e,j=(0,l.useRouter)(),{setFilter:E,resetFilters:k}=(0,c.l)(),{setFilter:S,resetFilters:_}=(0,u.G)(),C=(0,a.uf)(),O=(0,a.s2)(),M=(0,f.l)(),T=(0,d.I)(),A=function(){let{openConfirmDialog:e}=(0,m.Rh)(),t=(0,a.IK)();return(0,v.useCallback)(n=>e({title:"Delete contract",action:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.Jrl,{}),"Delete"]}),variant:"red",body:(0,r.jsxs)("div",{className:"flex flex-col",children:[(0,r.jsx)(i.nvN,{size:"14",children:"Are you sure you would like to delete the following contract:"}),(0,r.jsxs)(i.nvN,{size:"14",font:"mono",children:[n.slice(0,20),"..."]})]}),onConfirm:async()=>{let e=await t.delete({params:{id:n}});e.error&&(0,i.OHV)("Error deleting contract."),(0,i.OPV)("Successfully deleted contract.")}}),[e,t])}();return(0,r.jsxs)(i.h_2,{trigger:(0,r.jsx)(i.zxk,{variant:"ghost",icon:"hover",...w,children:(0,r.jsx)(o.iG7,{})}),contentProps:{align:"start",...x,onClick:e=>{e.stopPropagation()}},children:[(0,r.jsx)("div",{className:"px-1.5 py-1",children:(0,r.jsxs)(i.xvT,{size:"14",weight:"medium",color:"subtle",children:["Contract ",b.slice(0,24),"..."]})}),(0,r.jsx)(i.Juw,{children:"Filters"}),(0,r.jsxs)(i.Xiv,{onSelect:()=>{k(),E({id:"addressContains",value:y,label:"Address contains ".concat(y)}),j.push(s._.hosts.index)},children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(o.q0D,{})}),"Filter hosts by host address"]}),(0,r.jsxs)(i.Xiv,{onSelect:()=>{_(),S((0,h.e)(y)),j.push(s._.contracts.index)},children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(o.q0D,{})}),"Filter contracts by host address"]}),(0,r.jsxs)(i.Xiv,{onSelect:()=>{_(),S((0,p.V)(b)),j.push(s._.contracts.index)},children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(o.q0D,{})}),"Filter contracts by host public key"]}),(0,r.jsx)(i.Juw,{children:"Actions"}),(null===(t=C.data)||void 0===t?void 0:t.find(e=>e===y))?(0,r.jsxs)(i.Xiv,{onSelect:()=>M([],[y]),children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(o.nCM,{})}),"Remove host address from blocklist"]}):(0,r.jsxs)(i.Xiv,{onSelect:()=>M([y],[]),children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(o.nCM,{})}),"Add host address to blocklist"]}),(null===(n=O.data)||void 0===n?void 0:n.find(e=>e===b))?(0,r.jsxs)(i.Xiv,{onSelect:()=>T([],[b]),children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(o.nCM,{})}),"Remove host public key from allowlist"]}):(0,r.jsxs)(i.Xiv,{onSelect:()=>T([b],[]),children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(o.nCM,{})}),"Add host public key to allowlist"]}),(0,r.jsxs)(i.Xiv,{onSelect:()=>A(g),children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(o.Jrl,{})}),"Delete contract"]}),(0,r.jsx)(i.Juw,{children:"Copy"}),(0,r.jsxs)(i.Xiv,{onSelect:()=>(0,i.vQq)(g,"contract ID"),children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(o.olJ,{})}),"Contract ID"]}),(0,r.jsxs)(i.Xiv,{onSelect:()=>(0,i.vQq)(b,"host public key"),children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(o.olJ,{})}),"Host public key"]}),(0,r.jsxs)(i.Xiv,{onSelect:()=>(0,i.vQq)(y,"host address"),children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(o.olJ,{})}),"Host address"]})]})}},93216:function(e,t,n){"use strict";n.d(t,{F:function(){return M}});var r=n(52322),i=n(23305),o=n(4941);let a={namespace:"contracts/filterExpiryDate",label:"Contracts filter by expiry date"},s=[{id:"expiry",value:"day",label:"expires today",fn:e=>{let t=new Date().getTime(),n=t+(0,i.NrH)(1);return e.endTimet}},{id:"expiry",value:"week",label:"expires this week",fn:e=>{let t=new Date().getTime(),n=t+(0,i.BL0)(1);return e.endTimet}},{id:"expiry",value:"month",label:"expires this month",fn:e=>{let t=new Date().getTime(),n=t+(0,i.xLV)(1);return e.endTimet}},{id:"expiry",value:"nextMonth",label:"expires next month",fn:e=>{let t=new Date().getTime(),n=t+(0,i.xLV)(2);return e.endTimet}},{id:"expiry",value:"year",label:"expires this year",fn:e=>{let t=new Date().getTime(),n=t+(0,i.ivg)(1);return e.endTimet}},{id:"expiry",value:"expired",label:"expired",fn:e=>{let t=new Date().getTime();return e.endTime(0,r.jsx)(o.WD,{currentPage:t,commandPage:a,onSelect:()=>{n(e)},children:e.label},e.id+e.value))})}let u={namespace:"contracts/filterFormationDate",label:"Contracts filter by formation date"},c=[{id:"formationDate",value:"day",label:"formed in the last day",fn:e=>{let t=new Date().getTime(),n=t-(0,i.NrH)(1);return e.startTime>=n}},{id:"formationDate",value:"week",label:"formed in the last week",fn:e=>{let t=new Date().getTime(),n=t-(0,i.BL0)(1);return e.startTime>=n}},{id:"formationDate",value:"twoWeeks",label:"formed in the last two weeks",fn:e=>{let t=new Date().getTime(),n=t-(0,i.BL0)(2);return e.startTime>=n}},{id:"formationDate",value:"month",label:"formed in the last month",fn:e=>{let t=new Date().getTime(),n=t-(0,i.xLV)(1);return e.startTime>=n}},{id:"formationDate",value:"twoMonths",label:"formed in the last two months",fn:e=>{let t=new Date().getTime(),n=t-(0,i.xLV)(2);return e.startTime>=n}},{id:"formationDate",value:"year",label:"formed in the last year",fn:e=>{let t=new Date().getTime(),n=t-(0,i.ivg)(1);return e.startTime>=n}}];function d(e){let{currentPage:t,select:n}=e;return(0,r.jsx)(o.fu,{currentPage:t,commandPage:u,children:c.map(e=>(0,r.jsx)(o.WD,{currentPage:t,commandPage:u,onSelect:()=>{n(e)},children:e.label},e.id+e.value))})}let f={namespace:"contracts/filterRenewDate",label:"Contracts filter by renew date"},h=[{id:"renewDate",value:"day",label:"renewed in the last day",fn:e=>{let t=new Date().getTime(),n=t-(0,i.NrH)(1);return e.isRenewed&&e.startTime>=n}},{id:"renewDate",value:"week",label:"renewed in the last week",fn:e=>{let t=new Date().getTime(),n=t-(0,i.BL0)(1);return e.isRenewed&&e.startTime>=n}},{id:"renewDate",value:"twoWeeks",label:"renewed in the last two weeks",fn:e=>{let t=new Date().getTime(),n=t-(0,i.BL0)(2);return e.isRenewed&&e.startTime>=n}},{id:"renewDate",value:"month",label:"renewed in the last month",fn:e=>{let t=new Date().getTime(),n=t-(0,i.xLV)(1);return e.isRenewed&&e.startTime>=n}},{id:"renewDate",value:"twoMonths",label:"renewed in the last two months",fn:e=>{let t=new Date().getTime(),n=t-(0,i.xLV)(2);return e.isRenewed&&e.startTime>=n}},{id:"renewDate",value:"year",label:"renewed in the last year",fn:e=>{let t=new Date().getTime(),n=t-(0,i.ivg)(1);return e.isRenewed&&e.startTime>=n}}];function p(e){let{currentPage:t,select:n}=e;return(0,r.jsx)(o.fu,{currentPage:t,commandPage:f,children:h.map(e=>(0,r.jsx)(o.WD,{currentPage:t,commandPage:f,onSelect:()=>{n(e)},children:e.label},e.id+e.value))})}var m=n(86450),v=n(31781);let g={namespace:"contracts/filterAddress",label:"Contracts filter by address"};function y(e){let{select:t,currentPage:n}=e,{openDialog:i}=(0,m.Rh)(),a=(0,v.e)("");return(0,r.jsx)(o.fu,{currentPage:n,commandPage:g,children:(0,r.jsx)(o.WD,{currentPage:n,commandPage:g,onSelect:()=>{t(),i("contractsFilterAddress")},children:a.label})})}function b(e){let{select:t,currentPage:n,parentPage:i,commandPage:a}=e,{openDialog:s}=(0,m.Rh)();return(0,r.jsx)(o.Ul,{currentPage:n,parentPage:i,commandPage:a,onSelect:()=>{t(),s("contractsFilterAddress")},children:g.label})}var x=n(24801);let w={namespace:"contracts/filterPublicKey",label:"Contracts filter by public key"};function j(e){let{select:t,currentPage:n}=e,i=(0,x.V)(""),{openDialog:a}=(0,m.Rh)();return(0,r.jsx)(o.fu,{currentPage:n,commandPage:w,children:(0,r.jsx)(o.WD,{currentPage:n,commandPage:w,onSelect:()=>{t(),a("contractsFilterPublicKey")},children:i.label})})}function E(e){let{select:t,currentPage:n,parentPage:i,commandPage:a}=e,{openDialog:s}=(0,m.Rh)();return(0,r.jsx)(o.Ul,{currentPage:n,parentPage:i,commandPage:a,onSelect:()=>{t(),s("contractsFilterPublicKey")},children:w.label})}function k(e){let{currentPage:t,select:n}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(y,{currentPage:t,select:n}),(0,r.jsx)(j,{currentPage:t,select:n}),(0,r.jsx)(l,{currentPage:t,select:n}),(0,r.jsx)(d,{currentPage:t,select:n}),(0,r.jsx)(p,{currentPage:t,select:n})]})}let S={namespace:"contracts",label:"Contracts"};function _(e){let{currentPage:t,parentPage:n,pushPage:i,select:s}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(b,{currentPage:t,parentPage:n,commandPage:S,select:s}),(0,r.jsx)(E,{currentPage:t,parentPage:n,commandPage:S,select:s}),(0,r.jsx)(o.Ul,{currentPage:t,parentPage:n,commandPage:S,onSelect:()=>{i(u)},children:u.label}),(0,r.jsx)(o.Ul,{currentPage:t,parentPage:n,commandPage:S,onSelect:()=>{i(a)},children:a.label}),(0,r.jsx)(o.Ul,{currentPage:t,parentPage:n,commandPage:S,onSelect:()=>{i(f)},children:f.label})]})}var C=n(13242),O=n(2784);function M(e){let{currentPage:t,parentPage:n,pushPage:i,beforeSelect:o,afterSelect:a}=e,{setFilter:s}=(0,C.G)(),l=(0,O.useCallback)(e=>{o&&o(),e&&s(e),a&&a()},[s,o,a]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(_,{parentPage:n,currentPage:t,pushPage:i,select:l}),(0,r.jsx)(k,{currentPage:t,select:l})]})}},31781:function(e,t,n){"use strict";n.d(t,{e:function(){return u},p:function(){return f}});var r=n(52322),i=n(23305),o=n(13242),a=n(9156),s=n(24511),l=n(86450);function u(e){return{id:"addressContains",value:e,label:"address contains ".concat(e),fn:t=>t.hostIp.includes(e)}}let c={address:""},d=s.Ry().shape({address:s.Z_().required("Required")});function f(e){let{trigger:t,open:n,onOpenChange:s}=e,{closeDialog:f}=(0,l.Rh)(),{setFilter:h}=(0,o.G)(),p=(0,a.TA)({initialValues:c,validationSchema:d,onSubmit:e=>{h(u(e.address)),p.resetForm(),f()}});return(0,r.jsx)(i.VqE,{trigger:t,title:"Filter by address",open:n,onOpenChange:e=>{e||p.resetForm(),s(e)},contentVariants:{className:"w-[400px]"},onSubmit:p.handleSubmit,children:(0,r.jsx)("div",{className:"flex flex-col gap-4",children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(i.cB7,{formik:p,title:"Address",name:"address",placeholder:"Partial match against domain or IP",autoComplete:"off",type:"text",variants:{size:"medium"}}),(0,r.jsx)(i.IKw,{formik:p,size:"medium",children:"Filter"})]})})})}},24801:function(e,t,n){"use strict";n.d(t,{C:function(){return f},V:function(){return u}});var r=n(52322),i=n(23305),o=n(13242),a=n(9156),s=n(24511),l=n(86450);function u(e){return{id:"publicKeyContains",value:e,label:"public key contains ".concat((0,i.$Gg)(e,20)),fn:t=>t.hostKey.includes(e)}}let c={publicKey:""},d=s.Ry().shape({publicKey:s.Z_().required("Required")});function f(e){let{trigger:t,open:n,onOpenChange:s}=e,{closeDialog:f}=(0,l.Rh)(),{setFilter:h}=(0,o.G)(),p=(0,a.TA)({initialValues:c,validationSchema:d,onSubmit:e=>{h(u(e.publicKey)),p.resetForm(),f()}});return(0,r.jsx)(i.VqE,{trigger:t,title:"Filter by public key",open:n,onOpenChange:e=>{e||p.resetForm(),s(e)},contentVariants:{className:"w-[400px]"},onSubmit:p.handleSubmit,children:(0,r.jsx)("div",{className:"flex flex-col gap-4",children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(i.cB7,{formik:p,title:"Public key",name:"publicKey",placeholder:"ed25519:02aabd26e627fd...",autoComplete:"off",type:"text",variants:{size:"medium"}}),(0,r.jsx)(i.IKw,{formik:p,size:"medium",children:"Filter"})]})})})}},4370:function(e,t,n){"use strict";n.d(t,{F:function(){return o}});var r=n(13242),i=n(34658);function o(){var e;let t=(0,i.w)(),{datasetConfirmedCount:n,isLoading:o}=(0,r.G)(),a=t.data&&!o&&n{e.stopPropagation()}},children:[(0,r.jsx)("div",{className:"px-1.5 py-1",children:(0,r.jsxs)(i.xvT,{size:"14",weight:"medium",color:"subtle",children:["Host ",g.slice(0,24),"..."]})}),(0,r.jsx)(i.Juw,{children:"Filters"}),(0,r.jsxs)(i.Xiv,{onSelect:()=>{j(),w({id:"addressContains",value:v,label:"Address contains ".concat((0,i.$Gg)(v,20))}),x.push(s._.hosts.index)},children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(o.q0D,{})}),"Filter hosts by address"]}),(0,r.jsxs)(i.Xiv,{onSelect:()=>{j(),w((0,m.K)(g)),x.push(s._.hosts.index)},children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(o.q0D,{})}),"Filter hosts by public key"]}),(0,r.jsxs)(i.Xiv,{onSelect:()=>{k(),E((0,h.e)(v)),x.push(s._.contracts.index)},children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(o.q0D,{})}),"Filter contracts by host address"]}),(0,r.jsxs)(i.Xiv,{onSelect:()=>{k(),E((0,p.V)(g)),x.push(s._.contracts.index)},children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(o.q0D,{})}),"Filter contracts by host public key"]}),(0,r.jsx)(i.Juw,{children:"Actions"}),(0,r.jsxs)(i.Xiv,{onSelect:()=>M.post({payload:{hostKey:g,hostIP:v,timeout:(0,i.XBW)(30)}}),children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(o._Eq,{})}),"Rescan host"]}),(null===(t=S.data)||void 0===t?void 0:t.find(e=>e===v))?(0,r.jsxs)(i.Xiv,{onSelect:()=>C([],[v]),children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(o.nCM,{})}),"Remove address from blocklist"]}):(0,r.jsxs)(i.Xiv,{onSelect:()=>C([v],[]),children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(o.nCM,{})}),"Add address to blocklist"]}),(null===(n=_.data)||void 0===n?void 0:n.find(e=>e===g))?(0,r.jsxs)(i.Xiv,{onSelect:()=>O([],[g]),children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(o.nCM,{})}),"Remove public key from allowlist"]}):(0,r.jsxs)(i.Xiv,{onSelect:()=>O([g],[]),children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(o.nCM,{})}),"Add public key to allowlist"]})]})}},34444:function(e,t,n){"use strict";n.d(t,{T:function(){return j},N:function(){return w}});var r=n(52322),i=n(2784),o=n(23305),a=n(96206),s=n(6391),l=n.n(s);function u(e){let{host:t,rates:n}=e,r=n?"$".concat(new(l())(t.settings.storageprice).times((0,o.xf5)(1)).times((0,o.S5V)(1)).div(1e24).times((null==n?void 0:n.usd)||1).toFixed(2),"/TB"):"".concat((0,a.Vz)(new(l())(t.settings.storageprice).times((0,o.xf5)(1)).times((0,o.S5V)(1)),{fixed:0}),"/TB"),i="".concat((0,a.vW)(t.activeContracts.reduce((e,t)=>e.plus(t.size),new(l())(0)).toNumber())," utilized"),s="".concat((0,a.vW)(t.settings.remainingstorage)," / ").concat((0,a.vW)(t.settings.totalstorage)," available");return"".concat((0,o.HLH)(t.countryCode)," \xb7 ").concat(r," \xb7 ").concat(i," \xb7 ").concat(s)}var c=function(){let[e,t]=(0,i.useState)(null),[n,r]=(0,i.useState)({width:0,height:0}),o=(0,i.useCallback)(()=>{r({width:(null==e?void 0:e.offsetWidth)||0,height:(null==e?void 0:e.offsetHeight)||0})},[null==e?void 0:e.offsetHeight,null==e?void 0:e.offsetWidth]);return d("resize",o),h(()=>{o()},[null==e?void 0:e.offsetHeight,null==e?void 0:e.offsetWidth]),[t,n]},d=function(e,t,n,r){let o=(0,i.useRef)(t);h(()=>{o.current=t},[t]),(0,i.useEffect)(()=>{var t;let i=null!==(t=null==n?void 0:n.current)&&void 0!==t?t:window;if(!(i&&i.addEventListener))return;let a=e=>o.current(e);return i.addEventListener(e,a,r),()=>{i.removeEventListener(e,a,r)}},[e,n,r])};let f="undefined"!=typeof window?i.useLayoutEffect:i.useEffect;var h=f,p=n(2850),m=n(25237),v=n.n(m);let g=v()(()=>Promise.all([n.e(546),n.e(508),n.e(167),n.e(764),n.e(17)]).then(n.bind(n,45017)),{loadableGenerated:{webpack:()=>[45017]},ssr:!1}),y=(0,i.forwardRef)(function(e,t){return(0,r.jsx)(g,{...e,forwardRef:t})});var b=n(10917),x=n(47025);let w={moveToLocation:(e,t)=>null};function j(e){let{activeHost:t,hosts:n,onMount:o,onHostClick:a,onHostHover:s}=e,d=(0,x.BW)({config:{swr:{revalidateOnFocus:!1}}}),f=(0,i.useRef)(null),h=(0,i.useRef)(w),m=(0,i.useCallback)((e,t)=>{var n;e&&(null===(n=f.current)||void 0===n||n.pointOfView({lat:e[0]-8,lng:e[1],altitude:t||1.5},700))},[]);(0,i.useEffect)(()=>{h.current.moveToLocation=m},[m]),(0,p.Q5)(()=>{var e;if(!f.current)return!1;m((null==t?void 0:t.location)||[48.8323,2.4075],1.5);let n=null===(e=f.current)||void 0===e?void 0:e.scene().children.find(e=>"DirectionalLight"===e.type);return n&&(n.intensity=10),!0}),(0,i.useEffect)(()=>{o&&o(h.current)},[]);let[v,{height:g,width:j}]=c(),E=(0,i.useMemo)(()=>n||[],[n]);return(0,r.jsx)("div",{ref:v,className:"w-full h-full",children:(0,r.jsx)(y,{ref:f,width:j,height:g,backgroundColor:"rgba(0,0,0,0)",globeImageUrl:"/_next/static/media/earth-dark-contrast.bf7081fc.png",bumpImageUrl:"/_next/static/media/earth-topology.e385a70e.png",arcsData:[],atmosphereColor:"rgba(0,0,0,0)",atmosphereAltitude:.16,animateIn:!1,arcLabel:e=>{var t;return u({host:e.dst,rates:null===(t=d.data)||void 0===t?void 0:t.rates.sc})},arcStartLat:e=>+e.src.location[0],arcStartLng:e=>+e.src.location[1],arcEndLat:e=>+e.dst.location[0],arcEndLng:e=>+e.dst.location[1],arcDashLength:.75,arcAltitude:0,arcDashGap:.1,arcDashInitialGap:()=>Math.random(),arcDashAnimateTime:5e3,arcColor:e=>t&&(e.dst.publicKey===t.publicKey||e.src.publicKey===t.publicKey)?["rgba(187, 229, 201, 0.25)","rgba(187, 229, 201, 0.25)"]:["rgba(187, 229, 201, 0.10)","rgba(187, 229, 201, 0.10)"],arcsTransitionDuration:0,pointsData:E,pointLat:e=>e.location[0],pointLng:e=>e.location[1],pointLabel:e=>{var t;return u({host:e,rates:null===(t=d.data)||void 0===t?void 0:t.rates.sc})},pointAltitude:e=>(t&&e.publicKey===(null==t?void 0:t.publicKey)||e.activeContractsCount.gt(0),.1),pointsTransitionDuration:0,pointColor:e=>{let{colorHex:n}=(0,b.Kg)(e);return t&&e.publicKey!==(null==t?void 0:t.publicKey)?function(e,t){let n=parseInt(e.slice(1,3),16),r=parseInt(e.slice(3,5),16),i=parseInt(e.slice(5,7),16);return"rgba(".concat(n,", ").concat(r,", ").concat(i,", ").concat(.2,")")}(n,0):n},pointRadius:e=>(e.activeContractsCount.gt(0)&&e.activeContracts.reduce((e,t)=>e.plus(t.size),new(l())(0)).div(1e12).toNumber(),Math.max(e.settings.remainingstorage/1e13/3,.1)),onPointHover:e=>{e&&(null==s||s(e.publicKey,e.location))},onPointClick:e=>{e&&(null==a||a(e.publicKey,e.location))},pointsMerge:!1})})}},18006:function(e,t,n){"use strict";n.d(t,{L:function(){return M}});var r=n(52322),i=n(4941),o=n(86450),a=n(2320);let s={namespace:"hosts/filterAddress",label:"Hosts filter by address"};function l(e){let{select:t,currentPage:n}=e,{openDialog:l}=(0,o.Rh)(),u=(0,a.q)("");return(0,r.jsx)(i.fu,{currentPage:n,commandPage:s,children:(0,r.jsx)(i.WD,{currentPage:n,commandPage:s,onSelect:()=>{t(),l("hostsFilterAddress")},children:u.label})})}function u(e){let{select:t,currentPage:n,parentPage:a,commandPage:l}=e,{openDialog:u}=(0,o.Rh)();return(0,r.jsx)(i.Ul,{currentPage:n,parentPage:a,commandPage:l,onSelect:()=>{t(),u("hostsFilterAddress")},children:s.label})}let c={namespace:"hosts/filterAllowBlock",label:"Hosts filter by allow/block status"},d=[{id:"filterMode",value:"allowed",label:"allowed"},{id:"filterMode",value:"blocked",label:"blocked"}];function f(e){let{select:t,currentPage:n}=e;return(0,r.jsx)(i.fu,{currentPage:n,commandPage:c,children:d.map(e=>(0,r.jsx)(i.WD,{currentPage:n,commandPage:c,onSelect:()=>{t(e)},children:e.label},e.id+e.value))})}let h={namespace:"hosts/filterActiveContracts",label:"Hosts filter by contracts"},p={id:"hasActiveContracts",bool:!0,label:"has active contracts"};function m(e){let{select:t,currentPage:n}=e;return(0,r.jsx)(i.fu,{currentPage:n,commandPage:h,children:(0,r.jsx)(i.WD,{currentPage:n,commandPage:h,onSelect:()=>{t(p)},children:p.label})})}let v={namespace:"hosts/filterUsable",label:"Hosts filter by usable"},g=[{id:"usabilityMode",value:"usable",label:"usable"},{id:"usabilityMode",value:"unusable",label:"unusable"}];function y(e){let{select:t,currentPage:n}=e;return(0,r.jsx)(i.fu,{currentPage:n,commandPage:v,children:g.map(e=>(0,r.jsx)(i.WD,{currentPage:n,commandPage:v,onSelect:()=>{t(e)},children:e.label},e.id+e.value))})}var b=n(91641),x=n(54155);let w={namespace:"hosts/filterPublicKey",label:"Hosts filter by public key"};function j(e){let{select:t,currentPage:n}=e,{openDialog:a}=(0,o.Rh)(),s=(0,x.K)("");return(0,r.jsx)(i.fu,{currentPage:n,commandPage:w,children:(0,r.jsx)(i.WD,{currentPage:n,commandPage:w,onSelect:()=>{t(),a("hostsFilterPublicKey")},children:s.label})})}function E(e){let{select:t,currentPage:n,parentPage:a,commandPage:s}=e,{openDialog:l}=(0,o.Rh)();return(0,r.jsx)(i.Ul,{currentPage:n,parentPage:a,commandPage:s,onSelect:()=>{t(),l("hostsFilterPublicKey")},children:w.label})}function k(e){let{currentPage:t,select:n}=e,{autopilot:i}=(0,b.q)();return(0,r.jsxs)(r.Fragment,{children:["on"===i.status&&(0,r.jsx)(y,{currentPage:t,select:n}),(0,r.jsx)(m,{currentPage:t,select:n}),(0,r.jsx)(l,{currentPage:t,select:n}),(0,r.jsx)(j,{currentPage:t,select:n}),(0,r.jsx)(f,{currentPage:t,select:n})]})}let S={namespace:"hosts",label:"Hosts"};function _(e){let{currentPage:t,parentPage:n,pushPage:o,select:a}=e,{autopilot:s}=(0,b.q)();return(0,r.jsxs)(r.Fragment,{children:["on"===s.status&&(0,r.jsx)(i.Ul,{currentPage:t,parentPage:n,commandPage:S,onSelect:()=>{o(v)},children:v.label}),(0,r.jsx)(E,{currentPage:t,parentPage:n,commandPage:S,select:a}),(0,r.jsx)(u,{currentPage:t,parentPage:n,commandPage:S,select:a}),(0,r.jsx)(i.Ul,{currentPage:t,parentPage:n,commandPage:S,onSelect:()=>{o(h)},children:h.label}),(0,r.jsx)(i.Ul,{currentPage:t,parentPage:n,commandPage:S,onSelect:()=>{o(c)},children:c.label})]})}var C=n(19513),O=n(2784);function M(e){let{currentPage:t,parentPage:n,pushPage:i,beforeSelect:o,afterSelect:a}=e,{setFilter:s}=(0,C.l)(),l=(0,O.useCallback)(e=>{o&&o(),e&&s(e),a&&a()},[s,o,a]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(_,{parentPage:n,currentPage:t,pushPage:i,select:l}),(0,r.jsx)(k,{currentPage:t,pushPage:i,select:l})]})}},2320:function(e,t,n){"use strict";n.d(t,{g:function(){return f},q:function(){return u}});var r=n(52322),i=n(23305),o=n(19513),a=n(9156),s=n(24511),l=n(86450);function u(e){return{id:"addressContains",value:e,label:"address contains ".concat(e)}}let c={address:""},d=s.Ry().shape({address:s.Z_().required("Required")});function f(e){let{trigger:t,open:n,onOpenChange:s}=e,{closeDialog:f}=(0,l.Rh)(),{setFilter:h}=(0,o.l)(),p=(0,a.TA)({initialValues:c,validationSchema:d,onSubmit:e=>{h(u(e.address)),p.resetForm(),f()}});return(0,r.jsx)(i.VqE,{trigger:t,title:"Filter by address",open:n,onOpenChange:e=>{e||p.resetForm(),s(e)},contentVariants:{className:"w-[400px]"},onSubmit:p.handleSubmit,children:(0,r.jsx)("div",{className:"flex flex-col gap-4",children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(i.cB7,{formik:p,title:"Address",name:"address",placeholder:"Partial match against domain or IP",autoComplete:"off",type:"text",variants:{size:"medium"}}),(0,r.jsx)(i.IKw,{formik:p,size:"medium",children:"Filter"})]})})})}},54155:function(e,t,n){"use strict";n.d(t,{K:function(){return u},a:function(){return f}});var r=n(52322),i=n(23305),o=n(19513),a=n(9156),s=n(24511),l=n(86450);function u(e){return{id:"publicKeyEquals",value:e,label:"public key is ".concat((0,i.$Gg)(e,20))}}let c={publicKey:""},d=s.Ry().shape({publicKey:s.Z_().required("Required")});function f(e){let{trigger:t,open:n,onOpenChange:s}=e,{closeDialog:f}=(0,l.Rh)(),{setFilter:h}=(0,o.l)(),p=(0,a.TA)({initialValues:c,validationSchema:d,onSubmit:e=>{h(u(e.publicKey)),p.resetForm(),f()}});return(0,r.jsx)(i.VqE,{trigger:t,title:"Filter by public key",open:n,onOpenChange:e=>{e||p.resetForm(),s(e)},contentVariants:{className:"w-[400px]"},onSubmit:p.handleSubmit,children:(0,r.jsx)("div",{className:"flex flex-col gap-4",children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(i.cB7,{formik:p,title:"Public key",name:"publicKey",placeholder:"ed25519:b050c0c6...",autoComplete:"off",type:"text",variants:{size:"medium"}}),(0,r.jsx)(i.IKw,{formik:p,size:"medium",children:"Filter"})]})})})}},71930:function(e,t,n){"use strict";n.d(t,{_:function(){return i},h:function(){return o}});var r=n(9969);let i={home:"/",files:{index:"/files"},config:{index:"/config",storage:"/config#storage",pricing:"/config#pricing",hosts:"/config#hosts",wallet:"/config#wallet",contracts:"/config#contracts",uploads:"/config#uploads",redundancy:"/config#redundancy"},contracts:{index:"/contracts"},hosts:{index:"/hosts"},wallet:{view:"/wallet"},node:{index:"/node"},login:"/login"},o=r.HI},91641:function(e,t,n){"use strict";n.d(t,{w:function(){return u},q:function(){return l}});var r=n(52322),i=n(2784),o=n(23305),a=n(9969);let s=(0,i.createContext)({}),l=()=>(0,i.useContext)(s);function u(e){let{children:t}=e,n=function(){let e=function(){let e=(0,a.YX)({config:{swr:{dedupingInterval:(0,o.XBW)(5),revalidateOnFocus:!1,refreshInterval:e=>e?(0,o.XBW)(60):(0,o.XBW)(1)}}}),[t,n]=(0,i.useState)("init");return(0,i.useEffect)(()=>{if(e.isLoading)n("init");else if(e.isValidating)return;else if(e.error)n("off");else if(e.data){let t="object"==typeof e.data;n(t?"on":"off")}},[e]),{status:t,state:e}}();return{autopilot:e}}();return(0,r.jsx)(s.Provider,{value:n,children:t})}},17286:function(e,t,n){"use strict";n.d(t,{iV:function(){return V},ZR:function(){return z}});var r=n(52322),i=n(2784),o=n(23305),a=n(6391),s=n.n(a),l=n(9969),u=n(96206);let c={autopilotContractSet:"",amountHosts:void 0,allowanceMonth:void 0,periodWeeks:void 0,renewWindowWeeks:void 0,downloadTBMonth:void 0,uploadTBMonth:void 0,storageTB:void 0,allowRedundantIPs:!1,maxDowntimeHours:void 0,defragThreshold:void 0},d={defaultContractSet:""},f={uploadPackingEnabled:!0},h={includeRedundancyMaxStoragePrice:!0,includeRedundancyMaxUploadPrice:!0},p={maxRpcPriceMillion:void 0,maxStoragePriceTBMonth:void 0,maxContractPrice:void 0,maxDownloadPriceTB:void 0,maxUploadPriceTB:void 0,minMaxCollateral:void 0,hostBlockHeightLeeway:void 0,minPriceTableValidityMinutes:void 0,minAccountExpiryDays:void 0,minMaxEphemeralAccountBalance:void 0},m={minShards:void 0,totalShards:void 0},v={...c,...d,...f,...p,...m,...h},g={...c,downloadTBMonth:new(s())(1),uploadTBMonth:new(s())(1),periodWeeks:new(s())(6),renewWindowWeeks:new(s())(2),amountHosts:new(s())(50),autopilotContractSet:"autopilot",allowRedundantIPs:!1,maxDowntimeHours:new(s())(1440),defragThreshold:new(s())(1e3)},y={...d,defaultContractSet:"autopilot"};({...f});let b={...p};function x(e){let{isAutopilotEnabled:t,showAdvanced:n,redundancyMultiplier:i,includeRedundancyMaxStoragePrice:a,includeRedundancyMaxUploadPrice:l,storageAverage:u,uploadAverage:c,downloadAverage:d,contractAverage:f}=e;return{storageTB:{type:"number",category:"storage",title:"Expected storage",description:(0,r.jsx)(r.Fragment,{children:"The amount of storage you would like to rent in TB."}),units:"TB",hidden:!t,validation:t?{required:"required"}:{}},uploadTBMonth:{type:"number",category:"storage",title:"Expected upload",description:(0,r.jsx)(r.Fragment,{children:"The amount of upload bandwidth you plan to use each month in TB."}),units:"TB/month",hidden:!t||!n,validation:t&&n?{required:"required"}:{}},downloadTBMonth:{type:"number",category:"storage",title:"Expected download",description:(0,r.jsx)(r.Fragment,{children:"The amount of download bandwidth you plan to use each month in TB."}),units:"TB/month",hidden:!t||!n,validation:t&&n?{required:"required"}:{}},allowanceMonth:{type:"siacoin",category:"storage",title:"Allowance",description:(0,r.jsx)(r.Fragment,{children:"The amount of Siacoin you would like to spend per month."}),units:"SC/month",decimalsLimitSc:6,hidden:!t||!n,validation:t&&n?{required:"required"}:{}},periodWeeks:{type:"number",category:"storage",title:"Period",description:(0,r.jsx)(r.Fragment,{children:"The length of the storage contracts."}),units:"weeks",suggestion:g.periodWeeks,suggestionTip:"Typically ".concat(g.periodWeeks," weeks."),hidden:!t||!n,validation:t&&n?{required:"required"}:{}},renewWindowWeeks:{type:"number",category:"storage",title:"Renew window",description:(0,r.jsx)(r.Fragment,{children:"The number of weeks prior to contract expiration that Sia will attempt to renew your contracts."}),units:"weeks",decimalsLimit:6,suggestion:g.renewWindowWeeks,suggestionTip:"Typically ".concat(g.renewWindowWeeks," weeks."),hidden:!t||!n,validation:t&&n?{required:"required"}:{}},amountHosts:{type:"number",category:"storage",title:"Hosts",description:(0,r.jsx)(r.Fragment,{children:"The number of hosts to create contracts with."}),units:"hosts",decimalsLimit:0,suggestion:g.amountHosts,suggestionTip:"Typically ".concat(g.amountHosts," hosts."),hidden:!t||!n,validation:t&&n?{required:"required"}:{}},autopilotContractSet:{type:"text",category:"storage",title:"Contract set",description:(0,r.jsx)(r.Fragment,{children:"The contract set that autopilot should use. This should typically be the same as the default contract set."}),placeholder:g.autopilotContractSet,suggestion:g.autopilotContractSet,suggestionTip:(0,r.jsxs)(r.Fragment,{children:["The default contract set is"," ",(0,r.jsx)(o.EKh,{children:g.autopilotContractSet}),"."]}),hidden:!t||!n,validation:t&&n?{required:"required"}:{}},allowRedundantIPs:{type:"boolean",category:"hosts",title:"Redundant IPs",description:(0,r.jsx)(r.Fragment,{children:"Whether or not to allow forming contracts with multiple hosts in the same IP subnet. The subnets used are /16 for IPv4, and /64 for IPv6."}),suggestion:g.allowRedundantIPs,suggestionTip:"Defaults to ".concat(g.allowRedundantIPs?"on":"off","."),hidden:!t||!n,validation:{}},maxDowntimeHours:{type:"number",category:"hosts",title:"Max downtime",description:(0,r.jsx)(r.Fragment,{children:"The maximum amount of host downtime that autopilot will tolerate in hours."}),units:"hours",suggestion:g.maxDowntimeHours,suggestionTip:"Defaults to ".concat(g.maxDowntimeHours.toNumber().toLocaleString()," which is ").concat((0,o.y70)(new(s())((0,o.XAn)(g.maxDowntimeHours.toNumber())),1)," days."),hidden:!t||!n,validation:t&&n?{required:"required"}:{}},defragThreshold:{type:"number",category:"wallet",title:"Defrag threshold",description:(0,r.jsx)(r.Fragment,{children:"The threshold after which autopilot will defrag wallet outputs."}),units:"outputs",suggestion:g.defragThreshold,suggestionTip:"Defaults to 1,000.",hidden:!t||!n,validation:t&&n?{required:"required"}:{}},defaultContractSet:{category:"contractset",type:"text",title:"Default contract set",placeholder:y.defaultContractSet,suggestion:y.defaultContractSet,suggestionTip:(0,r.jsx)(r.Fragment,{children:"Autopilot users will typically want to keep this the same as the autopilot contract set."}),description:(0,r.jsx)(r.Fragment,{children:"The default contract set is where data is uploaded to by default."}),hidden:!n,validation:n?{required:"required"}:{}},uploadPackingEnabled:{category:"uploadpacking",type:"boolean",title:"Upload packing",description:(0,r.jsx)(r.Fragment,{children:"Data on the Sia network is stored in 4MiB sectors. With the default 10 of 30 redundancy scheme, uploaded files are split into 40MiB chunks and encoded into 120MiB slabs. This means that storage is wasted on padding and files smaller than 40MiB still use 120MiB of space. The redundancy scheme can be configured, but unless all files are exactly 4MiB * the redundancy's minimum shards, there will always be wasted storage. Upload packing avoids this waste by buffering files and packing them together before they are uploaded to the network. This trades some performance for storage efficiency. It is also important to note that because buffered files are temporarily stored on disk they must be considered when backing up your renterd data."}),hidden:!n,validation:{}},maxStoragePriceTBMonth:{category:"gouging",type:"siacoin",title:"Max storage price",description:(0,r.jsx)(r.Fragment,{children:"The max allowed price to store 1 TB per month."}),units:"SC/TB/month",average:u,averageTip:w(a,i),after:function(e){let{form:t,fields:n}=e;return(0,r.jsx)(o.ua7,{align:"start",side:"bottom",content:j(a,i),children:(0,r.jsx)("div",{children:(0,r.jsx)(o.QBj,{size:"small",form:t,fields:n,name:"includeRedundancyMaxStoragePrice",group:!1,children:(0,r.jsxs)(o.xvT,{size:"12",weight:"medium",children:["Including ",i.toFixed(1),"x redundancy"]})})})})},decimalsLimitSc:6,validation:{required:"required"}},maxUploadPriceTB:{category:"gouging",type:"siacoin",title:"Max upload price",description:(0,r.jsx)(r.Fragment,{children:"The max allowed price to upload 1 TB."}),units:"SC/TB/month",average:c,averageTip:w(l,i),after:function(e){let{form:t,fields:n}=e;return(0,r.jsx)(o.ua7,{align:"start",side:"bottom",content:j(l,i),children:(0,r.jsx)("div",{children:(0,r.jsx)(o.QBj,{size:"small",form:t,fields:n,name:"includeRedundancyMaxUploadPrice",group:!1,children:(0,r.jsxs)(o.xvT,{size:"12",weight:"medium",children:["Including ",i.toFixed(1),"x redundancy"]})})})})},decimalsLimitSc:6,hidden:!n,validation:n?{required:"required"}:{}},maxDownloadPriceTB:{category:"gouging",type:"siacoin",title:"Max download price",description:(0,r.jsx)(r.Fragment,{children:"The max allowed price to download 1 TB."}),units:"SC/TB/month",average:d,averageTip:"Averages provided by Sia Central.",decimalsLimitSc:6,hidden:!n,validation:n?{required:"required"}:{}},maxContractPrice:{category:"gouging",type:"siacoin",title:"Max contract price",description:(0,r.jsx)(r.Fragment,{children:"The max allowed price to form a contract."}),average:f,decimalsLimitSc:6,tipsDecimalsLimitSc:3,hidden:!n,validation:n?{required:"required"}:{}},maxRpcPriceMillion:{category:"gouging",type:"siacoin",title:"Max RPC price",description:(0,r.jsx)(r.Fragment,{children:"The max allowed base price for RPCs in siacoins per million calls."}),units:"SC/million",decimalsLimitSc:6,hidden:!n,validation:n?{required:"required"}:{}},minMaxCollateral:{category:"gouging",type:"siacoin",title:"Min max collateral",description:(0,r.jsx)(r.Fragment,{children:"The min value for max collateral in the host's price settings."}),decimalsLimitSc:6,hidden:!n,validation:n?{required:"required"}:{}},hostBlockHeightLeeway:{category:"gouging",type:"number",title:"Block height leeway",description:(0,r.jsx)(r.Fragment,{children:"The amount of blocks of leeway given to the host block height in the host's price table."}),units:"blocks",decimalsLimit:0,suggestion:b.hostBlockHeightLeeway,suggestionTip:"The recommended value is 6 blocks.",hidden:!n,validation:n?{required:"required",validate:{min:e=>new(s())(e).gte(3)||"must be at least 3 blocks"}}:{}},minPriceTableValidityMinutes:{category:"gouging",type:"number",title:"Min price table validity",units:"minutes",description:(0,r.jsx)(r.Fragment,{children:"The min accepted value for `Validity` in the host's price settings."}),hidden:!n,validation:n?{required:"required",validate:{min:e=>new(s())(e).gte((0,o.GXN)(10))||"must be at least 10 seconds"}}:{}},minAccountExpiryDays:{category:"gouging",type:"number",title:"Min account expiry",units:"days",description:(0,r.jsx)(r.Fragment,{children:"The min accepted value for `AccountExpiry` in the host's price settings."}),hidden:!n,validation:n?{required:"required",validate:{min:e=>new(s())(e).gte((0,o.XAn)(1))||"must be at least 1 hour"}}:{}},minMaxEphemeralAccountBalance:{category:"gouging",type:"siacoin",title:"Min max ephemeral account balance",description:(0,r.jsx)(r.Fragment,{children:"The min accepted value for `MaxEphemeralAccountBalance` in the host's price settings."}),decimalsLimitSc:6,hidden:!n,validation:n?{required:"required",validate:{min:e=>new(s())(e).gte(1)||"must be at least 1 SC"}}:{}},minShards:{type:"number",category:"redundancy",title:"Min shards",description:(0,r.jsx)(r.Fragment,{children:"The min amount of shards needed to reconstruct a slab."}),units:"shards",hidden:!n,validation:n?{required:"required",validate:{min:e=>new(s())(e).gt(0)||"must be greater than 0"}}:{},trigger:["totalShards"]},totalShards:{type:"number",category:"redundancy",title:"Total shards",description:(0,r.jsx)(r.Fragment,{children:"The total amount of shards for each slab."}),units:"shards",hidden:!n,validation:n?{required:"required",validate:{gteMinShards:(e,t)=>new(s())(e).gte(t.minShards)||"must be at least equal to min shards",max:e=>new(s())(e).lt(256)||"must be less than 256"}}:{}},includeRedundancyMaxStoragePrice:{type:"boolean",title:"Include redundancy",validation:{}},includeRedundancyMaxUploadPrice:{type:"boolean",title:"Include redundancy",validation:{}}}}function w(e,t){return e?"The average price is adjusted for ".concat(t.toFixed(1),"x redundancy. Averages provided by Sia Central."):"The average price is not adjusted for redundancy. Averages provided by Sia Central."}function j(e,t){return e?(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsxs)(o.xvT,{color:"subtle",children:["Specified max price includes the cost of"," ",t.toFixed(1),"x redundancy."]}),(0,r.jsxs)(o.xvT,{color:"subtle",children:["Redundancy is calculated from the ratio of data shards:"," ",(0,r.jsx)(o.EKh,{children:"min shards / total shards"}),"."]})]}):"Specified max price does not include redundancy."}({...m});let E=e=>Object.fromEntries(Object.entries(e).filter(e=>{let[t,n]=e;return void 0!==n&&""!==n}));function k(e,t){let n=e.defaultContractSet||(null==t?void 0:t.default)||y.defaultContractSet;return{...t,default:n}}function S(e,t){let n=new(s())(1),r=e&&t&&!e.isZero()&&!t.isZero()&&t.gte(e);return r&&(n=t.div(e)),n}function _(e,t,n){let r=S(e,t);return n?r:new(s())(1)}function C(e,t){let n=(0,o.mvJ)(t.toNumber());return e.times(n).div((0,o.S5V)(1))}function O(e,t){let n=e.div(t);return n.times((0,o.S5V)(1))}var M=n(63955),T=n(92762),A=n(80489),P=n(2850);let N="v0-config-display-options";var R=n(34658),D=n(47025),L=n(91641);let F=(0,i.createContext)({}),z=()=>(0,i.useContext)(F);function V(e){let{children:t}=e,n=function(){var e,t,n;let a=(0,L.q)(),f="on"===a.autopilot.status,p=(0,l.e$)({disabled:!f,standalone:"configFormAutopilot",config:{swr:{errorRetryCount:0,refreshInterval:(0,o.sWj)(1)}}}),m=(0,A.a)({standalone:"configFormContractSet",config:{swr:{errorRetryCount:0,refreshInterval:(0,o.sWj)(1)}}}),y=(e={standalone:"configFormConfigApp",config:{swr:{errorRetryCount:0,refreshInterval:(0,o.sWj)(1)}}},(0,l.yu)({...e,params:{key:N}})),b=(t={standalone:"configFormGouging",config:{swr:{refreshInterval:(0,o.sWj)(1)}}},(0,l.yu)({...t,params:{key:"gouging"}})),w=(0,R.w)({standalone:"configFormRedundancy",config:{swr:{refreshInterval:(0,o.sWj)(1)}}}),j=(n={standalone:"configFormUploadPacking",config:{swr:{refreshInterval:(0,o.sWj)(1)}}},(0,l.yu)({...n,params:{key:"uploadpacking"}})),F=(0,l.KJ)(),z=(0,D.BF)({config:{swr:{revalidateOnFocus:!1}}}),[V,I]=(0,T.Z)("v0/config/showAdvanced",{defaultValue:!1}),{shouldSyncDefaultContractSet:Z,setShouldSyncDefaultContractSet:B,syncDefaultContractSet:H}=function(){let[e,t]=(0,T.Z)("v0/autopilot/syncDefaultContractSet",{defaultValue:!0}),n=(0,A.a)({config:{swr:{errorRetryCount:0}}}),a=(0,l.KJ)(),s=(0,i.useCallback)(async t=>{let i=n.data||{default:""};try{e&&t!==i.default&&(await a.put({params:{key:"contractset"},payload:k({defaultContractSet:t},n.data)}),n.mutate(),(0,o.OPV)((0,r.jsxs)(o.xvT,{children:["Default contract set has been updated to:"," ",(0,r.jsx)(o.EKh,{children:t}),"."]})))}catch(e){(0,o.OHV)(e.message),console.log(e)}},[n.data,a,e]);return{shouldSyncDefaultContractSet:e,setShouldSyncDefaultContractSet:t,syncDefaultContractSet:s}}(),U=(0,l.oe)(),W=(0,M.cI)({mode:"all",defaultValues:v}),q=(0,i.useCallback)((e,t,n,r,i,a)=>{let l=function(e,t,n,r,i,a){let l=a?{includeRedundancyMaxStoragePrice:a.includeRedundancyMaxStoragePrice,includeRedundancyMaxUploadPrice:a.includeRedundancyMaxUploadPrice}:h,f={minShards:new(s())(i.minShards),totalShards:new(s())(i.totalShards)};return{...function(e){if(!e)return c;let t=e.contracts.set,n=(0,u.ll)(O(new(s())(e.contracts.allowance),e.contracts.period),6),r=new(s())(e.contracts.amount),i=new(s())((0,o.x5w)(e.contracts.period)),a=new(s())((0,o.x5w)(e.contracts.renewWindow)),l=new(s())((0,o.y70)(O((0,o.JWi)(e.contracts.download),e.contracts.period),2)),d=new(s())((0,o.y70)(O((0,o.JWi)(e.contracts.upload),e.contracts.period),2)),f=(0,o.JWi)(new(s())(e.contracts.storage));return{autopilotContractSet:t,allowanceMonth:n,amountHosts:r,periodWeeks:i,renewWindowWeeks:a,downloadTBMonth:l,uploadTBMonth:d,storageTB:f,allowRedundantIPs:e.hosts.allowRedundantIPs,maxDowntimeHours:new(s())(e.hosts.maxDowntimeHours),defragThreshold:new(s())(e.wallet.defragThreshold)}}(e),...t?{defaultContractSet:t.default}:d,uploadPackingEnabled:n.enabled,maxStoragePriceTBMonth:(0,u.ll)(new(s())(r.maxStoragePrice).times((0,o.S5V)(1)).times((0,o.xf5)(1)).times(_(f.minShards,f.totalShards,l.includeRedundancyMaxStoragePrice)),6),maxUploadPriceTB:(0,u.ll)(new(s())(r.maxUploadPrice).times(_(f.minShards,f.totalShards,l.includeRedundancyMaxUploadPrice)),6),maxDownloadPriceTB:(0,u.ll)(r.maxDownloadPrice,6),maxContractPrice:(0,u.ll)(r.maxContractPrice,6),maxRpcPriceMillion:(0,u.ll)(r.maxRPCPrice,6).times(1e6),minMaxCollateral:(0,u.ll)(r.minMaxCollateral,6),hostBlockHeightLeeway:new(s())(r.hostBlockHeightLeeway),minPriceTableValidityMinutes:new(s())((0,o.AEA)(r.minPriceTableValidity)),minAccountExpiryDays:new(s())((0,o.okB)(r.minAccountExpiry)),minMaxEphemeralAccountBalance:(0,u.ll)(r.minMaxEphemeralAccountBalance,6),...f,...l}}(e,t,n,r,i,a);return W.reset(l),l},[W]),$=(0,i.useMemo)(()=>[p.data,p.error,m.data,m.error,j.data,b.data,w.data,y.data,y.error],[p.data,p.error,m.data,m.error,j.data,b.data,w.data,y.data,y.error]),K=(0,i.useCallback)(()=>(!f||p.data||p.error)&&b.data&&w.data&&j.data&&(m.data||m.error)&&(y.data||y.error)?q(p.data,m.data,j.data,b.data,w.data,y.data):null,[f,q,p.data,p.error,m.data,m.error,j.data,b.data,w.data,y.data,y.error]),[Y,G]=(0,i.useState)(!1);(0,i.useEffect)(()=>{if("init"!==a.autopilot.status&&!Y){let e=K();e&&G(!0)}},[Y,a.autopilot.status,K]);let X=(0,i.useCallback)(async()=>{let e=f?await p.mutate():void 0,t=await m.mutate(),n=await b.mutate(),r=await w.mutate(),i=await j.mutate(),a=await y.mutate();n&&r?q(e,t,i,n,r,a):(0,o.OHV)("Error fetching settings.")},[f,p,m,b,j,w,y,q]),J=W.watch("maxStoragePriceTBMonth"),Q=W.watch("maxDownloadPriceTB"),ee=W.watch("maxUploadPriceTB"),et=W.watch("storageTB"),en=W.watch("downloadTBMonth"),er=W.watch("uploadTBMonth"),ei=W.watch("minShards"),eo=W.watch("totalShards"),ea=W.watch("includeRedundancyMaxStoragePrice"),es=W.watch("includeRedundancyMaxUploadPrice"),el=(0,i.useMemo)(()=>S(ei,eo),[ei,eo]),eu=(0,i.useMemo)(()=>z.data?x({isAutopilotEnabled:f,showAdvanced:V,redundancyMultiplier:el,includeRedundancyMaxStoragePrice:ea,includeRedundancyMaxUploadPrice:es,storageAverage:(0,u.ll)(z.data.settings.storage_price).times((0,o.S5V)(1)).times((0,o.xf5)(1)).times(_(ei,eo,ea)),uploadAverage:(0,u.ll)(z.data.settings.upload_price).times((0,o.xf5)(1)).times(_(ei,eo,es)),downloadAverage:(0,u.ll)(z.data.settings.download_price).times((0,o.xf5)(1)),contractAverage:(0,u.ll)(z.data.settings.contract_price)}):x({isAutopilotEnabled:f,showAdvanced:V,redundancyMultiplier:el,includeRedundancyMaxStoragePrice:ea,includeRedundancyMaxUploadPrice:es}),[f,V,z.data,el,ei,eo,ea,es]),ec=(0,i.useMemo)(()=>!!f&&(null==J?void 0:J.gt(0))&&(null==et?void 0:et.gt(0))&&(null==Q?void 0:Q.gt(0))&&(null==en?void 0:en.gt(0))&&(null==ee?void 0:ee.gt(0))&&(null==er?void 0:er.gt(0)),[f,J,et,Q,en,ee,er]),ed=(0,i.useMemo)(()=>{if(!ec)return new(s())(0);let e=ea?J.times(et):J.times(el).times(et),t=Q.times(en),n=es?ee.times(er):ee.times(el).times(er),r=e.plus(t).plus(n);return r},[ec,ea,es,el,J,et,Q,en,ee,er]),ef=(0,i.useMemo)(()=>{if(!ec)return new(s())(0);let e=ed.div(et);return e},[ec,ed,et]),eh=(0,P.Tu)(),ep=(0,i.useCallback)(async e=>{if(b.data&&w.data)try{let t={};f&&!V&&(t.allowanceMonth=ed);let n={...e,...t},r=f&&!p.data,i=f?await U.put({payload:function(e,t){let n={...g,...E(e)};return{...t,contracts:{...null==t?void 0:t.contracts,set:n.autopilotContractSet,amount:Math.round(n.amountHosts.toNumber()),allowance:(0,u.qN)(C(n.allowanceMonth,n.periodWeeks)).toString(),period:Math.round((0,o.mvJ)(n.periodWeeks.toNumber())),renewWindow:Math.round((0,o.mvJ)(n.renewWindowWeeks.toNumber())),download:Number(C((0,o.xf5)(n.downloadTBMonth),n.periodWeeks).toFixed(0)),upload:Number(C((0,o.xf5)(n.uploadTBMonth),n.periodWeeks).toFixed(0)),storage:(0,o.xf5)(n.storageTB).toNumber()},hosts:{...null==t?void 0:t.hosts,maxDowntimeHours:n.maxDowntimeHours.toNumber(),allowRedundantIPs:n.allowRedundantIPs,scoreOverrides:(null==t?void 0:t.hosts.scoreOverrides)||null},wallet:{...null==t?void 0:t.wallet,defragThreshold:n.defragThreshold.toNumber()}}}(n,p.data)}):void 0,[a,s,c,d,h]=await Promise.all([F.put({params:{key:"contractset"},payload:k(n,m.data)}),F.put({params:{key:"uploadpacking"},payload:{...j.data,enabled:n.uploadPackingEnabled}}),F.put({params:{key:"gouging"},payload:{...b.data,maxRPCPrice:(0,u.qN)(n.maxRpcPriceMillion.div(1e6)).toString(),maxStoragePrice:(0,u.qN)(n.maxStoragePriceTBMonth.div((0,o.S5V)(1)).div((0,o.xf5)(1)).div(_(n.minShards,n.totalShards,n.includeRedundancyMaxStoragePrice))).toString(),maxUploadPrice:(0,u.qN)(n.maxUploadPriceTB.div(_(n.minShards,n.totalShards,n.includeRedundancyMaxUploadPrice))).toString(),maxDownloadPrice:(0,u.qN)(n.maxDownloadPriceTB).toString(),maxContractPrice:(0,u.qN)(n.maxContractPrice).toString(),minMaxCollateral:(0,u.qN)(n.minMaxCollateral).toString(),hostBlockHeightLeeway:Math.round(n.hostBlockHeightLeeway.toNumber()),minPriceTableValidity:Math.round((0,o.ort)(n.minPriceTableValidityMinutes.toNumber())),minAccountExpiry:Math.round((0,o.k9c)(n.minAccountExpiryDays.toNumber())),minMaxEphemeralAccountBalance:(0,u.qN)(n.minMaxEphemeralAccountBalance).toString()}}),F.put({params:{key:"redundancy"},payload:{...w.data,minShards:n.minShards.toNumber(),totalShards:n.totalShards.toNumber()}}),F.put({params:{key:N},payload:{...y.data,includeRedundancyMaxStoragePrice:n.includeRedundancyMaxStoragePrice,includeRedundancyMaxUploadPrice:n.includeRedundancyMaxUploadPrice}})]);if(null==i?void 0:i.error)throw Error(i.error);if(a.error)throw Error(a.error);if(s.error)throw Error(s.error);if(c.error)throw Error(c.error);if(d.error)throw Error(d.error);if(h.error)throw Error(h.error);if((0,o.OPV)("Configuration has been saved."),f&&H(n.autopilotContractSet),r){let e=async()=>{await (0,P.gw)(5e3),eh(e=>e.startsWith(l.pz)),await (0,P.gw)(5e3),eh(e=>e.startsWith(l.pz))};e()}await X()}catch(e){(0,o.OHV)(e.message),console.log(e)}},[ed,V,f,p,U,X,H,eh,F,m,j,w,b,y]),em=(0,o.WsO)(eu),ev=(0,i.useMemo)(()=>W.handleSubmit(ep,em),[W,ep,em]),eg=(0,i.useCallback)(()=>{let e=W.getValues(),t=K();if(t)for(let[n,r]of(W.reset(t),Object.entries(e)))W.setValue(n,r,{shouldDirty:!0})},[W,K]),{isUnlocked:ey}=(0,P.Hv)();(0,i.useEffect)(()=>{ey&&"init"!==a.autopilot.status&&X()},[ey,a.autopilot.status]),(0,i.useEffect)(()=>{W.formState.isSubmitting||eg()},[W,V,$]);let eb=Object.entries(W.formState.dirtyFields).filter(e=>{let[t,n]=e;return!!n}).length;return{onSubmit:ev,revalidateAndResetFormData:X,form:W,fields:eu,changeCount:eb,canEstimate:ec,estimatedSpendingPerMonth:ed,estimatedSpendingPerTB:ef,redundancyMultiplier:el,storageTB:et,shouldSyncDefaultContractSet:Z,setShouldSyncDefaultContractSet:B,showAdvanced:V,setShowAdvanced:I}}();return(0,r.jsx)(F.Provider,{value:n,children:t})}},13242:function(e,t,n){"use strict";n.d(t,{x:function(){return b},G:function(){return y}});var r=n(52322),i=n(23305),o=n(5632),a=n(9969),s=n(2784),l=n(6391),u=n.n(l),c=n(56860),d=n(88242),f=n(96206),h=n(82459);let p=[{id:"actions",label:"",fixed:!0,cellClassName:"w-[50px] !pl-2 !pr-4 [&+*]:!pl-0",render:e=>{let{data:{id:t,hostIp:n,hostKey:i}}=e;return(0,r.jsx)(h.F,{id:t,address:n,publicKey:i})}},{id:"contractId",label:"contract ID",category:"general",render:e=>{let{data:{id:t,isRenewed:n,renewedFrom:o}}=e;return(0,r.jsxs)("div",{className:"flex flex-col gap-1 w-full",children:[(0,r.jsx)(i.XxW,{size:"12",value:(0,i.I13)(t),label:"contract ID"}),n&&(0,r.jsx)(i.ua7,{content:"Renewed from",align:"start",children:(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)(i.xvT,{color:"subtle",children:(0,r.jsx)(d.L6f,{className:"scale-75"})}),(0,r.jsx)(i.XxW,{color:"subtle",size:"10",value:(0,i.I13)(o),label:"contract ID"})]})})]})}},{id:"hostIp",label:"host address",category:"general",render:e=>{let{data:{hostIp:t}}=e;return(0,r.jsx)(i.XxW,{size:"12",value:t,type:"ip",label:"host address"})}},{id:"hostKey",label:"host public key",category:"general",render:e=>{let{data:{hostKey:t}}=e;return(0,r.jsx)(i.XxW,{size:"12",value:t,label:"host public key"})}},{id:"timeline",label:"timeline",category:"time",render:e=>{let{data:{contractHeightStart:t,contractHeightEnd:n,proofWindowHeightStart:o,proofWindowHeightEnd:a,revisionHeight:s,proofHeight:l},context:{currentHeight:u,contractsTimeRange:c}}=e;return(0,r.jsx)("div",{className:"w-[400px]",children:(0,r.jsx)(i.TaT,{currentHeight:u,contractHeightStart:t,contractHeightEnd:n,proofWindowHeightStart:o,proofWindowHeightEnd:a,proofHeight:l,revisionHeight:s,range:c})})}},{id:"startTime",label:"start date",category:"time",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{startTime:t}}=e;return(0,r.jsx)(i.xvT,{size:"12",font:"mono",ellipsis:!0,children:(0,f.rN)(t)})}},{id:"endTime",label:"end date",category:"time",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{endTime:t}}=e;return(0,r.jsx)(i.xvT,{size:"12",font:"mono",ellipsis:!0,children:(0,f.rN)(t)})}},{id:"size",label:"size",category:"general",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{size:t}}=e;return(0,r.jsx)(i.m2c,{size:"12",value:t,variant:"value",format:e=>(0,f.vW)(e)})}},{id:"totalCost",label:"total cost",category:"financial",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{totalCost:t}}=e;return(0,r.jsx)(i.YKL,{size:"12",value:t.negated()})}},{id:"spendingUploads",label:"uploads spending",category:"financial",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{spendingUploads:t}}=e;return(0,r.jsx)(i.YKL,{size:"12",value:t.negated()})}},{id:"spendingDownloads",label:"downloads spending",category:"financial",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{spendingDownloads:t}}=e;return(0,r.jsx)(i.YKL,{size:"12",value:t.negated()})}},{id:"spendingFundAccount",label:"fund account spending",category:"financial",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{spendingFundAccount:t}}=e;return(0,r.jsx)(i.YKL,{size:"12",value:t.negated()})}}];var m=n(47025),v=n(25573);let g=(0,s.createContext)({}),y=()=>(0,s.useContext)(g);function b(e){let{children:t}=e,n=function(){let e=(0,o.useRouter)(),t=Number(e.query.limit||50),n=Number(e.query.offset||0),r=(0,a.GP)({config:{swr:{refreshInterval:(0,i.sWj)(1)}}}),l=(0,m.JL)(),d=(0,s.useMemo)(()=>{var e;return(null===(e=l.data)||void 0===e?void 0:e.hosts)||[]},[l.data]),f=(0,v.n)(),h=f.isSynced?f.nodeBlockHeight:f.estimatedBlockHeight,g=(0,s.useMemo)(()=>{var e;if(!r.data)return null;let t=(null===(e=r.data)||void 0===e?void 0:e.map(e=>{var t;let n="fcid:0000000000000000000000000000000000000000000000000000000000000000"!==e.renewedFrom,r=(0,i.jrD)(h,e.startHeight),o=e.windowStart,a=(0,i.jrD)(h,o);return{id:e.id,contractId:e.id,hostIp:e.hostIP,hostKey:e.hostKey,location:null===(t=d.find(t=>t.public_key===e.hostKey))||void 0===t?void 0:t.location,timeline:r,startTime:r,endTime:a,contractHeightStart:e.startHeight,contractHeightEnd:o,proofWindowHeightStart:e.windowStart,proofWindowHeightEnd:e.windowEnd,proofHeight:e.proofHeight,revisionHeight:e.revisionHeight,isRenewed:n,renewedFrom:e.renewedFrom,totalCost:new(u())(e.totalCost),spendingUploads:new(u())(e.spending.uploads),spendingDownloads:new(u())(e.spending.downloads),spendingFundAccount:new(u())(e.spending.fundAccount),size:new(u())(e.size)}}))||[];return t},[r.data,d,h]),{filters:y,setFilter:b,removeFilter:x,removeLastFilter:w,resetFilters:j}=(0,i.Wdu)(),{configurableColumns:E,enabledColumns:k,sortableColumns:S,toggleColumnVisibility:_,setColumnsVisible:C,setColumnsHidden:O,toggleSort:M,setSortDirection:T,setSortField:A,sortField:P,sortDirection:N,resetDefaultColumnVisibility:R}=(0,i.oy6)("renterd/v0/contracts",{columns:p,columnsDefaultVisible:c.gd,sortOptions:c.Fo,defaultSortField:c.nw}),D=(0,i._4u)({dataset:g,filters:y,sortField:P,sortDirection:N}),L=(0,s.useMemo)(()=>D?D.slice(n,n+t):null,[D,n,t]),{range:F}=(0,s.useMemo)(()=>(0,i.EJC)(h,L||[]),[h,L]),z=(0,s.useMemo)(()=>p.filter(e=>e.fixed||k.includes(e.id)),[k]),V=(0,i.c2j)(D,r.isValidating,r.error,y),I=(0,s.useMemo)(()=>g?g.filter(e=>e.contractHeightStart{a(h)},children:h.label}),(0,r.jsx)(d.WD,{currentPage:n,commandPage:h,onSelect:()=>{p.push(s._.wallet.view),u()},children:"View wallet transactions"}),(0,r.jsx)(d.WD,{currentPage:n,commandPage:h,onSelect:()=>{l("sendSiacoin")},children:"Send siacoin"}),(0,r.jsx)(d.WD,{currentPage:n,commandPage:h,onSelect:()=>{l("addressDetails")},children:"Receive siacoin"}),(0,r.jsx)(d.WD,{currentPage:n,commandPage:h,onSelect:()=>{l("addressDetails")},children:"View wallet address"}),(0,r.jsx)(d.WD,{currentPage:n,commandPage:h,disabled:!(null===(t=m.data)||void 0===t?void 0:t.address),onSelect:()=>{var e;(null===(e=m.data)||void 0===e?void 0:e.address)&&((0,o.vQq)(m.data.address,"wallet address"),u())},children:"Copy wallet address to clipboard"})]})}var m=n(38617);let v={namespace:"settings",label:"Settings"};function g(e){let{currentPage:t,parentPage:n}=e,{openDialog:i,closeDialog:o}=eT(),{setTheme:s}=(0,m.F)(),{settings:l,setSettings:u,lock:c,currencyOptions:f,setCurrency:h}=(0,a.Hv)();return(0,r.jsxs)(d.fu,{currentPage:t,commandPage:v,children:[(0,r.jsx)(d.Ul,{currentPage:t,parentPage:n,commandPage:v,onSelect:()=>{i("settings")},children:"Open settings"}),(0,r.jsx)(d.WD,{currentPage:t,commandPage:v,onSelect:()=>{u({siaCentral:!l.siaCentral}),o()},children:(l.siaCentral?"Disable":"Enable")+" external API - Sia Central exchange rates"}),(0,r.jsx)(d.o4,{currentPage:t,commandPage:v,onSelect:()=>{c(),o()},children:"Lock renterd"}),(0,r.jsx)(d.WD,{currentPage:t,commandPage:v,onSelect:()=>{i("settings")},children:"Open interface theme menu"}),(0,r.jsx)(d.WD,{currentPage:t,commandPage:v,onSelect:()=>{s("system"),o()},children:"Set theme to system preference"}),(0,r.jsx)(d.WD,{currentPage:t,commandPage:v,onSelect:()=>{s("dark"),o()},children:"Set theme to dark"}),(0,r.jsx)(d.WD,{currentPage:t,commandPage:v,onSelect:()=>{s("light"),o()},children:"Set theme to light"}),(0,r.jsx)(d.WD,{currentPage:t,commandPage:v,onSelect:()=>{i("settings")},children:"Open currency settings menu"}),f.map(e=>{let{id:n,label:i}=e;return(0,r.jsx)(d.WD,{currentPage:t,commandPage:v,onSelect:()=>{h(n),o()},children:"Set currency to ".concat(i)},n)})]})}let y={namespace:"node",label:"Blockchain node"};function b(e){let{currentPage:t,parentPage:n,pushPage:i}=e,{openDialog:o,closeDialog:a}=eT(),l=(0,c.useRouter)();return(0,r.jsxs)(d.fu,{currentPage:t,commandPage:y,children:[(0,r.jsx)(d.Ul,{currentPage:t,parentPage:n,commandPage:y,onSelect:()=>{i(y)},children:y.label}),(0,r.jsx)(d.WD,{currentPage:t,commandPage:y,onSelect:()=>{o("connectPeer")},children:"Connect to a peer"}),(0,r.jsx)(d.WD,{currentPage:t,commandPage:y,onSelect:()=>{l.push(s._.node.index),a()},children:"View peers"}),(0,r.jsx)(d.WD,{currentPage:t,commandPage:y,onSelect:()=>{l.push(s._.node.index),a()},children:"View transaction pool"})]})}var x=n(17286),w=n(91641);let j={namespace:"configuration",label:"Configuration"};function E(e){let{currentPage:t,parentPage:n,pushPage:i}=e,o=(0,c.useRouter)(),{showAdvanced:a}=(0,x.ZR)(),{closeDialog:l}=eT(),{autopilot:u}=(0,w.q)();return(0,r.jsxs)(d.fu,{currentPage:t,commandPage:j,children:[(0,r.jsx)(d.Ul,{currentPage:t,parentPage:n,commandPage:j,onSelect:()=>{i(j)},children:j.label}),(0,r.jsx)(d.WD,{currentPage:t,commandPage:j,onSelect:()=>{o.push(s._.config.index),l()},children:"Open configuration"}),"on"===u.status&&(0,r.jsx)(d.WD,{currentPage:t,commandPage:j,onSelect:()=>{o.push(s._.config.storage),l()},children:"Configure storage"}),(0,r.jsx)(d.WD,{currentPage:t,commandPage:j,onSelect:()=>{o.push(s._.config.pricing),l()},children:"Configure pricing"}),a&&(0,r.jsxs)(r.Fragment,{children:["on"===u.status&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d.WD,{currentPage:t,commandPage:j,onSelect:()=>{o.push(s._.config.hosts),l()},children:"Configure hosts"}),(0,r.jsx)(d.WD,{currentPage:t,commandPage:j,onSelect:()=>{o.push(s._.config.wallet),l()},children:"Configure wallet"})]}),(0,r.jsx)(d.WD,{currentPage:t,commandPage:j,onSelect:()=>{o.push(s._.config.contracts),l()},children:"Configure contracts"}),(0,r.jsx)(d.WD,{currentPage:t,commandPage:j,onSelect:()=>{o.push(s._.config.uploads),l()},children:"Configure uploads"}),(0,r.jsx)(d.WD,{currentPage:t,commandPage:j,onSelect:()=>{o.push(s._.config.redundancy),l()},children:"Configure redundancy"})]})]})}var k=n(93216);let S={namespace:"contracts",label:"Contracts"};function _(e){let{currentPage:t,parentPage:n,pushPage:i,beforeSelect:o,afterSelect:a}=e,l=(0,c.useRouter)(),{closeDialog:u}=eT();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d.Ul,{currentPage:t,parentPage:n,commandPage:n,onSelect:()=>{i(S)},children:S.label}),(0,r.jsx)(d.fu,{currentPage:t,commandPage:S,children:(0,r.jsx)(d.WD,{currentPage:t,commandPage:S,onSelect:()=>{l.push(s._.contracts.index),u()},children:"View contracts"})}),(0,r.jsx)(k.F,{parentPage:S,currentPage:t,beforeSelect:o,afterSelect:a,pushPage:i})]})}var C=n(13242),O=n(18006);let M={namespace:"hosts",label:"Hosts"};function T(e){let{currentPage:t,parentPage:n,pushPage:i,beforeSelect:o,afterSelect:a}=e,l=(0,c.useRouter)(),{closeDialog:u,openDialog:f}=eT();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d.Ul,{currentPage:t,parentPage:n,commandPage:n,onSelect:()=>{i(M)},children:M.label}),(0,r.jsx)(d.fu,{currentPage:t,commandPage:M,children:(0,r.jsx)(d.WD,{currentPage:t,commandPage:M,onSelect:()=>{l.push(s._.hosts.index),u()},children:"View hosts"})}),(0,r.jsx)(d.WD,{currentPage:t,commandPage:M,onSelect:()=>{f("hostsManageAllowBlock")},children:"Manage filter lists: allowlist + blocklist"}),(0,r.jsx)(O.L,{parentPage:M,currentPage:t,beforeSelect:o,afterSelect:a,pushPage:i})]})}var A=n(91652),P=n(48528),N=n(88242);function R(e){let{debouncedSearch:t}=e;return(0,r.jsxs)(o.xvT,{color:"verySubtle",className:"flex flex-col gap-2 justify-center items-center mt-5 mb-3",children:[(0,r.jsxs)(o.xvT,{color:"verySubtle",className:"flex gap-2 justify-center items-center",children:[(0,r.jsx)(N.e1T,{}),(0,r.jsx)(N.JCW,{}),(0,r.jsx)(N.c_L,{})]}),(0,r.jsx)(o.xvT,{size:"12",color:"verySubtle",className:"flex justify-center",children:t?"No files match the query.":"Type a query to get started."})]})}let D={namespace:"files/search",label:"File search",prompt:"Search for files, eg: backups, photo_archive.zip, etc...",empty:R};function L(e){let{debouncedSearch:t,search:n,currentPage:i,beforeSelect:a,afterSelect:s}=e,{activeBucket:l,setActiveDirectory:u}=(0,P.Y)(),c=(null==i?void 0:i.namespace)===D.namespace,h=(0,f.Iy)({disabled:!c,params:{bucket:l||"default",key:t,skip:0,limit:10},config:{swr:{keepPreviousData:!0}}});return c&&h.data?(0,r.jsx)(d.fu,{currentPage:i,commandPage:D,children:h.data.map(e=>{let{name:t}=e,l=function(e,t,n){let r=Math.max(e.length-55,0);if(0===r)return e;let i=F(e),o=F(t),a=i.toLowerCase().indexOf(o.toLowerCase()),s=a+o.length-1,l=0,u=0,c=i.split("/"),d=c.map(e=>{if(l>=r)return u+=e.length,F(e);let t=u,n=u+e.length+1;return ta?(u+=e.length,F(e)):!e.includes(o)&&e.length>3?(u+=e.length,l+=e.length+1,"..."):(u+=e.length,F(e))});return d.reverse().join("/")}(t,n,0),{startIndex:c,endIndex:f}=function(e,t){let n=F(e),r=F(t),i=n.toLowerCase().indexOf(r.toLowerCase()),o=i+r.length;return{endIndex:e.length-i,startIndex:e.length-o}}(l,n);return(0,r.jsx)(d.WD,{commandPage:D,currentPage:i,onSelect:()=>{a(),u(()=>(0,A.gD)(t)),s()},value:t,children:(0,r.jsxs)("div",{className:"flex items-center gap-2 overflow-hidden",children:[(0,r.jsx)(o.xvT,{color:"verySubtle",className:"group-data-[selected=true]:text-gray-1000 dark:group-data-[selected=true]:text-graydark-1000",children:(0,A.IQ)(t)?(0,r.jsx)(N.ROc,{size:16}):(0,r.jsx)(N.c_L,{})}),(0,r.jsxs)(o.xvT,{className:"flex items-center",children:[(0,r.jsx)(o.xvT,{color:"verySubtle",ellipsis:!0,children:l.slice(0,c)}),(0,r.jsx)(o.xvT,{color:"accent",ellipsis:!0,children:l.slice(c,f)}),(0,r.jsx)(o.xvT,{color:"verySubtle",ellipsis:!0,children:l.slice(f)})]})]})},t)})}):null}function F(e){return e.split("").reverse().join("")}let z={namespace:"files",label:"Files"};function V(e){let{search:t,debouncedSearch:n,currentPage:i,parentPage:o,pushPage:a,beforeSelect:l,afterSelect:u}=e,f=(0,c.useRouter)(),{closeDialog:h}=eT();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d.Ul,{currentPage:i,parentPage:o,commandPage:o,onSelect:()=>{a(z)},children:z.label}),(0,r.jsxs)(d.fu,{currentPage:i,commandPage:z,children:[(0,r.jsx)(d.WD,{currentPage:i,commandPage:z,onSelect:()=>{f.pathname.startsWith(s._.files.index)||f.push(s._.files.index),h(),u()},children:"View files"}),(0,r.jsx)(d.WD,{currentPage:i,commandPage:z,onSelect:()=>{a(D),u()},children:"Search files"})]}),(0,r.jsx)(L,{debouncedSearch:n,search:t,currentPage:i,beforeSelect:l,afterSelect:u})]})}var I=n(19513);function Z(e,t){return e===t}function B(e){return"function"==typeof e?function(){return e}:e}function H(e,t,n){var r,o,a=n&&n.equalityFn||Z,s=(o=(r=(0,i.useState)(B(e)))[1],[r[0],(0,i.useCallback)(function(e){return o(B(e))},[])]),l=s[0],u=s[1],c=function(e,t,n){var r=this,o=(0,i.useRef)(null),a=(0,i.useRef)(0),s=(0,i.useRef)(null),l=(0,i.useRef)([]),u=(0,i.useRef)(),c=(0,i.useRef)(),d=(0,i.useRef)(e),f=(0,i.useRef)(!0);(0,i.useEffect)(function(){d.current=e},[e]);var h=!t&&0!==t&&"undefined"!=typeof window;if("function"!=typeof e)throw TypeError("Expected a function");t=+t||0;var p=!!(n=n||{}).leading,m=!("trailing"in n)||!!n.trailing,v="maxWait"in n,g=v?Math.max(+n.maxWait||0,t):null;return(0,i.useEffect)(function(){return f.current=!0,function(){f.current=!1}},[]),(0,i.useMemo)(function(){var e=function(e){var t=l.current,n=u.current;return l.current=u.current=null,a.current=e,c.current=d.current.apply(n,t)},n=function(e,t){h&&cancelAnimationFrame(s.current),s.current=h?requestAnimationFrame(e):setTimeout(e,t)},i=function(e){if(!f.current)return!1;var n=e-o.current;return!o.current||n>=t||n<0||v&&e-a.current>=g},y=function(t){return s.current=null,m&&l.current?e(t):(l.current=u.current=null,c.current)},b=function e(){var r=Date.now();if(i(r))return y(r);if(f.current){var s=t-(r-o.current);n(e,v?Math.min(s,g-(r-a.current)):s)}},x=function(){var d=Date.now(),h=i(d);if(l.current=[].slice.call(arguments),u.current=r,o.current=d,h){if(!s.current&&f.current)return a.current=o.current,n(b,t),p?e(o.current):c.current;if(v)return n(b,t),e(o.current)}return s.current||n(b,t),c.current};return x.cancel=function(){s.current&&(h?cancelAnimationFrame(s.current):clearTimeout(s.current)),a.current=0,l.current=o.current=u.current=s.current=null},x.isPending=function(){return!!s.current},x.flush=function(){return s.current?y(Date.now()):c.current},x},[p,v,t,g,m,h])}((0,i.useCallback)(function(e){return u(e)},[u]),t,n),d=(0,i.useRef)(e);return a(d.current,e)||(c(e),d.current=e),[l,c]}function U(e){let{search:t}=e;return(0,r.jsxs)(o.xvT,{color:"verySubtle",className:"flex flex-col gap-2 justify-center items-center mt-5 mb-3",children:[(0,r.jsx)(o.xvT,{color:"verySubtle",className:"flex gap-2 justify-center items-center",children:(0,r.jsx)(N.owP,{})}),(0,r.jsx)(o.xvT,{size:"12",color:"verySubtle",className:"flex justify-center",children:t?"No results matching query.":"Type a query to get started."})]})}function W(e){let{panel:t}=e,{resetFilters:n}=(0,C.G)(),{resetFilters:a}=(0,I.l)(),{closeDialog:d}=eT(),f=(0,c.useRouter)(),[h,m]=(0,i.useState)(""),[v]=H(h,500),[y,x]=(0,i.useState)([]),w=y[y.length-1],j=0===y.length,k=(0,i.useCallback)(e=>{x(t=>[...t,e])},[x]),S=(0,i.useCallback)(()=>{d()},[d]),O=(0,i.useCallback)(()=>{m("")},[m]),M=(null==w?void 0:w.empty)||U;return(0,r.jsxs)(u.mY,{label:"Command Menu",loop:!0,className:(0,l.cx)(t&&(0,o.z$)()),onKeyDown:e=>{(y.length>0&&"Escape"===e.key||"Backspace"===e.key&&!h)&&(e.preventDefault(),x(e=>e.slice(0,-1)))},children:[w&&(0,r.jsx)(o.__J,{className:"px-2",children:w.label}),(0,r.jsx)(u.mY.Input,{value:h,onValueChange:m,className:(0,o.cEb)({variant:"ghost",focus:"none"}),placeholder:(null==w?void 0:w.prompt)||(j?"Search for commands, eg: theme, redundancy":"Search commands")}),(0,r.jsx)(o.Z0O,{className:"my-2"}),(0,r.jsxs)(u.mY.List,{children:[(0,r.jsx)(u.mY.Empty,{children:(0,r.jsx)(M,{search:h,debouncedSearch:v})}),(0,r.jsx)(g,{currentPage:w,pushPage:k}),(0,r.jsx)(V,{debouncedSearch:v,search:h,currentPage:w,pushPage:k,beforeSelect:()=>{S()},afterSelect:()=>{O()}}),(0,r.jsx)(p,{currentPage:w,pushPage:k}),(0,r.jsx)(_,{currentPage:w,pushPage:k,beforeSelect:()=>{S(),n()},afterSelect:()=>{f.pathname.startsWith(s._.contracts.index)||f.push(s._.contracts.index),O()}}),(0,r.jsx)(T,{currentPage:w,pushPage:k,beforeSelect:()=>{S(),a()},afterSelect:()=>{f.pathname.startsWith(s._.hosts.index)||f.push(s._.hosts.index),O()}}),(0,r.jsx)(E,{currentPage:w,pushPage:k}),(0,r.jsx)(b,{currentPage:w,pushPage:k})]})]})}function q(e){let{open:t,onOpenChange:n,setOpen:l}=e,{isUnlocked:u}=(0,a.Hv)(),{isConnected:c}=(0,o.Y97)({route:s.h});return(0,i.useEffect)(()=>{if(!u||!c)return;let e=e=>{"k"===e.key&&e.metaKey&&l()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[u,c,l]),(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(o.VqE,{open:t,onOpenChange:n,contentVariants:{className:"!absolute !p-1 w-[450px] top-[200px]"},bodyClassName:"!px-1 !py-1",closeClassName:"hidden",children:(0,r.jsx)(W,{})})})}var $=n(9156),K=n(24511);let Y={name:""},G=K.Ry().shape({name:K.Z_().required("Required")});function X(e){let{trigger:t,open:n,onOpenChange:i}=e,{activeDirectoryPath:a}=(0,P.Y)(),s=(0,f.ZM)(),l=(0,$.TA)({initialValues:Y,validationSchema:G,onSubmit:async(e,t)=>{let n=await s.put({params:(0,A.W0)(a+e.name+"/"),payload:null});n.error?(0,o.OHV)(n.error):((0,o.RFt)("Directory created."),t.resetForm(),i(!1))}});return(0,r.jsx)(o.VqE,{trigger:t,title:"New directory",open:n,onOpenChange:e=>{e||l.resetForm(),i(e)},contentVariants:{className:"w-[400px]"},children:(0,r.jsx)("div",{className:"flex flex-col gap-4",children:(0,r.jsx)("form",{onSubmit:l.handleSubmit,children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(o.cB7,{formik:l,title:"Name",name:"name",placeholder:"photos, backups, etc",autoComplete:"off",type:"text",variants:{size:"medium"}}),(0,r.jsx)(o.IKw,{formik:l,size:"medium",children:"Create"})]})})})})}var J=n(33571);let Q={publicKey:""},ee=K.Ry().shape({publicKey:K.Z_().required("Required")});function et(){var e;let t=(0,f.s2)({config:{swr:{refreshInterval:6e4}}}),n=(0,J.I)(),a=(0,$.TA)({initialValues:Q,validationSchema:ee,onSubmit:async(e,t)=>{let r=await n([e.publicKey],[]);r?t.resetForm():t.setStatus({error:"Error updating allowlist"})}});(0,i.useEffect)(()=>{a.setStatus(void 0)},[a.values]);let s=a.values.publicKey,l=(null===(e=t.data)||void 0===e?void 0:e.filter(e=>!a.values.publicKey||e.includes(a.values.publicKey)))||[];return(0,r.jsxs)("form",{onSubmit:a.handleSubmit,className:"flex flex-col gap-2 h-[400px]",children:[(0,r.jsx)(o.S$c,{title:"Public key",name:"publicKey",formik:a,withStatusError:!0,children:(0,r.jsxs)("div",{className:"flex gap-1",children:[(0,r.jsx)(o.KZS,{name:"publicKey",formik:a,placeholder:"ed25519:02aabd26e627fd...",autoComplete:"off",variants:{size:"small"}}),(0,r.jsx)(o.IKw,{formik:a,size:"small",variant:"amber",withStatusError:!1,children:"Allow public key"})]})}),(0,r.jsxs)(o.s_4,{className:"p-2 flex gap-2 items-center",children:[(0,r.jsx)(o.xvT,{children:(0,r.jsx)(N.qdM,{})}),(0,r.jsxs)(o.nvN,{size:"12",children:[(0,r.jsx)(o.xvT,{weight:"semibold",children:"Caution:"})," Please note that because the allowlist is inclusive, as soon as there are more than zero entries, contracting will be limited to only the hosts explicitly on the allowlist - all other existing contracts will immediately abort."]})]}),(0,r.jsx)("div",{className:"flex-1 overflow-hidden !-m-2",children:l.length?(0,r.jsx)(o.xrM,{children:(0,r.jsx)("div",{className:"p-2",children:(0,r.jsx)(o.hmz,{options:l.map(e=>({value:e,label:"".concat(e.slice(0,20),"...")}))||[],onClick:e=>(0,o.vQq)(e,"allowed public key"),onRemove:e=>n([],[e])})})}):s?(0,r.jsxs)("div",{className:"flex flex-col gap-3 items-center justify-center h-[200px]",children:[(0,r.jsx)(o.xvT,{color:"subtle",children:(0,r.jsx)(N.Hb6,{})}),(0,r.jsxs)(o.xvT,{color:"subtle",children:["No existing entries match ",a.values.publicKey,"."]})]}):(0,r.jsxs)("div",{className:"flex flex-col gap-3 items-center justify-center h-[200px]",children:[(0,r.jsx)(o.xvT,{color:"subtle",children:(0,r.jsx)(N.TtX,{})}),(0,r.jsx)(o.xvT,{color:"subtle",children:"The allowlist is empty."})]})})]})}var en=n(98358);let er={address:""},ei=["45.148.30.56","51.158.108.244","siacentral.ddnsfree.com","siacentral.mooo.com"],eo=K.Ry().shape({address:K.Z_().required("Required").test("address","Invalid hostname or IP address",e=>(0,o.Ztc)().test(e||""))});function ea(){let e=(0,f.uf)({config:{swr:{refreshInterval:6e4}}}),t=(0,en.l)(),n=(0,$.TA)({initialValues:er,validationSchema:eo,onSubmit:async(e,n)=>{let r=await t([e.address],[]);r?n.resetForm():n.setStatus({error:"Error updating blocklist"})}});(0,i.useEffect)(()=>{n.setStatus(void 0)},[n.values]);let a=n.values.address,s=(0,i.useMemo)(()=>{var t;return(null===(t=e.data)||void 0===t?void 0:t.filter(e=>!n.values.address||e.includes(n.values.address)))||[]},[e.data,n.values.address]),{dataset:l}=(0,C.G)(),u=(0,i.useMemo)(()=>ei.filter(t=>{var n;return!(null===(n=e.data)||void 0===n?void 0:n.find(e=>e===t))}).map(e=>({address:e,contractCount:null==l?void 0:l.filter(t=>t.hostIp===e).length})),[e.data,l]);return(0,r.jsxs)("form",{onSubmit:n.handleSubmit,className:"flex flex-col gap-2 h-[400px]",children:[(0,r.jsx)(o.S$c,{title:"Address",name:"address",formik:n,withStatusError:!0,children:(0,r.jsxs)("div",{className:"flex gap-1",children:[(0,r.jsx)(o.KZS,{name:"address",formik:n,placeholder:"eg: 51.258.128.144 or spam.ddnsfree.com",autoComplete:"off",variants:{size:"small"}}),(0,r.jsx)(o.IKw,{formik:n,size:"small",variant:"red",withStatusError:!1,children:"Block address"})]})}),(0,r.jsx)("div",{className:"flex-1 overflow-hidden !-m-2",children:(0,r.jsx)(o.xrM,{children:(0,r.jsxs)("div",{className:"p-2",children:[!!u.length&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"flex gap-1 flex-wrap",children:[(0,r.jsx)(o.xvT,{size:"12",color:"subtle",children:"Suggestions:"}),u.map((e,t)=>{let{address:i,contractCount:a}=e;return(0,r.jsxs)(o.xvT,{size:"12",underline:"hover",className:"cursor-pointer",onClick:()=>n.setFieldValue("address",i),children:[i,!!a&&(0,r.jsxs)(r.Fragment,{children:[" ",(0,r.jsx)(o.ua7,{content:"".concat(a," active contracts"),children:(0,r.jsxs)(o.xvT,{color:"red",children:["(",a,")"]})})]}),t!==u.length-1&&(0,r.jsx)(o.xvT,{children:","})]},i)})]}),(0,r.jsx)(o.Z0O,{className:"my-2"})]}),s.length?(0,r.jsx)(o.hmz,{options:s.map(e=>({value:e,label:"".concat(e.slice(0,20),"...")}))||[],onClick:e=>(0,o.vQq)(e,"blocked address"),onRemove:e=>t([],[e])}):a?(0,r.jsxs)("div",{className:"flex flex-col gap-3 items-center justify-center h-[200px]",children:[(0,r.jsx)(o.xvT,{color:"subtle",children:(0,r.jsx)(N.Hb6,{})}),(0,r.jsxs)(o.xvT,{color:"subtle",children:["No existing entries match ",n.values.address,"."]})]}):(0,r.jsxs)("div",{className:"flex flex-col gap-3 items-center justify-center h-[200px]",children:[(0,r.jsx)(o.xvT,{color:"subtle",children:(0,r.jsx)(N.TtX,{})}),(0,r.jsx)(o.xvT,{color:"subtle",children:"The blocklist is empty."})]})]})})})]})}function es(e){let{trigger:t,open:n,onOpenChange:i}=e;return(0,r.jsx)(o.VqE,{trigger:t,title:"Manage host blocklist and allowlist",open:n,onOpenChange:e=>{i(e)},contentVariants:{className:"w-[500px]"},children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(o.nvN,{size:"12",children:"The allowlist and blocklist limit the set of hosts that renterd will consider when forming contracts. The blocklist excludes hosts with matching addresses whereas the allowlist restricts consideration to hosts with a matching public key. Each list's filtering is enabled and applied when it contains more than zero entries."}),(0,r.jsxs)(o.mQc,{defaultValue:"blocklist",children:[(0,r.jsxs)(o.drW,{"aria-label":"blocklist and allowlist tabs",children:[(0,r.jsx)(o.SPt,{value:"blocklist",children:"Block"}),(0,r.jsx)(o.SPt,{value:"allowlist",children:"Allow"})]}),(0,r.jsx)(o.nUL,{value:"blocklist",children:(0,r.jsx)(ea,{})}),(0,r.jsx)(o.nUL,{value:"allowlist",children:(0,r.jsx)(et,{})})]})]})})}var el=n(2320),eu=n(31781),ec=n(24801);function ed(e){let{panel:t}=e,{resetFilters:n}=(0,C.G)(),{closeDialog:a}=eT(),d=(0,c.useRouter)(),[f,h]=(0,i.useState)(""),[p]=H(f,500),m=(0,i.useCallback)(()=>{a()},[a]);return(0,r.jsxs)(u.mY,{label:"Files search",shouldFilter:!1,className:(0,l.cx)(t&&(0,o.z$)()),children:[(0,r.jsx)(o.__J,{className:"px-2",children:"File search"}),(0,r.jsx)(u.mY.Input,{value:f,onValueChange:h,className:(0,o.cEb)({variant:"ghost",focus:"none"}),placeholder:D.prompt}),(0,r.jsx)(o.Z0O,{className:"my-2"}),(0,r.jsx)("div",{className:"overflow-hidden",children:(0,r.jsxs)(u.mY.List,{children:[(0,r.jsx)(u.mY.Empty,{children:(0,r.jsx)(R,{search:f,debouncedSearch:p})}),(0,r.jsx)(L,{debouncedSearch:p,search:f,currentPage:D,beforeSelect:()=>{m(),n()},afterSelect:()=>{d.pathname.startsWith(s._.files.index)||d.push(s._.files.index)}})]})})]})}function ef(e){let{open:t,onOpenChange:n}=e;return(0,r.jsx)(o.VqE,{open:t,onOpenChange:n,contentVariants:{className:"!absolute !p-1 w-[450px] top-[200px]"},bodyClassName:"!px-1 !py-1",closeClassName:"hidden",children:(0,r.jsx)(ed,{})})}var eh=n(6391),ep=n.n(eh);function em(){let{dialog:e,openDialog:t,closeDialog:n}=eT(),a=(0,f.Tu)(),s=(0,f.gU)(),l=(0,f.cg)(),u=(0,f.ys)(),c=(0,f.aO)(),d=(0,i.useCallback)(async e=>{let{sc:t,address:n}=e,r=await s.post({payload:{amount:t.toString(),transaction:{siacoinOutputs:[{address:n,value:t.toString()}]}}});if(r.error)return{error:r.error};let i=await l.post({payload:{transaction:r.data.transaction,toSign:r.data.toSign,coveredFields:{WholeTransaction:!0}}});if(i.error)return c.post({payload:r.data.transaction}),{error:i.error};let o=await u.post({payload:[i.data]});return o.error?(c.post({payload:i.data}),{error:o.error}):{}},[s,l,u,c]);return(0,r.jsx)(o.weF,{balance:a.data?new(ep())(a.data.spendable):void 0,send:d,open:"sendSiacoin"===e,onOpenChange:r=>r?t(e):n()})}function ev(){let{id:e,dialog:t,openDialog:n,closeDialog:a}=eT(),s=(0,f.Qq)({params:{},config:{swr:{revalidateOnFocus:!1,refreshInterval:6e4}},disabled:"transactionDetails"!==t}),l=(0,i.useMemo)(()=>{var t;let n=null===(t=s.data)||void 0===t?void 0:t.find(t=>t.id===e);return n?{txType:(0,o.leQ)(n.raw),inflow:n.inflow,outflow:n.outflow,timestamp:n.timestamp,raw:n.raw}:null},[s,e]);return(0,r.jsx)(o.mPE,{id:e,transaction:l,open:"transactionDetails"===t,onOpenChange:e=>e?n(t):a()})}var eg=n(82459);function ey(e){let{id:t,contentProps:n,buttonProps:i}=e,a=(0,f.cq)({params:{id:t}});return a.data?(0,r.jsx)(eg.F,{id:t,address:a.data.hostIP,publicKey:a.data.hostKey,contentProps:n,buttonProps:i}):(0,r.jsx)(o.zxk,{variant:"ghost",icon:"hover",state:"waiting",...i,children:(0,r.jsx)(N.iG7,{})})}var eb=n(848);function ex(e){let{open:t,onOpenChange:n}=e,a=(0,f.Z7)(),s=(0,f.Uy)(),l=(0,i.useCallback)(async e=>{let t=await s.post({payload:[e]});t.error?(0,o.OHV)("Error dismissing alert."):(0,o.OPV)("Alert has been dismissed.")},[s]),u=(0,i.useCallback)(async(e,t)=>{if(!a.data)return;let n=await s.post({payload:e});n.error?(0,o.OHV)(t?"Error dismissing all ".concat(t," alerts."):"Error dismissing all alerts."):(0,o.OPV)(t?"All ".concat(t," alerts have been dismissed."):"All alerts have been dismissed.")},[s,a.data]);return(0,r.jsx)(o.hcY,{open:t,onOpenChange:e=>{n(e)},alerts:a,dataFieldOrder:ew,dataFields:ej,dismissMany:u,dismissOne:l})}let ew=["origin","hostKey","contractID","account","slabKey","additions","removals"],ej={contractID:{render:function(e){let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"contract ID"}),(0,r.jsx)(o.PF9,{value:t,menu:(0,r.jsx)(ey,{id:t,contentProps:{align:"end"},buttonProps:{size:"none"}})})]})}},accountID:{render:function(e){let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"account ID"}),(0,r.jsx)(o.XxW,{value:t,label:"account ID"})]})}},hostKey:{render:function(e){let{value:t}=e,n=(0,f.$)({params:{hostKey:t}});return n.data?(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"host key"}),(0,r.jsx)(o.PF9,{value:t,menu:(0,r.jsx)(eb.G,{publicKey:n.data.publicKey,address:n.data.netAddress,contentProps:{align:"end"},buttonProps:{size:"none"}})})]}):null}},slabKey:{render:function(e){let{value:t}=e,{setActiveDirectory:n}=(0,P.Y)(),{closeDialog:i}=eT(),a=(0,f.og)({params:{key:t}});return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"key"}),(0,r.jsx)(o.XxW,{value:t})]}),a.data&&(0,r.jsx)(o.xrM,{children:(0,r.jsx)("div",{className:"flex flex-col gap-2 mt-2 mb-2",children:a.data.map(e=>(0,r.jsx)(o.rUS,{color:"accent",underline:"hover",size:"12",noWrap:!0,onClick:()=>{n(()=>(0,A.gD)(e.name)),i()},children:e.name},e.name))})})]})}},additions:{render:function(e){let{value:t}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"flex justify-between w-full gap-2",children:(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"additions"})}),t&&(0,r.jsx)(o.xrM,{children:(0,r.jsx)("div",{className:"flex flex-wrap gap-2 mb-2",children:t.map(e=>(0,r.jsx)("div",{children:(0,r.jsx)(o.XxW,{value:e,label:"contract ID"})},e))})})]})}},removals:{render:function(e){let{value:t}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"flex justify-between w-full gap-2",children:(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"removals"})}),t&&(0,r.jsx)(o.xrM,{children:(0,r.jsx)("div",{className:"flex flex-col gap-2 mb-2",children:Object.entries(t).map(e=>{let[t,n]=e;return(0,r.jsxs)("div",{className:"flex gap-2 justify-between w-full",children:[(0,r.jsx)(o.XxW,{value:t,label:"contract ID"}),(0,r.jsx)(o.ua7,{content:n,children:(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:n})})]},t)})})})]})}},balance:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"balance"}),(0,r.jsx)(o.YKL,{variant:"value",value:new(ep())(t)})]})}},address:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"address"}),(0,r.jsx)(o.XxW,{value:t,type:"address"})]})}},account:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"account"}),(0,r.jsx)(o.XxW,{value:t})]})}}};var eE=n(54155),ek=n(63955);let eS={name:""};function e_(e){let{trigger:t,open:n,onOpenChange:a}=e,{id:s,closeDialog:l}=eT(),u=(0,f.sg)(),c=(0,ek.cI)({mode:"all",defaultValues:eS}),d=(0,i.useCallback)(async e=>{let t=await u.delete({params:{name:e.name}});t.error?(0,o.OHV)(t.error):((0,o.OPV)("Bucket permanently deleted."),c.reset(),l())},[c,u,l]),h=(0,i.useMemo)(()=>({name:{type:"text",title:"Name",placeholder:s,validation:{required:"required",validate:{notDefault:()=>"default"!==s||"cannot delete default bucket",equals:e=>e===s||"bucket name does not match"}}}}),[s]),p=(0,o.WsO)(h);return(0,r.jsx)(o.VqE,{title:"Delete Bucket",trigger:t,open:n,onOpenChange:e=>{e||c.reset(eS),a(e)},contentVariants:{className:"w-[400px]"},onSubmit:c.handleSubmit(d,p),children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(o.nvN,{size:"14",children:"Before you delete a bucket you must ensure that it is empty. Re-enter the bucket name to confirm the removal."}),(0,r.jsx)("div",{children:(0,r.jsx)(o.EKh,{color:"gray",children:s})}),(0,r.jsx)(o.yEL,{name:"name",form:c,fields:h,autoComplete:"off"}),(0,r.jsx)(o.ZqQ,{variant:"red",form:c,children:"Delete"})]})})}let eC={name:""};function eO(e){let{trigger:t,open:n,onOpenChange:a}=e,{closeDialog:s}=eT(),l=(0,f.oV)(),u=(0,ek.cI)({mode:"all",defaultValues:eC}),c=(0,i.useCallback)(async e=>{let t=await l.post({payload:{name:e.name}});t.error?(0,o.OHV)(t.error):((0,o.OPV)("Bucket created."),u.reset(),s())},[u,l,s]),d=(0,i.useMemo)(()=>({name:{type:"text",title:"Name",placeholder:"photos, backups, etc",validation:{required:"required"}}}),[]),h=(0,o.WsO)(d);return(0,r.jsx)(o.VqE,{title:"Create Bucket",trigger:t,open:n,onOpenChange:e=>{e||u.reset(eC),a(e)},contentVariants:{className:"w-[400px]"},onSubmit:u.handleSubmit(c,h),children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(o.nvN,{size:"14",children:"A bucket is an isolated collection of files."}),(0,r.jsx)(o.yEL,{name:"name",form:u,fields:d,autoComplete:"off"}),(0,r.jsx)(o.ZqQ,{form:u,children:"Create bucket"})]})})}let eM=(0,i.createContext)({}),eT=()=>(0,i.useContext)(eM);function eA(e){let{children:t}=e,n=function(){let[e,t]=(0,i.useState)(),[n,r]=(0,i.useState)(),o=(0,i.useCallback)((e,n)=>{t(e),r(n)},[t,r]),[a,s]=(0,i.useState)(),l=(0,i.useCallback)(e=>{t("confirm"),s(e)},[t,s]),u=(0,i.useCallback)(()=>{t(void 0),r(void 0),s(void 0)},[t,r,s]),c=(0,i.useCallback)(e=>{e||u()},[u]);return{dialog:e,id:n,openDialog:o,confirm:a,openConfirmDialog:l,closeDialog:u,onOpenChange:c}}();return(0,r.jsx)(eM.Provider,{value:n,children:t})}function eP(){var e;let{dialog:t,openDialog:n,onOpenChange:i,closeDialog:a,confirm:s,openConfirmDialog:l}=eT(),u=(0,f.Wl)(),c=(0,f.Tu)();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(q,{open:"cmdk"===t,onOpenChange:i,setOpen:()=>n("cmdk")}),(0,r.jsx)(o.DLL,{open:"settings"===t,onOpenChange:i}),(0,r.jsx)(em,{}),(0,r.jsx)(o.YNn,{address:null===(e=c.data)||void 0===e?void 0:e.address,isValidating:c.isValidating,open:"addressDetails"===t,onOpenChange:e=>e?n(t):a()}),(0,r.jsx)(ev,{}),(0,r.jsx)(o.D_D,{open:"connectPeer"===t,connect:e=>u.post({payload:e}),onOpenChange:e=>e?n(t):a()}),(0,r.jsx)(eO,{open:"filesCreateBucket"===t,onOpenChange:e=>e?n(t):a()}),(0,r.jsx)(e_,{open:"filesDeleteBucket"===t,onOpenChange:e=>e?n(t):a()}),(0,r.jsx)(X,{open:"filesCreateDirectory"===t,onOpenChange:e=>e?n(t):a()}),(0,r.jsx)(ef,{open:"filesSearch"===t,onOpenChange:e=>e?n(t):a()}),(0,r.jsx)(es,{open:"hostsManageAllowBlock"===t,onOpenChange:e=>e?n(t):a()}),(0,r.jsx)(el.g,{open:"hostsFilterAddress"===t,onOpenChange:e=>e?n(t):a()}),(0,r.jsx)(eE.a,{open:"hostsFilterPublicKey"===t,onOpenChange:e=>e?n(t):a()}),(0,r.jsx)(eu.p,{open:"contractsFilterAddress"===t,onOpenChange:e=>e?n(t):a()}),(0,r.jsx)(ec.C,{open:"contractsFilterPublicKey"===t,onOpenChange:e=>e?n(t):a()}),(0,r.jsx)(ex,{open:"alerts"===t,onOpenChange:e=>e?n(t):a()}),(0,r.jsx)(o.QHy,{open:"confirm"===t,params:s,onOpenChange:e=>e?l(s):a()})]})}},48528:function(e,t,n){"use strict";n.d(t,{Z:function(){return L},Y:function(){return D}});var r=n(52322),i=n(23305),o=n(5632),a=n(2784),s=n(88242),l=n(96206),u=n(86450),c=n(9969),d=n(91652);function f(e){let{path:t}=e,n=(0,c.wy)({params:(0,d.W0)(t),config:{swr:{dedupingInterval:5e3}}});return(0,r.jsxs)(i.Xiv,{disabled:!n.data,onSelect:()=>{n.data&&(0,i.vQq)(JSON.stringify(n.data.object,null,2),"object metadata")},children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(s.olJ,{})}),"Copy metadata"]})}function h(e){let{path:t}=e,{downloadFiles:n,getFileUrl:o}=D(),l=function(){let{openConfirmDialog:e}=(0,u.Rh)(),t=(0,c.xw)();return(0,a.useCallback)(n=>e({title:"Delete file",action:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.Jrl,{}),"Delete"]}),variant:"red",body:(0,r.jsxs)("div",{className:"flex flex-col",children:[(0,r.jsx)(i.nvN,{size:"14",children:"Are you sure you would like to delete the following file:"}),(0,r.jsx)(i.nvN,{size:"14",font:"mono",className:"break-words",children:n})]}),onConfirm:async()=>{let e=await t.delete({params:(0,d.W0)(n)});e.error&&(0,i.OHV)("Error deleting file."),(0,i.OPV)("Successfully deleted file.")}}),[e,t])}();return(0,r.jsxs)(i.h_2,{trigger:(0,r.jsx)(i.zxk,{variant:"ghost",icon:"hover",children:(0,r.jsx)(s.c_L,{})}),contentProps:{align:"start"},children:[(0,r.jsx)(i.Juw,{children:"Actions"}),(0,r.jsxs)(i.Xiv,{onSelect:async()=>{n([t])},children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(s.vzB,{})}),"Download file"]}),(0,r.jsxs)(i.Xiv,{onSelect:()=>l(t),children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(s.Jrl,{})}),"Delete file"]}),(0,r.jsx)(i.Juw,{children:"Copy"}),(0,r.jsxs)(i.Xiv,{onSelect:()=>{(0,i.vQq)(o(t,!1),"file URL")},children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(s.olJ,{})}),"Copy URL"]}),(0,r.jsxs)(i.Xiv,{onSelect:()=>{(0,i.E5z)(o(t,!0),(0,r.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,r.jsx)(i.xvT,{children:"Copied authenticated file URL to clipboard."}),(0,r.jsxs)(i.xvT,{children:["The authenticated URL contains the ",(0,r.jsx)(i.EKh,{children:"renterd"})," ","password, be careful when pasting or sharing the URL."]})]}),{icon:(0,r.jsx)("div",{className:"!flex-none w-5",children:(0,r.jsx)(s.qdM,{className:"w-5 text-amber-600"})}),duration:1e4,className:"!max-w-[1200px]"})},children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(s.olJ,{})}),"Copy authenticated URL"]}),(0,r.jsx)(f,{path:t})]})}function p(e){let{path:t,size:n}=e,o=function(){let{openConfirmDialog:e}=(0,u.Rh)(),t=(0,c.xw)();return(0,a.useCallback)((n,o)=>e({title:"Delete directory",action:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.Jrl,{}),"Delete"]}),variant:"red",body:(0,r.jsxs)("div",{className:"flex flex-col",children:[(0,r.jsxs)(i.nvN,{size:"14",children:["Are you sure you would like to delete the following directory which contains ",(0,l.vW)(o)," of data:"]}),(0,r.jsx)(i.nvN,{size:"14",font:"mono",className:"break-words",children:n})]}),onConfirm:async()=>{let e=await t.delete({params:{...(0,d.W0)(n),batch:!0}});e.error&&(0,i.OHV)("Error deleting directory."),(0,i.OPV)("Successfully deleted directory.")}}),[e,t])}();return(0,r.jsxs)(i.h_2,{trigger:(0,r.jsx)(i.zxk,{variant:"ghost",icon:"hover",children:(0,r.jsx)(s.ROc,{size:16})}),contentProps:{align:"start"},children:[(0,r.jsx)(i.Juw,{children:"Actions"}),(0,r.jsxs)(i.Xiv,{onSelect:()=>{o(t,n)},children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(s.Jrl,{})}),"Delete directory"]})]})}var m=n(6391),v=n.n(m),g=n(82439),y=n(82851),b=n(829),x=n.n(b);function w(e){var t,n,o;let{path:a,isUploading:s,type:l,health:u,size:f}=e,h="directory"===l,p=(0,c.wy)({disabled:s||h,params:(0,d.W0)(a),config:{swr:{dedupingInterval:5e3}}}),{displayHealth:m,label:v}=(0,g.B)({health:u,size:f,isDirectory:h});if(p.isValidating)return(0,r.jsx)(j,{displayHealth:m,label:v,children:(0,r.jsx)("div",{className:"flex justify-center my-2",children:(0,r.jsx)(i.xgg,{})})});if(!(null===(t=p.data)||void 0===t?void 0:t.object))return(0,r.jsx)(j,{displayHealth:m,label:v,children:(0,r.jsx)(i.xvT,{size:"12",children:"Error fetching slab metadata."})});let y=x()(p.data.object.slabs.map(e=>({...e.slab,contractSetShards:function(e){let{totalShards:t,minShards:n,health:r}=e,i=Math.ceil(r*(t-n)),o=i+n;return o<=0?0:o>t?t:o}({totalShards:e.slab.shards.length,minShards:e.slab.minShards,health:e.slab.health})})),"contractSetShards"),{partialSlab:b}=p.data.object;return(0,r.jsx)(j,{className:y.length>15?"h-[300px]":"",displayHealth:m,label:v,minShards:b?b.minShards:null===(n=y[0])||void 0===n?void 0:n.minShards,totalShards:b?b.totalShards:null===(o=y[0])||void 0===o?void 0:o.shards.length,children:b?(0,r.jsx)(i.xvT,{size:"12",color:"verySubtle",className:"flex items-center justify-center my-2",font:"mono",children:"partial slab"}):y.map(e=>(0,r.jsxs)("div",{className:"flex justify-between gap-2",children:[(0,r.jsxs)(i.xvT,{size:"12",color:"subtle",className:"flex items-center",font:"mono",children:["Slab ",e.key.replace("key:","").slice(0,4),":"]}),(0,r.jsxs)(i.xvT,{size:"12",className:"flex items-center",children:[e.contractSetShards,"/",e.shards.length]})]},e.key))})}function j(e){let{className:t,displayHealth:n,label:o,children:a,minShards:s,totalShards:l}=e;return(0,r.jsxs)("div",{className:(0,y.cx)("z-10 flex flex-col pb-1 -mx-1 overflow-hidden",t),children:[(0,r.jsxs)("div",{className:"flex justify-between gap-2 pt-0.5 pb-px px-2",children:[(0,r.jsx)(i.xvT,{size:"12",children:o}),(0,r.jsxs)(i.xvT,{size:"12",children:[(100*n).toFixed(0),"%"]})]}),s&&l?(0,r.jsxs)("div",{className:"flex justify-between gap-2 pt-0.5 pb-px px-2",children:[(0,r.jsx)(i.xvT,{size:"12",color:"subtle",children:"redundancy"}),(0,r.jsxs)(i.xvT,{size:"12",color:"subtle",children:[s," of ",l]})]}):null,(0,r.jsx)("div",{className:"px-2",children:(0,r.jsx)(i.Z0O,{className:"w-full my-1"})}),(0,r.jsx)("div",{className:"flex-1 overflow-hidden",children:(0,r.jsx)(i.xrM,{children:(0,r.jsx)("div",{className:"px-2",children:a})})})]})}function E(e){let{name:t,isUploading:n,type:o,health:a,size:s}=e,l="directory"===o,{displayHealth:u,label:c,color:d,icon:f}=(0,g.B)({health:a,size:s,isDirectory:l});return l?".."===t?null:(0,r.jsx)(i.zsw,{rootProps:{openDelay:100},trigger:(0,r.jsx)(i.xvT,{color:d,className:"flex cursor-pointer",children:f}),children:(0,r.jsx)("div",{className:"z-10 flex flex-col -mx-1 overflow-hidden",children:(0,r.jsxs)("div",{className:"flex justify-between gap-2 py-0.5 px-2",children:[(0,r.jsx)(i.xvT,{size:"12",children:c}),(0,r.jsxs)(i.xvT,{size:"12",children:[(100*u).toFixed(0),"%"]})]})})}):n?(0,r.jsx)(i.xgg,{}):(0,r.jsx)(i.zsw,{rootProps:{openDelay:100},trigger:(0,r.jsx)(i.xvT,{color:d,className:"flex cursor-pointer",children:f}),children:(0,r.jsx)(w,{...e})})}function k(e){let{name:t}=e,{openDialog:n}=(0,u.Rh)();return(0,r.jsxs)(i.h_2,{trigger:(0,r.jsx)(i.zxk,{variant:"ghost",icon:"hover",children:(0,r.jsx)(s.fi8,{size:16})}),contentProps:{align:"start"},children:[(0,r.jsx)(i.Juw,{children:"Actions"}),(0,r.jsxs)(i.Xiv,{disabled:"default"===t,onSelect:()=>{n("filesDeleteBucket",t)},children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(s.Jrl,{})}),"Delete bucket"]})]})}n(65680);let S=[{id:"type",label:"",fixed:!0,cellClassName:"w-[50px] !pl-2 !pr-2 [&+*]:!pl-0",render:function(e){let{data:{isUploading:t,type:n,name:o,path:a,size:l}}=e,{setActiveDirectory:u}=D();return t?(0,r.jsx)(i.zxk,{variant:"ghost",state:"waiting",children:(0,r.jsx)(s.c_L,{})}):".."===o?(0,r.jsx)(i.zxk,{variant:"ghost",icon:"hover",onClick:e=>{e.stopPropagation(),u(e=>e.slice(0,-1))},children:(0,r.jsx)(s.ROc,{size:16})}):"bucket"===n?(0,r.jsx)(k,{name:o}):"directory"===n?(0,r.jsx)(p,{path:a,size:l}):(0,r.jsx)(h,{path:a})}},{id:"name",label:"name",category:"general",contentClassName:"max-w-[600px]",render:function(e){let{data:{name:t,type:n}}=e,{setActiveDirectory:o}=D();return"bucket"===n?(0,r.jsx)(i.xvT,{ellipsis:!0,color:"accent",weight:"semibold",className:"cursor-pointer",onClick:e=>{e.stopPropagation(),o(()=>[t])},children:t}):"directory"===n?".."===t?(0,r.jsx)(i.xvT,{ellipsis:!0,color:"accent",weight:"semibold",className:"cursor-pointer",onClick:e=>{e.stopPropagation(),o(e=>e.slice(0,-1))},children:t}):(0,r.jsx)(i.xvT,{ellipsis:!0,color:"accent",weight:"semibold",className:"cursor-pointer",onClick:e=>{e.stopPropagation(),o(e=>e.concat(t.slice(0,-1)))},children:t}):(0,r.jsx)(i.xvT,{ellipsis:!0,weight:"semibold",children:t})}},{id:"size",label:"size",contentClassName:"justify-end",render:function(e){let{data:{type:t,name:n,size:o,isUploading:a}}=e;return"bucket"===t?null:a?(0,r.jsx)(i.xgg,{}):".."===n?null:(0,r.jsx)(i.m2c,{size:"12",value:new(v())(o),variant:"value",color:"subtle",format:e=>(0,l.vW)(e.toNumber())})}},{id:"health",label:"health",contentClassName:"justify-center",render:function(e){let{data:t}=e;return"bucket"===t.type?null:(0,r.jsx)(E,{...t})}}];var _=n(81471),C=n(12436),O=n.n(C),M=n(2850),T=n(28460),A=n.n(T),P=n(79381),N=n(13242);let R=(0,a.createContext)({}),D=()=>(0,a.useContext)(R);function L(e){let{children:t}=e,n=function(){let e=(0,o.useRouter)(),t=Number(e.query.limit||20),n=Number(e.query.offset||0),r=(0,a.useMemo)(()=>(e.query.path||[]).map(decodeURIComponent),[e.query.path]),s=(0,a.useMemo)(()=>r[0],[r]),l=(0,a.useMemo)(()=>(0,d.rd)(r)+"/",[r]),u=(0,a.useCallback)(t=>{let n=t(r);e.push("/files/"+n.map(encodeURIComponent).join("/"))},[e,r]),{uploadFiles:f,uploadsList:h,uploadCancel:p}=function(e){let{activeDirectoryPath:t}=e,n=(0,c.ZM)(),[r,o]=(0,a.useState)({}),s=(0,a.useCallback)(e=>{o(t=>({...t,[e.path]:{id:e.path,path:e.path,bucket:e.bucket,name:e.name,size:e.size,loaded:e.loaded,isUploading:!0,controller:e.controller,type:"file"}}))},[o]),l=(0,a.useCallback)(e=>{o(t=>t[e.path]?{...t,[e.path]:{...t[e.path],path:e.path,loaded:e.loaded,size:e.size}}:t)},[o]),u=(0,a.useCallback)(e=>{o(t=>(delete t[e],{...t}))},[o]),f=(0,a.useCallback)(e=>{e.controller.abort()},[]),h=async e=>{e.forEach(async e=>{let o=e.name,a=(0,d.pC)(t,o),c=(0,d.ru)(a);if(r[a]){(0,i.OHV)("Already uploading file: ".concat(a));return}let f=new AbortController,h=O()(e=>l({path:a,loaded:e.loaded,size:e.total}),2e3);s({path:a,name:o,bucket:c,loaded:0,size:1,controller:f});let p=await n.put({params:(0,d.W0)(a),payload:e,config:{axios:{onUploadProgress:h,signal:f.signal}}});p.error?("canceled"===p.error?(0,i.RFt)("File upload canceled."):(0,i.OHV)(p.error),u(a)):(u(a),(0,i.OPV)("Upload complete: ".concat(o)))})},p=(0,a.useMemo)(()=>Object.entries(r).map(e=>e[1]),[r]);return{uploadFiles:h,uploadsList:p,uploadCancel:f}}({activeDirectoryPath:l}),{downloadFiles:m,downloadsList:v,getFileUrl:g,downloadCancel:y}=function(){let e=(0,c.p$)(),[t,n]=(0,a.useState)({}),r=(0,a.useCallback)(e=>{n(t=>({...t,[e.path]:{id:e.path,path:e.path,bucket:e.bucket,name:e.name,size:e.size,loaded:e.loaded,isUploading:!1,controller:e.controller,type:"file"}}))},[n]),o=(0,a.useCallback)(e=>{n(t=>t[e.path]?{...t,[e.path]:{...t[e.path],path:e.path,loaded:e.loaded,size:e.size}}:t)},[n]),s=(0,a.useCallback)(e=>{n(t=>(delete t[e],{...t}))},[n]),l=(0,a.useCallback)(e=>{e.controller.abort()},[]),u=async n=>{n.forEach(async n=>{let a=!1,l=(0,d.ru)(n),u=(0,d.vt)(n);if(t[n]){(0,i.OHV)("Already downloading file: ".concat(n));return}let c=new AbortController,f=O()(e=>{a||o({path:n,loaded:e.loaded,size:e.total})},2e3);r({path:n,name:u,bucket:l,loaded:0,size:1,controller:c});let h=await e.get(u,{params:(0,d.W0)(n),config:{axios:{onDownloadProgress:f,signal:c.signal}}});a=!0,h.error&&("canceled"===h.error?(0,i.RFt)("File download canceled."):(0,i.OHV)(h.error)),s(n)})},f=(0,a.useMemo)(()=>Object.entries(t).map(e=>e[1]),[t]),{settings:h}=(0,M.Hv)(),p=(0,a.useCallback)((e,t)=>{let{bucket:n,key:r}=(0,d.W0)(e),i="/worker/objects/".concat(r,"?bucket=").concat(n),o=h.api||location.origin,a=o.startsWith("https")?"https":"http",s=o.replace("https://","").replace("http://","");return t?"".concat(a,"://:").concat(h.password,"@").concat(s,"/api").concat(i):"".concat(a,"://").concat(s,"/api").concat(i)},[h]);return{downloadFiles:u,downloadsList:f,getFileUrl:p,downloadCancel:l}}(),{response:b,dataset:w}=function(e){let{activeDirectoryPath:t,uploadsList:n}=e,r=(0,c.B$)(),o=(0,d.ru)(t),a=(0,c.Jv)({disabled:!o,params:(0,d.W0)(t),config:{swr:{refreshInterval:(0,i.sWj)(1)}}}),{dataset:s}=(0,N.G)(),l=(0,P.ZP)(a.isValidating||r.isValidating?null:[a.data,n,s,r.data,o,t],()=>{var e,i;let s={};o?a.data&&(null===(i=a.data.entries)||void 0===i||i.forEach(e=>{let{name:t,size:n,health:r}=e,i=(0,d.M7)(o,t);s[i]={id:i,path:i,bucket:o,size:n,health:r,name:(0,d.vt)(t),type:(0,d.IQ)(t)?"directory":"file"}}),n.filter(e=>{let{path:n,name:r}=e;return n===(0,d.pC)(t,r)}).forEach(e=>{s[e.path]=e})):null===(e=r.data)||void 0===e||e.forEach(e=>{let{name:t}=e,n=(0,d.wv)(t,"");s[t]={id:n,path:n,bucket:t,size:0,health:0,name:t,type:"bucket"}});let l=x()(A()(s).map(e=>e[1]),"path");return l},{keepPreviousData:!0});return{response:a,dataset:l.data}}({activeDirectoryPath:l,uploadsList:h}),{configurableColumns:j,enabledColumns:E,sortableColumns:k,toggleColumnVisibility:C,setColumnsVisible:T,setColumnsHidden:R,toggleSort:D,setSortDirection:L,setSortField:F,sortField:z,sortDirection:V,resetDefaultColumnVisibility:I}=(0,i.oy6)("renterd/v0/objects",{columns:S,columnsDefaultVisible:_.gd,sortOptions:_.Fo,defaultSortField:_.nw}),{filters:Z,setFilter:B,removeFilter:H,removeLastFilter:U,resetFilters:W}=(0,i.Wdu)(),q=(0,i._4u)({dataset:w,filters:Z,sortField:z,sortDirection:V}),$=(null==q?void 0:q.length)||0,K=(0,a.useMemo)(()=>q?r.length>0&&q.length>0?[{id:"..",name:"..",path:"..",type:"directory"},...q]:q:null,[q]),Y=(0,a.useMemo)(()=>S.filter(e=>e.fixed||E.includes(e.id)),[E]),G=(0,i.c2j)(q,b.isValidating,b.error,Z),X=0===r.length,J=1===r.length,Q=r.length>0;return{isViewingBuckets:X,isViewingABucket:Q,isViewingRootOfABucket:J,activeBucket:s,activeDirectory:r,setActiveDirectory:u,activeDirectoryPath:l,dataState:G,limit:t,offset:n,datasetPage:K,pageCount:$,datasetCount:(null==q?void 0:q.length)||0,columns:Y,uploadFiles:f,uploadsList:h,uploadCancel:p,downloadFiles:m,downloadsList:v,downloadCancel:y,configurableColumns:j,enabledColumns:E,sortableColumns:k,toggleColumnVisibility:C,setColumnsVisible:T,setColumnsHidden:R,toggleSort:D,setSortDirection:L,setSortField:F,sortField:z,filters:Z,setFilter:B,removeFilter:H,removeLastFilter:U,resetFilters:W,sortDirection:V,resetDefaultColumnVisibility:I,getFileUrl:g}}();return(0,r.jsx)(R.Provider,{value:n,children:t})}},91652:function(e,t,n){"use strict";function r(e,t){let n=t.startsWith("/")?t.slice(1):t;return e+n}function i(e,t){let n=r(e,t);return n.endsWith("/")?n:n+"/"}function o(e,t){return"".concat(e).concat(t)}function a(e){return e.split("/")[0]}function s(e){return{bucket:a(e),key:(function(e){let t=e.split("/").slice(1).join("/");return"/".concat(t)})(e).slice(1).split("/").map(encodeURIComponent).join("/")}}function l(e){let t=e.split("/");return e.endsWith("/")?"".concat(t[t.length-2],"/"):t[t.length-1]}function u(e){return e.endsWith("/")}function c(e){return u(e)?e.slice(0,-1).split("/"):e.split("/").slice(0,-1)}function d(e){return e.join("/")}n.d(t,{IQ:function(){return u},M7:function(){return o},W0:function(){return s},gD:function(){return c},pC:function(){return r},rd:function(){return d},ru:function(){return a},vt:function(){return l},wv:function(){return i}})},81471:function(e,t,n){"use strict";n.d(t,{Fo:function(){return o},gd:function(){return r},nw:function(){return i}});let r=["type","name","size","health"],i="name",o=[{id:"name",label:"name",category:"general"}]},19513:function(e,t,n){"use strict";n.d(t,{x:function(){return el},l:function(){return es}});var r,i,o=n(52322),a=n(23305),s=n(9969),l=n(2784);let u=["allow","netAddress","publicKey","lastScan","knownSince","totalScans","uptime","hasContract","ap_usable","ap_scoreOverall"];var c=n(5632),d=n(88242),f=n(96206),h=n(19785),p=n(66700),m=n(88811);function v(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function g(e,t){return(0,h.Z)(2,arguments),function(e,t){(0,h.Z)(2,arguments);var n=(0,p.Z)(e).getTime(),r=v(t);return new Date(n+r)}(e,-v(t))}function y(e){(0,h.Z)(1,arguments);var t=(0,p.Z)(e),n=t.getUTCDay();return t.setUTCDate(t.getUTCDate()-((n<1?7:0)+n-1)),t.setUTCHours(0,0,0,0),t}function b(e){(0,h.Z)(1,arguments);var t=(0,p.Z)(e),n=t.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var i=y(r),o=new Date(0);o.setUTCFullYear(n,0,4),o.setUTCHours(0,0,0,0);var a=y(o);return t.getTime()>=i.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function x(e,t){(0,h.Z)(1,arguments);var n=t||{},r=n.locale,i=r&&r.options&&r.options.weekStartsOn,o=null==i?0:v(i),a=null==n.weekStartsOn?o:v(n.weekStartsOn);if(!(a>=0&&a<=6))throw RangeError("weekStartsOn must be between 0 and 6 inclusively");var s=(0,p.Z)(e),l=s.getUTCDay();return s.setUTCDate(s.getUTCDate()-((l=1&&l<=7))throw RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var u=new Date(0);u.setUTCFullYear(r+1,0,l),u.setUTCHours(0,0,0,0);var c=x(u,t),d=new Date(0);d.setUTCFullYear(r,0,l),d.setUTCHours(0,0,0,0);var f=x(d,t);return n.getTime()>=c.getTime()?r+1:n.getTime()>=f.getTime()?r:r-1}function j(e,t){for(var n=Math.abs(e).toString();n.length0?n:1-n;return j("yy"===t?r%100:r,t.length)},M:function(e,t){var n=e.getUTCMonth();return"M"===t?String(n+1):j(n+1,2)},d:function(e,t){return j(e.getUTCDate(),t.length)},a:function(e,t){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:function(e,t){return j(e.getUTCHours()%12||12,t.length)},H:function(e,t){return j(e.getUTCHours(),t.length)},m:function(e,t){return j(e.getUTCMinutes(),t.length)},s:function(e,t){return j(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length;return j(Math.floor(e.getUTCMilliseconds()*Math.pow(10,n-3)),t.length)}},k={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"};function S(e,t){var n=e>0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),o=r%60;return 0===o?n+String(i):n+String(i)+(t||"")+j(o,2)}function _(e,t){return e%60==0?(e>0?"-":"+")+j(Math.abs(e)/60,2):C(e,t)}function C(e,t){var n=e>0?"-":"+",r=Math.abs(e);return n+j(Math.floor(r/60),2)+(t||"")+j(r%60,2)}var O={G:function(e,t,n){var r=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){var r=e.getUTCFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return E.y(e,t)},Y:function(e,t,n,r){var i=w(e,r),o=i>0?i:1-i;return"YY"===t?j(o%100,2):"Yo"===t?n.ordinalNumber(o,{unit:"year"}):j(o,t.length)},R:function(e,t){return j(b(e),t.length)},u:function(e,t){return j(e.getUTCFullYear(),t.length)},Q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return j(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return j(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){var r=e.getUTCMonth();switch(t){case"M":case"MM":return E.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){var r=e.getUTCMonth();switch(t){case"L":return String(r+1);case"LL":return j(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){var i=function(e,t){(0,h.Z)(1,arguments);var n=(0,p.Z)(e);return Math.round((x(n,t).getTime()-(function(e,t){(0,h.Z)(1,arguments);var n=t||{},r=n.locale,i=r&&r.options&&r.options.firstWeekContainsDate,o=null==i?1:v(i),a=null==n.firstWeekContainsDate?o:v(n.firstWeekContainsDate),s=w(e,t),l=new Date(0);return l.setUTCFullYear(s,0,a),l.setUTCHours(0,0,0,0),x(l,t)})(n,t).getTime())/6048e5)+1}(e,r);return"wo"===t?n.ordinalNumber(i,{unit:"week"}):j(i,t.length)},I:function(e,t,n){var r=function(e){(0,h.Z)(1,arguments);var t=(0,p.Z)(e);return Math.round((y(t).getTime()-(function(e){(0,h.Z)(1,arguments);var t=b(e),n=new Date(0);return n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0),y(n)})(t).getTime())/6048e5)+1}(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):j(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):E.d(e,t)},D:function(e,t,n){var r=function(e){(0,h.Z)(1,arguments);var t=(0,p.Z)(e),n=t.getTime();return t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0),Math.floor((n-t.getTime())/864e5)+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):j(r,t.length)},E:function(e,t,n){var r=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){var i=e.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return j(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){var i=e.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return j(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){var r=e.getUTCDay(),i=0===r?7:r;switch(t){case"i":return String(i);case"ii":return j(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){var r,i=e.getUTCHours();switch(r=12===i?k.noon:0===i?k.midnight:i/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){var r,i=e.getUTCHours();switch(r=i>=17?k.evening:i>=12?k.afternoon:i>=4?k.morning:k.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){var r=e.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return E.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):E.H(e,t)},K:function(e,t,n){var r=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):j(r,t.length)},k:function(e,t,n){var r=e.getUTCHours();return(0===r&&(r=24),"ko"===t)?n.ordinalNumber(r,{unit:"hour"}):j(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):E.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):E.s(e,t)},S:function(e,t){return E.S(e,t)},X:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();if(0===i)return"Z";switch(t){case"X":return _(i);case"XXXX":case"XX":return C(i);default:return C(i,":")}},x:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"x":return _(i);case"xxxx":case"xx":return C(i);default:return C(i,":")}},O:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+S(i,":");default:return"GMT"+C(i,":")}},z:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+S(i,":");default:return"GMT"+C(i,":")}},t:function(e,t,n,r){return j(Math.floor((r._originalDate||e).getTime()/1e3),t.length)},T:function(e,t,n,r){return j((r._originalDate||e).getTime(),t.length)}};function M(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}}function T(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}}var A={p:T,P:function(e,t){var n,r=e.match(/(P+)(p+)?/)||[],i=r[1],o=r[2];if(!o)return M(e,t);switch(i){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;default:n=t.dateTime({width:"full"})}return n.replace("{{date}}",M(i,t)).replace("{{time}}",T(o,t))}},P=n(1645),N=["D","DD"],R=["YY","YYYY"];function D(e,t,n){if("YYYY"===e)throw RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("YY"===e)throw RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("D"===e)throw RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("DD"===e)throw RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"))}var L=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,F=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,z=/^'([^]*?)'?$/,V=/''/g,I=/[a-zA-Z]/;function Z(e,t,n){(0,h.Z)(2,arguments);var r=String(t),i=n||{},o=i.locale||m.Z,a=o.options&&o.options.firstWeekContainsDate,s=null==a?1:v(a),l=null==i.firstWeekContainsDate?s:v(i.firstWeekContainsDate);if(!(l>=1&&l<=7))throw RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var u=o.options&&o.options.weekStartsOn,c=null==u?0:v(u),d=null==i.weekStartsOn?c:v(i.weekStartsOn);if(!(d>=0&&d<=6))throw RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!o.localize)throw RangeError("locale must contain localize property");if(!o.formatLong)throw RangeError("locale must contain formatLong property");var f=(0,p.Z)(e);if(!function(e){return(0,h.Z)(1,arguments),(!!function(e){return(0,h.Z)(1,arguments),e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}(e)||"number"==typeof e)&&!isNaN(Number((0,p.Z)(e)))}(f))throw RangeError("Invalid time value");var y=(0,P.Z)(f),b=g(f,y),x={firstWeekContainsDate:l,weekStartsOn:d,locale:o,_originalDate:f};return r.match(F).map(function(e){var t=e[0];return"p"===t||"P"===t?(0,A[t])(e,o.formatLong,x):e}).join("").match(L).map(function(n){if("''"===n)return"'";var r=n[0];if("'"===r)return n.match(z)[1].replace(V,"'");var a=O[r];if(a)return i.useAdditionalWeekYearTokens||-1===R.indexOf(n)||D(n,t,e),i.useAdditionalDayOfYearTokens||-1===N.indexOf(n)||D(n,t,e),a(b,n,o.localize,x);if(r.match(I))throw RangeError("Format string contains an unescaped latin alphabet character `"+r+"`");return n}).join("")}var B=n(29193);function H(e){(0,h.Z)(1,arguments);var t=(0,p.Z)(e);return t.setHours(0,0,0,0),t}var U=n(848),W=n(2850),q=n(6391),$=n.n(q);let K=[{id:"actions",label:"",fixed:!0,category:"general",cellClassName:"w-[50px] !pl-2 !pr-4 [&+*]:!pl-0",render:e=>{let{data:t}=e;return(0,o.jsx)(U.G,{address:t.netAddress,publicKey:t.publicKey})}},{id:"allow",label:"allowed",category:"general",contentClassName:"justify-center",render:function(e){var t;let{data:n}=e,r=(0,s.s2)({config:{swr:{dedupingInterval:5e3}}}),i=!!(null===(t=r.data)||void 0===t?void 0:t.length);return(0,o.jsx)(a.ua7,{side:"right",content:(i?"Allowlist ".concat(n.isOnAllowlist?"allows this host.":"does not allow this host."):"Allowlist is inactive.")+" Blocklist ".concat(n.isOnBlocklist?"blocks this host.":"does not block this host."),children:(0,o.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,o.jsx)("div",{className:"mt-[5px]",children:(0,o.jsx)(a.xvT,{color:n.isBlocked?"red":"green",children:n.isBlocked?(0,o.jsx)(d.SmH,{}):(0,o.jsx)(d.DI$,{})})}),(0,o.jsxs)("div",{className:"flex flex-col",children:[(0,o.jsx)(a.xvT,{size:"10",color:n.isOnBlocklist?"red":"verySubtle",noWrap:!0,children:"Blocklist"}),(0,o.jsx)(a.xvT,{size:"10",color:i?n.isOnAllowlist?"green":"red":"verySubtle",noWrap:!0,children:"Allowlist"})]})]})})}},{id:"ap_usable",label:"usable",category:"autopilot",render:e=>{let{data:t,context:n}=e;return n.isAutopilotConfigured?(0,o.jsx)(a.ua7,{side:"right",content:t.usable?"Host is usable":"Host is not usable",children:(0,o.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,o.jsx)("div",{className:"mt-[5px]",children:(0,o.jsx)(a.xvT,{color:t.usable?"green":"red",children:t.usable?(0,o.jsx)(d.DI$,{}):(0,o.jsx)(d.SmH,{})})}),(0,o.jsx)("div",{className:"flex flex-col",children:t.unusableReasons.map(e=>(0,o.jsx)(a.xvT,{size:"10",noWrap:!0,children:e},e))})]})}):(0,o.jsx)(a.ua7,{side:"right",content:"Autopilot is not configured",children:(0,o.jsx)("div",{className:"mt-[5px]",children:(0,o.jsx)(a.xvT,{color:"subtle",children:(0,o.jsx)(d.I98,{})})})})}},{id:"ap_gouging",label:"gouging",category:"autopilot",render:e=>{let{data:t,context:n}=e;return n.isAutopilotConfigured?(0,o.jsx)(a.ua7,{side:"right",content:t.gouging?"Host is price gouging":"Host is not price gouging",children:(0,o.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,o.jsx)("div",{className:"mt-[5px]",children:(0,o.jsx)(a.xvT,{color:t.gouging?"red":"subtle",children:t.gouging?(0,o.jsx)(d.SmH,{}):(0,o.jsx)(d.I98,{})})}),(0,o.jsxs)("div",{className:"flex flex-col",children:[Object.entries(t.gougingBreakdown.v2).filter(e=>{let[t,n]=e;return n&&"string"==typeof n}).map(e=>{let[t,n]=e;return(0,o.jsx)(a.xvT,{size:"10",noWrap:!0,children:n},"v2"+t)}),Object.entries(t.gougingBreakdown.v3).filter(e=>{let[t,n]=e;return n&&"string"==typeof n}).map(e=>{let[t,n]=e;return(0,o.jsx)(a.xvT,{size:"10",noWrap:!0,children:n},"v3"+t)})]})]})}):(0,o.jsx)(a.ua7,{side:"right",content:"Autopilot is not configured",children:(0,o.jsx)("div",{className:"mt-[5px]",children:(0,o.jsx)(a.xvT,{color:"subtle",children:(0,o.jsx)(d.I98,{})})})})}},{id:"lastScan",label:"last scan",category:"general",render:function(e){let{data:t}=e,{workflows:n}=(0,W.D)(),r=n.find(e=>{var n;return e.path.startsWith(s.RF)&&(null===(n=e.payload)||void 0===n?void 0:n.hostKey)===t.publicKey});if(r)return(0,o.jsx)(a.xgg,{});let i=(0,B.Z)(new Date(t.lastScan),new Date,{addSuffix:!0}),l="",u=null,c="subtle";return t.lastScan||(l="host has not been scanned",u=(0,o.jsx)(d.I98,{}),c="subtle"),t.lastScan&&!t.lastScanSuccess&&(l="host scan failed ".concat(i),u=(0,o.jsx)(d.SmH,{}),c="red"),t.lastScan&&t.lastScanSuccess&&(l="host scan succeeded ".concat(i),u=(0,o.jsx)(d.DI$,{}),c="green"),(0,o.jsx)(a.ua7,{side:"right",content:l,children:(0,o.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,o.jsx)("div",{className:"mt-[5px]",children:(0,o.jsx)(a.xvT,{color:c,children:u})}),(0,o.jsxs)("div",{className:"flex flex-col",children:[(0,o.jsx)(a.xvT,{size:"12",noWrap:!0,children:i}),(0,o.jsx)(a.xvT,{color:"subtle",size:"10",noWrap:!0,children:Z(new Date(t.lastScan),"Pp")})]})]})})}},{id:"hasContract",label:"active contract",category:"general",contentClassName:"w-[50px]",render:e=>{let{data:t}=e,n=t.activeContractsCount.gt(0);return(0,o.jsx)(a.ua7,{side:"right",content:n?"Host has active contract":"Host does not have an active contract",children:(0,o.jsx)("div",{className:"mt-[5px]",children:(0,o.jsx)(a.xvT,{color:n?"green":"subtle",children:n?(0,o.jsx)(d.DI$,{}):(0,o.jsx)(d.I98,{})})})})}},{id:"netAddress",label:"address",category:"general",render:e=>{let{data:t}=e;return(0,o.jsx)(a.XxW,{value:t.netAddress,type:"ip",size:"12",label:"host address"})}},{id:"publicKey",label:"public key",category:"general",render:e=>{let{data:t}=e;return(0,o.jsx)(a.XxW,{value:t.publicKey,size:"12",label:"host public key"})}},{id:"knownSince",label:"known since",category:"general",render:e=>{let{data:t}=e;return(0,o.jsxs)("div",{className:"flex flex-col",children:[(0,o.jsxs)(a.xvT,{size:"12",noWrap:!0,children:[(0,B.Z)(new Date,new Date(t.knownSince))," old"]}),(0,o.jsx)(a.xvT,{color:"subtle",size:"10",noWrap:!0,children:function(e,t,n){(0,h.Z)(2,arguments);var r=(0,p.Z)(e),i=(0,p.Z)(t),o={},a=o.locale,s=void 0===a?m.Z:a,l=o.weekStartsOn,u=void 0===l?0:l;if(!s.localize)throw RangeError("locale must contain localize property");if(!s.formatLong)throw RangeError("locale must contain formatLong property");if(!s.formatRelative)throw RangeError("locale must contain formatRelative property");var c=function(e,t){(0,h.Z)(2,arguments);var n=H(e),r=H(t);return Math.round((n.getTime()-(0,P.Z)(n)-(r.getTime()-(0,P.Z)(r)))/864e5)}(r,i);if(isNaN(c))throw RangeError("Invalid time value");var d=g(r,(0,P.Z)(r)),f=g(i,(0,P.Z)(i));return Z(r,s.formatRelative(c<-6?"other":c<-1?"lastWeek":c<0?"yesterday":c<1?"today":c<2?"tomorrow":c<7?"nextWeek":"other",d,f,{locale:s,weekStartsOn:u}),{locale:s,weekStartsOn:u})}(new Date(t.knownSince),new Date)})]})}},{id:"totalScans",label:"total scans",category:"general",contentClassName:"w-[120px] justify-end",render:e=>{let{data:t}=e;return(0,o.jsx)(a.m2c,{size:"12",value:t.totalScans,variant:"value",format:e=>(0,f.yF)(e.toNumber())})}},{id:"uptime",label:"uptime",category:"general",contentClassName:"w-[120px] justify-end",render:e=>{let{data:t}=e;return(0,o.jsx)(a.m2c,{size:"12",value:t.uptime.div(1e9).div(60).div(60).div(24),variant:"value",format:e=>(0,f.yF)(e,{fixed:e.isZero()?0:2,units:"days"})})}},{id:"downtime",label:"downtime",category:"general",contentClassName:"w-[120px] justify-end",render:e=>{let{data:t}=e;return(0,o.jsx)(a.m2c,{size:"12",value:t.downtime.div(1e9).div(60).div(60).div(24),variant:"value",format:e=>(0,f.yF)(e,{fixed:e.isZero()?0:2,units:"days"})})}},{id:"totalInteractions",label:"total interactions",category:"general",contentClassName:"w-[120px] justify-end",render:e=>{let{data:t}=e;return(0,o.jsx)(a.m2c,{size:"12",value:t.totalInteractions,variant:"value",format:e=>(0,f.yF)(e)})}},{id:"successfulInteractions",label:"successful interactions",category:"general",contentClassName:"w-[120px] justify-end",render:e=>{let{data:t}=e;return(0,o.jsx)(a.m2c,{size:"12",value:t.successfulInteractions,variant:"value",format:e=>(0,f.yF)(e.toNumber())})}},{id:"failedInteractions",label:"failed interactions",category:"general",contentClassName:"w-[120px] justify-end",render:e=>{let{data:t}=e;return(0,o.jsx)(a.m2c,{size:"12",value:t.failedInteractions,variant:"value",format:e=>(0,f.yF)(e.toNumber())})}},{id:"contractCount",label:"contract count",category:"general",contentClassName:"w-[120px] justify-end",render:e=>{let{data:t}=e;return(0,o.jsx)(a.m2c,{size:"12",value:t.activeContractsCount,variant:"value",format:e=>(0,f.yF)(e.toNumber())})}},{id:"ap_scoreOverall",label:"overall score",category:"autopilot",contentClassName:"w-[120px] justify-end",render:e=>{let{data:t,context:n}=e;return n.isAutopilotConfigured?(0,o.jsx)(a.m2c,{size:"12",value:t.score,variant:"value",format:e=>e.toPrecision(2)}):(0,o.jsx)(a.ua7,{content:"Autopilot is not configured",children:(0,o.jsx)(a.xvT,{color:"verySubtle",children:"-"})})}},{id:"ap_scoreAge",label:"age score",category:"autopilot",contentClassName:"w-[120px] justify-end",render:e=>{let{data:t,context:n}=e;return n.isAutopilotConfigured?(0,o.jsx)(a.m2c,{size:"12",value:t.scoreBreakdown.age,variant:"value",format:e=>e.toPrecision(2)}):(0,o.jsx)(a.ua7,{content:"Autopilot is not configured",children:(0,o.jsx)(a.xvT,{color:"verySubtle",children:"-"})})}},{id:"ap_scoreCollateral",label:"collateral score",category:"autopilot",contentClassName:"w-[120px] justify-end",render:e=>{let{data:t,context:n}=e;return n.isAutopilotConfigured?(0,o.jsx)(a.m2c,{size:"12",value:t.scoreBreakdown.collateral,variant:"value",format:e=>e.toPrecision(2)}):(0,o.jsx)(a.ua7,{content:"Autopilot is not configured",children:(0,o.jsx)(a.xvT,{color:"verySubtle",children:"-"})})}},{id:"ap_scoreInteractions",label:"interactions score",category:"autopilot",contentClassName:"w-[120px] justify-end",render:e=>{let{data:t,context:n}=e;return n.isAutopilotConfigured?(0,o.jsx)(a.m2c,{size:"12",value:t.scoreBreakdown.interactions,variant:"value",format:e=>e.toPrecision(2)}):(0,o.jsx)(a.ua7,{content:"Autopilot is not configured",children:(0,o.jsx)(a.xvT,{color:"verySubtle",children:"-"})})}},{id:"ap_scorePrices",label:"prices score",category:"autopilot",contentClassName:"w-[120px] justify-end",render:e=>{let{data:t,context:n}=e;return n.isAutopilotConfigured?(0,o.jsx)(a.m2c,{size:"12",value:t.scoreBreakdown.prices,variant:"value",format:e=>e.toPrecision(2)}):(0,o.jsx)(a.ua7,{content:"Autopilot is not configured",children:(0,o.jsx)(a.xvT,{color:"verySubtle",children:"-"})})}},{id:"ap_scoreStorageRemaining",label:"storage remaining score",category:"autopilot",contentClassName:"w-[120px] justify-end",render:e=>{let{data:t,context:n}=e;return n.isAutopilotConfigured?(0,o.jsx)(a.m2c,{size:"12",value:t.scoreBreakdown.storageRemaining,variant:"value",format:e=>e.toPrecision(2)}):(0,o.jsx)(a.ua7,{content:"Autopilot is not configured",children:(0,o.jsx)(a.xvT,{color:"verySubtle",children:"-"})})}},{id:"ap_scoreUptime",label:"uptime score",category:"autopilot",contentClassName:"w-[120px] justify-end",render:e=>{let{data:t,context:n}=e;return n.isAutopilotConfigured?(0,o.jsx)(a.m2c,{size:"12",value:t.scoreBreakdown.uptime,variant:"value",format:e=>e.toPrecision(2)}):(0,o.jsx)(a.ua7,{content:"Autopilot is not configured",children:(0,o.jsx)(a.xvT,{color:"verySubtle",children:"-"})})}},{id:"ap_scoreVersion",label:"version score",category:"autopilot",contentClassName:"w-[120px] justify-end",render:e=>{let{data:t,context:n}=e;return n.isAutopilotConfigured?(0,o.jsx)(a.m2c,{size:"12",value:t.scoreBreakdown.version,variant:"value",format:e=>n.isAutopilotConfigured?"-":e.toPrecision(2)}):(0,o.jsx)(a.ua7,{content:"Autopilot is not configured",children:(0,o.jsx)(a.xvT,{color:"verySubtle",children:"-"})})}},{id:"hpt_accountbalancecost",label:"account balance cost",category:"priceTable",contentClassName:"w-[120px] justify-end",render:Y("priceTable","accountbalancecost")},{id:"hpt_collateralcost",label:"collateral cost",category:"priceTable",contentClassName:"w-[120px] justify-end",render:Y("priceTable","collateralcost")},{id:"hpt_contractprice",label:"contract price",category:"priceTable",contentClassName:"w-[120px] justify-end",render:Y("priceTable","contractprice")},{id:"hpt_downloadbandwidthcost",label:"download bandwidth cost",category:"priceTable",contentClassName:"w-[120px] justify-end",render:Y("priceTable","downloadbandwidthcost")},{id:"hpt_dropsectorsbasecost",label:"drop sectors base cost",category:"priceTable",contentClassName:"w-[120px] justify-end",render:Y("priceTable","dropsectorsbasecost")},{id:"hpt_dropsectorsunitcost",label:"drop sectors unit cost",category:"priceTable",contentClassName:"w-[120px] justify-end",render:Y("priceTable","dropsectorsunitcost")},{id:"hpt_expiry",label:"expiry",category:"priceTable",contentClassName:"w-[120px] justify-end",render:G("priceTable","dropsectorsunitcost")},{id:"hpt_fundaccountcost",label:"fund account cost",category:"priceTable",contentClassName:"w-[120px] justify-end",render:Y("priceTable","fundaccountcost")},{id:"hpt_hassectorbasecost",label:"has sector cost",category:"priceTable",contentClassName:"w-[120px] justify-end",render:Y("priceTable","hassectorbasecost")},{id:"hpt_hostblockheight",label:"host block height",category:"priceTable",contentClassName:"w-[120px] justify-end",render:G("priceTable","hostblockheight")},{id:"hpt_initbasecost",label:"init base cost",category:"priceTable",contentClassName:"w-[120px] justify-end",render:Y("priceTable","initbasecost")},{id:"hpt_latestrevisioncost",label:"latest revision cost",category:"priceTable",contentClassName:"w-[120px] justify-end",render:Y("priceTable","latestrevisioncost")},{id:"hpt_maxcollateral",label:"max collateral",category:"priceTable",contentClassName:"w-[120px] justify-end",render:Y("priceTable","maxcollateral")},{id:"hpt_maxduration",label:"max duration",category:"priceTable",contentClassName:"w-[120px] justify-end",render:G("priceTable","maxduration")},{id:"hpt_memorytimecost",label:"memory time cost",category:"priceTable",contentClassName:"w-[120px] justify-end",render:Y("priceTable","memorytimecost")},{id:"hpt_readbasecost",label:"read base cost",category:"priceTable",contentClassName:"w-[120px] justify-end",render:Y("priceTable","readbasecost")},{id:"hpt_readlengthcost",label:"read length cost",category:"priceTable",contentClassName:"w-[120px] justify-end",render:Y("priceTable","readlengthcost")},{id:"hpt_registryentriesleft",label:"registry entries left",category:"priceTable",contentClassName:"w-[120px] justify-end",render:G("priceTable","registryentriesleft")},{id:"hpt_registryentriestotal",label:"registry entries total",category:"priceTable",contentClassName:"w-[120px] justify-end",render:G("priceTable","registryentriestotal")},{id:"hpt_renewcontractcost",label:"renew contract cost",category:"priceTable",contentClassName:"w-[120px] justify-end",render:Y("priceTable","renewcontractcost")},{id:"hpt_revisionbasecost",label:"revision base cost",category:"priceTable",contentClassName:"w-[120px] justify-end",render:Y("priceTable","renewcontractcost")},{id:"hpt_subscriptionmemorycost",label:"subscription memory cost",category:"priceTable",contentClassName:"w-[120px] justify-end",render:Y("priceTable","subscriptionmemorycost")},{id:"hpt_subscriptionnotificationcost",label:"subscription notification cost",category:"priceTable",contentClassName:"w-[120px] justify-end",render:Y("priceTable","subscriptionnotificationcost")},{id:"hpt_swapsectorcost",label:"swap sector cost",category:"priceTable",contentClassName:"w-[120px] justify-end",render:Y("priceTable","swapsectorcost")},{id:"hpt_txnfeemaxrecommended",label:"txn fee max recommended",category:"priceTable",contentClassName:"w-[120px] justify-end",render:Y("priceTable","txnfeemaxrecommended")},{id:"hpt_txnfeeminrecommended",label:"txn fee min recommended",category:"priceTable",contentClassName:"w-[120px] justify-end",render:Y("priceTable","txnfeeminrecommended")},{id:"hpt_uid",label:"UID",category:"priceTable",contentClassName:"w-[120px] justify-end",render:X("priceTable","uid")},{id:"hpt_updatepricetablecost",label:"update price table cost",category:"priceTable",contentClassName:"w-[120px] justify-end",render:Y("priceTable","updatepricetablecost")},{id:"hpt_uploadbandwidthcost",label:"upload bandwidth cost",category:"priceTable",contentClassName:"w-[120px] justify-end",render:Y("priceTable","uploadbandwidthcost")},{id:"hpt_validity",label:"validity",category:"priceTable",contentClassName:"w-[120px] justify-end",render:G("priceTable","validity")},{id:"hpt_windowsize",label:"window size",category:"priceTable",contentClassName:"w-[120px] justify-end",render:G("priceTable","windowsize")},{id:"hpt_writebasecost",label:"write base cost",category:"priceTable",contentClassName:"w-[120px] justify-end",render:Y("priceTable","writebasecost")},{id:"hpt_writelengthcost",label:"write length cost",category:"priceTable",contentClassName:"w-[120px] justify-end",render:Y("priceTable","writelengthcost")},{id:"hpt_writestorecost",label:"write store cost",category:"priceTable",contentClassName:"w-[120px] justify-end",render:Y("priceTable","writestorecost")},{id:"hs_acceptingcontracts",label:"accepting contracts",category:"hostSettings",contentClassName:"w-[120px] justify-end",render:(r="settings",i="acceptingcontracts",function(e){let{data:t}=e;return t[r]?(0,o.jsx)("div",{className:"mt-[5px]",children:(0,o.jsx)(a.xvT,{color:t[r][i]?"green":"red",children:t[r][i]?(0,o.jsx)(d.DI$,{}):(0,o.jsx)(d.SmH,{})})}):null})},{id:"hs_baserpcprice",label:"base RPC price",category:"hostSettings",contentClassName:"w-[120px] justify-end",render:Y("settings","baserpcprice")},{id:"hs_collateral",label:"collateral",category:"hostSettings",contentClassName:"w-[120px] justify-end",render:Y("settings","collateral")},{id:"hs_contractprice",label:"contract price",category:"hostSettings",contentClassName:"w-[120px] justify-end",render:Y("settings","contractprice")},{id:"hs_downloadbandwidthprice",label:"download bandwidth price",category:"hostSettings",contentClassName:"w-[120px] justify-end",render:Y("settings","downloadbandwidthprice")},{id:"hs_ephemeralaccountexpiry",label:"ephemeral account expiry",category:"hostSettings",contentClassName:"w-[120px] justify-end",render:G("settings","ephemeralaccountexpiry")},{id:"hs_maxcollateral",label:"max collateral",category:"hostSettings",contentClassName:"w-[120px] justify-end",render:Y("settings","maxcollateral")},{id:"hs_maxdownloadbatchsize",label:"max download batch size",category:"hostSettings",contentClassName:"w-[120px] justify-end",render:J("settings","maxdownloadbatchsize")},{id:"hs_maxduration",label:"max duration",category:"hostSettings",contentClassName:"w-[120px] justify-end",render:G("settings","maxduration")},{id:"hs_maxephemeralaccountbalance",label:"max ephemeral account balance",category:"hostSettings",contentClassName:"w-[120px] justify-end",render:Y("settings","maxephemeralaccountbalance")},{id:"hs_maxrevisebatchsize",label:"max revise batch size",category:"hostSettings",contentClassName:"w-[120px] justify-end",render:J("settings","maxrevisebatchsize")},{id:"hs_netaddress",label:"net address",category:"hostSettings",contentClassName:"w-[120px] justify-end",render:X("settings","netaddress")},{id:"hs_remainingstorage",label:"remaining storage",category:"hostSettings",contentClassName:"w-[120px] justify-end",render:J("settings","remainingstorage")},{id:"hs_revisionnumber",label:"revision number",category:"hostSettings",contentClassName:"w-[120px] justify-end",render:G("settings","revisionnumber")},{id:"hs_sectoraccessprice",label:"sector access price",category:"hostSettings",contentClassName:"w-[120px] justify-end",render:Y("settings","sectoraccessprice")},{id:"hs_sectorsize",label:"sector size",category:"hostSettings",contentClassName:"w-[120px] justify-end",render:J("settings","sectorsize")},{id:"hs_siamuxport",label:"siamux port",category:"hostSettings",contentClassName:"w-[120px] justify-end",render:G("settings","siamuxport")},{id:"hs_storageprice",label:"storage price",category:"hostSettings",contentClassName:"w-[120px] justify-end",render:Y("settings","storageprice")},{id:"hs_totalstorage",label:"total storage",category:"hostSettings",contentClassName:"w-[120px] justify-end",render:J("settings","totalstorage")},{id:"hs_unlockhash",label:"unlock hash",category:"hostSettings",contentClassName:"w-[120px] justify-end",render:X("settings","unlockhash")},{id:"hs_uploadbandwidthprice",label:"upload bandwidth price",category:"hostSettings",contentClassName:"w-[120px] justify-end",render:Y("settings","uploadbandwidthprice")},{id:"hs_version",label:"verison",category:"hostSettings",contentClassName:"w-[120px] justify-end",render:X("settings","version")},{id:"hs_windowsize",label:"window size",category:"hostSettings",contentClassName:"w-[120px] justify-end",render:G("settings","windowsize")}].map(e=>({...e,..."autopilot"===e.category?{icon:(0,o.jsx)(d.n6M,{className:"relative opacity-50 scale-75"}),label:e.label,tip:"autopilot: ".concat(e.label)}:"hostSettings"===e.category?{icon:(0,o.jsx)(d.shL,{className:"relative top-px opacity-50 scale-75"}),label:e.label,tip:"host settings (RHPv2): ".concat(e.label)}:"priceTable"===e.category?{icon:(0,o.jsx)(d.B4q,{className:"relative top-px opacity-50 scale-75"}),label:e.label,tip:"price table (RHPv3): ".concat(e.label)}:{label:e.label,tip:e.label}}));function Y(e,t){return function(n){let{data:r}=n;return r[e]?(0,o.jsx)(a.YKL,{size:"12",value:new($())(r[e][t]||0),variant:"value"}):null}}function G(e,t,n){return function(r){let{data:i}=r;return i[e]?(0,o.jsx)(a.m2c,{size:"12",value:new($())(i[e][t]||0),variant:"value",format:e=>(0,f.yF)(e,{abbreviated:n})}):null}}function X(e,t){return function(n){let{data:r}=n;return r[e]?(0,o.jsx)(a.XxW,{value:r[e][t],size:"12"}):null}}function J(e,t){return function(n){let{data:r}=n;return r[e]?(0,o.jsx)(a.xvT,{size:"12",weight:"semibold",ellipsis:!0,children:(0,f.vW)(r[e][t])}):null}}var Q=n(13242);function ee(e,t){return{id:e.publicKey,netAddress:e.netAddress,publicKey:e.publicKey,lastScanSuccess:e.interactions.LastScanSuccess,lastScan:e.interactions.LastScan,knownSince:e.knownSince,uptime:new($())(e.interactions.Uptime||0),downtime:new($())(e.interactions.Downtime||0),successfulInteractions:new($())(e.interactions.SuccessfulInteractions||0),totalInteractions:new($())(e.interactions.SuccessfulInteractions+e.interactions.FailedInteractions||0),failedInteractions:new($())(e.interactions.FailedInteractions||0),totalScans:new($())(e.interactions.TotalScans||0),activeContractsCount:new($())((null==t?void 0:t.filter(t=>t.hostKey===e.publicKey).length)||0),activeContracts:(null==t?void 0:t.filter(t=>t.hostKey===e.publicKey))||[],priceTable:e.priceTable,settings:e.settings}}function et(e){let{host:t,allowlist:n,blocklist:r,isAllowlistActive:i}=e,o=!!(null==n?void 0:n.find(e=>e===t.publicKey)),a=!!(null==r?void 0:r.find(e=>{if(e===t.netAddress)return!0;try{let n=new URL("https://"+t.netAddress).hostname;return e===n}catch(e){return!1}}));return{isOnAllowlist:o,isOnBlocklist:a,isBlocked:a||!(!i||o)}}function en(e){return{score:new($())((null==e?void 0:e.score)||0),scoreBreakdown:{age:new($())((null==e?void 0:e.scoreBreakdown.age)||0),collateral:new($())((null==e?void 0:e.scoreBreakdown.collateral)||0),interactions:new($())((null==e?void 0:e.scoreBreakdown.interactions)||0),prices:new($())((null==e?void 0:e.scoreBreakdown.prices)||0),storageRemaining:new($())((null==e?void 0:e.scoreBreakdown.storageRemaining)||0),uptime:new($())((null==e?void 0:e.scoreBreakdown.uptime)||0),version:new($())((null==e?void 0:e.scoreBreakdown.version)||0)},gougingBreakdown:(null==e?void 0:e.gougingBreakdown)||{v2:{},v3:{}},gouging:null==e?void 0:e.gouging,unusableReasons:(null==e?void 0:e.unusableReasons)||[],usable:null==e?void 0:e.usable}}var er=n(91641),ei=n(34444),eo=n(47025);let ea=(0,l.createContext)({}),es=()=>(0,l.useContext)(ea);function el(e){let{children:t}=e,n=function(){var e,t,n,r,i,o,d;let f=(0,c.useRouter)(),[h,p]=(0,l.useState)("list"),m=Number(f.query.limit||50),v=Number(f.query.offset||0),{filters:g,setFilter:y,removeFilter:b,removeLastFilter:x,resetFilters:w}=(0,a.Uu5)(),{dataset:j}=(0,Q.G)(),{autopilot:E}=(0,er.q)(),k=(0,l.useMemo)(()=>{let e=[];g.find(e=>"hasActiveContracts"===e.id)&&j&&(e=j.map(e=>e.hostKey));let t=g.find(e=>"publicKeyEquals"===e.id);return t&&e.push(null==t?void 0:t.value),e.length?e:void 0},[g,j]),S=(0,s.S0)({disabled:g.find(e=>"hasActiveContracts"===e.id)&&!j||"on"!==E.status,payload:{limit:m,offset:v,usabilityMode:(null===(e=g.find(e=>"usabilityMode"===e.id))||void 0===e?void 0:e.value)||"all",filterMode:(null===(t=g.find(e=>"filterMode"===e.id))||void 0===t?void 0:t.value)||"all",addressContains:null===(n=g.find(e=>"addressContains"===e.id))||void 0===n?void 0:n.value,keyIn:k},config:{swr:{errorRetryInterval:2e4,refreshInterval:(0,a.sWj)(1)}}}),_=(0,s.FV)({disabled:"off"!==E.status,payload:{limit:m,offset:v,filterMode:(null===(r=g.find(e=>"filterMode"===e.id))||void 0===r?void 0:r.value)||"all",addressContains:null===(i=g.find(e=>"addressContains"===e.id))||void 0===i?void 0:i.value,keyIn:g.find(e=>"hasActiveContracts"===e.id)&&j?j.map(e=>e.hostKey):void 0},config:{swr:{refreshInterval:(0,a.sWj)(1)}}}),C=(0,s.s2)(),O=(0,s.uf)(),M=!!(null===(o=C.data)||void 0===o?void 0:o.length),{settings:T}=(0,W.Hv)(),A=(0,eo.JL)({disabled:!T.siaCentral,config:{swr:{revalidateOnFocus:!1}}});(0,l.useEffect)(()=>{T.siaCentral||p("list")},[T.siaCentral]);let P=(0,l.useMemo)(()=>{var e;return(null===(e=A.data)||void 0===e?void 0:e.hosts)||[]},[A.data]),N=(0,l.useRef)(ei.N),R=(0,l.useCallback)(e=>{N.current=e},[N]),[D,L]=(0,l.useState)(),F=(0,l.useCallback)(e=>{let t=document.getElementById(e),n=document.getElementById("scroll-hosts");t&&n&&n.scroll({top:t.offsetTop-50,behavior:"smooth"})},[]),z=(0,l.useCallback)((e,t)=>{if(D===e){L(void 0);return}L(e),t&&N.current.moveToLocation(t),F(e)},[L,N,D,F]),V=(0,l.useCallback)((e,t)=>{if(D===e){L(void 0);return}L(e),t?N.current.moveToLocation(t):(0,a.OHV)("Geographic location is unknown for host ".concat((0,a.$Gg)(e,20))),F(e)},[L,N,D,F]),I=(0,l.useCallback)((e,t)=>null,[]),Z=function(e){let{autopilotStatus:t,regularResponse:n,autopilotResponse:r,allContracts:i,allowlist:o,blocklist:a,isAllowlistActive:s,geoHosts:u,onHostSelect:c}=e;return(0,l.useMemo)(()=>{var e,l;return"off"===t?(null===(e=n.data)||void 0===e?void 0:e.map(e=>{let t=u.find(t=>t.public_key===e.publicKey);return{onClick:()=>c(e.publicKey,null==t?void 0:t.location),...ee(e,i),...et({host:e,allowlist:o.data,blocklist:a.data,isAllowlistActive:s}),...en(),location:null==t?void 0:t.location,countryCode:null==t?void 0:t.country_code}}))||null:"on"===t&&(null===(l=r.data)||void 0===l?void 0:l.map(e=>{let t=u.find(t=>t.public_key===e.host.publicKey);return{onClick:()=>c(e.host.publicKey,null==t?void 0:t.location),...ee(e.host,i),...et({host:e.host,allowlist:o.data,blocklist:a.data,isAllowlistActive:s}),...en(e.checks),location:null==t?void 0:t.location,countryCode:null==t?void 0:t.country_code}}))||null},[c,t,n.data,r.data,i,o.data,a.data,s,u])}({autopilotStatus:E.status,autopilotResponse:S,regularResponse:_,allContracts:j,allowlist:C,blocklist:O,isAllowlistActive:M,geoHosts:P,onHostSelect:V}),B=(0,l.useMemo)(()=>"off"===E.status?["autopilot"]:[],[E.status]),{configurableColumns:H,enabledColumns:U,toggleColumnVisibility:q,setColumnsVisible:$,setColumnsHidden:Y,toggleSort:G,setSortDirection:X,setSortField:J,sortField:ea,sortDirection:es,resetDefaultColumnVisibility:el}=(0,a.oy6)("renterd/v0/hosts",{columns:K,columnsDefaultVisible:u,disabledCategories:B}),eu=(0,l.useMemo)(()=>K.filter(e=>U.includes(e.id)),[U]),ec="on"===E.status?S.isValidating:_.isValidating,ed="on"===E.status?S.error:_.error,ef=(0,a.c2j)(Z,ec,ed,g),eh=null===(d=E.state.data)||void 0===d?void 0:d.configured,ep=(0,l.useMemo)(()=>({isAutopilotConfigured:eh}),[eh]),em=(0,l.useMemo)(()=>null==Z?void 0:Z.filter(e=>e.location),[Z]),ev=(0,l.useMemo)(()=>null==Z?void 0:Z.find(e=>e.publicKey===D),[Z,D]);return{setCmd:R,viewMode:h,activeHost:ev,onHostMapHover:I,onHostMapClick:z,setViewMode:p,hostsWithLocation:em,error:ed,dataState:ef,offset:v,limit:m,pageCount:(null==Z?void 0:Z.length)||0,columns:eu,dataset:Z,tableContext:ep,configurableColumns:H,enabledColumns:U,toggleColumnVisibility:q,setColumnsVisible:$,setColumnsHidden:Y,toggleSort:G,setSortDirection:X,setSortField:J,sortField:ea,sortDirection:es,resetDefaultColumnVisibility:el,filters:g,setFilter:y,removeFilter:b,removeLastFilter:x,resetFilters:w}}();return(0,o.jsx)(ea.Provider,{value:n,children:t})}},10917:function(e,t,n){"use strict";n.d(t,{Kg:function(){return o},jY:function(){return i}});var r=n(23305);let i={activeAndUsable:{colorHex:r.O9T.green[600],colorName:"green"},activeAndUnusable:{colorHex:r.O9T.amber[600],colorName:"amber"},potentialHost:{colorHex:r.O9T.blue[600],colorName:"blue"}};function o(e){return e.activeContractsCount.gt(0)&&!e.usable?{status:"activeAndUnusable",...i.activeAndUnusable}:e.activeContractsCount.gt(0)?{status:"activeAndUsable",...i.activeAndUsable}:{status:"potentialHost",...i.potentialHost}}},33571:function(e,t,n){"use strict";n.d(t,{I:function(){return a}});var r=n(23305),i=n(9969),o=n(2784);function a(){let e=(0,i.ni)();return(0,o.useCallback)((t,n)=>{let i=async()=>{let i=await e.put({payload:{add:t,remove:n}});return i.error?((0,r.OHV)(i.error),!1):(t.length&&(0,r.RFt)("".concat(t.map(e=>(0,r.$Gg)(e,20)).join(", ")," added to allowlist")),n.length&&(0,r.RFt)("".concat(n.map(e=>(0,r.$Gg)(e,20)).join(", ")," removed from allowlist")),!0)};return i()},[e])}},98358:function(e,t,n){"use strict";n.d(t,{l:function(){return a}});var r=n(23305),i=n(9969),o=n(2784);function a(){let e=(0,i.Os)();return(0,o.useCallback)((t,n)=>{let i=async()=>{let i=await e.put({payload:{add:t,remove:n}});return i.error?((0,r.OHV)(i.error),!1):(t.length&&(0,r.RFt)("".concat(t.map(e=>(0,r.$Gg)(e,20)).join(", ")," added to blocklist")),n.length&&(0,r.RFt)("".concat(n.map(e=>(0,r.$Gg)(e,20)).join(", ")," removed from blocklist")),!0)};return i()},[e])}},80489:function(e,t,n){"use strict";n.d(t,{a:function(){return i}});var r=n(9969);function i(e){return(0,r.yu)({...e,params:{key:"contractset"}})}},82439:function(e,t,n){"use strict";n.d(t,{B:function(){return a},V:function(){return o}});var r=n(52322),i=n(88242);let o={excellent:1,good:.5,poor:0};function a(e){let{health:t,size:n,isDirectory:a}=e,s="excellent",l="green",u=t,c=(0,r.jsx)(i.Y3p,{});return t1&&(u=1),t<0&&(u=0),{label:s+" health",color:l,icon:c,displayHealth:u}}},34658:function(e,t,n){"use strict";n.d(t,{w:function(){return i}});var r=n(9969);function i(e){return(0,r.yu)({...e,params:{key:"redundancy"}})}},25573:function(e,t,n){"use strict";n.d(t,{n:function(){return a}});var r=n(23305),i=n(2850),o=n(9969);function a(){var e,t,n,a;let{isUnlocked:s}=(0,i.Hv)(),l=(0,o.DQ)({config:{swr:{refreshInterval:e=>(null==e?void 0:e.synced)?(0,r.XBW)(60):(0,r.XBW)(10)}}}),u=(0,o.nH)(),c=l.data?null===(e=l.data)||void 0===e?void 0:e.blockHeight:0,d=(0,o.Tu)({config:{swr:{refreshInterval:e=>(null==e?void 0:e.scanHeight)>=c?(0,r.XBW)(60):(0,r.XBW)(10)}}}),f=s&&c&&u?Number((100*Math.min(c/u,1)).toFixed(1)):0,h=s&&c&&d.data?Number((100*Math.min(d.data.scanHeight/u,1)).toFixed(1)):0;return{isSynced:null===(t=l.data)||void 0===t?void 0:t.synced,isWalletSynced:(null===(n=l.data)||void 0===n?void 0:n.synced)&&(null===(a=d.data)||void 0===a?void 0:a.scanHeight)>=c-1,nodeBlockHeight:c,estimatedBlockHeight:u,syncPercent:f,walletScanPercent:h,moreThan100BlocksToSync:!!c&&!!u&&u-c>100,firstTimeSyncing:!!c&&!!u&&u-c>5e4}}},48201:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return C}});var r=n(52322);n(37832);var i=n(23305),o=n(86450),a=n(48528),s=n(13242),l=n(19513),u=n(2784),c=n(91641),d=n(17286),f=n(88242),h=n(25573),p=n(71930),m=n(4370),v=n(9969),g=n(6391),y=n.n(g),b=n(96206),x=n(2850),w=n(92762);function j(){var e,t,n,a;let{isUnlocked:s}=(0,x.Hv)(),l=(0,c.q)(),{openDialog:u}=(0,o.Rh)(),d=(0,v.Tu)(),g=(0,v.e$)({config:{swr:{errorRetryInterval:1e4}}}),[j,k]=(0,w.Z)("v0/renterd/onboarding/maximized",{defaultValue:!0}),S=(0,h.n)(),_=(0,m.F)();if(!s||"on"!==l.autopilot.status)return null;let C=new(y())((null===(e=d.data)||void 0===e?void 0:e.confirmed)||0),O=new(y())((null===(t=g.data)||void 0===t?void 0:t.contracts.allowance)||0),M=null===(n=l.autopilot.state.data)||void 0===n?void 0:n.configured,T=S.isSynced,A=(null===(a=l.autopilot.state.data)||void 0===a?void 0:a.configured)&&d.data&&C.gte(O),P=!_.active,N=[M,T,A,P],R=N.length,D=N.filter(e=>e).length;return R===D?null:j?(0,r.jsx)("div",{className:"z-20 fixed bottom-5 left-1/2 -translate-x-1/2 flex justify-center",children:(0,r.jsx)(i.s_4,{className:"w-[400px] flex flex-col max-h-[600px]",children:(0,r.jsxs)(i.xrM,{children:[(0,r.jsxs)("div",{className:"flex justify-between items-center px-3 py-2 border-b border-gray-200 dark:border-graydark-300",children:[(0,r.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,r.jsx)(i.TRl,{}),(0,r.jsx)(i.xvT,{size:"20",weight:"semibold",children:"Welcome to Sia"})]}),(0,r.jsx)(i.zxk,{variant:"ghost",onClick:()=>k(!1),children:(0,r.jsx)(f.mli,{})})]}),(0,r.jsx)("div",{className:"flex justify-between items-center px-3 py-2 border-b border-gray-200 dark:border-graydark-300",children:(0,r.jsx)(i.xvT,{size:"14",children:"Get set up by completing the following steps. Once they are complete, you can start uploading files."})}),(0,r.jsx)(E,{title:(0,r.jsx)(i.rUS,{href:p._.config.index,ellipsis:!0,size:"14",underline:"hover",children:"Step 1: Configure your storage settings"}),description:"Specify how much data you plan to store and your target price.",action:M?(0,r.jsx)(i.xvT,{color:"green",children:(0,r.jsx)(f.Y3p,{})}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.rUS,{href:p._.config.index,children:(0,r.jsx)(f.V8Q,{})}),(0,r.jsx)(i.xvT,{color:"amber",children:(0,r.jsx)(f.Fs9,{})})]})}),(0,r.jsx)(E,{title:(0,r.jsx)(i.rUS,{href:p._.node.index,underline:"hover",ellipsis:!0,size:"14",children:"Step 2: Wait for the blockchain to sync"}),description:"The blockchain will sync in the background, this takes some time. No user action required.",action:T?(0,r.jsx)(i.xvT,{color:"green",children:(0,r.jsx)(f.Y3p,{})}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(i.xvT,{ellipsis:!0,size:"14",children:[S.syncPercent,"%"]}),(0,r.jsx)(i.xvT,{color:"amber",children:(0,r.jsx)(f.hzZ,{})})]})}),(0,r.jsx)(E,{title:(0,r.jsx)(i.rUS,{href:p._.wallet.view,onClick:()=>u("addressDetails"),ellipsis:!0,size:"14",underline:"hover",children:"Step 3: Fund your wallet"}),description:"Fund your wallet with at least ".concat((0,b.Vz)(O)," siacoin to cover the required allowance.").concat(S.isWalletSynced?"":" Balance will not be accurate until wallet is finished scanning."),action:A?(0,r.jsx)(i.xvT,{color:"green",children:(0,r.jsx)(f.Y3p,{})}):(0,r.jsxs)(r.Fragment,{children:[!S.isWalletSynced&&(0,r.jsx)(i.ua7,{content:"Wallet scanning progress ".concat(S.walletScanPercent,"%"),children:(0,r.jsxs)(i.xvT,{size:"14",children:[S.walletScanPercent,"%"]})}),(0,r.jsx)(i.rUS,{href:p._.wallet.view,onClick:()=>u("addressDetails"),children:(0,r.jsx)(f.V8Q,{})}),(0,r.jsx)(i.xvT,{color:"amber",children:(0,r.jsx)(f.Fs9,{})})]})}),(0,r.jsx)(E,{title:(0,r.jsx)(i.rUS,{href:p._.contracts.index,ellipsis:!0,size:"14",underline:"hover",children:"Step 4: Wait for storage contracts to form"}),description:"Once all other steps are complete, contracts will automatically form. No user action required.",action:P?(0,r.jsx)(i.xvT,{color:"green",children:(0,r.jsx)(f.Y3p,{})}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(i.xvT,{ellipsis:!0,size:"14",children:[_.count,"/",_.required]}),(0,r.jsx)(i.xvT,{color:"amber",children:(0,r.jsx)(f.hzZ,{})})]})})]})})}):(0,r.jsx)("div",{className:"z-30 fixed bottom-5 left-1/2 -translate-x-1/2 flex justify-center",children:(0,r.jsx)(i.zxk,{onClick:()=>k(!0),size:"large",className:"flex gap-3 !px-3",children:(0,r.jsxs)(i.xvT,{className:"flex items-center gap-1",children:[(0,r.jsx)(i.TRl,{}),"Setup: ",D,"/",R," steps complete"]})})})}function E(e){let{title:t,action:n,description:o}=e;return(0,r.jsx)("div",{className:"border-t first:border-t-0 border-gray-200 dark:border-graydark-300 px-3 py-2",children:(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,r.jsx)("div",{className:"flex-1 flex items-center",children:t}),n]}),(0,r.jsx)("div",{className:"pr-5",children:(0,r.jsx)(i.xvT,{size:"12",color:"subtle",children:o})})]})})}function k(e){return void 0!==e.loaded?e.loaded/e.size:1}function S(){let{isUnlocked:e}=(0,x.Hv)(),{uploadsList:t,uploadCancel:n,downloadsList:o,downloadCancel:s}=(0,a.Y)(),[l,c]=(0,u.useState)(!0),d=t.length,h=o.length;return e&&(0!==d||0!==h)?l?(0,r.jsx)("div",{className:"z-30 fixed bottom-5 left-1/2 -translate-x-1/2 flex justify-center",children:(0,r.jsx)(i.s_4,{className:"w-[400px] flex flex-col max-h-[600px]",children:(0,r.jsxs)(i.xrM,{children:[d>0?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"flex justify-between items-center px-3 py-2 border-b border-gray-200 dark:border-graydark-300",children:[(0,r.jsxs)(i.xvT,{size:"16",weight:"semibold",children:["Active uploads (",d,")"]}),(0,r.jsx)(i.zxk,{variant:"ghost",onClick:()=>c(!1),children:(0,r.jsx)(f.mli,{})})]}),t.map(e=>{let t=k(e);return(0,r.jsxs)("div",{className:"flex flex-col gap-1 border-t first:border-t-0 border-gray-200 dark:border-graydark-300 px-3 py-2",children:[(0,r.jsxs)("div",{className:"flex gap-1",children:[(0,r.jsx)(i.xvT,{ellipsis:!0,size:"14",className:"flex-1",children:e.path}),(0,r.jsx)(i.zxk,{tip:"Cancel file upload",variant:"ghost",size:"none",onClick:()=>n(e),children:(0,r.jsx)(f.PcV,{})})]}),(0,r.jsx)(i.kod,{variant:"accent",value:e.loaded,max:e.size,className:1===t?"animate-pulse":""}),(0,r.jsxs)("div",{className:"flex justify-between mt-1",children:[(0,r.jsx)(i.xvT,{size:"12",color:"subtle",children:1===t?"Processing":"Uploading"}),(0,r.jsxs)(i.xvT,{size:"12",color:"subtle",children:[(100*t).toFixed(0),"%"]})]})]},e.path)})]}):null,h>0?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"flex justify-between items-center px-3 py-2 border-b border-gray-200 dark:border-graydark-300",children:[(0,r.jsxs)(i.xvT,{size:"16",weight:"semibold",children:["Active downloads (",h,")"]}),0===d?(0,r.jsx)(i.zxk,{variant:"ghost",onClick:()=>c(!1),children:(0,r.jsx)(f.mli,{})}):null]}),o.map(e=>{let t=k(e);return(0,r.jsxs)("div",{className:"flex flex-col gap-1 border-t first:border-t-0 border-gray-200 dark:border-graydark-300 px-3 py-2",children:[(0,r.jsxs)("div",{className:"flex gap-1",children:[(0,r.jsx)(i.xvT,{ellipsis:!0,size:"14",className:"flex-1",children:e.path}),(0,r.jsx)(i.zxk,{tip:"Cancel file download",variant:"ghost",size:"none",onClick:()=>s(e),children:(0,r.jsx)(f.PcV,{})})]}),(0,r.jsx)(i.kod,{variant:"accent",value:e.loaded,max:e.size,className:1===t?"animate-pulse":""}),(0,r.jsxs)("div",{className:"flex justify-between mt-1",children:[(0,r.jsx)(i.xvT,{size:"12",color:"subtle",children:1===t?"Processing":"Downloading"}),(0,r.jsxs)(i.xvT,{size:"12",color:"subtle",children:[(100*t).toFixed(0),"%"]})]})]},e.path)})]}):null]})})}):(0,r.jsx)("div",{className:"z-30 fixed bottom-5 left-1/2 -translate-x-1/2 flex justify-center",children:(0,r.jsxs)(i.zxk,{onClick:()=>c(!0),className:"flex gap-3",children:[(0,r.jsx)(i.xgg,{}),d?(0,r.jsxs)(i.xvT,{className:"flex gap-1",children:[d,(0,r.jsx)(f.R$6,{className:"opacity-50 scale-75 relative top-px"})]}):null,h?(0,r.jsxs)(i.xvT,{className:"flex gap-1",children:[h&&h,(0,r.jsx)(f.vzB,{className:"opacity-50 scale-75"})]}):null]})}):null}function _(e){let{children:t}=e;return(0,r.jsx)(c.w,{children:(0,r.jsx)(d.iV,{children:(0,r.jsx)(o.Tu,{children:(0,r.jsx)(s.x,{children:(0,r.jsx)(l.x,{children:(0,r.jsxs)(a.Z,{children:[(0,r.jsx)(j,{}),(0,r.jsx)(S,{}),(0,r.jsx)(o.xQ,{}),t]})})})})})})}function C(e){let{Component:t,pageProps:n}=e;return(0,r.jsx)(i.PD$,{fallback:n.fallback,passwordProtectRequestHooks:!0,lockRoutes:p._,children:(0,r.jsx)(_,{children:(0,r.jsx)(t,{...n})})})}},23305:function(e,t,n){"use strict";let r,i,o,a;n.d(t,{hcY:function(){return S1},tU3:function(){return SX},zXq:function(){return _a},juT:function(){return SE},Z58:function(){return _H},WVB:function(){return cO},zxk:function(){return s9},EKh:function(){return lg},vRO:function(){return Cd},QHy:function(){return _9},TaT:function(){return _4},eQh:function(){return lb},HfT:function(){return Cn},wEc:function(){return _W},ncR:function(){return k9},VqE:function(){return l6},h_2:function(){return cN},Xiv:function(){return cR},Juw:function(){return cD},KpP:function(){return cL},fhJ:function(){return pA},XOF:function(){return k7},S$c:function(){return Sc},QBj:function(){return Cf},yEL:function(){return _n},cB7:function(){return So},ZqQ:function(){return Si},IKw:function(){return Sd},KZS:function(){return Sa},zsw:function(){return h$},__J:function(){return cG},rUS:function(){return cQ},Qjf:function(){return c0},xgg:function(){return j3},TRl:function(){return c2},kFS:function(){return cM},FzK:function(){return _6},Clw:function(){return cC},PD$:function(){return Cg},Wxm:function(){return fU},uDJ:function(){return Sp},wFK:function(){return Sm},s_4:function(){return tK},nvN:function(){return tq},u5Q:function(){return _U},j4H:function(){return fI},hmz:function(){return fZ},J2e:function(){return dm},kod:function(){return dM},xrM:function(){return l4},PhF:function(){return fH},Z0O:function(){return cj},DLL:function(){return _F},KJW:function(){return S_},rsf:function(){return f6},D_D:function(){return _M},xf5:function(){return CM},iA_:function(){return Sf},mQc:function(){return fr},nUL:function(){return fa},drW:function(){return fi},SPt:function(){return fo},t6k:function(){return Cr},xvT:function(){return tW},ua7:function(){return s8},mPE:function(){return _T},XxW:function(){return kK},PF9:function(){return kY},m2c:function(){return kJ},YKL:function(){return kX},QUh:function(){return _V},weF:function(){return _v},YNn:function(){return _N},DmW:function(){return _R},jrD:function(){return _G},x5w:function(){return _Y},JWi:function(){return CO},O9T:function(){return vu},vQq:function(){return kz},E5z:function(){return kV},HLH:function(){return CP},NrH:function(){return jq},k9c:function(){return jJ},EJC:function(){return CT},leQ:function(){return kH},Ztc:function(){return __},XAn:function(){return jQ},Vkc:function(){return ck},sWj:function(){return jW},ort:function(){return j0},xLV:function(){return jK},S5V:function(){return _$},okB:function(){return jX},AEA:function(){return jG},z$:function(){return t$},XBW:function(){return j2},GXN:function(){return j1},I13:function(){return kZ},cEb:function(){return fs},y70:function(){return fA},OHV:function(){return kD},OPV:function(){return kR},RFt:function(){return kP},$Gg:function(){return kI},_4u:function(){return Ck},Wdu:function(){return CE},Y97:function(){return SG},c2j:function(){return SJ},WsO:function(){return _t},Uu5:function(){return CS},fb0:function(){return CC},oy6:function(){return Cj},BL0:function(){return j$},mvJ:function(){return _q},ivg:function(){return jY}});var s,l,u,c,d,f,h,p,m,v,g,y=n(52322),b=n(2784),x=n.t(b,2),w=n(7896),j=n(34540),E=n(26215),k=n(99575);function S(e){let t=e+"CollectionProvider",[n,r]=(0,j.b)(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=e+"CollectionSlot",s=b.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=o(a,n),s=(0,E.e)(t,i.collectionRef);return b.createElement(k.g7,{ref:s},r)}),l=e+"CollectionItemSlot",u="data-radix-collection-item",c=b.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,a=b.useRef(null),s=(0,E.e)(t,a),c=o(l,n);return b.useEffect(()=>(c.itemMap.set(a,{ref:a,...i}),()=>void c.itemMap.delete(a))),b.createElement(k.g7,{[u]:"",ref:s},r)});return[{Provider:e=>{let{scope:t,children:n}=e,r=b.useRef(null),o=b.useRef(new Map).current;return b.createElement(i,{scope:t,itemMap:o,collectionRef:r},n)},Slot:s,ItemSlot:c},function(t){let n=o(e+"CollectionConsumer",t),r=b.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${u}]`)),r=Array.from(n.itemMap.values()),i=r.sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current));return i},[n.collectionRef,n.itemMap]);return r},r]}var _=n(41816),C=n(73597),O=n(72130),M=n(64680),T=n(28245),A=n(26074);let P="Collapsible",[N,R]=(0,j.b)(P),[D,L]=N(P),F=((e,t)=>{let{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:o,onOpenChange:a,...s}=e,[l=!1,u]=(0,C.T)({prop:r,defaultProp:i,onChange:a});return(0,b.createElement)(D,{scope:n,disabled:o,contentId:(0,A.M)(),open:l,onOpenToggle:(0,b.useCallback)(()=>u(e=>!e),[u])},(0,b.createElement)(O.WV.div,(0,w.Z)({"data-state":V(l),"data-disabled":o?"":void 0},s,{ref:t})))},"CollapsibleContent"),z=((e,t)=>{let{forceMount:n,...r}=e,i=L(F,e.__scopeCollapsible);return(0,b.createElement)(T.z,{present:n||i.open},({present:e})=>(0,b.createElement)(z,(0,w.Z)({},r,{ref:t,present:e})))},(0,b.forwardRef)((e,t)=>{let{__scopeCollapsible:n,present:r,children:i,...o}=e,a=L(F,n),[s,l]=(0,b.useState)(r),u=(0,b.useRef)(null),c=(0,E.e)(t,u),d=(0,b.useRef)(0),f=d.current,h=(0,b.useRef)(0),p=h.current,m=a.open||s,v=(0,b.useRef)(m),g=(0,b.useRef)();return(0,b.useEffect)(()=>{let e=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,M.b)(()=>{let e=u.current;if(e){g.current=g.current||{transitionDuration:e.style.transitionDuration,animationDuration:e.style.animationDuration,animationFillMode:e.style.animationFillMode},e.style.transitionDuration="0s",e.style.animationDuration="0s",e.style.animationFillMode="none";let t=e.getBoundingClientRect();d.current=t.height,h.current=t.width,v.current||(e.style.transitionDuration=g.current.transitionDuration,e.style.animationDuration=g.current.animationDuration,e.style.animationFillMode=g.current.animationFillMode),l(r)}},[a.open,r]),(0,b.createElement)(O.WV.div,(0,w.Z)({"data-state":V(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!m},o,{ref:c,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":p?`${p}px`:void 0,...e.style}}),m&&i)}));function V(e){return e?"open":"closed"}let I="Accordion",Z=["Home","End","ArrowDown","ArrowUp"],[B,H,U]=S(I),[W,q]=(0,j.b)(I,[U,R]),$=(R(),b.forwardRef((e,t)=>{let{type:n,...r}=e;return b.createElement(B.Provider,{scope:e.__scopeAccordion},"multiple"===n?b.createElement(Q,(0,w.Z)({},r,{ref:t})):b.createElement(J,(0,w.Z)({},r,{ref:t})))}));$.propTypes={type(e){let t=e.value||e.defaultValue;return e.type&&!["single","multiple"].includes(e.type)?Error("Invalid prop `type` supplied to `Accordion`. Expected one of `single | multiple`."):"multiple"===e.type&&"string"==typeof t?Error("Invalid prop `type` supplied to `Accordion`. Expected `single` when `defaultValue` or `value` is type `string`."):"single"===e.type&&Array.isArray(t)?Error("Invalid prop `type` supplied to `Accordion`. Expected `multiple` when `defaultValue` or `value` is type `string[]`."):null}};let[K,Y]=W(I),[G,X]=W(I,{collapsible:!1}),J=b.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},collapsible:o=!1,...a}=e,[s,l]=(0,C.T)({prop:n,defaultProp:r,onChange:i});return b.createElement(K,{scope:e.__scopeAccordion,value:s?[s]:[],onItemOpen:l,onItemClose:b.useCallback(()=>o&&l(""),[o,l])},b.createElement(G,{scope:e.__scopeAccordion,collapsible:o},b.createElement(en,(0,w.Z)({},a,{ref:t}))))}),Q=b.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},...o}=e,[a=[],s]=(0,C.T)({prop:n,defaultProp:r,onChange:i}),l=b.useCallback(e=>s((t=[])=>[...t,e]),[s]),u=b.useCallback(e=>s((t=[])=>t.filter(t=>t!==e)),[s]);return b.createElement(K,{scope:e.__scopeAccordion,value:a,onItemOpen:l,onItemClose:u},b.createElement(G,{scope:e.__scopeAccordion,collapsible:!0},b.createElement(en,(0,w.Z)({},o,{ref:t}))))}),[ee,et]=W(I),en=b.forwardRef((e,t)=>{let{__scopeAccordion:n,disabled:r,...i}=e,o=b.useRef(null),a=(0,E.e)(o,t),s=H(n),l=(0,_.M)(e.onKeyDown,e=>{var t;if(!Z.includes(e.key))return;let n=e.target,r=s().filter(e=>{var t;return!(null!==(t=e.ref.current)&&void 0!==t&&t.disabled)}),i=r.findIndex(e=>e.ref.current===n),o=r.length;if(-1===i)return;e.preventDefault();let a=i;switch(e.key){case"Home":a=0;break;case"End":a=o-1;break;case"ArrowDown":a=i+1;break;case"ArrowUp":(a=i-1)<0&&(a=o-1)}let l=a%o;null===(t=r[l].ref.current)||void 0===t||t.focus()});return b.createElement(ee,{scope:n,disabled:r},b.createElement(B.Slot,{scope:n},b.createElement(O.WV.div,(0,w.Z)({},i,{ref:a,onKeyDown:r?void 0:l}))))}),[er,ei]=W("AccordionItem");var eo=n(82851),ea=n(83317);function es(e){return e.split("-")[0]}function el(e){return e.split("-")[1]}function eu(e){return["top","bottom"].includes(es(e))?"x":"y"}function ec(e){return"y"===e?"height":"width"}function ed(e,t,n){let r,{reference:i,floating:o}=e,a=i.x+i.width/2-o.width/2,s=i.y+i.height/2-o.height/2,l=eu(t),u=ec(l),c=i[u]/2-o[u]/2,d="x"===l;switch(es(t)){case"top":r={x:a,y:i.y-o.height};break;case"bottom":r={x:a,y:i.y+i.height};break;case"right":r={x:i.x+i.width,y:s};break;case"left":r={x:i.x-o.width,y:s};break;default:r={x:i.x,y:i.y}}switch(el(t)){case"start":r[l]-=c*(n&&d?-1:1);break;case"end":r[l]+=c*(n&&d?-1:1)}return r}let ef=async(e,t,n)=>{let{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=await (null==a.isRTL?void 0:a.isRTL(t)),l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:c}=ed(l,r,s),d=r,f={},h=0;for(let n=0;n({name:"arrow",options:e,async fn(t){let{element:n,padding:r=0}=null!=e?e:{},{x:i,y:o,placement:a,rects:s,platform:l}=t;if(null==n)return{};let u=eh(r),c={x:i,y:o},d=eu(a),f=el(a),h=ec(d),p=await l.getDimensions(n),m="y"===d?"top":"left",v="y"===d?"bottom":"right",g=s.reference[h]+s.reference[d]-c[d]-s.floating[h],y=c[d]-s.reference[d],b=await (null==l.getOffsetParent?void 0:l.getOffsetParent(n)),x=b?"y"===d?b.clientHeight||0:b.clientWidth||0:0;0===x&&(x=s.floating[h]);let w=u[m],j=x-p[h]-u[v],E=x/2-p[h]/2+(g/2-y/2),k=eg(w,ev(E,j)),S=("start"===f?u[m]:u[v])>0&&E!==k&&s.reference[h]<=s.floating[h];return{[d]:c[d]-(S?Eeb[e])}let ew={start:"end",end:"start"};function ej(e){return e.replace(/start|end/g,e=>ew[e])}let eE=["top","right","bottom","left"];eE.reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]);let ek=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r,i,o;let{placement:a,middlewareData:s,rects:l,initialPlacement:u,platform:c,elements:d}=t,{mainAxis:f=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",flipAlignment:v=!0,...g}=e,y=es(a),b=p||(y!==u&&v?function(e){let t=ex(e);return[ej(e),t,ej(t)]}(u):[ex(u)]),x=[u,...b],w=await em(t,g),j=[],E=(null==(n=s.flip)?void 0:n.overflows)||[];if(f&&j.push(w[y]),h){let{main:e,cross:t}=function(e,t,n){void 0===n&&(n=!1);let r=el(e),i=eu(e),o=ec(i),a="x"===i?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=ex(a)),{main:a,cross:ex(a)}}(a,l,await (null==c.isRTL?void 0:c.isRTL(d.floating)));j.push(w[e],w[t])}if(E=[...E,{placement:a,overflows:j}],!j.every(e=>e<=0)){let e=(null!=(r=null==(i=s.flip)?void 0:i.index)?r:0)+1,t=x[e];if(t)return{data:{index:e,overflows:E},reset:{placement:t}};let n="bottom";switch(m){case"bestFit":{let e=null==(o=E.map(e=>[e,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:o[0].placement;e&&(n=e);break}case"initialPlacement":n=u}if(a!==n)return{reset:{placement:n}}}return{}}}};function eS(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function e_(e){return eE.some(t=>e[t]>=0)}let eC=function(e){let{strategy:t="referenceHidden",...n}=void 0===e?{}:e;return{name:"hide",async fn(e){let{rects:r}=e;switch(t){case"referenceHidden":{let t=eS(await em(e,{...n,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:e_(t)}}}case"escaped":{let t=eS(await em(e,{...n,altBoundary:!0}),r.floating);return{data:{escapedOffsets:t,escaped:e_(t)}}}default:return{}}}}},eO=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){let{x:n,y:r}=t,i=await async function(e,t){let{placement:n,platform:r,elements:i}=e,o=await (null==r.isRTL?void 0:r.isRTL(i.floating)),a=es(n),s=el(n),l="x"===eu(n),u=["left","top"].includes(a)?-1:1,c=o&&l?-1:1,d="function"==typeof t?t(e):t,{mainAxis:f,crossAxis:h,alignmentAxis:p}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&"number"==typeof p&&(h="end"===s?-1*p:p),l?{x:h*c,y:f*u}:{x:f*u,y:h*c}}(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};function eM(e){return"x"===e?"y":"x"}let eT=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=e,u={x:n,y:r},c=await em(t,l),d=eu(es(i)),f=eM(d),h=u[d],p=u[f];if(o){let e="y"===d?"bottom":"right";h=eg(h+c["y"===d?"top":"left"],ev(h,h-c[e]))}a&&(p=eg(p+c["y"===f?"top":"left"],ev(p,p-c["y"===f?"bottom":"right"])));let m=s.fn({...t,[d]:h,[f]:p});return{...m,data:{x:m.x-n,y:m.y-r}}}}},eA=function(e){return void 0===e&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=e,c={x:n,y:r},d=eu(i),f=eM(d),h=c[d],p=c[f],m="function"==typeof s?s({...o,placement:i}):s,v="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){let e="y"===d?"height":"width",t=o.reference[d]-o.floating[e]+v.mainAxis,n=o.reference[d]+o.reference[e]-v.mainAxis;hn&&(h=n)}if(u){var g,y,b,x;let e="y"===d?"width":"height",t=["top","left"].includes(es(i)),n=o.reference[f]-o.floating[e]+(t&&null!=(g=null==(y=a.offset)?void 0:y[f])?g:0)+(t?0:v.crossAxis),r=o.reference[f]+o.reference[e]+(t?0:null!=(b=null==(x=a.offset)?void 0:x[f])?b:0)-(t?v.crossAxis:0);pr&&(p=r)}return{[d]:h,[f]:p}}}};function eP(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function eN(e){if(null==e)return window;if(!eP(e)){let t=e.ownerDocument;return t&&t.defaultView||window}return e}function eR(e){return eN(e).getComputedStyle(e)}function eD(e){return eP(e)?"":e?(e.nodeName||"").toLowerCase():""}function eL(){let e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map(e=>e.brand+"/"+e.version).join(" "):navigator.userAgent}function eF(e){return e instanceof eN(e).HTMLElement}function ez(e){return e instanceof eN(e).Element}function eV(e){return"undefined"!=typeof ShadowRoot&&(e instanceof eN(e).ShadowRoot||e instanceof ShadowRoot)}function eI(e){let{overflow:t,overflowX:n,overflowY:r}=eR(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function eZ(e){let t=/firefox/i.test(eL()),n=eR(e);return"none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||["transform","perspective"].includes(n.willChange)||t&&"filter"===n.willChange||t&&!!n.filter&&"none"!==n.filter}function eB(){return!/^((?!chrome|android).)*safari/i.test(eL())}let eH=Math.min,eU=Math.max,eW=Math.round;function eq(e,t,n){var r,i,o,a;void 0===t&&(t=!1),void 0===n&&(n=!1);let s=e.getBoundingClientRect(),l=1,u=1;t&&eF(e)&&(l=e.offsetWidth>0&&eW(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&eW(s.height)/e.offsetHeight||1);let c=ez(e)?eN(e):window,d=!eB()&&n,f=(s.left+(d&&null!=(r=null==(i=c.visualViewport)?void 0:i.offsetLeft)?r:0))/l,h=(s.top+(d&&null!=(o=null==(a=c.visualViewport)?void 0:a.offsetTop)?o:0))/u,p=s.width/l,m=s.height/u;return{width:p,height:m,top:h,right:f+p,bottom:h+m,left:f,x:f,y:h}}function e$(e){return((e instanceof eN(e).Node?e.ownerDocument:e.document)||window.document).documentElement}function eK(e){return ez(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function eY(e){return eq(e$(e)).left+eK(e).scrollLeft}function eG(e){return"html"===eD(e)?e:e.assignedSlot||e.parentNode||(eV(e)?e.host:null)||e$(e)}function eX(e){return eF(e)&&"fixed"!==getComputedStyle(e).position?e.offsetParent:null}function eJ(e){let t=eN(e),n=eX(e);for(;n&&["table","td","th"].includes(eD(n))&&"static"===getComputedStyle(n).position;)n=eX(n);return n&&("html"===eD(n)||"body"===eD(n)&&"static"===getComputedStyle(n).position&&!eZ(n))?t:n||function(e){let t=eG(e);for(eV(t)&&(t=t.host);eF(t)&&!["html","body"].includes(eD(t));){if(eZ(t))return t;t=t.parentNode}return null}(e)||t}function eQ(e){if(eF(e))return{width:e.offsetWidth,height:e.offsetHeight};let t=eq(e);return{width:t.width,height:t.height}}function e0(e,t){var n;void 0===t&&(t=[]);let r=function e(t){let n=eG(t);return["html","body","#document"].includes(eD(n))?t.ownerDocument.body:eF(n)&&eI(n)?n:e(n)}(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),o=eN(r),a=i?[o].concat(o.visualViewport||[],eI(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(e0(a))}function e1(e,t,n){return"viewport"===t?ep(function(e,t){let n=eN(e),r=e$(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;let e=eB();(e||!e&&"fixed"===t)&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}(e,n)):ez(t)?function(e,t){let n=eq(e,!1,"fixed"===t),r=n.top+e.clientTop,i=n.left+e.clientLeft;return{top:r,left:i,x:i,y:r,right:i+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}(t,n):ep(function(e){var t;let n=e$(e),r=eK(e),i=null==(t=e.ownerDocument)?void 0:t.body,o=eU(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=eU(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+eY(e),l=-r.scrollTop;return"rtl"===eR(i||n).direction&&(s+=eU(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}(e$(e)))}let e2={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,o=[..."clippingAncestors"===n?function(e){let t=e0(e),n=["absolute","fixed"].includes(eR(e).position)&&eF(e)?eJ(e):e;return ez(n)?t.filter(e=>ez(e)&&function(e,t){let n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&eV(n)){let n=t;do{if(n&&e===n)return!0;n=n.parentNode||n.host}while(n)}return!1}(e,n)&&"body"!==eD(e)):[]}(t):[].concat(n),r],a=o[0],s=o.reduce((e,n)=>{let r=e1(t,n,i);return e.top=eU(r.top,e.top),e.right=eH(r.right,e.right),e.bottom=eH(r.bottom,e.bottom),e.left=eU(r.left,e.left),e},e1(t,a,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e,i=eF(n),o=e$(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0},s={x:0,y:0};if((i||!i&&"fixed"!==r)&&(("body"!==eD(n)||eI(o))&&(a=eK(n)),eF(n))){let e=eq(n,!0);s.x=e.x+n.clientLeft,s.y=e.y+n.clientTop}return{...t,x:t.x-a.scrollLeft+s.x,y:t.y-a.scrollTop+s.y}},isElement:ez,getDimensions:eQ,getOffsetParent:eJ,getDocumentElement:e$,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:function(e,t,n){let r=eF(t),i=e$(t),o=eq(e,r&&function(e){let t=eq(e);return eW(t.width)!==e.offsetWidth||eW(t.height)!==e.offsetHeight}(t),"fixed"===n),a={scrollLeft:0,scrollTop:0},s={x:0,y:0};if(r||!r&&"fixed"!==n){if(("body"!==eD(t)||eI(i))&&(a=eK(t)),eF(t)){let e=eq(t,!0);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else i&&(s.x=eY(i))}return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}(t,eJ(n),r),floating:{...eQ(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===eR(e).direction};function e4(e,t,n,r){void 0===r&&(r={});let{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=!0,animationFrame:s=!1}=r,l=i&&!s,u=o&&!s,c=l||u?[...ez(e)?e0(e):[],...e0(t)]:[];c.forEach(e=>{l&&e.addEventListener("scroll",n,{passive:!0}),u&&e.addEventListener("resize",n)});let d,f=null;if(a){let r=!0;f=new ResizeObserver(()=>{r||n(),r=!1}),ez(e)&&!s&&f.observe(e),f.observe(t)}let h=s?eq(e):null;return s&&function t(){let r=eq(e);h&&(r.x!==h.x||r.y!==h.y||r.width!==h.width||r.height!==h.height)&&n(),h=r,d=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach(e=>{l&&e.removeEventListener("scroll",n),u&&e.removeEventListener("resize",n)}),null==(e=f)||e.disconnect(),f=null,s&&cancelAnimationFrame(d)}}let e3=(e,t,n)=>ef(e,t,{platform:e2,...n});var e5=n(28316),e6="undefined"!=typeof document?b.useLayoutEffect:b.useEffect;function e8(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:i}=void 0===e?{}:e,o=b.useRef(null),a=b.useRef(null),s=function(e){let t=b.useRef(e);return e6(()=>{t.current=e}),t}(i),l=b.useRef(null),[u,c]=b.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[d,f]=b.useState(t);!function e(t,n){let r,i,o;if(t===n)return!0;if(typeof t!=typeof n)return!1;if("function"==typeof t&&t.toString()===n.toString())return!0;if(t&&n&&"object"==typeof t){if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(i=r;0!=i--;)if(!e(t[i],n[i]))return!1;return!0}if((r=(o=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(i=r;0!=i--;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;0!=i--;){let r=o[i];if(("_owner"!==r||!t.$$typeof)&&!e(t[r],n[r]))return!1}return!0}return t!=t&&n!=n}(null==d?void 0:d.map(e=>{let{options:t}=e;return t}),null==t?void 0:t.map(e=>{let{options:t}=e;return t}))&&f(t);let h=b.useCallback(()=>{o.current&&a.current&&e3(o.current,a.current,{middleware:d,placement:n,strategy:r}).then(e=>{p.current&&e5.flushSync(()=>{c(e)})})},[d,n,r]);e6(()=>{p.current&&h()},[h]);let p=b.useRef(!1);e6(()=>(p.current=!0,()=>{p.current=!1}),[]);let m=b.useCallback(()=>{if("function"==typeof l.current&&(l.current(),l.current=null),o.current&&a.current){if(s.current){let e=s.current(o.current,a.current,h);l.current=e}else h()}},[h,s]),v=b.useCallback(e=>{o.current=e,m()},[m]),g=b.useCallback(e=>{a.current=e,m()},[m]),y=b.useMemo(()=>({reference:o,floating:a}),[]);return b.useMemo(()=>({...u,update:h,refs:y,reference:v,floating:g}),[u,h,y,v,g])}let e7=e=>{let{element:t,padding:n}=e;return{name:"arrow",options:e,fn(e){if(Object.prototype.hasOwnProperty.call(t,"current")){if(null!=t.current)return ey({element:t.current,padding:n}).fn(e)}else if(t)return ey({element:t,padding:n}).fn(e);return{}}}},e9=(0,b.forwardRef)((e,t)=>{let{children:n,width:r=10,height:i=5,...o}=e;return(0,b.createElement)(O.WV.svg,(0,w.Z)({},o,{ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?n:(0,b.createElement)("polygon",{points:"0,0 30,0 15,10"}))});function te(e){let[t,n]=(0,b.useState)(void 0);return(0,M.b)(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{let r,i;if(!Array.isArray(t)||!t.length)return;let o=t[0];if("borderBoxSize"in o){let e=o.borderBoxSize,t=Array.isArray(e)?e[0]:e;r=t.inlineSize,i=t.blockSize}else r=e.offsetWidth,i=e.offsetHeight;n({width:r,height:i})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)},[e]),t}let tt="Popper",[tn,tr]=(0,j.b)(tt),[ti,to]=tn(tt),ta=(0,b.forwardRef)((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,o=to("PopperAnchor",n),a=(0,b.useRef)(null),s=(0,E.e)(t,a);return(0,b.useEffect)(()=>{o.onAnchorChange((null==r?void 0:r.current)||a.current)}),r?null:(0,b.createElement)(O.WV.div,(0,w.Z)({},i,{ref:s}))}),ts="PopperContent",[tl,tu]=tn(ts),[tc,td]=tn(ts,{hasParent:!1,positionUpdateFns:new Set}),tf=(0,b.forwardRef)((e,t)=>{var n,r,i,o,a,s,l,u;let{__scopePopper:c,side:d="bottom",sideOffset:f=0,align:h="center",alignOffset:p=0,arrowPadding:m=0,collisionBoundary:v=[],collisionPadding:g=0,sticky:y="partial",hideWhenDetached:x=!1,avoidCollisions:w=!0,...j}=e,k=to(ts,c),[S,_]=(0,b.useState)(null),C=(0,E.e)(t,e=>_(e)),[T,A]=(0,b.useState)(null),P=te(T),N=null!==(n=null==P?void 0:P.width)&&void 0!==n?n:0,R=null!==(r=null==P?void 0:P.height)&&void 0!==r?r:0,D="number"==typeof g?g:{top:0,right:0,bottom:0,left:0,...g},L=Array.isArray(v)?v:[v],F=L.length>0,z={padding:D,boundary:L.filter(tv),altBoundary:F},{reference:V,floating:I,strategy:Z,x:B,y:H,placement:U,middlewareData:W,update:q}=e8({strategy:"fixed",placement:d+("center"!==h?"-"+h:""),whileElementsMounted:e4,middleware:[eO({mainAxis:f+R,alignmentAxis:p}),w?eT({mainAxis:!0,crossAxis:!1,limiter:"partial"===y?eA():void 0,...z}):void 0,T?e7({element:T,padding:m}):void 0,w?ek({...z}):void 0,tg({arrowWidth:N,arrowHeight:R}),x?eC({strategy:"referenceHidden"}):void 0].filter(tm)});(0,M.b)(()=>{V(k.anchor)},[V,k.anchor]);let $=null!==B&&null!==H,[K,Y]=ty(U),G=null===(i=W.arrow)||void 0===i?void 0:i.x,X=null===(o=W.arrow)||void 0===o?void 0:o.y,J=(null===(a=W.arrow)||void 0===a?void 0:a.centerOffset)!==0,[Q,ee]=(0,b.useState)();(0,M.b)(()=>{S&&ee(window.getComputedStyle(S).zIndex)},[S]);let{hasParent:et,positionUpdateFns:en}=td(ts,c),er=!et;(0,b.useLayoutEffect)(()=>{if(!er)return en.add(q),()=>{en.delete(q)}},[er,en,q]),(0,b.useLayoutEffect)(()=>{er&&$&&Array.from(en).reverse().forEach(e=>requestAnimationFrame(e))},[er,$,en]);let ei={"data-side":K,"data-align":Y,...j,ref:C,style:{...j.style,animation:$?void 0:"none",opacity:null!==(s=W.hide)&&void 0!==s&&s.referenceHidden?0:void 0}};return(0,b.createElement)("div",{ref:I,"data-radix-popper-content-wrapper":"",style:{position:Z,left:0,top:0,transform:$?`translate3d(${Math.round(B)}px, ${Math.round(H)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:Q,"--radix-popper-transform-origin":[null===(l=W.transformOrigin)||void 0===l?void 0:l.x,null===(u=W.transformOrigin)||void 0===u?void 0:u.y].join(" ")}},(0,b.createElement)(tl,{scope:c,placedSide:K,onArrowChange:A,arrowX:G,arrowY:X,shouldHideArrow:J},er?(0,b.createElement)(tc,{scope:c,hasParent:!0,positionUpdateFns:en},(0,b.createElement)(O.WV.div,ei)):(0,b.createElement)(O.WV.div,ei)))}),th={top:"bottom",right:"left",bottom:"top",left:"right"},tp=(0,b.forwardRef)(function(e,t){let{__scopePopper:n,...r}=e,i=tu("PopperArrow",n),o=th[i.placedSide];return(0,b.createElement)("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0}},(0,b.createElement)(e9,(0,w.Z)({},r,{ref:t,style:{...r.style,display:"block"}})))});function tm(e){return void 0!==e}function tv(e){return null!==e}let tg=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,a;let{placement:s,rects:l,middlewareData:u}=t,c=(null===(n=u.arrow)||void 0===n?void 0:n.centerOffset)!==0,d=c?0:e.arrowWidth,f=c?0:e.arrowHeight,[h,p]=ty(s),m={start:"0%",center:"50%",end:"100%"}[p],v=(null!==(r=null===(i=u.arrow)||void 0===i?void 0:i.x)&&void 0!==r?r:0)+d/2,g=(null!==(o=null===(a=u.arrow)||void 0===a?void 0:a.y)&&void 0!==o?o:0)+f/2,y="",b="";return"bottom"===h?(y=c?m:`${v}px`,b=`${-f}px`):"top"===h?(y=c?m:`${v}px`,b=`${l.floating.height+f}px`):"right"===h?(y=`${-f}px`,b=c?m:`${g}px`):"left"===h&&(y=`${l.floating.width+f}px`,b=c?m:`${g}px`),{data:{x:y,y:b}}}});function ty(e){let[t,n="center"]=e.split("-");return[t,n]}let tb=e=>{let{__scopePopper:t,children:n}=e,[r,i]=(0,b.useState)(null);return(0,b.createElement)(ti,{scope:t,anchor:r,onAnchorChange:i},n)};var tx=n(6500);let tw=(0,b.forwardRef)((e,t)=>(0,b.createElement)(O.WV.span,(0,w.Z)({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}))),[tj,tE]=(0,j.b)("Tooltip",[tr]),tk=tr(),tS="tooltip.open",[t_,tC]=tj("TooltipProvider"),tO="Tooltip",[tM,tT]=tj(tO),tA="TooltipTrigger",tP=(0,b.forwardRef)((e,t)=>{let{__scopeTooltip:n,...r}=e,i=tT(tA,n),o=tC(tA,n),a=tk(n),s=(0,b.useRef)(null),l=(0,E.e)(t,s,i.onTriggerChange),u=(0,b.useRef)(!1),c=(0,b.useRef)(!1),d=(0,b.useCallback)(()=>u.current=!1,[]);return(0,b.useEffect)(()=>()=>document.removeEventListener("pointerup",d),[d]),(0,b.createElement)(ta,(0,w.Z)({asChild:!0},a),(0,b.createElement)(O.WV.button,(0,w.Z)({"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute},r,{ref:l,onPointerMove:(0,_.M)(e.onPointerMove,e=>{"touch"===e.pointerType||c.current||o.isPointerInTransitRef.current||(i.onTriggerEnter(),c.current=!0)}),onPointerLeave:(0,_.M)(e.onPointerLeave,()=>{i.onTriggerLeave(),c.current=!1}),onPointerDown:(0,_.M)(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:(0,_.M)(e.onFocus,()=>{u.current||i.onOpen()}),onBlur:(0,_.M)(e.onBlur,i.onClose),onClick:(0,_.M)(e.onClick,e=>{let t=0===e.detail;t&&i.onClose()})})))}),tN="TooltipPortal",[tR,tD]=tj(tN,{forceMount:void 0}),tL="TooltipContent",tF=(0,b.forwardRef)((e,t)=>{let n=tD(tL,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...o}=e,a=tT(tL,e.__scopeTooltip);return(0,b.createElement)(T.z,{present:r||a.open},a.disableHoverableContent?(0,b.createElement)(tZ,(0,w.Z)({side:i},o,{ref:t})):(0,b.createElement)(tz,(0,w.Z)({side:i},o,{ref:t})))}),tz=(0,b.forwardRef)((e,t)=>{let n=tT(tL,e.__scopeTooltip),r=tC(tL,e.__scopeTooltip),i=(0,b.useRef)(null),o=(0,E.e)(t,i),[a,s]=(0,b.useState)(null),{trigger:l,onClose:u}=n,c=i.current,{onPointerInTransitChange:d}=r,f=(0,b.useCallback)(()=>{s(null),d(!1)},[d]),h=(0,b.useCallback)((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=function(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,i,o)){case o:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:return null}}(r,n.getBoundingClientRect()),o="right"===i||"bottom"===i?-5:5,a="right"===i||"left"===i?{x:e.clientX+o,y:e.clientY}:{x:e.clientX,y:e.clientY+o},l=function(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}(t.getBoundingClientRect()),u=function(e){let t=e.slice();return t.sort((e,t)=>e.xt.x?1:e.yt.y?1:0),function(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return(n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y)?t:t.concat(n)}(t)}([a,...l]);s(u),d(!0)},[d]);return(0,b.useEffect)(()=>()=>f(),[f]),(0,b.useEffect)(()=>{if(l&&c){let e=e=>h(e,c),t=e=>h(e,l);return l.addEventListener("pointerleave",e),c.addEventListener("pointerleave",t),()=>{l.removeEventListener("pointerleave",e),c.removeEventListener("pointerleave",t)}}},[l,c,h,f]),(0,b.useEffect)(()=>{if(a){let e=e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=(null==l?void 0:l.contains(t))||(null==c?void 0:c.contains(t)),i=!function(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,o=t.length-1;er!=u>r&&n<(l-a)*(r-s)/(u-s)+a;c&&(i=!i)}return i}(n,a);r?f():i&&(f(),u())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}},[l,c,a,u,f]),(0,b.createElement)(tZ,(0,w.Z)({},e,{ref:o}))}),[tV,tI]=tj(tO,{isInside:!1}),tZ=(0,b.forwardRef)((e,t)=>{let{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:o,onPointerDownOutside:a,...s}=e,l=tT(tL,n),u=tk(n),{onClose:c}=l;return(0,b.useEffect)(()=>(document.addEventListener(tS,c),()=>document.removeEventListener(tS,c)),[c]),(0,b.useEffect)(()=>{if(l.trigger){let e=e=>{let t=e.target;null!=t&&t.contains(l.trigger)&&c()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}},[l.trigger,c]),(0,b.createElement)(ea.XB,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:e=>e.preventDefault(),onDismiss:c},(0,b.createElement)(tf,(0,w.Z)({"data-state":l.stateAttribute},u,s,{ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)"}}),(0,b.createElement)(k.A4,null,r),(0,b.createElement)(tV,{scope:n,isInside:!0},(0,b.createElement)(tw,{id:l.contentId,role:"tooltip"},i||r))))}),tB=e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i=!1,onOpenChange:o,disableHoverableContent:a,delayDuration:s}=e,l=tC(tO,e.__scopeTooltip),u=tk(t),[c,d]=(0,b.useState)(null),f=(0,A.M)(),h=(0,b.useRef)(0),p=null!=a?a:l.disableHoverableContent,m=null!=s?s:l.delayDuration,v=(0,b.useRef)(!1),[g=!1,y]=(0,C.T)({prop:r,defaultProp:i,onChange:e=>{e?(l.onOpen(),document.dispatchEvent(new CustomEvent(tS))):l.onClose(),null==o||o(e)}}),x=(0,b.useMemo)(()=>g?v.current?"delayed-open":"instant-open":"closed",[g]),w=(0,b.useCallback)(()=>{window.clearTimeout(h.current),v.current=!1,y(!0)},[y]),j=(0,b.useCallback)(()=>{window.clearTimeout(h.current),y(!1)},[y]),E=(0,b.useCallback)(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{v.current=!0,y(!0)},m)},[m,y]);return(0,b.useEffect)(()=>()=>window.clearTimeout(h.current),[]),(0,b.createElement)(tb,u,(0,b.createElement)(tM,{scope:t,contentId:f,open:g,stateAttribute:x,trigger:c,onTriggerChange:d,onTriggerEnter:(0,b.useCallback)(()=>{l.isOpenDelayed?E():w()},[l.isOpenDelayed,E,w]),onTriggerLeave:(0,b.useCallback)(()=>{p?j():window.clearTimeout(h.current)},[j,p]),onOpen:w,onClose:j,disableHoverableContent:p},n))},tH=e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,o=tT(tN,t);return(0,b.createElement)(tR,{scope:t,forceMount:n},(0,b.createElement)(T.z,{present:n||o.open},(0,b.createElement)(tx.h,{asChild:!0,container:i},r)))},tU=(0,eo.j)([],{variants:{display:{default:"inline-block",none:""},font:{mono:"font-mono",sans:"font-sans"},color:{verySubtle:"text-gray-700 dark:text-graydark-700",subtle:"text-gray-1000 dark:text-graydark-1000",contrast:"text-gray-1100 dark:text-white",lo:"text-white dark:text-graydark-50",accent:"text-accent-1100 dark:text-accentdark-1100",red:"text-red-700 dark:text-red-400",green:"text-emerald-700 dark:text-emerald-500",amber:"text-amber-600 dark:text-amber-500",none:""},weight:{extrabold:"font-extrabold",bold:"font-bold",medium:"font-medium",semibold:"font-semibold",regular:"font-normal",normal:"font-normal",light:"font-light",none:""},size:{10:"text-xxs",12:"text-xs",14:"text-sm",16:"text-base",18:"text-lg",20:"text-xl",24:"text-2xl",30:"text-3xl",36:"text-4xl",40:"text-5xl",48:"text-5xl",60:"text-6xl",64:"text-6xl"},scaleSize:{12:"text-xxs md:text-xs",14:"text-xs md:text-sm",16:"text-sm md:text-base",18:"text-base md:text-lg",20:"text-base md:text-xl",24:"text-xl md:text-2xl",30:"text-2xl md:text-3xl",36:"text-3xl md:text-4xl",40:"text-4xl md:text-5xl",48:"text-4xl md:text-5xl",60:"text-5xl md:text-6xl",64:"text-5xl md:text-6xl"},noWrap:{true:"whitespace-nowrap"},underline:{accent:"underline underline-offset-2 decoration-2 decoration-accent-900 dark:decoration-accentdark-900",show:"underline underline-offset-2 decoration-gray-1100 dark:decoration-gray-500",hover:"hover:underline underline-offset-2 decoration-gray-1100 dark:decoration-gray-500",none:""},ellipsis:{true:"overflow-hidden text-ellipsis whitespace-nowrap"},wrapEllipsis:{true:"overflow-hidden text-ellipsis"}},defaultVariants:{display:"default",weight:"regular",font:"sans",color:"contrast",underline:"none"}}),tW=b.forwardRef((e,t)=>{let{tag:n="span",className:r,font:i,color:o,weight:a,size:s,scaleSize:l,noWrap:u,underline:c,ellipsis:d,wrapEllipsis:f,...h}=e;return(0,y.jsx)(n,{ref:t,className:(0,eo.cx)(r,tU({font:i,color:o,weight:a,size:s,scaleSize:l,underline:c,noWrap:u,ellipsis:d,wrapEllipsis:f})),...h})}),tq=b.forwardRef((e,t)=>{let{size:n="18",...r}=e;return(0,y.jsx)(tW,{tag:"p",...r,ref:t,weight:"regular",scaleSize:n,color:"subtle",className:(0,eo.cx)("leading-relaxed md:leading-relaxed",e.className)})}),t$=(0,eo.j)(["bg-white dark:bg-graydark-200","transition-shadow ease-in-out duration-300","shadow-sm hover:shadow","rounded","border","border-gray-400 dark:border-graydark-400"]),tK=b.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,y.jsx)("div",{ref:t,className:t$({className:n}),...r})});var tY=n(34406);let tG=(void 0===tY||tY.env,"production"),tX=1/60*1e3,tJ="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),tQ="undefined"!=typeof window?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(tJ()),tX),t0=!0,t1=!1,t2=!1,t4={delta:0,timestamp:0},t3=["read","update","preRender","render","postRender"],t5=t3.reduce((e,t)=>(e[t]=function(e){let t=[],n=[],r=0,i=!1,o=!1,a=new WeakSet,s={schedule:(e,o=!1,s=!1)=>{let l=s&&i,u=l?t:n;return o&&a.add(e),-1===u.indexOf(e)&&(u.push(e),l&&i&&(r=t.length)),e},cancel:e=>{let t=n.indexOf(e);-1!==t&&n.splice(t,1),a.delete(e)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length)for(let n=0;nt1=!0),e),{}),t6=t3.reduce((e,t)=>{let n=t5[t];return e[t]=(e,t=!1,r=!1)=>(t1||nt(),n.schedule(e,t,r)),e},{}),t8=t3.reduce((e,t)=>(e[t]=t5[t].cancel,e),{}),t7=t3.reduce((e,t)=>(e[t]=()=>t5[t].process(t4),e),{}),t9=e=>t5[e].process(t4),ne=e=>{t1=!1,t4.delta=t0?tX:Math.max(Math.min(e-t4.timestamp,40),1),t4.timestamp=e,t2=!0,t3.forEach(t9),t2=!1,t1&&(t0=!1,tQ(ne))},nt=()=>{t1=!0,t0=!0,t2||tQ(ne)},nn=()=>t4,nr="undefined"!=typeof document,ni=nr?b.useLayoutEffect:b.useEffect;function no(){let e=(0,b.useRef)(!1);return ni(()=>(e.current=!0,()=>{e.current=!1}),[]),e}let na=(0,b.createContext)(null);function ns(e){let t=(0,b.useRef)(null);return null===t.current&&(t.current=e()),t.current}class nl extends b.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){let e=this.props.sizeRef.current;e.height=t.offsetHeight||0,e.width=t.offsetWidth||0,e.top=t.offsetTop,e.left=t.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function nu({children:e,isPresent:t}){let n=(0,b.useId)(),r=(0,b.useRef)(null),i=(0,b.useRef)({width:0,height:0,top:0,left:0});return(0,b.useInsertionEffect)(()=>{let{width:e,height:o,top:a,left:s}=i.current;if(t||!r.current||!e||!o)return;r.current.dataset.motionPopId=n;let l=document.createElement("style");return document.head.appendChild(l),l.sheet&&l.sheet.insertRule(` + */var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,o=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,u=n?Symbol.for("react.context"):60110,c=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,f=n?Symbol.for("react.forward_ref"):60112,h=n?Symbol.for("react.suspense"):60113,p=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,v=n?Symbol.for("react.lazy"):60116,g=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,x=n?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case c:case d:case o:case s:case a:case h:return e;default:switch(e=e&&e.$$typeof){case u:case f:case v:case m:case l:return e;default:return t}}case i:return t}}}function j(e){return w(e)===d}t.AsyncMode=c,t.ConcurrentMode=d,t.ContextConsumer=u,t.ContextProvider=l,t.Element=r,t.ForwardRef=f,t.Fragment=o,t.Lazy=v,t.Memo=m,t.Portal=i,t.Profiler=s,t.StrictMode=a,t.Suspense=h,t.isAsyncMode=function(e){return j(e)||w(e)===c},t.isConcurrentMode=j,t.isContextConsumer=function(e){return w(e)===u},t.isContextProvider=function(e){return w(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return w(e)===f},t.isFragment=function(e){return w(e)===o},t.isLazy=function(e){return w(e)===v},t.isMemo=function(e){return w(e)===m},t.isPortal=function(e){return w(e)===i},t.isProfiler=function(e){return w(e)===s},t.isStrictMode=function(e){return w(e)===a},t.isSuspense=function(e){return w(e)===h},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===d||e===s||e===a||e===h||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===m||e.$$typeof===l||e.$$typeof===u||e.$$typeof===f||e.$$typeof===y||e.$$typeof===b||e.$$typeof===x||e.$$typeof===g)},t.typeOf=w},73887:function(e,t,n){"use strict";e.exports=n(43459)},62333:function(e,t){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */t.read=function(e,t,n,r,i){var o,a,s=8*i-r-1,l=(1<>1,c=-7,d=n?i-1:0,f=n?-1:1,h=e[t+d];for(d+=f,o=h&(1<<-c)-1,h>>=-c,c+=s;c>0;o=256*o+e[t+d],d+=f,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=256*a+e[t+d],d+=f,c-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:(h?-1:1)*(1/0);a+=Math.pow(2,r),o-=u}return(h?-1:1)*a*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var a,s,l,u=8*o-i-1,c=(1<>1,f=23===i?5960464477539062e-23:0,h=r?0:o-1,p=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(isNaN(t=Math.abs(t))||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+d>=1?t+=f/l:t+=f*Math.pow(2,1-d),t*l>=2&&(a++,l/=2),a+d>=c?(s=0,a=c):a+d>=1?(s=(t*l-1)*Math.pow(2,i),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;e[n+h]=255&s,h+=p,s/=256,i-=8);for(a=a<0;e[n+h]=255&a,h+=p,a/=256,u-=8);e[n+h-p]|=128*m}},39515:function(e,t,n){var r=n(38761)(n(37772),"DataView");e.exports=r},89612:function(e,t,n){var r=n(52118),i=n(96909),o=n(98138),a=n(4174),s=n(7942);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1}},34893:function(e){e.exports=function(e,t,n){for(var r=-1,i=null==e?0:e.length;++r=200&&(d=l,f=!1,t=new r(t));t:for(;++c0&&o(c)?n>1?e(c,n-1,o,a,s):r(s,c):a||(s[s.length]=c)}return s}},15308:function(e,t,n){var r=n(55463)();e.exports=r},26548:function(e,t,n){var r=n(15308),i=n(90249);e.exports=function(e,t){return e&&r(e,t,i)}},13324:function(e,t,n){var r=n(17297),i=n(33812);e.exports=function(e,t){t=r(t,e);for(var n=0,o=t.length;null!=e&&n=120&&g.length>=120)?new r(h&&g):void 0}g=e[0];var y=-1,b=p[0];t:for(;++yi?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r=200){var m=t?null:s(e);if(m)return l(m);f=!1,c=a,p=new r}else p=t?[]:h;t:for(;++u=i?e:r(e,t,n)}},79882:function(e,t,n){var r=n(79162);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},92175:function(e,t,n){e=n.nmd(e);var r=n(37772),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i?r.Buffer:void 0,s=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=s?s(n):new e.constructor(n);return e.copy(r),r}},34727:function(e,t,n){var r=n(79882);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},96058:function(e){var t=/\w*$/;e.exports=function(e){var n=new e.constructor(e.source,t.exec(e));return n.lastIndex=e.lastIndex,n}},70169:function(e,t,n){var r=n(50857),i=r?r.prototype:void 0,o=i?i.valueOf:void 0;e.exports=function(e){return o?Object(o.call(e)):{}}},6190:function(e,t,n){var r=n(79882);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},27520:function(e,t,n){var r=n(4795);e.exports=function(e,t){if(e!==t){var n=void 0!==e,i=null===e,o=e==e,a=r(e),s=void 0!==t,l=null===t,u=t==t,c=r(t);if(!l&&!c&&!a&&e>t||a&&s&&u&&!l&&!c||i&&s&&u||!n&&u||!o)return 1;if(!i&&!a&&!c&&e=l)return u;return u*("desc"==n[i]?-1:1)}}return e.index-t.index}},51522:function(e){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(o--,a):void 0,s&&i(n[0],n[1],s)&&(a=o<3?void 0:a,o=1),t=Object(t);++rc))return!1;var f=l.get(e),h=l.get(t);if(f&&h)return f==t&&h==e;var p=-1,m=!0,v=2&n?new r:void 0;for(l.set(e,t),l.set(t,e);++p-1&&e%1==0&&e-1}},94769:function(e,t,n){var r=n(22218);e.exports=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}},92411:function(e,t,n){var r=n(89612),i=n(80235),o=n(10326);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},36417:function(e,t,n){var r=n(27937);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},86928:function(e,t,n){var r=n(27937);e.exports=function(e){return r(this,e).get(e)}},79493:function(e,t,n){var r=n(27937);e.exports=function(e){return r(this,e).has(e)}},24150:function(e,t,n){var r=n(27937);e.exports=function(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}},75179:function(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}},73477:function(e){e.exports=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}},77777:function(e,t,n){var r=n(30733);e.exports=function(e){var t=r(e,function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t}},99191:function(e,t,n){var r=n(38761)(Object,"create");e.exports=r},54248:function(e,t,n){var r=n(60241)(Object.keys,Object);e.exports=r},62966:function(e){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},4146:function(e,t,n){e=n.nmd(e);var r=n(51242),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i&&r.process,s=function(){try{var e=o&&o.require&&o.require("util").types;if(e)return e;return a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=s},37157:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},60241:function(e){e.exports=function(e,t){return function(n){return e(t(n))}}},43114:function(e,t,n){var r=n(49432),i=Math.max;e.exports=function(e,t,n){return t=i(void 0===t?e.length-1:t,0),function(){for(var o=arguments,a=-1,s=i(o.length-t,0),l=Array(s);++a0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},15243:function(e,t,n){var r=n(80235);e.exports=function(){this.__data__=new r,this.size=0}},72858:function(e){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},4417:function(e){e.exports=function(e){return this.__data__.get(e)}},8605:function(e){e.exports=function(e){return this.__data__.has(e)}},71418:function(e,t,n){var r=n(80235),i=n(10326),o=n(96738);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!i||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new o(a)}return n.set(e,t),this.size=n.size,this}},66024:function(e){e.exports=function(e,t,n){for(var r=n-1,i=e.length;++r=t||n<0||v&&r>=c}function x(){var e,n,r,o=i();if(b(o))return w(o);f=setTimeout(x,(e=o-h,n=o-p,r=t-e,v?s(r,c-n):r))}function w(e){return(f=void 0,g&&l)?y(e):(l=u=void 0,d)}function j(){var e,n=i(),r=b(n);if(l=arguments,u=this,h=n,r){if(void 0===f)return p=e=h,f=setTimeout(x,t),m?y(e):d;if(v)return clearTimeout(f),f=setTimeout(x,t),y(h)}return void 0===f&&(f=setTimeout(x,t)),d}return t=o(t)||0,r(n)&&(m=!!n.leading,c=(v="maxWait"in n)?a(o(n.maxWait)||0,t):c,g="trailing"in n?!!n.trailing:g),j.cancel=function(){void 0!==f&&clearTimeout(f),p=0,l=h=u=f=void 0},j.flush=function(){return void 0===f?d:w(i())},j}},97329:function(e,t,n){var r=n(61655),i=n(66188),o=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,a=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");e.exports=function(e){return(e=i(e))&&e.replace(o,r).replace(a,"")}},17335:function(e,t,n){var r=n(85246),i=n(62034),o=n(36060),a=n(93746),s=o(function(e,t){return a(e)?r(e,i(t,1,a,!0)):[]});e.exports=s},45861:function(e,t,n){e.exports=n(28460)},41225:function(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},35676:function(e,t,n){var r=n(62034);e.exports=function(e){return(null==e?0:e.length)?r(e,1):[]}},72579:function(e,t,n){var r=n(13324);e.exports=function(e,t,n){var i=null==e?void 0:r(e,t);return void 0===i?n:i}},3440:function(e,t,n){var r=n(13940),i=n(36740),o=Object.prototype.hasOwnProperty,a=i(function(e,t,n){o.call(e,n)?e[n].push(t):r(e,n,[t])});e.exports=a},93352:function(e,t,n){var r=n(32726),i=n(1369);e.exports=function(e,t){return null!=e&&i(e,t,r)}},95041:function(e,t,n){var r=n(20187),i=n(1369);e.exports=function(e,t){return null!=e&&i(e,t,r)}},23059:function(e){e.exports=function(e){return e}},30898:function(e,t,n){var r=n(50343),i=n(88390),o=n(36060),a=n(5642),s=o(function(e){var t=r(e,a);return t.length&&t[0]===e[0]?i(t):[]});e.exports=s},79631:function(e,t,n){var r=n(15183),i=n(15125),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,l=r(function(){return arguments}())?r:function(e){return i(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=l},86152:function(e){var t=Array.isArray;e.exports=t},67878:function(e,t,n){var r=n(61049),i=n(61158);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},93746:function(e,t,n){var r=n(67878),i=n(15125);e.exports=function(e){return i(e)&&r(e)}},73226:function(e,t,n){e=n.nmd(e);var r=n(37772),i=n(36330),o=t&&!t.nodeType&&t,a=o&&e&&!e.nodeType&&e,s=a&&a.exports===o?r.Buffer:void 0,l=s?s.isBuffer:void 0;e.exports=l||i},18149:function(e,t,n){var r=n(88746);e.exports=function(e,t){return r(e,t)}},61049:function(e,t,n){var r=n(53366),i=n(29259);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},61158:function(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},4714:function(e,t,n){var r=n(74511),i=n(47826),o=n(4146),a=o&&o.isMap,s=a?i(a):r;e.exports=s},29259:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},15125:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},97030:function(e,t,n){var r=n(53366),i=n(47353),o=n(15125),a=Object.prototype,s=Function.prototype.toString,l=a.hasOwnProperty,u=s.call(Object);e.exports=function(e){if(!o(e)||"[object Object]"!=r(e))return!1;var t=i(e);if(null===t)return!0;var n=l.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&s.call(n)==u}},43679:function(e,t,n){var r=n(8109),i=n(47826),o=n(4146),a=o&&o.isSet,s=a?i(a):r;e.exports=s},4795:function(e,t,n){var r=n(53366),i=n(15125);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},77598:function(e,t,n){var r=n(35522),i=n(47826),o=n(4146),a=o&&o.isTypedArray,s=a?i(a):r;e.exports=s},90249:function(e,t,n){var r=n(1634),i=n(86411),o=n(67878);e.exports=function(e){return o(e)?r(e):i(e)}},18582:function(e,t,n){var r=n(1634),i=n(18390),o=n(67878);e.exports=function(e){return o(e)?r(e,!0):i(e)}},56974:function(e){e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},19950:function(e,t,n){var r=n(13940),i=n(26548),o=n(68286);e.exports=function(e,t){var n={};return t=o(t,3),i(e,function(e,i,o){r(n,t(e,i,o),e)}),n}},34519:function(e,t,n){var r=n(13940),i=n(26548),o=n(68286);e.exports=function(e,t){var n={};return t=o(t,3),i(e,function(e,i,o){r(n,i,t(e,i,o))}),n}},30733:function(e,t,n){var r=n(96738);function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(i.Cache||r),n}i.Cache=r,e.exports=i},98537:function(e,t,n){var r=n(84565),i=n(97263)(function(e,t,n){r(e,t,n)});e.exports=i},65680:function(e,t,n){var r=n(2229),i=n(17606),o=n(23059);e.exports=function(e){return e&&e.length?r(e,o,i):void 0}},34291:function(e){e.exports=function(){}},61100:function(e,t,n){var r=n(37772);e.exports=function(){return r.Date.now()}},17620:function(e,t,n){var r=n(50343),i=n(18874),o=n(29078),a=n(17297),s=n(752),l=n(48642),u=n(29097),c=n(76939),d=u(function(e,t){var n={};if(null==e)return n;var u=!1;t=r(t,function(t){return t=a(t,e),u||(u=t.length>1),t}),s(e,c(e),n),u&&(n=i(n,7,l));for(var d=t.length;d--;)o(n,t[d]);return n});e.exports=d},65798:function(e,t,n){var r=n(20256),i=n(82952),o=n(21401),a=n(33812);e.exports=function(e){return o(e)?r(a(e)):i(e)}},57370:function(e,t,n){var r=n(34311)(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()});e.exports=r},829:function(e,t,n){var r=n(62034),i=n(23813),o=n(36060),a=n(82406),s=o(function(e,t){if(null==e)return[];var n=t.length;return n>1&&a(e,t[0],t[1])?t=[]:n>2&&a(t[0],t[1],t[2])&&(t=[t[0]]),i(e,r(t,1),[])});e.exports=s},30981:function(e){e.exports=function(){return[]}},36330:function(e){e.exports=function(){return!1}},12436:function(e,t,n){var r=n(54073),i=n(29259);e.exports=function(e,t,n){var o=!0,a=!0;if("function"!=typeof e)throw TypeError("Expected a function");return i(n)&&(o="leading"in n?!!n.leading:o,a="trailing"in n?!!n.trailing:a),r(e,t,{leading:o,maxWait:t,trailing:a})}},61258:function(e,t,n){var r=n(36473),i=n(89419),o=n(38101),a=Math.min;e.exports=function(e,t){if((e=o(e))<1||e>9007199254740991)return[];var n=4294967295,s=a(e,4294967295);t=i(t),e-=4294967295;for(var l=r(s,t);++n"+t.value+""+i[o].show+""+e.value+"",type:10}):r.push({value:(1!=t.type?"(":"")+t.value+(1!=t.type?")":"")+""+e.value+"",type:1})):2===i[o].type||9===i[o].type?(e=r.pop(),t=r.pop(),r.push({value:(1!=t.type?"(":"")+t.value+(1!=t.type?")":"")+i[o].show+(1!=e.type?"(":"")+e.value+(1!=e.type?")":""),type:i[o].type})):12===i[o].type&&(e=r.pop(),t=r.pop(),n=r.pop(),r.push({value:i[o].show+"("+n.value+","+t.value+","+e.value+")",type:12}));return r[0].value},e.exports=r},66655:function(e,t,n){"use strict";var r=n(72346);function i(e,t){for(var n=0;np.length-2?p.length-1:e.length-l;n>0;n--)if(void 0!==p[n])for(i=0;i0&&kn)s.push(e);else{for(;n>=i&&!c||c&&i1)throw new r.Exception("Uncaught Syntax error");return o[0].value>1e15?"Infinity":parseFloat(o[0].value.toFixed(15))},r.eval=function(e,t,n){return void 0===t?this.lex(e).toPostfix().postfixEval():void 0!==n?this.lex(e,t).toPostfix().postfixEval(n):void 0!==t.length?this.lex(e,t).toPostfix().postfixEval():this.lex(e).toPostfix().postfixEval(t)},e.exports=r},38617:function(e,t,n){"use strict";n.d(t,{F:function(){return u},f:function(){return c}});var r=n(2784);let i=["light","dark"],o="(prefers-color-scheme: dark)",a="undefined"==typeof window,s=(0,r.createContext)(void 0),l={setTheme:e=>{},themes:[]},u=()=>{var e;return null!==(e=(0,r.useContext)(s))&&void 0!==e?e:l},c=e=>(0,r.useContext)(s)?r.createElement(r.Fragment,null,e.children):r.createElement(f,e),d=["light","dark"],f=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:n=!0,enableColorScheme:a=!0,storageKey:l="theme",themes:u=d,defaultTheme:c=n?"system":"light",attribute:f="data-theme",value:g,children:y,nonce:b})=>{let[x,w]=(0,r.useState)(()=>p(l,c)),[j,E]=(0,r.useState)(()=>p(l)),k=g?Object.values(g):u,S=(0,r.useCallback)(e=>{let r=e;if(!r)return;"system"===e&&n&&(r=v());let o=g?g[r]:r,s=t?m():null,l=document.documentElement;if("class"===f?(l.classList.remove(...k),o&&l.classList.add(o)):o?l.setAttribute(f,o):l.removeAttribute(f),a){let e=i.includes(c)?c:null,t=i.includes(r)?r:e;l.style.colorScheme=t}null==s||s()},[]),_=(0,r.useCallback)(e=>{w(e);try{localStorage.setItem(l,e)}catch(e){}},[e]),C=(0,r.useCallback)(t=>{let r=v(t);E(r),"system"===x&&n&&!e&&S("system")},[x,e]);(0,r.useEffect)(()=>{let e=window.matchMedia(o);return e.addListener(C),C(e),()=>e.removeListener(C)},[C]),(0,r.useEffect)(()=>{let e=e=>{e.key===l&&_(e.newValue||c)};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[_]),(0,r.useEffect)(()=>{S(null!=e?e:x)},[e,x]);let O=(0,r.useMemo)(()=>({theme:x,setTheme:_,forcedTheme:e,resolvedTheme:"system"===x?j:x,themes:n?[...u,"system"]:u,systemTheme:n?j:void 0}),[x,_,e,j,n,u]);return r.createElement(s.Provider,{value:O},r.createElement(h,{forcedTheme:e,disableTransitionOnChange:t,enableSystem:n,enableColorScheme:a,storageKey:l,themes:u,defaultTheme:c,attribute:f,value:g,children:y,attrs:k,nonce:b}),y)},h=(0,r.memo)(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:a,enableColorScheme:s,defaultTheme:l,value:u,attrs:c,nonce:d})=>{let f="system"===l,h="class"===n?`var d=document.documentElement,c=d.classList;c.remove(${c.map(e=>`'${e}'`).join(",")});`:`var d=document.documentElement,n='${n}',s='setAttribute';`,p=s?i.includes(l)&&l?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${l}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",m=(e,t=!1,r=!0)=>{let o=u?u[e]:e,a=t?e+"|| ''":`'${o}'`,l="";return s&&r&&!t&&i.includes(e)&&(l+=`d.style.colorScheme = '${e}';`),"class"===n?l+=t||o?`c.add(${a})`:"null":o&&(l+=`d[s](n,${a})`),l},v=e?`!function(){${h}${m(e)}}()`:a?`!function(){try{${h}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${f})){var t='${o}',m=window.matchMedia(t);if(m.media!==t||m.matches){${m("dark")}}else{${m("light")}}}else if(e){${u?`var x=${JSON.stringify(u)};`:""}${m(u?"x[e]":"e",!0)}}${f?"":"else{"+m(l,!1,!1)+"}"}${p}}catch(e){}}()`:`!function(){try{${h}var e=localStorage.getItem('${t}');if(e){${u?`var x=${JSON.stringify(u)};`:""}${m(u?"x[e]":"e",!0)}}else{${m(l,!1,!1)};}${p}}catch(t){}}();`;return r.createElement("script",{nonce:d,dangerouslySetInnerHTML:{__html:v}})},()=>!0),p=(e,t)=>{let n;if(!a){try{n=localStorage.getItem(e)||void 0}catch(e){}return n||t}},m=()=>{let e=document.createElement("style");return e.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(e),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(e)},1)}},v=e=>(e||(e=window.matchMedia(o)),e.matches?"dark":"light")},86570:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return n(48201)}])},4941:function(e,t,n){"use strict";n.d(t,{Ul:function(){return s},WD:function(){return l},fu:function(){return c},o4:function(){return u}});var r=n(52322),i=n(23305),o=n(82851),a=n(99182);function s(e){let{currentPage:t,parentPage:n,commandPage:s,className:l,...u}=e,c=(0,a.U8)(e=>e.search);if((null==n?void 0:n.namespace)===(null==t?void 0:t.namespace)&&!c)return(0,r.jsx)(a.mY.Item,{className:(0,o.cx)((0,i.Vkc)(),"group",l),value:"".concat(null==s?void 0:s.label," ").concat(u.children.toString()),...u})}function l(e){let{currentPage:t,commandPage:n,className:s,...l}=e,u=(0,a.U8)(e=>e.search),c=n.namespace.startsWith((null==t?void 0:t.namespace)||"");if(u&&c||n.namespace===(null==t?void 0:t.namespace))return(0,r.jsx)(a.mY.Item,{className:(0,o.cx)((0,i.Vkc)(),"group",s),value:"".concat(n.label," ").concat(l.children.toString()),...l})}function u(e){let{currentPage:t,commandPage:n,className:s,...l}=e,u=(0,a.U8)(e=>e.search),c=n.namespace.startsWith((null==t?void 0:t.namespace)||"");if(u&&c||!t||n.namespace===(null==t?void 0:t.namespace))return(0,r.jsx)(a.mY.Item,{className:(0,o.cx)((0,i.Vkc)(),"group",s),value:"".concat(n.label," ").concat(l.children.toString()),...l})}function c(e){let{heading:t,currentPage:n,commandPage:o,...s}=e,l=(0,a.U8)(e=>e.search);return(0,r.jsx)(a.mY.Group,{heading:l&&(null==n?void 0:n.namespace)!==o.namespace&&(0,r.jsx)(i.__J,{className:"px-1",size:"12",children:o.label}),...s})}n(2784)},82459:function(e,t,n){"use strict";n.d(t,{F:function(){return g}});var r=n(52322),i=n(23305),o=n(88242),a=n(9969),s=n(71930),l=n(5632),u=n(13242),c=n(19513),d=n(33571),f=n(98358),h=n(31781),p=n(24801),m=n(86450),v=n(2784);function g(e){var t,n;let{id:g,address:y,publicKey:b,contentProps:x,buttonProps:w}=e,j=(0,l.useRouter)(),{setFilter:E,resetFilters:k}=(0,c.l)(),{setFilter:S,resetFilters:_}=(0,u.G)(),C=(0,a.uf)(),O=(0,a.s2)(),M=(0,f.l)(),T=(0,d.I)(),A=function(){let{openConfirmDialog:e}=(0,m.Rh)(),t=(0,a.IK)();return(0,v.useCallback)(n=>e({title:"Delete contract",action:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.Jrl,{}),"Delete"]}),variant:"red",body:(0,r.jsxs)("div",{className:"flex flex-col",children:[(0,r.jsx)(i.nvN,{size:"14",children:"Are you sure you would like to delete the following contract:"}),(0,r.jsxs)(i.nvN,{size:"14",font:"mono",children:[n.slice(0,20),"..."]})]}),onConfirm:async()=>{let e=await t.delete({params:{id:n}});e.error&&(0,i.OHV)("Error deleting contract."),(0,i.OPV)("Successfully deleted contract.")}}),[e,t])}();return(0,r.jsxs)(i.h_2,{trigger:(0,r.jsx)(i.zxk,{variant:"ghost",icon:"hover",...w,children:(0,r.jsx)(o.iG7,{})}),contentProps:{align:"start",...x,onClick:e=>{e.stopPropagation()}},children:[(0,r.jsx)("div",{className:"px-1.5 py-1",children:(0,r.jsxs)(i.xvT,{size:"14",weight:"medium",color:"subtle",children:["Contract ",b.slice(0,24),"..."]})}),(0,r.jsx)(i.Juw,{children:"Filters"}),(0,r.jsxs)(i.Xiv,{onSelect:()=>{k(),E({id:"addressContains",value:y,label:"Address contains ".concat(y)}),j.push(s._.hosts.index)},children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(o.q0D,{})}),"Filter hosts by host address"]}),(0,r.jsxs)(i.Xiv,{onSelect:()=>{_(),S((0,h.e)(y)),j.push(s._.contracts.index)},children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(o.q0D,{})}),"Filter contracts by host address"]}),(0,r.jsxs)(i.Xiv,{onSelect:()=>{_(),S((0,p.V)(b)),j.push(s._.contracts.index)},children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(o.q0D,{})}),"Filter contracts by host public key"]}),(0,r.jsx)(i.Juw,{children:"Actions"}),(null===(t=C.data)||void 0===t?void 0:t.find(e=>e===y))?(0,r.jsxs)(i.Xiv,{onSelect:()=>M([],[y]),children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(o.nCM,{})}),"Remove host address from blocklist"]}):(0,r.jsxs)(i.Xiv,{onSelect:()=>M([y],[]),children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(o.nCM,{})}),"Add host address to blocklist"]}),(null===(n=O.data)||void 0===n?void 0:n.find(e=>e===b))?(0,r.jsxs)(i.Xiv,{onSelect:()=>T([],[b]),children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(o.nCM,{})}),"Remove host public key from allowlist"]}):(0,r.jsxs)(i.Xiv,{onSelect:()=>T([b],[]),children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(o.nCM,{})}),"Add host public key to allowlist"]}),(0,r.jsxs)(i.Xiv,{onSelect:()=>A(g),children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(o.Jrl,{})}),"Delete contract"]}),(0,r.jsx)(i.Juw,{children:"Copy"}),(0,r.jsxs)(i.Xiv,{onSelect:()=>(0,i.vQq)(g,"contract ID"),children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(o.olJ,{})}),"Contract ID"]}),(0,r.jsxs)(i.Xiv,{onSelect:()=>(0,i.vQq)(b,"host public key"),children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(o.olJ,{})}),"Host public key"]}),(0,r.jsxs)(i.Xiv,{onSelect:()=>(0,i.vQq)(y,"host address"),children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(o.olJ,{})}),"Host address"]})]})}},93216:function(e,t,n){"use strict";n.d(t,{F:function(){return M}});var r=n(52322),i=n(23305),o=n(4941);let a={namespace:"contracts/filterExpiryDate",label:"Contracts filter by expiry date"},s=[{id:"expiry",value:"day",label:"expires today",fn:e=>{let t=new Date().getTime(),n=t+(0,i.NrH)(1);return e.endTimet}},{id:"expiry",value:"week",label:"expires this week",fn:e=>{let t=new Date().getTime(),n=t+(0,i.BL0)(1);return e.endTimet}},{id:"expiry",value:"month",label:"expires this month",fn:e=>{let t=new Date().getTime(),n=t+(0,i.xLV)(1);return e.endTimet}},{id:"expiry",value:"nextMonth",label:"expires next month",fn:e=>{let t=new Date().getTime(),n=t+(0,i.xLV)(2);return e.endTimet}},{id:"expiry",value:"year",label:"expires this year",fn:e=>{let t=new Date().getTime(),n=t+(0,i.ivg)(1);return e.endTimet}},{id:"expiry",value:"expired",label:"expired",fn:e=>{let t=new Date().getTime();return e.endTime(0,r.jsx)(o.WD,{currentPage:t,commandPage:a,onSelect:()=>{n(e)},children:e.label},e.id+e.value))})}let u={namespace:"contracts/filterFormationDate",label:"Contracts filter by formation date"},c=[{id:"formationDate",value:"day",label:"formed in the last day",fn:e=>{let t=new Date().getTime(),n=t-(0,i.NrH)(1);return e.startTime>=n}},{id:"formationDate",value:"week",label:"formed in the last week",fn:e=>{let t=new Date().getTime(),n=t-(0,i.BL0)(1);return e.startTime>=n}},{id:"formationDate",value:"twoWeeks",label:"formed in the last two weeks",fn:e=>{let t=new Date().getTime(),n=t-(0,i.BL0)(2);return e.startTime>=n}},{id:"formationDate",value:"month",label:"formed in the last month",fn:e=>{let t=new Date().getTime(),n=t-(0,i.xLV)(1);return e.startTime>=n}},{id:"formationDate",value:"twoMonths",label:"formed in the last two months",fn:e=>{let t=new Date().getTime(),n=t-(0,i.xLV)(2);return e.startTime>=n}},{id:"formationDate",value:"year",label:"formed in the last year",fn:e=>{let t=new Date().getTime(),n=t-(0,i.ivg)(1);return e.startTime>=n}}];function d(e){let{currentPage:t,select:n}=e;return(0,r.jsx)(o.fu,{currentPage:t,commandPage:u,children:c.map(e=>(0,r.jsx)(o.WD,{currentPage:t,commandPage:u,onSelect:()=>{n(e)},children:e.label},e.id+e.value))})}let f={namespace:"contracts/filterRenewDate",label:"Contracts filter by renew date"},h=[{id:"renewDate",value:"day",label:"renewed in the last day",fn:e=>{let t=new Date().getTime(),n=t-(0,i.NrH)(1);return e.isRenewed&&e.startTime>=n}},{id:"renewDate",value:"week",label:"renewed in the last week",fn:e=>{let t=new Date().getTime(),n=t-(0,i.BL0)(1);return e.isRenewed&&e.startTime>=n}},{id:"renewDate",value:"twoWeeks",label:"renewed in the last two weeks",fn:e=>{let t=new Date().getTime(),n=t-(0,i.BL0)(2);return e.isRenewed&&e.startTime>=n}},{id:"renewDate",value:"month",label:"renewed in the last month",fn:e=>{let t=new Date().getTime(),n=t-(0,i.xLV)(1);return e.isRenewed&&e.startTime>=n}},{id:"renewDate",value:"twoMonths",label:"renewed in the last two months",fn:e=>{let t=new Date().getTime(),n=t-(0,i.xLV)(2);return e.isRenewed&&e.startTime>=n}},{id:"renewDate",value:"year",label:"renewed in the last year",fn:e=>{let t=new Date().getTime(),n=t-(0,i.ivg)(1);return e.isRenewed&&e.startTime>=n}}];function p(e){let{currentPage:t,select:n}=e;return(0,r.jsx)(o.fu,{currentPage:t,commandPage:f,children:h.map(e=>(0,r.jsx)(o.WD,{currentPage:t,commandPage:f,onSelect:()=>{n(e)},children:e.label},e.id+e.value))})}var m=n(86450),v=n(31781);let g={namespace:"contracts/filterAddress",label:"Contracts filter by address"};function y(e){let{select:t,currentPage:n}=e,{openDialog:i}=(0,m.Rh)(),a=(0,v.e)("");return(0,r.jsx)(o.fu,{currentPage:n,commandPage:g,children:(0,r.jsx)(o.WD,{currentPage:n,commandPage:g,onSelect:()=>{t(),i("contractsFilterAddress")},children:a.label})})}function b(e){let{select:t,currentPage:n,parentPage:i,commandPage:a}=e,{openDialog:s}=(0,m.Rh)();return(0,r.jsx)(o.Ul,{currentPage:n,parentPage:i,commandPage:a,onSelect:()=>{t(),s("contractsFilterAddress")},children:g.label})}var x=n(24801);let w={namespace:"contracts/filterPublicKey",label:"Contracts filter by public key"};function j(e){let{select:t,currentPage:n}=e,i=(0,x.V)(""),{openDialog:a}=(0,m.Rh)();return(0,r.jsx)(o.fu,{currentPage:n,commandPage:w,children:(0,r.jsx)(o.WD,{currentPage:n,commandPage:w,onSelect:()=>{t(),a("contractsFilterPublicKey")},children:i.label})})}function E(e){let{select:t,currentPage:n,parentPage:i,commandPage:a}=e,{openDialog:s}=(0,m.Rh)();return(0,r.jsx)(o.Ul,{currentPage:n,parentPage:i,commandPage:a,onSelect:()=>{t(),s("contractsFilterPublicKey")},children:w.label})}function k(e){let{currentPage:t,select:n}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(y,{currentPage:t,select:n}),(0,r.jsx)(j,{currentPage:t,select:n}),(0,r.jsx)(l,{currentPage:t,select:n}),(0,r.jsx)(d,{currentPage:t,select:n}),(0,r.jsx)(p,{currentPage:t,select:n})]})}let S={namespace:"contracts",label:"Contracts"};function _(e){let{currentPage:t,parentPage:n,pushPage:i,select:s}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(b,{currentPage:t,parentPage:n,commandPage:S,select:s}),(0,r.jsx)(E,{currentPage:t,parentPage:n,commandPage:S,select:s}),(0,r.jsx)(o.Ul,{currentPage:t,parentPage:n,commandPage:S,onSelect:()=>{i(u)},children:u.label}),(0,r.jsx)(o.Ul,{currentPage:t,parentPage:n,commandPage:S,onSelect:()=>{i(a)},children:a.label}),(0,r.jsx)(o.Ul,{currentPage:t,parentPage:n,commandPage:S,onSelect:()=>{i(f)},children:f.label})]})}var C=n(13242),O=n(2784);function M(e){let{currentPage:t,parentPage:n,pushPage:i,beforeSelect:o,afterSelect:a}=e,{setFilter:s}=(0,C.G)(),l=(0,O.useCallback)(e=>{o&&o(),e&&s(e),a&&a()},[s,o,a]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(_,{parentPage:n,currentPage:t,pushPage:i,select:l}),(0,r.jsx)(k,{currentPage:t,select:l})]})}},31781:function(e,t,n){"use strict";n.d(t,{e:function(){return u},p:function(){return f}});var r=n(52322),i=n(23305),o=n(13242),a=n(9156),s=n(24511),l=n(86450);function u(e){return{id:"addressContains",value:e,label:"address contains ".concat(e),fn:t=>t.hostIp.includes(e)}}let c={address:""},d=s.Ry().shape({address:s.Z_().required("Required")});function f(e){let{trigger:t,open:n,onOpenChange:s}=e,{closeDialog:f}=(0,l.Rh)(),{setFilter:h}=(0,o.G)(),p=(0,a.TA)({initialValues:c,validationSchema:d,onSubmit:e=>{h(u(e.address)),p.resetForm(),f()}});return(0,r.jsx)(i.VqE,{trigger:t,title:"Filter by address",open:n,onOpenChange:e=>{e||p.resetForm(),s(e)},contentVariants:{className:"w-[400px]"},onSubmit:p.handleSubmit,children:(0,r.jsx)("div",{className:"flex flex-col gap-4",children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(i.cB7,{formik:p,title:"Address",name:"address",placeholder:"Partial match against domain or IP",autoComplete:"off",type:"text",variants:{size:"medium"}}),(0,r.jsx)(i.IKw,{formik:p,size:"medium",children:"Filter"})]})})})}},24801:function(e,t,n){"use strict";n.d(t,{C:function(){return f},V:function(){return u}});var r=n(52322),i=n(23305),o=n(13242),a=n(9156),s=n(24511),l=n(86450);function u(e){return{id:"publicKeyContains",value:e,label:"public key contains ".concat((0,i.$Gg)(e,20)),fn:t=>t.hostKey.includes(e)}}let c={publicKey:""},d=s.Ry().shape({publicKey:s.Z_().required("Required")});function f(e){let{trigger:t,open:n,onOpenChange:s}=e,{closeDialog:f}=(0,l.Rh)(),{setFilter:h}=(0,o.G)(),p=(0,a.TA)({initialValues:c,validationSchema:d,onSubmit:e=>{h(u(e.publicKey)),p.resetForm(),f()}});return(0,r.jsx)(i.VqE,{trigger:t,title:"Filter by public key",open:n,onOpenChange:e=>{e||p.resetForm(),s(e)},contentVariants:{className:"w-[400px]"},onSubmit:p.handleSubmit,children:(0,r.jsx)("div",{className:"flex flex-col gap-4",children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(i.cB7,{formik:p,title:"Public key",name:"publicKey",placeholder:"ed25519:02aabd26e627fd...",autoComplete:"off",type:"text",variants:{size:"medium"}}),(0,r.jsx)(i.IKw,{formik:p,size:"medium",children:"Filter"})]})})})}},4370:function(e,t,n){"use strict";n.d(t,{F:function(){return o}});var r=n(13242),i=n(34658);function o(){var e;let t=(0,i.w)(),{datasetConfirmedCount:n,isLoading:o}=(0,r.G)(),a=t.data&&!o&&n{e.stopPropagation()}},children:[(0,r.jsx)("div",{className:"px-1.5 py-1",children:(0,r.jsxs)(i.xvT,{size:"14",weight:"medium",color:"subtle",children:["Host ",g.slice(0,24),"..."]})}),(0,r.jsx)(i.Juw,{children:"Filters"}),(0,r.jsxs)(i.Xiv,{onSelect:()=>{j(),w({id:"addressContains",value:v,label:"Address contains ".concat((0,i.$Gg)(v,20))}),x.push(s._.hosts.index)},children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(o.q0D,{})}),"Filter hosts by address"]}),(0,r.jsxs)(i.Xiv,{onSelect:()=>{j(),w((0,m.K)(g)),x.push(s._.hosts.index)},children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(o.q0D,{})}),"Filter hosts by public key"]}),(0,r.jsxs)(i.Xiv,{onSelect:()=>{k(),E((0,h.e)(v)),x.push(s._.contracts.index)},children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(o.q0D,{})}),"Filter contracts by host address"]}),(0,r.jsxs)(i.Xiv,{onSelect:()=>{k(),E((0,p.V)(g)),x.push(s._.contracts.index)},children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(o.q0D,{})}),"Filter contracts by host public key"]}),(0,r.jsx)(i.Juw,{children:"Actions"}),(0,r.jsxs)(i.Xiv,{onSelect:()=>M.post({payload:{hostKey:g,hostIP:v,timeout:(0,i.XBW)(30)}}),children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(o._Eq,{})}),"Rescan host"]}),(null===(t=S.data)||void 0===t?void 0:t.find(e=>e===v))?(0,r.jsxs)(i.Xiv,{onSelect:()=>C([],[v]),children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(o.nCM,{})}),"Remove address from blocklist"]}):(0,r.jsxs)(i.Xiv,{onSelect:()=>C([v],[]),children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(o.nCM,{})}),"Add address to blocklist"]}),(null===(n=_.data)||void 0===n?void 0:n.find(e=>e===g))?(0,r.jsxs)(i.Xiv,{onSelect:()=>O([],[g]),children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(o.nCM,{})}),"Remove public key from allowlist"]}):(0,r.jsxs)(i.Xiv,{onSelect:()=>O([g],[]),children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(o.nCM,{})}),"Add public key to allowlist"]})]})}},34444:function(e,t,n){"use strict";n.d(t,{T:function(){return j},N:function(){return w}});var r=n(52322),i=n(2784),o=n(23305),a=n(96206),s=n(6391),l=n.n(s);function u(e){let{host:t,rates:n}=e,r=n?"$".concat(new(l())(t.settings.storageprice).times((0,o.xf5)(1)).times((0,o.S5V)(1)).div(1e24).times((null==n?void 0:n.usd)||1).toFixed(2),"/TB"):"".concat((0,a.Vz)(new(l())(t.settings.storageprice).times((0,o.xf5)(1)).times((0,o.S5V)(1)),{fixed:0}),"/TB"),i="".concat((0,a.vW)(t.activeContracts.reduce((e,t)=>e.plus(t.size),new(l())(0)).toNumber())," utilized"),s="".concat((0,a.vW)(t.settings.remainingstorage)," / ").concat((0,a.vW)(t.settings.totalstorage)," available");return"".concat((0,o.HLH)(t.countryCode)," \xb7 ").concat(r," \xb7 ").concat(i," \xb7 ").concat(s)}var c=function(){let[e,t]=(0,i.useState)(null),[n,r]=(0,i.useState)({width:0,height:0}),o=(0,i.useCallback)(()=>{r({width:(null==e?void 0:e.offsetWidth)||0,height:(null==e?void 0:e.offsetHeight)||0})},[null==e?void 0:e.offsetHeight,null==e?void 0:e.offsetWidth]);return d("resize",o),h(()=>{o()},[null==e?void 0:e.offsetHeight,null==e?void 0:e.offsetWidth]),[t,n]},d=function(e,t,n,r){let o=(0,i.useRef)(t);h(()=>{o.current=t},[t]),(0,i.useEffect)(()=>{var t;let i=null!==(t=null==n?void 0:n.current)&&void 0!==t?t:window;if(!(i&&i.addEventListener))return;let a=e=>o.current(e);return i.addEventListener(e,a,r),()=>{i.removeEventListener(e,a,r)}},[e,n,r])};let f="undefined"!=typeof window?i.useLayoutEffect:i.useEffect;var h=f,p=n(2850),m=n(25237),v=n.n(m);let g=v()(()=>Promise.all([n.e(546),n.e(508),n.e(167),n.e(764),n.e(17)]).then(n.bind(n,45017)),{loadableGenerated:{webpack:()=>[45017]},ssr:!1}),y=(0,i.forwardRef)(function(e,t){return(0,r.jsx)(g,{...e,forwardRef:t})});var b=n(10917),x=n(47025);let w={moveToLocation:(e,t)=>null};function j(e){let{activeHost:t,hosts:n,onMount:o,onHostClick:a,onHostHover:s}=e,d=(0,x.BW)({config:{swr:{revalidateOnFocus:!1}}}),f=(0,i.useRef)(null),h=(0,i.useRef)(w),m=(0,i.useCallback)((e,t)=>{var n;e&&(null===(n=f.current)||void 0===n||n.pointOfView({lat:e[0]-8,lng:e[1],altitude:t||1.5},700))},[]);(0,i.useEffect)(()=>{h.current.moveToLocation=m},[m]),(0,p.Q5)(()=>{var e;if(!f.current)return!1;m((null==t?void 0:t.location)||[48.8323,2.4075],1.5);let n=null===(e=f.current)||void 0===e?void 0:e.scene().children.find(e=>"DirectionalLight"===e.type);return n&&(n.intensity=10),!0}),(0,i.useEffect)(()=>{o&&o(h.current)},[]);let[v,{height:g,width:j}]=c(),E=(0,i.useMemo)(()=>n||[],[n]);return(0,r.jsx)("div",{ref:v,className:"w-full h-full",children:(0,r.jsx)(y,{ref:f,width:j,height:g,backgroundColor:"rgba(0,0,0,0)",globeImageUrl:"/_next/static/media/earth-dark-contrast.bf7081fc.png",bumpImageUrl:"/_next/static/media/earth-topology.e385a70e.png",arcsData:[],atmosphereColor:"rgba(0,0,0,0)",atmosphereAltitude:.16,animateIn:!1,arcLabel:e=>{var t;return u({host:e.dst,rates:null===(t=d.data)||void 0===t?void 0:t.rates.sc})},arcStartLat:e=>+e.src.location[0],arcStartLng:e=>+e.src.location[1],arcEndLat:e=>+e.dst.location[0],arcEndLng:e=>+e.dst.location[1],arcDashLength:.75,arcAltitude:0,arcDashGap:.1,arcDashInitialGap:()=>Math.random(),arcDashAnimateTime:5e3,arcColor:e=>t&&(e.dst.publicKey===t.publicKey||e.src.publicKey===t.publicKey)?["rgba(187, 229, 201, 0.25)","rgba(187, 229, 201, 0.25)"]:["rgba(187, 229, 201, 0.10)","rgba(187, 229, 201, 0.10)"],arcsTransitionDuration:0,pointsData:E,pointLat:e=>e.location[0],pointLng:e=>e.location[1],pointLabel:e=>{var t;return u({host:e,rates:null===(t=d.data)||void 0===t?void 0:t.rates.sc})},pointAltitude:e=>(t&&e.publicKey===(null==t?void 0:t.publicKey)||e.activeContractsCount.gt(0),.1),pointsTransitionDuration:0,pointColor:e=>{let{colorHex:n}=(0,b.Kg)(e);return t&&e.publicKey!==(null==t?void 0:t.publicKey)?function(e,t){let n=parseInt(e.slice(1,3),16),r=parseInt(e.slice(3,5),16),i=parseInt(e.slice(5,7),16);return"rgba(".concat(n,", ").concat(r,", ").concat(i,", ").concat(.2,")")}(n,0):n},pointRadius:e=>(e.activeContractsCount.gt(0)&&e.activeContracts.reduce((e,t)=>e.plus(t.size),new(l())(0)).div(1e12).toNumber(),Math.max(e.settings.remainingstorage/1e13/3,.1)),onPointHover:e=>{e&&(null==s||s(e.publicKey,e.location))},onPointClick:e=>{e&&(null==a||a(e.publicKey,e.location))},pointsMerge:!1})})}},18006:function(e,t,n){"use strict";n.d(t,{L:function(){return M}});var r=n(52322),i=n(4941),o=n(86450),a=n(2320);let s={namespace:"hosts/filterAddress",label:"Hosts filter by address"};function l(e){let{select:t,currentPage:n}=e,{openDialog:l}=(0,o.Rh)(),u=(0,a.q)("");return(0,r.jsx)(i.fu,{currentPage:n,commandPage:s,children:(0,r.jsx)(i.WD,{currentPage:n,commandPage:s,onSelect:()=>{t(),l("hostsFilterAddress")},children:u.label})})}function u(e){let{select:t,currentPage:n,parentPage:a,commandPage:l}=e,{openDialog:u}=(0,o.Rh)();return(0,r.jsx)(i.Ul,{currentPage:n,parentPage:a,commandPage:l,onSelect:()=>{t(),u("hostsFilterAddress")},children:s.label})}let c={namespace:"hosts/filterAllowBlock",label:"Hosts filter by allow/block status"},d=[{id:"filterMode",value:"allowed",label:"allowed"},{id:"filterMode",value:"blocked",label:"blocked"}];function f(e){let{select:t,currentPage:n}=e;return(0,r.jsx)(i.fu,{currentPage:n,commandPage:c,children:d.map(e=>(0,r.jsx)(i.WD,{currentPage:n,commandPage:c,onSelect:()=>{t(e)},children:e.label},e.id+e.value))})}let h={namespace:"hosts/filterActiveContracts",label:"Hosts filter by contracts"},p={id:"hasActiveContracts",bool:!0,label:"has active contracts"};function m(e){let{select:t,currentPage:n}=e;return(0,r.jsx)(i.fu,{currentPage:n,commandPage:h,children:(0,r.jsx)(i.WD,{currentPage:n,commandPage:h,onSelect:()=>{t(p)},children:p.label})})}let v={namespace:"hosts/filterUsable",label:"Hosts filter by usable"},g=[{id:"usabilityMode",value:"usable",label:"usable"},{id:"usabilityMode",value:"unusable",label:"unusable"}];function y(e){let{select:t,currentPage:n}=e;return(0,r.jsx)(i.fu,{currentPage:n,commandPage:v,children:g.map(e=>(0,r.jsx)(i.WD,{currentPage:n,commandPage:v,onSelect:()=>{t(e)},children:e.label},e.id+e.value))})}var b=n(91641),x=n(54155);let w={namespace:"hosts/filterPublicKey",label:"Hosts filter by public key"};function j(e){let{select:t,currentPage:n}=e,{openDialog:a}=(0,o.Rh)(),s=(0,x.K)("");return(0,r.jsx)(i.fu,{currentPage:n,commandPage:w,children:(0,r.jsx)(i.WD,{currentPage:n,commandPage:w,onSelect:()=>{t(),a("hostsFilterPublicKey")},children:s.label})})}function E(e){let{select:t,currentPage:n,parentPage:a,commandPage:s}=e,{openDialog:l}=(0,o.Rh)();return(0,r.jsx)(i.Ul,{currentPage:n,parentPage:a,commandPage:s,onSelect:()=>{t(),l("hostsFilterPublicKey")},children:w.label})}function k(e){let{currentPage:t,select:n}=e,{autopilot:i}=(0,b.q)();return(0,r.jsxs)(r.Fragment,{children:["on"===i.status&&(0,r.jsx)(y,{currentPage:t,select:n}),(0,r.jsx)(m,{currentPage:t,select:n}),(0,r.jsx)(l,{currentPage:t,select:n}),(0,r.jsx)(j,{currentPage:t,select:n}),(0,r.jsx)(f,{currentPage:t,select:n})]})}let S={namespace:"hosts",label:"Hosts"};function _(e){let{currentPage:t,parentPage:n,pushPage:o,select:a}=e,{autopilot:s}=(0,b.q)();return(0,r.jsxs)(r.Fragment,{children:["on"===s.status&&(0,r.jsx)(i.Ul,{currentPage:t,parentPage:n,commandPage:S,onSelect:()=>{o(v)},children:v.label}),(0,r.jsx)(E,{currentPage:t,parentPage:n,commandPage:S,select:a}),(0,r.jsx)(u,{currentPage:t,parentPage:n,commandPage:S,select:a}),(0,r.jsx)(i.Ul,{currentPage:t,parentPage:n,commandPage:S,onSelect:()=>{o(h)},children:h.label}),(0,r.jsx)(i.Ul,{currentPage:t,parentPage:n,commandPage:S,onSelect:()=>{o(c)},children:c.label})]})}var C=n(19513),O=n(2784);function M(e){let{currentPage:t,parentPage:n,pushPage:i,beforeSelect:o,afterSelect:a}=e,{setFilter:s}=(0,C.l)(),l=(0,O.useCallback)(e=>{o&&o(),e&&s(e),a&&a()},[s,o,a]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(_,{parentPage:n,currentPage:t,pushPage:i,select:l}),(0,r.jsx)(k,{currentPage:t,pushPage:i,select:l})]})}},2320:function(e,t,n){"use strict";n.d(t,{g:function(){return f},q:function(){return u}});var r=n(52322),i=n(23305),o=n(19513),a=n(9156),s=n(24511),l=n(86450);function u(e){return{id:"addressContains",value:e,label:"address contains ".concat(e)}}let c={address:""},d=s.Ry().shape({address:s.Z_().required("Required")});function f(e){let{trigger:t,open:n,onOpenChange:s}=e,{closeDialog:f}=(0,l.Rh)(),{setFilter:h}=(0,o.l)(),p=(0,a.TA)({initialValues:c,validationSchema:d,onSubmit:e=>{h(u(e.address)),p.resetForm(),f()}});return(0,r.jsx)(i.VqE,{trigger:t,title:"Filter by address",open:n,onOpenChange:e=>{e||p.resetForm(),s(e)},contentVariants:{className:"w-[400px]"},onSubmit:p.handleSubmit,children:(0,r.jsx)("div",{className:"flex flex-col gap-4",children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(i.cB7,{formik:p,title:"Address",name:"address",placeholder:"Partial match against domain or IP",autoComplete:"off",type:"text",variants:{size:"medium"}}),(0,r.jsx)(i.IKw,{formik:p,size:"medium",children:"Filter"})]})})})}},54155:function(e,t,n){"use strict";n.d(t,{K:function(){return u},a:function(){return f}});var r=n(52322),i=n(23305),o=n(19513),a=n(9156),s=n(24511),l=n(86450);function u(e){return{id:"publicKeyEquals",value:e,label:"public key is ".concat((0,i.$Gg)(e,20))}}let c={publicKey:""},d=s.Ry().shape({publicKey:s.Z_().required("Required")});function f(e){let{trigger:t,open:n,onOpenChange:s}=e,{closeDialog:f}=(0,l.Rh)(),{setFilter:h}=(0,o.l)(),p=(0,a.TA)({initialValues:c,validationSchema:d,onSubmit:e=>{h(u(e.publicKey)),p.resetForm(),f()}});return(0,r.jsx)(i.VqE,{trigger:t,title:"Filter by public key",open:n,onOpenChange:e=>{e||p.resetForm(),s(e)},contentVariants:{className:"w-[400px]"},onSubmit:p.handleSubmit,children:(0,r.jsx)("div",{className:"flex flex-col gap-4",children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(i.cB7,{formik:p,title:"Public key",name:"publicKey",placeholder:"ed25519:b050c0c6...",autoComplete:"off",type:"text",variants:{size:"medium"}}),(0,r.jsx)(i.IKw,{formik:p,size:"medium",children:"Filter"})]})})})}},71930:function(e,t,n){"use strict";n.d(t,{_:function(){return i},h:function(){return o}});var r=n(9969);let i={home:"/",files:{index:"/files"},config:{index:"/config",storage:"/config#storage",pricing:"/config#pricing",hosts:"/config#hosts",wallet:"/config#wallet",contracts:"/config#contracts",uploads:"/config#uploads",redundancy:"/config#redundancy"},contracts:{index:"/contracts"},hosts:{index:"/hosts"},wallet:{view:"/wallet"},node:{index:"/node"},login:"/login"},o=r.HI},91641:function(e,t,n){"use strict";n.d(t,{w:function(){return u},q:function(){return l}});var r=n(52322),i=n(2784),o=n(23305),a=n(9969);let s=(0,i.createContext)({}),l=()=>(0,i.useContext)(s);function u(e){let{children:t}=e,n=function(){let e=function(){let e=(0,a.YX)({config:{swr:{dedupingInterval:(0,o.XBW)(5),revalidateOnFocus:!1,refreshInterval:e=>e?(0,o.XBW)(60):(0,o.XBW)(1)}}}),[t,n]=(0,i.useState)("init");return(0,i.useEffect)(()=>{if(e.isLoading)n("init");else if(e.isValidating)return;else if(e.error)n("off");else if(e.data){let t="object"==typeof e.data;n(t?"on":"off")}},[e]),{status:t,state:e}}();return{autopilot:e}}();return(0,r.jsx)(s.Provider,{value:n,children:t})}},17286:function(e,t,n){"use strict";n.d(t,{iV:function(){return V},ZR:function(){return z}});var r=n(52322),i=n(2784),o=n(23305),a=n(6391),s=n.n(a),l=n(9969),u=n(96206);let c={autopilotContractSet:"",amountHosts:void 0,allowanceMonth:void 0,periodWeeks:void 0,renewWindowWeeks:void 0,downloadTBMonth:void 0,uploadTBMonth:void 0,storageTB:void 0,allowRedundantIPs:!1,maxDowntimeHours:void 0,defragThreshold:void 0},d={defaultContractSet:""},f={uploadPackingEnabled:!0},h={includeRedundancyMaxStoragePrice:!0,includeRedundancyMaxUploadPrice:!0},p={maxRpcPriceMillion:void 0,maxStoragePriceTBMonth:void 0,maxContractPrice:void 0,maxDownloadPriceTB:void 0,maxUploadPriceTB:void 0,minMaxCollateral:void 0,hostBlockHeightLeeway:void 0,minPriceTableValidityMinutes:void 0,minAccountExpiryDays:void 0,minMaxEphemeralAccountBalance:void 0},m={minShards:void 0,totalShards:void 0},v={...c,...d,...f,...p,...m,...h},g={...c,downloadTBMonth:new(s())(1),uploadTBMonth:new(s())(1),periodWeeks:new(s())(6),renewWindowWeeks:new(s())(2),amountHosts:new(s())(50),autopilotContractSet:"autopilot",allowRedundantIPs:!1,maxDowntimeHours:new(s())(1440),defragThreshold:new(s())(1e3)},y={...d,defaultContractSet:"autopilot"};({...f});let b={...p};function x(e){let{isAutopilotEnabled:t,showAdvanced:n,redundancyMultiplier:i,includeRedundancyMaxStoragePrice:a,includeRedundancyMaxUploadPrice:l,storageAverage:u,uploadAverage:c,downloadAverage:d,contractAverage:f}=e;return{storageTB:{type:"number",category:"storage",title:"Expected storage",description:(0,r.jsx)(r.Fragment,{children:"The amount of storage you would like to rent in TB."}),units:"TB",hidden:!t,validation:t?{required:"required"}:{}},uploadTBMonth:{type:"number",category:"storage",title:"Expected upload",description:(0,r.jsx)(r.Fragment,{children:"The amount of upload bandwidth you plan to use each month in TB."}),units:"TB/month",hidden:!t||!n,validation:t&&n?{required:"required"}:{}},downloadTBMonth:{type:"number",category:"storage",title:"Expected download",description:(0,r.jsx)(r.Fragment,{children:"The amount of download bandwidth you plan to use each month in TB."}),units:"TB/month",hidden:!t||!n,validation:t&&n?{required:"required"}:{}},allowanceMonth:{type:"siacoin",category:"storage",title:"Allowance",description:(0,r.jsx)(r.Fragment,{children:"The amount of Siacoin you would like to spend per month."}),units:"SC/month",decimalsLimitSc:6,hidden:!t||!n,validation:t&&n?{required:"required"}:{}},periodWeeks:{type:"number",category:"storage",title:"Period",description:(0,r.jsx)(r.Fragment,{children:"The length of the storage contracts."}),units:"weeks",suggestion:g.periodWeeks,suggestionTip:"Typically ".concat(g.periodWeeks," weeks."),hidden:!t||!n,validation:t&&n?{required:"required"}:{}},renewWindowWeeks:{type:"number",category:"storage",title:"Renew window",description:(0,r.jsx)(r.Fragment,{children:"The number of weeks prior to contract expiration that Sia will attempt to renew your contracts."}),units:"weeks",decimalsLimit:6,suggestion:g.renewWindowWeeks,suggestionTip:"Typically ".concat(g.renewWindowWeeks," weeks."),hidden:!t||!n,validation:t&&n?{required:"required"}:{}},amountHosts:{type:"number",category:"storage",title:"Hosts",description:(0,r.jsx)(r.Fragment,{children:"The number of hosts to create contracts with."}),units:"hosts",decimalsLimit:0,suggestion:g.amountHosts,suggestionTip:"Typically ".concat(g.amountHosts," hosts."),hidden:!t||!n,validation:t&&n?{required:"required"}:{}},autopilotContractSet:{type:"text",category:"storage",title:"Contract set",description:(0,r.jsx)(r.Fragment,{children:"The contract set that autopilot should use. This should typically be the same as the default contract set."}),placeholder:g.autopilotContractSet,suggestion:g.autopilotContractSet,suggestionTip:(0,r.jsxs)(r.Fragment,{children:["The default contract set is"," ",(0,r.jsx)(o.EKh,{children:g.autopilotContractSet}),"."]}),hidden:!t||!n,validation:t&&n?{required:"required"}:{}},allowRedundantIPs:{type:"boolean",category:"hosts",title:"Redundant IPs",description:(0,r.jsx)(r.Fragment,{children:"Whether or not to allow forming contracts with multiple hosts in the same IP subnet. The subnets used are /16 for IPv4, and /64 for IPv6."}),suggestion:g.allowRedundantIPs,suggestionTip:"Defaults to ".concat(g.allowRedundantIPs?"on":"off","."),hidden:!t||!n,validation:{}},maxDowntimeHours:{type:"number",category:"hosts",title:"Max downtime",description:(0,r.jsx)(r.Fragment,{children:"The maximum amount of host downtime that autopilot will tolerate in hours."}),units:"hours",suggestion:g.maxDowntimeHours,suggestionTip:"Defaults to ".concat(g.maxDowntimeHours.toNumber().toLocaleString()," which is ").concat((0,o.y70)(new(s())((0,o.XAn)(g.maxDowntimeHours.toNumber())),1)," days."),hidden:!t||!n,validation:t&&n?{required:"required"}:{}},defragThreshold:{type:"number",category:"wallet",title:"Defrag threshold",description:(0,r.jsx)(r.Fragment,{children:"The threshold after which autopilot will defrag wallet outputs."}),units:"outputs",suggestion:g.defragThreshold,suggestionTip:"Defaults to 1,000.",hidden:!t||!n,validation:t&&n?{required:"required"}:{}},defaultContractSet:{category:"contractset",type:"text",title:"Default contract set",placeholder:y.defaultContractSet,suggestion:y.defaultContractSet,suggestionTip:(0,r.jsx)(r.Fragment,{children:"Autopilot users will typically want to keep this the same as the autopilot contract set."}),description:(0,r.jsx)(r.Fragment,{children:"The default contract set is where data is uploaded to by default."}),hidden:!n,validation:n?{required:"required"}:{}},uploadPackingEnabled:{category:"uploadpacking",type:"boolean",title:"Upload packing",description:(0,r.jsx)(r.Fragment,{children:"Data on the Sia network is stored in 4MiB sectors. With the default 10 of 30 redundancy scheme, uploaded files are split into 40MiB chunks and encoded into 120MiB slabs. This means that storage is wasted on padding and files smaller than 40MiB still use 120MiB of space. The redundancy scheme can be configured, but unless all files are exactly 4MiB * the redundancy's minimum shards, there will always be wasted storage. Upload packing avoids this waste by buffering files and packing them together before they are uploaded to the network. This trades some performance for storage efficiency. It is also important to note that because buffered files are temporarily stored on disk they must be considered when backing up your renterd data."}),hidden:!n,validation:{}},maxStoragePriceTBMonth:{category:"gouging",type:"siacoin",title:"Max storage price",description:(0,r.jsx)(r.Fragment,{children:"The max allowed price to store 1 TB per month."}),units:"SC/TB/month",average:u,averageTip:w(a,i),after:function(e){let{form:t,fields:n}=e;return(0,r.jsx)(o.ua7,{align:"start",side:"bottom",content:j(a,i),children:(0,r.jsx)("div",{children:(0,r.jsx)(o.QBj,{size:"small",form:t,fields:n,name:"includeRedundancyMaxStoragePrice",group:!1,children:(0,r.jsxs)(o.xvT,{size:"12",weight:"medium",children:["Including ",i.toFixed(1),"x redundancy"]})})})})},decimalsLimitSc:6,validation:{required:"required"}},maxUploadPriceTB:{category:"gouging",type:"siacoin",title:"Max upload price",description:(0,r.jsx)(r.Fragment,{children:"The max allowed price to upload 1 TB."}),units:"SC/TB/month",average:c,averageTip:w(l,i),after:function(e){let{form:t,fields:n}=e;return(0,r.jsx)(o.ua7,{align:"start",side:"bottom",content:j(l,i),children:(0,r.jsx)("div",{children:(0,r.jsx)(o.QBj,{size:"small",form:t,fields:n,name:"includeRedundancyMaxUploadPrice",group:!1,children:(0,r.jsxs)(o.xvT,{size:"12",weight:"medium",children:["Including ",i.toFixed(1),"x redundancy"]})})})})},decimalsLimitSc:6,hidden:!n,validation:n?{required:"required"}:{}},maxDownloadPriceTB:{category:"gouging",type:"siacoin",title:"Max download price",description:(0,r.jsx)(r.Fragment,{children:"The max allowed price to download 1 TB."}),units:"SC/TB/month",average:d,averageTip:"Averages provided by Sia Central.",decimalsLimitSc:6,hidden:!n,validation:n?{required:"required"}:{}},maxContractPrice:{category:"gouging",type:"siacoin",title:"Max contract price",description:(0,r.jsx)(r.Fragment,{children:"The max allowed price to form a contract."}),average:f,decimalsLimitSc:6,tipsDecimalsLimitSc:3,hidden:!n,validation:n?{required:"required"}:{}},maxRpcPriceMillion:{category:"gouging",type:"siacoin",title:"Max RPC price",description:(0,r.jsx)(r.Fragment,{children:"The max allowed base price for RPCs in siacoins per million calls."}),units:"SC/million",decimalsLimitSc:6,hidden:!n,validation:n?{required:"required"}:{}},minMaxCollateral:{category:"gouging",type:"siacoin",title:"Min max collateral",description:(0,r.jsx)(r.Fragment,{children:"The min value for max collateral in the host's price settings."}),decimalsLimitSc:6,hidden:!n,validation:n?{required:"required"}:{}},hostBlockHeightLeeway:{category:"gouging",type:"number",title:"Block height leeway",description:(0,r.jsx)(r.Fragment,{children:"The amount of blocks of leeway given to the host block height in the host's price table."}),units:"blocks",decimalsLimit:0,suggestion:b.hostBlockHeightLeeway,suggestionTip:"The recommended value is 6 blocks.",hidden:!n,validation:n?{required:"required",validate:{min:e=>new(s())(e).gte(3)||"must be at least 3 blocks"}}:{}},minPriceTableValidityMinutes:{category:"gouging",type:"number",title:"Min price table validity",units:"minutes",description:(0,r.jsx)(r.Fragment,{children:"The min accepted value for `Validity` in the host's price settings."}),hidden:!n,validation:n?{required:"required",validate:{min:e=>new(s())(e).gte((0,o.GXN)(10))||"must be at least 10 seconds"}}:{}},minAccountExpiryDays:{category:"gouging",type:"number",title:"Min account expiry",units:"days",description:(0,r.jsx)(r.Fragment,{children:"The min accepted value for `AccountExpiry` in the host's price settings."}),hidden:!n,validation:n?{required:"required",validate:{min:e=>new(s())(e).gte((0,o.XAn)(1))||"must be at least 1 hour"}}:{}},minMaxEphemeralAccountBalance:{category:"gouging",type:"siacoin",title:"Min max ephemeral account balance",description:(0,r.jsx)(r.Fragment,{children:"The min accepted value for `MaxEphemeralAccountBalance` in the host's price settings."}),decimalsLimitSc:6,hidden:!n,validation:n?{required:"required",validate:{min:e=>new(s())(e).gte(1)||"must be at least 1 SC"}}:{}},minShards:{type:"number",category:"redundancy",title:"Min shards",description:(0,r.jsx)(r.Fragment,{children:"The min amount of shards needed to reconstruct a slab."}),units:"shards",hidden:!n,validation:n?{required:"required",validate:{min:e=>new(s())(e).gt(0)||"must be greater than 0"}}:{},trigger:["totalShards"]},totalShards:{type:"number",category:"redundancy",title:"Total shards",description:(0,r.jsx)(r.Fragment,{children:"The total amount of shards for each slab."}),units:"shards",hidden:!n,validation:n?{required:"required",validate:{gteMinShards:(e,t)=>new(s())(e).gte(t.minShards)||"must be at least equal to min shards",max:e=>new(s())(e).lt(256)||"must be less than 256"}}:{}},includeRedundancyMaxStoragePrice:{type:"boolean",title:"Include redundancy",validation:{}},includeRedundancyMaxUploadPrice:{type:"boolean",title:"Include redundancy",validation:{}}}}function w(e,t){return e?"The average price is adjusted for ".concat(t.toFixed(1),"x redundancy. Averages provided by Sia Central."):"The average price is not adjusted for redundancy. Averages provided by Sia Central."}function j(e,t){return e?(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsxs)(o.xvT,{color:"subtle",children:["Specified max price includes the cost of"," ",t.toFixed(1),"x redundancy."]}),(0,r.jsxs)(o.xvT,{color:"subtle",children:["Redundancy is calculated from the ratio of data shards:"," ",(0,r.jsx)(o.EKh,{children:"min shards / total shards"}),"."]})]}):"Specified max price does not include redundancy."}({...m});let E=e=>Object.fromEntries(Object.entries(e).filter(e=>{let[t,n]=e;return void 0!==n&&""!==n}));function k(e,t){let n=e.defaultContractSet||(null==t?void 0:t.default)||y.defaultContractSet;return{...t,default:n}}function S(e,t){let n=new(s())(1),r=e&&t&&!e.isZero()&&!t.isZero()&&t.gte(e);return r&&(n=t.div(e)),n}function _(e,t,n){let r=S(e,t);return n?r:new(s())(1)}function C(e,t){let n=(0,o.mvJ)(t.toNumber());return e.times(n).div((0,o.S5V)(1))}function O(e,t){let n=e.div(t);return n.times((0,o.S5V)(1))}var M=n(63955),T=n(92762),A=n(80489),P=n(2850);let N="v0-config-display-options";var R=n(34658),D=n(47025),L=n(91641);let F=(0,i.createContext)({}),z=()=>(0,i.useContext)(F);function V(e){let{children:t}=e,n=function(){var e,t,n;let a=(0,L.q)(),f="on"===a.autopilot.status,p=(0,l.e$)({disabled:!f,standalone:"configFormAutopilot",config:{swr:{errorRetryCount:0,refreshInterval:(0,o.sWj)(1)}}}),m=(0,A.a)({standalone:"configFormContractSet",config:{swr:{errorRetryCount:0,refreshInterval:(0,o.sWj)(1)}}}),y=(e={standalone:"configFormConfigApp",config:{swr:{errorRetryCount:0,refreshInterval:(0,o.sWj)(1)}}},(0,l.yu)({...e,params:{key:N}})),b=(t={standalone:"configFormGouging",config:{swr:{refreshInterval:(0,o.sWj)(1)}}},(0,l.yu)({...t,params:{key:"gouging"}})),w=(0,R.w)({standalone:"configFormRedundancy",config:{swr:{refreshInterval:(0,o.sWj)(1)}}}),j=(n={standalone:"configFormUploadPacking",config:{swr:{refreshInterval:(0,o.sWj)(1)}}},(0,l.yu)({...n,params:{key:"uploadpacking"}})),F=(0,l.KJ)(),z=(0,D.BF)({config:{swr:{revalidateOnFocus:!1}}}),[V,I]=(0,T.Z)("v0/config/showAdvanced",{defaultValue:!1}),{shouldSyncDefaultContractSet:Z,setShouldSyncDefaultContractSet:B,syncDefaultContractSet:H}=function(){let[e,t]=(0,T.Z)("v0/autopilot/syncDefaultContractSet",{defaultValue:!0}),n=(0,A.a)({config:{swr:{errorRetryCount:0}}}),a=(0,l.KJ)(),s=(0,i.useCallback)(async t=>{let i=n.data||{default:""};try{e&&t!==i.default&&(await a.put({params:{key:"contractset"},payload:k({defaultContractSet:t},n.data)}),n.mutate(),(0,o.OPV)((0,r.jsxs)(o.xvT,{children:["Default contract set has been updated to:"," ",(0,r.jsx)(o.EKh,{children:t}),"."]})))}catch(e){(0,o.OHV)(e.message),console.log(e)}},[n.data,a,e]);return{shouldSyncDefaultContractSet:e,setShouldSyncDefaultContractSet:t,syncDefaultContractSet:s}}(),U=(0,l.oe)(),W=(0,M.cI)({mode:"all",defaultValues:v}),q=(0,i.useCallback)((e,t,n,r,i,a)=>{let l=function(e,t,n,r,i,a){let l=a?{includeRedundancyMaxStoragePrice:a.includeRedundancyMaxStoragePrice,includeRedundancyMaxUploadPrice:a.includeRedundancyMaxUploadPrice}:h,f={minShards:new(s())(i.minShards),totalShards:new(s())(i.totalShards)};return{...function(e){if(!e)return c;let t=e.contracts.set,n=(0,u.ll)(O(new(s())(e.contracts.allowance),e.contracts.period),6),r=new(s())(e.contracts.amount),i=new(s())((0,o.x5w)(e.contracts.period)),a=new(s())((0,o.x5w)(e.contracts.renewWindow)),l=new(s())((0,o.y70)(O((0,o.JWi)(e.contracts.download),e.contracts.period),2)),d=new(s())((0,o.y70)(O((0,o.JWi)(e.contracts.upload),e.contracts.period),2)),f=(0,o.JWi)(new(s())(e.contracts.storage));return{autopilotContractSet:t,allowanceMonth:n,amountHosts:r,periodWeeks:i,renewWindowWeeks:a,downloadTBMonth:l,uploadTBMonth:d,storageTB:f,allowRedundantIPs:e.hosts.allowRedundantIPs,maxDowntimeHours:new(s())(e.hosts.maxDowntimeHours),defragThreshold:new(s())(e.wallet.defragThreshold)}}(e),...t?{defaultContractSet:t.default}:d,uploadPackingEnabled:n.enabled,maxStoragePriceTBMonth:(0,u.ll)(new(s())(r.maxStoragePrice).times((0,o.S5V)(1)).times((0,o.xf5)(1)).times(_(f.minShards,f.totalShards,l.includeRedundancyMaxStoragePrice)),6),maxUploadPriceTB:(0,u.ll)(new(s())(r.maxUploadPrice).times(_(f.minShards,f.totalShards,l.includeRedundancyMaxUploadPrice)),6),maxDownloadPriceTB:(0,u.ll)(r.maxDownloadPrice,6),maxContractPrice:(0,u.ll)(r.maxContractPrice,6),maxRpcPriceMillion:(0,u.ll)(r.maxRPCPrice,6).times(1e6),minMaxCollateral:(0,u.ll)(r.minMaxCollateral,6),hostBlockHeightLeeway:new(s())(r.hostBlockHeightLeeway),minPriceTableValidityMinutes:new(s())((0,o.AEA)(r.minPriceTableValidity)),minAccountExpiryDays:new(s())((0,o.okB)(r.minAccountExpiry)),minMaxEphemeralAccountBalance:(0,u.ll)(r.minMaxEphemeralAccountBalance,6),...f,...l}}(e,t,n,r,i,a);return W.reset(l),l},[W]),$=(0,i.useMemo)(()=>[p.data,p.error,m.data,m.error,j.data,b.data,w.data,y.data,y.error],[p.data,p.error,m.data,m.error,j.data,b.data,w.data,y.data,y.error]),K=(0,i.useCallback)(()=>(!f||p.data||p.error)&&b.data&&w.data&&j.data&&(m.data||m.error)&&(y.data||y.error)?q(p.data,m.data,j.data,b.data,w.data,y.data):null,[f,q,p.data,p.error,m.data,m.error,j.data,b.data,w.data,y.data,y.error]),[Y,G]=(0,i.useState)(!1);(0,i.useEffect)(()=>{if("init"!==a.autopilot.status&&!Y){let e=K();e&&G(!0)}},[Y,a.autopilot.status,K]);let X=(0,i.useCallback)(async()=>{let e=f?await p.mutate():void 0,t=await m.mutate(),n=await b.mutate(),r=await w.mutate(),i=await j.mutate(),a=await y.mutate();n&&r?q(e,t,i,n,r,a):(0,o.OHV)("Error fetching settings.")},[f,p,m,b,j,w,y,q]),J=W.watch("maxStoragePriceTBMonth"),Q=W.watch("maxDownloadPriceTB"),ee=W.watch("maxUploadPriceTB"),et=W.watch("storageTB"),en=W.watch("downloadTBMonth"),er=W.watch("uploadTBMonth"),ei=W.watch("minShards"),eo=W.watch("totalShards"),ea=W.watch("includeRedundancyMaxStoragePrice"),es=W.watch("includeRedundancyMaxUploadPrice"),el=(0,i.useMemo)(()=>S(ei,eo),[ei,eo]),eu=(0,i.useMemo)(()=>z.data?x({isAutopilotEnabled:f,showAdvanced:V,redundancyMultiplier:el,includeRedundancyMaxStoragePrice:ea,includeRedundancyMaxUploadPrice:es,storageAverage:(0,u.ll)(z.data.settings.storage_price).times((0,o.S5V)(1)).times((0,o.xf5)(1)).times(_(ei,eo,ea)),uploadAverage:(0,u.ll)(z.data.settings.upload_price).times((0,o.xf5)(1)).times(_(ei,eo,es)),downloadAverage:(0,u.ll)(z.data.settings.download_price).times((0,o.xf5)(1)),contractAverage:(0,u.ll)(z.data.settings.contract_price)}):x({isAutopilotEnabled:f,showAdvanced:V,redundancyMultiplier:el,includeRedundancyMaxStoragePrice:ea,includeRedundancyMaxUploadPrice:es}),[f,V,z.data,el,ei,eo,ea,es]),ec=(0,i.useMemo)(()=>!!f&&(null==J?void 0:J.gt(0))&&(null==et?void 0:et.gt(0))&&(null==Q?void 0:Q.gt(0))&&(null==ee?void 0:ee.gt(0)),[f,J,et,Q,ee]),ed=(0,i.useMemo)(()=>{if(!ec)return new(s())(0);let e=(null==en?void 0:en.gt(0))?en:1,t=(null==er?void 0:er.gt(0))?er:1,n=ea?J.times(et):J.times(el).times(et),r=Q.times(e),i=es?ee.times(t):ee.times(el).times(t),o=n.plus(r).plus(i);return o},[ec,ea,es,el,J,et,Q,en,ee,er]),ef=(0,i.useMemo)(()=>{if(!ec)return new(s())(0);let e=ed.div(et);return e},[ec,ed,et]),eh=(0,P.Tu)(),ep=(0,i.useCallback)(async e=>{if(b.data&&w.data)try{let t={};f&&!V&&(t.allowanceMonth=ed);let n={...e,...t},r=f&&!p.data,i=f?await U.put({payload:function(e,t){let n={...g,...E(e)};return{...t,contracts:{...null==t?void 0:t.contracts,set:n.autopilotContractSet,amount:Math.round(n.amountHosts.toNumber()),allowance:(0,u.qN)(C(n.allowanceMonth,n.periodWeeks)).toString(),period:Math.round((0,o.mvJ)(n.periodWeeks.toNumber())),renewWindow:Math.round((0,o.mvJ)(n.renewWindowWeeks.toNumber())),download:Number(C((0,o.xf5)(n.downloadTBMonth),n.periodWeeks).toFixed(0)),upload:Number(C((0,o.xf5)(n.uploadTBMonth),n.periodWeeks).toFixed(0)),storage:(0,o.xf5)(n.storageTB).toNumber()},hosts:{...null==t?void 0:t.hosts,maxDowntimeHours:n.maxDowntimeHours.toNumber(),allowRedundantIPs:n.allowRedundantIPs,scoreOverrides:(null==t?void 0:t.hosts.scoreOverrides)||null},wallet:{...null==t?void 0:t.wallet,defragThreshold:n.defragThreshold.toNumber()}}}(n,p.data)}):void 0,[a,s,c,d,h]=await Promise.all([F.put({params:{key:"contractset"},payload:k(n,m.data)}),F.put({params:{key:"uploadpacking"},payload:{...j.data,enabled:n.uploadPackingEnabled}}),F.put({params:{key:"gouging"},payload:{...b.data,maxRPCPrice:(0,u.qN)(n.maxRpcPriceMillion.div(1e6)).toString(),maxStoragePrice:(0,u.qN)(n.maxStoragePriceTBMonth.div((0,o.S5V)(1)).div((0,o.xf5)(1)).div(_(n.minShards,n.totalShards,n.includeRedundancyMaxStoragePrice))).toString(),maxUploadPrice:(0,u.qN)(n.maxUploadPriceTB.div(_(n.minShards,n.totalShards,n.includeRedundancyMaxUploadPrice))).toString(),maxDownloadPrice:(0,u.qN)(n.maxDownloadPriceTB).toString(),maxContractPrice:(0,u.qN)(n.maxContractPrice).toString(),minMaxCollateral:(0,u.qN)(n.minMaxCollateral).toString(),hostBlockHeightLeeway:Math.round(n.hostBlockHeightLeeway.toNumber()),minPriceTableValidity:Math.round((0,o.ort)(n.minPriceTableValidityMinutes.toNumber())),minAccountExpiry:Math.round((0,o.k9c)(n.minAccountExpiryDays.toNumber())),minMaxEphemeralAccountBalance:(0,u.qN)(n.minMaxEphemeralAccountBalance).toString()}}),F.put({params:{key:"redundancy"},payload:{...w.data,minShards:n.minShards.toNumber(),totalShards:n.totalShards.toNumber()}}),F.put({params:{key:N},payload:{...y.data,includeRedundancyMaxStoragePrice:n.includeRedundancyMaxStoragePrice,includeRedundancyMaxUploadPrice:n.includeRedundancyMaxUploadPrice}})]);if(null==i?void 0:i.error)throw Error(i.error);if(a.error)throw Error(a.error);if(s.error)throw Error(s.error);if(c.error)throw Error(c.error);if(d.error)throw Error(d.error);if(h.error)throw Error(h.error);if((0,o.OPV)("Configuration has been saved."),f&&H(n.autopilotContractSet),r){let e=async()=>{await (0,P.gw)(5e3),eh(e=>e.startsWith(l.pz)),await (0,P.gw)(5e3),eh(e=>e.startsWith(l.pz))};e()}await X()}catch(e){(0,o.OHV)(e.message),console.log(e)}},[ed,V,f,p,U,X,H,eh,F,m,j,w,b,y]),em=(0,o.WsO)(eu),ev=(0,i.useMemo)(()=>W.handleSubmit(ep,em),[W,ep,em]),eg=(0,i.useCallback)(()=>{let e=W.getValues(),t=K();if(t)for(let[n,r]of(W.reset(t),Object.entries(e)))W.setValue(n,r,{shouldDirty:!0})},[W,K]),{isUnlocked:ey}=(0,P.Hv)();(0,i.useEffect)(()=>{ey&&"init"!==a.autopilot.status&&X()},[ey,a.autopilot.status]),(0,i.useEffect)(()=>{W.formState.isSubmitting||eg()},[W,V,$]);let eb=Object.entries(W.formState.dirtyFields).filter(e=>{let[t,n]=e;return!!n}).length;return{onSubmit:ev,revalidateAndResetFormData:X,form:W,fields:eu,changeCount:eb,canEstimate:ec,estimatedSpendingPerMonth:ed,estimatedSpendingPerTB:ef,redundancyMultiplier:el,storageTB:et,shouldSyncDefaultContractSet:Z,setShouldSyncDefaultContractSet:B,showAdvanced:V,setShowAdvanced:I}}();return(0,r.jsx)(F.Provider,{value:n,children:t})}},13242:function(e,t,n){"use strict";n.d(t,{x:function(){return b},G:function(){return y}});var r=n(52322),i=n(23305),o=n(5632),a=n(9969),s=n(2784),l=n(6391),u=n.n(l),c=n(56860),d=n(88242),f=n(96206),h=n(82459);let p=[{id:"actions",label:"",fixed:!0,cellClassName:"w-[50px] !pl-2 !pr-4 [&+*]:!pl-0",render:e=>{let{data:{id:t,hostIp:n,hostKey:i}}=e;return(0,r.jsx)(h.F,{id:t,address:n,publicKey:i})}},{id:"contractId",label:"contract ID",category:"general",render:e=>{let{data:{id:t,isRenewed:n,renewedFrom:o}}=e;return(0,r.jsxs)("div",{className:"flex flex-col gap-1 w-full",children:[(0,r.jsx)(i.XxW,{size:"12",value:(0,i.I13)(t),label:"contract ID"}),n&&(0,r.jsx)(i.ua7,{content:"Renewed from",align:"start",children:(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)(i.xvT,{color:"subtle",children:(0,r.jsx)(d.L6f,{className:"scale-75"})}),(0,r.jsx)(i.XxW,{color:"subtle",size:"10",value:(0,i.I13)(o),label:"contract ID"})]})})]})}},{id:"hostIp",label:"host address",category:"general",render:e=>{let{data:{hostIp:t}}=e;return(0,r.jsx)(i.XxW,{size:"12",value:t,type:"ip",label:"host address"})}},{id:"hostKey",label:"host public key",category:"general",render:e=>{let{data:{hostKey:t}}=e;return(0,r.jsx)(i.XxW,{size:"12",value:t,label:"host public key"})}},{id:"timeline",label:"timeline",category:"time",render:e=>{let{data:{contractHeightStart:t,contractHeightEnd:n,proofWindowHeightStart:o,proofWindowHeightEnd:a,revisionHeight:s,proofHeight:l},context:{currentHeight:u,contractsTimeRange:c}}=e;return(0,r.jsx)("div",{className:"w-[400px]",children:(0,r.jsx)(i.TaT,{currentHeight:u,contractHeightStart:t,contractHeightEnd:n,proofWindowHeightStart:o,proofWindowHeightEnd:a,proofHeight:l,revisionHeight:s,range:c})})}},{id:"startTime",label:"start date",category:"time",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{startTime:t}}=e;return(0,r.jsx)(i.xvT,{size:"12",font:"mono",ellipsis:!0,children:(0,f.rN)(t)})}},{id:"endTime",label:"end date",category:"time",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{endTime:t}}=e;return(0,r.jsx)(i.xvT,{size:"12",font:"mono",ellipsis:!0,children:(0,f.rN)(t)})}},{id:"size",label:"size",category:"general",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{size:t}}=e;return(0,r.jsx)(i.m2c,{size:"12",value:t,variant:"value",format:e=>(0,f.vW)(e)})}},{id:"totalCost",label:"total cost",category:"financial",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{totalCost:t}}=e;return(0,r.jsx)(i.YKL,{size:"12",value:t.negated()})}},{id:"spendingUploads",label:"uploads spending",category:"financial",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{spendingUploads:t}}=e;return(0,r.jsx)(i.YKL,{size:"12",value:t.negated()})}},{id:"spendingDownloads",label:"downloads spending",category:"financial",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{spendingDownloads:t}}=e;return(0,r.jsx)(i.YKL,{size:"12",value:t.negated()})}},{id:"spendingFundAccount",label:"fund account spending",category:"financial",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{spendingFundAccount:t}}=e;return(0,r.jsx)(i.YKL,{size:"12",value:t.negated()})}}];var m=n(47025),v=n(25573);let g=(0,s.createContext)({}),y=()=>(0,s.useContext)(g);function b(e){let{children:t}=e,n=function(){let e=(0,o.useRouter)(),t=Number(e.query.limit||50),n=Number(e.query.offset||0),r=(0,a.GP)({config:{swr:{refreshInterval:(0,i.sWj)(1)}}}),l=(0,m.JL)(),d=(0,s.useMemo)(()=>{var e;return(null===(e=l.data)||void 0===e?void 0:e.hosts)||[]},[l.data]),f=(0,v.n)(),h=f.isSynced?f.nodeBlockHeight:f.estimatedBlockHeight,g=(0,s.useMemo)(()=>{var e;if(!r.data)return null;let t=(null===(e=r.data)||void 0===e?void 0:e.map(e=>{var t;let n="fcid:0000000000000000000000000000000000000000000000000000000000000000"!==e.renewedFrom,r=(0,i.jrD)(h,e.startHeight),o=e.windowStart,a=(0,i.jrD)(h,o);return{id:e.id,contractId:e.id,hostIp:e.hostIP,hostKey:e.hostKey,location:null===(t=d.find(t=>t.public_key===e.hostKey))||void 0===t?void 0:t.location,timeline:r,startTime:r,endTime:a,contractHeightStart:e.startHeight,contractHeightEnd:o,proofWindowHeightStart:e.windowStart,proofWindowHeightEnd:e.windowEnd,proofHeight:e.proofHeight,revisionHeight:e.revisionHeight,isRenewed:n,renewedFrom:e.renewedFrom,totalCost:new(u())(e.totalCost),spendingUploads:new(u())(e.spending.uploads),spendingDownloads:new(u())(e.spending.downloads),spendingFundAccount:new(u())(e.spending.fundAccount),size:new(u())(e.size)}}))||[];return t},[r.data,d,h]),{filters:y,setFilter:b,removeFilter:x,removeLastFilter:w,resetFilters:j}=(0,i.Wdu)(),{configurableColumns:E,enabledColumns:k,sortableColumns:S,toggleColumnVisibility:_,setColumnsVisible:C,setColumnsHidden:O,toggleSort:M,setSortDirection:T,setSortField:A,sortField:P,sortDirection:N,resetDefaultColumnVisibility:R}=(0,i.oy6)("renterd/v0/contracts",{columns:p,columnsDefaultVisible:c.gd,sortOptions:c.Fo,defaultSortField:c.nw}),D=(0,i._4u)({dataset:g,filters:y,sortField:P,sortDirection:N}),L=(0,s.useMemo)(()=>D?D.slice(n,n+t):null,[D,n,t]),{range:F}=(0,s.useMemo)(()=>(0,i.EJC)(h,L||[]),[h,L]),z=(0,s.useMemo)(()=>p.filter(e=>e.fixed||k.includes(e.id)),[k]),V=(0,i.c2j)(D,r.isValidating,r.error,y),I=(0,s.useMemo)(()=>g?g.filter(e=>e.contractHeightStart{a(h)},children:h.label}),(0,r.jsx)(d.WD,{currentPage:n,commandPage:h,onSelect:()=>{p.push(s._.wallet.view),u()},children:"View wallet transactions"}),(0,r.jsx)(d.WD,{currentPage:n,commandPage:h,onSelect:()=>{l("sendSiacoin")},children:"Send siacoin"}),(0,r.jsx)(d.WD,{currentPage:n,commandPage:h,onSelect:()=>{l("addressDetails")},children:"Receive siacoin"}),(0,r.jsx)(d.WD,{currentPage:n,commandPage:h,onSelect:()=>{l("addressDetails")},children:"View wallet address"}),(0,r.jsx)(d.WD,{currentPage:n,commandPage:h,disabled:!(null===(t=m.data)||void 0===t?void 0:t.address),onSelect:()=>{var e;(null===(e=m.data)||void 0===e?void 0:e.address)&&((0,o.vQq)(m.data.address,"wallet address"),u())},children:"Copy wallet address to clipboard"})]})}var m=n(38617);let v={namespace:"settings",label:"Settings"};function g(e){let{currentPage:t,parentPage:n}=e,{openDialog:i,closeDialog:o}=eT(),{setTheme:s}=(0,m.F)(),{settings:l,setSettings:u,lock:c,currencyOptions:f,setCurrency:h}=(0,a.Hv)();return(0,r.jsxs)(d.fu,{currentPage:t,commandPage:v,children:[(0,r.jsx)(d.Ul,{currentPage:t,parentPage:n,commandPage:v,onSelect:()=>{i("settings")},children:"Open settings"}),(0,r.jsx)(d.WD,{currentPage:t,commandPage:v,onSelect:()=>{u({siaCentral:!l.siaCentral}),o()},children:(l.siaCentral?"Disable":"Enable")+" external API - Sia Central exchange rates"}),(0,r.jsx)(d.o4,{currentPage:t,commandPage:v,onSelect:()=>{c(),o()},children:"Lock renterd"}),(0,r.jsx)(d.WD,{currentPage:t,commandPage:v,onSelect:()=>{i("settings")},children:"Open interface theme menu"}),(0,r.jsx)(d.WD,{currentPage:t,commandPage:v,onSelect:()=>{s("system"),o()},children:"Set theme to system preference"}),(0,r.jsx)(d.WD,{currentPage:t,commandPage:v,onSelect:()=>{s("dark"),o()},children:"Set theme to dark"}),(0,r.jsx)(d.WD,{currentPage:t,commandPage:v,onSelect:()=>{s("light"),o()},children:"Set theme to light"}),(0,r.jsx)(d.WD,{currentPage:t,commandPage:v,onSelect:()=>{i("settings")},children:"Open currency settings menu"}),f.map(e=>{let{id:n,label:i}=e;return(0,r.jsx)(d.WD,{currentPage:t,commandPage:v,onSelect:()=>{h(n),o()},children:"Set currency to ".concat(i)},n)})]})}let y={namespace:"node",label:"Blockchain node"};function b(e){let{currentPage:t,parentPage:n,pushPage:i}=e,{openDialog:o,closeDialog:a}=eT(),l=(0,c.useRouter)();return(0,r.jsxs)(d.fu,{currentPage:t,commandPage:y,children:[(0,r.jsx)(d.Ul,{currentPage:t,parentPage:n,commandPage:y,onSelect:()=>{i(y)},children:y.label}),(0,r.jsx)(d.WD,{currentPage:t,commandPage:y,onSelect:()=>{o("connectPeer")},children:"Connect to a peer"}),(0,r.jsx)(d.WD,{currentPage:t,commandPage:y,onSelect:()=>{l.push(s._.node.index),a()},children:"View peers"}),(0,r.jsx)(d.WD,{currentPage:t,commandPage:y,onSelect:()=>{l.push(s._.node.index),a()},children:"View transaction pool"})]})}var x=n(17286),w=n(91641);let j={namespace:"configuration",label:"Configuration"};function E(e){let{currentPage:t,parentPage:n,pushPage:i}=e,o=(0,c.useRouter)(),{showAdvanced:a}=(0,x.ZR)(),{closeDialog:l}=eT(),{autopilot:u}=(0,w.q)();return(0,r.jsxs)(d.fu,{currentPage:t,commandPage:j,children:[(0,r.jsx)(d.Ul,{currentPage:t,parentPage:n,commandPage:j,onSelect:()=>{i(j)},children:j.label}),(0,r.jsx)(d.WD,{currentPage:t,commandPage:j,onSelect:()=>{o.push(s._.config.index),l()},children:"Open configuration"}),"on"===u.status&&(0,r.jsx)(d.WD,{currentPage:t,commandPage:j,onSelect:()=>{o.push(s._.config.storage),l()},children:"Configure storage"}),(0,r.jsx)(d.WD,{currentPage:t,commandPage:j,onSelect:()=>{o.push(s._.config.pricing),l()},children:"Configure pricing"}),a&&(0,r.jsxs)(r.Fragment,{children:["on"===u.status&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d.WD,{currentPage:t,commandPage:j,onSelect:()=>{o.push(s._.config.hosts),l()},children:"Configure hosts"}),(0,r.jsx)(d.WD,{currentPage:t,commandPage:j,onSelect:()=>{o.push(s._.config.wallet),l()},children:"Configure wallet"})]}),(0,r.jsx)(d.WD,{currentPage:t,commandPage:j,onSelect:()=>{o.push(s._.config.contracts),l()},children:"Configure contracts"}),(0,r.jsx)(d.WD,{currentPage:t,commandPage:j,onSelect:()=>{o.push(s._.config.uploads),l()},children:"Configure uploads"}),(0,r.jsx)(d.WD,{currentPage:t,commandPage:j,onSelect:()=>{o.push(s._.config.redundancy),l()},children:"Configure redundancy"})]})]})}var k=n(93216);let S={namespace:"contracts",label:"Contracts"};function _(e){let{currentPage:t,parentPage:n,pushPage:i,beforeSelect:o,afterSelect:a}=e,l=(0,c.useRouter)(),{closeDialog:u}=eT();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d.Ul,{currentPage:t,parentPage:n,commandPage:n,onSelect:()=>{i(S)},children:S.label}),(0,r.jsx)(d.fu,{currentPage:t,commandPage:S,children:(0,r.jsx)(d.WD,{currentPage:t,commandPage:S,onSelect:()=>{l.push(s._.contracts.index),u()},children:"View contracts"})}),(0,r.jsx)(k.F,{parentPage:S,currentPage:t,beforeSelect:o,afterSelect:a,pushPage:i})]})}var C=n(13242),O=n(18006);let M={namespace:"hosts",label:"Hosts"};function T(e){let{currentPage:t,parentPage:n,pushPage:i,beforeSelect:o,afterSelect:a}=e,l=(0,c.useRouter)(),{closeDialog:u,openDialog:f}=eT();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d.Ul,{currentPage:t,parentPage:n,commandPage:n,onSelect:()=>{i(M)},children:M.label}),(0,r.jsx)(d.fu,{currentPage:t,commandPage:M,children:(0,r.jsx)(d.WD,{currentPage:t,commandPage:M,onSelect:()=>{l.push(s._.hosts.index),u()},children:"View hosts"})}),(0,r.jsx)(d.WD,{currentPage:t,commandPage:M,onSelect:()=>{f("hostsManageAllowBlock")},children:"Manage filter lists: allowlist + blocklist"}),(0,r.jsx)(O.L,{parentPage:M,currentPage:t,beforeSelect:o,afterSelect:a,pushPage:i})]})}var A=n(91652),P=n(48528),N=n(88242);function R(e){let{debouncedSearch:t}=e;return(0,r.jsxs)(o.xvT,{color:"verySubtle",className:"flex flex-col gap-2 justify-center items-center mt-5 mb-3",children:[(0,r.jsxs)(o.xvT,{color:"verySubtle",className:"flex gap-2 justify-center items-center",children:[(0,r.jsx)(N.e1T,{}),(0,r.jsx)(N.JCW,{}),(0,r.jsx)(N.c_L,{})]}),(0,r.jsx)(o.xvT,{size:"12",color:"verySubtle",className:"flex justify-center",children:t?"No files match the query.":"Type a query to get started."})]})}let D={namespace:"files/search",label:"File search",prompt:"Search for files, eg: backups, photo_archive.zip, etc...",empty:R};function L(e){let{debouncedSearch:t,search:n,currentPage:i,beforeSelect:a,afterSelect:s}=e,{activeBucket:l,setActiveDirectory:u}=(0,P.Y)(),c=(null==i?void 0:i.namespace)===D.namespace,h=(0,f.Iy)({disabled:!c,params:{bucket:l||"default",key:t,skip:0,limit:10},config:{swr:{keepPreviousData:!0}}});return c&&h.data?(0,r.jsx)(d.fu,{currentPage:i,commandPage:D,children:h.data.map(e=>{let{name:t}=e,l=function(e,t,n){let r=Math.max(e.length-55,0);if(0===r)return e;let i=F(e),o=F(t),a=i.toLowerCase().indexOf(o.toLowerCase()),s=a+o.length-1,l=0,u=0,c=i.split("/"),d=c.map(e=>{if(l>=r)return u+=e.length,F(e);let t=u,n=u+e.length+1;return ta?(u+=e.length,F(e)):!e.includes(o)&&e.length>3?(u+=e.length,l+=e.length+1,"..."):(u+=e.length,F(e))});return d.reverse().join("/")}(t,n,0),{startIndex:c,endIndex:f}=function(e,t){let n=F(e),r=F(t),i=n.toLowerCase().indexOf(r.toLowerCase()),o=i+r.length;return{endIndex:e.length-i,startIndex:e.length-o}}(l,n);return(0,r.jsx)(d.WD,{commandPage:D,currentPage:i,onSelect:()=>{a(),u(()=>(0,A.gD)(t)),s()},value:t,children:(0,r.jsxs)("div",{className:"flex items-center gap-2 overflow-hidden",children:[(0,r.jsx)(o.xvT,{color:"verySubtle",className:"group-data-[selected=true]:text-gray-1000 dark:group-data-[selected=true]:text-graydark-1000",children:(0,A.IQ)(t)?(0,r.jsx)(N.ROc,{size:16}):(0,r.jsx)(N.c_L,{})}),(0,r.jsxs)(o.xvT,{className:"flex items-center",children:[(0,r.jsx)(o.xvT,{color:"verySubtle",ellipsis:!0,children:l.slice(0,c)}),(0,r.jsx)(o.xvT,{color:"accent",ellipsis:!0,children:l.slice(c,f)}),(0,r.jsx)(o.xvT,{color:"verySubtle",ellipsis:!0,children:l.slice(f)})]})]})},t)})}):null}function F(e){return e.split("").reverse().join("")}let z={namespace:"files",label:"Files"};function V(e){let{search:t,debouncedSearch:n,currentPage:i,parentPage:o,pushPage:a,beforeSelect:l,afterSelect:u}=e,f=(0,c.useRouter)(),{closeDialog:h}=eT();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d.Ul,{currentPage:i,parentPage:o,commandPage:o,onSelect:()=>{a(z)},children:z.label}),(0,r.jsxs)(d.fu,{currentPage:i,commandPage:z,children:[(0,r.jsx)(d.WD,{currentPage:i,commandPage:z,onSelect:()=>{f.pathname.startsWith(s._.files.index)||f.push(s._.files.index),h(),u()},children:"View files"}),(0,r.jsx)(d.WD,{currentPage:i,commandPage:z,onSelect:()=>{a(D),u()},children:"Search files"})]}),(0,r.jsx)(L,{debouncedSearch:n,search:t,currentPage:i,beforeSelect:l,afterSelect:u})]})}var I=n(19513);function Z(e,t){return e===t}function B(e){return"function"==typeof e?function(){return e}:e}function H(e,t,n){var r,o,a=n&&n.equalityFn||Z,s=(o=(r=(0,i.useState)(B(e)))[1],[r[0],(0,i.useCallback)(function(e){return o(B(e))},[])]),l=s[0],u=s[1],c=function(e,t,n){var r=this,o=(0,i.useRef)(null),a=(0,i.useRef)(0),s=(0,i.useRef)(null),l=(0,i.useRef)([]),u=(0,i.useRef)(),c=(0,i.useRef)(),d=(0,i.useRef)(e),f=(0,i.useRef)(!0);(0,i.useEffect)(function(){d.current=e},[e]);var h=!t&&0!==t&&"undefined"!=typeof window;if("function"!=typeof e)throw TypeError("Expected a function");t=+t||0;var p=!!(n=n||{}).leading,m=!("trailing"in n)||!!n.trailing,v="maxWait"in n,g=v?Math.max(+n.maxWait||0,t):null;return(0,i.useEffect)(function(){return f.current=!0,function(){f.current=!1}},[]),(0,i.useMemo)(function(){var e=function(e){var t=l.current,n=u.current;return l.current=u.current=null,a.current=e,c.current=d.current.apply(n,t)},n=function(e,t){h&&cancelAnimationFrame(s.current),s.current=h?requestAnimationFrame(e):setTimeout(e,t)},i=function(e){if(!f.current)return!1;var n=e-o.current;return!o.current||n>=t||n<0||v&&e-a.current>=g},y=function(t){return s.current=null,m&&l.current?e(t):(l.current=u.current=null,c.current)},b=function e(){var r=Date.now();if(i(r))return y(r);if(f.current){var s=t-(r-o.current);n(e,v?Math.min(s,g-(r-a.current)):s)}},x=function(){var d=Date.now(),h=i(d);if(l.current=[].slice.call(arguments),u.current=r,o.current=d,h){if(!s.current&&f.current)return a.current=o.current,n(b,t),p?e(o.current):c.current;if(v)return n(b,t),e(o.current)}return s.current||n(b,t),c.current};return x.cancel=function(){s.current&&(h?cancelAnimationFrame(s.current):clearTimeout(s.current)),a.current=0,l.current=o.current=u.current=s.current=null},x.isPending=function(){return!!s.current},x.flush=function(){return s.current?y(Date.now()):c.current},x},[p,v,t,g,m,h])}((0,i.useCallback)(function(e){return u(e)},[u]),t,n),d=(0,i.useRef)(e);return a(d.current,e)||(c(e),d.current=e),[l,c]}function U(e){let{search:t}=e;return(0,r.jsxs)(o.xvT,{color:"verySubtle",className:"flex flex-col gap-2 justify-center items-center mt-5 mb-3",children:[(0,r.jsx)(o.xvT,{color:"verySubtle",className:"flex gap-2 justify-center items-center",children:(0,r.jsx)(N.owP,{})}),(0,r.jsx)(o.xvT,{size:"12",color:"verySubtle",className:"flex justify-center",children:t?"No results matching query.":"Type a query to get started."})]})}function W(e){let{panel:t}=e,{resetFilters:n}=(0,C.G)(),{resetFilters:a}=(0,I.l)(),{closeDialog:d}=eT(),f=(0,c.useRouter)(),[h,m]=(0,i.useState)(""),[v]=H(h,500),[y,x]=(0,i.useState)([]),w=y[y.length-1],j=0===y.length,k=(0,i.useCallback)(e=>{x(t=>[...t,e])},[x]),S=(0,i.useCallback)(()=>{d()},[d]),O=(0,i.useCallback)(()=>{m("")},[m]),M=(null==w?void 0:w.empty)||U;return(0,r.jsxs)(u.mY,{label:"Command Menu",loop:!0,className:(0,l.cx)(t&&(0,o.z$)()),onKeyDown:e=>{(y.length>0&&"Escape"===e.key||"Backspace"===e.key&&!h)&&(e.preventDefault(),x(e=>e.slice(0,-1)))},children:[w&&(0,r.jsx)(o.__J,{className:"px-2",children:w.label}),(0,r.jsx)(u.mY.Input,{value:h,onValueChange:m,className:(0,o.cEb)({variant:"ghost",focus:"none"}),placeholder:(null==w?void 0:w.prompt)||(j?"Search for commands, eg: theme, redundancy":"Search commands")}),(0,r.jsx)(o.Z0O,{className:"my-2"}),(0,r.jsxs)(u.mY.List,{children:[(0,r.jsx)(u.mY.Empty,{children:(0,r.jsx)(M,{search:h,debouncedSearch:v})}),(0,r.jsx)(g,{currentPage:w,pushPage:k}),(0,r.jsx)(V,{debouncedSearch:v,search:h,currentPage:w,pushPage:k,beforeSelect:()=>{S()},afterSelect:()=>{O()}}),(0,r.jsx)(p,{currentPage:w,pushPage:k}),(0,r.jsx)(_,{currentPage:w,pushPage:k,beforeSelect:()=>{S(),n()},afterSelect:()=>{f.pathname.startsWith(s._.contracts.index)||f.push(s._.contracts.index),O()}}),(0,r.jsx)(T,{currentPage:w,pushPage:k,beforeSelect:()=>{S(),a()},afterSelect:()=>{f.pathname.startsWith(s._.hosts.index)||f.push(s._.hosts.index),O()}}),(0,r.jsx)(E,{currentPage:w,pushPage:k}),(0,r.jsx)(b,{currentPage:w,pushPage:k})]})]})}function q(e){let{open:t,onOpenChange:n,setOpen:l}=e,{isUnlocked:u}=(0,a.Hv)(),{isConnected:c}=(0,o.Y97)({route:s.h});return(0,i.useEffect)(()=>{if(!u||!c)return;let e=e=>{"k"===e.key&&e.metaKey&&l()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[u,c,l]),(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(o.VqE,{open:t,onOpenChange:n,contentVariants:{className:"!absolute !p-1 w-[450px] top-[200px]"},bodyClassName:"!px-1 !py-1",closeClassName:"hidden",children:(0,r.jsx)(W,{})})})}var $=n(9156),K=n(24511);let Y={name:""},G=K.Ry().shape({name:K.Z_().required("Required")});function X(e){let{trigger:t,open:n,onOpenChange:i}=e,{activeDirectoryPath:a}=(0,P.Y)(),s=(0,f.ZM)(),l=(0,$.TA)({initialValues:Y,validationSchema:G,onSubmit:async(e,t)=>{let n=await s.put({params:(0,A.W0)(a+e.name+"/"),payload:null});n.error?(0,o.OHV)(n.error):((0,o.RFt)("Directory created."),t.resetForm(),i(!1))}});return(0,r.jsx)(o.VqE,{trigger:t,title:"New directory",open:n,onOpenChange:e=>{e||l.resetForm(),i(e)},contentVariants:{className:"w-[400px]"},children:(0,r.jsx)("div",{className:"flex flex-col gap-4",children:(0,r.jsx)("form",{onSubmit:l.handleSubmit,children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(o.cB7,{formik:l,title:"Name",name:"name",placeholder:"photos, backups, etc",autoComplete:"off",type:"text",variants:{size:"medium"}}),(0,r.jsx)(o.IKw,{formik:l,size:"medium",children:"Create"})]})})})})}var J=n(33571);let Q={publicKey:""},ee=K.Ry().shape({publicKey:K.Z_().required("Required")});function et(){var e;let t=(0,f.s2)({config:{swr:{refreshInterval:6e4}}}),n=(0,J.I)(),a=(0,$.TA)({initialValues:Q,validationSchema:ee,onSubmit:async(e,t)=>{let r=await n([e.publicKey],[]);r?t.resetForm():t.setStatus({error:"Error updating allowlist"})}});(0,i.useEffect)(()=>{a.setStatus(void 0)},[a.values]);let s=a.values.publicKey,l=(null===(e=t.data)||void 0===e?void 0:e.filter(e=>!a.values.publicKey||e.includes(a.values.publicKey)))||[];return(0,r.jsxs)("form",{onSubmit:a.handleSubmit,className:"flex flex-col gap-2 h-[400px]",children:[(0,r.jsx)(o.S$c,{title:"Public key",name:"publicKey",formik:a,withStatusError:!0,children:(0,r.jsxs)("div",{className:"flex gap-1",children:[(0,r.jsx)(o.KZS,{name:"publicKey",formik:a,placeholder:"ed25519:02aabd26e627fd...",autoComplete:"off",variants:{size:"small"}}),(0,r.jsx)(o.IKw,{formik:a,size:"small",variant:"amber",withStatusError:!1,children:"Allow public key"})]})}),(0,r.jsxs)(o.s_4,{className:"p-2 flex gap-2 items-center",children:[(0,r.jsx)(o.xvT,{children:(0,r.jsx)(N.qdM,{})}),(0,r.jsxs)(o.nvN,{size:"12",children:[(0,r.jsx)(o.xvT,{weight:"semibold",children:"Caution:"})," Please note that because the allowlist is inclusive, as soon as there are more than zero entries, contracting will be limited to only the hosts explicitly on the allowlist - all other existing contracts will immediately abort."]})]}),(0,r.jsx)("div",{className:"flex-1 overflow-hidden !-m-2",children:l.length?(0,r.jsx)(o.xrM,{children:(0,r.jsx)("div",{className:"p-2",children:(0,r.jsx)(o.hmz,{options:l.map(e=>({value:e,label:"".concat(e.slice(0,20),"...")}))||[],onClick:e=>(0,o.vQq)(e,"allowed public key"),onRemove:e=>n([],[e])})})}):s?(0,r.jsxs)("div",{className:"flex flex-col gap-3 items-center justify-center h-[200px]",children:[(0,r.jsx)(o.xvT,{color:"subtle",children:(0,r.jsx)(N.Hb6,{})}),(0,r.jsxs)(o.xvT,{color:"subtle",children:["No existing entries match ",a.values.publicKey,"."]})]}):(0,r.jsxs)("div",{className:"flex flex-col gap-3 items-center justify-center h-[200px]",children:[(0,r.jsx)(o.xvT,{color:"subtle",children:(0,r.jsx)(N.TtX,{})}),(0,r.jsx)(o.xvT,{color:"subtle",children:"The allowlist is empty."})]})})]})}var en=n(98358);let er={address:""},ei=["45.148.30.56","51.158.108.244","siacentral.ddnsfree.com","siacentral.mooo.com"],eo=K.Ry().shape({address:K.Z_().required("Required").test("address","Invalid hostname or IP address",e=>(0,o.Ztc)().test(e||""))});function ea(){let e=(0,f.uf)({config:{swr:{refreshInterval:6e4}}}),t=(0,en.l)(),n=(0,$.TA)({initialValues:er,validationSchema:eo,onSubmit:async(e,n)=>{let r=await t([e.address],[]);r?n.resetForm():n.setStatus({error:"Error updating blocklist"})}});(0,i.useEffect)(()=>{n.setStatus(void 0)},[n.values]);let a=n.values.address,s=(0,i.useMemo)(()=>{var t;return(null===(t=e.data)||void 0===t?void 0:t.filter(e=>!n.values.address||e.includes(n.values.address)))||[]},[e.data,n.values.address]),{dataset:l}=(0,C.G)(),u=(0,i.useMemo)(()=>ei.filter(t=>{var n;return!(null===(n=e.data)||void 0===n?void 0:n.find(e=>e===t))}).map(e=>({address:e,contractCount:null==l?void 0:l.filter(t=>t.hostIp===e).length})),[e.data,l]);return(0,r.jsxs)("form",{onSubmit:n.handleSubmit,className:"flex flex-col gap-2 h-[400px]",children:[(0,r.jsx)(o.S$c,{title:"Address",name:"address",formik:n,withStatusError:!0,children:(0,r.jsxs)("div",{className:"flex gap-1",children:[(0,r.jsx)(o.KZS,{name:"address",formik:n,placeholder:"eg: 51.258.128.144 or spam.ddnsfree.com",autoComplete:"off",variants:{size:"small"}}),(0,r.jsx)(o.IKw,{formik:n,size:"small",variant:"red",withStatusError:!1,children:"Block address"})]})}),(0,r.jsx)("div",{className:"flex-1 overflow-hidden !-m-2",children:(0,r.jsx)(o.xrM,{children:(0,r.jsxs)("div",{className:"p-2",children:[!!u.length&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"flex gap-1 flex-wrap",children:[(0,r.jsx)(o.xvT,{size:"12",color:"subtle",children:"Suggestions:"}),u.map((e,t)=>{let{address:i,contractCount:a}=e;return(0,r.jsxs)(o.xvT,{size:"12",underline:"hover",className:"cursor-pointer",onClick:()=>n.setFieldValue("address",i),children:[i,!!a&&(0,r.jsxs)(r.Fragment,{children:[" ",(0,r.jsx)(o.ua7,{content:"".concat(a," active contracts"),children:(0,r.jsxs)(o.xvT,{color:"red",children:["(",a,")"]})})]}),t!==u.length-1&&(0,r.jsx)(o.xvT,{children:","})]},i)})]}),(0,r.jsx)(o.Z0O,{className:"my-2"})]}),s.length?(0,r.jsx)(o.hmz,{options:s.map(e=>({value:e,label:"".concat(e.slice(0,20),"...")}))||[],onClick:e=>(0,o.vQq)(e,"blocked address"),onRemove:e=>t([],[e])}):a?(0,r.jsxs)("div",{className:"flex flex-col gap-3 items-center justify-center h-[200px]",children:[(0,r.jsx)(o.xvT,{color:"subtle",children:(0,r.jsx)(N.Hb6,{})}),(0,r.jsxs)(o.xvT,{color:"subtle",children:["No existing entries match ",n.values.address,"."]})]}):(0,r.jsxs)("div",{className:"flex flex-col gap-3 items-center justify-center h-[200px]",children:[(0,r.jsx)(o.xvT,{color:"subtle",children:(0,r.jsx)(N.TtX,{})}),(0,r.jsx)(o.xvT,{color:"subtle",children:"The blocklist is empty."})]})]})})})]})}function es(e){let{trigger:t,open:n,onOpenChange:i}=e;return(0,r.jsx)(o.VqE,{trigger:t,title:"Manage host blocklist and allowlist",open:n,onOpenChange:e=>{i(e)},contentVariants:{className:"w-[500px]"},children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(o.nvN,{size:"12",children:"The allowlist and blocklist limit the set of hosts that renterd will consider when forming contracts. The blocklist excludes hosts with matching addresses whereas the allowlist restricts consideration to hosts with a matching public key. Each list's filtering is enabled and applied when it contains more than zero entries."}),(0,r.jsxs)(o.mQc,{defaultValue:"blocklist",children:[(0,r.jsxs)(o.drW,{"aria-label":"blocklist and allowlist tabs",children:[(0,r.jsx)(o.SPt,{value:"blocklist",children:"Block"}),(0,r.jsx)(o.SPt,{value:"allowlist",children:"Allow"})]}),(0,r.jsx)(o.nUL,{value:"blocklist",children:(0,r.jsx)(ea,{})}),(0,r.jsx)(o.nUL,{value:"allowlist",children:(0,r.jsx)(et,{})})]})]})})}var el=n(2320),eu=n(31781),ec=n(24801);function ed(e){let{panel:t}=e,{resetFilters:n}=(0,C.G)(),{closeDialog:a}=eT(),d=(0,c.useRouter)(),[f,h]=(0,i.useState)(""),[p]=H(f,500),m=(0,i.useCallback)(()=>{a()},[a]);return(0,r.jsxs)(u.mY,{label:"Files search",shouldFilter:!1,className:(0,l.cx)(t&&(0,o.z$)()),children:[(0,r.jsx)(o.__J,{className:"px-2",children:"File search"}),(0,r.jsx)(u.mY.Input,{value:f,onValueChange:h,className:(0,o.cEb)({variant:"ghost",focus:"none"}),placeholder:D.prompt}),(0,r.jsx)(o.Z0O,{className:"my-2"}),(0,r.jsx)("div",{className:"overflow-hidden",children:(0,r.jsxs)(u.mY.List,{children:[(0,r.jsx)(u.mY.Empty,{children:(0,r.jsx)(R,{search:f,debouncedSearch:p})}),(0,r.jsx)(L,{debouncedSearch:p,search:f,currentPage:D,beforeSelect:()=>{m(),n()},afterSelect:()=>{d.pathname.startsWith(s._.files.index)||d.push(s._.files.index)}})]})})]})}function ef(e){let{open:t,onOpenChange:n}=e;return(0,r.jsx)(o.VqE,{open:t,onOpenChange:n,contentVariants:{className:"!absolute !p-1 w-[450px] top-[200px]"},bodyClassName:"!px-1 !py-1",closeClassName:"hidden",children:(0,r.jsx)(ed,{})})}var eh=n(6391),ep=n.n(eh);function em(){let{dialog:e,openDialog:t,closeDialog:n}=eT(),a=(0,f.Tu)(),s=(0,f.gU)(),l=(0,f.cg)(),u=(0,f.ys)(),c=(0,f.aO)(),d=(0,i.useCallback)(async e=>{let{sc:t,address:n}=e,r=await s.post({payload:{amount:t.toString(),transaction:{siacoinOutputs:[{address:n,value:t.toString()}]}}});if(r.error)return{error:r.error};let i=await l.post({payload:{transaction:r.data.transaction,toSign:r.data.toSign,coveredFields:{WholeTransaction:!0}}});if(i.error)return c.post({payload:r.data.transaction}),{error:i.error};let o=await u.post({payload:[i.data]});return o.error?(c.post({payload:i.data}),{error:o.error}):{}},[s,l,u,c]);return(0,r.jsx)(o.weF,{balance:a.data?new(ep())(a.data.spendable):void 0,send:d,open:"sendSiacoin"===e,onOpenChange:r=>r?t(e):n()})}function ev(){let{id:e,dialog:t,openDialog:n,closeDialog:a}=eT(),s=(0,f.Qq)({params:{},config:{swr:{revalidateOnFocus:!1,refreshInterval:6e4}},disabled:"transactionDetails"!==t}),l=(0,i.useMemo)(()=>{var t;let n=null===(t=s.data)||void 0===t?void 0:t.find(t=>t.id===e);return n?{txType:(0,o.leQ)(n.raw),inflow:n.inflow,outflow:n.outflow,timestamp:n.timestamp,raw:n.raw}:null},[s,e]);return(0,r.jsx)(o.mPE,{id:e,transaction:l,open:"transactionDetails"===t,onOpenChange:e=>e?n(t):a()})}var eg=n(82459);function ey(e){let{id:t,contentProps:n,buttonProps:i}=e,a=(0,f.cq)({params:{id:t}});return a.data?(0,r.jsx)(eg.F,{id:t,address:a.data.hostIP,publicKey:a.data.hostKey,contentProps:n,buttonProps:i}):(0,r.jsx)(o.zxk,{variant:"ghost",icon:"hover",state:"waiting",...i,children:(0,r.jsx)(N.iG7,{})})}var eb=n(848);function ex(e){let{open:t,onOpenChange:n}=e,a=(0,f.Z7)(),s=(0,f.Uy)(),l=(0,i.useCallback)(async e=>{let t=await s.post({payload:[e]});t.error?(0,o.OHV)("Error dismissing alert."):(0,o.OPV)("Alert has been dismissed.")},[s]),u=(0,i.useCallback)(async(e,t)=>{if(!a.data)return;let n=await s.post({payload:e});n.error?(0,o.OHV)(t?"Error dismissing all ".concat(t," alerts."):"Error dismissing all alerts."):(0,o.OPV)(t?"All ".concat(t," alerts have been dismissed."):"All alerts have been dismissed.")},[s,a.data]);return(0,r.jsx)(o.hcY,{open:t,onOpenChange:e=>{n(e)},alerts:a,dataFieldOrder:ew,dataFields:ej,dismissMany:u,dismissOne:l})}let ew=["hint","error","origin","hostKey","contractID","accountID","slabKey","additions","removals"],ej={contractID:{render:function(e){let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"contract ID"}),(0,r.jsx)(o.PF9,{value:t,menu:(0,r.jsx)(ey,{id:t,contentProps:{align:"end"},buttonProps:{size:"none"}})})]})}},accountID:{render:function(e){let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"account ID"}),(0,r.jsx)(o.XxW,{value:t,label:"account ID"})]})}},hostKey:{render:function(e){let{value:t}=e,n=(0,f.$)({params:{hostKey:t}});return n.data?(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"host key"}),(0,r.jsx)(o.PF9,{value:t,menu:(0,r.jsx)(eb.G,{publicKey:n.data.publicKey,address:n.data.netAddress,contentProps:{align:"end"},buttonProps:{size:"none"}})})]}):null}},slabKey:{render:function(e){let{value:t}=e,{setActiveDirectory:n}=(0,P.Y)(),{closeDialog:i}=eT(),a=(0,f.og)({params:{key:t}});return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"key"}),(0,r.jsx)(o.XxW,{value:t})]}),a.data&&(0,r.jsx)(o.xrM,{children:(0,r.jsx)("div",{className:"flex flex-col gap-2 mt-2 mb-2",children:a.data.map(e=>(0,r.jsx)(o.rUS,{color:"accent",underline:"hover",size:"12",noWrap:!0,onClick:()=>{n(()=>(0,A.gD)(e.name)),i()},children:e.name},e.name))})})]})}},additions:{render:function(e){let{value:t}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"flex justify-between w-full gap-2",children:(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"additions"})}),t&&(0,r.jsx)(o.xrM,{children:(0,r.jsx)("div",{className:"flex flex-wrap gap-2 mb-2",children:t.map(e=>(0,r.jsx)("div",{children:(0,r.jsx)(o.XxW,{value:e,label:"contract ID"})},e))})})]})}},removals:{render:function(e){let{value:t}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"flex justify-between w-full gap-2",children:(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"removals"})}),t&&(0,r.jsx)(o.xrM,{children:(0,r.jsx)("div",{className:"flex flex-col gap-2 mb-2",children:Object.entries(t).map(e=>{let[t,n]=e;return(0,r.jsxs)("div",{className:"flex gap-2 justify-between w-full",children:[(0,r.jsx)(o.XxW,{value:t,label:"contract ID"}),(0,r.jsx)(o.ua7,{content:n,children:(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:n})})]},t)})})})]})}},error:{render:e=>{let{value:t}=e;return(0,r.jsx)("div",{className:"flex flex-col w-full gap-2",children:(0,r.jsx)(o.UQy,{type:"single",children:(0,r.jsxs)(o.Qdk,{value:"error",variant:"ghost",children:[(0,r.jsx)(o.o48,{children:(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"error"})}),(0,r.jsx)(o.vF,{children:(0,r.jsx)(o.xvT,{color:"contrast",children:t})})]})})})}},hint:{render:e=>{let{value:t}=e;return(0,r.jsx)("div",{className:"flex flex-col w-full gap-2",children:(0,r.jsx)(o.xvT,{color:"contrast",children:t})})}},allowance:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"allowance"}),(0,r.jsx)(o.YKL,{variant:"value",value:new(ep())(t)})]})}},balance:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"balance"}),(0,r.jsx)(o.YKL,{variant:"value",value:new(ep())(t)})]})}},address:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"address"}),(0,r.jsx)(o.XxW,{value:t,type:"address"})]})}},account:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"account"}),(0,r.jsx)(o.XxW,{value:t})]})}}};var eE=n(54155),ek=n(63955);let eS={name:""};function e_(e){let{trigger:t,open:n,onOpenChange:a}=e,{id:s,closeDialog:l}=eT(),u=(0,f.sg)(),c=(0,ek.cI)({mode:"all",defaultValues:eS}),d=(0,i.useCallback)(async e=>{let t=await u.delete({params:{name:e.name}});t.error?(0,o.OHV)(t.error):((0,o.OPV)("Bucket permanently deleted."),c.reset(),l())},[c,u,l]),h=(0,i.useMemo)(()=>({name:{type:"text",title:"Name",placeholder:s,validation:{required:"required",validate:{notDefault:()=>"default"!==s||"cannot delete default bucket",equals:e=>e===s||"bucket name does not match"}}}}),[s]),p=(0,o.WsO)(h);return(0,r.jsx)(o.VqE,{title:"Delete Bucket",trigger:t,open:n,onOpenChange:e=>{e||c.reset(eS),a(e)},contentVariants:{className:"w-[400px]"},onSubmit:c.handleSubmit(d,p),children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(o.nvN,{size:"14",children:"Before you delete a bucket you must ensure that it is empty. Re-enter the bucket name to confirm the removal."}),(0,r.jsx)("div",{children:(0,r.jsx)(o.EKh,{color:"gray",children:s})}),(0,r.jsx)(o.yEL,{name:"name",form:c,fields:h,autoComplete:"off"}),(0,r.jsx)(o.ZqQ,{variant:"red",form:c,children:"Delete"})]})})}let eC={name:""};function eO(e){let{trigger:t,open:n,onOpenChange:a}=e,{closeDialog:s}=eT(),l=(0,f.oV)(),u=(0,ek.cI)({mode:"all",defaultValues:eC}),c=(0,i.useCallback)(async e=>{let t=await l.post({payload:{name:e.name}});t.error?(0,o.OHV)(t.error):((0,o.OPV)("Bucket created."),u.reset(),s())},[u,l,s]),d=(0,i.useMemo)(()=>({name:{type:"text",title:"Name",placeholder:"photos, backups, etc",validation:{required:"required"}}}),[]),h=(0,o.WsO)(d);return(0,r.jsx)(o.VqE,{title:"Create Bucket",trigger:t,open:n,onOpenChange:e=>{e||u.reset(eC),a(e)},contentVariants:{className:"w-[400px]"},onSubmit:u.handleSubmit(c,h),children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(o.nvN,{size:"14",children:"A bucket is an isolated collection of files."}),(0,r.jsx)(o.yEL,{name:"name",form:u,fields:d,autoComplete:"off"}),(0,r.jsx)(o.ZqQ,{form:u,children:"Create bucket"})]})})}let eM=(0,i.createContext)({}),eT=()=>(0,i.useContext)(eM);function eA(e){let{children:t}=e,n=function(){let[e,t]=(0,i.useState)(),[n,r]=(0,i.useState)(),o=(0,i.useCallback)((e,n)=>{t(e),r(n)},[t,r]),[a,s]=(0,i.useState)(),l=(0,i.useCallback)(e=>{t("confirm"),s(e)},[t,s]),u=(0,i.useCallback)(()=>{t(void 0),r(void 0),s(void 0)},[t,r,s]),c=(0,i.useCallback)(e=>{e||u()},[u]);return{dialog:e,id:n,openDialog:o,confirm:a,openConfirmDialog:l,closeDialog:u,onOpenChange:c}}();return(0,r.jsx)(eM.Provider,{value:n,children:t})}function eP(){var e;let{dialog:t,openDialog:n,onOpenChange:i,closeDialog:a,confirm:s,openConfirmDialog:l}=eT(),u=(0,f.Wl)(),c=(0,f.Tu)();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(q,{open:"cmdk"===t,onOpenChange:i,setOpen:()=>n("cmdk")}),(0,r.jsx)(o.DLL,{open:"settings"===t,onOpenChange:i}),(0,r.jsx)(em,{}),(0,r.jsx)(o.YNn,{address:null===(e=c.data)||void 0===e?void 0:e.address,isValidating:c.isValidating,open:"addressDetails"===t,onOpenChange:e=>e?n(t):a()}),(0,r.jsx)(ev,{}),(0,r.jsx)(o.D_D,{open:"connectPeer"===t,connect:e=>u.post({payload:e}),onOpenChange:e=>e?n(t):a()}),(0,r.jsx)(eO,{open:"filesCreateBucket"===t,onOpenChange:e=>e?n(t):a()}),(0,r.jsx)(e_,{open:"filesDeleteBucket"===t,onOpenChange:e=>e?n(t):a()}),(0,r.jsx)(X,{open:"filesCreateDirectory"===t,onOpenChange:e=>e?n(t):a()}),(0,r.jsx)(ef,{open:"filesSearch"===t,onOpenChange:e=>e?n(t):a()}),(0,r.jsx)(es,{open:"hostsManageAllowBlock"===t,onOpenChange:e=>e?n(t):a()}),(0,r.jsx)(el.g,{open:"hostsFilterAddress"===t,onOpenChange:e=>e?n(t):a()}),(0,r.jsx)(eE.a,{open:"hostsFilterPublicKey"===t,onOpenChange:e=>e?n(t):a()}),(0,r.jsx)(eu.p,{open:"contractsFilterAddress"===t,onOpenChange:e=>e?n(t):a()}),(0,r.jsx)(ec.C,{open:"contractsFilterPublicKey"===t,onOpenChange:e=>e?n(t):a()}),(0,r.jsx)(ex,{open:"alerts"===t,onOpenChange:e=>e?n(t):a()}),(0,r.jsx)(o.QHy,{open:"confirm"===t,params:s,onOpenChange:e=>e?l(s):a()})]})}},48528:function(e,t,n){"use strict";n.d(t,{Z:function(){return L},Y:function(){return D}});var r=n(52322),i=n(23305),o=n(5632),a=n(2784),s=n(88242),l=n(96206),u=n(86450),c=n(9969),d=n(91652);function f(e){let{path:t}=e,n=(0,c.wy)({params:(0,d.W0)(t),config:{swr:{dedupingInterval:5e3}}});return(0,r.jsxs)(i.Xiv,{disabled:!n.data,onSelect:()=>{n.data&&(0,i.vQq)(JSON.stringify(n.data.object,null,2),"object metadata")},children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(s.olJ,{})}),"Copy metadata"]})}function h(e){let{path:t}=e,{downloadFiles:n,getFileUrl:o}=D(),l=function(){let{openConfirmDialog:e}=(0,u.Rh)(),t=(0,c.xw)();return(0,a.useCallback)(n=>e({title:"Delete file",action:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.Jrl,{}),"Delete"]}),variant:"red",body:(0,r.jsxs)("div",{className:"flex flex-col",children:[(0,r.jsx)(i.nvN,{size:"14",children:"Are you sure you would like to delete the following file:"}),(0,r.jsx)(i.nvN,{size:"14",font:"mono",className:"break-words",children:n})]}),onConfirm:async()=>{let e=await t.delete({params:(0,d.W0)(n)});e.error&&(0,i.OHV)("Error deleting file."),(0,i.OPV)("Successfully deleted file.")}}),[e,t])}();return(0,r.jsxs)(i.h_2,{trigger:(0,r.jsx)(i.zxk,{variant:"ghost",icon:"hover",children:(0,r.jsx)(s.c_L,{})}),contentProps:{align:"start"},children:[(0,r.jsx)(i.Juw,{children:"Actions"}),(0,r.jsxs)(i.Xiv,{onSelect:async()=>{n([t])},children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(s.vzB,{})}),"Download file"]}),(0,r.jsxs)(i.Xiv,{onSelect:()=>l(t),children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(s.Jrl,{})}),"Delete file"]}),(0,r.jsx)(i.Juw,{children:"Copy"}),(0,r.jsxs)(i.Xiv,{onSelect:()=>{(0,i.vQq)(o(t,!1),"file URL")},children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(s.olJ,{})}),"Copy URL"]}),(0,r.jsxs)(i.Xiv,{onSelect:()=>{(0,i.E5z)(o(t,!0),(0,r.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,r.jsx)(i.xvT,{children:"Copied authenticated file URL to clipboard."}),(0,r.jsxs)(i.xvT,{children:["The authenticated URL contains the ",(0,r.jsx)(i.EKh,{children:"renterd"})," ","password, be careful when pasting or sharing the URL."]})]}),{icon:(0,r.jsx)("div",{className:"!flex-none w-5",children:(0,r.jsx)(s.qdM,{className:"w-5 text-amber-600"})}),duration:1e4,className:"!max-w-[1200px]"})},children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(s.olJ,{})}),"Copy authenticated URL"]}),(0,r.jsx)(f,{path:t})]})}function p(e){let{path:t,size:n}=e,o=function(){let{openConfirmDialog:e}=(0,u.Rh)(),t=(0,c.xw)();return(0,a.useCallback)((n,o)=>e({title:"Delete directory",action:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.Jrl,{}),"Delete"]}),variant:"red",body:(0,r.jsxs)("div",{className:"flex flex-col",children:[(0,r.jsxs)(i.nvN,{size:"14",children:["Are you sure you would like to delete the following directory which contains ",(0,l.vW)(o)," of data:"]}),(0,r.jsx)(i.nvN,{size:"14",font:"mono",className:"break-words",children:n})]}),onConfirm:async()=>{let e=await t.delete({params:{...(0,d.W0)(n),batch:!0}});e.error&&(0,i.OHV)("Error deleting directory."),(0,i.OPV)("Successfully deleted directory.")}}),[e,t])}();return(0,r.jsxs)(i.h_2,{trigger:(0,r.jsx)(i.zxk,{variant:"ghost",icon:"hover",children:(0,r.jsx)(s.ROc,{size:16})}),contentProps:{align:"start"},children:[(0,r.jsx)(i.Juw,{children:"Actions"}),(0,r.jsxs)(i.Xiv,{onSelect:()=>{o(t,n)},children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(s.Jrl,{})}),"Delete directory"]})]})}var m=n(6391),v=n.n(m),g=n(82439),y=n(82851),b=n(829),x=n.n(b);function w(e){var t,n,o;let{path:a,isUploading:s,type:l,health:u,size:f}=e,h="directory"===l,p=(0,c.wy)({disabled:s||h,params:(0,d.W0)(a),config:{swr:{dedupingInterval:5e3}}}),{displayHealth:m,label:v}=(0,g.B)({health:u,size:f,isDirectory:h});if(p.isValidating)return(0,r.jsx)(j,{displayHealth:m,label:v,children:(0,r.jsx)("div",{className:"flex justify-center my-2",children:(0,r.jsx)(i.xgg,{})})});if(!(null===(t=p.data)||void 0===t?void 0:t.object))return(0,r.jsx)(j,{displayHealth:m,label:v,children:(0,r.jsx)(i.xvT,{size:"12",children:"Error fetching slab metadata."})});let y=x()(p.data.object.slabs.map(e=>({...e.slab,contractSetShards:function(e){let{totalShards:t,minShards:n,health:r}=e,i=Math.ceil(r*(t-n)),o=i+n;return o<=0?0:o>t?t:o}({totalShards:e.slab.shards.length,minShards:e.slab.minShards,health:e.slab.health})})),"contractSetShards"),{partialSlab:b}=p.data.object;return(0,r.jsx)(j,{className:y.length>15?"h-[300px]":"",displayHealth:m,label:v,minShards:b?b.minShards:null===(n=y[0])||void 0===n?void 0:n.minShards,totalShards:b?b.totalShards:null===(o=y[0])||void 0===o?void 0:o.shards.length,children:b?(0,r.jsx)(i.xvT,{size:"12",color:"verySubtle",className:"flex items-center justify-center my-2",font:"mono",children:"partial slab"}):y.map(e=>(0,r.jsxs)("div",{className:"flex justify-between gap-2",children:[(0,r.jsxs)(i.xvT,{size:"12",color:"subtle",className:"flex items-center",font:"mono",children:["Slab ",e.key.replace("key:","").slice(0,4),":"]}),(0,r.jsxs)(i.xvT,{size:"12",className:"flex items-center",children:[e.contractSetShards,"/",e.shards.length]})]},e.key))})}function j(e){let{className:t,displayHealth:n,label:o,children:a,minShards:s,totalShards:l}=e;return(0,r.jsxs)("div",{className:(0,y.cx)("z-10 flex flex-col pb-1 -mx-1 overflow-hidden",t),children:[(0,r.jsxs)("div",{className:"flex justify-between gap-2 pt-0.5 pb-px px-2",children:[(0,r.jsx)(i.xvT,{size:"12",children:o}),(0,r.jsxs)(i.xvT,{size:"12",children:[(100*n).toFixed(0),"%"]})]}),s&&l?(0,r.jsxs)("div",{className:"flex justify-between gap-2 pt-0.5 pb-px px-2",children:[(0,r.jsx)(i.xvT,{size:"12",color:"subtle",children:"redundancy"}),(0,r.jsxs)(i.xvT,{size:"12",color:"subtle",children:[s," of ",l]})]}):null,(0,r.jsx)("div",{className:"px-2",children:(0,r.jsx)(i.Z0O,{className:"w-full my-1"})}),(0,r.jsx)("div",{className:"flex-1 overflow-hidden",children:(0,r.jsx)(i.xrM,{children:(0,r.jsx)("div",{className:"px-2",children:a})})})]})}function E(e){let{name:t,isUploading:n,type:o,health:a,size:s}=e,l="directory"===o,{displayHealth:u,label:c,color:d,icon:f}=(0,g.B)({health:a,size:s,isDirectory:l});return l?".."===t?null:(0,r.jsx)(i.zsw,{rootProps:{openDelay:100},trigger:(0,r.jsx)(i.xvT,{color:d,className:"flex cursor-pointer",children:f}),children:(0,r.jsx)("div",{className:"z-10 flex flex-col -mx-1 overflow-hidden",children:(0,r.jsxs)("div",{className:"flex justify-between gap-2 py-0.5 px-2",children:[(0,r.jsx)(i.xvT,{size:"12",children:c}),(0,r.jsxs)(i.xvT,{size:"12",children:[(100*u).toFixed(0),"%"]})]})})}):n?(0,r.jsx)(i.xgg,{}):(0,r.jsx)(i.zsw,{rootProps:{openDelay:100},trigger:(0,r.jsx)(i.xvT,{color:d,className:"flex cursor-pointer",children:f}),children:(0,r.jsx)(w,{...e})})}function k(e){let{name:t}=e,{openDialog:n}=(0,u.Rh)();return(0,r.jsxs)(i.h_2,{trigger:(0,r.jsx)(i.zxk,{variant:"ghost",icon:"hover",children:(0,r.jsx)(s.fi8,{size:16})}),contentProps:{align:"start"},children:[(0,r.jsx)(i.Juw,{children:"Actions"}),(0,r.jsxs)(i.Xiv,{disabled:"default"===t,onSelect:()=>{n("filesDeleteBucket",t)},children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(s.Jrl,{})}),"Delete bucket"]})]})}n(65680);let S=[{id:"type",label:"",fixed:!0,cellClassName:"w-[50px] !pl-2 !pr-2 [&+*]:!pl-0",render:function(e){let{data:{isUploading:t,type:n,name:o,path:a,size:l}}=e,{setActiveDirectory:u}=D();return t?(0,r.jsx)(i.zxk,{variant:"ghost",state:"waiting",children:(0,r.jsx)(s.c_L,{})}):".."===o?(0,r.jsx)(i.zxk,{variant:"ghost",icon:"hover",onClick:e=>{e.stopPropagation(),u(e=>e.slice(0,-1))},children:(0,r.jsx)(s.ROc,{size:16})}):"bucket"===n?(0,r.jsx)(k,{name:o}):"directory"===n?(0,r.jsx)(p,{path:a,size:l}):(0,r.jsx)(h,{path:a})}},{id:"name",label:"name",category:"general",contentClassName:"max-w-[600px]",render:function(e){let{data:{name:t,type:n}}=e,{setActiveDirectory:o}=D();return"bucket"===n?(0,r.jsx)(i.xvT,{ellipsis:!0,color:"accent",weight:"semibold",className:"cursor-pointer",onClick:e=>{e.stopPropagation(),o(()=>[t])},children:t}):"directory"===n?".."===t?(0,r.jsx)(i.xvT,{ellipsis:!0,color:"accent",weight:"semibold",className:"cursor-pointer",onClick:e=>{e.stopPropagation(),o(e=>e.slice(0,-1))},children:t}):(0,r.jsx)(i.xvT,{ellipsis:!0,color:"accent",weight:"semibold",className:"cursor-pointer",onClick:e=>{e.stopPropagation(),o(e=>e.concat(t.slice(0,-1)))},children:t}):(0,r.jsx)(i.xvT,{ellipsis:!0,weight:"semibold",children:t})}},{id:"size",label:"size",contentClassName:"justify-end",render:function(e){let{data:{type:t,name:n,size:o,isUploading:a}}=e;return"bucket"===t?null:a?(0,r.jsx)(i.xgg,{}):".."===n?null:(0,r.jsx)(i.m2c,{size:"12",value:new(v())(o),variant:"value",color:"subtle",format:e=>(0,l.vW)(e.toNumber())})}},{id:"health",label:"health",contentClassName:"justify-center",render:function(e){let{data:t}=e;return"bucket"===t.type?null:(0,r.jsx)(E,{...t})}}];var _=n(81471),C=n(12436),O=n.n(C),M=n(2850),T=n(28460),A=n.n(T),P=n(79381),N=n(13242);let R=(0,a.createContext)({}),D=()=>(0,a.useContext)(R);function L(e){let{children:t}=e,n=function(){let e=(0,o.useRouter)(),t=Number(e.query.limit||20),n=Number(e.query.offset||0),r=(0,a.useMemo)(()=>(e.query.path||[]).map(decodeURIComponent),[e.query.path]),s=(0,a.useMemo)(()=>r[0],[r]),l=(0,a.useMemo)(()=>(0,d.rd)(r)+"/",[r]),u=(0,a.useCallback)(t=>{let n=t(r);e.push("/files/"+n.map(encodeURIComponent).join("/"))},[e,r]),{uploadFiles:f,uploadsList:h,uploadCancel:p}=function(e){let{activeDirectoryPath:t}=e,n=(0,c.ZM)(),[r,o]=(0,a.useState)({}),s=(0,a.useCallback)(e=>{o(t=>({...t,[e.path]:{id:e.path,path:e.path,bucket:e.bucket,name:e.name,size:e.size,loaded:e.loaded,isUploading:!0,controller:e.controller,type:"file"}}))},[o]),l=(0,a.useCallback)(e=>{o(t=>t[e.path]?{...t,[e.path]:{...t[e.path],path:e.path,loaded:e.loaded,size:e.size}}:t)},[o]),u=(0,a.useCallback)(e=>{o(t=>(delete t[e],{...t}))},[o]),f=(0,a.useCallback)(e=>{e.controller.abort()},[]),h=async e=>{e.forEach(async e=>{let o=e.name,a=(0,d.pC)(t,o),c=(0,d.ru)(a);if(r[a]){(0,i.OHV)("Already uploading file: ".concat(a));return}let f=new AbortController,h=O()(e=>l({path:a,loaded:e.loaded,size:e.total}),2e3);s({path:a,name:o,bucket:c,loaded:0,size:1,controller:f});let p=await n.put({params:(0,d.W0)(a),payload:e,config:{axios:{onUploadProgress:h,signal:f.signal}}});p.error?("canceled"===p.error?(0,i.RFt)("File upload canceled."):(0,i.OHV)(p.error),u(a)):(u(a),(0,i.OPV)("Upload complete: ".concat(o)))})},p=(0,a.useMemo)(()=>Object.entries(r).map(e=>e[1]),[r]);return{uploadFiles:h,uploadsList:p,uploadCancel:f}}({activeDirectoryPath:l}),{downloadFiles:m,downloadsList:v,getFileUrl:g,downloadCancel:y}=function(){let e=(0,c.p$)(),[t,n]=(0,a.useState)({}),r=(0,a.useCallback)(e=>{n(t=>({...t,[e.path]:{id:e.path,path:e.path,bucket:e.bucket,name:e.name,size:e.size,loaded:e.loaded,isUploading:!1,controller:e.controller,type:"file"}}))},[n]),o=(0,a.useCallback)(e=>{n(t=>t[e.path]?{...t,[e.path]:{...t[e.path],path:e.path,loaded:e.loaded,size:e.size}}:t)},[n]),s=(0,a.useCallback)(e=>{n(t=>(delete t[e],{...t}))},[n]),l=(0,a.useCallback)(e=>{e.controller.abort()},[]),u=async n=>{n.forEach(async n=>{let a=!1,l=(0,d.ru)(n),u=(0,d.vt)(n);if(t[n]){(0,i.OHV)("Already downloading file: ".concat(n));return}let c=new AbortController,f=O()(e=>{a||o({path:n,loaded:e.loaded,size:e.total})},2e3);r({path:n,name:u,bucket:l,loaded:0,size:1,controller:c});let h=await e.get(u,{params:(0,d.W0)(n),config:{axios:{onDownloadProgress:f,signal:c.signal}}});a=!0,h.error&&("canceled"===h.error?(0,i.RFt)("File download canceled."):(0,i.OHV)(h.error)),s(n)})},f=(0,a.useMemo)(()=>Object.entries(t).map(e=>e[1]),[t]),{settings:h}=(0,M.Hv)(),p=(0,a.useCallback)((e,t)=>{let{bucket:n,key:r}=(0,d.W0)(e),i="/worker/objects/".concat(r,"?bucket=").concat(n),o=h.api||location.origin,a=o.startsWith("https")?"https":"http",s=o.replace("https://","").replace("http://","");return t?"".concat(a,"://:").concat(h.password,"@").concat(s,"/api").concat(i):"".concat(a,"://").concat(s,"/api").concat(i)},[h]);return{downloadFiles:u,downloadsList:f,getFileUrl:p,downloadCancel:l}}(),{response:b,dataset:w}=function(e){let{activeDirectoryPath:t,uploadsList:n}=e,r=(0,c.B$)(),o=(0,d.ru)(t),a=(0,c.Jv)({disabled:!o,params:(0,d.W0)(t),config:{swr:{refreshInterval:(0,i.sWj)(1)}}}),{dataset:s}=(0,N.G)(),l=(0,P.ZP)(a.isValidating||r.isValidating?null:[a.data,n,s,r.data,o,t],()=>{var e,i;let s={};o?a.data&&(null===(i=a.data.entries)||void 0===i||i.forEach(e=>{let{name:t,size:n,health:r}=e,i=(0,d.M7)(o,t);s[i]={id:i,path:i,bucket:o,size:n,health:r,name:(0,d.vt)(t),type:(0,d.IQ)(t)?"directory":"file"}}),n.filter(e=>{let{path:n,name:r}=e;return n===(0,d.pC)(t,r)}).forEach(e=>{s[e.path]=e})):null===(e=r.data)||void 0===e||e.forEach(e=>{let{name:t}=e,n=(0,d.wv)(t,"");s[t]={id:n,path:n,bucket:t,size:0,health:0,name:t,type:"bucket"}});let l=x()(A()(s).map(e=>e[1]),"path");return l},{keepPreviousData:!0});return{response:a,dataset:l.data}}({activeDirectoryPath:l,uploadsList:h}),{configurableColumns:j,enabledColumns:E,sortableColumns:k,toggleColumnVisibility:C,setColumnsVisible:T,setColumnsHidden:R,toggleSort:D,setSortDirection:L,setSortField:F,sortField:z,sortDirection:V,resetDefaultColumnVisibility:I}=(0,i.oy6)("renterd/v0/objects",{columns:S,columnsDefaultVisible:_.gd,sortOptions:_.Fo,defaultSortField:_.nw}),{filters:Z,setFilter:B,removeFilter:H,removeLastFilter:U,resetFilters:W}=(0,i.Wdu)(),q=(0,i._4u)({dataset:w,filters:Z,sortField:z,sortDirection:V}),$=(null==q?void 0:q.length)||0,K=(0,a.useMemo)(()=>q?r.length>0&&q.length>0?[{id:"..",name:"..",path:"..",type:"directory"},...q]:q:null,[q]),Y=(0,a.useMemo)(()=>S.filter(e=>e.fixed||E.includes(e.id)),[E]),G=(0,i.c2j)(q,b.isValidating,b.error,Z),X=0===r.length,J=1===r.length,Q=r.length>0;return{isViewingBuckets:X,isViewingABucket:Q,isViewingRootOfABucket:J,activeBucket:s,activeDirectory:r,setActiveDirectory:u,activeDirectoryPath:l,dataState:G,limit:t,offset:n,datasetPage:K,pageCount:$,datasetCount:(null==q?void 0:q.length)||0,columns:Y,uploadFiles:f,uploadsList:h,uploadCancel:p,downloadFiles:m,downloadsList:v,downloadCancel:y,configurableColumns:j,enabledColumns:E,sortableColumns:k,toggleColumnVisibility:C,setColumnsVisible:T,setColumnsHidden:R,toggleSort:D,setSortDirection:L,setSortField:F,sortField:z,filters:Z,setFilter:B,removeFilter:H,removeLastFilter:U,resetFilters:W,sortDirection:V,resetDefaultColumnVisibility:I,getFileUrl:g}}();return(0,r.jsx)(R.Provider,{value:n,children:t})}},91652:function(e,t,n){"use strict";function r(e,t){let n=t.startsWith("/")?t.slice(1):t;return e+n}function i(e,t){let n=r(e,t);return n.endsWith("/")?n:n+"/"}function o(e,t){return"".concat(e).concat(t)}function a(e){return e.split("/")[0]}function s(e){return{bucket:a(e),key:(function(e){let t=e.split("/").slice(1).join("/");return"/".concat(t)})(e).slice(1).split("/").map(encodeURIComponent).join("/")}}function l(e){let t=e.split("/");return e.endsWith("/")?"".concat(t[t.length-2],"/"):t[t.length-1]}function u(e){return e.endsWith("/")}function c(e){return u(e)?e.slice(0,-1).split("/"):e.split("/").slice(0,-1)}function d(e){return e.join("/")}n.d(t,{IQ:function(){return u},M7:function(){return o},W0:function(){return s},gD:function(){return c},pC:function(){return r},rd:function(){return d},ru:function(){return a},vt:function(){return l},wv:function(){return i}})},81471:function(e,t,n){"use strict";n.d(t,{Fo:function(){return o},gd:function(){return r},nw:function(){return i}});let r=["type","name","size","health"],i="name",o=[{id:"name",label:"name",category:"general"}]},19513:function(e,t,n){"use strict";n.d(t,{x:function(){return el},l:function(){return es}});var r,i,o=n(52322),a=n(23305),s=n(9969),l=n(2784);let u=["allow","netAddress","publicKey","lastScan","knownSince","totalScans","uptime","hasContract","ap_usable","ap_scoreOverall"];var c=n(5632),d=n(88242),f=n(96206),h=n(19785),p=n(66700),m=n(88811);function v(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function g(e,t){return(0,h.Z)(2,arguments),function(e,t){(0,h.Z)(2,arguments);var n=(0,p.Z)(e).getTime(),r=v(t);return new Date(n+r)}(e,-v(t))}function y(e){(0,h.Z)(1,arguments);var t=(0,p.Z)(e),n=t.getUTCDay();return t.setUTCDate(t.getUTCDate()-((n<1?7:0)+n-1)),t.setUTCHours(0,0,0,0),t}function b(e){(0,h.Z)(1,arguments);var t=(0,p.Z)(e),n=t.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var i=y(r),o=new Date(0);o.setUTCFullYear(n,0,4),o.setUTCHours(0,0,0,0);var a=y(o);return t.getTime()>=i.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function x(e,t){(0,h.Z)(1,arguments);var n=t||{},r=n.locale,i=r&&r.options&&r.options.weekStartsOn,o=null==i?0:v(i),a=null==n.weekStartsOn?o:v(n.weekStartsOn);if(!(a>=0&&a<=6))throw RangeError("weekStartsOn must be between 0 and 6 inclusively");var s=(0,p.Z)(e),l=s.getUTCDay();return s.setUTCDate(s.getUTCDate()-((l=1&&l<=7))throw RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var u=new Date(0);u.setUTCFullYear(r+1,0,l),u.setUTCHours(0,0,0,0);var c=x(u,t),d=new Date(0);d.setUTCFullYear(r,0,l),d.setUTCHours(0,0,0,0);var f=x(d,t);return n.getTime()>=c.getTime()?r+1:n.getTime()>=f.getTime()?r:r-1}function j(e,t){for(var n=Math.abs(e).toString();n.length0?n:1-n;return j("yy"===t?r%100:r,t.length)},M:function(e,t){var n=e.getUTCMonth();return"M"===t?String(n+1):j(n+1,2)},d:function(e,t){return j(e.getUTCDate(),t.length)},a:function(e,t){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:function(e,t){return j(e.getUTCHours()%12||12,t.length)},H:function(e,t){return j(e.getUTCHours(),t.length)},m:function(e,t){return j(e.getUTCMinutes(),t.length)},s:function(e,t){return j(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length;return j(Math.floor(e.getUTCMilliseconds()*Math.pow(10,n-3)),t.length)}},k={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"};function S(e,t){var n=e>0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),o=r%60;return 0===o?n+String(i):n+String(i)+(t||"")+j(o,2)}function _(e,t){return e%60==0?(e>0?"-":"+")+j(Math.abs(e)/60,2):C(e,t)}function C(e,t){var n=e>0?"-":"+",r=Math.abs(e);return n+j(Math.floor(r/60),2)+(t||"")+j(r%60,2)}var O={G:function(e,t,n){var r=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){var r=e.getUTCFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return E.y(e,t)},Y:function(e,t,n,r){var i=w(e,r),o=i>0?i:1-i;return"YY"===t?j(o%100,2):"Yo"===t?n.ordinalNumber(o,{unit:"year"}):j(o,t.length)},R:function(e,t){return j(b(e),t.length)},u:function(e,t){return j(e.getUTCFullYear(),t.length)},Q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return j(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return j(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){var r=e.getUTCMonth();switch(t){case"M":case"MM":return E.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){var r=e.getUTCMonth();switch(t){case"L":return String(r+1);case"LL":return j(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){var i=function(e,t){(0,h.Z)(1,arguments);var n=(0,p.Z)(e);return Math.round((x(n,t).getTime()-(function(e,t){(0,h.Z)(1,arguments);var n=t||{},r=n.locale,i=r&&r.options&&r.options.firstWeekContainsDate,o=null==i?1:v(i),a=null==n.firstWeekContainsDate?o:v(n.firstWeekContainsDate),s=w(e,t),l=new Date(0);return l.setUTCFullYear(s,0,a),l.setUTCHours(0,0,0,0),x(l,t)})(n,t).getTime())/6048e5)+1}(e,r);return"wo"===t?n.ordinalNumber(i,{unit:"week"}):j(i,t.length)},I:function(e,t,n){var r=function(e){(0,h.Z)(1,arguments);var t=(0,p.Z)(e);return Math.round((y(t).getTime()-(function(e){(0,h.Z)(1,arguments);var t=b(e),n=new Date(0);return n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0),y(n)})(t).getTime())/6048e5)+1}(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):j(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):E.d(e,t)},D:function(e,t,n){var r=function(e){(0,h.Z)(1,arguments);var t=(0,p.Z)(e),n=t.getTime();return t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0),Math.floor((n-t.getTime())/864e5)+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):j(r,t.length)},E:function(e,t,n){var r=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){var i=e.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return j(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){var i=e.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return j(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){var r=e.getUTCDay(),i=0===r?7:r;switch(t){case"i":return String(i);case"ii":return j(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){var r,i=e.getUTCHours();switch(r=12===i?k.noon:0===i?k.midnight:i/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){var r,i=e.getUTCHours();switch(r=i>=17?k.evening:i>=12?k.afternoon:i>=4?k.morning:k.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){var r=e.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return E.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):E.H(e,t)},K:function(e,t,n){var r=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):j(r,t.length)},k:function(e,t,n){var r=e.getUTCHours();return(0===r&&(r=24),"ko"===t)?n.ordinalNumber(r,{unit:"hour"}):j(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):E.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):E.s(e,t)},S:function(e,t){return E.S(e,t)},X:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();if(0===i)return"Z";switch(t){case"X":return _(i);case"XXXX":case"XX":return C(i);default:return C(i,":")}},x:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"x":return _(i);case"xxxx":case"xx":return C(i);default:return C(i,":")}},O:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+S(i,":");default:return"GMT"+C(i,":")}},z:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+S(i,":");default:return"GMT"+C(i,":")}},t:function(e,t,n,r){return j(Math.floor((r._originalDate||e).getTime()/1e3),t.length)},T:function(e,t,n,r){return j((r._originalDate||e).getTime(),t.length)}};function M(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}}function T(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}}var A={p:T,P:function(e,t){var n,r=e.match(/(P+)(p+)?/)||[],i=r[1],o=r[2];if(!o)return M(e,t);switch(i){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;default:n=t.dateTime({width:"full"})}return n.replace("{{date}}",M(i,t)).replace("{{time}}",T(o,t))}},P=n(1645),N=["D","DD"],R=["YY","YYYY"];function D(e,t,n){if("YYYY"===e)throw RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("YY"===e)throw RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("D"===e)throw RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("DD"===e)throw RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"))}var L=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,F=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,z=/^'([^]*?)'?$/,V=/''/g,I=/[a-zA-Z]/;function Z(e,t,n){(0,h.Z)(2,arguments);var r=String(t),i=n||{},o=i.locale||m.Z,a=o.options&&o.options.firstWeekContainsDate,s=null==a?1:v(a),l=null==i.firstWeekContainsDate?s:v(i.firstWeekContainsDate);if(!(l>=1&&l<=7))throw RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var u=o.options&&o.options.weekStartsOn,c=null==u?0:v(u),d=null==i.weekStartsOn?c:v(i.weekStartsOn);if(!(d>=0&&d<=6))throw RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!o.localize)throw RangeError("locale must contain localize property");if(!o.formatLong)throw RangeError("locale must contain formatLong property");var f=(0,p.Z)(e);if(!function(e){return(0,h.Z)(1,arguments),(!!function(e){return(0,h.Z)(1,arguments),e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}(e)||"number"==typeof e)&&!isNaN(Number((0,p.Z)(e)))}(f))throw RangeError("Invalid time value");var y=(0,P.Z)(f),b=g(f,y),x={firstWeekContainsDate:l,weekStartsOn:d,locale:o,_originalDate:f};return r.match(F).map(function(e){var t=e[0];return"p"===t||"P"===t?(0,A[t])(e,o.formatLong,x):e}).join("").match(L).map(function(n){if("''"===n)return"'";var r=n[0];if("'"===r)return n.match(z)[1].replace(V,"'");var a=O[r];if(a)return i.useAdditionalWeekYearTokens||-1===R.indexOf(n)||D(n,t,e),i.useAdditionalDayOfYearTokens||-1===N.indexOf(n)||D(n,t,e),a(b,n,o.localize,x);if(r.match(I))throw RangeError("Format string contains an unescaped latin alphabet character `"+r+"`");return n}).join("")}var B=n(29193);function H(e){(0,h.Z)(1,arguments);var t=(0,p.Z)(e);return t.setHours(0,0,0,0),t}var U=n(848),W=n(2850),q=n(6391),$=n.n(q);let K=[{id:"actions",label:"",fixed:!0,category:"general",cellClassName:"w-[50px] !pl-2 !pr-4 [&+*]:!pl-0",render:e=>{let{data:t}=e;return(0,o.jsx)(U.G,{address:t.netAddress,publicKey:t.publicKey})}},{id:"allow",label:"allowed",category:"general",contentClassName:"justify-center",render:function(e){var t;let{data:n}=e,r=(0,s.s2)({config:{swr:{dedupingInterval:5e3}}}),i=!!(null===(t=r.data)||void 0===t?void 0:t.length);return(0,o.jsx)(a.ua7,{side:"right",content:(i?"Allowlist ".concat(n.isOnAllowlist?"allows this host.":"does not allow this host."):"Allowlist is inactive.")+" Blocklist ".concat(n.isOnBlocklist?"blocks this host.":"does not block this host."),children:(0,o.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,o.jsx)("div",{className:"mt-[5px]",children:(0,o.jsx)(a.xvT,{color:n.isBlocked?"red":"green",children:n.isBlocked?(0,o.jsx)(d.SmH,{}):(0,o.jsx)(d.DI$,{})})}),(0,o.jsxs)("div",{className:"flex flex-col",children:[(0,o.jsx)(a.xvT,{size:"10",color:n.isOnBlocklist?"red":"verySubtle",noWrap:!0,children:"Blocklist"}),(0,o.jsx)(a.xvT,{size:"10",color:i?n.isOnAllowlist?"green":"red":"verySubtle",noWrap:!0,children:"Allowlist"})]})]})})}},{id:"ap_usable",label:"usable",category:"autopilot",render:e=>{let{data:t,context:n}=e;return n.isAutopilotConfigured?(0,o.jsx)(a.ua7,{side:"right",content:t.usable?"Host is usable":"Host is not usable",children:(0,o.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,o.jsx)("div",{className:"mt-[5px]",children:(0,o.jsx)(a.xvT,{color:t.usable?"green":"red",children:t.usable?(0,o.jsx)(d.DI$,{}):(0,o.jsx)(d.SmH,{})})}),(0,o.jsx)("div",{className:"flex flex-col",children:t.unusableReasons.map(e=>(0,o.jsx)(a.xvT,{size:"10",noWrap:!0,children:e},e))})]})}):(0,o.jsx)(a.ua7,{side:"right",content:"Autopilot is not configured",children:(0,o.jsx)("div",{className:"mt-[5px]",children:(0,o.jsx)(a.xvT,{color:"subtle",children:(0,o.jsx)(d.I98,{})})})})}},{id:"ap_gouging",label:"gouging",category:"autopilot",render:e=>{let{data:t,context:n}=e;return n.isAutopilotConfigured?(0,o.jsx)(a.ua7,{side:"right",content:t.gouging?"Host is price gouging":"Host is not price gouging",children:(0,o.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,o.jsx)("div",{className:"mt-[5px]",children:(0,o.jsx)(a.xvT,{color:t.gouging?"red":"subtle",children:t.gouging?(0,o.jsx)(d.SmH,{}):(0,o.jsx)(d.I98,{})})}),(0,o.jsxs)("div",{className:"flex flex-col",children:[Object.entries(t.gougingBreakdown.v2).filter(e=>{let[t,n]=e;return n&&"string"==typeof n}).map(e=>{let[t,n]=e;return(0,o.jsx)(a.xvT,{size:"10",noWrap:!0,children:n},"v2"+t)}),Object.entries(t.gougingBreakdown.v3).filter(e=>{let[t,n]=e;return n&&"string"==typeof n}).map(e=>{let[t,n]=e;return(0,o.jsx)(a.xvT,{size:"10",noWrap:!0,children:n},"v3"+t)})]})]})}):(0,o.jsx)(a.ua7,{side:"right",content:"Autopilot is not configured",children:(0,o.jsx)("div",{className:"mt-[5px]",children:(0,o.jsx)(a.xvT,{color:"subtle",children:(0,o.jsx)(d.I98,{})})})})}},{id:"lastScan",label:"last scan",category:"general",render:function(e){let{data:t}=e,{workflows:n}=(0,W.D)(),r=n.find(e=>{var n;return e.path.startsWith(s.RF)&&(null===(n=e.payload)||void 0===n?void 0:n.hostKey)===t.publicKey});if(r)return(0,o.jsx)(a.xgg,{});let i=(0,B.Z)(new Date(t.lastScan),new Date,{addSuffix:!0}),l="",u=null,c="subtle";return t.lastScan||(l="host has not been scanned",u=(0,o.jsx)(d.I98,{}),c="subtle"),t.lastScan&&!t.lastScanSuccess&&(l="host scan failed ".concat(i),u=(0,o.jsx)(d.SmH,{}),c="red"),t.lastScan&&t.lastScanSuccess&&(l="host scan succeeded ".concat(i),u=(0,o.jsx)(d.DI$,{}),c="green"),(0,o.jsx)(a.ua7,{side:"right",content:l,children:(0,o.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,o.jsx)("div",{className:"mt-[5px]",children:(0,o.jsx)(a.xvT,{color:c,children:u})}),(0,o.jsxs)("div",{className:"flex flex-col",children:[(0,o.jsx)(a.xvT,{size:"12",noWrap:!0,children:i}),(0,o.jsx)(a.xvT,{color:"subtle",size:"10",noWrap:!0,children:Z(new Date(t.lastScan),"Pp")})]})]})})}},{id:"hasContract",label:"active contract",category:"general",contentClassName:"w-[50px]",render:e=>{let{data:t}=e,n=t.activeContractsCount.gt(0);return(0,o.jsx)(a.ua7,{side:"right",content:n?"Host has active contract":"Host does not have an active contract",children:(0,o.jsx)("div",{className:"mt-[5px]",children:(0,o.jsx)(a.xvT,{color:n?"green":"subtle",children:n?(0,o.jsx)(d.DI$,{}):(0,o.jsx)(d.I98,{})})})})}},{id:"netAddress",label:"address",category:"general",render:e=>{let{data:t}=e;return(0,o.jsx)(a.XxW,{value:t.netAddress,type:"ip",size:"12",label:"host address"})}},{id:"publicKey",label:"public key",category:"general",render:e=>{let{data:t}=e;return(0,o.jsx)(a.XxW,{value:t.publicKey,size:"12",label:"host public key"})}},{id:"knownSince",label:"known since",category:"general",render:e=>{let{data:t}=e;return(0,o.jsxs)("div",{className:"flex flex-col",children:[(0,o.jsxs)(a.xvT,{size:"12",noWrap:!0,children:[(0,B.Z)(new Date,new Date(t.knownSince))," old"]}),(0,o.jsx)(a.xvT,{color:"subtle",size:"10",noWrap:!0,children:function(e,t,n){(0,h.Z)(2,arguments);var r=(0,p.Z)(e),i=(0,p.Z)(t),o={},a=o.locale,s=void 0===a?m.Z:a,l=o.weekStartsOn,u=void 0===l?0:l;if(!s.localize)throw RangeError("locale must contain localize property");if(!s.formatLong)throw RangeError("locale must contain formatLong property");if(!s.formatRelative)throw RangeError("locale must contain formatRelative property");var c=function(e,t){(0,h.Z)(2,arguments);var n=H(e),r=H(t);return Math.round((n.getTime()-(0,P.Z)(n)-(r.getTime()-(0,P.Z)(r)))/864e5)}(r,i);if(isNaN(c))throw RangeError("Invalid time value");var d=g(r,(0,P.Z)(r)),f=g(i,(0,P.Z)(i));return Z(r,s.formatRelative(c<-6?"other":c<-1?"lastWeek":c<0?"yesterday":c<1?"today":c<2?"tomorrow":c<7?"nextWeek":"other",d,f,{locale:s,weekStartsOn:u}),{locale:s,weekStartsOn:u})}(new Date(t.knownSince),new Date)})]})}},{id:"totalScans",label:"total scans",category:"general",contentClassName:"w-[120px] justify-end",render:e=>{let{data:t}=e;return(0,o.jsx)(a.m2c,{size:"12",value:t.totalScans,variant:"value",format:e=>(0,f.yF)(e.toNumber())})}},{id:"uptime",label:"uptime",category:"general",contentClassName:"w-[120px] justify-end",render:e=>{let{data:t}=e;return(0,o.jsx)(a.m2c,{size:"12",value:t.uptime.div(1e9).div(60).div(60).div(24),variant:"value",format:e=>(0,f.yF)(e,{fixed:e.isZero()?0:2,units:"days"})})}},{id:"downtime",label:"downtime",category:"general",contentClassName:"w-[120px] justify-end",render:e=>{let{data:t}=e;return(0,o.jsx)(a.m2c,{size:"12",value:t.downtime.div(1e9).div(60).div(60).div(24),variant:"value",format:e=>(0,f.yF)(e,{fixed:e.isZero()?0:2,units:"days"})})}},{id:"totalInteractions",label:"total interactions",category:"general",contentClassName:"w-[120px] justify-end",render:e=>{let{data:t}=e;return(0,o.jsx)(a.m2c,{size:"12",value:t.totalInteractions,variant:"value",format:e=>(0,f.yF)(e)})}},{id:"successfulInteractions",label:"successful interactions",category:"general",contentClassName:"w-[120px] justify-end",render:e=>{let{data:t}=e;return(0,o.jsx)(a.m2c,{size:"12",value:t.successfulInteractions,variant:"value",format:e=>(0,f.yF)(e.toNumber())})}},{id:"failedInteractions",label:"failed interactions",category:"general",contentClassName:"w-[120px] justify-end",render:e=>{let{data:t}=e;return(0,o.jsx)(a.m2c,{size:"12",value:t.failedInteractions,variant:"value",format:e=>(0,f.yF)(e.toNumber())})}},{id:"contractCount",label:"contract count",category:"general",contentClassName:"w-[120px] justify-end",render:e=>{let{data:t}=e;return(0,o.jsx)(a.m2c,{size:"12",value:t.activeContractsCount,variant:"value",format:e=>(0,f.yF)(e.toNumber())})}},{id:"ap_scoreOverall",label:"overall score",category:"autopilot",contentClassName:"w-[120px] justify-end",render:e=>{let{data:t,context:n}=e;return n.isAutopilotConfigured?(0,o.jsx)(a.m2c,{size:"12",value:t.score,variant:"value",format:e=>e.toPrecision(2)}):(0,o.jsx)(a.ua7,{content:"Autopilot is not configured",children:(0,o.jsx)(a.xvT,{color:"verySubtle",children:"-"})})}},{id:"ap_scoreAge",label:"age score",category:"autopilot",contentClassName:"w-[120px] justify-end",render:e=>{let{data:t,context:n}=e;return n.isAutopilotConfigured?(0,o.jsx)(a.m2c,{size:"12",value:t.scoreBreakdown.age,variant:"value",format:e=>e.toPrecision(2)}):(0,o.jsx)(a.ua7,{content:"Autopilot is not configured",children:(0,o.jsx)(a.xvT,{color:"verySubtle",children:"-"})})}},{id:"ap_scoreCollateral",label:"collateral score",category:"autopilot",contentClassName:"w-[120px] justify-end",render:e=>{let{data:t,context:n}=e;return n.isAutopilotConfigured?(0,o.jsx)(a.m2c,{size:"12",value:t.scoreBreakdown.collateral,variant:"value",format:e=>e.toPrecision(2)}):(0,o.jsx)(a.ua7,{content:"Autopilot is not configured",children:(0,o.jsx)(a.xvT,{color:"verySubtle",children:"-"})})}},{id:"ap_scoreInteractions",label:"interactions score",category:"autopilot",contentClassName:"w-[120px] justify-end",render:e=>{let{data:t,context:n}=e;return n.isAutopilotConfigured?(0,o.jsx)(a.m2c,{size:"12",value:t.scoreBreakdown.interactions,variant:"value",format:e=>e.toPrecision(2)}):(0,o.jsx)(a.ua7,{content:"Autopilot is not configured",children:(0,o.jsx)(a.xvT,{color:"verySubtle",children:"-"})})}},{id:"ap_scorePrices",label:"prices score",category:"autopilot",contentClassName:"w-[120px] justify-end",render:e=>{let{data:t,context:n}=e;return n.isAutopilotConfigured?(0,o.jsx)(a.m2c,{size:"12",value:t.scoreBreakdown.prices,variant:"value",format:e=>e.toPrecision(2)}):(0,o.jsx)(a.ua7,{content:"Autopilot is not configured",children:(0,o.jsx)(a.xvT,{color:"verySubtle",children:"-"})})}},{id:"ap_scoreStorageRemaining",label:"storage remaining score",category:"autopilot",contentClassName:"w-[120px] justify-end",render:e=>{let{data:t,context:n}=e;return n.isAutopilotConfigured?(0,o.jsx)(a.m2c,{size:"12",value:t.scoreBreakdown.storageRemaining,variant:"value",format:e=>e.toPrecision(2)}):(0,o.jsx)(a.ua7,{content:"Autopilot is not configured",children:(0,o.jsx)(a.xvT,{color:"verySubtle",children:"-"})})}},{id:"ap_scoreUptime",label:"uptime score",category:"autopilot",contentClassName:"w-[120px] justify-end",render:e=>{let{data:t,context:n}=e;return n.isAutopilotConfigured?(0,o.jsx)(a.m2c,{size:"12",value:t.scoreBreakdown.uptime,variant:"value",format:e=>e.toPrecision(2)}):(0,o.jsx)(a.ua7,{content:"Autopilot is not configured",children:(0,o.jsx)(a.xvT,{color:"verySubtle",children:"-"})})}},{id:"ap_scoreVersion",label:"version score",category:"autopilot",contentClassName:"w-[120px] justify-end",render:e=>{let{data:t,context:n}=e;return n.isAutopilotConfigured?(0,o.jsx)(a.m2c,{size:"12",value:t.scoreBreakdown.version,variant:"value",format:e=>n.isAutopilotConfigured?"-":e.toPrecision(2)}):(0,o.jsx)(a.ua7,{content:"Autopilot is not configured",children:(0,o.jsx)(a.xvT,{color:"verySubtle",children:"-"})})}},{id:"hpt_accountbalancecost",label:"account balance cost",category:"priceTable",contentClassName:"w-[120px] justify-end",render:Y("priceTable","accountbalancecost")},{id:"hpt_collateralcost",label:"collateral cost",category:"priceTable",contentClassName:"w-[120px] justify-end",render:Y("priceTable","collateralcost")},{id:"hpt_contractprice",label:"contract price",category:"priceTable",contentClassName:"w-[120px] justify-end",render:Y("priceTable","contractprice")},{id:"hpt_downloadbandwidthcost",label:"download bandwidth cost",category:"priceTable",contentClassName:"w-[120px] justify-end",render:Y("priceTable","downloadbandwidthcost")},{id:"hpt_dropsectorsbasecost",label:"drop sectors base cost",category:"priceTable",contentClassName:"w-[120px] justify-end",render:Y("priceTable","dropsectorsbasecost")},{id:"hpt_dropsectorsunitcost",label:"drop sectors unit cost",category:"priceTable",contentClassName:"w-[120px] justify-end",render:Y("priceTable","dropsectorsunitcost")},{id:"hpt_expiry",label:"expiry",category:"priceTable",contentClassName:"w-[120px] justify-end",render:G("priceTable","dropsectorsunitcost")},{id:"hpt_fundaccountcost",label:"fund account cost",category:"priceTable",contentClassName:"w-[120px] justify-end",render:Y("priceTable","fundaccountcost")},{id:"hpt_hassectorbasecost",label:"has sector cost",category:"priceTable",contentClassName:"w-[120px] justify-end",render:Y("priceTable","hassectorbasecost")},{id:"hpt_hostblockheight",label:"host block height",category:"priceTable",contentClassName:"w-[120px] justify-end",render:G("priceTable","hostblockheight")},{id:"hpt_initbasecost",label:"init base cost",category:"priceTable",contentClassName:"w-[120px] justify-end",render:Y("priceTable","initbasecost")},{id:"hpt_latestrevisioncost",label:"latest revision cost",category:"priceTable",contentClassName:"w-[120px] justify-end",render:Y("priceTable","latestrevisioncost")},{id:"hpt_maxcollateral",label:"max collateral",category:"priceTable",contentClassName:"w-[120px] justify-end",render:Y("priceTable","maxcollateral")},{id:"hpt_maxduration",label:"max duration",category:"priceTable",contentClassName:"w-[120px] justify-end",render:G("priceTable","maxduration")},{id:"hpt_memorytimecost",label:"memory time cost",category:"priceTable",contentClassName:"w-[120px] justify-end",render:Y("priceTable","memorytimecost")},{id:"hpt_readbasecost",label:"read base cost",category:"priceTable",contentClassName:"w-[120px] justify-end",render:Y("priceTable","readbasecost")},{id:"hpt_readlengthcost",label:"read length cost",category:"priceTable",contentClassName:"w-[120px] justify-end",render:Y("priceTable","readlengthcost")},{id:"hpt_registryentriesleft",label:"registry entries left",category:"priceTable",contentClassName:"w-[120px] justify-end",render:G("priceTable","registryentriesleft")},{id:"hpt_registryentriestotal",label:"registry entries total",category:"priceTable",contentClassName:"w-[120px] justify-end",render:G("priceTable","registryentriestotal")},{id:"hpt_renewcontractcost",label:"renew contract cost",category:"priceTable",contentClassName:"w-[120px] justify-end",render:Y("priceTable","renewcontractcost")},{id:"hpt_revisionbasecost",label:"revision base cost",category:"priceTable",contentClassName:"w-[120px] justify-end",render:Y("priceTable","renewcontractcost")},{id:"hpt_subscriptionmemorycost",label:"subscription memory cost",category:"priceTable",contentClassName:"w-[120px] justify-end",render:Y("priceTable","subscriptionmemorycost")},{id:"hpt_subscriptionnotificationcost",label:"subscription notification cost",category:"priceTable",contentClassName:"w-[120px] justify-end",render:Y("priceTable","subscriptionnotificationcost")},{id:"hpt_swapsectorcost",label:"swap sector cost",category:"priceTable",contentClassName:"w-[120px] justify-end",render:Y("priceTable","swapsectorcost")},{id:"hpt_txnfeemaxrecommended",label:"txn fee max recommended",category:"priceTable",contentClassName:"w-[120px] justify-end",render:Y("priceTable","txnfeemaxrecommended")},{id:"hpt_txnfeeminrecommended",label:"txn fee min recommended",category:"priceTable",contentClassName:"w-[120px] justify-end",render:Y("priceTable","txnfeeminrecommended")},{id:"hpt_uid",label:"UID",category:"priceTable",contentClassName:"w-[120px] justify-end",render:X("priceTable","uid")},{id:"hpt_updatepricetablecost",label:"update price table cost",category:"priceTable",contentClassName:"w-[120px] justify-end",render:Y("priceTable","updatepricetablecost")},{id:"hpt_uploadbandwidthcost",label:"upload bandwidth cost",category:"priceTable",contentClassName:"w-[120px] justify-end",render:Y("priceTable","uploadbandwidthcost")},{id:"hpt_validity",label:"validity",category:"priceTable",contentClassName:"w-[120px] justify-end",render:G("priceTable","validity")},{id:"hpt_windowsize",label:"window size",category:"priceTable",contentClassName:"w-[120px] justify-end",render:G("priceTable","windowsize")},{id:"hpt_writebasecost",label:"write base cost",category:"priceTable",contentClassName:"w-[120px] justify-end",render:Y("priceTable","writebasecost")},{id:"hpt_writelengthcost",label:"write length cost",category:"priceTable",contentClassName:"w-[120px] justify-end",render:Y("priceTable","writelengthcost")},{id:"hpt_writestorecost",label:"write store cost",category:"priceTable",contentClassName:"w-[120px] justify-end",render:Y("priceTable","writestorecost")},{id:"hs_acceptingcontracts",label:"accepting contracts",category:"hostSettings",contentClassName:"w-[120px] justify-end",render:(r="settings",i="acceptingcontracts",function(e){let{data:t}=e;return t[r]?(0,o.jsx)("div",{className:"mt-[5px]",children:(0,o.jsx)(a.xvT,{color:t[r][i]?"green":"red",children:t[r][i]?(0,o.jsx)(d.DI$,{}):(0,o.jsx)(d.SmH,{})})}):null})},{id:"hs_baserpcprice",label:"base RPC price",category:"hostSettings",contentClassName:"w-[120px] justify-end",render:Y("settings","baserpcprice")},{id:"hs_collateral",label:"collateral",category:"hostSettings",contentClassName:"w-[120px] justify-end",render:Y("settings","collateral")},{id:"hs_contractprice",label:"contract price",category:"hostSettings",contentClassName:"w-[120px] justify-end",render:Y("settings","contractprice")},{id:"hs_downloadbandwidthprice",label:"download bandwidth price",category:"hostSettings",contentClassName:"w-[120px] justify-end",render:Y("settings","downloadbandwidthprice")},{id:"hs_ephemeralaccountexpiry",label:"ephemeral account expiry",category:"hostSettings",contentClassName:"w-[120px] justify-end",render:G("settings","ephemeralaccountexpiry")},{id:"hs_maxcollateral",label:"max collateral",category:"hostSettings",contentClassName:"w-[120px] justify-end",render:Y("settings","maxcollateral")},{id:"hs_maxdownloadbatchsize",label:"max download batch size",category:"hostSettings",contentClassName:"w-[120px] justify-end",render:J("settings","maxdownloadbatchsize")},{id:"hs_maxduration",label:"max duration",category:"hostSettings",contentClassName:"w-[120px] justify-end",render:G("settings","maxduration")},{id:"hs_maxephemeralaccountbalance",label:"max ephemeral account balance",category:"hostSettings",contentClassName:"w-[120px] justify-end",render:Y("settings","maxephemeralaccountbalance")},{id:"hs_maxrevisebatchsize",label:"max revise batch size",category:"hostSettings",contentClassName:"w-[120px] justify-end",render:J("settings","maxrevisebatchsize")},{id:"hs_netaddress",label:"net address",category:"hostSettings",contentClassName:"w-[120px] justify-end",render:X("settings","netaddress")},{id:"hs_remainingstorage",label:"remaining storage",category:"hostSettings",contentClassName:"w-[120px] justify-end",render:J("settings","remainingstorage")},{id:"hs_revisionnumber",label:"revision number",category:"hostSettings",contentClassName:"w-[120px] justify-end",render:G("settings","revisionnumber")},{id:"hs_sectoraccessprice",label:"sector access price",category:"hostSettings",contentClassName:"w-[120px] justify-end",render:Y("settings","sectoraccessprice")},{id:"hs_sectorsize",label:"sector size",category:"hostSettings",contentClassName:"w-[120px] justify-end",render:J("settings","sectorsize")},{id:"hs_siamuxport",label:"siamux port",category:"hostSettings",contentClassName:"w-[120px] justify-end",render:G("settings","siamuxport")},{id:"hs_storageprice",label:"storage price",category:"hostSettings",contentClassName:"w-[120px] justify-end",render:Y("settings","storageprice")},{id:"hs_totalstorage",label:"total storage",category:"hostSettings",contentClassName:"w-[120px] justify-end",render:J("settings","totalstorage")},{id:"hs_unlockhash",label:"unlock hash",category:"hostSettings",contentClassName:"w-[120px] justify-end",render:X("settings","unlockhash")},{id:"hs_uploadbandwidthprice",label:"upload bandwidth price",category:"hostSettings",contentClassName:"w-[120px] justify-end",render:Y("settings","uploadbandwidthprice")},{id:"hs_version",label:"verison",category:"hostSettings",contentClassName:"w-[120px] justify-end",render:X("settings","version")},{id:"hs_windowsize",label:"window size",category:"hostSettings",contentClassName:"w-[120px] justify-end",render:G("settings","windowsize")}].map(e=>({...e,..."autopilot"===e.category?{icon:(0,o.jsx)(d.n6M,{className:"relative opacity-50 scale-75"}),label:e.label,tip:"autopilot: ".concat(e.label)}:"hostSettings"===e.category?{icon:(0,o.jsx)(d.shL,{className:"relative top-px opacity-50 scale-75"}),label:e.label,tip:"host settings (RHPv2): ".concat(e.label)}:"priceTable"===e.category?{icon:(0,o.jsx)(d.B4q,{className:"relative top-px opacity-50 scale-75"}),label:e.label,tip:"price table (RHPv3): ".concat(e.label)}:{label:e.label,tip:e.label}}));function Y(e,t){return function(n){let{data:r}=n;return r[e]?(0,o.jsx)(a.YKL,{size:"12",value:new($())(r[e][t]||0),variant:"value"}):null}}function G(e,t,n){return function(r){let{data:i}=r;return i[e]?(0,o.jsx)(a.m2c,{size:"12",value:new($())(i[e][t]||0),variant:"value",format:e=>(0,f.yF)(e,{abbreviated:n})}):null}}function X(e,t){return function(n){let{data:r}=n;return r[e]?(0,o.jsx)(a.XxW,{value:r[e][t],size:"12"}):null}}function J(e,t){return function(n){let{data:r}=n;return r[e]?(0,o.jsx)(a.xvT,{size:"12",weight:"semibold",ellipsis:!0,children:(0,f.vW)(r[e][t])}):null}}var Q=n(13242);function ee(e,t){return{id:e.publicKey,netAddress:e.netAddress,publicKey:e.publicKey,lastScanSuccess:e.interactions.LastScanSuccess,lastScan:e.interactions.LastScan,knownSince:e.knownSince,uptime:new($())(e.interactions.Uptime||0),downtime:new($())(e.interactions.Downtime||0),successfulInteractions:new($())(e.interactions.SuccessfulInteractions||0),totalInteractions:new($())(e.interactions.SuccessfulInteractions+e.interactions.FailedInteractions||0),failedInteractions:new($())(e.interactions.FailedInteractions||0),totalScans:new($())(e.interactions.TotalScans||0),activeContractsCount:new($())((null==t?void 0:t.filter(t=>t.hostKey===e.publicKey).length)||0),activeContracts:(null==t?void 0:t.filter(t=>t.hostKey===e.publicKey))||[],priceTable:e.priceTable,settings:e.settings}}function et(e){let{host:t,allowlist:n,blocklist:r,isAllowlistActive:i}=e,o=!!(null==n?void 0:n.find(e=>e===t.publicKey)),a=!!(null==r?void 0:r.find(e=>{if(e===t.netAddress)return!0;try{let n=new URL("https://"+t.netAddress).hostname;return e===n}catch(e){return!1}}));return{isOnAllowlist:o,isOnBlocklist:a,isBlocked:a||!(!i||o)}}function en(e){return{score:new($())((null==e?void 0:e.score)||0),scoreBreakdown:{age:new($())((null==e?void 0:e.scoreBreakdown.age)||0),collateral:new($())((null==e?void 0:e.scoreBreakdown.collateral)||0),interactions:new($())((null==e?void 0:e.scoreBreakdown.interactions)||0),prices:new($())((null==e?void 0:e.scoreBreakdown.prices)||0),storageRemaining:new($())((null==e?void 0:e.scoreBreakdown.storageRemaining)||0),uptime:new($())((null==e?void 0:e.scoreBreakdown.uptime)||0),version:new($())((null==e?void 0:e.scoreBreakdown.version)||0)},gougingBreakdown:(null==e?void 0:e.gougingBreakdown)||{v2:{},v3:{}},gouging:null==e?void 0:e.gouging,unusableReasons:(null==e?void 0:e.unusableReasons)||[],usable:null==e?void 0:e.usable}}var er=n(91641),ei=n(34444),eo=n(47025);let ea=(0,l.createContext)({}),es=()=>(0,l.useContext)(ea);function el(e){let{children:t}=e,n=function(){var e,t,n,r,i,o,d;let f=(0,c.useRouter)(),[h,p]=(0,l.useState)("list"),m=Number(f.query.limit||50),v=Number(f.query.offset||0),{filters:g,setFilter:y,removeFilter:b,removeLastFilter:x,resetFilters:w}=(0,a.Uu5)(),{dataset:j}=(0,Q.G)(),{autopilot:E}=(0,er.q)(),k=(0,l.useMemo)(()=>{let e=[];g.find(e=>"hasActiveContracts"===e.id)&&j&&(e=j.map(e=>e.hostKey));let t=g.find(e=>"publicKeyEquals"===e.id);return t&&e.push(null==t?void 0:t.value),e.length?e:void 0},[g,j]),S=(0,s.S0)({disabled:g.find(e=>"hasActiveContracts"===e.id)&&!j||"on"!==E.status,payload:{limit:m,offset:v,usabilityMode:(null===(e=g.find(e=>"usabilityMode"===e.id))||void 0===e?void 0:e.value)||"all",filterMode:(null===(t=g.find(e=>"filterMode"===e.id))||void 0===t?void 0:t.value)||"all",addressContains:null===(n=g.find(e=>"addressContains"===e.id))||void 0===n?void 0:n.value,keyIn:k},config:{swr:{errorRetryInterval:2e4,refreshInterval:(0,a.sWj)(1)}}}),_=(0,s.FV)({disabled:"off"!==E.status,payload:{limit:m,offset:v,filterMode:(null===(r=g.find(e=>"filterMode"===e.id))||void 0===r?void 0:r.value)||"all",addressContains:null===(i=g.find(e=>"addressContains"===e.id))||void 0===i?void 0:i.value,keyIn:g.find(e=>"hasActiveContracts"===e.id)&&j?j.map(e=>e.hostKey):void 0},config:{swr:{refreshInterval:(0,a.sWj)(1)}}}),C=(0,s.s2)(),O=(0,s.uf)(),M=!!(null===(o=C.data)||void 0===o?void 0:o.length),{settings:T}=(0,W.Hv)(),A=(0,eo.JL)({disabled:!T.siaCentral,config:{swr:{revalidateOnFocus:!1}}});(0,l.useEffect)(()=>{T.siaCentral||p("list")},[T.siaCentral]);let P=(0,l.useMemo)(()=>{var e;return(null===(e=A.data)||void 0===e?void 0:e.hosts)||[]},[A.data]),N=(0,l.useRef)(ei.N),R=(0,l.useCallback)(e=>{N.current=e},[N]),[D,L]=(0,l.useState)(),F=(0,l.useCallback)(e=>{let t=document.getElementById(e),n=document.getElementById("scroll-hosts");t&&n&&n.scroll({top:t.offsetTop-50,behavior:"smooth"})},[]),z=(0,l.useCallback)((e,t)=>{if(D===e){L(void 0);return}L(e),t&&N.current.moveToLocation(t),F(e)},[L,N,D,F]),V=(0,l.useCallback)((e,t)=>{if(D===e){L(void 0);return}L(e),t?N.current.moveToLocation(t):(0,a.OHV)("Geographic location is unknown for host ".concat((0,a.$Gg)(e,20))),F(e)},[L,N,D,F]),I=(0,l.useCallback)((e,t)=>null,[]),Z=function(e){let{autopilotStatus:t,regularResponse:n,autopilotResponse:r,allContracts:i,allowlist:o,blocklist:a,isAllowlistActive:s,geoHosts:u,onHostSelect:c}=e;return(0,l.useMemo)(()=>{var e,l;return"off"===t?(null===(e=n.data)||void 0===e?void 0:e.map(e=>{let t=u.find(t=>t.public_key===e.publicKey);return{onClick:()=>c(e.publicKey,null==t?void 0:t.location),...ee(e,i),...et({host:e,allowlist:o.data,blocklist:a.data,isAllowlistActive:s}),...en(),location:null==t?void 0:t.location,countryCode:null==t?void 0:t.country_code}}))||null:"on"===t&&(null===(l=r.data)||void 0===l?void 0:l.map(e=>{let t=u.find(t=>t.public_key===e.host.publicKey);return{onClick:()=>c(e.host.publicKey,null==t?void 0:t.location),...ee(e.host,i),...et({host:e.host,allowlist:o.data,blocklist:a.data,isAllowlistActive:s}),...en(e.checks),location:null==t?void 0:t.location,countryCode:null==t?void 0:t.country_code}}))||null},[c,t,n.data,r.data,i,o.data,a.data,s,u])}({autopilotStatus:E.status,autopilotResponse:S,regularResponse:_,allContracts:j,allowlist:C,blocklist:O,isAllowlistActive:M,geoHosts:P,onHostSelect:V}),B=(0,l.useMemo)(()=>"off"===E.status?["autopilot"]:[],[E.status]),{configurableColumns:H,enabledColumns:U,toggleColumnVisibility:q,setColumnsVisible:$,setColumnsHidden:Y,toggleSort:G,setSortDirection:X,setSortField:J,sortField:ea,sortDirection:es,resetDefaultColumnVisibility:el}=(0,a.oy6)("renterd/v0/hosts",{columns:K,columnsDefaultVisible:u,disabledCategories:B}),eu=(0,l.useMemo)(()=>K.filter(e=>U.includes(e.id)),[U]),ec="on"===E.status?S.isValidating:_.isValidating,ed="on"===E.status?S.error:_.error,ef=(0,a.c2j)(Z,ec,ed,g),eh=null===(d=E.state.data)||void 0===d?void 0:d.configured,ep=(0,l.useMemo)(()=>({isAutopilotConfigured:eh}),[eh]),em=(0,l.useMemo)(()=>null==Z?void 0:Z.filter(e=>e.location),[Z]),ev=(0,l.useMemo)(()=>null==Z?void 0:Z.find(e=>e.publicKey===D),[Z,D]);return{setCmd:R,viewMode:h,activeHost:ev,onHostMapHover:I,onHostMapClick:z,setViewMode:p,hostsWithLocation:em,error:ed,dataState:ef,offset:v,limit:m,pageCount:(null==Z?void 0:Z.length)||0,columns:eu,dataset:Z,tableContext:ep,configurableColumns:H,enabledColumns:U,toggleColumnVisibility:q,setColumnsVisible:$,setColumnsHidden:Y,toggleSort:G,setSortDirection:X,setSortField:J,sortField:ea,sortDirection:es,resetDefaultColumnVisibility:el,filters:g,setFilter:y,removeFilter:b,removeLastFilter:x,resetFilters:w}}();return(0,o.jsx)(ea.Provider,{value:n,children:t})}},10917:function(e,t,n){"use strict";n.d(t,{Kg:function(){return o},jY:function(){return i}});var r=n(23305);let i={activeAndUsable:{colorHex:r.O9T.green[600],colorName:"green"},activeAndUnusable:{colorHex:r.O9T.amber[600],colorName:"amber"},potentialHost:{colorHex:r.O9T.blue[600],colorName:"blue"}};function o(e){return e.activeContractsCount.gt(0)&&!e.usable?{status:"activeAndUnusable",...i.activeAndUnusable}:e.activeContractsCount.gt(0)?{status:"activeAndUsable",...i.activeAndUsable}:{status:"potentialHost",...i.potentialHost}}},33571:function(e,t,n){"use strict";n.d(t,{I:function(){return a}});var r=n(23305),i=n(9969),o=n(2784);function a(){let e=(0,i.ni)();return(0,o.useCallback)((t,n)=>{let i=async()=>{let i=await e.put({payload:{add:t,remove:n}});return i.error?((0,r.OHV)(i.error),!1):(t.length&&(0,r.RFt)("".concat(t.map(e=>(0,r.$Gg)(e,20)).join(", ")," added to allowlist")),n.length&&(0,r.RFt)("".concat(n.map(e=>(0,r.$Gg)(e,20)).join(", ")," removed from allowlist")),!0)};return i()},[e])}},98358:function(e,t,n){"use strict";n.d(t,{l:function(){return a}});var r=n(23305),i=n(9969),o=n(2784);function a(){let e=(0,i.Os)();return(0,o.useCallback)((t,n)=>{let i=async()=>{let i=await e.put({payload:{add:t,remove:n}});return i.error?((0,r.OHV)(i.error),!1):(t.length&&(0,r.RFt)("".concat(t.map(e=>(0,r.$Gg)(e,20)).join(", ")," added to blocklist")),n.length&&(0,r.RFt)("".concat(n.map(e=>(0,r.$Gg)(e,20)).join(", ")," removed from blocklist")),!0)};return i()},[e])}},80489:function(e,t,n){"use strict";n.d(t,{a:function(){return i}});var r=n(9969);function i(e){return(0,r.yu)({...e,params:{key:"contractset"}})}},82439:function(e,t,n){"use strict";n.d(t,{B:function(){return a},V:function(){return o}});var r=n(52322),i=n(88242);let o={excellent:1,good:.5,poor:0};function a(e){let{health:t,size:n,isDirectory:a}=e,s="excellent",l="green",u=t,c=(0,r.jsx)(i.Y3p,{});return t1&&(u=1),t<0&&(u=0),{label:s+" health",color:l,icon:c,displayHealth:u}}},34658:function(e,t,n){"use strict";n.d(t,{w:function(){return i}});var r=n(9969);function i(e){return(0,r.yu)({...e,params:{key:"redundancy"}})}},25573:function(e,t,n){"use strict";n.d(t,{n:function(){return a}});var r=n(23305),i=n(2850),o=n(9969);function a(){var e,t,n,a;let{isUnlocked:s}=(0,i.Hv)(),l=(0,o.DQ)({config:{swr:{refreshInterval:e=>(null==e?void 0:e.synced)?(0,r.XBW)(60):(0,r.XBW)(10)}}}),u=(0,o.nH)(),c=l.data?null===(e=l.data)||void 0===e?void 0:e.blockHeight:0,d=(0,o.Tu)({config:{swr:{refreshInterval:e=>(null==e?void 0:e.scanHeight)>=c?(0,r.XBW)(60):(0,r.XBW)(10)}}}),f=s&&c&&u?Number((100*Math.min(c/u,1)).toFixed(1)):0,h=s&&c&&d.data?Number((100*Math.min(d.data.scanHeight/u,1)).toFixed(1)):0;return{isSynced:null===(t=l.data)||void 0===t?void 0:t.synced,isWalletSynced:(null===(n=l.data)||void 0===n?void 0:n.synced)&&(null===(a=d.data)||void 0===a?void 0:a.scanHeight)>=c-1,nodeBlockHeight:c,estimatedBlockHeight:u,syncPercent:f,walletScanPercent:h,moreThan100BlocksToSync:!!c&&!!u&&u-c>100,firstTimeSyncing:!!c&&!!u&&u-c>5e4}}},48201:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return C}});var r=n(52322);n(37832);var i=n(23305),o=n(86450),a=n(48528),s=n(13242),l=n(19513),u=n(2784),c=n(91641),d=n(17286),f=n(88242),h=n(25573),p=n(71930),m=n(4370),v=n(9969),g=n(6391),y=n.n(g),b=n(96206),x=n(2850),w=n(92762);function j(){var e,t,n,a;let{isUnlocked:s}=(0,x.Hv)(),l=(0,c.q)(),{openDialog:u}=(0,o.Rh)(),d=(0,v.Tu)(),g=(0,v.e$)({config:{swr:{errorRetryInterval:1e4}}}),[j,k]=(0,w.Z)("v0/renterd/onboarding/maximized",{defaultValue:!0}),S=(0,h.n)(),_=(0,m.F)();if(!s||"on"!==l.autopilot.status)return null;let C=new(y())((null===(e=d.data)||void 0===e?void 0:e.confirmed)||0),O=new(y())((null===(t=g.data)||void 0===t?void 0:t.contracts.allowance)||0),M=null===(n=l.autopilot.state.data)||void 0===n?void 0:n.configured,T=S.isSynced,A=(null===(a=l.autopilot.state.data)||void 0===a?void 0:a.configured)&&d.data&&C.gte(O),P=!_.active,N=[M,T,A,P],R=N.length,D=N.filter(e=>e).length;return R===D?null:j?(0,r.jsx)("div",{className:"z-20 fixed bottom-5 left-1/2 -translate-x-1/2 flex justify-center",children:(0,r.jsx)(i.s_4,{className:"w-[400px] flex flex-col max-h-[600px]",children:(0,r.jsxs)(i.xrM,{children:[(0,r.jsxs)("div",{className:"flex justify-between items-center px-3 py-2 border-b border-gray-200 dark:border-graydark-300",children:[(0,r.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,r.jsx)(i.TRl,{}),(0,r.jsx)(i.xvT,{size:"20",weight:"semibold",children:"Welcome to Sia"})]}),(0,r.jsx)(i.zxk,{variant:"ghost",onClick:()=>k(!1),children:(0,r.jsx)(f.mli,{})})]}),(0,r.jsx)("div",{className:"flex justify-between items-center px-3 py-2 border-b border-gray-200 dark:border-graydark-300",children:(0,r.jsx)(i.xvT,{size:"14",children:"Get set up by completing the following steps. Once they are complete, you can start uploading files."})}),(0,r.jsx)(E,{title:(0,r.jsx)(i.rUS,{href:p._.config.index,ellipsis:!0,size:"14",underline:"hover",children:"Step 1: Configure your storage settings"}),description:"Specify how much data you plan to store and your target price.",action:M?(0,r.jsx)(i.xvT,{color:"green",children:(0,r.jsx)(f.Y3p,{})}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.rUS,{href:p._.config.index,children:(0,r.jsx)(f.V8Q,{})}),(0,r.jsx)(i.xvT,{color:"amber",children:(0,r.jsx)(f.Fs9,{})})]})}),(0,r.jsx)(E,{title:(0,r.jsx)(i.rUS,{href:p._.node.index,underline:"hover",ellipsis:!0,size:"14",children:"Step 2: Wait for the blockchain to sync"}),description:"The blockchain will sync in the background, this takes some time. No user action required.",action:T?(0,r.jsx)(i.xvT,{color:"green",children:(0,r.jsx)(f.Y3p,{})}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(i.xvT,{ellipsis:!0,size:"14",children:[S.syncPercent,"%"]}),(0,r.jsx)(i.xvT,{color:"amber",children:(0,r.jsx)(f.hzZ,{})})]})}),(0,r.jsx)(E,{title:(0,r.jsx)(i.rUS,{href:p._.wallet.view,onClick:()=>u("addressDetails"),ellipsis:!0,size:"14",underline:"hover",children:"Step 3: Fund your wallet"}),description:"Fund your wallet with at least ".concat((0,b.Vz)(O)," siacoin to cover the required allowance.").concat(S.isWalletSynced?"":" Balance will not be accurate until wallet is finished scanning."),action:A?(0,r.jsx)(i.xvT,{color:"green",children:(0,r.jsx)(f.Y3p,{})}):(0,r.jsxs)(r.Fragment,{children:[!S.isWalletSynced&&(0,r.jsx)(i.ua7,{content:"Wallet scanning progress ".concat(S.walletScanPercent,"%"),children:(0,r.jsxs)(i.xvT,{size:"14",children:[S.walletScanPercent,"%"]})}),(0,r.jsx)(i.rUS,{href:p._.wallet.view,onClick:()=>u("addressDetails"),children:(0,r.jsx)(f.V8Q,{})}),(0,r.jsx)(i.xvT,{color:"amber",children:(0,r.jsx)(f.Fs9,{})})]})}),(0,r.jsx)(E,{title:(0,r.jsx)(i.rUS,{href:p._.contracts.index,ellipsis:!0,size:"14",underline:"hover",children:"Step 4: Wait for storage contracts to form"}),description:"Once all other steps are complete, contracts will automatically form. No user action required.",action:P?(0,r.jsx)(i.xvT,{color:"green",children:(0,r.jsx)(f.Y3p,{})}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(i.xvT,{ellipsis:!0,size:"14",children:[_.count,"/",_.required]}),(0,r.jsx)(i.xvT,{color:"amber",children:(0,r.jsx)(f.hzZ,{})})]})})]})})}):(0,r.jsx)("div",{className:"z-30 fixed bottom-5 left-1/2 -translate-x-1/2 flex justify-center",children:(0,r.jsx)(i.zxk,{onClick:()=>k(!0),size:"large",className:"flex gap-3 !px-3",children:(0,r.jsxs)(i.xvT,{className:"flex items-center gap-1",children:[(0,r.jsx)(i.TRl,{}),"Setup: ",D,"/",R," steps complete"]})})})}function E(e){let{title:t,action:n,description:o}=e;return(0,r.jsx)("div",{className:"border-t first:border-t-0 border-gray-200 dark:border-graydark-300 px-3 py-2",children:(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,r.jsx)("div",{className:"flex-1 flex items-center",children:t}),n]}),(0,r.jsx)("div",{className:"pr-5",children:(0,r.jsx)(i.xvT,{size:"12",color:"subtle",children:o})})]})})}function k(e){return void 0!==e.loaded?e.loaded/e.size:1}function S(){let{isUnlocked:e}=(0,x.Hv)(),{uploadsList:t,uploadCancel:n,downloadsList:o,downloadCancel:s}=(0,a.Y)(),[l,c]=(0,u.useState)(!0),d=t.length,h=o.length;return e&&(0!==d||0!==h)?l?(0,r.jsx)("div",{className:"z-30 fixed bottom-5 left-1/2 -translate-x-1/2 flex justify-center",children:(0,r.jsx)(i.s_4,{className:"w-[400px] flex flex-col max-h-[600px]",children:(0,r.jsxs)(i.xrM,{children:[d>0?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"flex justify-between items-center px-3 py-2 border-b border-gray-200 dark:border-graydark-300",children:[(0,r.jsxs)(i.xvT,{size:"16",weight:"semibold",children:["Active uploads (",d,")"]}),(0,r.jsx)(i.zxk,{variant:"ghost",onClick:()=>c(!1),children:(0,r.jsx)(f.mli,{})})]}),t.map(e=>{let t=k(e);return(0,r.jsxs)("div",{className:"flex flex-col gap-1 border-t first:border-t-0 border-gray-200 dark:border-graydark-300 px-3 py-2",children:[(0,r.jsxs)("div",{className:"flex gap-1",children:[(0,r.jsx)(i.xvT,{ellipsis:!0,size:"14",className:"flex-1",children:e.path}),(0,r.jsx)(i.zxk,{tip:"Cancel file upload",variant:"ghost",size:"none",onClick:()=>n(e),children:(0,r.jsx)(f.PcV,{})})]}),(0,r.jsx)(i.kod,{variant:"accent",value:e.loaded,max:e.size,className:1===t?"animate-pulse":""}),(0,r.jsxs)("div",{className:"flex justify-between mt-1",children:[(0,r.jsx)(i.xvT,{size:"12",color:"subtle",children:1===t?"Processing":"Uploading"}),(0,r.jsxs)(i.xvT,{size:"12",color:"subtle",children:[(100*t).toFixed(0),"%"]})]})]},e.path)})]}):null,h>0?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"flex justify-between items-center px-3 py-2 border-b border-gray-200 dark:border-graydark-300",children:[(0,r.jsxs)(i.xvT,{size:"16",weight:"semibold",children:["Active downloads (",h,")"]}),0===d?(0,r.jsx)(i.zxk,{variant:"ghost",onClick:()=>c(!1),children:(0,r.jsx)(f.mli,{})}):null]}),o.map(e=>{let t=k(e);return(0,r.jsxs)("div",{className:"flex flex-col gap-1 border-t first:border-t-0 border-gray-200 dark:border-graydark-300 px-3 py-2",children:[(0,r.jsxs)("div",{className:"flex gap-1",children:[(0,r.jsx)(i.xvT,{ellipsis:!0,size:"14",className:"flex-1",children:e.path}),(0,r.jsx)(i.zxk,{tip:"Cancel file download",variant:"ghost",size:"none",onClick:()=>s(e),children:(0,r.jsx)(f.PcV,{})})]}),(0,r.jsx)(i.kod,{variant:"accent",value:e.loaded,max:e.size,className:1===t?"animate-pulse":""}),(0,r.jsxs)("div",{className:"flex justify-between mt-1",children:[(0,r.jsx)(i.xvT,{size:"12",color:"subtle",children:1===t?"Processing":"Downloading"}),(0,r.jsxs)(i.xvT,{size:"12",color:"subtle",children:[(100*t).toFixed(0),"%"]})]})]},e.path)})]}):null]})})}):(0,r.jsx)("div",{className:"z-30 fixed bottom-5 left-1/2 -translate-x-1/2 flex justify-center",children:(0,r.jsxs)(i.zxk,{onClick:()=>c(!0),className:"flex gap-3",children:[(0,r.jsx)(i.xgg,{}),d?(0,r.jsxs)(i.xvT,{className:"flex gap-1",children:[d,(0,r.jsx)(f.R$6,{className:"opacity-50 scale-75 relative top-px"})]}):null,h?(0,r.jsxs)(i.xvT,{className:"flex gap-1",children:[h&&h,(0,r.jsx)(f.vzB,{className:"opacity-50 scale-75"})]}):null]})}):null}function _(e){let{children:t}=e;return(0,r.jsx)(c.w,{children:(0,r.jsx)(d.iV,{children:(0,r.jsx)(o.Tu,{children:(0,r.jsx)(s.x,{children:(0,r.jsx)(l.x,{children:(0,r.jsxs)(a.Z,{children:[(0,r.jsx)(j,{}),(0,r.jsx)(S,{}),(0,r.jsx)(o.xQ,{}),t]})})})})})})}function C(e){let{Component:t,pageProps:n}=e;return(0,r.jsx)(i.PD$,{fallback:n.fallback,passwordProtectRequestHooks:!0,lockRoutes:p._,children:(0,r.jsx)(_,{children:(0,r.jsx)(t,{...n})})})}},23305:function(e,t,n){"use strict";let r,i,o,a;n.d(t,{UQy:function(){return ld},vF:function(){return lm},Qdk:function(){return lp},o48:function(){return lf},hcY:function(){return _a},tU3:function(){return _n},zXq:function(){return _w},juT:function(){return Sz},Z58:function(){return _3},WVB:function(){return cH},zxk:function(){return lu},EKh:function(){return lP},vRO:function(){return C_},QHy:function(){return Cp},TaT:function(){return Cl},eQh:function(){return lR},HfT:function(){return Cg},wEc:function(){return _6},ncR:function(){return Sp},VqE:function(){return ud},h_2:function(){return cK},Xiv:function(){return cY},Juw:function(){return cG},KpP:function(){return cX},fhJ:function(){return pq},XOF:function(){return Sh},S$c:function(){return SS},QBj:function(){return CC},yEL:function(){return _g},cB7:function(){return Sx},ZqQ:function(){return Sb},IKw:function(){return S_},KZS:function(){return Sw},zsw:function(){return h7},__J:function(){return dt},rUS:function(){return di},Qjf:function(){return da},xgg:function(){return Eu},TRl:function(){return dl},kFS:function(){return cU},FzK:function(){return Cd},Clw:function(){return cB},PD$:function(){return CP},Wxm:function(){return f5},uDJ:function(){return SM},wFK:function(){return ST},s_4:function(){return t3},nvN:function(){return t2},u5Q:function(){return _5},j4H:function(){return f1},hmz:function(){return f2},J2e:function(){return dT},kod:function(){return dU},xrM:function(){return ul},PhF:function(){return f3},Z0O:function(){return cF},DLL:function(){return _J},KJW:function(){return SZ},rsf:function(){return hd},D_D:function(){return _U},xf5:function(){return CU},iA_:function(){return SC},mQc:function(){return fy},nUL:function(){return fw},drW:function(){return fb},SPt:function(){return fx},t6k:function(){return Cy},xvT:function(){return t1},ua7:function(){return ls},mPE:function(){return _W},XxW:function(){return k9},PF9:function(){return Se},m2c:function(){return Sr},YKL:function(){return Sn},QUh:function(){return _0},weF:function(){return _A},YNn:function(){return _K},DmW:function(){return _Y},jrD:function(){return Ct},x5w:function(){return Ce},JWi:function(){return CH},O9T:function(){return vk},vQq:function(){return kQ},E5z:function(){return k0},HLH:function(){return C$},NrH:function(){return j8},k9c:function(){return Er},EJC:function(){return CW},leQ:function(){return k3},Ztc:function(){return _Z},XAn:function(){return Ei},Vkc:function(){return cV},sWj:function(){return j6},ort:function(){return Eo},xLV:function(){return j9},S5V:function(){return _7},okB:function(){return En},AEA:function(){return Et},z$:function(){return t4},XBW:function(){return Es},GXN:function(){return Ea},I13:function(){return k2},cEb:function(){return fj},y70:function(){return fq},OHV:function(){return kG},OPV:function(){return kY},RFt:function(){return k$},$Gg:function(){return k1},_4u:function(){return CV},Wdu:function(){return Cz},Y97:function(){return _t},c2j:function(){return _r},WsO:function(){return _v},Uu5:function(){return CI},fb0:function(){return CB},oy6:function(){return CF},BL0:function(){return j7},mvJ:function(){return _8},ivg:function(){return Ee}});var s,l,u,c,d,f,h,p,m,v,g,y=n(52322),b=n(2784),x=n.t(b,2),w=n(7896),j=n(34540),E=n(26215),k=n(99575);function S(e){let t=e+"CollectionProvider",[n,r]=(0,j.b)(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=e+"CollectionSlot",s=b.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=o(a,n),s=(0,E.e)(t,i.collectionRef);return b.createElement(k.g7,{ref:s},r)}),l=e+"CollectionItemSlot",u="data-radix-collection-item",c=b.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,a=b.useRef(null),s=(0,E.e)(t,a),c=o(l,n);return b.useEffect(()=>(c.itemMap.set(a,{ref:a,...i}),()=>void c.itemMap.delete(a))),b.createElement(k.g7,{[u]:"",ref:s},r)});return[{Provider:e=>{let{scope:t,children:n}=e,r=b.useRef(null),o=b.useRef(new Map).current;return b.createElement(i,{scope:t,itemMap:o,collectionRef:r},n)},Slot:s,ItemSlot:c},function(t){let n=o(e+"CollectionConsumer",t),r=b.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${u}]`)),r=Array.from(n.itemMap.values()),i=r.sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current));return i},[n.collectionRef,n.itemMap]);return r},r]}var _=n(41816),C=n(73597),O=n(72130),M=n(64680),T=n(28245),A=n(26074);let P="Collapsible",[N,R]=(0,j.b)(P),[D,L]=N(P),F=(0,b.forwardRef)((e,t)=>{let{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:o,onOpenChange:a,...s}=e,[l=!1,u]=(0,C.T)({prop:r,defaultProp:i,onChange:a});return(0,b.createElement)(D,{scope:n,disabled:o,contentId:(0,A.M)(),open:l,onOpenToggle:(0,b.useCallback)(()=>u(e=>!e),[u])},(0,b.createElement)(O.WV.div,(0,w.Z)({"data-state":B(l),"data-disabled":o?"":void 0},s,{ref:t})))}),z=(0,b.forwardRef)((e,t)=>{let{__scopeCollapsible:n,...r}=e,i=L("CollapsibleTrigger",n);return(0,b.createElement)(O.WV.button,(0,w.Z)({type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":B(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled},r,{ref:t,onClick:(0,_.M)(e.onClick,i.onOpenToggle)}))}),V="CollapsibleContent",I=(0,b.forwardRef)((e,t)=>{let{forceMount:n,...r}=e,i=L(V,e.__scopeCollapsible);return(0,b.createElement)(T.z,{present:n||i.open},({present:e})=>(0,b.createElement)(Z,(0,w.Z)({},r,{ref:t,present:e})))}),Z=(0,b.forwardRef)((e,t)=>{let{__scopeCollapsible:n,present:r,children:i,...o}=e,a=L(V,n),[s,l]=(0,b.useState)(r),u=(0,b.useRef)(null),c=(0,E.e)(t,u),d=(0,b.useRef)(0),f=d.current,h=(0,b.useRef)(0),p=h.current,m=a.open||s,v=(0,b.useRef)(m),g=(0,b.useRef)();return(0,b.useEffect)(()=>{let e=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,M.b)(()=>{let e=u.current;if(e){g.current=g.current||{transitionDuration:e.style.transitionDuration,animationDuration:e.style.animationDuration,animationFillMode:e.style.animationFillMode},e.style.transitionDuration="0s",e.style.animationDuration="0s",e.style.animationFillMode="none";let t=e.getBoundingClientRect();d.current=t.height,h.current=t.width,v.current||(e.style.transitionDuration=g.current.transitionDuration,e.style.animationDuration=g.current.animationDuration,e.style.animationFillMode=g.current.animationFillMode),l(r)}},[a.open,r]),(0,b.createElement)(O.WV.div,(0,w.Z)({"data-state":B(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!m},o,{ref:c,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":p?`${p}px`:void 0,...e.style}}),m&&i)});function B(e){return e?"open":"closed"}let H="Accordion",U=["Home","End","ArrowDown","ArrowUp"],[W,q,$]=S(H),[K,Y]=(0,j.b)(H,[$,R]),G=R(),X=b.forwardRef((e,t)=>{let{type:n,...r}=e;return b.createElement(W.Provider,{scope:e.__scopeAccordion},"multiple"===n?b.createElement(er,(0,w.Z)({},r,{ref:t})):b.createElement(en,(0,w.Z)({},r,{ref:t})))});X.propTypes={type(e){let t=e.value||e.defaultValue;return e.type&&!["single","multiple"].includes(e.type)?Error("Invalid prop `type` supplied to `Accordion`. Expected one of `single | multiple`."):"multiple"===e.type&&"string"==typeof t?Error("Invalid prop `type` supplied to `Accordion`. Expected `single` when `defaultValue` or `value` is type `string`."):"single"===e.type&&Array.isArray(t)?Error("Invalid prop `type` supplied to `Accordion`. Expected `multiple` when `defaultValue` or `value` is type `string[]`."):null}};let[J,Q]=K(H),[ee,et]=K(H,{collapsible:!1}),en=b.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},collapsible:o=!1,...a}=e,[s,l]=(0,C.T)({prop:n,defaultProp:r,onChange:i});return b.createElement(J,{scope:e.__scopeAccordion,value:s?[s]:[],onItemOpen:l,onItemClose:b.useCallback(()=>o&&l(""),[o,l])},b.createElement(ee,{scope:e.__scopeAccordion,collapsible:o},b.createElement(ea,(0,w.Z)({},a,{ref:t}))))}),er=b.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},...o}=e,[a=[],s]=(0,C.T)({prop:n,defaultProp:r,onChange:i}),l=b.useCallback(e=>s((t=[])=>[...t,e]),[s]),u=b.useCallback(e=>s((t=[])=>t.filter(t=>t!==e)),[s]);return b.createElement(J,{scope:e.__scopeAccordion,value:a,onItemOpen:l,onItemClose:u},b.createElement(ee,{scope:e.__scopeAccordion,collapsible:!0},b.createElement(ea,(0,w.Z)({},o,{ref:t}))))}),[ei,eo]=K(H),ea=b.forwardRef((e,t)=>{let{__scopeAccordion:n,disabled:r,...i}=e,o=b.useRef(null),a=(0,E.e)(o,t),s=q(n),l=(0,_.M)(e.onKeyDown,e=>{var t;if(!U.includes(e.key))return;let n=e.target,r=s().filter(e=>{var t;return!(null!==(t=e.ref.current)&&void 0!==t&&t.disabled)}),i=r.findIndex(e=>e.ref.current===n),o=r.length;if(-1===i)return;e.preventDefault();let a=i;switch(e.key){case"Home":a=0;break;case"End":a=o-1;break;case"ArrowDown":a=i+1;break;case"ArrowUp":(a=i-1)<0&&(a=o-1)}let l=a%o;null===(t=r[l].ref.current)||void 0===t||t.focus()});return b.createElement(ei,{scope:n,disabled:r},b.createElement(W.Slot,{scope:n},b.createElement(O.WV.div,(0,w.Z)({},i,{ref:a,onKeyDown:r?void 0:l}))))}),es="AccordionItem",[el,eu]=K(es),ec=b.forwardRef((e,t)=>{let{__scopeAccordion:n,value:r,...i}=e,o=eo(es,n),a=Q(es,n),s=G(n),l=(0,A.M)(),u=r&&a.value.includes(r)||!1,c=o.disabled||e.disabled;return b.createElement(el,{scope:n,open:u,disabled:c,triggerId:l},b.createElement(F,(0,w.Z)({"data-state":u?"open":"closed"},s,i,{ref:t,disabled:c,open:u,onOpenChange:e=>{e?a.onItemOpen(r):a.onItemClose(r)}})))}),ed=b.forwardRef((e,t)=>{let{__scopeAccordion:n,...r}=e,i=eu("AccordionHeader",n);return b.createElement(O.WV.h3,(0,w.Z)({"data-state":i.open?"open":"closed","data-disabled":i.disabled?"":void 0},r,{ref:t}))}),ef="AccordionTrigger",eh=b.forwardRef((e,t)=>{let{__scopeAccordion:n,...r}=e,i=eu(ef,n),o=et(ef,n),a=G(n);return b.createElement(W.ItemSlot,{scope:n},b.createElement(z,(0,w.Z)({"aria-disabled":i.open&&!o.collapsible||void 0,id:i.triggerId},a,r,{ref:t})))}),ep=b.forwardRef((e,t)=>{let{__scopeAccordion:n,...r}=e,i=eu("AccordionContent",n),o=G(n);return b.createElement(I,(0,w.Z)({role:"region","aria-labelledby":i.triggerId},o,r,{ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}}))});var em=n(82851),ev=n(83317);function eg(e){return e.split("-")[0]}function ey(e){return e.split("-")[1]}function eb(e){return["top","bottom"].includes(eg(e))?"x":"y"}function ex(e){return"y"===e?"height":"width"}function ew(e,t,n){let r,{reference:i,floating:o}=e,a=i.x+i.width/2-o.width/2,s=i.y+i.height/2-o.height/2,l=eb(t),u=ex(l),c=i[u]/2-o[u]/2,d="x"===l;switch(eg(t)){case"top":r={x:a,y:i.y-o.height};break;case"bottom":r={x:a,y:i.y+i.height};break;case"right":r={x:i.x+i.width,y:s};break;case"left":r={x:i.x-o.width,y:s};break;default:r={x:i.x,y:i.y}}switch(ey(t)){case"start":r[l]-=c*(n&&d?-1:1);break;case"end":r[l]+=c*(n&&d?-1:1)}return r}let ej=async(e,t,n)=>{let{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=await (null==a.isRTL?void 0:a.isRTL(t)),l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:c}=ew(l,r,s),d=r,f={},h=0;for(let n=0;n({name:"arrow",options:e,async fn(t){let{element:n,padding:r=0}=null!=e?e:{},{x:i,y:o,placement:a,rects:s,platform:l}=t;if(null==n)return{};let u=eE(r),c={x:i,y:o},d=eb(a),f=ey(a),h=ex(d),p=await l.getDimensions(n),m="y"===d?"top":"left",v="y"===d?"bottom":"right",g=s.reference[h]+s.reference[d]-c[d]-s.floating[h],y=c[d]-s.reference[d],b=await (null==l.getOffsetParent?void 0:l.getOffsetParent(n)),x=b?"y"===d?b.clientHeight||0:b.clientWidth||0:0;0===x&&(x=s.floating[h]);let w=u[m],j=x-p[h]-u[v],E=x/2-p[h]/2+(g/2-y/2),k=eC(w,e_(E,j)),S=("start"===f?u[m]:u[v])>0&&E!==k&&s.reference[h]<=s.floating[h];return{[d]:c[d]-(S?EeM[e])}let eA={start:"end",end:"start"};function eP(e){return e.replace(/start|end/g,e=>eA[e])}let eN=["top","right","bottom","left"];eN.reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]);let eR=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r,i,o;let{placement:a,middlewareData:s,rects:l,initialPlacement:u,platform:c,elements:d}=t,{mainAxis:f=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",flipAlignment:v=!0,...g}=e,y=eg(a),b=p||(y!==u&&v?function(e){let t=eT(e);return[eP(e),t,eP(t)]}(u):[eT(u)]),x=[u,...b],w=await eS(t,g),j=[],E=(null==(n=s.flip)?void 0:n.overflows)||[];if(f&&j.push(w[y]),h){let{main:e,cross:t}=function(e,t,n){void 0===n&&(n=!1);let r=ey(e),i=eb(e),o=ex(i),a="x"===i?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=eT(a)),{main:a,cross:eT(a)}}(a,l,await (null==c.isRTL?void 0:c.isRTL(d.floating)));j.push(w[e],w[t])}if(E=[...E,{placement:a,overflows:j}],!j.every(e=>e<=0)){let e=(null!=(r=null==(i=s.flip)?void 0:i.index)?r:0)+1,t=x[e];if(t)return{data:{index:e,overflows:E},reset:{placement:t}};let n="bottom";switch(m){case"bestFit":{let e=null==(o=E.map(e=>[e,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:o[0].placement;e&&(n=e);break}case"initialPlacement":n=u}if(a!==n)return{reset:{placement:n}}}return{}}}};function eD(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function eL(e){return eN.some(t=>e[t]>=0)}let eF=function(e){let{strategy:t="referenceHidden",...n}=void 0===e?{}:e;return{name:"hide",async fn(e){let{rects:r}=e;switch(t){case"referenceHidden":{let t=eD(await eS(e,{...n,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:eL(t)}}}case"escaped":{let t=eD(await eS(e,{...n,altBoundary:!0}),r.floating);return{data:{escapedOffsets:t,escaped:eL(t)}}}default:return{}}}}},ez=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){let{x:n,y:r}=t,i=await async function(e,t){let{placement:n,platform:r,elements:i}=e,o=await (null==r.isRTL?void 0:r.isRTL(i.floating)),a=eg(n),s=ey(n),l="x"===eb(n),u=["left","top"].includes(a)?-1:1,c=o&&l?-1:1,d="function"==typeof t?t(e):t,{mainAxis:f,crossAxis:h,alignmentAxis:p}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&"number"==typeof p&&(h="end"===s?-1*p:p),l?{x:h*c,y:f*u}:{x:f*u,y:h*c}}(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};function eV(e){return"x"===e?"y":"x"}let eI=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=e,u={x:n,y:r},c=await eS(t,l),d=eb(eg(i)),f=eV(d),h=u[d],p=u[f];if(o){let e="y"===d?"bottom":"right";h=eC(h+c["y"===d?"top":"left"],e_(h,h-c[e]))}a&&(p=eC(p+c["y"===f?"top":"left"],e_(p,p-c["y"===f?"bottom":"right"])));let m=s.fn({...t,[d]:h,[f]:p});return{...m,data:{x:m.x-n,y:m.y-r}}}}},eZ=function(e){return void 0===e&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=e,c={x:n,y:r},d=eb(i),f=eV(d),h=c[d],p=c[f],m="function"==typeof s?s({...o,placement:i}):s,v="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){let e="y"===d?"height":"width",t=o.reference[d]-o.floating[e]+v.mainAxis,n=o.reference[d]+o.reference[e]-v.mainAxis;hn&&(h=n)}if(u){var g,y,b,x;let e="y"===d?"width":"height",t=["top","left"].includes(eg(i)),n=o.reference[f]-o.floating[e]+(t&&null!=(g=null==(y=a.offset)?void 0:y[f])?g:0)+(t?0:v.crossAxis),r=o.reference[f]+o.reference[e]+(t?0:null!=(b=null==(x=a.offset)?void 0:x[f])?b:0)-(t?v.crossAxis:0);pr&&(p=r)}return{[d]:h,[f]:p}}}};function eB(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function eH(e){if(null==e)return window;if(!eB(e)){let t=e.ownerDocument;return t&&t.defaultView||window}return e}function eU(e){return eH(e).getComputedStyle(e)}function eW(e){return eB(e)?"":e?(e.nodeName||"").toLowerCase():""}function eq(){let e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map(e=>e.brand+"/"+e.version).join(" "):navigator.userAgent}function e$(e){return e instanceof eH(e).HTMLElement}function eK(e){return e instanceof eH(e).Element}function eY(e){return"undefined"!=typeof ShadowRoot&&(e instanceof eH(e).ShadowRoot||e instanceof ShadowRoot)}function eG(e){let{overflow:t,overflowX:n,overflowY:r}=eU(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function eX(e){let t=/firefox/i.test(eq()),n=eU(e);return"none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||["transform","perspective"].includes(n.willChange)||t&&"filter"===n.willChange||t&&!!n.filter&&"none"!==n.filter}function eJ(){return!/^((?!chrome|android).)*safari/i.test(eq())}let eQ=Math.min,e0=Math.max,e1=Math.round;function e2(e,t,n){var r,i,o,a;void 0===t&&(t=!1),void 0===n&&(n=!1);let s=e.getBoundingClientRect(),l=1,u=1;t&&e$(e)&&(l=e.offsetWidth>0&&e1(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&e1(s.height)/e.offsetHeight||1);let c=eK(e)?eH(e):window,d=!eJ()&&n,f=(s.left+(d&&null!=(r=null==(i=c.visualViewport)?void 0:i.offsetLeft)?r:0))/l,h=(s.top+(d&&null!=(o=null==(a=c.visualViewport)?void 0:a.offsetTop)?o:0))/u,p=s.width/l,m=s.height/u;return{width:p,height:m,top:h,right:f+p,bottom:h+m,left:f,x:f,y:h}}function e4(e){return((e instanceof eH(e).Node?e.ownerDocument:e.document)||window.document).documentElement}function e3(e){return eK(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function e5(e){return e2(e4(e)).left+e3(e).scrollLeft}function e6(e){return"html"===eW(e)?e:e.assignedSlot||e.parentNode||(eY(e)?e.host:null)||e4(e)}function e8(e){return e$(e)&&"fixed"!==getComputedStyle(e).position?e.offsetParent:null}function e7(e){let t=eH(e),n=e8(e);for(;n&&["table","td","th"].includes(eW(n))&&"static"===getComputedStyle(n).position;)n=e8(n);return n&&("html"===eW(n)||"body"===eW(n)&&"static"===getComputedStyle(n).position&&!eX(n))?t:n||function(e){let t=e6(e);for(eY(t)&&(t=t.host);e$(t)&&!["html","body"].includes(eW(t));){if(eX(t))return t;t=t.parentNode}return null}(e)||t}function e9(e){if(e$(e))return{width:e.offsetWidth,height:e.offsetHeight};let t=e2(e);return{width:t.width,height:t.height}}function te(e,t){var n;void 0===t&&(t=[]);let r=function e(t){let n=e6(t);return["html","body","#document"].includes(eW(n))?t.ownerDocument.body:e$(n)&&eG(n)?n:e(n)}(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),o=eH(r),a=i?[o].concat(o.visualViewport||[],eG(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(te(a))}function tt(e,t,n){return"viewport"===t?ek(function(e,t){let n=eH(e),r=e4(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;let e=eJ();(e||!e&&"fixed"===t)&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}(e,n)):eK(t)?function(e,t){let n=e2(e,!1,"fixed"===t),r=n.top+e.clientTop,i=n.left+e.clientLeft;return{top:r,left:i,x:i,y:r,right:i+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}(t,n):ek(function(e){var t;let n=e4(e),r=e3(e),i=null==(t=e.ownerDocument)?void 0:t.body,o=e0(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=e0(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+e5(e),l=-r.scrollTop;return"rtl"===eU(i||n).direction&&(s+=e0(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}(e4(e)))}let tn={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,o=[..."clippingAncestors"===n?function(e){let t=te(e),n=["absolute","fixed"].includes(eU(e).position)&&e$(e)?e7(e):e;return eK(n)?t.filter(e=>eK(e)&&function(e,t){let n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&eY(n)){let n=t;do{if(n&&e===n)return!0;n=n.parentNode||n.host}while(n)}return!1}(e,n)&&"body"!==eW(e)):[]}(t):[].concat(n),r],a=o[0],s=o.reduce((e,n)=>{let r=tt(t,n,i);return e.top=e0(r.top,e.top),e.right=eQ(r.right,e.right),e.bottom=eQ(r.bottom,e.bottom),e.left=e0(r.left,e.left),e},tt(t,a,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e,i=e$(n),o=e4(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0},s={x:0,y:0};if((i||!i&&"fixed"!==r)&&(("body"!==eW(n)||eG(o))&&(a=e3(n)),e$(n))){let e=e2(n,!0);s.x=e.x+n.clientLeft,s.y=e.y+n.clientTop}return{...t,x:t.x-a.scrollLeft+s.x,y:t.y-a.scrollTop+s.y}},isElement:eK,getDimensions:e9,getOffsetParent:e7,getDocumentElement:e4,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:function(e,t,n){let r=e$(t),i=e4(t),o=e2(e,r&&function(e){let t=e2(e);return e1(t.width)!==e.offsetWidth||e1(t.height)!==e.offsetHeight}(t),"fixed"===n),a={scrollLeft:0,scrollTop:0},s={x:0,y:0};if(r||!r&&"fixed"!==n){if(("body"!==eW(t)||eG(i))&&(a=e3(t)),e$(t)){let e=e2(t,!0);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else i&&(s.x=e5(i))}return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}(t,e7(n),r),floating:{...e9(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===eU(e).direction};function tr(e,t,n,r){void 0===r&&(r={});let{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=!0,animationFrame:s=!1}=r,l=i&&!s,u=o&&!s,c=l||u?[...eK(e)?te(e):[],...te(t)]:[];c.forEach(e=>{l&&e.addEventListener("scroll",n,{passive:!0}),u&&e.addEventListener("resize",n)});let d,f=null;if(a){let r=!0;f=new ResizeObserver(()=>{r||n(),r=!1}),eK(e)&&!s&&f.observe(e),f.observe(t)}let h=s?e2(e):null;return s&&function t(){let r=e2(e);h&&(r.x!==h.x||r.y!==h.y||r.width!==h.width||r.height!==h.height)&&n(),h=r,d=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach(e=>{l&&e.removeEventListener("scroll",n),u&&e.removeEventListener("resize",n)}),null==(e=f)||e.disconnect(),f=null,s&&cancelAnimationFrame(d)}}let ti=(e,t,n)=>ej(e,t,{platform:tn,...n});var to=n(28316),ta="undefined"!=typeof document?b.useLayoutEffect:b.useEffect;function ts(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:i}=void 0===e?{}:e,o=b.useRef(null),a=b.useRef(null),s=function(e){let t=b.useRef(e);return ta(()=>{t.current=e}),t}(i),l=b.useRef(null),[u,c]=b.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[d,f]=b.useState(t);!function e(t,n){let r,i,o;if(t===n)return!0;if(typeof t!=typeof n)return!1;if("function"==typeof t&&t.toString()===n.toString())return!0;if(t&&n&&"object"==typeof t){if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(i=r;0!=i--;)if(!e(t[i],n[i]))return!1;return!0}if((r=(o=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(i=r;0!=i--;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;0!=i--;){let r=o[i];if(("_owner"!==r||!t.$$typeof)&&!e(t[r],n[r]))return!1}return!0}return t!=t&&n!=n}(null==d?void 0:d.map(e=>{let{options:t}=e;return t}),null==t?void 0:t.map(e=>{let{options:t}=e;return t}))&&f(t);let h=b.useCallback(()=>{o.current&&a.current&&ti(o.current,a.current,{middleware:d,placement:n,strategy:r}).then(e=>{p.current&&to.flushSync(()=>{c(e)})})},[d,n,r]);ta(()=>{p.current&&h()},[h]);let p=b.useRef(!1);ta(()=>(p.current=!0,()=>{p.current=!1}),[]);let m=b.useCallback(()=>{if("function"==typeof l.current&&(l.current(),l.current=null),o.current&&a.current){if(s.current){let e=s.current(o.current,a.current,h);l.current=e}else h()}},[h,s]),v=b.useCallback(e=>{o.current=e,m()},[m]),g=b.useCallback(e=>{a.current=e,m()},[m]),y=b.useMemo(()=>({reference:o,floating:a}),[]);return b.useMemo(()=>({...u,update:h,refs:y,reference:v,floating:g}),[u,h,y,v,g])}let tl=e=>{let{element:t,padding:n}=e;return{name:"arrow",options:e,fn(e){if(Object.prototype.hasOwnProperty.call(t,"current")){if(null!=t.current)return eO({element:t.current,padding:n}).fn(e)}else if(t)return eO({element:t,padding:n}).fn(e);return{}}}},tu=(0,b.forwardRef)((e,t)=>{let{children:n,width:r=10,height:i=5,...o}=e;return(0,b.createElement)(O.WV.svg,(0,w.Z)({},o,{ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?n:(0,b.createElement)("polygon",{points:"0,0 30,0 15,10"}))});function tc(e){let[t,n]=(0,b.useState)(void 0);return(0,M.b)(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{let r,i;if(!Array.isArray(t)||!t.length)return;let o=t[0];if("borderBoxSize"in o){let e=o.borderBoxSize,t=Array.isArray(e)?e[0]:e;r=t.inlineSize,i=t.blockSize}else r=e.offsetWidth,i=e.offsetHeight;n({width:r,height:i})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)},[e]),t}let td="Popper",[tf,th]=(0,j.b)(td),[tp,tm]=tf(td),tv=(0,b.forwardRef)((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,o=tm("PopperAnchor",n),a=(0,b.useRef)(null),s=(0,E.e)(t,a);return(0,b.useEffect)(()=>{o.onAnchorChange((null==r?void 0:r.current)||a.current)}),r?null:(0,b.createElement)(O.WV.div,(0,w.Z)({},i,{ref:s}))}),tg="PopperContent",[ty,tb]=tf(tg),[tx,tw]=tf(tg,{hasParent:!1,positionUpdateFns:new Set}),tj=(0,b.forwardRef)((e,t)=>{var n,r,i,o,a,s,l,u;let{__scopePopper:c,side:d="bottom",sideOffset:f=0,align:h="center",alignOffset:p=0,arrowPadding:m=0,collisionBoundary:v=[],collisionPadding:g=0,sticky:y="partial",hideWhenDetached:x=!1,avoidCollisions:w=!0,...j}=e,k=tm(tg,c),[S,_]=(0,b.useState)(null),C=(0,E.e)(t,e=>_(e)),[T,A]=(0,b.useState)(null),P=tc(T),N=null!==(n=null==P?void 0:P.width)&&void 0!==n?n:0,R=null!==(r=null==P?void 0:P.height)&&void 0!==r?r:0,D="number"==typeof g?g:{top:0,right:0,bottom:0,left:0,...g},L=Array.isArray(v)?v:[v],F=L.length>0,z={padding:D,boundary:L.filter(t_),altBoundary:F},{reference:V,floating:I,strategy:Z,x:B,y:H,placement:U,middlewareData:W,update:q}=ts({strategy:"fixed",placement:d+("center"!==h?"-"+h:""),whileElementsMounted:tr,middleware:[ez({mainAxis:f+R,alignmentAxis:p}),w?eI({mainAxis:!0,crossAxis:!1,limiter:"partial"===y?eZ():void 0,...z}):void 0,T?tl({element:T,padding:m}):void 0,w?eR({...z}):void 0,tC({arrowWidth:N,arrowHeight:R}),x?eF({strategy:"referenceHidden"}):void 0].filter(tS)});(0,M.b)(()=>{V(k.anchor)},[V,k.anchor]);let $=null!==B&&null!==H,[K,Y]=tO(U),G=null===(i=W.arrow)||void 0===i?void 0:i.x,X=null===(o=W.arrow)||void 0===o?void 0:o.y,J=(null===(a=W.arrow)||void 0===a?void 0:a.centerOffset)!==0,[Q,ee]=(0,b.useState)();(0,M.b)(()=>{S&&ee(window.getComputedStyle(S).zIndex)},[S]);let{hasParent:et,positionUpdateFns:en}=tw(tg,c),er=!et;(0,b.useLayoutEffect)(()=>{if(!er)return en.add(q),()=>{en.delete(q)}},[er,en,q]),(0,b.useLayoutEffect)(()=>{er&&$&&Array.from(en).reverse().forEach(e=>requestAnimationFrame(e))},[er,$,en]);let ei={"data-side":K,"data-align":Y,...j,ref:C,style:{...j.style,animation:$?void 0:"none",opacity:null!==(s=W.hide)&&void 0!==s&&s.referenceHidden?0:void 0}};return(0,b.createElement)("div",{ref:I,"data-radix-popper-content-wrapper":"",style:{position:Z,left:0,top:0,transform:$?`translate3d(${Math.round(B)}px, ${Math.round(H)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:Q,"--radix-popper-transform-origin":[null===(l=W.transformOrigin)||void 0===l?void 0:l.x,null===(u=W.transformOrigin)||void 0===u?void 0:u.y].join(" ")}},(0,b.createElement)(ty,{scope:c,placedSide:K,onArrowChange:A,arrowX:G,arrowY:X,shouldHideArrow:J},er?(0,b.createElement)(tx,{scope:c,hasParent:!0,positionUpdateFns:en},(0,b.createElement)(O.WV.div,ei)):(0,b.createElement)(O.WV.div,ei)))}),tE={top:"bottom",right:"left",bottom:"top",left:"right"},tk=(0,b.forwardRef)(function(e,t){let{__scopePopper:n,...r}=e,i=tb("PopperArrow",n),o=tE[i.placedSide];return(0,b.createElement)("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0}},(0,b.createElement)(tu,(0,w.Z)({},r,{ref:t,style:{...r.style,display:"block"}})))});function tS(e){return void 0!==e}function t_(e){return null!==e}let tC=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,a;let{placement:s,rects:l,middlewareData:u}=t,c=(null===(n=u.arrow)||void 0===n?void 0:n.centerOffset)!==0,d=c?0:e.arrowWidth,f=c?0:e.arrowHeight,[h,p]=tO(s),m={start:"0%",center:"50%",end:"100%"}[p],v=(null!==(r=null===(i=u.arrow)||void 0===i?void 0:i.x)&&void 0!==r?r:0)+d/2,g=(null!==(o=null===(a=u.arrow)||void 0===a?void 0:a.y)&&void 0!==o?o:0)+f/2,y="",b="";return"bottom"===h?(y=c?m:`${v}px`,b=`${-f}px`):"top"===h?(y=c?m:`${v}px`,b=`${l.floating.height+f}px`):"right"===h?(y=`${-f}px`,b=c?m:`${g}px`):"left"===h&&(y=`${l.floating.width+f}px`,b=c?m:`${g}px`),{data:{x:y,y:b}}}});function tO(e){let[t,n="center"]=e.split("-");return[t,n]}let tM=e=>{let{__scopePopper:t,children:n}=e,[r,i]=(0,b.useState)(null);return(0,b.createElement)(tp,{scope:t,anchor:r,onAnchorChange:i},n)};var tT=n(6500);let tA=(0,b.forwardRef)((e,t)=>(0,b.createElement)(O.WV.span,(0,w.Z)({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}))),[tP,tN]=(0,j.b)("Tooltip",[th]),tR=th(),tD="tooltip.open",[tL,tF]=tP("TooltipProvider"),tz="Tooltip",[tV,tI]=tP(tz),tZ="TooltipTrigger",tB=(0,b.forwardRef)((e,t)=>{let{__scopeTooltip:n,...r}=e,i=tI(tZ,n),o=tF(tZ,n),a=tR(n),s=(0,b.useRef)(null),l=(0,E.e)(t,s,i.onTriggerChange),u=(0,b.useRef)(!1),c=(0,b.useRef)(!1),d=(0,b.useCallback)(()=>u.current=!1,[]);return(0,b.useEffect)(()=>()=>document.removeEventListener("pointerup",d),[d]),(0,b.createElement)(tv,(0,w.Z)({asChild:!0},a),(0,b.createElement)(O.WV.button,(0,w.Z)({"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute},r,{ref:l,onPointerMove:(0,_.M)(e.onPointerMove,e=>{"touch"===e.pointerType||c.current||o.isPointerInTransitRef.current||(i.onTriggerEnter(),c.current=!0)}),onPointerLeave:(0,_.M)(e.onPointerLeave,()=>{i.onTriggerLeave(),c.current=!1}),onPointerDown:(0,_.M)(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:(0,_.M)(e.onFocus,()=>{u.current||i.onOpen()}),onBlur:(0,_.M)(e.onBlur,i.onClose),onClick:(0,_.M)(e.onClick,e=>{let t=0===e.detail;t&&i.onClose()})})))}),tH="TooltipPortal",[tU,tW]=tP(tH,{forceMount:void 0}),tq="TooltipContent",t$=(0,b.forwardRef)((e,t)=>{let n=tW(tq,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...o}=e,a=tI(tq,e.__scopeTooltip);return(0,b.createElement)(T.z,{present:r||a.open},a.disableHoverableContent?(0,b.createElement)(tX,(0,w.Z)({side:i},o,{ref:t})):(0,b.createElement)(tK,(0,w.Z)({side:i},o,{ref:t})))}),tK=(0,b.forwardRef)((e,t)=>{let n=tI(tq,e.__scopeTooltip),r=tF(tq,e.__scopeTooltip),i=(0,b.useRef)(null),o=(0,E.e)(t,i),[a,s]=(0,b.useState)(null),{trigger:l,onClose:u}=n,c=i.current,{onPointerInTransitChange:d}=r,f=(0,b.useCallback)(()=>{s(null),d(!1)},[d]),h=(0,b.useCallback)((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=function(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,i,o)){case o:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:return null}}(r,n.getBoundingClientRect()),o="right"===i||"bottom"===i?-5:5,a="right"===i||"left"===i?{x:e.clientX+o,y:e.clientY}:{x:e.clientX,y:e.clientY+o},l=function(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}(t.getBoundingClientRect()),u=function(e){let t=e.slice();return t.sort((e,t)=>e.xt.x?1:e.yt.y?1:0),function(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return(n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y)?t:t.concat(n)}(t)}([a,...l]);s(u),d(!0)},[d]);return(0,b.useEffect)(()=>()=>f(),[f]),(0,b.useEffect)(()=>{if(l&&c){let e=e=>h(e,c),t=e=>h(e,l);return l.addEventListener("pointerleave",e),c.addEventListener("pointerleave",t),()=>{l.removeEventListener("pointerleave",e),c.removeEventListener("pointerleave",t)}}},[l,c,h,f]),(0,b.useEffect)(()=>{if(a){let e=e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=(null==l?void 0:l.contains(t))||(null==c?void 0:c.contains(t)),i=!function(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,o=t.length-1;er!=u>r&&n<(l-a)*(r-s)/(u-s)+a;c&&(i=!i)}return i}(n,a);r?f():i&&(f(),u())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}},[l,c,a,u,f]),(0,b.createElement)(tX,(0,w.Z)({},e,{ref:o}))}),[tY,tG]=tP(tz,{isInside:!1}),tX=(0,b.forwardRef)((e,t)=>{let{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:o,onPointerDownOutside:a,...s}=e,l=tI(tq,n),u=tR(n),{onClose:c}=l;return(0,b.useEffect)(()=>(document.addEventListener(tD,c),()=>document.removeEventListener(tD,c)),[c]),(0,b.useEffect)(()=>{if(l.trigger){let e=e=>{let t=e.target;null!=t&&t.contains(l.trigger)&&c()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}},[l.trigger,c]),(0,b.createElement)(ev.XB,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:e=>e.preventDefault(),onDismiss:c},(0,b.createElement)(tj,(0,w.Z)({"data-state":l.stateAttribute},u,s,{ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)"}}),(0,b.createElement)(k.A4,null,r),(0,b.createElement)(tY,{scope:n,isInside:!0},(0,b.createElement)(tA,{id:l.contentId,role:"tooltip"},i||r))))}),tJ=e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i=!1,onOpenChange:o,disableHoverableContent:a,delayDuration:s}=e,l=tF(tz,e.__scopeTooltip),u=tR(t),[c,d]=(0,b.useState)(null),f=(0,A.M)(),h=(0,b.useRef)(0),p=null!=a?a:l.disableHoverableContent,m=null!=s?s:l.delayDuration,v=(0,b.useRef)(!1),[g=!1,y]=(0,C.T)({prop:r,defaultProp:i,onChange:e=>{e?(l.onOpen(),document.dispatchEvent(new CustomEvent(tD))):l.onClose(),null==o||o(e)}}),x=(0,b.useMemo)(()=>g?v.current?"delayed-open":"instant-open":"closed",[g]),w=(0,b.useCallback)(()=>{window.clearTimeout(h.current),v.current=!1,y(!0)},[y]),j=(0,b.useCallback)(()=>{window.clearTimeout(h.current),y(!1)},[y]),E=(0,b.useCallback)(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{v.current=!0,y(!0)},m)},[m,y]);return(0,b.useEffect)(()=>()=>window.clearTimeout(h.current),[]),(0,b.createElement)(tM,u,(0,b.createElement)(tV,{scope:t,contentId:f,open:g,stateAttribute:x,trigger:c,onTriggerChange:d,onTriggerEnter:(0,b.useCallback)(()=>{l.isOpenDelayed?E():w()},[l.isOpenDelayed,E,w]),onTriggerLeave:(0,b.useCallback)(()=>{p?j():window.clearTimeout(h.current)},[j,p]),onOpen:w,onClose:j,disableHoverableContent:p},n))},tQ=e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,o=tI(tH,t);return(0,b.createElement)(tU,{scope:t,forceMount:n},(0,b.createElement)(T.z,{present:n||o.open},(0,b.createElement)(tT.h,{asChild:!0,container:i},r)))},t0=(0,em.j)([],{variants:{display:{default:"inline-block",none:""},font:{mono:"font-mono",sans:"font-sans"},color:{verySubtle:"text-gray-700 dark:text-graydark-700",subtle:"text-gray-1000 dark:text-graydark-1000",contrast:"text-gray-1100 dark:text-white",lo:"text-white dark:text-graydark-50",accent:"text-accent-1100 dark:text-accentdark-1100",red:"text-red-700 dark:text-red-400",green:"text-emerald-700 dark:text-emerald-500",amber:"text-amber-600 dark:text-amber-500",none:""},weight:{extrabold:"font-extrabold",bold:"font-bold",medium:"font-medium",semibold:"font-semibold",regular:"font-normal",normal:"font-normal",light:"font-light",none:""},size:{10:"text-xxs",12:"text-xs",14:"text-sm",16:"text-base",18:"text-lg",20:"text-xl",24:"text-2xl",30:"text-3xl",36:"text-4xl",40:"text-5xl",48:"text-5xl",60:"text-6xl",64:"text-6xl"},scaleSize:{12:"text-xxs md:text-xs",14:"text-xs md:text-sm",16:"text-sm md:text-base",18:"text-base md:text-lg",20:"text-base md:text-xl",24:"text-xl md:text-2xl",30:"text-2xl md:text-3xl",36:"text-3xl md:text-4xl",40:"text-4xl md:text-5xl",48:"text-4xl md:text-5xl",60:"text-5xl md:text-6xl",64:"text-5xl md:text-6xl"},noWrap:{true:"whitespace-nowrap"},underline:{accent:"underline underline-offset-2 decoration-2 decoration-accent-900 dark:decoration-accentdark-900",show:"underline underline-offset-2 decoration-gray-1100 dark:decoration-gray-500",hover:"hover:underline underline-offset-2 decoration-gray-1100 dark:decoration-gray-500",none:""},ellipsis:{true:"overflow-hidden text-ellipsis whitespace-nowrap"},wrapEllipsis:{true:"overflow-hidden text-ellipsis"}},defaultVariants:{display:"default",weight:"regular",font:"sans",color:"contrast",underline:"none"}}),t1=b.forwardRef((e,t)=>{let{tag:n="span",className:r,font:i,color:o,weight:a,size:s,scaleSize:l,noWrap:u,underline:c,ellipsis:d,wrapEllipsis:f,...h}=e;return(0,y.jsx)(n,{ref:t,className:(0,em.cx)(r,t0({font:i,color:o,weight:a,size:s,scaleSize:l,underline:c,noWrap:u,ellipsis:d,wrapEllipsis:f})),...h})}),t2=b.forwardRef((e,t)=>{let{size:n="18",...r}=e;return(0,y.jsx)(t1,{tag:"p",...r,ref:t,weight:"regular",scaleSize:n,color:"subtle",className:(0,em.cx)("leading-relaxed md:leading-relaxed",e.className)})}),t4=(0,em.j)(["bg-white dark:bg-graydark-200","transition-shadow ease-in-out duration-300","shadow-sm hover:shadow","rounded","border","border-gray-400 dark:border-graydark-400"]),t3=b.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,y.jsx)("div",{ref:t,className:t4({className:n}),...r})});var t5=n(34406);let t6=(void 0===t5||t5.env,"production"),t8=1/60*1e3,t7="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),t9="undefined"!=typeof window?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(t7()),t8),ne=!0,nt=!1,nn=!1,nr={delta:0,timestamp:0},ni=["read","update","preRender","render","postRender"],no=ni.reduce((e,t)=>(e[t]=function(e){let t=[],n=[],r=0,i=!1,o=!1,a=new WeakSet,s={schedule:(e,o=!1,s=!1)=>{let l=s&&i,u=l?t:n;return o&&a.add(e),-1===u.indexOf(e)&&(u.push(e),l&&i&&(r=t.length)),e},cancel:e=>{let t=n.indexOf(e);-1!==t&&n.splice(t,1),a.delete(e)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length)for(let n=0;nnt=!0),e),{}),na=ni.reduce((e,t)=>{let n=no[t];return e[t]=(e,t=!1,r=!1)=>(nt||nd(),n.schedule(e,t,r)),e},{}),ns=ni.reduce((e,t)=>(e[t]=no[t].cancel,e),{}),nl=ni.reduce((e,t)=>(e[t]=()=>no[t].process(nr),e),{}),nu=e=>no[e].process(nr),nc=e=>{nt=!1,nr.delta=ne?t8:Math.max(Math.min(e-nr.timestamp,40),1),nr.timestamp=e,nn=!0,ni.forEach(nu),nn=!1,nt&&(ne=!1,t9(nc))},nd=()=>{nt=!0,ne=!0,nn||t9(nc)},nf=()=>nr,nh="undefined"!=typeof document,np=nh?b.useLayoutEffect:b.useEffect;function nm(){let e=(0,b.useRef)(!1);return np(()=>(e.current=!0,()=>{e.current=!1}),[]),e}let nv=(0,b.createContext)(null);function ng(e){let t=(0,b.useRef)(null);return null===t.current&&(t.current=e()),t.current}class ny extends b.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){let e=this.props.sizeRef.current;e.height=t.offsetHeight||0,e.width=t.offsetWidth||0,e.top=t.offsetTop,e.left=t.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function nb({children:e,isPresent:t}){let n=(0,b.useId)(),r=(0,b.useRef)(null),i=(0,b.useRef)({width:0,height:0,top:0,left:0});return(0,b.useInsertionEffect)(()=>{let{width:e,height:o,top:a,left:s}=i.current;if(t||!r.current||!e||!o)return;r.current.dataset.motionPopId=n;let l=document.createElement("style");return document.head.appendChild(l),l.sheet&&l.sheet.insertRule(` [data-motion-pop-id="${n}"] { position: absolute !important; width: ${e}px !important; @@ -22,16 +22,16 @@ top: ${a}px !important; left: ${s}px !important; } - `),()=>{document.head.removeChild(l)}},[t]),b.createElement(nl,{isPresent:t,childRef:r,sizeRef:i},b.cloneElement(e,{ref:r}))}let nc=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a})=>{let s=ns(nd),l=(0,b.useId)(),u=(0,b.useMemo)(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:e=>{for(let t of(s.set(e,!0),s.values()))if(!t)return;r&&r()},register:e=>(s.set(e,!1),()=>s.delete(e))}),o?void 0:[n]);return(0,b.useMemo)(()=>{s.forEach((e,t)=>s.set(t,!1))},[n]),b.useEffect(()=>{n||s.size||!r||r()},[n]),"popLayout"===a&&(e=b.createElement(nu,{isPresent:n},e)),b.createElement(na.Provider,{value:u},e)};function nd(){return new Map}let nf=(0,b.createContext)({});function nh(e){return(0,b.useEffect)(()=>()=>e(),[])}let np=new Set;function nm(e,t,n){e||np.has(t)||(console.warn(t),n&&console.warn(n),np.add(t))}let nv=e=>e.key||"",ng=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{i&&(a="wait",nm(!1,"Replace exitBeforeEnter with mode='wait'"));let[s]=function(){let e=no(),[t,n]=(0,b.useState)(0),r=(0,b.useCallback)(()=>{e.current&&n(t+1)},[t]),i=(0,b.useCallback)(()=>t6.postRender(r),[r]);return[i,t]}(),l=(0,b.useContext)(nf).forceRender;l&&(s=l);let u=no(),c=function(e){let t=[];return b.Children.forEach(e,e=>{(0,b.isValidElement)(e)&&t.push(e)}),t}(e),d=c,f=new Set,h=(0,b.useRef)(d),p=(0,b.useRef)(new Map).current,m=(0,b.useRef)(!0);if(ni(()=>{m.current=!1,function(e,t){e.forEach(e=>{let n=nv(e);t.set(n,e)})}(c,p),h.current=d}),nh(()=>{m.current=!0,p.clear(),f.clear()}),m.current)return b.createElement(b.Fragment,null,d.map(e=>b.createElement(nc,{key:nv(e),isPresent:!0,initial:!!n&&void 0,presenceAffectsLayout:o,mode:a},e)));d=[...d];let v=h.current.map(nv),g=c.map(nv),y=v.length;for(let e=0;e{if(-1!==g.indexOf(e))return;let n=p.get(e);if(!n)return;let i=v.indexOf(e);d.splice(i,0,b.createElement(nc,{key:nv(n),isPresent:!1,onExitComplete:()=>{p.delete(e),f.delete(e);let t=h.current.findIndex(t=>t.key===e);if(h.current.splice(t,1),!f.size){if(h.current=c,!1===u.current)return;s(),r&&r()}},custom:t,presenceAffectsLayout:o,mode:a},n))}),d=d.map(e=>{let t=e.key;return f.has(t)?e:b.createElement(nc,{key:nv(e),isPresent:!0,presenceAffectsLayout:o,mode:a},e)}),"production"!==tG&&"wait"===a&&d.length>1&&console.warn('You\'re attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.'),b.createElement(b.Fragment,null,f.size?d:d.map(e=>(0,b.cloneElement)(e)))},ny=(0,b.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),nb=(0,b.createContext)({}),nx=(0,b.createContext)({strict:!1});function nw(e){return"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function nj(e){return"string"==typeof e||Array.isArray(e)}function nE(e){return"object"==typeof e&&"function"==typeof e.start}let nk=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function nS(e){return nE(e.animate)||nk.some(t=>nj(e[t]))}function n_(e){return!!(nS(e)||e.variants)}function nC(e){return Array.isArray(e)?e.join(" "):e}let nO=e=>({isEnabled:t=>e.some(e=>!!t[e])}),nM={measureLayout:nO(["layout","layoutId","drag"]),animation:nO(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:nO(["exit"]),drag:nO(["drag","dragControls"]),focus:nO(["whileFocus"]),hover:nO(["whileHover","onHoverStart","onHoverEnd"]),tap:nO(["whileTap","onTap","onTapStart","onTapCancel"]),pan:nO(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:nO(["whileInView","onViewportEnter","onViewportLeave"])},nT={hasAnimatedSinceResize:!0,hasEverUpdated:!1},nA=1;class nP extends b.Component{getSnapshotBeforeUpdate(){let{visualElement:e,props:t}=this.props;return e&&e.setProps(t),null}componentDidUpdate(){}render(){return this.props.children}}let nN=(0,b.createContext)({}),nR=Symbol.for("motionComponentSymbol"),nD=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function nL(e){if("string"!=typeof e||e.includes("-"));else if(nD.indexOf(e)>-1||/[A-Z]/.test(e))return!0;return!1}let nF={},nz=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],nV=new Set(nz);function nI(e,{layout:t,layoutId:n}){return nV.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!nF[e]||"opacity"===e)}let nZ=e=>!!(null==e?void 0:e.getVelocity),nB={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},nH=(e,t)=>nz.indexOf(e)-nz.indexOf(t);function nU(e){return e.startsWith("--")}let nW=(e,t)=>t&&"number"==typeof e?t.transform(e):e,nq=(e,t)=>n=>Math.max(Math.min(n,t),e),n$=e=>e%1?Number(e.toFixed(5)):e,nK=/(-)?([\d]*\.?[\d])+/g,nY=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,nG=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function nX(e){return"string"==typeof e}let nJ=e=>({test:t=>nX(t)&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),nQ=nJ("deg"),n0=nJ("%"),n1=nJ("px"),n2=nJ("vh"),n4=nJ("vw"),n3=Object.assign(Object.assign({},n0),{parse:e=>n0.parse(e)/100,transform:e=>n0.transform(100*e)}),n5={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},n6=Object.assign(Object.assign({},n5),{transform:nq(0,1)}),n8=Object.assign(Object.assign({},n5),{default:1}),n7={...n5,transform:Math.round},n9={borderWidth:n1,borderTopWidth:n1,borderRightWidth:n1,borderBottomWidth:n1,borderLeftWidth:n1,borderRadius:n1,radius:n1,borderTopLeftRadius:n1,borderTopRightRadius:n1,borderBottomRightRadius:n1,borderBottomLeftRadius:n1,width:n1,maxWidth:n1,height:n1,maxHeight:n1,size:n1,top:n1,right:n1,bottom:n1,left:n1,padding:n1,paddingTop:n1,paddingRight:n1,paddingBottom:n1,paddingLeft:n1,margin:n1,marginTop:n1,marginRight:n1,marginBottom:n1,marginLeft:n1,rotate:nQ,rotateX:nQ,rotateY:nQ,rotateZ:nQ,scale:n8,scaleX:n8,scaleY:n8,scaleZ:n8,skew:nQ,skewX:nQ,skewY:nQ,distance:n1,translateX:n1,translateY:n1,translateZ:n1,x:n1,y:n1,z:n1,perspective:n1,transformPerspective:n1,opacity:n6,originX:n3,originY:n3,originZ:n1,zIndex:n7,fillOpacity:n6,strokeOpacity:n6,numOctaves:n7};function re(e,t,n,r){let{style:i,vars:o,transform:a,transformKeys:s,transformOrigin:l}=e;s.length=0;let u=!1,c=!1,d=!0;for(let e in t){let n=t[e];if(nU(e)){o[e]=n;continue}let r=n9[e],f=nW(n,r);if(nV.has(e)){if(u=!0,a[e]=f,s.push(e),!d)continue;n!==(r.default||0)&&(d=!1)}else e.startsWith("origin")?(c=!0,l[e]=f):i[e]=f}if(!t.transform&&(u||r?i.transform=function({transform:e,transformKeys:t},{enableHardwareAcceleration:n=!0,allowTransformNone:r=!0},i,o){let a="";for(let n of(t.sort(nH),t))a+=`${nB[n]||n}(${e[n]}) `;return n&&!e.z&&(a+="translateZ(0)"),a=a.trim(),o?a=o(e,i?"":a):r&&i&&(a="none"),a}(e,n,d,r):i.transform&&(i.transform="none")),c){let{originX:e="50%",originY:t="50%",originZ:n=0}=l;i.transformOrigin=`${e} ${t} ${n}`}}let rt=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function rn(e,t,n){for(let r in t)nZ(t[r])||nI(r,n)||(e[r]=t[r])}function rr(e,t,n){let r={},i=function(e,t,n){let r=e.style||{},i={};return rn(i,r,e),Object.assign(i,function({transformTemplate:e},t,n){return(0,b.useMemo)(()=>{let r=rt();return re(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}(e,t,n)),e.transformValues?e.transformValues(i):i}(e,t,n);return e.drag&&!1!==e.dragListener&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===e.drag?"none":`pan-${"x"===e.drag?"y":"x"}`),r.style=i,r}let ri=new Set(["initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onHoverStart","onHoverEnd","layoutScroll","whileInView","onViewportEnter","onViewportLeave","viewport","whileTap","onTap","onTapStart","onTapCancel","animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView","onPan","onPanStart","onPanSessionStart","onPanEnd"]);function ro(e){return ri.has(e)}let ra=e=>!ro(e);try{(Ee=require("@emotion/is-prop-valid").default)&&(ra=e=>e.startsWith("on")?!ro(e):Ee(e))}catch(e){}function rs(e,t,n){return"string"==typeof e?e:n1.transform(t+n*e)}let rl={offset:"stroke-dashoffset",array:"stroke-dasharray"},ru={offset:"strokeDashoffset",array:"strokeDasharray"};function rc(e,{attrX:t,attrY:n,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:s=0,...l},u,c){re(e,l,u,c),e.attrs=e.style,e.style={};let{attrs:d,style:f,dimensions:h}=e;d.transform&&(h&&(f.transform=d.transform),delete d.transform),h&&(void 0!==r||void 0!==i||f.transform)&&(f.transformOrigin=function(e,t,n){let r=rs(t,e.x,e.width),i=rs(n,e.y,e.height);return`${r} ${i}`}(h,void 0!==r?r:.5,void 0!==i?i:.5)),void 0!==t&&(d.x=t),void 0!==n&&(d.y=n),void 0!==o&&function(e,t,n=1,r=0,i=!0){e.pathLength=1;let o=i?rl:ru;e[o.offset]=n1.transform(-r);let a=n1.transform(t),s=n1.transform(n);e[o.array]=`${a} ${s}`}(d,o,a,s,!1)}let rd=()=>({...rt(),attrs:{}});function rf(e,t){let n=(0,b.useMemo)(()=>{let n=rd();return rc(n,t,{enableHardwareAcceleration:!1},e.transformTemplate),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};rn(t,e.style,e),n.style={...t,...n.style}}return n}let rh=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function rp(e,{style:t,vars:n},r,i){for(let o in Object.assign(e.style,t,i&&i.getProjectionStyles(r)),n)e.style.setProperty(o,n[o])}let rm=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function rv(e,t,n,r){for(let n in rp(e,t,void 0,r),t.attrs)e.setAttribute(rm.has(n)?n:rh(n),t.attrs[n])}function rg(e){let{style:t}=e,n={};for(let r in t)(nZ(t[r])||nI(r,e))&&(n[r]=t[r]);return n}function ry(e){let t=rg(e);for(let n in e)if(nZ(e[n])){let r="x"===n||"y"===n?"attr"+n.toUpperCase():n;t[r]=e[n]}return t}function rb(e,t,n,r={},i={}){return"function"==typeof t&&(t=t(void 0!==n?n:e.custom,r,i)),"string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t&&(t=t(void 0!==n?n:e.custom,r,i)),t}let rx=e=>Array.isArray(e),rw=e=>!!(e&&"object"==typeof e&&e.mix&&e.toValue),rj=e=>rx(e)?e[e.length-1]||0:e;function rE(e){let t=nZ(e)?e.get():e;return rw(t)?t.toValue():t}let rk=e=>(t,n)=>{let r=(0,b.useContext)(nb),i=(0,b.useContext)(na),o=()=>(function({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){let a={latestValues:function(e,t,n,r){let i={},o=r(e);for(let e in o)i[e]=rE(o[e]);let{initial:a,animate:s}=e,l=nS(e),u=n_(e);t&&u&&!l&&!1!==e.inherit&&(void 0===a&&(a=t.initial),void 0===s&&(s=t.animate));let c=!!n&&!1===n.initial;c=c||!1===a;let d=c?s:a;if(d&&"boolean"!=typeof d&&!nE(d)){let t=Array.isArray(d)?d:[d];t.forEach(t=>{let n=rb(e,t);if(!n)return;let{transitionEnd:r,transition:o,...a}=n;for(let e in a){let t=a[e];if(Array.isArray(t)){let e=c?t.length-1:0;t=t[e]}null!==t&&(i[e]=t)}for(let e in r)i[e]=r[e]})}return i}(r,i,o,e),renderState:t()};return n&&(a.mount=e=>n(r,e,a)),a})(e,t,r,i);return n?o():ns(o)},rS={useVisualState:rk({scrapeMotionValuesFromProps:ry,createRenderState:rd,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(e){n.dimensions={x:0,y:0,width:0,height:0}}rc(n,r,{enableHardwareAcceleration:!1},e.transformTemplate),rv(t,n)}})},r_={useVisualState:rk({scrapeMotionValuesFromProps:rg,createRenderState:rt})};function rC(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function rO(e,t,n,r){(0,b.useEffect)(()=>{let i=e.current;if(n&&i)return rC(i,t,n,r)},[e,t,n,r])}function rM(e){return"undefined"!=typeof PointerEvent&&e instanceof PointerEvent?!("mouse"!==e.pointerType):e instanceof MouseEvent}function rT(e){let t=!!e.touches;return t}(Et=Ea||(Ea={})).Animate="animate",Et.Hover="whileHover",Et.Tap="whileTap",Et.Drag="whileDrag",Et.Focus="whileFocus",Et.InView="whileInView",Et.Exit="exit";let rA={pageX:0,pageY:0};function rP(e,t="page"){return{point:rT(e)?function(e,t="page"){let n=e.touches[0]||e.changedTouches[0],r=n||rA;return{x:r[t+"X"],y:r[t+"Y"]}}(e,t):function(e,t="page"){return{x:e[t+"X"],y:e[t+"Y"]}}(e,t)}}let rN=(e,t=!1)=>{let n=t=>e(t,rP(t));return t?e=>{let t=e instanceof MouseEvent,r=!t||t&&0===e.button;r&&n(e)}:n},rR=()=>nr&&null===window.onpointerdown,rD=()=>nr&&null===window.ontouchstart,rL=()=>nr&&null===window.onmousedown,rF={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},rz={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function rV(e){if(rR());else if(rD())return rz[e];else if(rL())return rF[e];return e}function rI(e,t,n,r){return rC(e,rV(t),rN(n,"pointerdown"===t),r)}function rZ(e,t,n,r){return rO(e,rV(t),n&&rN(n,"pointerdown"===t),r)}function rB(e){let t=null;return()=>null===t&&(t=e,()=>{t=null})}let rH=rB("dragHorizontal"),rU=rB("dragVertical");function rW(e){let t=!1;if("y"===e)t=rU();else if("x"===e)t=rH();else{let e=rH(),n=rU();e&&n?t=()=>{e(),n()}:(e&&e(),n&&n())}return t}function rq(){let e=rW(!0);return!e||(e(),!1)}function r$(e,t,n){return(r,i)=>{!(!rM(r)||rq())&&(e.animationState&&e.animationState.setActive(Ea.Hover,t),n&&n(r,i))}}let rK=(e,t)=>!!t&&(e===t||rK(e,t.parentElement)),rY=(e,t)=>n=>t(e(n)),rG=(...e)=>e.reduce(rY),rX=new WeakMap,rJ=new WeakMap,rQ=e=>{let t=rX.get(e.target);t&&t(e)},r0=e=>{e.forEach(rQ)},r1={some:0,all:1};function r2(e,t,n,{root:r,margin:i,amount:o="some",once:a}){(0,b.useEffect)(()=>{if(!e||!n.current)return;let s={root:null==r?void 0:r.current,rootMargin:i,threshold:"number"==typeof o?o:r1[o]};return function(e,t,n){let r=function({root:e,...t}){let n=e||document;rJ.has(n)||rJ.set(n,{});let r=rJ.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(r0,{root:e,...t})),r[i]}(t);return rX.set(e,n),r.observe(e),()=>{rX.delete(e),r.unobserve(e)}}(n.current,s,e=>{let{isIntersecting:r}=e;if(t.isInView===r||(t.isInView=r,a&&!r&&t.hasEnteredView))return;r&&(t.hasEnteredView=!0),n.animationState&&n.animationState.setActive(Ea.InView,r);let i=n.getProps(),o=r?i.onViewportEnter:i.onViewportLeave;o&&o(e)})},[e,r,i,o])}function r4(e,t,n,{fallback:r=!0}){(0,b.useEffect)(()=>{e&&r&&("production"!==tG&&nm(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(()=>{t.hasEnteredView=!0;let{onViewportEnter:e}=n.getProps();e&&e(null),n.animationState&&n.animationState.setActive(Ea.InView,!0)}))},[e])}let r3=e=>t=>(e(t),null),r5={inView:r3(function({visualElement:e,whileInView:t,onViewportEnter:n,onViewportLeave:r,viewport:i={}}){let o=(0,b.useRef)({hasEnteredView:!1,isInView:!1}),a=!!(t||n||r);i.once&&o.current.hasEnteredView&&(a=!1);let s="undefined"==typeof IntersectionObserver?r4:r2;s(a,o.current,e,i)}),tap:r3(function({onTap:e,onTapStart:t,onTapCancel:n,whileTap:r,visualElement:i}){let o=e||t||n||r,a=(0,b.useRef)(!1),s=(0,b.useRef)(null),l={passive:!(t||e||n||h)};function u(){s.current&&s.current(),s.current=null}function c(){return u(),a.current=!1,i.animationState&&i.animationState.setActive(Ea.Tap,!1),!rq()}function d(t,r){c()&&(rK(i.current,t.target)?e&&e(t,r):n&&n(t,r))}function f(e,t){c()&&n&&n(e,t)}function h(e,n){u(),!a.current&&(a.current=!0,s.current=rG(rI(window,"pointerup",d,l),rI(window,"pointercancel",f,l)),i.animationState&&i.animationState.setActive(Ea.Tap,!0),t&&t(e,n))}rZ(i,"pointerdown",o?h:void 0,l),nh(u)}),focus:r3(function({whileFocus:e,visualElement:t}){let{animationState:n}=t;rO(t,"focus",e?()=>{n&&n.setActive(Ea.Focus,!0)}:void 0),rO(t,"blur",e?()=>{n&&n.setActive(Ea.Focus,!1)}:void 0)}),hover:r3(function({onHoverStart:e,onHoverEnd:t,whileHover:n,visualElement:r}){rZ(r,"pointerenter",e||n?r$(r,!0,e):void 0,{passive:!e}),rZ(r,"pointerleave",t||n?r$(r,!1,t):void 0,{passive:!t})})};function r6(){let e=(0,b.useContext)(na);if(null===e)return[!0,null];let{isPresent:t,onExitComplete:n,register:r}=e,i=(0,b.useId)();return(0,b.useEffect)(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}function r8(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;rt.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);it.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}var r9=function(){},ie=function(){};let it=(e,t,n)=>Math.min(Math.max(n,e),t);function ir(e,t){return e*Math.sqrt(1-t*t)}let ii=["duration","bounce"],io=["stiffness","damping","mass"];function ia(e,t){return t.some(t=>void 0!==e[t])}function is(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,o=r7(e,["from","to","restSpeed","restDelta"]);let a={done:!1,value:t},{stiffness:s,damping:l,mass:u,velocity:c,duration:d,isResolvedFromDuration:f}=function(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!ia(e,io)&&ia(e,ii)){let n=function({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;r9(e<=1e4,"Spring duration must be 10 seconds or less");let a=1-t;a=it(.05,1,a),e=it(.01,10,e/1e3),a<1?(i=t=>{let r=t*a,i=r*e,o=ir(t,a),s=Math.exp(-i);return .001-(r-n)/o*s},o=t=>{let r=t*a,o=r*e,s=Math.pow(a,2)*Math.pow(t,2)*e,l=Math.exp(-o),u=ir(Math.pow(t,2),a),c=-i(t)+.001>0?-1:1;return c*((o*n+n-s)*l)/u}):(i=t=>{let r=Math.exp(-t*e),i=(t-n)*e+1;return -.001+r*i},o=t=>{let r=Math.exp(-t*e),i=(n-t)*(e*e);return r*i});let s=5/e,l=function(e,t,n){let r=n;for(let n=1;n<12;n++)r-=e(r)/t(r);return r}(i,o,s);if(e*=1e3,isNaN(l))return{stiffness:100,damping:10,duration:e};{let t=Math.pow(l,2)*r;return{stiffness:t,damping:2*a*Math.sqrt(r*t),duration:e}}}(e);(t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1})).isResolvedFromDuration=!0}return t}(o),h=il,p=il;function m(){let e=c?-(c/1e3):0,r=n-t,o=l/(2*Math.sqrt(s*u)),a=Math.sqrt(s/u)/1e3;if(void 0===i&&(i=Math.min(Math.abs(n-t)/100,.4)),o<1){let t=ir(a,o);h=i=>{let s=Math.exp(-o*a*i);return n-s*((e+o*a*r)/t*Math.sin(t*i)+r*Math.cos(t*i))},p=n=>{let i=Math.exp(-o*a*n);return o*a*i*(Math.sin(t*n)*(e+o*a*r)/t+r*Math.cos(t*n))-i*(Math.cos(t*n)*(e+o*a*r)-t*r*Math.sin(t*n))}}else if(1===o)h=t=>n-Math.exp(-a*t)*(r+(e+a*r)*t);else{let t=a*Math.sqrt(o*o-1);h=i=>{let s=Math.exp(-o*a*i),l=Math.min(t*i,300);return n-s*((e+o*a*r)*Math.sinh(l)+t*r*Math.cosh(l))/t}}}return m(),{next:e=>{let t=h(e);if(f)a.done=e>=d;else{let o=1e3*p(e),s=Math.abs(o)<=r,l=Math.abs(n-t)<=i;a.done=s&&l}return a.value=a.done?n:t,a},flipTarget:()=>{c=-c,[t,n]=[n,t],m()}}}is.needsInterpolation=(e,t)=>"string"==typeof e||"string"==typeof t;let il=e=>0,iu=(e,t,n)=>{let r=t-e;return 0===r?1:(n-e)/r},ic=(e,t,n)=>-n*e+n*t+e,id=(e,t)=>n=>!!(nX(n)&&nG.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),ih=(e,t,n)=>r=>{if(!nX(r))return r;let[i,o,a,s]=r.match(nK);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:void 0!==s?parseFloat(s):1}},ip=nq(0,255),im=Object.assign(Object.assign({},n5),{transform:e=>Math.round(ip(e))}),iv={test:id("rgb","red"),parse:ih("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+im.transform(e)+", "+im.transform(t)+", "+im.transform(n)+", "+n$(n6.transform(r))+")"},ig={test:id("#"),parse:function(e){let t="",n="",r="",i="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),i=e.substr(4,1),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}},transform:iv.transform},iy={test:id("hsl","hue"),parse:ih("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+n0.transform(n$(t))+", "+n0.transform(n$(n))+", "+n$(n6.transform(r))+")"};function ib(e,t,n){return(n<0&&(n+=1),n>1&&(n-=1),n<1/6)?e+(t-e)*6*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function ix({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let i=0,o=0,a=0;if(t/=100){let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=ib(s,r,e+1/3),o=ib(s,r,e),a=ib(s,r,e-1/3)}else i=o=a=n;return{red:Math.round(255*i),green:Math.round(255*o),blue:Math.round(255*a),alpha:r}}let iw=(e,t,n)=>{let r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},ij=[ig,iv,iy],iE=e=>ij.find(t=>t.test(e)),ik=e=>`'${e}' is not an animatable color. Use the equivalent color code instead.`,iS=(e,t)=>{let n=iE(e),r=iE(t);ie(!!n,ik(e)),ie(!!r,ik(t));let i=n.parse(e),o=r.parse(t);n===iy&&(i=ix(i),n=iv),r===iy&&(o=ix(o),r=iv);let a=Object.assign({},i);return e=>{for(let t in a)"alpha"!==t&&(a[t]=iw(i[t],o[t],e));return a.alpha=ic(i.alpha,o.alpha,e),n.transform(a)}},i_={test:e=>iv.test(e)||ig.test(e)||iy.test(e),parse:e=>iv.test(e)?iv.parse(e):iy.test(e)?iy.parse(e):ig.parse(e),transform:e=>nX(e)?e:e.hasOwnProperty("red")?iv.transform(e):iy.transform(e)},iC="${c}",iO="${n}";function iM(e){"number"==typeof e&&(e=`${e}`);let t=[],n=0,r=e.match(nY);r&&(n=r.length,e=e.replace(nY,iC),t.push(...r.map(i_.parse)));let i=e.match(nK);return i&&(e=e.replace(nK,iO),t.push(...i.map(n5.parse))),{values:t,numColors:n,tokenised:e}}function iT(e){return iM(e).values}function iA(e){let{values:t,numColors:n,tokenised:r}=iM(e),i=t.length;return e=>{let t=r;for(let r=0;r"number"==typeof e?0:e,iN={test:function(e){var t,n,r,i;return isNaN(e)&&nX(e)&&(null!==(n=null===(t=e.match(nK))||void 0===t?void 0:t.length)&&void 0!==n?n:0)+(null!==(i=null===(r=e.match(nY))||void 0===r?void 0:r.length)&&void 0!==i?i:0)>0},parse:iT,createTransformer:iA,getAnimatableNone:function(e){let t=iT(e),n=iA(e);return n(t.map(iP))}},iR=e=>"number"==typeof e;function iD(e,t){return iR(e)?n=>ic(e,t,n):i_.test(e)?iS(e,t):iV(e,t)}let iL=(e,t)=>{let n=[...e],r=n.length,i=e.map((e,n)=>iD(e,t[n]));return e=>{for(let t=0;t{let n=Object.assign(Object.assign({},e),t),r={};for(let i in n)void 0!==e[i]&&void 0!==t[i]&&(r[i]=iD(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}};function iz(e){let t=iN.parse(e),n=t.length,r=0,i=0,o=0;for(let e=0;e{let n=iN.createTransformer(t),r=iz(e),i=iz(t),o=r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers;return o?rG(iL(r.parsed,i.parsed),n):(r9(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),n=>`${n>0?t:e}`)},iI=(e,t)=>n=>ic(e,t,n);function iZ(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let o=e.length;ie(o===t.length,"Both input and output ranges must be the same length"),ie(!r||!Array.isArray(r)||r.length===o-1,"Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values."),e[0]>e[o-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());let a=function(e,t,n){var r;let i=[],o=n||("number"==typeof(r=e[0])?iI:"string"==typeof r?i_.test(r)?iS:iV:Array.isArray(r)?iL:"object"==typeof r?iF:void 0),a=e.length-1;for(let n=0;nn(iu(e,t,r))}(e,a):function(e,t){let n=e.length,r=n-1;return i=>{let o=0,a=!1;if(i<=e[0]?a=!0:i>=e[r]&&(o=r-1,a=!0),!a){let t=1;for(;ti)&&t!==r;t++);o=t-1}let s=iu(e[o],e[o+1],i);return t[o](s)}}(e,a);return n?t=>s(it(e[0],e[o-1],t)):s}let iB=e=>t=>1-e(1-t),iH=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,iU=e=>t=>t*t*((e+1)*t-e),iW=4/11,iq=8/11,i$=e=>e,iK=e=>Math.pow(e,2),iY=iB(iK),iG=iH(iK),iX=e=>1-Math.sin(Math.acos(e)),iJ=iB(iX),iQ=iH(iJ),i0=iU(1.525),i1=iB(i0),i2=iH(i0),i4=(e=>{let t=iU(1.525);return e=>(e*=2)<1?.5*t(e):.5*(2-Math.pow(2,-10*(e-1)))})(0),i3=4356/361,i5=35442/1805,i6=16061/1805,i8=e=>{if(1===e||0===e)return e;let t=e*e;return e0!==n?n/(t-1):0)}(a)).map(e=>e*i);function l(){return iZ(s,a,{ease:Array.isArray(n)?n:a.map(()=>n||iG).splice(0,a.length-1)})}let u=l();return{next:e=>(o.value=u(e),o.done=e>=i,o),flipTarget:()=>{a.reverse(),u=l()}}}let oe={keyframes:i9,spring:is,decay:function({velocity:e=0,from:t=0,power:n=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:o}){let a={done:!1,value:t},s=n*e,l=t+s,u=void 0===o?l:o(l);return u!==l&&(s=u-t),{next:e=>{let t=-s*Math.exp(-e/r);return a.done=!(t>i||t<-i),a.value=a.done?u:u+t,a},flipTarget:()=>{}}}};function ot(e,t,n=0){return e-t-n}let on=e=>{let t=({delta:t})=>e(t);return{start:()=>t6.update(t,!0),stop:()=>t8.update(t)}};function or(e){let t,n,r;var i,{from:o,autoplay:a=!0,driver:s=on,elapsed:l=0,repeat:u=0,repeatType:c="loop",repeatDelay:d=0,onPlay:f,onStop:h,onComplete:p,onRepeat:m,onUpdate:v}=e,g=r7(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:y}=g,b=0,x=g.duration,w=!1,j=!0,E=function(e){if(Array.isArray(e.to))return i9;if(oe[e.type])return oe[e.type];let t=new Set(Object.keys(e));if(t.has("ease")||t.has("duration")&&!t.has("dampingRatio"));else if(t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta"))return is;return i9}(g);(null===(i=E.needsInterpolation)||void 0===i?void 0:i.call(E,o,y))&&(r=iZ([0,100],[o,y],{clamp:!1}),o=0,y=100);let k=E(Object.assign(Object.assign({},g),{from:o,to:y}));return a&&(null==f||f(),(t=s(function(e){if(j||(e=-e),l+=e,!w){let e=k.next(Math.max(0,l));n=e.value,r&&(n=r(n)),w=j?e.done:l<=0}if(null==v||v(n),w){if(0===b&&(null!=x||(x=l)),b=o+d:i<=-d)&&(b++,"reverse"===c?l=function(e,t,n=0,r=!0){return r?ot(t+-e,t,n):t-(e-t)+n}(l,x,d,j=b%2==0):(l=ot(l,x,d),"mirror"===c&&k.flipTarget()),w=!1,m&&m())}else t.stop(),p&&p()}})).start()),{stop:()=>{null==h||h(),t.stop()}}}let oi=e=>1e3*e,oo=(e,t)=>1-3*t+3*e,oa=(e,t)=>3*t-6*e,os=e=>3*e,ol=(e,t,n)=>((oo(t,n)*e+oa(t,n))*e+os(t))*e,ou=(e,t,n)=>3*oo(t,n)*e*e+2*oa(t,n)*e+os(t),oc={linear:i$,easeIn:iK,easeInOut:iG,easeOut:iY,circIn:iX,circInOut:iQ,circOut:iJ,backIn:i0,backInOut:i2,backOut:i1,anticipate:i4,bounceIn:i7,bounceInOut:e=>e<.5?.5*(1-i8(1-2*e)):.5*i8(2*e-1)+.5,bounceOut:i8},od=e=>{if(Array.isArray(e)){ie(4===e.length,"Cubic bezier arrays must contain four numerical values.");let[t,n,r,i]=e;return function(e,t,n,r){if(e===t&&n===r)return i$;let i=new Float32Array(11);for(let t=0;t<11;++t)i[t]=ol(.1*t,e,n);return o=>0===o||1===o?o:ol(function(t){let r=0,o=1;for(;10!==o&&i[o]<=t;++o)r+=.1;--o;let a=(t-i[o])/(i[o+1]-i[o]),s=r+.1*a,l=ou(s,e,n);return l>=.001?function(e,t,n,r){for(let i=0;i<8;++i){let i=ou(t,n,r);if(0===i)break;let o=ol(t,n,r)-e;t-=o/i}return t}(t,s,e,n):0===l?s:function(e,t,n,r,i){let o,a;let s=0;do(o=ol(a=t+(n-t)/2,r,i)-e)>0?n=a:t=a;while(Math.abs(o)>1e-7&&++s<10);return a}(t,r,r+.1,e,n)}(o),t,r)}(t,n,r,i)}return"string"==typeof e?(ie(void 0!==oc[e],`Invalid easing type '${e}'`),oc[e]):e},of=e=>Array.isArray(e)&&"number"!=typeof e[0],oh=(e,t)=>"zIndex"!==e&&!!("number"==typeof t||Array.isArray(t)||"string"==typeof t&&iN.test(t)&&!t.startsWith("url(")),op=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),om=e=>({type:"spring",stiffness:550,damping:0===e?2*Math.sqrt(550):30,restSpeed:10}),ov=()=>({type:"keyframes",ease:"linear",duration:.3}),og=e=>({type:"keyframes",duration:.8,values:e}),oy={x:op,y:op,z:op,rotate:op,rotateX:op,rotateY:op,rotateZ:op,scaleX:om,scaleY:om,scale:om,opacity:ov,backgroundColor:ov,color:ov,default:om},ob=(e,t)=>({to:t,...(rx(t)?og:oy[e]||oy.default)(t)}),ox=new Set(["brightness","contrast","saturate","opacity"]);function ow(e){let[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;let[r]=n.match(nK)||[];if(!r)return e;let i=n.replace(r,""),o=ox.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}let oj=/([a-z-]*)\(.*?\)/g,oE=Object.assign(Object.assign({},iN),{getAnimatableNone:e=>{let t=e.match(oj);return t?t.map(ow).join(" "):e}}),ok={...n9,color:i_,backgroundColor:i_,outlineColor:i_,fill:i_,stroke:i_,borderColor:i_,borderTopColor:i_,borderRightColor:i_,borderBottomColor:i_,borderLeftColor:i_,filter:oE,WebkitFilter:oE},oS=e=>ok[e];function o_(e,t){var n;let r=oS(e);return r!==oE&&(r=iN),null===(n=r.getAnimatableNone)||void 0===n?void 0:n.call(r,t)}let oC={current:!1};function oO(e,t){let n=performance.now(),r=({timestamp:i})=>{let o=i-n;o>=t&&(t8.read(r),e(o-t))};return t6.read(r,!0),()=>t8.read(r)}let oM=!1;function oT(e){return 0===e||"string"==typeof e&&0===parseFloat(e)&&-1===e.indexOf(" ")}function oA(e){return"number"==typeof e?0:o_("",e)}function oP(e,t){return e[t]||e.default||e}function oN(e,t,n,r={}){return oC.current&&(r={type:!1}),t.start(i=>{let o,a;let s=function(e,t,n,r,i){let o=oP(r,e)||{},a=void 0!==o.from?o.from:t.get(),s=oh(e,n);"none"===a&&s&&"string"==typeof n?a=o_(e,n):oT(a)&&"string"==typeof n?a=oA(n):!Array.isArray(n)&&oT(n)&&"string"==typeof a&&(n=oA(a));let l=oh(e,a);return r9(l===s,`You are trying to animate ${e} from "${a}" to "${n}". ${a} is not an animatable value - to enable this animation set ${a} to a value animatable to ${n} via the \`style\` property.`),l&&s&&!1!==o.type?function(){var r;let s={from:a,to:n,velocity:t.getVelocity(),onComplete:i,onUpdate:e=>t.set(e)};return"inertia"===o.type||"decay"===o.type?function({from:e=0,velocity:t=0,min:n,max:r,power:i=.8,timeConstant:o=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:l=1,modifyTarget:u,driver:c,onUpdate:d,onComplete:f,onStop:h}){let p;function m(e){return void 0!==n&&er}function v(e){return void 0===n?r:void 0===r?n:Math.abs(n-e){var n;null==d||d(t),null===(n=e.onUpdate)||void 0===n||n.call(e,t)},onComplete:f,onStop:h}))}function y(e){g(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:l},e))}if(m(e))y({from:e,velocity:t,to:v(e)});else{let r,a,s=i*t+e;void 0!==u&&(s=u(s));let c=v(s),d=c===n?-1:1;g({type:"decay",from:e,velocity:t,timeConstant:o,power:i,restDelta:l,modifyTarget:u,onUpdate:m(s)?e=>{var n;r=a,a=e,t=(n=nn().delta)?(e-r)*(1e3/n):0,(1===d&&e>c||-1===d&&enull==p?void 0:p.stop()}}({...s,...o}):or({...(r=o,Array.isArray(s.to)&&void 0===r.duration&&(r.duration=.8),Array.isArray(s.to)&&null===s.to[0]&&(s.to=[...s.to],s.to[0]=s.from),!function({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:l,...u}){return!!Object.keys(u).length}(r)&&(r={...r,...ob(e,s.to)}),{...s,...function({ease:e,times:t,yoyo:n,flip:r,loop:i,...o}){let a={...o};return t&&(a.offset=t),o.duration&&(a.duration=oi(o.duration)),o.repeatDelay&&(a.repeatDelay=oi(o.repeatDelay)),e&&(a.ease=of(e)?e.map(od):od(e)),"tween"===o.type&&(a.type="keyframes"),(n||i||r)&&(r9(!oM,"yoyo, loop and flip have been removed from the API. Replace with repeat and repeatType options."),oM=!0,n?a.repeatType="reverse":i?a.repeatType="loop":r&&(a.repeatType="mirror"),a.repeat=i||n||r||o.repeat),"spring"!==o.type&&(a.type="keyframes"),a}(r)}),onUpdate:e=>{s.onUpdate(e),o.onUpdate&&o.onUpdate(e)},onComplete:()=>{s.onComplete(),o.onComplete&&o.onComplete()}})}:function(){let e=rj(n);return t.set(e),i(),o.onUpdate&&o.onUpdate(e),o.onComplete&&o.onComplete(),{stop:()=>{}}}}(e,t,n,r,i),l=function(e,t){var n,r;let i=oP(e,t)||{};return null!==(r=null!==(n=i.delay)&&void 0!==n?n:e.delay)&&void 0!==r?r:0}(r,e),u=()=>o=s();return l?a=oO(u,oi(l)):u(),()=>{a&&a(),o&&o.stop()}})}let oR=e=>/^\-?\d*\.?\d+$/.test(e),oD=e=>/^0[^.\s]+$/.test(e);function oL(e,t){-1===e.indexOf(t)&&e.push(t)}function oF(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}class oz{constructor(){this.subscriptions=[]}add(e){return oL(this.subscriptions,e),()=>oF(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r){if(1===r)this.subscriptions[0](e,t,n);else for(let i=0;i!isNaN(parseFloat(e));class oI{constructor(e){this.version="7.6.5",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new oz,this.velocityUpdateSubscribers=new oz,this.renderSubscribers=new oz,this.canTrackVelocity=!1,this.updateAndNotify=(e,t=!0)=>{this.prev=this.current,this.current=e;let{delta:n,timestamp:r}=nn();this.lastUpdated!==r&&(this.timeDelta=n,this.lastUpdated=r,t6.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.updateSubscribers.notify(this.current),this.velocityUpdateSubscribers.getSize()&&this.velocityUpdateSubscribers.notify(this.getVelocity()),t&&this.renderSubscribers.notify(this.current)},this.scheduleVelocityCheck=()=>t6.postRender(this.velocityCheck),this.velocityCheck=({timestamp:e})=>{e!==this.lastUpdated&&(this.prev=this.current,this.velocityUpdateSubscribers.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=oV(this.current)}onChange(e){return this.updateSubscribers.add(e)}clearListeners(){this.updateSubscribers.clear()}onRenderRequest(e){return e(this.get()),this.renderSubscribers.add(e)}attach(e){this.passiveEffect=e}set(e,t=!0){t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){var e,t;return this.canTrackVelocity?(e=parseFloat(this.current)-parseFloat(this.prev),(t=this.timeDelta)?e*(1e3/t):0):0}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.stopAnimation=e(t)}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()}}function oZ(e){return new oI(e)}let oB=e=>t=>t.test(e),oH=[n5,n1,n0,nQ,n4,n2,{test:e=>"auto"===e,parse:e=>e}],oU=e=>oH.find(oB(e)),oW=[...oH,i_,iN],oq=e=>oW.find(oB(e));function o$(e,t,n){let r=e.getProps();return rb(r,t,void 0!==n?n:r.custom,function(e){let t={};return e.values.forEach((e,n)=>t[n]=e.get()),t}(e),function(e){let t={};return e.values.forEach((e,n)=>t[n]=e.getVelocity()),t}(e))}function oK(e){return!!(nZ(e)&&e.add)}function oY(e,t,n={}){var r;let i=o$(e,t,n.custom),{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);let a=i?()=>oG(e,i,n):()=>Promise.resolve(),s=(null===(r=e.variantChildren)||void 0===r?void 0:r.size)?(r=0)=>{let{delayChildren:i=0,staggerChildren:a,staggerDirection:s}=o;return function(e,t,n=0,r=0,i=1,o){let a=[],s=(e.variantChildren.size-1)*r,l=1===i?(e=0)=>e*r:(e=0)=>s-e*r;return Array.from(e.variantChildren).sort(oX).forEach((e,r)=>{a.push(oY(e,t,{...o,delay:n+l(r)}).then(()=>e.notify("AnimationComplete",t)))}),Promise.all(a)}(e,t,i+r,a,s,n)}:()=>Promise.resolve(),{when:l}=o;if(!l)return Promise.all([a(),s(n.delay)]);{let[e,t]="beforeChildren"===l?[a,s]:[s,a];return e().then(t)}}function oG(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=e.makeTargetAnimatable(t),u=e.getValue("willChange");r&&(a=r);let c=[],d=i&&(null===(o=e.animationState)||void 0===o?void 0:o.getState()[i]);for(let t in l){let r=e.getValue(t),i=l[t];if(!r||void 0===i||d&&function({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}(d,t))continue;let o={delay:n,...a};e.shouldReduceMotion&&nV.has(t)&&(o={...o,type:!1,delay:0});let s=oN(t,r,i,o);oK(u)&&(u.add(t),s=s.then(()=>u.remove(t))),c.push(s)}return Promise.all(c).then(()=>{s&&function(e,t){let n=o$(e,t),{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};for(let t in o={...o,...r}){let n=rj(o[t]);e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,oZ(n))}}(e,s)})}function oX(e,t){return e.sortNodePosition(t)}let oJ=[Ea.Animate,Ea.InView,Ea.Focus,Ea.Hover,Ea.Tap,Ea.Drag,Ea.Exit],oQ=[...oJ].reverse(),o0=oJ.length;function o1(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}let o2={animation:r3(({visualElement:e,animate:t})=>{e.animationState||(e.animationState=function(e){let t=t=>Promise.all(t.map(({animation:t,options:n})=>(function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t)){let i=t.map(t=>oY(e,t,n));r=Promise.all(i)}else if("string"==typeof t)r=oY(e,t,n);else{let i="function"==typeof t?o$(e,t,n.custom):t;r=oG(e,i,n)}return r.then(()=>e.notify("AnimationComplete",t))})(e,t,n))),n={[Ea.Animate]:o1(!0),[Ea.InView]:o1(),[Ea.Hover]:o1(),[Ea.Tap]:o1(),[Ea.Drag]:o1(),[Ea.Focus]:o1(),[Ea.Exit]:o1()},r=!0,i=(t,n)=>{let r=o$(e,n);if(r){let{transition:e,transitionEnd:n,...i}=r;t={...t,...i,...n}}return t};function o(o,a){var s,l;let u=e.getProps(),c=e.getVariantContext(!0)||{},d=[],f=new Set,h={},p=1/0;for(let t=0;tp&&y,E=Array.isArray(g)?g:[g],k=E.reduce(i,{});!1===b&&(k={});let{prevResolvedValues:S={}}=v,_={...S,...k},C=e=>{j=!0,f.delete(e),v.needsAnimating[e]=!0};for(let e in _){let t=k[e],n=S[e];h.hasOwnProperty(e)||(t!==n?rx(t)&&rx(n)?!r8(t,n)||w?C(e):v.protectedKeys[e]=!0:void 0!==t?C(e):f.add(e):void 0!==t&&f.has(e)?C(e):v.protectedKeys[e]=!0)}v.prevProp=g,v.prevResolvedValues=k,v.isActive&&(h={...h,...k}),r&&e.blockInitialAnimation&&(j=!1),j&&!x&&d.push(...E.map(e=>({animation:e,options:{type:m,...o}})))}if(f.size){let t={};f.forEach(n=>{let r=e.getBaseTarget(n);void 0!==r&&(t[n]=r)}),d.push({animation:t})}let m=!!d.length;return r&&!1===u.initial&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(d):Promise.resolve()}return{animateChanges:o,setActive:function(t,r,i){var a;if(n[t].isActive===r)return Promise.resolve();null===(a=e.variantChildren)||void 0===a||a.forEach(e=>{var n;return null===(n=e.animationState)||void 0===n?void 0:n.setActive(t,r)}),n[t].isActive=r;let s=o(i,t);for(let e in n)n[e].protectedKeys={};return s},setAnimateFunction:function(n){t=n(e)},getState:()=>n}}(e)),nE(t)&&(0,b.useEffect)(()=>t.subscribe(e),[t])}),exit:r3(e=>{let{custom:t,visualElement:n}=e,[r,i]=r6(),o=(0,b.useContext)(na);(0,b.useEffect)(()=>{n.isPresent=r;let e=n.animationState&&n.animationState.setActive(Ea.Exit,!r,{custom:o&&o.custom||t});e&&!r&&e.then(i)},[r])})},o4=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),o3=e=>o4(e)&&e.hasOwnProperty("z"),o5=(e,t)=>Math.abs(e-t);function o6(e,t){if(iR(e)&&iR(t))return o5(e,t);if(o4(e)&&o4(t)){let n=o5(e.x,t.x),r=o5(e.y,t.y),i=o3(e)&&o3(t)?o5(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}class o8{constructor(e,t,{transformPagePoint:n}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let e=ae(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=o6(e.offset,{x:0,y:0})>=3;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=nn();this.history.push({...r,timestamp:i});let{onStart:o,onMove:a}=this.handlers;t||(o&&o(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),a&&a(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{if(this.lastMoveEvent=e,this.lastMoveEventInfo=o7(t,this.transformPagePoint),rM(e)&&0===e.buttons){this.handlePointerUp(e,t);return}t6.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r}=this.handlers,i=ae(o7(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,i),r&&r(e,i)},rT(e)&&e.touches.length>1)return;this.handlers=t,this.transformPagePoint=n;let r=rP(e),i=o7(r,this.transformPagePoint),{point:o}=i,{timestamp:a}=nn();this.history=[{...o,timestamp:a}];let{onSessionStart:s}=t;s&&s(e,ae(i,this.history)),this.removeListeners=rG(rI(window,"pointermove",this.handlePointerMove),rI(window,"pointerup",this.handlePointerUp),rI(window,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),t8.update(this.updatePoint)}}function o7(e,t){return t?{point:t(e.point)}:e}function o9(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ae({point:e},t){return{point:e,delta:o9(e,at(t)),offset:o9(e,t[0]),velocity:function(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=at(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>oi(.1)));)n--;if(!r)return{x:0,y:0};let o=(i.timestamp-r.timestamp)/1e3;if(0===o)return{x:0,y:0};let a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}(t,0)}}function at(e){return e[e.length-1]}function an(e){return e.max-e.min}function ar(e,t=0,n=.01){return o6(e,t)({translate:0,scale:1,origin:0,originPoint:0}),ap=()=>({x:ah(),y:ah()}),am=()=>({min:0,max:0}),av=()=>({x:am(),y:am()});function ag(e){return[e("x"),e("y")]}function ay({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function ab(e){return void 0===e||1===e}function ax({scale:e,scaleX:t,scaleY:n}){return!ab(e)||!ab(t)||!ab(n)}function aw(e){return ax(e)||aj(e)||e.z||e.rotate||e.rotateX||e.rotateY}function aj(e){var t,n;return(t=e.x)&&"0%"!==t||(n=e.y)&&"0%"!==n}function aE(e,t,n,r,i){return void 0!==i&&(e=r+i*(e-r)),r+n*(e-r)+t}function ak(e,t=0,n=1,r,i){e.min=aE(e.min,t,n,r,i),e.max=aE(e.max,t,n,r,i)}function aS(e,{x:t,y:n}){ak(e.x,t.translate,t.scale,t.originPoint),ak(e.y,n.translate,n.scale,n.originPoint)}function a_(e,t){e.min=e.min+t,e.max=e.max+t}function aC(e,t,[n,r,i]){let o=void 0!==t[i]?t[i]:.5,a=ic(e.min,e.max,o);ak(e,t[n],t[r],a,t.scale)}let aO=["x","scaleX","originX"],aM=["y","scaleY","originY"];function aT(e,t){aC(e.x,t,aO),aC(e.y,t,aM)}function aA(e,t){return ay(function(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}let aP=new WeakMap;class aN{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=av(),this.visualElement=e}start(e,{snapToCursor:t=!1}={}){!1!==this.visualElement.isPresent&&(this.panSession=new o8(e,{onSessionStart:e=>{this.stopAnimation(),t&&this.snapToCursor(rP(e,"page").point)},onStart:(e,t)=>{var n;let{drag:r,dragPropagation:i,onDragStart:o}=this.getProps();(!r||i||(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=rW(r),this.openGlobalLock))&&(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ag(e=>{var t,n;let r=this.getAxisMotionValue(e).get()||0;if(n0.test(r)){let i=null===(n=null===(t=this.visualElement.projection)||void 0===t?void 0:t.layout)||void 0===n?void 0:n.actual[e];if(i){let e=an(i);r=e*(parseFloat(r)/100)}}this.originPoint[e]=r}),null==o||o(e,t),null===(n=this.visualElement.animationState)||void 0===n||n.setActive(Ea.Drag,!0))},onMove:(e,t)=>{let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:o}=this.getProps();if(!n&&!this.openGlobalLock)return;let{offset:a}=t;if(r&&null===this.currentDirection){this.currentDirection=function(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}(a),null!==this.currentDirection&&(null==i||i(this.currentDirection));return}this.updateAxis("x",t.point,a),this.updateAxis("y",t.point,a),this.visualElement.render(),null==o||o(e,t)},onSessionEnd:(e,t)=>this.stop(e,t)},{transformPagePoint:this.visualElement.getTransformPagePoint()}))}stop(e,t){let n=this.isDragging;if(this.cancel(),!n)return;let{velocity:r}=t;this.startAnimation(r);let{onDragEnd:i}=this.getProps();null==i||i(e,t)}cancel(){var e,t;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),null===(e=this.panSession)||void 0===e||e.end(),this.panSession=void 0;let{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),null===(t=this.visualElement.animationState)||void 0===t||t.setActive(Ea.Drag,!1)}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!aR(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=function(e,{min:t,max:n},r){return void 0!==t&&en&&(e=r?ic(n,e,r.max):Math.min(e,n)),e}(o,this.constraints[e],this.elastic[e])),i.set(o)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),{layout:n}=this.visualElement.projection||{},r=this.constraints;e&&nw(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&n?this.constraints=function(e,{top:t,left:n,bottom:r,right:i}){return{x:au(e.x,n,i),y:au(e.y,t,r)}}(n.actual,e):this.constraints=!1,this.elastic=function(e=.35){return!1===e?e=0:!0===e&&(e=.35),{x:ad(e,"left","right"),y:ad(e,"top","bottom")}}(t),r!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&ag(e=>{this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){let n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(n.actual[e],this.constraints[e]))})}resolveRefConstraints(){var e;let{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!nw(t))return!1;let r=t.current;ie(null!==r,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");let{projection:i}=this.visualElement;if(!i||!i.layout)return!1;let o=function(e,t,n){let r=aA(e,n),{scroll:i}=t;return i&&(a_(r.x,i.x),a_(r.y,i.y)),r}(r,i.root,this.visualElement.getTransformPagePoint()),a={x:ac((e=i.layout.actual).x,o.x),y:ac(e.y,o.y)};if(n){let e=n(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(a));this.hasMutatedConstraints=!!e,e&&(a=ay(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),s=this.constraints||{},l=ag(a=>{var l;if(!aR(a,t,this.currentDirection))return;let u=null!==(l=null==s?void 0:s[a])&&void 0!==l?l:{};o&&(u={min:0,max:0});let c={type:"inertia",velocity:n?e[a]:0,bounceStiffness:r?200:1e6,bounceDamping:r?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...i,...u};return this.startAxisValueAnimation(a,c)});return Promise.all(l).then(a)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return oN(e,n,0,t)}stopAnimation(){ag(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){var t,n;let r="_drag"+e.toUpperCase(),i=this.visualElement.getProps()[r];return i||this.visualElement.getValue(e,null!==(n=null===(t=this.visualElement.getProps().initial)||void 0===t?void 0:t[e])&&void 0!==n?n:0)}snapToCursor(e){ag(t=>{let{drag:n}=this.getProps();if(!aR(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:o}=r.layout.actual[t];i.set(e[t]-ic(n,o,.5))}})}scalePositionWithinConstraints(){var e;if(!this.visualElement.current)return;let{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!nw(n)||!r||!this.constraints)return;this.stopAnimation();let i={x:0,y:0};ag(e=>{let t=this.getAxisMotionValue(e);if(t){let n=t.get();i[e]=function(e,t){let n=.5,r=an(e),i=an(t);return i>r?n=iu(t.min,t.max-r,e.min):r>i&&(n=iu(e.min,e.max-i,t.min)),it(0,1,n)}({min:n,max:n},this.constraints[e])}});let{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",null===(e=r.root)||void 0===e||e.updateScroll(),r.updateLayout(),this.resolveConstraints(),ag(e=>{if(!aR(e,t,null))return;let n=this.getAxisMotionValue(e),{min:r,max:o}=this.constraints[e];n.set(ic(r,o,i[e]))})}addListeners(){var e;if(!this.visualElement.current)return;aP.set(this.visualElement,this);let t=this.visualElement.current,n=rI(t,"pointerdown",e=>{let{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)}),r=()=>{let{dragConstraints:e}=this.getProps();nw(e)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(null===(e=i.root)||void 0===e||e.updateScroll(),i.updateLayout()),r();let a=rC(window,"resize",()=>this.scalePositionWithinConstraints()),s=i.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(ag(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),null==s||s()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:o=.35,dragMomentum:a=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:o,dragMomentum:a}}}function aR(e,t,n){return(!0===t||t===e)&&(null===n||n===e)}let aD={pan:r3(function({onPan:e,onPanStart:t,onPanEnd:n,onPanSessionStart:r,visualElement:i}){let o=e||t||n||r,a=(0,b.useRef)(null),{transformPagePoint:s}=(0,b.useContext)(ny),l={onSessionStart:r,onStart:t,onMove:e,onEnd:(e,t)=>{a.current=null,n&&n(e,t)}};(0,b.useEffect)(()=>{null!==a.current&&a.current.updateHandlers(l)}),rZ(i,"pointerdown",o&&function(e){a.current=new o8(e,l,{transformPagePoint:s})}),nh(()=>a.current&&a.current.end())}),drag:r3(function(e){let{dragControls:t,visualElement:n}=e,r=ns(()=>new aN(n));(0,b.useEffect)(()=>t&&t.subscribe(r),[r,t]),(0,b.useEffect)(()=>r.addListeners(),[r])})};function aL(e){return"string"==typeof e&&e.startsWith("var(--")}let aF=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function az(e,t,n=1){ie(n<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);let[r,i]=function(e){let t=aF.exec(e);if(!t)return[,];let[,n,r]=t;return[n,r]}(e);if(!r)return;let o=window.getComputedStyle(t).getPropertyValue(r);return o?o.trim():aL(i)?az(i,t,n+1):i}let aV=new Set(["width","height","top","left","right","bottom","x","y"]),aI=e=>aV.has(e),aZ=e=>Object.keys(e).some(aI),aB=(e,t)=>{e.set(t,!1),e.set(t)},aH=e=>e===n5||e===n1;(En=Es||(Es={})).width="width",En.height="height",En.left="left",En.right="right",En.top="top",En.bottom="bottom";let aU=(e,t)=>parseFloat(e.split(", ")[t]),aW=(e,t)=>(n,{transform:r})=>{if("none"===r||!r)return 0;let i=r.match(/^matrix3d\((.+)\)$/);if(i)return aU(i[1],t);{let t=r.match(/^matrix\((.+)\)$/);return t?aU(t[1],e):0}},aq=new Set(["x","y","z"]),a$=nz.filter(e=>!aq.has(e)),aK={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:aW(4,13),y:aW(5,14)},aY=(e,t,n)=>{let r=t.measureViewportBox(),i=t.current,o=getComputedStyle(i),{display:a}=o,s={};"none"===a&&t.setStaticValue("display",e.display||"block"),n.forEach(e=>{s[e]=aK[e](r,o)}),t.render();let l=t.measureViewportBox();return n.forEach(n=>{let r=t.getValue(n);aB(r,s[n]),e[n]=aK[n](l,o)}),e},aG=(e,t,n={},r={})=>{t={...t},r={...r};let i=Object.keys(t).filter(aI),o=[],a=!1,s=[];if(i.forEach(i=>{let l;let u=e.getValue(i);if(!e.hasValue(i))return;let c=n[i],d=oU(c),f=t[i];if(rx(f)){let e=f.length,t=null===f[0]?1:0;d=oU(c=f[t]);for(let n=t;n{let r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.render(),t}(e),a=!0),s.push(i),r[i]=void 0!==r[i]?r[i]:t[i],aB(u,f))}}),!s.length)return{target:t,transitionEnd:r};{let n=s.indexOf("height")>=0?window.pageYOffset:null,i=aY(t,e,s);return o.length&&o.forEach(([t,n])=>{e.getValue(t).set(n)}),e.render(),nr&&null!==n&&window.scrollTo({top:n}),{target:i,transitionEnd:r}}},aX=(e,t,n,r)=>{var i,o;let a=function(e,{...t},n){let r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};for(let i in n&&(n={...n}),e.values.forEach(e=>{let t=e.get();if(!aL(t))return;let n=az(t,r);n&&e.set(n)}),t){let e=t[i];if(!aL(e))continue;let o=az(e,r);o&&(t[i]=o,n&&void 0===n[i]&&(n[i]=e))}return{target:t,transitionEnd:n}}(e,t,r);return t=a.target,r=a.transitionEnd,i=t,o=r,aZ(i)?aG(e,i,n,o):{target:i,transitionEnd:o}},aJ={current:null},aQ={current:!1},a0=Object.keys(nM),a1=a0.length,a2=["AnimationStart","AnimationComplete","Update","Unmount","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class a4{constructor({parent:e,props:t,reducedMotionConfig:n,visualState:r},i={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.isPresent=!0,this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>t6.render(this.render,!1,!0);let{latestValues:o,renderState:a}=r;this.latestValues=o,this.baseTarget={...o},this.initialValues=t.initial?{...o}:{},this.renderState=a,this.parent=e,this.props=t,this.depth=e?e.depth+1:0,this.reducedMotionConfig=n,this.options=i,this.isControllingVariants=nS(t),this.isVariantNode=n_(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:s,...l}=this.scrapeMotionValuesFromProps(t);for(let e in l){let t=l[e];void 0!==o[e]&&nZ(t)&&(t.set(o[e],!1),oK(s)&&s.add(e))}if(t.values)for(let e in t.values){let n=t.values[e];void 0!==o[e]&&nZ(n)&&n.set(o[e])}}scrapeMotionValuesFromProps(e){return{}}mount(e){var t;this.current=e,this.projection&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=null===(t=this.parent)||void 0===t?void 0:t.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),aQ.current||function(){if(aQ.current=!0,nr){if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>aJ.current=e.matches;e.addListener(t),t()}else aJ.current=!1}}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||aJ.current),this.parent&&this.parent.children.add(this),this.setProps(this.props)}unmount(){var e,t,n;for(let r in null===(e=this.projection)||void 0===e||e.unmount(),t8.update(this.notifyUpdate),t8.render(this.render),this.valueSubscriptions.forEach(e=>e()),null===(t=this.removeFromVariantTree)||void 0===t||t.call(this),null===(n=this.parent)||void 0===n||n.children.delete(this),this.events)this.events[r].clear();this.current=null}bindToMotionValue(e,t){let n=t.onChange(t=>{this.latestValues[e]=t,this.props.onUpdate&&t6.update(this.notifyUpdate,!1,!0)}),r=t.onRenderRequest(this.scheduleRender);this.valueSubscriptions.set(e,()=>{n(),r()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}loadFeatures(e,t,n,r,i,o){let a=[];"production"!==tG&&n&&t&&ie(!1,"You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.");for(let t=0;tthis.scheduleRender(),animationType:"string"==typeof n?n:"both",initialPromotionConfig:o,layoutScroll:l})}return a}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):av()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}makeTargetAnimatable(e,t=!0){return this.makeTargetAnimatableFromInstance(e,this.props,t)}setProps(e){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.props=e;for(let t=0;tn.variantChildren.delete(e)}addValue(e,t){this.hasValue(e)&&this.removeValue(e),this.values.set(e,t),this.latestValues[e]=t.get(),this.bindToMotionValue(e,t)}removeValue(e){var t;this.values.delete(e),null===(t=this.valueSubscriptions.get(e))||void 0===t||t(),this.valueSubscriptions.delete(e),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=oZ(t),this.addValue(e,n)),n}readValue(e){return void 0===this.latestValues[e]&&this.current?this.readValueFromInstance(this.current,e,this.options):this.latestValues[e]}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;let{initial:n}=this.props,r="string"==typeof n||"object"==typeof n?null===(t=rb(this.props,n))||void 0===t?void 0:t[e]:void 0;if(n&&void 0!==r)return r;let i=this.getBaseTargetFromProps(this.props,e);return void 0===i||nZ(i)?void 0!==this.initialValues[e]&&void 0===r?void 0:this.baseTarget[e]:i}on(e,t){return this.events[e]||(this.events[e]=new oz),this.events[e].add(t)}notify(e,...t){var n;null===(n=this.events[e])||void 0===n||n.notify(...t)}}let a3=["initial",...oJ],a5=a3.length;class a6 extends a4{sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){var n;return null===(n=e.style)||void 0===n?void 0:n[t]}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:t,...n},{transformValues:r},i){let o=function(e,t,n){var r;let i={};for(let o in e){let e=function(e,t){if(!t)return;let n=t[e]||t.default||t;return n.from}(o,t);i[o]=void 0!==e?e:null===(r=n.getValue(o))||void 0===r?void 0:r.get()}return i}(n,e||{},this);if(r&&(t&&(t=r(t)),n&&(n=r(n)),o&&(o=r(o))),i){!function(e,t,n){var r,i;let o=Object.keys(t).filter(t=>!e.hasValue(t)),a=o.length;if(a)for(let s=0;snL(e)?new a7(t,{enableHardwareAcceleration:!1}):new a8(t,{enableHardwareAcceleration:!0});function se(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}let st={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!n1.test(e))return e;e=parseFloat(e)}let n=se(e,t.target.x),r=se(e,t.target.y);return`${n}% ${r}%`}},sn="_$css",sr={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=e.includes("var("),o=[];i&&(e=e.replace(aF,e=>(o.push(e),sn)));let a=iN.parse(e);if(a.length>5)return r;let s=iN.createTransformer(e),l="number"!=typeof a[0]?1:0,u=n.x.scale*t.x,c=n.y.scale*t.y;a[0+l]/=u,a[1+l]/=c;let d=ic(u,c,.5);"number"==typeof a[2+l]&&(a[2+l]/=d),"number"==typeof a[3+l]&&(a[3+l]/=d);let f=s(a);if(i){let e=0;f=f.replace(sn,()=>{let t=o[e];return e++,t})}return f}};class si extends b.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;Object.assign(nF,so),i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),nT.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,o=n.projection;return o&&(o.isPresent=i,r||e.layoutDependency!==t||void 0===t?o.willUpdate():this.safeToRemove(),e.isPresent===i||(i?o.promote():o.relegate()||t6.postRender(()=>{var e;(null===(e=o.getStack())||void 0===e?void 0:e.members.length)||this.safeToRemove()}))),null}componentDidUpdate(){let{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),!e.currentAnimation&&e.isLead()&&this.safeToRemove())}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),(null==t?void 0:t.group)&&t.group.remove(r),(null==n?void 0:n.deregister)&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;null==e||e()}render(){return null}}let so={borderRadius:{...st,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:st,borderTopRightRadius:st,borderBottomLeftRadius:st,borderBottomRightRadius:st,boxShadow:sr},sa=["TopLeft","TopRight","BottomLeft","BottomRight"],ss=sa.length,sl=e=>"string"==typeof e?parseFloat(e):e,su=e=>"number"==typeof e||n1.test(e);function sc(e,t){var n;return null!==(n=e[t])&&void 0!==n?n:e.borderRadius}let sd=sh(0,.5,iJ),sf=sh(.5,.95,i$);function sh(e,t,n){return r=>rt?1:n(iu(e,t,r))}function sp(e,t){e.min=t.min,e.max=t.max}function sm(e,t){sp(e.x,t.x),sp(e.y,t.y)}function sv(e,t,n,r,i){return e-=t,e=r+1/n*(e-r),void 0!==i&&(e=r+1/i*(e-r)),e}function sg(e,t,[n,r,i],o,a){!function(e,t=0,n=1,r=.5,i,o=e,a=e){if(n0.test(t)){t=parseFloat(t);let e=ic(a.min,a.max,t/100);t=e-a.min}if("number"!=typeof t)return;let s=ic(o.min,o.max,r);e===o&&(s-=t),e.min=sv(e.min,t,n,s,i),e.max=sv(e.max,t,n,s,i)}(e,t[n],t[r],t[i],t.scale,o,a)}let sy=["x","scaleX","originX"],sb=["y","scaleY","originY"];function sx(e,t,n,r){sg(e.x,t,sy,null==n?void 0:n.x,null==r?void 0:r.x),sg(e.y,t,sb,null==n?void 0:n.y,null==r?void 0:r.y)}function sw(e){return 0===e.translate&&1===e.scale}function sj(e){return sw(e.x)&&sw(e.y)}function sE(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function sk(e){return an(e.x)/an(e.y)}class sS{constructor(){this.members=[]}add(e){oL(this.members,e),e.scheduleRender()}remove(e){if(oF(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){let t;let n=this.members.findIndex(t=>e===t);if(0===n)return!1;for(let e=n;e>=0;e--){let n=this.members[e];if(!1!==n.isPresent){t=n;break}}return!!t&&(this.promote(t),!0)}promote(e,t){var n;let r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.instance&&r.scheduleRender(),e.scheduleRender(),e.resumeFrom=r,t&&(e.resumeFrom.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues,e.snapshot.isShared=!0),(null===(n=e.root)||void 0===n?void 0:n.isUpdating)&&(e.isLayoutDirty=!0);let{crossfade:i}=e.options;!1===i&&r.hide()}}exitAnimationComplete(){this.members.forEach(e=>{var t,n,r,i,o;null===(n=(t=e.options).onExitComplete)||void 0===n||n.call(t),null===(o=null===(r=e.resumingFrom)||void 0===r?void 0:(i=r.options).onExitComplete)||void 0===o||o.call(i)})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function s_(e,t,n){let r=e.x.translate/t.x,i=e.y.translate/t.y,o=`translate3d(${r}px, ${i}px, 0) `;if(o+=`scale(${1/t.x}, ${1/t.y}) `,n){let{rotate:e,rotateX:t,rotateY:r}=n;e&&(o+=`rotate(${e}deg) `),t&&(o+=`rotateX(${t}deg) `),r&&(o+=`rotateY(${r}deg) `)}let a=e.x.scale*t.x,s=e.y.scale*t.y;return"translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)"==(o+=`scale(${a}, ${s})`)?"none":o}let sC=(e,t)=>e.depth-t.depth;class sO{constructor(){this.children=[],this.isDirty=!1}add(e){oL(this.children,e),this.isDirty=!0}remove(e){oF(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(sC),this.isDirty=!1,this.children.forEach(e)}}let sM=["","X","Y","Z"];function sT({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e,n={},r=null==t?void 0:t()){this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(sF),this.nodes.forEach(sz)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=e,this.latestValues=n,this.root=r?r.root||r:this,this.path=r?[...r.path,r]:[],this.parent=r,this.depth=r?r.depth+1:0,e&&this.root.registerPotentialNode(e,this);for(let e=0;ethis.root.updateBlockedByResize=!1;e(t,()=>{this.root.updateBlockedByResize=!0,n&&n(),n=oO(r,250),nT.hasAnimatedSinceResize&&(nT.hasAnimatedSinceResize=!1,this.nodes.forEach(sL))})}i&&this.root.registerSharedNode(i,this),!1!==this.options.animate&&a&&(i||o)&&this.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t,hasRelativeTargetChanged:n,layout:r})=>{var i,o,s,l,u;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let c=null!==(o=null!==(i=this.options.transition)&&void 0!==i?i:a.getDefaultTransition())&&void 0!==o?o:sU,{onLayoutAnimationStart:d,onLayoutAnimationComplete:f}=a.getProps(),h=!this.targetLayout||!sE(this.targetLayout,r)||n,p=!t&&n;if((null===(s=this.resumeFrom)||void 0===s?void 0:s.instance)||p||t&&(h||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,p);let t={...oP(c,"layout"),onPlay:d,onComplete:f};a.shouldReduceMotion&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||0!==this.animationProgress||sL(this),this.isLead()&&(null===(u=(l=this.options).onExitComplete)||void 0===u||u.call(l));this.targetLayout=r})}unmount(){var e,t;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),null===(e=this.getStack())||void 0===e||e.remove(this),null===(t=this.parent)||void 0===t||t.children.delete(this),this.instance=void 0,t8.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var e;return this.isAnimationBlocked||(null===(e=this.parent)||void 0===e?void 0:e.isTreeAnimationBlocked())||!1}startUpdate(){var e;this.isUpdateBlocked()||(this.isUpdating=!0,null===(e=this.nodes)||void 0===e||e.forEach(sV))}willUpdate(e=!0){var t,n,r;if(this.root.isUpdateBlocked()){null===(n=(t=this.options).onExitComplete)||void 0===n||n.call(t);return}if(this.root.isUpdating||this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){if(this.snapshot||!this.instance)return;let e=this.measure(),t=this.removeTransform(this.removeElementScroll(e));s$(t),this.snapshot={measured:e,layout:t,latestValues:{}}}updateLayout(){var e;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e=((null===(n=this.getStack())||void 0===n?void 0:n.members.length)||0),c=!!(l&&!u&&!0===this.options.crossfade&&!this.path.some(sH));this.animationProgress=0,this.mixTargetDelta=t=>{var n,r,d;let f=t/1e3;sZ(a.x,e.x,f),sZ(a.y,e.y,f),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&(null===(n=this.relativeParent)||void 0===n?void 0:n.layout)&&(al(s,this.layout.actual,this.relativeParent.layout.actual),r=this.relativeTarget,d=this.relativeTargetOrigin,sB(r.x,d.x,s.x,f),sB(r.y,d.y,s.y,f)),l&&(this.animationValues=o,function(e,t,n,r,i,o){var a,s,l,u;i?(e.opacity=ic(0,null!==(a=n.opacity)&&void 0!==a?a:1,sd(r)),e.opacityExit=ic(null!==(s=t.opacity)&&void 0!==s?s:1,0,sf(r))):o&&(e.opacity=ic(null!==(l=t.opacity)&&void 0!==l?l:1,null!==(u=n.opacity)&&void 0!==u?u:1,r));for(let i=0;i{nT.hasAnimatedSinceResize=!0,this.currentAnimation=function(e,t,n={}){let r=nZ(e)?e:oZ(e);return oN("",r,1e3,n),{stop:()=>r.stop(),isAnimating:()=>r.isAnimating()}}(0,0,{...e,onUpdate:t=>{var n;this.mixTargetDelta(t),null===(n=e.onUpdate)||void 0===n||n.call(e,t)},onComplete:()=>{var t;null===(t=e.onComplete)||void 0===t||t.call(e),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var e;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),null===(e=this.getStack())||void 0===e||e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var e;this.currentAnimation&&(null===(e=this.mixTargetDelta)||void 0===e||e.call(this,1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&sK(this.options.animationType,this.layout.actual,r.actual)){n=this.target||av();let t=an(this.layout.actual.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=an(this.layout.actual.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}sm(t,n),aT(t,i),ao(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){var n,r,i;this.sharedNodes.has(e)||this.sharedNodes.set(e,new sS);let o=this.sharedNodes.get(e);o.add(t),t.promote({transition:null===(n=t.options.initialPromotionConfig)||void 0===n?void 0:n.transition,preserveFollowOpacity:null===(i=null===(r=t.options.initialPromotionConfig)||void 0===r?void 0:r.shouldPreserveFollowOpacity)||void 0===i?void 0:i.call(r,t)})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){var e;let{layoutId:t}=this.options;return t&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this}getPrevLead(){var e;let{layoutId:t}=this.options;return t?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return!!e&&e.relegate(this)}resetRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,n={};for(let r=0;r{var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()}),this.root.nodes.forEach(sR),this.root.sharedNodes.clear()}}}function sA(e){e.updateLayout()}function sP(e){var t,n,r;let i=(null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&i&&e.hasListeners("didUpdate")){let{actual:t,measured:n}=e.layout,{animationType:r}=e.options;"size"===r?ag(e=>{let n=i.isShared?i.measured[e]:i.layout[e],r=an(n);n.min=t[e].min,n.max=n.min+r}):sK(r,i.layout,t)&&ag(e=>{let n=i.isShared?i.measured[e]:i.layout[e],r=an(t[e]);n.max=n.min+r});let o=ap();ao(o,t,i.layout);let a=ap();i.isShared?ao(a,e.applyTransform(n,!0),i.measured):ao(a,t,i.layout);let s=!sj(o),l=!1;if(!e.resumeFrom){let n=e.getClosestProjectingParent();if(n&&!n.resumeFrom){let{snapshot:e,layout:r}=n;if(e&&r){let n=av();al(n,i.layout,e.layout);let o=av();al(o,t,r.actual),sE(n,o)||(l=!0)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:i,delta:a,layoutDelta:o,hasLayoutChanged:s,hasRelativeTargetChanged:l})}else e.isLead()&&(null===(r=(n=e.options).onExitComplete)||void 0===r||r.call(n));e.options.transition=void 0}function sN(e){e.clearSnapshot()}function sR(e){e.clearMeasurements()}function sD(e){let{visualElement:t}=e.options;(null==t?void 0:t.getProps().onBeforeLayoutMeasure)&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function sL(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function sF(e){e.resolveTargetDelta()}function sz(e){e.calcProjection()}function sV(e){e.resetRotation()}function sI(e){e.removeLeadSnapshot()}function sZ(e,t,n){e.translate=ic(t.translate,0,n),e.scale=ic(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function sB(e,t,n,r){e.min=ic(t.min,n.min,r),e.max=ic(t.max,n.max,r)}function sH(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}let sU={duration:.45,ease:[.4,0,.1,1]};function sW(e,t){let n=e.root;for(let t=e.path.length-1;t>=0;t--)if(e.path[t].instance){n=e.path[t];break}let r=n&&n!==e.root?n.instance:document,i=r.querySelector(`[data-projection-id="${t}"]`);i&&e.mount(i,!0)}function sq(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function s$(e){sq(e.x),sq(e.y)}function sK(e,t,n){return"position"===e||"preserve-aspect"===e&&!function(e,t,n=.1){return o6(e,t)<=n}(sk(t),sk(n),.2)}let sY=sT({attachResizeListener:(e,t)=>rC(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),sG={current:void 0},sX=sT({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!sG.current){let e=new sY(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),sG.current=e}return sG.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>"fixed"===window.getComputedStyle(e).position}),sJ={...o2,...r5,...aD,measureLayout:function(e){let[t,n]=r6(),r=(0,b.useContext)(nf);return b.createElement(si,{...e,layoutGroup:r,switchLayoutGroup:(0,b.useContext)(nN),isPresent:t,safeToRemove:n})}},sQ=function(e){function t(t,n={}){return function({preloadedFeatures:e,createVisualElement:t,projectionNodeConstructor:n,useRender:r,useVisualState:i,Component:o}){e&&function(e){for(let t in e)"projectionNodeConstructor"===t?nM.projectionNodeConstructor=e[t]:nM[t].Component=e[t]}(e);let a=(0,b.forwardRef)(function(a,s){var l;let u={...(0,b.useContext)(ny),...a,layoutId:function({layoutId:e}){let t=(0,b.useContext)(nf).id;return t&&void 0!==e?t+"-"+e:e}(a)},{isStatic:c}=u,d=null,f=function(e){let{initial:t,animate:n}=function(e,t){if(nS(e)){let{initial:t,animate:n}=e;return{initial:!1===t||nj(t)?t:void 0,animate:nj(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,(0,b.useContext)(nb));return(0,b.useMemo)(()=>({initial:t,animate:n}),[nC(t),nC(n)])}(a),h=c?void 0:ns(()=>{if(nT.hasEverUpdated)return nA++}),p=i(a,c);if(!c&&nr){f.visualElement=function(e,t,n,r){let i=(0,b.useContext)(nb).visualElement,o=(0,b.useContext)(nx),a=(0,b.useContext)(na),s=(0,b.useContext)(ny).reducedMotion,l=(0,b.useRef)();r=r||o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceId:a?a.id:void 0,blockInitialAnimation:!!a&&!1===a.initial,reducedMotionConfig:s}));let u=l.current;return ni(()=>{u&&u.render()}),(0,b.useEffect)(()=>{u&&u.animationState&&u.animationState.animateChanges()}),ni(()=>()=>u&&u.notify("Unmount"),[]),u}(o,p,u,t);let r=(0,b.useContext)(nx).strict,i=(0,b.useContext)(nN);f.visualElement&&(d=f.visualElement.loadFeatures(u,r,e,h,n||nM.projectionNodeConstructor,i))}return b.createElement(nP,{visualElement:f.visualElement,props:u},d,b.createElement(nb.Provider,{value:f},r(o,a,h,(l=f.visualElement,(0,b.useCallback)(e=>{e&&p.mount&&p.mount(e),l&&(e?l.mount(e):l.unmount()),s&&("function"==typeof s?s(e):nw(s)&&(s.current=e))},[l])),p,c,f.visualElement)))});return a[nR]=o,a}(e(t,n))}if("undefined"==typeof Proxy)return t;let n=new Map;return new Proxy(t,{get:(e,r)=>(n.has(r)||n.set(r,t(r)),n.get(r))})}((e,t)=>(function(e,{forwardMotionProps:t=!1},n,r,i){let o=nL(e)?rS:r_;return{...o,preloadedFeatures:n,useRender:function(e=!1){return(t,n,r,i,{latestValues:o},a)=>{let s=nL(t)?rf:rr,l=s(n,o,a),u=function(e,t,n){let r={};for(let i in e)(ra(i)||!0===n&&ro(i)||!t&&!ro(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}(n,"string"==typeof t,e),c={...u,...l,ref:i};return r&&(c["data-projection-id"]=r),(0,b.createElement)(t,c)}}(t),createVisualElement:r,projectionNodeConstructor:i,Component:e}})(e,t,sJ,a9,sX));function s0(e){let{open:t,onOpenChange:n}=e,[r,i]=(0,b.useState)(!1),o=(0,b.useMemo)(()=>n?t:r,[n,r,t]),a=(0,b.useCallback)(e=>{n?n(e):i(e)},[n]);return{open:o,onOpenChange:a}}var s1=n(35957),s2=n.n(s1),s4=n(276),s3=n.n(s4);let s5=(0,eo.cx)(s2().variable,s3().variable),s6={show:{opacity:[0,1],scale:[.95,1],transition:{duration:.1,ease:"easeOut"}},exit:{opacity:[1,0],scale:[1,.95],transition:{duration:.1,ease:"easeIn"}}};function s8(e){let{children:t,content:n,defaultOpen:r,open:i,onOpenChange:o,delayDuration:a=300,disableHoverableContent:s,...l}=e,{open:u,onOpenChange:c}=s0({open:i,onOpenChange:o});return(0,y.jsxs)(tB,{open:u,delayDuration:a,disableHoverableContent:s,defaultOpen:r,onOpenChange:c,children:[(0,y.jsx)(tP,{asChild:!0,children:t}),(0,y.jsx)(ng,{children:n&&u?(0,y.jsx)(tH,{forceMount:!0,children:(0,y.jsx)(tF,{forceMount:!0,asChild:!0,side:"top",align:"center",sideOffset:l.sideOffset||5,...l,children:(0,y.jsx)(sQ.div,{variants:s6,initial:"init",animate:"show",exit:"exit",className:(0,eo.cx)(s5,"relative","z-50","data-[side=top]:bottom-1","data-[side=top]:origin-bottom","data-[side=bottom]:top-1","data-[side=bottom]:origin-top","data-[side=left]:right-1","data-[side=left]:origin-right","data-[side=right]:left-1","data-[side=right]:origin-left"),children:(0,y.jsx)("div",{className:(0,eo.cx)("py-1 px-2","max-w-xs","overflow-hidden",t$()),children:(0,y.jsx)(tq,{size:"12",children:n})})})})}):null})]})}let s7=(0,eo.j)(["inline-flex","gap-1","appearance-none","shrink-0","items-center","justify-center","select-none","leading-normal","font-sans","cursor-pointer","overflow-hidden","focus:z-10","disabled:cursor-auto","disabled:pointer-events-none","outline-none","focus:ring ring-blue-500 dark:ring-blue-200","transition-colors duration-75"],{variants:{size:{small:["text-xs","px-2","h-7"],medium:["text-base","px-4","h-10"],large:["text-lg","px-4","h-12"],none:[]},state:{waiting:["pointer-events-none"]},disabled:{true:"cursor-auto pointer-events-none"},rounded:{true:"rounded",false:""},variant:{accent:["border","text-white dark:text-white","enabled:bg-green-700 enabled:dark:bg-green-700","enabled:border-green-800/30 enabled:dark:border-green-600/70","enabled:hover:bg-green-800/90 dark:enabled:hover:bg-green-700/90","enabled:hover:border-green-800/50 enabled:hover:dark:border-green-600","disabled:text-white/50 disabled:dark:text-white/50","disabled:bg-green-700/70 disabled:dark:bg-green-600/70","disabled:border-green-600/50 disabled:dark:border-green-500/30","[&[href]]:bg-green-700 [&[href]]:dark:bg-green-700","[&[href]]:border-green-800/30 [&[href]]:dark:border-green-600/70","[&[href]]:hover:bg-green-800/90 dark:[&[href]]:hover:bg-green-700/90","[&[href]]:hover:border-green-800/50 [href]]:hover:dark:border-green-600"],red:["border","bg-red-700 dark:bg-red-700","border-red-800/30 dark:border-red-600/70","enabled:hover:bg-red-800/90 dark:enabled:hover:bg-red-700/90","enabled:hover:border-red-800/50 enabled:hover:dark:border-red-600","disabled:bg-red-700/70 disabled:dark:bg-red-600/70","disabled:border-red-600/50 disabled:dark:border-red-500/30","text-white dark:text-white","disabled:text-white/50 disabled:dark:text-white/50"],amber:["border","bg-amber-700 dark:bg-amber-700","border-amber-800/30 dark:border-amber-600/70","enabled:hover:bg-amber-800/90 dark:enabled:hover:bg-amber-700/90","enabled:hover:border-amber-800/50 enabled:hover:dark:border-amber-600","disabled:bg-amber-700/70 disabled:dark:bg-amber-600/70","disabled:border-amber-600/50 disabled:dark:border-amber-500/30","text-white dark:text-white","disabled:text-white/50 disabled:dark:text-white/50"],gray:["border","bg-white dark:bg-graydark-200","enabled:hover:bg-gray-50 dark:enabled:hover:bg-graydark-300","disabled:bg-gray-200 disabled:dark:bg-graydark-200","border-gray-400 dark:border-graydark-400","enabled:hover:border-gray-500 enabled:hover:dark:border-graydark-500","text-gray-1100 dark:text-gray-300","disabled:text-gray-600 disabled:dark:text-graydark-700"],active:["border","bg-gray-200 dark:bg-graydark-400","enabled:hover:bg-gray-50 dark:enabled:hover:bg-graydark-300","disabled:bg-gray-200 disabled:dark:bg-graydark-200","border-gray-500 dark:border-graydark-500","enabled:hover:border-gray-500 enabled:hover:dark:border-graydark-500","text-gray-1100 dark:text-white","disabled:text-gray-600 disabled:dark:text-graydark-700"],inactive:["border","bg-white dark:bg-graydark-200","enabled:hover:bg-gray-50 dark:enabled:hover:bg-graydark-300","disabled:bg-gray-200 disabled:dark:bg-graydark-200","border-gray-400/70 dark:border-graydark-400/70","enabled:hover:border-gray-500 enabled:hover:dark:border-graydark-500","text-gray-1100/30 dark:text-white/30","enabled:hover:text-gray-1100 enabled:hover:dark:text-white","disabled:text-gray-600 disabled:dark:text-graydark-700"],ghost:["appearance-none border-none bg-transparent","text-gray-1100 dark:text-white","disabled:text-gray-600 disabled:dark:text-graydark-700"],state:["open:text-gray-1100 open:dark:text-white","hover:text-gray-1000 hover:dark:text-graydark-1000","text-gray-700 dark:text-graydark-800"]},icon:{contrast:"",hover:"[&>svg]:opacity-50 hover:[&>svg]:opacity-100 transition-opacity",subtle:"[&>svg]:opacity-50"},color:{verySubtle:"!text-gray-700 dark:!text-graydark-700",subtle:"!text-gray-1000 dark:!text-graydark-1000",contrast:"!text-gray-1100 dark:!text-white",lo:"!text-white dark:!text-graydark-50",accent:"!text-accent-1100 dark:!text-accentdark-1100",red:"!text-red-700 dark:!text-red-400",green:"!text-emerald-700 dark:!text-emerald-500",amber:"!text-amber-600 dark:!text-amber-500",none:""}},defaultVariants:{variant:"gray",size:"small",rounded:!0,icon:"subtle",color:"none"}}),s9=b.forwardRef((e,t)=>{let{variant:n,size:r,state:i,rounded:o,disabled:a,icon:s,color:l,tip:u,tipAlign:c,tipSide:d,className:f,type:h="button",...p}=e;return u?(0,y.jsx)(s8,{content:u,align:c,side:d,children:(0,y.jsx)("button",{ref:t,type:h,disabled:a,className:s7({variant:n,size:r,state:i,rounded:o,disabled:a,icon:s,color:l,className:f}),...p})}):(0,y.jsx)("button",{ref:t,disabled:a,type:h,className:s7({variant:n,size:r,state:i,rounded:o,disabled:a,icon:s,color:l,className:f}),...p})});var le=n(88242);(0,eo.j)([],{variants:{variant:{default:"border-t border-gray-500 dark:border-graydark-500 last-of-type:border-b",ghost:""}},defaultVariants:{variant:"default"}});let lt=(0,eo.j)("border border-gray-500 dark:border-graydark-500 bg-gray-100 dark:bg-graydark-100 rounded p-4"),ln=b.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,y.jsx)("div",{...r,className:lt({className:n}),ref:t})});var lr=n(86029);let li="Avatar",[lo,la]=(0,j.b)(li),[ls,ll]=lo(li),lu=(0,b.forwardRef)((e,t)=>{let{__scopeAvatar:n,...r}=e,[i,o]=(0,b.useState)("idle");return(0,b.createElement)(ls,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:o},(0,b.createElement)(O.WV.span,(0,w.Z)({},r,{ref:t})))}),lc=(0,b.forwardRef)((e,t)=>{let{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...o}=e,a=ll("AvatarImage",n),s=function(e){let[t,n]=(0,b.useState)("idle");return(0,b.useEffect)(()=>{if(!e){n("error");return}let t=!0,r=new window.Image,i=e=>()=>{t&&n(e)};return n("loading"),r.onload=i("loaded"),r.onerror=i("error"),r.src=e,()=>{t=!1}},[e]),t}(r),l=(0,lr.W)(e=>{i(e),a.onImageLoadingStatusChange(e)});return(0,M.b)(()=>{"idle"!==s&&l(s)},[s,l]),"loaded"===s?(0,b.createElement)(O.WV.img,(0,w.Z)({},o,{ref:t,src:r})):null}),ld=(0,b.forwardRef)((e,t)=>{let{__scopeAvatar:n,delayMs:r,...i}=e,o=ll("AvatarFallback",n),[a,s]=(0,b.useState)(void 0===r);return(0,b.useEffect)(()=>{if(void 0!==r){let e=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(e)}},[r]),a&&"loaded"!==o.imageLoadingStatus?(0,b.createElement)(O.WV.span,(0,w.Z)({},i,{ref:t})):null}),lf=(0,eo.j)(["items-center justify-center align-middle flex flex-shrink-0 relative","overflow-hidden select-none outline-none","font-sans font-medium text-sm","border"],{variants:{size:{1:"w-6 h-6",2:"w-12 h-12",3:"w-16 h-16",4:"w-28 h-28"},variant:{filter:"bg-transparent",hiContrast:["bg-gray-900 dark:bg-white text-white dark:text-gray-1100","border-gray-900 dark:border-white text-white dark:text-gray-1100"],gray:["bg-gray-500 dark:bg-gray-800 text-gray-1100 dark:text-white","border-gray-500 dark:border-gray-800 text-gray-1100 dark:text-white"]},shape:{square:"rounded",circle:"rounded-full"},inactive:{true:"opacity-30"},interactive:{true:"cursor-pointer"}},defaultVariants:{size:"2",variant:"gray",shape:"circle"}}),lh=(0,eo.j)("uppercase",{variants:{size:{1:"text-sm",2:"text-base",3:"text-lg",4:"text-lg"}},defaultVariants:{size:"2"}}),lp=b.forwardRef((e,t)=>{let{alt:n,src:r,fallback:i,size:o,variant:a,shape:s,interactive:l,inactive:u,className:c,...d}=e;return(0,y.jsx)("div",{className:(0,eo.cx)("relative h-fit w-fit",c),children:(0,y.jsxs)(lu,{...d,ref:t,className:lf({className:c,size:o,variant:a,interactive:l,inactive:u,shape:s}),children:["filter"===a&&(0,y.jsx)("div",{className:"absolute w-full h-full z-10",style:{backgroundColor:"rgba(30, 169, 76, 0.3)"}}),(0,y.jsx)(lc,{alt:n,src:r,className:"flex object-cover h-full align-middle w-full"}),(0,y.jsx)(ld,{className:lh({size:o}),children:i})]})})});(0,eo.j)(["items-center appearance-none inline-flex flex-shrink-0 whitespace-nowrap","font-sans font-regular text-sm","justify-center align-middle outline-none p-0 decoration-none select-none","disabled:pointer-events-none","py-0.5 px-2"],{variants:{variant:{active:["border","bg-gray-800 text-gray-900 border-gray-900","dark:bg-transparent dark:text-white dark:border-white/10"],simple:"bg-gray-300 dark:bg-graydark-800 text-gray-900 dark:text-white",green:["border","[&>svg]:opacity-50","bg-green-700 dark:bg-green-700","border-green-800/30 dark:border-green-600/70","hover:bg-green-800/90 dark:hover:bg-green-700/90","hover:border-green-800/50 hover:dark:border-green-600","text-white dark:text-white"],accent:["border","[&>svg]:opacity-50","bg-green-700 dark:bg-green-700","border-green-800/30 dark:border-green-600/70","hover:bg-green-800/90 dark:hover:bg-green-700/90","hover:border-green-800/50 hover:dark:border-green-600","text-white dark:text-white"],red:["border","[&>svg]:opacity-50","bg-red-700 dark:bg-red-700","border-red-800/30 dark:border-red-600/70","hover:bg-red-800/90 dark:hover:bg-red-700/90","hover:border-red-800/50 hover:dark:border-red-600","text-white dark:text-white"],amber:["border","[&>svg]:opacity-50","bg-amber-700 dark:bg-amber-700","border-amber-800/30 dark:border-amber-600/70","hover:bg-amber-800/90 dark:hover:bg-amber-700/90","hover:border-amber-800/50 hover:dark:border-amber-600","text-white dark:text-white"],gray:["border","[&>svg]:opacity-50","bg-white dark:bg-graydark-200","border-gray-400 dark:border-graydark-400","hover:bg-gray-50 dark:hover:bg-graydark-300","hover:border-gray-500 hover:dark:border-graydark-500","text-gray-1100 dark:text-white"],inactive:["border","[&>svg]:opacity-50","bg-white dark:bg-transparent","border-gray-400 dark:border-graydark-400","hover:border-gray-500 hover:dark:border-graydark-500","text-gray-1100/30 dark:text-white/30","hover:text-gray-1100/50 hover:dark:text-white/50"]},interactive:{true:"cursor-pointer"},rounded:{true:"rounded",false:""}},defaultVariants:{variant:"gray",rounded:!0}});let lm=b.forwardRef((e,t)=>{let{className:n,size:r,color:i,...o}=e;return(0,y.jsx)("pre",{children:(0,y.jsx)("code",{className:(0,eo.cx)(tU({font:"mono",size:r,color:i}),"block","w-full","overflow-auto","p-3","bg-white dark:bg-graydark-200","border border-gray-400 dark:border-graydark-400","rounded",n),...o,ref:t})})}),lv=(0,eo.j)(["font-mono","whitespace-nowrap","rounded"],{variants:{color:{gray:["bg-gray-200 dark:bg-graydark-200","text-gray-1100 dark:text-graydark-1100"],accent:["bg-accent-200 dark:bg-accentdark-200","text-accent-1100 dark:text-accentdark-1100"]}},defaultVariants:{color:"accent"}}),lg=b.forwardRef((e,t)=>{let{color:n,className:r,...i}=e;return(0,y.jsx)("code",{...i,className:lv({color:n,className:r}),ref:t})}),ly=(0,eo.j)(["flex","relative","[&>*]:rounded-none [&>*:last-child]:rounded-r [&>*:first-child]:rounded-l","[&>*]:border-r-0 [&>*]:border-l [&>*:first-child]:border-l [&>*:last-child]:border-r"]),lb=b.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,y.jsx)("div",{ref:t,className:ly({className:n}),...r})});(0,eo.j)(["select-none appearance-none outline-none overflow-hidden","inline-flex items-center justify-center","focus:ring ring-blue-500 dark:ring-blue-200","border","bg-gray-300 dark:bg-graydark-50","autofill:bg-blue-100 autofill:dark:bg-blue-800","border-gray-400 dark:border-graydark-400","enabled:hover:border-gray-500 enabled:hover:dark:border-graydark-500","disabled:cursor-default","enabled:data-[state=checked]:bg-green-600 dark:enabled:data-[state=checked]:bg-green-500","disabled:data-[state=checked]:bg-green-600/50 dark:disabled:data-[state=checked]:bg-green-500/50"],{variants:{size:{small:"w-4 h-4 rounded",medium:"w-6 h-6 rounded"}},defaultVariants:{size:"small"}});let lx=(0,eo.j)(["flex-shrink-0 w-full mx-auto"],{variants:{pad:{true:"px-5 md:px-10",false:""},size:{1:"max-w-screen-sm",2:"max-w-screen-md",3:"max-w-[1145px]",4:"max-w-screen-2xl",full:"max-w-none"}},defaultVariants:{pad:!0,size:"3"}}),lw=b.forwardRef((e,t)=>{let{className:n,pad:r,size:i,...o}=e;return(0,y.jsx)("div",{ref:t,...o,className:lx({size:i,pad:r,className:n})})});var lj=n(72331);let lE=(0,b.createContext)(void 0);function lk(e){let t=(0,b.useContext)(lE);return e||t||"ltr"}let lS="ScrollArea",[l_,lC]=(0,j.b)(lS),[lO,lM]=l_(lS),lT=(0,b.forwardRef)((e,t)=>{let{__scopeScrollArea:n,type:r="hover",dir:i,scrollHideDelay:o=600,...a}=e,[s,l]=(0,b.useState)(null),[u,c]=(0,b.useState)(null),[d,f]=(0,b.useState)(null),[h,p]=(0,b.useState)(null),[m,v]=(0,b.useState)(null),[g,y]=(0,b.useState)(0),[x,j]=(0,b.useState)(0),[k,S]=(0,b.useState)(!1),[_,C]=(0,b.useState)(!1),M=(0,E.e)(t,e=>l(e)),T=lk(i);return(0,b.createElement)(lO,{scope:n,type:r,dir:T,scrollHideDelay:o,scrollArea:s,viewport:u,onViewportChange:c,content:d,onContentChange:f,scrollbarX:h,onScrollbarXChange:p,scrollbarXEnabled:k,onScrollbarXEnabledChange:S,scrollbarY:m,onScrollbarYChange:v,scrollbarYEnabled:_,onScrollbarYEnabledChange:C,onCornerWidthChange:y,onCornerHeightChange:j},(0,b.createElement)(O.WV.div,(0,w.Z)({dir:T},a,{ref:M,style:{position:"relative","--radix-scroll-area-corner-width":g+"px","--radix-scroll-area-corner-height":x+"px",...e.style}})))}),lA=(0,b.forwardRef)((e,t)=>{let{__scopeScrollArea:n,children:r,...i}=e,o=lM("ScrollAreaViewport",n),a=(0,b.useRef)(null),s=(0,E.e)(t,a,o.onViewportChange);return(0,b.createElement)(b.Fragment,null,(0,b.createElement)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"}}),(0,b.createElement)(O.WV.div,(0,w.Z)({"data-radix-scroll-area-viewport":""},i,{ref:s,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...e.style}}),(0,b.createElement)("div",{ref:o.onContentChange,style:{minWidth:"100%",display:"table"}},r)))}),lP="ScrollAreaScrollbar",lN=(0,b.forwardRef)((e,t)=>{let{forceMount:n,...r}=e,i=lM(lP,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:a}=i,s="horizontal"===e.orientation;return(0,b.useEffect)(()=>(s?o(!0):a(!0),()=>{s?o(!1):a(!1)}),[s,o,a]),"hover"===i.type?(0,b.createElement)(lR,(0,w.Z)({},r,{ref:t,forceMount:n})):"scroll"===i.type?(0,b.createElement)(lD,(0,w.Z)({},r,{ref:t,forceMount:n})):"auto"===i.type?(0,b.createElement)(lL,(0,w.Z)({},r,{ref:t,forceMount:n})):"always"===i.type?(0,b.createElement)(lF,(0,w.Z)({},r,{ref:t})):null}),lR=(0,b.forwardRef)((e,t)=>{let{forceMount:n,...r}=e,i=lM(lP,e.__scopeScrollArea),[o,a]=(0,b.useState)(!1);return(0,b.useEffect)(()=>{let e=i.scrollArea,t=0;if(e){let n=()=>{window.clearTimeout(t),a(!0)},r=()=>{t=window.setTimeout(()=>a(!1),i.scrollHideDelay)};return e.addEventListener("pointerenter",n),e.addEventListener("pointerleave",r),()=>{window.clearTimeout(t),e.removeEventListener("pointerenter",n),e.removeEventListener("pointerleave",r)}}},[i.scrollArea,i.scrollHideDelay]),(0,b.createElement)(T.z,{present:n||o},(0,b.createElement)(lL,(0,w.Z)({"data-state":o?"visible":"hidden"},r,{ref:t})))}),lD=(0,b.forwardRef)((e,t)=>{var n;let{forceMount:r,...i}=e,o=lM(lP,e.__scopeScrollArea),a="horizontal"===e.orientation,s=l1(()=>u("SCROLL_END"),100),[l,u]=(n={hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}},(0,b.useReducer)((e,t)=>{let r=n[e][t];return null!=r?r:e},"hidden"));return(0,b.useEffect)(()=>{if("idle"===l){let e=window.setTimeout(()=>u("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(e)}},[l,o.scrollHideDelay,u]),(0,b.useEffect)(()=>{let e=o.viewport,t=a?"scrollLeft":"scrollTop";if(e){let n=e[t],r=()=>{let r=e[t],i=n!==r;i&&(u("SCROLL"),s()),n=r};return e.addEventListener("scroll",r),()=>e.removeEventListener("scroll",r)}},[o.viewport,a,u,s]),(0,b.createElement)(T.z,{present:r||"hidden"!==l},(0,b.createElement)(lF,(0,w.Z)({"data-state":"hidden"===l?"hidden":"visible"},i,{ref:t,onPointerEnter:(0,_.M)(e.onPointerEnter,()=>u("POINTER_ENTER")),onPointerLeave:(0,_.M)(e.onPointerLeave,()=>u("POINTER_LEAVE"))})))}),lL=(0,b.forwardRef)((e,t)=>{let n=lM(lP,e.__scopeScrollArea),{forceMount:r,...i}=e,[o,a]=(0,b.useState)(!1),s="horizontal"===e.orientation,l=l1(()=>{if(n.viewport){let e=n.viewport.offsetWidth{let{orientation:n="vertical",...r}=e,i=lM(lP,e.__scopeScrollArea),o=(0,b.useRef)(null),a=(0,b.useRef)(0),[s,l]=(0,b.useState)({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=lG(s.viewport,s.content),c={...r,sizes:s,onSizesChange:l,hasThumb:!!(u>0&&u<1),onThumbChange:e=>o.current=e,onThumbPointerUp:()=>a.current=0,onThumbPointerDown:e=>a.current=e};function d(e,t){return function(e,t,n,r="ltr"){let i=lX(n),o=t||i/2,a=n.scrollbar.paddingStart+o,s=n.scrollbar.size-n.scrollbar.paddingEnd-(i-o),l=n.content-n.viewport,u=lQ([a,s],"ltr"===r?[0,l]:[-1*l,0]);return u(e)}(e,a.current,s,t)}return"horizontal"===n?(0,b.createElement)(lz,(0,w.Z)({},c,{ref:t,onThumbPositionChange:()=>{if(i.viewport&&o.current){let e=i.viewport.scrollLeft,t=lJ(e,s,i.dir);o.current.style.transform=`translate3d(${t}px, 0, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollLeft=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollLeft=d(e,i.dir))}})):"vertical"===n?(0,b.createElement)(lV,(0,w.Z)({},c,{ref:t,onThumbPositionChange:()=>{if(i.viewport&&o.current){let e=i.viewport.scrollTop,t=lJ(e,s);o.current.style.transform=`translate3d(0, ${t}px, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollTop=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollTop=d(e))}})):null}),lz=(0,b.forwardRef)((e,t)=>{let{sizes:n,onSizesChange:r,...i}=e,o=lM(lP,e.__scopeScrollArea),[a,s]=(0,b.useState)(),l=(0,b.useRef)(null),u=(0,E.e)(t,l,o.onScrollbarXChange);return(0,b.useEffect)(()=>{l.current&&s(getComputedStyle(l.current))},[l]),(0,b.createElement)(lB,(0,w.Z)({"data-orientation":"horizontal"},i,{ref:u,sizes:n,style:{bottom:0,left:"rtl"===o.dir?"var(--radix-scroll-area-corner-width)":0,right:"ltr"===o.dir?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":lX(n)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,n)=>{if(o.viewport){let r=o.viewport.scrollLeft+t.deltaX;e.onWheelScroll(r),r>0&&r{l.current&&o.viewport&&a&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:lY(a.paddingLeft),paddingEnd:lY(a.paddingRight)}})}}))}),lV=(0,b.forwardRef)((e,t)=>{let{sizes:n,onSizesChange:r,...i}=e,o=lM(lP,e.__scopeScrollArea),[a,s]=(0,b.useState)(),l=(0,b.useRef)(null),u=(0,E.e)(t,l,o.onScrollbarYChange);return(0,b.useEffect)(()=>{l.current&&s(getComputedStyle(l.current))},[l]),(0,b.createElement)(lB,(0,w.Z)({"data-orientation":"vertical"},i,{ref:u,sizes:n,style:{top:0,right:"ltr"===o.dir?0:void 0,left:"rtl"===o.dir?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":lX(n)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,n)=>{if(o.viewport){let r=o.viewport.scrollTop+t.deltaY;e.onWheelScroll(r),r>0&&r{l.current&&o.viewport&&a&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:lY(a.paddingTop),paddingEnd:lY(a.paddingBottom)}})}}))}),[lI,lZ]=l_(lP),lB=(0,b.forwardRef)((e,t)=>{let{__scopeScrollArea:n,sizes:r,hasThumb:i,onThumbChange:o,onThumbPointerUp:a,onThumbPointerDown:s,onThumbPositionChange:l,onDragScroll:u,onWheelScroll:c,onResize:d,...f}=e,h=lM(lP,n),[p,m]=(0,b.useState)(null),v=(0,E.e)(t,e=>m(e)),g=(0,b.useRef)(null),y=(0,b.useRef)(""),x=h.viewport,j=r.content-r.viewport,k=(0,lr.W)(c),S=(0,lr.W)(l),C=l1(d,10);function M(e){if(g.current){let t=e.clientX-g.current.left,n=e.clientY-g.current.top;u({x:t,y:n})}}return(0,b.useEffect)(()=>{let e=e=>{let t=e.target,n=null==p?void 0:p.contains(t);n&&k(e,j)};return document.addEventListener("wheel",e,{passive:!1}),()=>document.removeEventListener("wheel",e,{passive:!1})},[x,p,j,k]),(0,b.useEffect)(S,[r,S]),l2(p,C),l2(h.content,C),(0,b.createElement)(lI,{scope:n,scrollbar:p,hasThumb:i,onThumbChange:(0,lr.W)(o),onThumbPointerUp:(0,lr.W)(a),onThumbPositionChange:S,onThumbPointerDown:(0,lr.W)(s)},(0,b.createElement)(O.WV.div,(0,w.Z)({},f,{ref:v,style:{position:"absolute",...f.style},onPointerDown:(0,_.M)(e.onPointerDown,e=>{if(0===e.button){let t=e.target;t.setPointerCapture(e.pointerId),g.current=p.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",M(e)}}),onPointerMove:(0,_.M)(e.onPointerMove,M),onPointerUp:(0,_.M)(e.onPointerUp,e=>{let t=e.target;t.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=y.current,g.current=null})})))}),lH="ScrollAreaThumb",lU=(0,b.forwardRef)((e,t)=>{let{forceMount:n,...r}=e,i=lZ(lH,e.__scopeScrollArea);return(0,b.createElement)(T.z,{present:n||i.hasThumb},(0,b.createElement)(lW,(0,w.Z)({ref:t},r)))}),lW=(0,b.forwardRef)((e,t)=>{let{__scopeScrollArea:n,style:r,...i}=e,o=lM(lH,n),a=lZ(lH,n),{onThumbPositionChange:s}=a,l=(0,E.e)(t,e=>a.onThumbChange(e)),u=(0,b.useRef)(),c=l1(()=>{u.current&&(u.current(),u.current=void 0)},100);return(0,b.useEffect)(()=>{let e=o.viewport;if(e){let t=()=>{if(c(),!u.current){let t=l0(e,s);u.current=t,s()}};return s(),e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)}},[o.viewport,c,s]),(0,b.createElement)(O.WV.div,(0,w.Z)({"data-state":a.hasThumb?"visible":"hidden"},i,{ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:(0,_.M)(e.onPointerDownCapture,e=>{let t=e.target,n=t.getBoundingClientRect(),r=e.clientX-n.left,i=e.clientY-n.top;a.onThumbPointerDown({x:r,y:i})}),onPointerUp:(0,_.M)(e.onPointerUp,a.onThumbPointerUp)}))}),lq="ScrollAreaCorner",l$=(0,b.forwardRef)((e,t)=>{let n=lM(lq,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY),i="scroll"!==n.type&&r;return i?(0,b.createElement)(lK,(0,w.Z)({},e,{ref:t})):null}),lK=(0,b.forwardRef)((e,t)=>{let{__scopeScrollArea:n,...r}=e,i=lM(lq,n),[o,a]=(0,b.useState)(0),[s,l]=(0,b.useState)(0);return l2(i.scrollbarX,()=>{var e;let t=(null===(e=i.scrollbarX)||void 0===e?void 0:e.offsetHeight)||0;i.onCornerHeightChange(t),l(t)}),l2(i.scrollbarY,()=>{var e;let t=(null===(e=i.scrollbarY)||void 0===e?void 0:e.offsetWidth)||0;i.onCornerWidthChange(t),a(t)}),o&&s?(0,b.createElement)(O.WV.div,(0,w.Z)({},r,{ref:t,style:{width:o,height:s,position:"absolute",right:"ltr"===i.dir?0:void 0,left:"rtl"===i.dir?0:void 0,bottom:0,...e.style}})):null});function lY(e){return e?parseInt(e,10):0}function lG(e,t){let n=e/t;return isNaN(n)?0:n}function lX(e){let t=lG(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function lJ(e,t,n="ltr"){let r=lX(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-i,a=t.content-t.viewport,s="ltr"===n?[0,a]:[-1*a,0],l=function(e,[t,n]){return Math.min(n,Math.max(t,e))}(e,s),u=lQ([0,a],[0,o-r]);return u(l)}function lQ(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}let l0=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return!function i(){let o={left:e.scrollLeft,top:e.scrollTop},a=n.left!==o.left,s=n.top!==o.top;(a||s)&&t(),n=o,r=window.requestAnimationFrame(i)}(),()=>window.cancelAnimationFrame(r)};function l1(e,t){let n=(0,lr.W)(e),r=(0,b.useRef)(0);return(0,b.useEffect)(()=>()=>window.clearTimeout(r.current),[]),(0,b.useCallback)(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function l2(e,t){let n=(0,lr.W)(t);(0,M.b)(()=>{let t=0;if(e){let r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e,n])}let l4=b.forwardRef((e,t)=>{let{id:n,className:r,style:i,children:o,keyToResetScrollbars:a}=e;return(0,y.jsxs)(lT,{className:(0,eo.cx)("w-full h-full overflow-hidden",r),style:i,children:[(0,y.jsx)(lA,{id:n,ref:t,className:"w-full h-full [&>div]:!block [&>div]:!h-full",children:o}),(0,y.jsx)(lN,{orientation:"vertical",className:"z-10 flex select-none touch-none transition-colors hover:bg-black/20 w-1.5 m-px",children:(0,y.jsx)(lU,{className:(0,eo.cx)("flex-1 relative bg-gray-300 rounded",'before:content[""] before:absolute before:top-1/2 before:left-1/2 -translate-x-1/2 -translate-y-1/2 w-full h-full')})},a?"v-".concat(a):void 0),(0,y.jsx)(lN,{orientation:"horizontal",className:"z-10 flex flex-col select-none touch-none transition-colors duration-1000 hover:bg-black/20 h-1 m-px",children:(0,y.jsx)(lU,{className:(0,eo.cx)("flex-1 relative bg-gray-300 rounded",'before:content[""] before:absolute before:top-1/2 before:left-1/2 -translate-x-1/2 -translate-y-1/2 w-full h-full')})},a?"h-".concat(a):void 0),(0,y.jsx)(l$,{className:"bg-black/70"})]})}),l3=(0,eo.j)([s5,"z-20","overflow-hidden"],{variants:{variant:{default:"flex items-center justify-center w-full h-full",none:""}},defaultVariants:{variant:"default"}}),l5={show:{scale:[.95,1],transition:{duration:.1,ease:"easeOut"}},exit:{opacity:[1,0],scale:[1,.95],transition:{duration:.1,ease:"easeIn"}}},l6=b.forwardRef((e,t)=>{let{trigger:n,rootProps:r,open:i,onOpenChange:o,onSubmit:a,title:s,description:l,containerVariants:u,contentVariants:c,controls:d,children:f,bodyClassName:h,closeClassName:p,dynamicHeight:m=!0}=e,{open:v,onOpenChange:g}=s0({open:i,onOpenChange:o});return(0,y.jsxs)(lj.fC,{open:v,onOpenChange:g,...r,children:[n&&(0,y.jsx)(lj.xz,{asChild:!0,children:n}),(0,y.jsx)(ng,{children:v?(0,y.jsx)(lj.h_,{forceMount:!0,children:(0,y.jsx)(lj.VY,{asChild:!0,forceMount:!0,ref:t,children:(0,y.jsxs)("div",{className:"fixed w-full h-full top-0 left-0 z-20",children:[(0,y.jsx)(lj.aV,{onClick:()=>g(!1),className:"fixed z-10 top-0 right-0 bottom-0 left-0 inset-0 transition-opacity opacity-0 open:opacity-10 dark:open:opacity-20 bg-black"}),(0,y.jsx)(sQ.div,{variants:l5,initial:"init",animate:"show",exit:"exit",className:l3(u),children:(0,y.jsx)(l9,{title:s,description:l,contentVariants:c,onSubmit:a,controls:d,bodyClassName:h,closeClassName:p,dynamicHeight:m,children:f})})]})})}):null})]})});function l8(e){let{className:t}=e;return(0,y.jsx)(lj.x8,{asChild:!0,type:"button",children:(0,y.jsx)("div",{className:(0,eo.cx)("appearance-none",t),children:(0,y.jsx)(s9,{size:"small",variant:"ghost",type:"button",children:(0,y.jsx)(le.QN4,{})})})})}let l7=(0,eo.j)(["relative","z-40","overflow-hidden"],{variants:{variant:{default:[t$()],none:""}},defaultVariants:{variant:"default"}}),l9=b.forwardRef((e,t)=>{let{children:n,onSubmit:r,title:i,description:o,controls:a,contentVariants:s,closeClassName:l,bodyClassName:u,dynamicHeight:c=!0}=e,{ref:d,height:f}=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],[t,n]=(0,b.useState)(0),r=(0,b.useRef)(null);return(0,b.useLayoutEffect)(()=>{if(!r.current)return;let e=r.current,t=()=>n(e.clientHeight);t(),r.current.addEventListener("resize",t);let i=new ResizeObserver(t);return i.observe(e),()=>{e.removeEventListener("resize",t),i.unobserve(e)}},e),{ref:r,height:t}}([n,o]),[h,p]=(0,b.useState)(!1);return(0,b.useEffect)(()=>{p(f>.7*window.innerHeight)},[f]),(0,y.jsxs)(r?"form":"div",{onSubmit:r,ref:t,className:l7(s),children:[i&&(0,y.jsx)(lj.Dx,{className:ue({showSeparator:h}),children:i}),(0,y.jsx)(l4,{style:{height:c?"".concat(f,"px"):void 0,maxHeight:c?"70vh":void 0},children:(0,y.jsxs)("div",{ref:d,className:(0,eo.cx)("p-4",u),children:[o&&(0,y.jsx)(lj.dk,{className:ut(),children:o}),n]})}),a&&(0,y.jsx)(un,{separator:h,children:a}),(0,y.jsx)(l8,{className:l||"absolute top-3.5 right-2"})]})}),ue=(0,eo.j)(["pt-4 pb-2 px-4 w-full",tU({size:"20",weight:"semibold",font:"sans",color:"contrast"})],{variants:{showSeparator:{true:"border-b border-gray-200 dark:border-graydark-200"}}}),ut=(0,eo.j)([tU({color:"subtle",size:"14"}),"py-2"]);function un(e){let{children:t,separator:n=!0}=e;return(0,y.jsx)("div",{className:(0,eo.cx)("py-2 mx-3",n?"border-t border-gray-200 dark:border-graydark-200":""),children:t})}var ur=n(55070),ui=n(77334);let uo="rovingFocusGroup.onEntryFocus",ua={bubbles:!1,cancelable:!0},us="RovingFocusGroup",[ul,uu,uc]=S(us),[ud,uf]=(0,j.b)(us,[uc]),[uh,up]=ud(us),um=(0,b.forwardRef)((e,t)=>(0,b.createElement)(ul.Provider,{scope:e.__scopeRovingFocusGroup},(0,b.createElement)(ul.Slot,{scope:e.__scopeRovingFocusGroup},(0,b.createElement)(uv,(0,w.Z)({},e,{ref:t}))))),uv=(0,b.forwardRef)((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,...c}=e,d=(0,b.useRef)(null),f=(0,E.e)(t,d),h=lk(o),[p=null,m]=(0,C.T)({prop:a,defaultProp:s,onChange:l}),[v,g]=(0,b.useState)(!1),y=(0,lr.W)(u),x=uu(n),j=(0,b.useRef)(!1);return(0,b.useEffect)(()=>{let e=d.current;if(e)return e.addEventListener(uo,y),()=>e.removeEventListener(uo,y)},[y]),(0,b.createElement)(uh,{scope:n,orientation:r,dir:h,loop:i,currentTabStopId:p,onItemFocus:(0,b.useCallback)(e=>m(e),[m]),onItemShiftTab:(0,b.useCallback)(()=>g(!0),[])},(0,b.createElement)(O.WV.div,(0,w.Z)({tabIndex:v?-1:0,"data-orientation":r},c,{ref:f,style:{outline:"none",...e.style},onMouseDown:(0,_.M)(e.onMouseDown,()=>{j.current=!0}),onFocus:(0,_.M)(e.onFocus,e=>{let t=!j.current;if(e.target===e.currentTarget&&t&&!v){let t=new CustomEvent(uo,ua);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=x().filter(e=>e.focusable),t=e.find(e=>e.active),n=e.find(e=>e.id===p),r=[t,n,...e].filter(Boolean),i=r.map(e=>e.ref.current);ub(i)}}j.current=!1}),onBlur:(0,_.M)(e.onBlur,()=>g(!1))})))}),ug=(0,b.forwardRef)((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,...o}=e,a=(0,A.M)(),s=up("RovingFocusGroupItem",n),l=s.currentTabStopId===a,u=uu(n);return(0,b.createElement)(ul.ItemSlot,{scope:n,id:a,focusable:r,active:i},(0,b.createElement)(O.WV.span,(0,w.Z)({tabIndex:l?0:-1,"data-orientation":s.orientation},o,{ref:t,onMouseDown:(0,_.M)(e.onMouseDown,e=>{r?s.onItemFocus(a):e.preventDefault()}),onFocus:(0,_.M)(e.onFocus,()=>s.onItemFocus(a)),onKeyDown:(0,_.M)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey){s.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=function(e,t,n){var r;let i=(r=e.key,"rtl"!==n?r:"ArrowLeft"===r?"ArrowRight":"ArrowRight"===r?"ArrowLeft":r);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(i))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(i)))return uy[i]}(e,s.orientation,s.dir);if(void 0!==t){e.preventDefault();let i=u().filter(e=>e.focusable),o=i.map(e=>e.ref.current);if("last"===t)o.reverse();else if("prev"===t||"next"===t){var n,r;"prev"===t&&o.reverse();let i=o.indexOf(e.currentTarget);o=s.loop?(n=o,r=i+1,n.map((e,t)=>n[(r+t)%n.length])):o.slice(i+1)}setTimeout(()=>ub(o))}})})))}),uy={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function ub(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}var ux=n(49732),uw=n(70506);let uj=["Enter"," "],uE=["ArrowUp","PageDown","End"],uk=["ArrowDown","PageUp","Home",...uE],uS={ltr:[...uj,"ArrowRight"],rtl:[...uj,"ArrowLeft"]},u_={ltr:["ArrowLeft"],rtl:["ArrowRight"]},uC="Menu",[uO,uM,uT]=S(uC),[uA,uP]=(0,j.b)(uC,[uT,tr,uf]),uN=tr(),uR=uf(),[uD,uL]=uA(uC),[uF,uz]=uA(uC),uV=(0,b.forwardRef)((e,t)=>{let{__scopeMenu:n,...r}=e,i=uN(n);return(0,b.createElement)(ta,(0,w.Z)({},i,r,{ref:t}))}),uI="MenuPortal",[uZ,uB]=uA(uI,{forceMount:void 0}),uH="MenuContent",[uU,uW]=uA(uH),uq=(0,b.forwardRef)((e,t)=>{let n=uB(uH,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=uL(uH,e.__scopeMenu),a=uz(uH,e.__scopeMenu);return(0,b.createElement)(uO.Provider,{scope:e.__scopeMenu},(0,b.createElement)(T.z,{present:r||o.open},(0,b.createElement)(uO.Slot,{scope:e.__scopeMenu},a.modal?(0,b.createElement)(u$,(0,w.Z)({},i,{ref:t})):(0,b.createElement)(uK,(0,w.Z)({},i,{ref:t})))))}),u$=(0,b.forwardRef)((e,t)=>{let n=uL(uH,e.__scopeMenu),r=(0,b.useRef)(null),i=(0,E.e)(t,r);return(0,b.useEffect)(()=>{let e=r.current;if(e)return(0,ux.R)(e)},[]),(0,b.createElement)(uY,(0,w.Z)({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:(0,_.M)(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),uK=(0,b.forwardRef)((e,t)=>{let n=uL(uH,e.__scopeMenu);return(0,b.createElement)(uY,(0,w.Z)({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),uY=(0,b.forwardRef)((e,t)=>{let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:c,onInteractOutside:d,onDismiss:f,disableOutsideScroll:h,...p}=e,m=uL(uH,n),v=uz(uH,n),g=uN(n),y=uR(n),x=uM(n),[j,S]=(0,b.useState)(null),C=(0,b.useRef)(null),O=(0,E.e)(t,C,m.onContentChange),M=(0,b.useRef)(0),T=(0,b.useRef)(""),A=(0,b.useRef)(0),P=(0,b.useRef)(null),N=(0,b.useRef)("right"),R=(0,b.useRef)(0),D=h?uw.Z:b.Fragment,L=h?{as:k.g7,allowPinchZoom:!0}:void 0,F=e=>{var t,n;let r=T.current+e,i=x().filter(e=>!e.disabled),o=document.activeElement,a=null===(t=i.find(e=>e.ref.current===o))||void 0===t?void 0:t.textValue,s=i.map(e=>e.textValue),l=function(e,t,n){var r;let i=t.length>1&&Array.from(t).every(e=>e===t[0]),o=i?t[0]:t,a=n?e.indexOf(n):-1,s=(r=Math.max(a,0),e.map((t,n)=>e[(r+n)%e.length])),l=1===o.length;l&&(s=s.filter(e=>e!==n));let u=s.find(e=>e.toLowerCase().startsWith(o.toLowerCase()));return u!==n?u:void 0}(s,r,a),u=null===(n=i.find(e=>e.textValue===l))||void 0===n?void 0:n.ref.current;!function e(t){T.current=t,window.clearTimeout(M.current),""!==t&&(M.current=window.setTimeout(()=>e(""),1e3))}(r),u&&setTimeout(()=>u.focus())};(0,b.useEffect)(()=>()=>window.clearTimeout(M.current),[]),(0,ur.EW)();let z=(0,b.useCallback)(e=>{var t,n;let r=N.current===(null===(t=P.current)||void 0===t?void 0:t.side);return r&&function(e,t){if(!t)return!1;let n={x:e.clientX,y:e.clientY};return function(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,o=t.length-1;er!=u>r&&n<(l-a)*(r-s)/(u-s)+a;c&&(i=!i)}return i}(n,t)}(e,null===(n=P.current)||void 0===n?void 0:n.area)},[]);return(0,b.createElement)(uU,{scope:n,searchRef:T,onItemEnter:(0,b.useCallback)(e=>{z(e)&&e.preventDefault()},[z]),onItemLeave:(0,b.useCallback)(e=>{var t;z(e)||(null===(t=C.current)||void 0===t||t.focus(),S(null))},[z]),onTriggerLeave:(0,b.useCallback)(e=>{z(e)&&e.preventDefault()},[z]),pointerGraceTimerRef:A,onPointerGraceIntentChange:(0,b.useCallback)(e=>{P.current=e},[])},(0,b.createElement)(D,L,(0,b.createElement)(ui.M,{asChild:!0,trapped:i,onMountAutoFocus:(0,_.M)(o,e=>{var t;e.preventDefault(),null===(t=C.current)||void 0===t||t.focus()}),onUnmountAutoFocus:a},(0,b.createElement)(ea.XB,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:c,onInteractOutside:d,onDismiss:f},(0,b.createElement)(um,(0,w.Z)({asChild:!0},y,{dir:v.dir,orientation:"vertical",loop:r,currentTabStopId:j,onCurrentTabStopIdChange:S,onEntryFocus:e=>{v.isUsingKeyboardRef.current||e.preventDefault()}}),(0,b.createElement)(tf,(0,w.Z)({role:"menu","aria-orientation":"vertical","data-state":ce(m.open),dir:v.dir},g,p,{ref:O,style:{outline:"none",...p.style},onKeyDown:(0,_.M)(p.onKeyDown,e=>{let t=e.target,n=t.closest('[role="menu"]')===e.currentTarget,r=e.ctrlKey||e.altKey||e.metaKey,i=1===e.key.length;n&&("Tab"===e.key&&e.preventDefault(),!r&&i&&F(e.key));let o=C.current;if(e.target!==o||!uk.includes(e.key))return;e.preventDefault();let a=x().filter(e=>!e.disabled),s=a.map(e=>e.ref.current);uE.includes(e.key)&&s.reverse(),function(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}(s)}),onBlur:(0,_.M)(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(M.current),T.current="")}),onPointerMove:(0,_.M)(e.onPointerMove,cn(e=>{let t=e.target,n=R.current!==e.clientX;if(e.currentTarget.contains(t)&&n){let t=e.clientX>R.current?"right":"left";N.current=t,R.current=e.clientX}}))})))))))}),uG=(0,b.forwardRef)((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,b.createElement)(O.WV.div,(0,w.Z)({role:"group"},r,{ref:t}))}),uX=(0,b.forwardRef)((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,b.createElement)(O.WV.div,(0,w.Z)({},r,{ref:t}))}),uJ="MenuItem",uQ="menu.itemSelect",u0=(0,b.forwardRef)((e,t)=>{let{disabled:n=!1,onSelect:r,...i}=e,o=(0,b.useRef)(null),a=uz(uJ,e.__scopeMenu),s=uW(uJ,e.__scopeMenu),l=(0,E.e)(t,o),u=(0,b.useRef)(!1);return(0,b.createElement)(u1,(0,w.Z)({},i,{ref:l,disabled:n,onClick:(0,_.M)(e.onClick,()=>{let e=o.current;if(!n&&e){let t=new CustomEvent(uQ,{bubbles:!0,cancelable:!0});e.addEventListener(uQ,e=>null==r?void 0:r(e),{once:!0}),(0,O.jH)(e,t),t.defaultPrevented?u.current=!1:a.onClose()}}),onPointerDown:t=>{var n;null===(n=e.onPointerDown)||void 0===n||n.call(e,t),u.current=!0},onPointerUp:(0,_.M)(e.onPointerUp,e=>{var t;u.current||null===(t=e.currentTarget)||void 0===t||t.click()}),onKeyDown:(0,_.M)(e.onKeyDown,e=>{let t=""!==s.searchRef.current;!n&&(!t||" "!==e.key)&&uj.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})}))}),u1=(0,b.forwardRef)((e,t)=>{let{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=uW(uJ,n),s=uR(n),l=(0,b.useRef)(null),u=(0,E.e)(t,l),[c,d]=(0,b.useState)(!1),[f,h]=(0,b.useState)("");return(0,b.useEffect)(()=>{let e=l.current;if(e){var t;h((null!==(t=e.textContent)&&void 0!==t?t:"").trim())}},[o.children]),(0,b.createElement)(uO.ItemSlot,{scope:n,disabled:r,textValue:null!=i?i:f},(0,b.createElement)(ug,(0,w.Z)({asChild:!0},s,{focusable:!r}),(0,b.createElement)(O.WV.div,(0,w.Z)({role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},o,{ref:u,onPointerMove:(0,_.M)(e.onPointerMove,cn(e=>{if(r)a.onItemLeave(e);else if(a.onItemEnter(e),!e.defaultPrevented){let t=e.currentTarget;t.focus()}})),onPointerLeave:(0,_.M)(e.onPointerLeave,cn(e=>a.onItemLeave(e))),onFocus:(0,_.M)(e.onFocus,()=>d(!0)),onBlur:(0,_.M)(e.onBlur,()=>d(!1))}))))}),[u2,u4]=((e,t)=>{let{checked:n=!1,onCheckedChange:r,...i}=e;return(0,b.createElement)(u5,{scope:e.__scopeMenu,checked:n},(0,b.createElement)(u0,(0,w.Z)({role:"menuitemcheckbox","aria-checked":n},i,{ref:t,"data-state":ct(n),onSelect:(0,_.M)(i.onSelect,()=>null==r?void 0:r(!n),{checkForDefaultPrevented:!1})})))},uA("MenuRadioGroup",{value:void 0,onValueChange:()=>{}})),u3=((e,t)=>{let{value:n,onValueChange:r,...i}=e,o=(0,lr.W)(r);return(0,b.createElement)(u2,{scope:e.__scopeMenu,value:n,onValueChange:o},(0,b.createElement)(uG,(0,w.Z)({},i,{ref:t})))},"MenuItemIndicator"),[u5,u6]=uA(u3,{checked:!1}),[u8,u7]=((e,t)=>{let{__scopeMenu:n,forceMount:r,...i}=e,o=u6(u3,n);return(0,b.createElement)(T.z,{present:r||o.checked},(0,b.createElement)(O.WV.span,(0,w.Z)({},i,{ref:t,"data-state":ct(o.checked)})))},uA("MenuSub")),u9="MenuSubTrigger";function ce(e){return e?"open":"closed"}function ct(e){return e?"checked":"unchecked"}function cn(e){return t=>"mouse"===t.pointerType?e(t):void 0}(e,t)=>{let n=uL(u9,e.__scopeMenu),r=uz(u9,e.__scopeMenu),i=u7(u9,e.__scopeMenu),o=uW(u9,e.__scopeMenu),a=(0,b.useRef)(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:l}=o,u={__scopeMenu:e.__scopeMenu},c=(0,b.useCallback)(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return(0,b.useEffect)(()=>c,[c]),(0,b.useEffect)(()=>{let e=s.current;return()=>{window.clearTimeout(e),l(null)}},[s,l]),(0,b.createElement)(uV,(0,w.Z)({asChild:!0},u),(0,b.createElement)(u1,(0,w.Z)({id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":ce(n.open)},e,{ref:(0,E.F)(t,i.onTriggerChange),onClick:t=>{var r;null===(r=e.onClick)||void 0===r||r.call(e,t),e.disabled||t.defaultPrevented||(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:(0,_.M)(e.onPointerMove,cn(t=>{o.onItemEnter(t),t.defaultPrevented||e.disabled||n.open||a.current||(o.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),c()},100))})),onPointerLeave:(0,_.M)(e.onPointerLeave,cn(e=>{var t,r;c();let i=null===(t=n.content)||void 0===t?void 0:t.getBoundingClientRect();if(i){let t=null===(r=n.content)||void 0===r?void 0:r.dataset.side,a="right"===t,l=i[a?"left":"right"],u=i[a?"right":"left"];o.onPointerGraceIntentChange({area:[{x:e.clientX+(a?-5:5),y:e.clientY},{x:l,y:i.top},{x:u,y:i.top},{x:u,y:i.bottom},{x:l,y:i.bottom}],side:t}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(e),e.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:(0,_.M)(e.onKeyDown,t=>{let i=""!==o.searchRef.current;if(!e.disabled&&(!i||" "!==t.key)&&uS[r.dir].includes(t.key)){var a;n.onOpenChange(!0),null===(a=n.content)||void 0===a||a.focus(),t.preventDefault()}})})))},(e,t)=>{let n=uB(uH,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=uL(uH,e.__scopeMenu),a=uz(uH,e.__scopeMenu),s=u7("MenuSubContent",e.__scopeMenu),l=(0,b.useRef)(null),u=(0,E.e)(t,l);return(0,b.createElement)(uO.Provider,{scope:e.__scopeMenu},(0,b.createElement)(T.z,{present:r||o.open},(0,b.createElement)(uO.Slot,{scope:e.__scopeMenu},(0,b.createElement)(uY,(0,w.Z)({id:s.contentId,"aria-labelledby":s.triggerId},i,{ref:u,align:"start",side:"rtl"===a.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{var t;a.isUsingKeyboardRef.current&&(null===(t=l.current)||void 0===t||t.focus()),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:(0,_.M)(e.onFocusOutside,e=>{e.target!==s.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:(0,_.M)(e.onEscapeKeyDown,a.onClose),onKeyDown:(0,_.M)(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=u_[a.dir].includes(e.key);if(t&&n){var r;o.onOpenChange(!1),null===(r=s.trigger)||void 0===r||r.focus(),e.preventDefault()}})})))))};let cr=e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,s=uN(t),[l,u]=(0,b.useState)(null),c=(0,b.useRef)(!1),d=(0,lr.W)(o),f=lk(i);return(0,b.useEffect)(()=>{let e=()=>{c.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>c.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",t,{capture:!0}),document.removeEventListener("pointermove",t,{capture:!0})}},[]),(0,b.createElement)(tb,s,(0,b.createElement)(uD,{scope:t,open:n,onOpenChange:d,content:l,onContentChange:u},(0,b.createElement)(uF,{scope:t,onClose:(0,b.useCallback)(()=>d(!1),[d]),isUsingKeyboardRef:c,dir:f,modal:a},r)))},ci=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,o=uL(uI,t);return(0,b.createElement)(uZ,{scope:t,forceMount:n},(0,b.createElement)(T.z,{present:n||o.open},(0,b.createElement)(tx.h,{asChild:!0,container:i},r)))},co="DropdownMenu",[ca,cs]=(0,j.b)(co,[uP]),cl=uP(),[cu,cc]=ca(co),cd=(0,b.forwardRef)((e,t)=>{let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,o=cc("DropdownMenuTrigger",n),a=cl(n);return(0,b.createElement)(uV,(0,w.Z)({asChild:!0},a),(0,b.createElement)(O.WV.button,(0,w.Z)({type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":!!o.open||void 0,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,disabled:r},i,{ref:(0,E.F)(t,o.triggerRef),onPointerDown:(0,_.M)(e.onPointerDown,e=>{r||0!==e.button||!1!==e.ctrlKey||(o.onOpenToggle(),o.open||e.preventDefault())}),onKeyDown:(0,_.M)(e.onKeyDown,e=>{!r&&(["Enter"," "].includes(e.key)&&o.onOpenToggle(),"ArrowDown"===e.key&&o.onOpenChange(!0),[" ","ArrowDown"].includes(e.key)&&e.preventDefault())})})))}),cf=(0,b.forwardRef)((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=cc("DropdownMenuContent",n),o=cl(n),a=(0,b.useRef)(!1);return(0,b.createElement)(uq,(0,w.Z)({id:i.contentId,"aria-labelledby":i.triggerId},o,r,{ref:t,onCloseAutoFocus:(0,_.M)(e.onCloseAutoFocus,e=>{var t;a.current||null===(t=i.triggerRef.current)||void 0===t||t.focus(),a.current=!1,e.preventDefault()}),onInteractOutside:(0,_.M)(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;(!i.modal||r)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)"}}))}),ch=(0,b.forwardRef)((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=cl(n);return(0,b.createElement)(uX,(0,w.Z)({},i,r,{ref:t}))}),cp=(0,b.forwardRef)((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=cl(n);return(0,b.createElement)(u0,(0,w.Z)({},i,r,{ref:t}))}),cm=e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:o,onOpenChange:a,modal:s=!0}=e,l=cl(t),u=(0,b.useRef)(null),[c=!1,d]=(0,C.T)({prop:i,defaultProp:o,onChange:a});return(0,b.createElement)(cu,{scope:t,triggerId:(0,A.M)(),triggerRef:u,contentId:(0,A.M)(),open:c,onOpenChange:d,onOpenToggle:(0,b.useCallback)(()=>d(e=>!e),[d]),modal:s},(0,b.createElement)(cr,(0,w.Z)({},l,{open:c,onOpenChange:d,dir:r,modal:s}),n))},cv=e=>{let{__scopeDropdownMenu:t,...n}=e,r=cl(t);return(0,b.createElement)(ci,(0,w.Z)({},r,n))},cg="horizontal",cy=["horizontal","vertical"],cb=(0,b.forwardRef)((e,t)=>{let{decorative:n,orientation:r=cg,...i}=e,o=cx(r)?r:cg;return(0,b.createElement)(O.WV.div,(0,w.Z)({"data-orientation":o},n?{role:"none"}:{"aria-orientation":"vertical"===o?o:void 0,role:"separator"},i,{ref:t}))});function cx(e){return cy.includes(e)}cb.propTypes={orientation(e,t,n){let r=e[t],i=String(r);return r&&!cx(r)?Error(`Invalid prop \`orientation\` of value \`${i}\` supplied to \`${n}\`, expected one of: + `),()=>{document.head.removeChild(l)}},[t]),b.createElement(ny,{isPresent:t,childRef:r,sizeRef:i},b.cloneElement(e,{ref:r}))}let nx=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a})=>{let s=ng(nw),l=(0,b.useId)(),u=(0,b.useMemo)(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:e=>{for(let t of(s.set(e,!0),s.values()))if(!t)return;r&&r()},register:e=>(s.set(e,!1),()=>s.delete(e))}),o?void 0:[n]);return(0,b.useMemo)(()=>{s.forEach((e,t)=>s.set(t,!1))},[n]),b.useEffect(()=>{n||s.size||!r||r()},[n]),"popLayout"===a&&(e=b.createElement(nb,{isPresent:n},e)),b.createElement(nv.Provider,{value:u},e)};function nw(){return new Map}let nj=(0,b.createContext)({});function nE(e){return(0,b.useEffect)(()=>()=>e(),[])}let nk=new Set;function nS(e,t,n){e||nk.has(t)||(console.warn(t),n&&console.warn(n),nk.add(t))}let n_=e=>e.key||"",nC=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{i&&(a="wait",nS(!1,"Replace exitBeforeEnter with mode='wait'"));let[s]=function(){let e=nm(),[t,n]=(0,b.useState)(0),r=(0,b.useCallback)(()=>{e.current&&n(t+1)},[t]),i=(0,b.useCallback)(()=>na.postRender(r),[r]);return[i,t]}(),l=(0,b.useContext)(nj).forceRender;l&&(s=l);let u=nm(),c=function(e){let t=[];return b.Children.forEach(e,e=>{(0,b.isValidElement)(e)&&t.push(e)}),t}(e),d=c,f=new Set,h=(0,b.useRef)(d),p=(0,b.useRef)(new Map).current,m=(0,b.useRef)(!0);if(np(()=>{m.current=!1,function(e,t){e.forEach(e=>{let n=n_(e);t.set(n,e)})}(c,p),h.current=d}),nE(()=>{m.current=!0,p.clear(),f.clear()}),m.current)return b.createElement(b.Fragment,null,d.map(e=>b.createElement(nx,{key:n_(e),isPresent:!0,initial:!!n&&void 0,presenceAffectsLayout:o,mode:a},e)));d=[...d];let v=h.current.map(n_),g=c.map(n_),y=v.length;for(let e=0;e{if(-1!==g.indexOf(e))return;let n=p.get(e);if(!n)return;let i=v.indexOf(e);d.splice(i,0,b.createElement(nx,{key:n_(n),isPresent:!1,onExitComplete:()=>{p.delete(e),f.delete(e);let t=h.current.findIndex(t=>t.key===e);if(h.current.splice(t,1),!f.size){if(h.current=c,!1===u.current)return;s(),r&&r()}},custom:t,presenceAffectsLayout:o,mode:a},n))}),d=d.map(e=>{let t=e.key;return f.has(t)?e:b.createElement(nx,{key:n_(e),isPresent:!0,presenceAffectsLayout:o,mode:a},e)}),"production"!==t6&&"wait"===a&&d.length>1&&console.warn('You\'re attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.'),b.createElement(b.Fragment,null,f.size?d:d.map(e=>(0,b.cloneElement)(e)))},nO=(0,b.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),nM=(0,b.createContext)({}),nT=(0,b.createContext)({strict:!1});function nA(e){return"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function nP(e){return"string"==typeof e||Array.isArray(e)}function nN(e){return"object"==typeof e&&"function"==typeof e.start}let nR=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function nD(e){return nN(e.animate)||nR.some(t=>nP(e[t]))}function nL(e){return!!(nD(e)||e.variants)}function nF(e){return Array.isArray(e)?e.join(" "):e}let nz=e=>({isEnabled:t=>e.some(e=>!!t[e])}),nV={measureLayout:nz(["layout","layoutId","drag"]),animation:nz(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:nz(["exit"]),drag:nz(["drag","dragControls"]),focus:nz(["whileFocus"]),hover:nz(["whileHover","onHoverStart","onHoverEnd"]),tap:nz(["whileTap","onTap","onTapStart","onTapCancel"]),pan:nz(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:nz(["whileInView","onViewportEnter","onViewportLeave"])},nI={hasAnimatedSinceResize:!0,hasEverUpdated:!1},nZ=1;class nB extends b.Component{getSnapshotBeforeUpdate(){let{visualElement:e,props:t}=this.props;return e&&e.setProps(t),null}componentDidUpdate(){}render(){return this.props.children}}let nH=(0,b.createContext)({}),nU=Symbol.for("motionComponentSymbol"),nW=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function nq(e){if("string"!=typeof e||e.includes("-"));else if(nW.indexOf(e)>-1||/[A-Z]/.test(e))return!0;return!1}let n$={},nK=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],nY=new Set(nK);function nG(e,{layout:t,layoutId:n}){return nY.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!n$[e]||"opacity"===e)}let nX=e=>!!(null==e?void 0:e.getVelocity),nJ={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},nQ=(e,t)=>nK.indexOf(e)-nK.indexOf(t);function n0(e){return e.startsWith("--")}let n1=(e,t)=>t&&"number"==typeof e?t.transform(e):e,n2=(e,t)=>n=>Math.max(Math.min(n,t),e),n4=e=>e%1?Number(e.toFixed(5)):e,n3=/(-)?([\d]*\.?[\d])+/g,n5=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,n6=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function n8(e){return"string"==typeof e}let n7=e=>({test:t=>n8(t)&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),n9=n7("deg"),re=n7("%"),rt=n7("px"),rn=n7("vh"),rr=n7("vw"),ri=Object.assign(Object.assign({},re),{parse:e=>re.parse(e)/100,transform:e=>re.transform(100*e)}),ro={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},ra=Object.assign(Object.assign({},ro),{transform:n2(0,1)}),rs=Object.assign(Object.assign({},ro),{default:1}),rl={...ro,transform:Math.round},ru={borderWidth:rt,borderTopWidth:rt,borderRightWidth:rt,borderBottomWidth:rt,borderLeftWidth:rt,borderRadius:rt,radius:rt,borderTopLeftRadius:rt,borderTopRightRadius:rt,borderBottomRightRadius:rt,borderBottomLeftRadius:rt,width:rt,maxWidth:rt,height:rt,maxHeight:rt,size:rt,top:rt,right:rt,bottom:rt,left:rt,padding:rt,paddingTop:rt,paddingRight:rt,paddingBottom:rt,paddingLeft:rt,margin:rt,marginTop:rt,marginRight:rt,marginBottom:rt,marginLeft:rt,rotate:n9,rotateX:n9,rotateY:n9,rotateZ:n9,scale:rs,scaleX:rs,scaleY:rs,scaleZ:rs,skew:n9,skewX:n9,skewY:n9,distance:rt,translateX:rt,translateY:rt,translateZ:rt,x:rt,y:rt,z:rt,perspective:rt,transformPerspective:rt,opacity:ra,originX:ri,originY:ri,originZ:rt,zIndex:rl,fillOpacity:ra,strokeOpacity:ra,numOctaves:rl};function rc(e,t,n,r){let{style:i,vars:o,transform:a,transformKeys:s,transformOrigin:l}=e;s.length=0;let u=!1,c=!1,d=!0;for(let e in t){let n=t[e];if(n0(e)){o[e]=n;continue}let r=ru[e],f=n1(n,r);if(nY.has(e)){if(u=!0,a[e]=f,s.push(e),!d)continue;n!==(r.default||0)&&(d=!1)}else e.startsWith("origin")?(c=!0,l[e]=f):i[e]=f}if(!t.transform&&(u||r?i.transform=function({transform:e,transformKeys:t},{enableHardwareAcceleration:n=!0,allowTransformNone:r=!0},i,o){let a="";for(let n of(t.sort(nQ),t))a+=`${nJ[n]||n}(${e[n]}) `;return n&&!e.z&&(a+="translateZ(0)"),a=a.trim(),o?a=o(e,i?"":a):r&&i&&(a="none"),a}(e,n,d,r):i.transform&&(i.transform="none")),c){let{originX:e="50%",originY:t="50%",originZ:n=0}=l;i.transformOrigin=`${e} ${t} ${n}`}}let rd=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function rf(e,t,n){for(let r in t)nX(t[r])||nG(r,n)||(e[r]=t[r])}function rh(e,t,n){let r={},i=function(e,t,n){let r=e.style||{},i={};return rf(i,r,e),Object.assign(i,function({transformTemplate:e},t,n){return(0,b.useMemo)(()=>{let r=rd();return rc(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}(e,t,n)),e.transformValues?e.transformValues(i):i}(e,t,n);return e.drag&&!1!==e.dragListener&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===e.drag?"none":`pan-${"x"===e.drag?"y":"x"}`),r.style=i,r}let rp=new Set(["initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onHoverStart","onHoverEnd","layoutScroll","whileInView","onViewportEnter","onViewportLeave","viewport","whileTap","onTap","onTapStart","onTapCancel","animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView","onPan","onPanStart","onPanSessionStart","onPanEnd"]);function rm(e){return rp.has(e)}let rv=e=>!rm(e);try{(Em=require("@emotion/is-prop-valid").default)&&(rv=e=>e.startsWith("on")?!rm(e):Em(e))}catch(e){}function rg(e,t,n){return"string"==typeof e?e:rt.transform(t+n*e)}let ry={offset:"stroke-dashoffset",array:"stroke-dasharray"},rb={offset:"strokeDashoffset",array:"strokeDasharray"};function rx(e,{attrX:t,attrY:n,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:s=0,...l},u,c){rc(e,l,u,c),e.attrs=e.style,e.style={};let{attrs:d,style:f,dimensions:h}=e;d.transform&&(h&&(f.transform=d.transform),delete d.transform),h&&(void 0!==r||void 0!==i||f.transform)&&(f.transformOrigin=function(e,t,n){let r=rg(t,e.x,e.width),i=rg(n,e.y,e.height);return`${r} ${i}`}(h,void 0!==r?r:.5,void 0!==i?i:.5)),void 0!==t&&(d.x=t),void 0!==n&&(d.y=n),void 0!==o&&function(e,t,n=1,r=0,i=!0){e.pathLength=1;let o=i?ry:rb;e[o.offset]=rt.transform(-r);let a=rt.transform(t),s=rt.transform(n);e[o.array]=`${a} ${s}`}(d,o,a,s,!1)}let rw=()=>({...rd(),attrs:{}});function rj(e,t){let n=(0,b.useMemo)(()=>{let n=rw();return rx(n,t,{enableHardwareAcceleration:!1},e.transformTemplate),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};rf(t,e.style,e),n.style={...t,...n.style}}return n}let rE=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function rk(e,{style:t,vars:n},r,i){for(let o in Object.assign(e.style,t,i&&i.getProjectionStyles(r)),n)e.style.setProperty(o,n[o])}let rS=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function r_(e,t,n,r){for(let n in rk(e,t,void 0,r),t.attrs)e.setAttribute(rS.has(n)?n:rE(n),t.attrs[n])}function rC(e){let{style:t}=e,n={};for(let r in t)(nX(t[r])||nG(r,e))&&(n[r]=t[r]);return n}function rO(e){let t=rC(e);for(let n in e)if(nX(e[n])){let r="x"===n||"y"===n?"attr"+n.toUpperCase():n;t[r]=e[n]}return t}function rM(e,t,n,r={},i={}){return"function"==typeof t&&(t=t(void 0!==n?n:e.custom,r,i)),"string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t&&(t=t(void 0!==n?n:e.custom,r,i)),t}let rT=e=>Array.isArray(e),rA=e=>!!(e&&"object"==typeof e&&e.mix&&e.toValue),rP=e=>rT(e)?e[e.length-1]||0:e;function rN(e){let t=nX(e)?e.get():e;return rA(t)?t.toValue():t}let rR=e=>(t,n)=>{let r=(0,b.useContext)(nM),i=(0,b.useContext)(nv),o=()=>(function({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){let a={latestValues:function(e,t,n,r){let i={},o=r(e);for(let e in o)i[e]=rN(o[e]);let{initial:a,animate:s}=e,l=nD(e),u=nL(e);t&&u&&!l&&!1!==e.inherit&&(void 0===a&&(a=t.initial),void 0===s&&(s=t.animate));let c=!!n&&!1===n.initial;c=c||!1===a;let d=c?s:a;if(d&&"boolean"!=typeof d&&!nN(d)){let t=Array.isArray(d)?d:[d];t.forEach(t=>{let n=rM(e,t);if(!n)return;let{transitionEnd:r,transition:o,...a}=n;for(let e in a){let t=a[e];if(Array.isArray(t)){let e=c?t.length-1:0;t=t[e]}null!==t&&(i[e]=t)}for(let e in r)i[e]=r[e]})}return i}(r,i,o,e),renderState:t()};return n&&(a.mount=e=>n(r,e,a)),a})(e,t,r,i);return n?o():ng(o)},rD={useVisualState:rR({scrapeMotionValuesFromProps:rO,createRenderState:rw,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(e){n.dimensions={x:0,y:0,width:0,height:0}}rx(n,r,{enableHardwareAcceleration:!1},e.transformTemplate),r_(t,n)}})},rL={useVisualState:rR({scrapeMotionValuesFromProps:rC,createRenderState:rd})};function rF(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function rz(e,t,n,r){(0,b.useEffect)(()=>{let i=e.current;if(n&&i)return rF(i,t,n,r)},[e,t,n,r])}function rV(e){return"undefined"!=typeof PointerEvent&&e instanceof PointerEvent?!("mouse"!==e.pointerType):e instanceof MouseEvent}function rI(e){let t=!!e.touches;return t}(Ev=Ew||(Ew={})).Animate="animate",Ev.Hover="whileHover",Ev.Tap="whileTap",Ev.Drag="whileDrag",Ev.Focus="whileFocus",Ev.InView="whileInView",Ev.Exit="exit";let rZ={pageX:0,pageY:0};function rB(e,t="page"){return{point:rI(e)?function(e,t="page"){let n=e.touches[0]||e.changedTouches[0],r=n||rZ;return{x:r[t+"X"],y:r[t+"Y"]}}(e,t):function(e,t="page"){return{x:e[t+"X"],y:e[t+"Y"]}}(e,t)}}let rH=(e,t=!1)=>{let n=t=>e(t,rB(t));return t?e=>{let t=e instanceof MouseEvent,r=!t||t&&0===e.button;r&&n(e)}:n},rU=()=>nh&&null===window.onpointerdown,rW=()=>nh&&null===window.ontouchstart,rq=()=>nh&&null===window.onmousedown,r$={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},rK={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function rY(e){if(rU());else if(rW())return rK[e];else if(rq())return r$[e];return e}function rG(e,t,n,r){return rF(e,rY(t),rH(n,"pointerdown"===t),r)}function rX(e,t,n,r){return rz(e,rY(t),n&&rH(n,"pointerdown"===t),r)}function rJ(e){let t=null;return()=>null===t&&(t=e,()=>{t=null})}let rQ=rJ("dragHorizontal"),r0=rJ("dragVertical");function r1(e){let t=!1;if("y"===e)t=r0();else if("x"===e)t=rQ();else{let e=rQ(),n=r0();e&&n?t=()=>{e(),n()}:(e&&e(),n&&n())}return t}function r2(){let e=r1(!0);return!e||(e(),!1)}function r4(e,t,n){return(r,i)=>{!(!rV(r)||r2())&&(e.animationState&&e.animationState.setActive(Ew.Hover,t),n&&n(r,i))}}let r3=(e,t)=>!!t&&(e===t||r3(e,t.parentElement)),r5=(e,t)=>n=>t(e(n)),r6=(...e)=>e.reduce(r5),r8=new WeakMap,r7=new WeakMap,r9=e=>{let t=r8.get(e.target);t&&t(e)},ie=e=>{e.forEach(r9)},it={some:0,all:1};function ir(e,t,n,{root:r,margin:i,amount:o="some",once:a}){(0,b.useEffect)(()=>{if(!e||!n.current)return;let s={root:null==r?void 0:r.current,rootMargin:i,threshold:"number"==typeof o?o:it[o]};return function(e,t,n){let r=function({root:e,...t}){let n=e||document;r7.has(n)||r7.set(n,{});let r=r7.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(ie,{root:e,...t})),r[i]}(t);return r8.set(e,n),r.observe(e),()=>{r8.delete(e),r.unobserve(e)}}(n.current,s,e=>{let{isIntersecting:r}=e;if(t.isInView===r||(t.isInView=r,a&&!r&&t.hasEnteredView))return;r&&(t.hasEnteredView=!0),n.animationState&&n.animationState.setActive(Ew.InView,r);let i=n.getProps(),o=r?i.onViewportEnter:i.onViewportLeave;o&&o(e)})},[e,r,i,o])}function ii(e,t,n,{fallback:r=!0}){(0,b.useEffect)(()=>{e&&r&&("production"!==t6&&nS(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(()=>{t.hasEnteredView=!0;let{onViewportEnter:e}=n.getProps();e&&e(null),n.animationState&&n.animationState.setActive(Ew.InView,!0)}))},[e])}let io=e=>t=>(e(t),null),ia={inView:io(function({visualElement:e,whileInView:t,onViewportEnter:n,onViewportLeave:r,viewport:i={}}){let o=(0,b.useRef)({hasEnteredView:!1,isInView:!1}),a=!!(t||n||r);i.once&&o.current.hasEnteredView&&(a=!1);let s="undefined"==typeof IntersectionObserver?ii:ir;s(a,o.current,e,i)}),tap:io(function({onTap:e,onTapStart:t,onTapCancel:n,whileTap:r,visualElement:i}){let o=e||t||n||r,a=(0,b.useRef)(!1),s=(0,b.useRef)(null),l={passive:!(t||e||n||h)};function u(){s.current&&s.current(),s.current=null}function c(){return u(),a.current=!1,i.animationState&&i.animationState.setActive(Ew.Tap,!1),!r2()}function d(t,r){c()&&(r3(i.current,t.target)?e&&e(t,r):n&&n(t,r))}function f(e,t){c()&&n&&n(e,t)}function h(e,n){u(),!a.current&&(a.current=!0,s.current=r6(rG(window,"pointerup",d,l),rG(window,"pointercancel",f,l)),i.animationState&&i.animationState.setActive(Ew.Tap,!0),t&&t(e,n))}rX(i,"pointerdown",o?h:void 0,l),nE(u)}),focus:io(function({whileFocus:e,visualElement:t}){let{animationState:n}=t;rz(t,"focus",e?()=>{n&&n.setActive(Ew.Focus,!0)}:void 0),rz(t,"blur",e?()=>{n&&n.setActive(Ew.Focus,!1)}:void 0)}),hover:io(function({onHoverStart:e,onHoverEnd:t,whileHover:n,visualElement:r}){rX(r,"pointerenter",e||n?r4(r,!0,e):void 0,{passive:!e}),rX(r,"pointerleave",t||n?r4(r,!1,t):void 0,{passive:!t})})};function is(){let e=(0,b.useContext)(nv);if(null===e)return[!0,null];let{isPresent:t,onExitComplete:n,register:r}=e,i=(0,b.useId)();return(0,b.useEffect)(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}function il(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;rt.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);it.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}var ic=function(){},id=function(){};let ih=(e,t,n)=>Math.min(Math.max(n,e),t);function ip(e,t){return e*Math.sqrt(1-t*t)}let im=["duration","bounce"],iv=["stiffness","damping","mass"];function ig(e,t){return t.some(t=>void 0!==e[t])}function iy(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,o=iu(e,["from","to","restSpeed","restDelta"]);let a={done:!1,value:t},{stiffness:s,damping:l,mass:u,velocity:c,duration:d,isResolvedFromDuration:f}=function(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!ig(e,iv)&&ig(e,im)){let n=function({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;ic(e<=1e4,"Spring duration must be 10 seconds or less");let a=1-t;a=ih(.05,1,a),e=ih(.01,10,e/1e3),a<1?(i=t=>{let r=t*a,i=r*e,o=ip(t,a),s=Math.exp(-i);return .001-(r-n)/o*s},o=t=>{let r=t*a,o=r*e,s=Math.pow(a,2)*Math.pow(t,2)*e,l=Math.exp(-o),u=ip(Math.pow(t,2),a),c=-i(t)+.001>0?-1:1;return c*((o*n+n-s)*l)/u}):(i=t=>{let r=Math.exp(-t*e),i=(t-n)*e+1;return -.001+r*i},o=t=>{let r=Math.exp(-t*e),i=(n-t)*(e*e);return r*i});let s=5/e,l=function(e,t,n){let r=n;for(let n=1;n<12;n++)r-=e(r)/t(r);return r}(i,o,s);if(e*=1e3,isNaN(l))return{stiffness:100,damping:10,duration:e};{let t=Math.pow(l,2)*r;return{stiffness:t,damping:2*a*Math.sqrt(r*t),duration:e}}}(e);(t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1})).isResolvedFromDuration=!0}return t}(o),h=ib,p=ib;function m(){let e=c?-(c/1e3):0,r=n-t,o=l/(2*Math.sqrt(s*u)),a=Math.sqrt(s/u)/1e3;if(void 0===i&&(i=Math.min(Math.abs(n-t)/100,.4)),o<1){let t=ip(a,o);h=i=>{let s=Math.exp(-o*a*i);return n-s*((e+o*a*r)/t*Math.sin(t*i)+r*Math.cos(t*i))},p=n=>{let i=Math.exp(-o*a*n);return o*a*i*(Math.sin(t*n)*(e+o*a*r)/t+r*Math.cos(t*n))-i*(Math.cos(t*n)*(e+o*a*r)-t*r*Math.sin(t*n))}}else if(1===o)h=t=>n-Math.exp(-a*t)*(r+(e+a*r)*t);else{let t=a*Math.sqrt(o*o-1);h=i=>{let s=Math.exp(-o*a*i),l=Math.min(t*i,300);return n-s*((e+o*a*r)*Math.sinh(l)+t*r*Math.cosh(l))/t}}}return m(),{next:e=>{let t=h(e);if(f)a.done=e>=d;else{let o=1e3*p(e),s=Math.abs(o)<=r,l=Math.abs(n-t)<=i;a.done=s&&l}return a.value=a.done?n:t,a},flipTarget:()=>{c=-c,[t,n]=[n,t],m()}}}iy.needsInterpolation=(e,t)=>"string"==typeof e||"string"==typeof t;let ib=e=>0,ix=(e,t,n)=>{let r=t-e;return 0===r?1:(n-e)/r},iw=(e,t,n)=>-n*e+n*t+e,ij=(e,t)=>n=>!!(n8(n)&&n6.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),iE=(e,t,n)=>r=>{if(!n8(r))return r;let[i,o,a,s]=r.match(n3);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:void 0!==s?parseFloat(s):1}},ik=n2(0,255),iS=Object.assign(Object.assign({},ro),{transform:e=>Math.round(ik(e))}),i_={test:ij("rgb","red"),parse:iE("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+iS.transform(e)+", "+iS.transform(t)+", "+iS.transform(n)+", "+n4(ra.transform(r))+")"},iC={test:ij("#"),parse:function(e){let t="",n="",r="",i="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),i=e.substr(4,1),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}},transform:i_.transform},iO={test:ij("hsl","hue"),parse:iE("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+re.transform(n4(t))+", "+re.transform(n4(n))+", "+n4(ra.transform(r))+")"};function iM(e,t,n){return(n<0&&(n+=1),n>1&&(n-=1),n<1/6)?e+(t-e)*6*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function iT({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let i=0,o=0,a=0;if(t/=100){let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=iM(s,r,e+1/3),o=iM(s,r,e),a=iM(s,r,e-1/3)}else i=o=a=n;return{red:Math.round(255*i),green:Math.round(255*o),blue:Math.round(255*a),alpha:r}}let iA=(e,t,n)=>{let r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},iP=[iC,i_,iO],iN=e=>iP.find(t=>t.test(e)),iR=e=>`'${e}' is not an animatable color. Use the equivalent color code instead.`,iD=(e,t)=>{let n=iN(e),r=iN(t);id(!!n,iR(e)),id(!!r,iR(t));let i=n.parse(e),o=r.parse(t);n===iO&&(i=iT(i),n=i_),r===iO&&(o=iT(o),r=i_);let a=Object.assign({},i);return e=>{for(let t in a)"alpha"!==t&&(a[t]=iA(i[t],o[t],e));return a.alpha=iw(i.alpha,o.alpha,e),n.transform(a)}},iL={test:e=>i_.test(e)||iC.test(e)||iO.test(e),parse:e=>i_.test(e)?i_.parse(e):iO.test(e)?iO.parse(e):iC.parse(e),transform:e=>n8(e)?e:e.hasOwnProperty("red")?i_.transform(e):iO.transform(e)},iF="${c}",iz="${n}";function iV(e){"number"==typeof e&&(e=`${e}`);let t=[],n=0,r=e.match(n5);r&&(n=r.length,e=e.replace(n5,iF),t.push(...r.map(iL.parse)));let i=e.match(n3);return i&&(e=e.replace(n3,iz),t.push(...i.map(ro.parse))),{values:t,numColors:n,tokenised:e}}function iI(e){return iV(e).values}function iZ(e){let{values:t,numColors:n,tokenised:r}=iV(e),i=t.length;return e=>{let t=r;for(let r=0;r"number"==typeof e?0:e,iH={test:function(e){var t,n,r,i;return isNaN(e)&&n8(e)&&(null!==(n=null===(t=e.match(n3))||void 0===t?void 0:t.length)&&void 0!==n?n:0)+(null!==(i=null===(r=e.match(n5))||void 0===r?void 0:r.length)&&void 0!==i?i:0)>0},parse:iI,createTransformer:iZ,getAnimatableNone:function(e){let t=iI(e),n=iZ(e);return n(t.map(iB))}},iU=e=>"number"==typeof e;function iW(e,t){return iU(e)?n=>iw(e,t,n):iL.test(e)?iD(e,t):iY(e,t)}let iq=(e,t)=>{let n=[...e],r=n.length,i=e.map((e,n)=>iW(e,t[n]));return e=>{for(let t=0;t{let n=Object.assign(Object.assign({},e),t),r={};for(let i in n)void 0!==e[i]&&void 0!==t[i]&&(r[i]=iW(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}};function iK(e){let t=iH.parse(e),n=t.length,r=0,i=0,o=0;for(let e=0;e{let n=iH.createTransformer(t),r=iK(e),i=iK(t),o=r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers;return o?r6(iq(r.parsed,i.parsed),n):(ic(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),n=>`${n>0?t:e}`)},iG=(e,t)=>n=>iw(e,t,n);function iX(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let o=e.length;id(o===t.length,"Both input and output ranges must be the same length"),id(!r||!Array.isArray(r)||r.length===o-1,"Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values."),e[0]>e[o-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());let a=function(e,t,n){var r;let i=[],o=n||("number"==typeof(r=e[0])?iG:"string"==typeof r?iL.test(r)?iD:iY:Array.isArray(r)?iq:"object"==typeof r?i$:void 0),a=e.length-1;for(let n=0;nn(ix(e,t,r))}(e,a):function(e,t){let n=e.length,r=n-1;return i=>{let o=0,a=!1;if(i<=e[0]?a=!0:i>=e[r]&&(o=r-1,a=!0),!a){let t=1;for(;ti)&&t!==r;t++);o=t-1}let s=ix(e[o],e[o+1],i);return t[o](s)}}(e,a);return n?t=>s(ih(e[0],e[o-1],t)):s}let iJ=e=>t=>1-e(1-t),iQ=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,i0=e=>t=>t*t*((e+1)*t-e),i1=4/11,i2=8/11,i4=e=>e,i3=e=>Math.pow(e,2),i5=iJ(i3),i6=iQ(i3),i8=e=>1-Math.sin(Math.acos(e)),i7=iJ(i8),i9=iQ(i7),oe=i0(1.525),ot=iJ(oe),on=iQ(oe),or=(e=>{let t=i0(1.525);return e=>(e*=2)<1?.5*t(e):.5*(2-Math.pow(2,-10*(e-1)))})(0),oi=4356/361,oo=35442/1805,oa=16061/1805,os=e=>{if(1===e||0===e)return e;let t=e*e;return e0!==n?n/(t-1):0)}(a)).map(e=>e*i);function l(){return iX(s,a,{ease:Array.isArray(n)?n:a.map(()=>n||i6).splice(0,a.length-1)})}let u=l();return{next:e=>(o.value=u(e),o.done=e>=i,o),flipTarget:()=>{a.reverse(),u=l()}}}let oc={keyframes:ou,spring:iy,decay:function({velocity:e=0,from:t=0,power:n=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:o}){let a={done:!1,value:t},s=n*e,l=t+s,u=void 0===o?l:o(l);return u!==l&&(s=u-t),{next:e=>{let t=-s*Math.exp(-e/r);return a.done=!(t>i||t<-i),a.value=a.done?u:u+t,a},flipTarget:()=>{}}}};function od(e,t,n=0){return e-t-n}let of=e=>{let t=({delta:t})=>e(t);return{start:()=>na.update(t,!0),stop:()=>ns.update(t)}};function oh(e){let t,n,r;var i,{from:o,autoplay:a=!0,driver:s=of,elapsed:l=0,repeat:u=0,repeatType:c="loop",repeatDelay:d=0,onPlay:f,onStop:h,onComplete:p,onRepeat:m,onUpdate:v}=e,g=iu(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:y}=g,b=0,x=g.duration,w=!1,j=!0,E=function(e){if(Array.isArray(e.to))return ou;if(oc[e.type])return oc[e.type];let t=new Set(Object.keys(e));if(t.has("ease")||t.has("duration")&&!t.has("dampingRatio"));else if(t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta"))return iy;return ou}(g);(null===(i=E.needsInterpolation)||void 0===i?void 0:i.call(E,o,y))&&(r=iX([0,100],[o,y],{clamp:!1}),o=0,y=100);let k=E(Object.assign(Object.assign({},g),{from:o,to:y}));return a&&(null==f||f(),(t=s(function(e){if(j||(e=-e),l+=e,!w){let e=k.next(Math.max(0,l));n=e.value,r&&(n=r(n)),w=j?e.done:l<=0}if(null==v||v(n),w){if(0===b&&(null!=x||(x=l)),b=o+d:i<=-d)&&(b++,"reverse"===c?l=function(e,t,n=0,r=!0){return r?od(t+-e,t,n):t-(e-t)+n}(l,x,d,j=b%2==0):(l=od(l,x,d),"mirror"===c&&k.flipTarget()),w=!1,m&&m())}else t.stop(),p&&p()}})).start()),{stop:()=>{null==h||h(),t.stop()}}}let op=e=>1e3*e,om=(e,t)=>1-3*t+3*e,ov=(e,t)=>3*t-6*e,og=e=>3*e,oy=(e,t,n)=>((om(t,n)*e+ov(t,n))*e+og(t))*e,ob=(e,t,n)=>3*om(t,n)*e*e+2*ov(t,n)*e+og(t),ox={linear:i4,easeIn:i3,easeInOut:i6,easeOut:i5,circIn:i8,circInOut:i9,circOut:i7,backIn:oe,backInOut:on,backOut:ot,anticipate:or,bounceIn:ol,bounceInOut:e=>e<.5?.5*(1-os(1-2*e)):.5*os(2*e-1)+.5,bounceOut:os},ow=e=>{if(Array.isArray(e)){id(4===e.length,"Cubic bezier arrays must contain four numerical values.");let[t,n,r,i]=e;return function(e,t,n,r){if(e===t&&n===r)return i4;let i=new Float32Array(11);for(let t=0;t<11;++t)i[t]=oy(.1*t,e,n);return o=>0===o||1===o?o:oy(function(t){let r=0,o=1;for(;10!==o&&i[o]<=t;++o)r+=.1;--o;let a=(t-i[o])/(i[o+1]-i[o]),s=r+.1*a,l=ob(s,e,n);return l>=.001?function(e,t,n,r){for(let i=0;i<8;++i){let i=ob(t,n,r);if(0===i)break;let o=oy(t,n,r)-e;t-=o/i}return t}(t,s,e,n):0===l?s:function(e,t,n,r,i){let o,a;let s=0;do(o=oy(a=t+(n-t)/2,r,i)-e)>0?n=a:t=a;while(Math.abs(o)>1e-7&&++s<10);return a}(t,r,r+.1,e,n)}(o),t,r)}(t,n,r,i)}return"string"==typeof e?(id(void 0!==ox[e],`Invalid easing type '${e}'`),ox[e]):e},oj=e=>Array.isArray(e)&&"number"!=typeof e[0],oE=(e,t)=>"zIndex"!==e&&!!("number"==typeof t||Array.isArray(t)||"string"==typeof t&&iH.test(t)&&!t.startsWith("url(")),ok=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),oS=e=>({type:"spring",stiffness:550,damping:0===e?2*Math.sqrt(550):30,restSpeed:10}),o_=()=>({type:"keyframes",ease:"linear",duration:.3}),oC=e=>({type:"keyframes",duration:.8,values:e}),oO={x:ok,y:ok,z:ok,rotate:ok,rotateX:ok,rotateY:ok,rotateZ:ok,scaleX:oS,scaleY:oS,scale:oS,opacity:o_,backgroundColor:o_,color:o_,default:oS},oM=(e,t)=>({to:t,...(rT(t)?oC:oO[e]||oO.default)(t)}),oT=new Set(["brightness","contrast","saturate","opacity"]);function oA(e){let[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;let[r]=n.match(n3)||[];if(!r)return e;let i=n.replace(r,""),o=oT.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}let oP=/([a-z-]*)\(.*?\)/g,oN=Object.assign(Object.assign({},iH),{getAnimatableNone:e=>{let t=e.match(oP);return t?t.map(oA).join(" "):e}}),oR={...ru,color:iL,backgroundColor:iL,outlineColor:iL,fill:iL,stroke:iL,borderColor:iL,borderTopColor:iL,borderRightColor:iL,borderBottomColor:iL,borderLeftColor:iL,filter:oN,WebkitFilter:oN},oD=e=>oR[e];function oL(e,t){var n;let r=oD(e);return r!==oN&&(r=iH),null===(n=r.getAnimatableNone)||void 0===n?void 0:n.call(r,t)}let oF={current:!1};function oz(e,t){let n=performance.now(),r=({timestamp:i})=>{let o=i-n;o>=t&&(ns.read(r),e(o-t))};return na.read(r,!0),()=>ns.read(r)}let oV=!1;function oI(e){return 0===e||"string"==typeof e&&0===parseFloat(e)&&-1===e.indexOf(" ")}function oZ(e){return"number"==typeof e?0:oL("",e)}function oB(e,t){return e[t]||e.default||e}function oH(e,t,n,r={}){return oF.current&&(r={type:!1}),t.start(i=>{let o,a;let s=function(e,t,n,r,i){let o=oB(r,e)||{},a=void 0!==o.from?o.from:t.get(),s=oE(e,n);"none"===a&&s&&"string"==typeof n?a=oL(e,n):oI(a)&&"string"==typeof n?a=oZ(n):!Array.isArray(n)&&oI(n)&&"string"==typeof a&&(n=oZ(a));let l=oE(e,a);return ic(l===s,`You are trying to animate ${e} from "${a}" to "${n}". ${a} is not an animatable value - to enable this animation set ${a} to a value animatable to ${n} via the \`style\` property.`),l&&s&&!1!==o.type?function(){var r;let s={from:a,to:n,velocity:t.getVelocity(),onComplete:i,onUpdate:e=>t.set(e)};return"inertia"===o.type||"decay"===o.type?function({from:e=0,velocity:t=0,min:n,max:r,power:i=.8,timeConstant:o=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:l=1,modifyTarget:u,driver:c,onUpdate:d,onComplete:f,onStop:h}){let p;function m(e){return void 0!==n&&er}function v(e){return void 0===n?r:void 0===r?n:Math.abs(n-e){var n;null==d||d(t),null===(n=e.onUpdate)||void 0===n||n.call(e,t)},onComplete:f,onStop:h}))}function y(e){g(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:l},e))}if(m(e))y({from:e,velocity:t,to:v(e)});else{let r,a,s=i*t+e;void 0!==u&&(s=u(s));let c=v(s),d=c===n?-1:1;g({type:"decay",from:e,velocity:t,timeConstant:o,power:i,restDelta:l,modifyTarget:u,onUpdate:m(s)?e=>{var n;r=a,a=e,t=(n=nf().delta)?(e-r)*(1e3/n):0,(1===d&&e>c||-1===d&&enull==p?void 0:p.stop()}}({...s,...o}):oh({...(r=o,Array.isArray(s.to)&&void 0===r.duration&&(r.duration=.8),Array.isArray(s.to)&&null===s.to[0]&&(s.to=[...s.to],s.to[0]=s.from),!function({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:l,...u}){return!!Object.keys(u).length}(r)&&(r={...r,...oM(e,s.to)}),{...s,...function({ease:e,times:t,yoyo:n,flip:r,loop:i,...o}){let a={...o};return t&&(a.offset=t),o.duration&&(a.duration=op(o.duration)),o.repeatDelay&&(a.repeatDelay=op(o.repeatDelay)),e&&(a.ease=oj(e)?e.map(ow):ow(e)),"tween"===o.type&&(a.type="keyframes"),(n||i||r)&&(ic(!oV,"yoyo, loop and flip have been removed from the API. Replace with repeat and repeatType options."),oV=!0,n?a.repeatType="reverse":i?a.repeatType="loop":r&&(a.repeatType="mirror"),a.repeat=i||n||r||o.repeat),"spring"!==o.type&&(a.type="keyframes"),a}(r)}),onUpdate:e=>{s.onUpdate(e),o.onUpdate&&o.onUpdate(e)},onComplete:()=>{s.onComplete(),o.onComplete&&o.onComplete()}})}:function(){let e=rP(n);return t.set(e),i(),o.onUpdate&&o.onUpdate(e),o.onComplete&&o.onComplete(),{stop:()=>{}}}}(e,t,n,r,i),l=function(e,t){var n,r;let i=oB(e,t)||{};return null!==(r=null!==(n=i.delay)&&void 0!==n?n:e.delay)&&void 0!==r?r:0}(r,e),u=()=>o=s();return l?a=oz(u,op(l)):u(),()=>{a&&a(),o&&o.stop()}})}let oU=e=>/^\-?\d*\.?\d+$/.test(e),oW=e=>/^0[^.\s]+$/.test(e);function oq(e,t){-1===e.indexOf(t)&&e.push(t)}function o$(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}class oK{constructor(){this.subscriptions=[]}add(e){return oq(this.subscriptions,e),()=>o$(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r){if(1===r)this.subscriptions[0](e,t,n);else for(let i=0;i!isNaN(parseFloat(e));class oG{constructor(e){this.version="7.6.5",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new oK,this.velocityUpdateSubscribers=new oK,this.renderSubscribers=new oK,this.canTrackVelocity=!1,this.updateAndNotify=(e,t=!0)=>{this.prev=this.current,this.current=e;let{delta:n,timestamp:r}=nf();this.lastUpdated!==r&&(this.timeDelta=n,this.lastUpdated=r,na.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.updateSubscribers.notify(this.current),this.velocityUpdateSubscribers.getSize()&&this.velocityUpdateSubscribers.notify(this.getVelocity()),t&&this.renderSubscribers.notify(this.current)},this.scheduleVelocityCheck=()=>na.postRender(this.velocityCheck),this.velocityCheck=({timestamp:e})=>{e!==this.lastUpdated&&(this.prev=this.current,this.velocityUpdateSubscribers.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=oY(this.current)}onChange(e){return this.updateSubscribers.add(e)}clearListeners(){this.updateSubscribers.clear()}onRenderRequest(e){return e(this.get()),this.renderSubscribers.add(e)}attach(e){this.passiveEffect=e}set(e,t=!0){t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){var e,t;return this.canTrackVelocity?(e=parseFloat(this.current)-parseFloat(this.prev),(t=this.timeDelta)?e*(1e3/t):0):0}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.stopAnimation=e(t)}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()}}function oX(e){return new oG(e)}let oJ=e=>t=>t.test(e),oQ=[ro,rt,re,n9,rr,rn,{test:e=>"auto"===e,parse:e=>e}],o0=e=>oQ.find(oJ(e)),o1=[...oQ,iL,iH],o2=e=>o1.find(oJ(e));function o4(e,t,n){let r=e.getProps();return rM(r,t,void 0!==n?n:r.custom,function(e){let t={};return e.values.forEach((e,n)=>t[n]=e.get()),t}(e),function(e){let t={};return e.values.forEach((e,n)=>t[n]=e.getVelocity()),t}(e))}function o3(e){return!!(nX(e)&&e.add)}function o5(e,t,n={}){var r;let i=o4(e,t,n.custom),{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);let a=i?()=>o6(e,i,n):()=>Promise.resolve(),s=(null===(r=e.variantChildren)||void 0===r?void 0:r.size)?(r=0)=>{let{delayChildren:i=0,staggerChildren:a,staggerDirection:s}=o;return function(e,t,n=0,r=0,i=1,o){let a=[],s=(e.variantChildren.size-1)*r,l=1===i?(e=0)=>e*r:(e=0)=>s-e*r;return Array.from(e.variantChildren).sort(o8).forEach((e,r)=>{a.push(o5(e,t,{...o,delay:n+l(r)}).then(()=>e.notify("AnimationComplete",t)))}),Promise.all(a)}(e,t,i+r,a,s,n)}:()=>Promise.resolve(),{when:l}=o;if(!l)return Promise.all([a(),s(n.delay)]);{let[e,t]="beforeChildren"===l?[a,s]:[s,a];return e().then(t)}}function o6(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=e.makeTargetAnimatable(t),u=e.getValue("willChange");r&&(a=r);let c=[],d=i&&(null===(o=e.animationState)||void 0===o?void 0:o.getState()[i]);for(let t in l){let r=e.getValue(t),i=l[t];if(!r||void 0===i||d&&function({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}(d,t))continue;let o={delay:n,...a};e.shouldReduceMotion&&nY.has(t)&&(o={...o,type:!1,delay:0});let s=oH(t,r,i,o);o3(u)&&(u.add(t),s=s.then(()=>u.remove(t))),c.push(s)}return Promise.all(c).then(()=>{s&&function(e,t){let n=o4(e,t),{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};for(let t in o={...o,...r}){let n=rP(o[t]);e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,oX(n))}}(e,s)})}function o8(e,t){return e.sortNodePosition(t)}let o7=[Ew.Animate,Ew.InView,Ew.Focus,Ew.Hover,Ew.Tap,Ew.Drag,Ew.Exit],o9=[...o7].reverse(),ae=o7.length;function at(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}let an={animation:io(({visualElement:e,animate:t})=>{e.animationState||(e.animationState=function(e){let t=t=>Promise.all(t.map(({animation:t,options:n})=>(function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t)){let i=t.map(t=>o5(e,t,n));r=Promise.all(i)}else if("string"==typeof t)r=o5(e,t,n);else{let i="function"==typeof t?o4(e,t,n.custom):t;r=o6(e,i,n)}return r.then(()=>e.notify("AnimationComplete",t))})(e,t,n))),n={[Ew.Animate]:at(!0),[Ew.InView]:at(),[Ew.Hover]:at(),[Ew.Tap]:at(),[Ew.Drag]:at(),[Ew.Focus]:at(),[Ew.Exit]:at()},r=!0,i=(t,n)=>{let r=o4(e,n);if(r){let{transition:e,transitionEnd:n,...i}=r;t={...t,...i,...n}}return t};function o(o,a){var s,l;let u=e.getProps(),c=e.getVariantContext(!0)||{},d=[],f=new Set,h={},p=1/0;for(let t=0;tp&&y,E=Array.isArray(g)?g:[g],k=E.reduce(i,{});!1===b&&(k={});let{prevResolvedValues:S={}}=v,_={...S,...k},C=e=>{j=!0,f.delete(e),v.needsAnimating[e]=!0};for(let e in _){let t=k[e],n=S[e];h.hasOwnProperty(e)||(t!==n?rT(t)&&rT(n)?!il(t,n)||w?C(e):v.protectedKeys[e]=!0:void 0!==t?C(e):f.add(e):void 0!==t&&f.has(e)?C(e):v.protectedKeys[e]=!0)}v.prevProp=g,v.prevResolvedValues=k,v.isActive&&(h={...h,...k}),r&&e.blockInitialAnimation&&(j=!1),j&&!x&&d.push(...E.map(e=>({animation:e,options:{type:m,...o}})))}if(f.size){let t={};f.forEach(n=>{let r=e.getBaseTarget(n);void 0!==r&&(t[n]=r)}),d.push({animation:t})}let m=!!d.length;return r&&!1===u.initial&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(d):Promise.resolve()}return{animateChanges:o,setActive:function(t,r,i){var a;if(n[t].isActive===r)return Promise.resolve();null===(a=e.variantChildren)||void 0===a||a.forEach(e=>{var n;return null===(n=e.animationState)||void 0===n?void 0:n.setActive(t,r)}),n[t].isActive=r;let s=o(i,t);for(let e in n)n[e].protectedKeys={};return s},setAnimateFunction:function(n){t=n(e)},getState:()=>n}}(e)),nN(t)&&(0,b.useEffect)(()=>t.subscribe(e),[t])}),exit:io(e=>{let{custom:t,visualElement:n}=e,[r,i]=is(),o=(0,b.useContext)(nv);(0,b.useEffect)(()=>{n.isPresent=r;let e=n.animationState&&n.animationState.setActive(Ew.Exit,!r,{custom:o&&o.custom||t});e&&!r&&e.then(i)},[r])})},ar=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),ai=e=>ar(e)&&e.hasOwnProperty("z"),ao=(e,t)=>Math.abs(e-t);function aa(e,t){if(iU(e)&&iU(t))return ao(e,t);if(ar(e)&&ar(t)){let n=ao(e.x,t.x),r=ao(e.y,t.y),i=ai(e)&&ai(t)?ao(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}class as{constructor(e,t,{transformPagePoint:n}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let e=ac(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=aa(e.offset,{x:0,y:0})>=3;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=nf();this.history.push({...r,timestamp:i});let{onStart:o,onMove:a}=this.handlers;t||(o&&o(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),a&&a(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{if(this.lastMoveEvent=e,this.lastMoveEventInfo=al(t,this.transformPagePoint),rV(e)&&0===e.buttons){this.handlePointerUp(e,t);return}na.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r}=this.handlers,i=ac(al(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,i),r&&r(e,i)},rI(e)&&e.touches.length>1)return;this.handlers=t,this.transformPagePoint=n;let r=rB(e),i=al(r,this.transformPagePoint),{point:o}=i,{timestamp:a}=nf();this.history=[{...o,timestamp:a}];let{onSessionStart:s}=t;s&&s(e,ac(i,this.history)),this.removeListeners=r6(rG(window,"pointermove",this.handlePointerMove),rG(window,"pointerup",this.handlePointerUp),rG(window,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),ns.update(this.updatePoint)}}function al(e,t){return t?{point:t(e.point)}:e}function au(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ac({point:e},t){return{point:e,delta:au(e,ad(t)),offset:au(e,t[0]),velocity:function(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=ad(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>op(.1)));)n--;if(!r)return{x:0,y:0};let o=(i.timestamp-r.timestamp)/1e3;if(0===o)return{x:0,y:0};let a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}(t,0)}}function ad(e){return e[e.length-1]}function af(e){return e.max-e.min}function ah(e,t=0,n=.01){return aa(e,t)({translate:0,scale:1,origin:0,originPoint:0}),ak=()=>({x:aE(),y:aE()}),aS=()=>({min:0,max:0}),a_=()=>({x:aS(),y:aS()});function aC(e){return[e("x"),e("y")]}function aO({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function aM(e){return void 0===e||1===e}function aT({scale:e,scaleX:t,scaleY:n}){return!aM(e)||!aM(t)||!aM(n)}function aA(e){return aT(e)||aP(e)||e.z||e.rotate||e.rotateX||e.rotateY}function aP(e){var t,n;return(t=e.x)&&"0%"!==t||(n=e.y)&&"0%"!==n}function aN(e,t,n,r,i){return void 0!==i&&(e=r+i*(e-r)),r+n*(e-r)+t}function aR(e,t=0,n=1,r,i){e.min=aN(e.min,t,n,r,i),e.max=aN(e.max,t,n,r,i)}function aD(e,{x:t,y:n}){aR(e.x,t.translate,t.scale,t.originPoint),aR(e.y,n.translate,n.scale,n.originPoint)}function aL(e,t){e.min=e.min+t,e.max=e.max+t}function aF(e,t,[n,r,i]){let o=void 0!==t[i]?t[i]:.5,a=iw(e.min,e.max,o);aR(e,t[n],t[r],a,t.scale)}let az=["x","scaleX","originX"],aV=["y","scaleY","originY"];function aI(e,t){aF(e.x,t,az),aF(e.y,t,aV)}function aZ(e,t){return aO(function(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}let aB=new WeakMap;class aH{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=a_(),this.visualElement=e}start(e,{snapToCursor:t=!1}={}){!1!==this.visualElement.isPresent&&(this.panSession=new as(e,{onSessionStart:e=>{this.stopAnimation(),t&&this.snapToCursor(rB(e,"page").point)},onStart:(e,t)=>{var n;let{drag:r,dragPropagation:i,onDragStart:o}=this.getProps();(!r||i||(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=r1(r),this.openGlobalLock))&&(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),aC(e=>{var t,n;let r=this.getAxisMotionValue(e).get()||0;if(re.test(r)){let i=null===(n=null===(t=this.visualElement.projection)||void 0===t?void 0:t.layout)||void 0===n?void 0:n.actual[e];if(i){let e=af(i);r=e*(parseFloat(r)/100)}}this.originPoint[e]=r}),null==o||o(e,t),null===(n=this.visualElement.animationState)||void 0===n||n.setActive(Ew.Drag,!0))},onMove:(e,t)=>{let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:o}=this.getProps();if(!n&&!this.openGlobalLock)return;let{offset:a}=t;if(r&&null===this.currentDirection){this.currentDirection=function(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}(a),null!==this.currentDirection&&(null==i||i(this.currentDirection));return}this.updateAxis("x",t.point,a),this.updateAxis("y",t.point,a),this.visualElement.render(),null==o||o(e,t)},onSessionEnd:(e,t)=>this.stop(e,t)},{transformPagePoint:this.visualElement.getTransformPagePoint()}))}stop(e,t){let n=this.isDragging;if(this.cancel(),!n)return;let{velocity:r}=t;this.startAnimation(r);let{onDragEnd:i}=this.getProps();null==i||i(e,t)}cancel(){var e,t;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),null===(e=this.panSession)||void 0===e||e.end(),this.panSession=void 0;let{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),null===(t=this.visualElement.animationState)||void 0===t||t.setActive(Ew.Drag,!1)}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!aU(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=function(e,{min:t,max:n},r){return void 0!==t&&en&&(e=r?iw(n,e,r.max):Math.min(e,n)),e}(o,this.constraints[e],this.elastic[e])),i.set(o)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),{layout:n}=this.visualElement.projection||{},r=this.constraints;e&&nA(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&n?this.constraints=function(e,{top:t,left:n,bottom:r,right:i}){return{x:ab(e.x,n,i),y:ab(e.y,t,r)}}(n.actual,e):this.constraints=!1,this.elastic=function(e=.35){return!1===e?e=0:!0===e&&(e=.35),{x:aw(e,"left","right"),y:aw(e,"top","bottom")}}(t),r!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&aC(e=>{this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){let n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(n.actual[e],this.constraints[e]))})}resolveRefConstraints(){var e;let{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!nA(t))return!1;let r=t.current;id(null!==r,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");let{projection:i}=this.visualElement;if(!i||!i.layout)return!1;let o=function(e,t,n){let r=aZ(e,n),{scroll:i}=t;return i&&(aL(r.x,i.x),aL(r.y,i.y)),r}(r,i.root,this.visualElement.getTransformPagePoint()),a={x:ax((e=i.layout.actual).x,o.x),y:ax(e.y,o.y)};if(n){let e=n(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(a));this.hasMutatedConstraints=!!e,e&&(a=aO(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),s=this.constraints||{},l=aC(a=>{var l;if(!aU(a,t,this.currentDirection))return;let u=null!==(l=null==s?void 0:s[a])&&void 0!==l?l:{};o&&(u={min:0,max:0});let c={type:"inertia",velocity:n?e[a]:0,bounceStiffness:r?200:1e6,bounceDamping:r?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...i,...u};return this.startAxisValueAnimation(a,c)});return Promise.all(l).then(a)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return oH(e,n,0,t)}stopAnimation(){aC(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){var t,n;let r="_drag"+e.toUpperCase(),i=this.visualElement.getProps()[r];return i||this.visualElement.getValue(e,null!==(n=null===(t=this.visualElement.getProps().initial)||void 0===t?void 0:t[e])&&void 0!==n?n:0)}snapToCursor(e){aC(t=>{let{drag:n}=this.getProps();if(!aU(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:o}=r.layout.actual[t];i.set(e[t]-iw(n,o,.5))}})}scalePositionWithinConstraints(){var e;if(!this.visualElement.current)return;let{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!nA(n)||!r||!this.constraints)return;this.stopAnimation();let i={x:0,y:0};aC(e=>{let t=this.getAxisMotionValue(e);if(t){let n=t.get();i[e]=function(e,t){let n=.5,r=af(e),i=af(t);return i>r?n=ix(t.min,t.max-r,e.min):r>i&&(n=ix(e.min,e.max-i,t.min)),ih(0,1,n)}({min:n,max:n},this.constraints[e])}});let{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",null===(e=r.root)||void 0===e||e.updateScroll(),r.updateLayout(),this.resolveConstraints(),aC(e=>{if(!aU(e,t,null))return;let n=this.getAxisMotionValue(e),{min:r,max:o}=this.constraints[e];n.set(iw(r,o,i[e]))})}addListeners(){var e;if(!this.visualElement.current)return;aB.set(this.visualElement,this);let t=this.visualElement.current,n=rG(t,"pointerdown",e=>{let{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)}),r=()=>{let{dragConstraints:e}=this.getProps();nA(e)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(null===(e=i.root)||void 0===e||e.updateScroll(),i.updateLayout()),r();let a=rF(window,"resize",()=>this.scalePositionWithinConstraints()),s=i.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(aC(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),null==s||s()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:o=.35,dragMomentum:a=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:o,dragMomentum:a}}}function aU(e,t,n){return(!0===t||t===e)&&(null===n||n===e)}let aW={pan:io(function({onPan:e,onPanStart:t,onPanEnd:n,onPanSessionStart:r,visualElement:i}){let o=e||t||n||r,a=(0,b.useRef)(null),{transformPagePoint:s}=(0,b.useContext)(nO),l={onSessionStart:r,onStart:t,onMove:e,onEnd:(e,t)=>{a.current=null,n&&n(e,t)}};(0,b.useEffect)(()=>{null!==a.current&&a.current.updateHandlers(l)}),rX(i,"pointerdown",o&&function(e){a.current=new as(e,l,{transformPagePoint:s})}),nE(()=>a.current&&a.current.end())}),drag:io(function(e){let{dragControls:t,visualElement:n}=e,r=ng(()=>new aH(n));(0,b.useEffect)(()=>t&&t.subscribe(r),[r,t]),(0,b.useEffect)(()=>r.addListeners(),[r])})};function aq(e){return"string"==typeof e&&e.startsWith("var(--")}let a$=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function aK(e,t,n=1){id(n<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);let[r,i]=function(e){let t=a$.exec(e);if(!t)return[,];let[,n,r]=t;return[n,r]}(e);if(!r)return;let o=window.getComputedStyle(t).getPropertyValue(r);return o?o.trim():aq(i)?aK(i,t,n+1):i}let aY=new Set(["width","height","top","left","right","bottom","x","y"]),aG=e=>aY.has(e),aX=e=>Object.keys(e).some(aG),aJ=(e,t)=>{e.set(t,!1),e.set(t)},aQ=e=>e===ro||e===rt;(Eg=Ej||(Ej={})).width="width",Eg.height="height",Eg.left="left",Eg.right="right",Eg.top="top",Eg.bottom="bottom";let a0=(e,t)=>parseFloat(e.split(", ")[t]),a1=(e,t)=>(n,{transform:r})=>{if("none"===r||!r)return 0;let i=r.match(/^matrix3d\((.+)\)$/);if(i)return a0(i[1],t);{let t=r.match(/^matrix\((.+)\)$/);return t?a0(t[1],e):0}},a2=new Set(["x","y","z"]),a4=nK.filter(e=>!a2.has(e)),a3={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:a1(4,13),y:a1(5,14)},a5=(e,t,n)=>{let r=t.measureViewportBox(),i=t.current,o=getComputedStyle(i),{display:a}=o,s={};"none"===a&&t.setStaticValue("display",e.display||"block"),n.forEach(e=>{s[e]=a3[e](r,o)}),t.render();let l=t.measureViewportBox();return n.forEach(n=>{let r=t.getValue(n);aJ(r,s[n]),e[n]=a3[n](l,o)}),e},a6=(e,t,n={},r={})=>{t={...t},r={...r};let i=Object.keys(t).filter(aG),o=[],a=!1,s=[];if(i.forEach(i=>{let l;let u=e.getValue(i);if(!e.hasValue(i))return;let c=n[i],d=o0(c),f=t[i];if(rT(f)){let e=f.length,t=null===f[0]?1:0;d=o0(c=f[t]);for(let n=t;n{let r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.render(),t}(e),a=!0),s.push(i),r[i]=void 0!==r[i]?r[i]:t[i],aJ(u,f))}}),!s.length)return{target:t,transitionEnd:r};{let n=s.indexOf("height")>=0?window.pageYOffset:null,i=a5(t,e,s);return o.length&&o.forEach(([t,n])=>{e.getValue(t).set(n)}),e.render(),nh&&null!==n&&window.scrollTo({top:n}),{target:i,transitionEnd:r}}},a8=(e,t,n,r)=>{var i,o;let a=function(e,{...t},n){let r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};for(let i in n&&(n={...n}),e.values.forEach(e=>{let t=e.get();if(!aq(t))return;let n=aK(t,r);n&&e.set(n)}),t){let e=t[i];if(!aq(e))continue;let o=aK(e,r);o&&(t[i]=o,n&&void 0===n[i]&&(n[i]=e))}return{target:t,transitionEnd:n}}(e,t,r);return t=a.target,r=a.transitionEnd,i=t,o=r,aX(i)?a6(e,i,n,o):{target:i,transitionEnd:o}},a7={current:null},a9={current:!1},se=Object.keys(nV),st=se.length,sn=["AnimationStart","AnimationComplete","Update","Unmount","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class sr{constructor({parent:e,props:t,reducedMotionConfig:n,visualState:r},i={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.isPresent=!0,this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>na.render(this.render,!1,!0);let{latestValues:o,renderState:a}=r;this.latestValues=o,this.baseTarget={...o},this.initialValues=t.initial?{...o}:{},this.renderState=a,this.parent=e,this.props=t,this.depth=e?e.depth+1:0,this.reducedMotionConfig=n,this.options=i,this.isControllingVariants=nD(t),this.isVariantNode=nL(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:s,...l}=this.scrapeMotionValuesFromProps(t);for(let e in l){let t=l[e];void 0!==o[e]&&nX(t)&&(t.set(o[e],!1),o3(s)&&s.add(e))}if(t.values)for(let e in t.values){let n=t.values[e];void 0!==o[e]&&nX(n)&&n.set(o[e])}}scrapeMotionValuesFromProps(e){return{}}mount(e){var t;this.current=e,this.projection&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=null===(t=this.parent)||void 0===t?void 0:t.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),a9.current||function(){if(a9.current=!0,nh){if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>a7.current=e.matches;e.addListener(t),t()}else a7.current=!1}}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||a7.current),this.parent&&this.parent.children.add(this),this.setProps(this.props)}unmount(){var e,t,n;for(let r in null===(e=this.projection)||void 0===e||e.unmount(),ns.update(this.notifyUpdate),ns.render(this.render),this.valueSubscriptions.forEach(e=>e()),null===(t=this.removeFromVariantTree)||void 0===t||t.call(this),null===(n=this.parent)||void 0===n||n.children.delete(this),this.events)this.events[r].clear();this.current=null}bindToMotionValue(e,t){let n=t.onChange(t=>{this.latestValues[e]=t,this.props.onUpdate&&na.update(this.notifyUpdate,!1,!0)}),r=t.onRenderRequest(this.scheduleRender);this.valueSubscriptions.set(e,()=>{n(),r()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}loadFeatures(e,t,n,r,i,o){let a=[];"production"!==t6&&n&&t&&id(!1,"You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.");for(let t=0;tthis.scheduleRender(),animationType:"string"==typeof n?n:"both",initialPromotionConfig:o,layoutScroll:l})}return a}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):a_()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}makeTargetAnimatable(e,t=!0){return this.makeTargetAnimatableFromInstance(e,this.props,t)}setProps(e){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.props=e;for(let t=0;tn.variantChildren.delete(e)}addValue(e,t){this.hasValue(e)&&this.removeValue(e),this.values.set(e,t),this.latestValues[e]=t.get(),this.bindToMotionValue(e,t)}removeValue(e){var t;this.values.delete(e),null===(t=this.valueSubscriptions.get(e))||void 0===t||t(),this.valueSubscriptions.delete(e),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=oX(t),this.addValue(e,n)),n}readValue(e){return void 0===this.latestValues[e]&&this.current?this.readValueFromInstance(this.current,e,this.options):this.latestValues[e]}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;let{initial:n}=this.props,r="string"==typeof n||"object"==typeof n?null===(t=rM(this.props,n))||void 0===t?void 0:t[e]:void 0;if(n&&void 0!==r)return r;let i=this.getBaseTargetFromProps(this.props,e);return void 0===i||nX(i)?void 0!==this.initialValues[e]&&void 0===r?void 0:this.baseTarget[e]:i}on(e,t){return this.events[e]||(this.events[e]=new oK),this.events[e].add(t)}notify(e,...t){var n;null===(n=this.events[e])||void 0===n||n.notify(...t)}}let si=["initial",...o7],so=si.length;class sa extends sr{sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){var n;return null===(n=e.style)||void 0===n?void 0:n[t]}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:t,...n},{transformValues:r},i){let o=function(e,t,n){var r;let i={};for(let o in e){let e=function(e,t){if(!t)return;let n=t[e]||t.default||t;return n.from}(o,t);i[o]=void 0!==e?e:null===(r=n.getValue(o))||void 0===r?void 0:r.get()}return i}(n,e||{},this);if(r&&(t&&(t=r(t)),n&&(n=r(n)),o&&(o=r(o))),i){!function(e,t,n){var r,i;let o=Object.keys(t).filter(t=>!e.hasValue(t)),a=o.length;if(a)for(let s=0;snq(e)?new sl(t,{enableHardwareAcceleration:!1}):new ss(t,{enableHardwareAcceleration:!0});function sc(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}let sd={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!rt.test(e))return e;e=parseFloat(e)}let n=sc(e,t.target.x),r=sc(e,t.target.y);return`${n}% ${r}%`}},sf="_$css",sh={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=e.includes("var("),o=[];i&&(e=e.replace(a$,e=>(o.push(e),sf)));let a=iH.parse(e);if(a.length>5)return r;let s=iH.createTransformer(e),l="number"!=typeof a[0]?1:0,u=n.x.scale*t.x,c=n.y.scale*t.y;a[0+l]/=u,a[1+l]/=c;let d=iw(u,c,.5);"number"==typeof a[2+l]&&(a[2+l]/=d),"number"==typeof a[3+l]&&(a[3+l]/=d);let f=s(a);if(i){let e=0;f=f.replace(sf,()=>{let t=o[e];return e++,t})}return f}};class sp extends b.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;Object.assign(n$,sm),i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),nI.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,o=n.projection;return o&&(o.isPresent=i,r||e.layoutDependency!==t||void 0===t?o.willUpdate():this.safeToRemove(),e.isPresent===i||(i?o.promote():o.relegate()||na.postRender(()=>{var e;(null===(e=o.getStack())||void 0===e?void 0:e.members.length)||this.safeToRemove()}))),null}componentDidUpdate(){let{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),!e.currentAnimation&&e.isLead()&&this.safeToRemove())}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),(null==t?void 0:t.group)&&t.group.remove(r),(null==n?void 0:n.deregister)&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;null==e||e()}render(){return null}}let sm={borderRadius:{...sd,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:sd,borderTopRightRadius:sd,borderBottomLeftRadius:sd,borderBottomRightRadius:sd,boxShadow:sh},sv=["TopLeft","TopRight","BottomLeft","BottomRight"],sg=sv.length,sy=e=>"string"==typeof e?parseFloat(e):e,sb=e=>"number"==typeof e||rt.test(e);function sx(e,t){var n;return null!==(n=e[t])&&void 0!==n?n:e.borderRadius}let sw=sE(0,.5,i7),sj=sE(.5,.95,i4);function sE(e,t,n){return r=>rt?1:n(ix(e,t,r))}function sk(e,t){e.min=t.min,e.max=t.max}function sS(e,t){sk(e.x,t.x),sk(e.y,t.y)}function s_(e,t,n,r,i){return e-=t,e=r+1/n*(e-r),void 0!==i&&(e=r+1/i*(e-r)),e}function sC(e,t,[n,r,i],o,a){!function(e,t=0,n=1,r=.5,i,o=e,a=e){if(re.test(t)){t=parseFloat(t);let e=iw(a.min,a.max,t/100);t=e-a.min}if("number"!=typeof t)return;let s=iw(o.min,o.max,r);e===o&&(s-=t),e.min=s_(e.min,t,n,s,i),e.max=s_(e.max,t,n,s,i)}(e,t[n],t[r],t[i],t.scale,o,a)}let sO=["x","scaleX","originX"],sM=["y","scaleY","originY"];function sT(e,t,n,r){sC(e.x,t,sO,null==n?void 0:n.x,null==r?void 0:r.x),sC(e.y,t,sM,null==n?void 0:n.y,null==r?void 0:r.y)}function sA(e){return 0===e.translate&&1===e.scale}function sP(e){return sA(e.x)&&sA(e.y)}function sN(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function sR(e){return af(e.x)/af(e.y)}class sD{constructor(){this.members=[]}add(e){oq(this.members,e),e.scheduleRender()}remove(e){if(o$(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){let t;let n=this.members.findIndex(t=>e===t);if(0===n)return!1;for(let e=n;e>=0;e--){let n=this.members[e];if(!1!==n.isPresent){t=n;break}}return!!t&&(this.promote(t),!0)}promote(e,t){var n;let r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.instance&&r.scheduleRender(),e.scheduleRender(),e.resumeFrom=r,t&&(e.resumeFrom.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues,e.snapshot.isShared=!0),(null===(n=e.root)||void 0===n?void 0:n.isUpdating)&&(e.isLayoutDirty=!0);let{crossfade:i}=e.options;!1===i&&r.hide()}}exitAnimationComplete(){this.members.forEach(e=>{var t,n,r,i,o;null===(n=(t=e.options).onExitComplete)||void 0===n||n.call(t),null===(o=null===(r=e.resumingFrom)||void 0===r?void 0:(i=r.options).onExitComplete)||void 0===o||o.call(i)})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function sL(e,t,n){let r=e.x.translate/t.x,i=e.y.translate/t.y,o=`translate3d(${r}px, ${i}px, 0) `;if(o+=`scale(${1/t.x}, ${1/t.y}) `,n){let{rotate:e,rotateX:t,rotateY:r}=n;e&&(o+=`rotate(${e}deg) `),t&&(o+=`rotateX(${t}deg) `),r&&(o+=`rotateY(${r}deg) `)}let a=e.x.scale*t.x,s=e.y.scale*t.y;return"translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)"==(o+=`scale(${a}, ${s})`)?"none":o}let sF=(e,t)=>e.depth-t.depth;class sz{constructor(){this.children=[],this.isDirty=!1}add(e){oq(this.children,e),this.isDirty=!0}remove(e){o$(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(sF),this.isDirty=!1,this.children.forEach(e)}}let sV=["","X","Y","Z"];function sI({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e,n={},r=null==t?void 0:t()){this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(s$),this.nodes.forEach(sK)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=e,this.latestValues=n,this.root=r?r.root||r:this,this.path=r?[...r.path,r]:[],this.parent=r,this.depth=r?r.depth+1:0,e&&this.root.registerPotentialNode(e,this);for(let e=0;ethis.root.updateBlockedByResize=!1;e(t,()=>{this.root.updateBlockedByResize=!0,n&&n(),n=oz(r,250),nI.hasAnimatedSinceResize&&(nI.hasAnimatedSinceResize=!1,this.nodes.forEach(sq))})}i&&this.root.registerSharedNode(i,this),!1!==this.options.animate&&a&&(i||o)&&this.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t,hasRelativeTargetChanged:n,layout:r})=>{var i,o,s,l,u;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let c=null!==(o=null!==(i=this.options.transition)&&void 0!==i?i:a.getDefaultTransition())&&void 0!==o?o:s0,{onLayoutAnimationStart:d,onLayoutAnimationComplete:f}=a.getProps(),h=!this.targetLayout||!sN(this.targetLayout,r)||n,p=!t&&n;if((null===(s=this.resumeFrom)||void 0===s?void 0:s.instance)||p||t&&(h||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,p);let t={...oB(c,"layout"),onPlay:d,onComplete:f};a.shouldReduceMotion&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||0!==this.animationProgress||sq(this),this.isLead()&&(null===(u=(l=this.options).onExitComplete)||void 0===u||u.call(l));this.targetLayout=r})}unmount(){var e,t;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),null===(e=this.getStack())||void 0===e||e.remove(this),null===(t=this.parent)||void 0===t||t.children.delete(this),this.instance=void 0,ns.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var e;return this.isAnimationBlocked||(null===(e=this.parent)||void 0===e?void 0:e.isTreeAnimationBlocked())||!1}startUpdate(){var e;this.isUpdateBlocked()||(this.isUpdating=!0,null===(e=this.nodes)||void 0===e||e.forEach(sY))}willUpdate(e=!0){var t,n,r;if(this.root.isUpdateBlocked()){null===(n=(t=this.options).onExitComplete)||void 0===n||n.call(t);return}if(this.root.isUpdating||this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){if(this.snapshot||!this.instance)return;let e=this.measure(),t=this.removeTransform(this.removeElementScroll(e));s4(t),this.snapshot={measured:e,layout:t,latestValues:{}}}updateLayout(){var e;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e=((null===(n=this.getStack())||void 0===n?void 0:n.members.length)||0),c=!!(l&&!u&&!0===this.options.crossfade&&!this.path.some(sQ));this.animationProgress=0,this.mixTargetDelta=t=>{var n,r,d;let f=t/1e3;sX(a.x,e.x,f),sX(a.y,e.y,f),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&(null===(n=this.relativeParent)||void 0===n?void 0:n.layout)&&(ay(s,this.layout.actual,this.relativeParent.layout.actual),r=this.relativeTarget,d=this.relativeTargetOrigin,sJ(r.x,d.x,s.x,f),sJ(r.y,d.y,s.y,f)),l&&(this.animationValues=o,function(e,t,n,r,i,o){var a,s,l,u;i?(e.opacity=iw(0,null!==(a=n.opacity)&&void 0!==a?a:1,sw(r)),e.opacityExit=iw(null!==(s=t.opacity)&&void 0!==s?s:1,0,sj(r))):o&&(e.opacity=iw(null!==(l=t.opacity)&&void 0!==l?l:1,null!==(u=n.opacity)&&void 0!==u?u:1,r));for(let i=0;i{nI.hasAnimatedSinceResize=!0,this.currentAnimation=function(e,t,n={}){let r=nX(e)?e:oX(e);return oH("",r,1e3,n),{stop:()=>r.stop(),isAnimating:()=>r.isAnimating()}}(0,0,{...e,onUpdate:t=>{var n;this.mixTargetDelta(t),null===(n=e.onUpdate)||void 0===n||n.call(e,t)},onComplete:()=>{var t;null===(t=e.onComplete)||void 0===t||t.call(e),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var e;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),null===(e=this.getStack())||void 0===e||e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var e;this.currentAnimation&&(null===(e=this.mixTargetDelta)||void 0===e||e.call(this,1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&s3(this.options.animationType,this.layout.actual,r.actual)){n=this.target||a_();let t=af(this.layout.actual.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=af(this.layout.actual.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}sS(t,n),aI(t,i),am(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){var n,r,i;this.sharedNodes.has(e)||this.sharedNodes.set(e,new sD);let o=this.sharedNodes.get(e);o.add(t),t.promote({transition:null===(n=t.options.initialPromotionConfig)||void 0===n?void 0:n.transition,preserveFollowOpacity:null===(i=null===(r=t.options.initialPromotionConfig)||void 0===r?void 0:r.shouldPreserveFollowOpacity)||void 0===i?void 0:i.call(r,t)})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){var e;let{layoutId:t}=this.options;return t&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this}getPrevLead(){var e;let{layoutId:t}=this.options;return t?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return!!e&&e.relegate(this)}resetRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,n={};for(let r=0;r{var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()}),this.root.nodes.forEach(sU),this.root.sharedNodes.clear()}}}function sZ(e){e.updateLayout()}function sB(e){var t,n,r;let i=(null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&i&&e.hasListeners("didUpdate")){let{actual:t,measured:n}=e.layout,{animationType:r}=e.options;"size"===r?aC(e=>{let n=i.isShared?i.measured[e]:i.layout[e],r=af(n);n.min=t[e].min,n.max=n.min+r}):s3(r,i.layout,t)&&aC(e=>{let n=i.isShared?i.measured[e]:i.layout[e],r=af(t[e]);n.max=n.min+r});let o=ak();am(o,t,i.layout);let a=ak();i.isShared?am(a,e.applyTransform(n,!0),i.measured):am(a,t,i.layout);let s=!sP(o),l=!1;if(!e.resumeFrom){let n=e.getClosestProjectingParent();if(n&&!n.resumeFrom){let{snapshot:e,layout:r}=n;if(e&&r){let n=a_();ay(n,i.layout,e.layout);let o=a_();ay(o,t,r.actual),sN(n,o)||(l=!0)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:i,delta:a,layoutDelta:o,hasLayoutChanged:s,hasRelativeTargetChanged:l})}else e.isLead()&&(null===(r=(n=e.options).onExitComplete)||void 0===r||r.call(n));e.options.transition=void 0}function sH(e){e.clearSnapshot()}function sU(e){e.clearMeasurements()}function sW(e){let{visualElement:t}=e.options;(null==t?void 0:t.getProps().onBeforeLayoutMeasure)&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function sq(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function s$(e){e.resolveTargetDelta()}function sK(e){e.calcProjection()}function sY(e){e.resetRotation()}function sG(e){e.removeLeadSnapshot()}function sX(e,t,n){e.translate=iw(t.translate,0,n),e.scale=iw(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function sJ(e,t,n,r){e.min=iw(t.min,n.min,r),e.max=iw(t.max,n.max,r)}function sQ(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}let s0={duration:.45,ease:[.4,0,.1,1]};function s1(e,t){let n=e.root;for(let t=e.path.length-1;t>=0;t--)if(e.path[t].instance){n=e.path[t];break}let r=n&&n!==e.root?n.instance:document,i=r.querySelector(`[data-projection-id="${t}"]`);i&&e.mount(i,!0)}function s2(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function s4(e){s2(e.x),s2(e.y)}function s3(e,t,n){return"position"===e||"preserve-aspect"===e&&!function(e,t,n=.1){return aa(e,t)<=n}(sR(t),sR(n),.2)}let s5=sI({attachResizeListener:(e,t)=>rF(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),s6={current:void 0},s8=sI({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!s6.current){let e=new s5(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),s6.current=e}return s6.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>"fixed"===window.getComputedStyle(e).position}),s7={...an,...ia,...aW,measureLayout:function(e){let[t,n]=is(),r=(0,b.useContext)(nj);return b.createElement(sp,{...e,layoutGroup:r,switchLayoutGroup:(0,b.useContext)(nH),isPresent:t,safeToRemove:n})}},s9=function(e){function t(t,n={}){return function({preloadedFeatures:e,createVisualElement:t,projectionNodeConstructor:n,useRender:r,useVisualState:i,Component:o}){e&&function(e){for(let t in e)"projectionNodeConstructor"===t?nV.projectionNodeConstructor=e[t]:nV[t].Component=e[t]}(e);let a=(0,b.forwardRef)(function(a,s){var l;let u={...(0,b.useContext)(nO),...a,layoutId:function({layoutId:e}){let t=(0,b.useContext)(nj).id;return t&&void 0!==e?t+"-"+e:e}(a)},{isStatic:c}=u,d=null,f=function(e){let{initial:t,animate:n}=function(e,t){if(nD(e)){let{initial:t,animate:n}=e;return{initial:!1===t||nP(t)?t:void 0,animate:nP(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,(0,b.useContext)(nM));return(0,b.useMemo)(()=>({initial:t,animate:n}),[nF(t),nF(n)])}(a),h=c?void 0:ng(()=>{if(nI.hasEverUpdated)return nZ++}),p=i(a,c);if(!c&&nh){f.visualElement=function(e,t,n,r){let i=(0,b.useContext)(nM).visualElement,o=(0,b.useContext)(nT),a=(0,b.useContext)(nv),s=(0,b.useContext)(nO).reducedMotion,l=(0,b.useRef)();r=r||o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceId:a?a.id:void 0,blockInitialAnimation:!!a&&!1===a.initial,reducedMotionConfig:s}));let u=l.current;return np(()=>{u&&u.render()}),(0,b.useEffect)(()=>{u&&u.animationState&&u.animationState.animateChanges()}),np(()=>()=>u&&u.notify("Unmount"),[]),u}(o,p,u,t);let r=(0,b.useContext)(nT).strict,i=(0,b.useContext)(nH);f.visualElement&&(d=f.visualElement.loadFeatures(u,r,e,h,n||nV.projectionNodeConstructor,i))}return b.createElement(nB,{visualElement:f.visualElement,props:u},d,b.createElement(nM.Provider,{value:f},r(o,a,h,(l=f.visualElement,(0,b.useCallback)(e=>{e&&p.mount&&p.mount(e),l&&(e?l.mount(e):l.unmount()),s&&("function"==typeof s?s(e):nA(s)&&(s.current=e))},[l])),p,c,f.visualElement)))});return a[nU]=o,a}(e(t,n))}if("undefined"==typeof Proxy)return t;let n=new Map;return new Proxy(t,{get:(e,r)=>(n.has(r)||n.set(r,t(r)),n.get(r))})}((e,t)=>(function(e,{forwardMotionProps:t=!1},n,r,i){let o=nq(e)?rD:rL;return{...o,preloadedFeatures:n,useRender:function(e=!1){return(t,n,r,i,{latestValues:o},a)=>{let s=nq(t)?rj:rh,l=s(n,o,a),u=function(e,t,n){let r={};for(let i in e)(rv(i)||!0===n&&rm(i)||!t&&!rm(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}(n,"string"==typeof t,e),c={...u,...l,ref:i};return r&&(c["data-projection-id"]=r),(0,b.createElement)(t,c)}}(t),createVisualElement:r,projectionNodeConstructor:i,Component:e}})(e,t,s7,su,s8));function le(e){let{open:t,onOpenChange:n}=e,[r,i]=(0,b.useState)(!1),o=(0,b.useMemo)(()=>n?t:r,[n,r,t]),a=(0,b.useCallback)(e=>{n?n(e):i(e)},[n]);return{open:o,onOpenChange:a}}var lt=n(35957),ln=n.n(lt),lr=n(276),li=n.n(lr);let lo=(0,em.cx)(ln().variable,li().variable),la={show:{opacity:[0,1],scale:[.95,1],transition:{duration:.1,ease:"easeOut"}},exit:{opacity:[1,0],scale:[1,.95],transition:{duration:.1,ease:"easeIn"}}};function ls(e){let{children:t,content:n,defaultOpen:r,open:i,onOpenChange:o,delayDuration:a=300,disableHoverableContent:s,...l}=e,{open:u,onOpenChange:c}=le({open:i,onOpenChange:o});return(0,y.jsxs)(tJ,{open:u,delayDuration:a,disableHoverableContent:s,defaultOpen:r,onOpenChange:c,children:[(0,y.jsx)(tB,{asChild:!0,children:t}),(0,y.jsx)(nC,{children:n&&u?(0,y.jsx)(tQ,{forceMount:!0,children:(0,y.jsx)(t$,{forceMount:!0,asChild:!0,side:"top",align:"center",sideOffset:l.sideOffset||5,...l,children:(0,y.jsx)(s9.div,{variants:la,initial:"init",animate:"show",exit:"exit",className:(0,em.cx)(lo,"relative","z-50","data-[side=top]:bottom-1","data-[side=top]:origin-bottom","data-[side=bottom]:top-1","data-[side=bottom]:origin-top","data-[side=left]:right-1","data-[side=left]:origin-right","data-[side=right]:left-1","data-[side=right]:origin-left"),children:(0,y.jsx)("div",{className:(0,em.cx)("py-1 px-2","max-w-xs","overflow-hidden",t4()),children:(0,y.jsx)(t2,{size:"12",children:n})})})})}):null})]})}let ll=(0,em.j)(["inline-flex","gap-1","appearance-none","shrink-0","items-center","justify-center","select-none","leading-normal","font-sans","cursor-pointer","overflow-hidden","focus:z-10","disabled:cursor-auto","disabled:pointer-events-none","outline-none","focus:ring ring-blue-500 dark:ring-blue-200","transition-colors duration-75"],{variants:{size:{small:["text-xs","px-2","h-7"],medium:["text-base","px-4","h-10"],large:["text-lg","px-4","h-12"],none:[]},state:{waiting:["pointer-events-none"]},disabled:{true:"cursor-auto pointer-events-none"},rounded:{true:"rounded",false:""},variant:{accent:["border","text-white dark:text-white","enabled:bg-green-700 enabled:dark:bg-green-700","enabled:border-green-800/30 enabled:dark:border-green-600/70","enabled:hover:bg-green-800/90 dark:enabled:hover:bg-green-700/90","enabled:hover:border-green-800/50 enabled:hover:dark:border-green-600","disabled:text-white/50 disabled:dark:text-white/50","disabled:bg-green-700/70 disabled:dark:bg-green-600/70","disabled:border-green-600/50 disabled:dark:border-green-500/30","[&[href]]:bg-green-700 [&[href]]:dark:bg-green-700","[&[href]]:border-green-800/30 [&[href]]:dark:border-green-600/70","[&[href]]:hover:bg-green-800/90 dark:[&[href]]:hover:bg-green-700/90","[&[href]]:hover:border-green-800/50 [href]]:hover:dark:border-green-600"],red:["border","bg-red-700 dark:bg-red-700","border-red-800/30 dark:border-red-600/70","enabled:hover:bg-red-800/90 dark:enabled:hover:bg-red-700/90","enabled:hover:border-red-800/50 enabled:hover:dark:border-red-600","disabled:bg-red-700/70 disabled:dark:bg-red-600/70","disabled:border-red-600/50 disabled:dark:border-red-500/30","text-white dark:text-white","disabled:text-white/50 disabled:dark:text-white/50"],amber:["border","bg-amber-700 dark:bg-amber-700","border-amber-800/30 dark:border-amber-600/70","enabled:hover:bg-amber-800/90 dark:enabled:hover:bg-amber-700/90","enabled:hover:border-amber-800/50 enabled:hover:dark:border-amber-600","disabled:bg-amber-700/70 disabled:dark:bg-amber-600/70","disabled:border-amber-600/50 disabled:dark:border-amber-500/30","text-white dark:text-white","disabled:text-white/50 disabled:dark:text-white/50"],gray:["border","bg-white dark:bg-graydark-200","enabled:hover:bg-gray-50 dark:enabled:hover:bg-graydark-300","disabled:bg-gray-200 disabled:dark:bg-graydark-200","border-gray-400 dark:border-graydark-400","enabled:hover:border-gray-500 enabled:hover:dark:border-graydark-500","text-gray-1100 dark:text-gray-300","disabled:text-gray-600 disabled:dark:text-graydark-700"],active:["border","bg-gray-200 dark:bg-graydark-400","enabled:hover:bg-gray-50 dark:enabled:hover:bg-graydark-300","disabled:bg-gray-200 disabled:dark:bg-graydark-200","border-gray-500 dark:border-graydark-500","enabled:hover:border-gray-500 enabled:hover:dark:border-graydark-500","text-gray-1100 dark:text-white","disabled:text-gray-600 disabled:dark:text-graydark-700"],inactive:["border","bg-white dark:bg-graydark-200","enabled:hover:bg-gray-50 dark:enabled:hover:bg-graydark-300","disabled:bg-gray-200 disabled:dark:bg-graydark-200","border-gray-400/70 dark:border-graydark-400/70","enabled:hover:border-gray-500 enabled:hover:dark:border-graydark-500","text-gray-1100/30 dark:text-white/30","enabled:hover:text-gray-1100 enabled:hover:dark:text-white","disabled:text-gray-600 disabled:dark:text-graydark-700"],ghost:["appearance-none border-none bg-transparent","text-gray-1100 dark:text-white","disabled:text-gray-600 disabled:dark:text-graydark-700"],state:["open:text-gray-1100 open:dark:text-white","hover:text-gray-1000 hover:dark:text-graydark-1000","text-gray-700 dark:text-graydark-800"]},icon:{contrast:"",hover:"[&>svg]:opacity-50 hover:[&>svg]:opacity-100 transition-opacity",subtle:"[&>svg]:opacity-50"},color:{verySubtle:"!text-gray-700 dark:!text-graydark-700",subtle:"!text-gray-1000 dark:!text-graydark-1000",contrast:"!text-gray-1100 dark:!text-white",lo:"!text-white dark:!text-graydark-50",accent:"!text-accent-1100 dark:!text-accentdark-1100",red:"!text-red-700 dark:!text-red-400",green:"!text-emerald-700 dark:!text-emerald-500",amber:"!text-amber-600 dark:!text-amber-500",none:""}},defaultVariants:{variant:"gray",size:"small",rounded:!0,icon:"subtle",color:"none"}}),lu=b.forwardRef((e,t)=>{let{variant:n,size:r,state:i,rounded:o,disabled:a,icon:s,color:l,tip:u,tipAlign:c,tipSide:d,className:f,type:h="button",...p}=e;return u?(0,y.jsx)(ls,{content:u,align:c,side:d,children:(0,y.jsx)("button",{ref:t,type:h,disabled:a,className:ll({variant:n,size:r,state:i,rounded:o,disabled:a,icon:s,color:l,className:f}),...p})}):(0,y.jsx)("button",{ref:t,disabled:a,type:h,className:ll({variant:n,size:r,state:i,rounded:o,disabled:a,icon:s,color:l,className:f}),...p})});var lc=n(88242);let ld=b.forwardRef((e,t)=>{let{children:n,...r}=e;return(0,y.jsx)(X,{ref:t,...r,..."single"===r.type?{collapsible:!0}:{},children:n})}),lf=b.forwardRef((e,t)=>{let{children:n,...r}=e;return(0,y.jsx)(ed,{children:(0,y.jsx)(eh,{...r,asChild:!0,ref:t,children:(0,y.jsxs)(lu,{variant:"ghost",size:"none",className:"w-full flex gap-2 justify-between",children:[(0,y.jsx)("span",{className:"flex-1 text-left",children:n}),(0,y.jsx)("span",{className:"pr-3",children:(0,y.jsx)(lc.cRw,{})})]})})})}),lh=(0,em.j)([],{variants:{variant:{default:"border-t border-gray-500 dark:border-graydark-500 last-of-type:border-b",ghost:""}},defaultVariants:{variant:"default"}}),lp=b.forwardRef((e,t)=>{let{variant:n,className:r,...i}=e;return(0,y.jsx)(ec,{...i,className:lh({variant:n,className:r}),ref:t})}),lm=ep,lv=(0,em.j)("border border-gray-500 dark:border-graydark-500 bg-gray-100 dark:bg-graydark-100 rounded p-4"),lg=b.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,y.jsx)("div",{...r,className:lv({className:n}),ref:t})});var ly=n(86029);let lb="Avatar",[lx,lw]=(0,j.b)(lb),[lj,lE]=lx(lb),lk=(0,b.forwardRef)((e,t)=>{let{__scopeAvatar:n,...r}=e,[i,o]=(0,b.useState)("idle");return(0,b.createElement)(lj,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:o},(0,b.createElement)(O.WV.span,(0,w.Z)({},r,{ref:t})))}),lS=(0,b.forwardRef)((e,t)=>{let{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...o}=e,a=lE("AvatarImage",n),s=function(e){let[t,n]=(0,b.useState)("idle");return(0,b.useEffect)(()=>{if(!e){n("error");return}let t=!0,r=new window.Image,i=e=>()=>{t&&n(e)};return n("loading"),r.onload=i("loaded"),r.onerror=i("error"),r.src=e,()=>{t=!1}},[e]),t}(r),l=(0,ly.W)(e=>{i(e),a.onImageLoadingStatusChange(e)});return(0,M.b)(()=>{"idle"!==s&&l(s)},[s,l]),"loaded"===s?(0,b.createElement)(O.WV.img,(0,w.Z)({},o,{ref:t,src:r})):null}),l_=(0,b.forwardRef)((e,t)=>{let{__scopeAvatar:n,delayMs:r,...i}=e,o=lE("AvatarFallback",n),[a,s]=(0,b.useState)(void 0===r);return(0,b.useEffect)(()=>{if(void 0!==r){let e=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(e)}},[r]),a&&"loaded"!==o.imageLoadingStatus?(0,b.createElement)(O.WV.span,(0,w.Z)({},i,{ref:t})):null}),lC=(0,em.j)(["items-center justify-center align-middle flex flex-shrink-0 relative","overflow-hidden select-none outline-none","font-sans font-medium text-sm","border"],{variants:{size:{1:"w-6 h-6",2:"w-12 h-12",3:"w-16 h-16",4:"w-28 h-28"},variant:{filter:"bg-transparent",hiContrast:["bg-gray-900 dark:bg-white text-white dark:text-gray-1100","border-gray-900 dark:border-white text-white dark:text-gray-1100"],gray:["bg-gray-500 dark:bg-gray-800 text-gray-1100 dark:text-white","border-gray-500 dark:border-gray-800 text-gray-1100 dark:text-white"]},shape:{square:"rounded",circle:"rounded-full"},inactive:{true:"opacity-30"},interactive:{true:"cursor-pointer"}},defaultVariants:{size:"2",variant:"gray",shape:"circle"}}),lO=(0,em.j)("uppercase",{variants:{size:{1:"text-sm",2:"text-base",3:"text-lg",4:"text-lg"}},defaultVariants:{size:"2"}}),lM=b.forwardRef((e,t)=>{let{alt:n,src:r,fallback:i,size:o,variant:a,shape:s,interactive:l,inactive:u,className:c,...d}=e;return(0,y.jsx)("div",{className:(0,em.cx)("relative h-fit w-fit",c),children:(0,y.jsxs)(lk,{...d,ref:t,className:lC({className:c,size:o,variant:a,interactive:l,inactive:u,shape:s}),children:["filter"===a&&(0,y.jsx)("div",{className:"absolute w-full h-full z-10",style:{backgroundColor:"rgba(30, 169, 76, 0.3)"}}),(0,y.jsx)(lS,{alt:n,src:r,className:"flex object-cover h-full align-middle w-full"}),(0,y.jsx)(l_,{className:lO({size:o}),children:i})]})})});(0,em.j)(["items-center appearance-none inline-flex flex-shrink-0 whitespace-nowrap","font-sans font-regular text-sm","justify-center align-middle outline-none p-0 decoration-none select-none","disabled:pointer-events-none","py-0.5 px-2"],{variants:{variant:{active:["border","bg-gray-800 text-gray-900 border-gray-900","dark:bg-transparent dark:text-white dark:border-white/10"],simple:"bg-gray-300 dark:bg-graydark-800 text-gray-900 dark:text-white",green:["border","[&>svg]:opacity-50","bg-green-700 dark:bg-green-700","border-green-800/30 dark:border-green-600/70","hover:bg-green-800/90 dark:hover:bg-green-700/90","hover:border-green-800/50 hover:dark:border-green-600","text-white dark:text-white"],accent:["border","[&>svg]:opacity-50","bg-green-700 dark:bg-green-700","border-green-800/30 dark:border-green-600/70","hover:bg-green-800/90 dark:hover:bg-green-700/90","hover:border-green-800/50 hover:dark:border-green-600","text-white dark:text-white"],red:["border","[&>svg]:opacity-50","bg-red-700 dark:bg-red-700","border-red-800/30 dark:border-red-600/70","hover:bg-red-800/90 dark:hover:bg-red-700/90","hover:border-red-800/50 hover:dark:border-red-600","text-white dark:text-white"],amber:["border","[&>svg]:opacity-50","bg-amber-700 dark:bg-amber-700","border-amber-800/30 dark:border-amber-600/70","hover:bg-amber-800/90 dark:hover:bg-amber-700/90","hover:border-amber-800/50 hover:dark:border-amber-600","text-white dark:text-white"],gray:["border","[&>svg]:opacity-50","bg-white dark:bg-graydark-200","border-gray-400 dark:border-graydark-400","hover:bg-gray-50 dark:hover:bg-graydark-300","hover:border-gray-500 hover:dark:border-graydark-500","text-gray-1100 dark:text-white"],inactive:["border","[&>svg]:opacity-50","bg-white dark:bg-transparent","border-gray-400 dark:border-graydark-400","hover:border-gray-500 hover:dark:border-graydark-500","text-gray-1100/30 dark:text-white/30","hover:text-gray-1100/50 hover:dark:text-white/50"]},interactive:{true:"cursor-pointer"},rounded:{true:"rounded",false:""}},defaultVariants:{variant:"gray",rounded:!0}});let lT=b.forwardRef((e,t)=>{let{className:n,size:r,color:i,...o}=e;return(0,y.jsx)("pre",{children:(0,y.jsx)("code",{className:(0,em.cx)(t0({font:"mono",size:r,color:i}),"block","w-full","overflow-auto","p-3","bg-white dark:bg-graydark-200","border border-gray-400 dark:border-graydark-400","rounded",n),...o,ref:t})})}),lA=(0,em.j)(["font-mono","whitespace-nowrap","rounded"],{variants:{color:{gray:["bg-gray-200 dark:bg-graydark-200","text-gray-1100 dark:text-graydark-1100"],accent:["bg-accent-200 dark:bg-accentdark-200","text-accent-1100 dark:text-accentdark-1100"]}},defaultVariants:{color:"accent"}}),lP=b.forwardRef((e,t)=>{let{color:n,className:r,...i}=e;return(0,y.jsx)("code",{...i,className:lA({color:n,className:r}),ref:t})}),lN=(0,em.j)(["flex","relative","[&>*]:rounded-none [&>*:last-child]:rounded-r [&>*:first-child]:rounded-l","[&>*]:border-r-0 [&>*]:border-l [&>*:first-child]:border-l [&>*:last-child]:border-r"]),lR=b.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,y.jsx)("div",{ref:t,className:lN({className:n}),...r})});(0,em.j)(["select-none appearance-none outline-none overflow-hidden","inline-flex items-center justify-center","focus:ring ring-blue-500 dark:ring-blue-200","border","bg-gray-300 dark:bg-graydark-50","autofill:bg-blue-100 autofill:dark:bg-blue-800","border-gray-400 dark:border-graydark-400","enabled:hover:border-gray-500 enabled:hover:dark:border-graydark-500","disabled:cursor-default","enabled:data-[state=checked]:bg-green-600 dark:enabled:data-[state=checked]:bg-green-500","disabled:data-[state=checked]:bg-green-600/50 dark:disabled:data-[state=checked]:bg-green-500/50"],{variants:{size:{small:"w-4 h-4 rounded",medium:"w-6 h-6 rounded"}},defaultVariants:{size:"small"}});let lD=(0,em.j)(["flex-shrink-0 w-full mx-auto"],{variants:{pad:{true:"px-5 md:px-10",false:""},size:{1:"max-w-screen-sm",2:"max-w-screen-md",3:"max-w-[1145px]",4:"max-w-screen-2xl",full:"max-w-none"}},defaultVariants:{pad:!0,size:"3"}}),lL=b.forwardRef((e,t)=>{let{className:n,pad:r,size:i,...o}=e;return(0,y.jsx)("div",{ref:t,...o,className:lD({size:i,pad:r,className:n})})});var lF=n(72331);let lz=(0,b.createContext)(void 0);function lV(e){let t=(0,b.useContext)(lz);return e||t||"ltr"}let lI="ScrollArea",[lZ,lB]=(0,j.b)(lI),[lH,lU]=lZ(lI),lW=(0,b.forwardRef)((e,t)=>{let{__scopeScrollArea:n,type:r="hover",dir:i,scrollHideDelay:o=600,...a}=e,[s,l]=(0,b.useState)(null),[u,c]=(0,b.useState)(null),[d,f]=(0,b.useState)(null),[h,p]=(0,b.useState)(null),[m,v]=(0,b.useState)(null),[g,y]=(0,b.useState)(0),[x,j]=(0,b.useState)(0),[k,S]=(0,b.useState)(!1),[_,C]=(0,b.useState)(!1),M=(0,E.e)(t,e=>l(e)),T=lV(i);return(0,b.createElement)(lH,{scope:n,type:r,dir:T,scrollHideDelay:o,scrollArea:s,viewport:u,onViewportChange:c,content:d,onContentChange:f,scrollbarX:h,onScrollbarXChange:p,scrollbarXEnabled:k,onScrollbarXEnabledChange:S,scrollbarY:m,onScrollbarYChange:v,scrollbarYEnabled:_,onScrollbarYEnabledChange:C,onCornerWidthChange:y,onCornerHeightChange:j},(0,b.createElement)(O.WV.div,(0,w.Z)({dir:T},a,{ref:M,style:{position:"relative","--radix-scroll-area-corner-width":g+"px","--radix-scroll-area-corner-height":x+"px",...e.style}})))}),lq=(0,b.forwardRef)((e,t)=>{let{__scopeScrollArea:n,children:r,...i}=e,o=lU("ScrollAreaViewport",n),a=(0,b.useRef)(null),s=(0,E.e)(t,a,o.onViewportChange);return(0,b.createElement)(b.Fragment,null,(0,b.createElement)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"}}),(0,b.createElement)(O.WV.div,(0,w.Z)({"data-radix-scroll-area-viewport":""},i,{ref:s,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...e.style}}),(0,b.createElement)("div",{ref:o.onContentChange,style:{minWidth:"100%",display:"table"}},r)))}),l$="ScrollAreaScrollbar",lK=(0,b.forwardRef)((e,t)=>{let{forceMount:n,...r}=e,i=lU(l$,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:a}=i,s="horizontal"===e.orientation;return(0,b.useEffect)(()=>(s?o(!0):a(!0),()=>{s?o(!1):a(!1)}),[s,o,a]),"hover"===i.type?(0,b.createElement)(lY,(0,w.Z)({},r,{ref:t,forceMount:n})):"scroll"===i.type?(0,b.createElement)(lG,(0,w.Z)({},r,{ref:t,forceMount:n})):"auto"===i.type?(0,b.createElement)(lX,(0,w.Z)({},r,{ref:t,forceMount:n})):"always"===i.type?(0,b.createElement)(lJ,(0,w.Z)({},r,{ref:t})):null}),lY=(0,b.forwardRef)((e,t)=>{let{forceMount:n,...r}=e,i=lU(l$,e.__scopeScrollArea),[o,a]=(0,b.useState)(!1);return(0,b.useEffect)(()=>{let e=i.scrollArea,t=0;if(e){let n=()=>{window.clearTimeout(t),a(!0)},r=()=>{t=window.setTimeout(()=>a(!1),i.scrollHideDelay)};return e.addEventListener("pointerenter",n),e.addEventListener("pointerleave",r),()=>{window.clearTimeout(t),e.removeEventListener("pointerenter",n),e.removeEventListener("pointerleave",r)}}},[i.scrollArea,i.scrollHideDelay]),(0,b.createElement)(T.z,{present:n||o},(0,b.createElement)(lX,(0,w.Z)({"data-state":o?"visible":"hidden"},r,{ref:t})))}),lG=(0,b.forwardRef)((e,t)=>{var n;let{forceMount:r,...i}=e,o=lU(l$,e.__scopeScrollArea),a="horizontal"===e.orientation,s=ua(()=>u("SCROLL_END"),100),[l,u]=(n={hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}},(0,b.useReducer)((e,t)=>{let r=n[e][t];return null!=r?r:e},"hidden"));return(0,b.useEffect)(()=>{if("idle"===l){let e=window.setTimeout(()=>u("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(e)}},[l,o.scrollHideDelay,u]),(0,b.useEffect)(()=>{let e=o.viewport,t=a?"scrollLeft":"scrollTop";if(e){let n=e[t],r=()=>{let r=e[t],i=n!==r;i&&(u("SCROLL"),s()),n=r};return e.addEventListener("scroll",r),()=>e.removeEventListener("scroll",r)}},[o.viewport,a,u,s]),(0,b.createElement)(T.z,{present:r||"hidden"!==l},(0,b.createElement)(lJ,(0,w.Z)({"data-state":"hidden"===l?"hidden":"visible"},i,{ref:t,onPointerEnter:(0,_.M)(e.onPointerEnter,()=>u("POINTER_ENTER")),onPointerLeave:(0,_.M)(e.onPointerLeave,()=>u("POINTER_LEAVE"))})))}),lX=(0,b.forwardRef)((e,t)=>{let n=lU(l$,e.__scopeScrollArea),{forceMount:r,...i}=e,[o,a]=(0,b.useState)(!1),s="horizontal"===e.orientation,l=ua(()=>{if(n.viewport){let e=n.viewport.offsetWidth{let{orientation:n="vertical",...r}=e,i=lU(l$,e.__scopeScrollArea),o=(0,b.useRef)(null),a=(0,b.useRef)(0),[s,l]=(0,b.useState)({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=ut(s.viewport,s.content),c={...r,sizes:s,onSizesChange:l,hasThumb:!!(u>0&&u<1),onThumbChange:e=>o.current=e,onThumbPointerUp:()=>a.current=0,onThumbPointerDown:e=>a.current=e};function d(e,t){return function(e,t,n,r="ltr"){let i=un(n),o=t||i/2,a=n.scrollbar.paddingStart+o,s=n.scrollbar.size-n.scrollbar.paddingEnd-(i-o),l=n.content-n.viewport,u=ui([a,s],"ltr"===r?[0,l]:[-1*l,0]);return u(e)}(e,a.current,s,t)}return"horizontal"===n?(0,b.createElement)(lQ,(0,w.Z)({},c,{ref:t,onThumbPositionChange:()=>{if(i.viewport&&o.current){let e=i.viewport.scrollLeft,t=ur(e,s,i.dir);o.current.style.transform=`translate3d(${t}px, 0, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollLeft=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollLeft=d(e,i.dir))}})):"vertical"===n?(0,b.createElement)(l0,(0,w.Z)({},c,{ref:t,onThumbPositionChange:()=>{if(i.viewport&&o.current){let e=i.viewport.scrollTop,t=ur(e,s);o.current.style.transform=`translate3d(0, ${t}px, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollTop=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollTop=d(e))}})):null}),lQ=(0,b.forwardRef)((e,t)=>{let{sizes:n,onSizesChange:r,...i}=e,o=lU(l$,e.__scopeScrollArea),[a,s]=(0,b.useState)(),l=(0,b.useRef)(null),u=(0,E.e)(t,l,o.onScrollbarXChange);return(0,b.useEffect)(()=>{l.current&&s(getComputedStyle(l.current))},[l]),(0,b.createElement)(l4,(0,w.Z)({"data-orientation":"horizontal"},i,{ref:u,sizes:n,style:{bottom:0,left:"rtl"===o.dir?"var(--radix-scroll-area-corner-width)":0,right:"ltr"===o.dir?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":un(n)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,n)=>{if(o.viewport){let r=o.viewport.scrollLeft+t.deltaX;e.onWheelScroll(r),r>0&&r{l.current&&o.viewport&&a&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:ue(a.paddingLeft),paddingEnd:ue(a.paddingRight)}})}}))}),l0=(0,b.forwardRef)((e,t)=>{let{sizes:n,onSizesChange:r,...i}=e,o=lU(l$,e.__scopeScrollArea),[a,s]=(0,b.useState)(),l=(0,b.useRef)(null),u=(0,E.e)(t,l,o.onScrollbarYChange);return(0,b.useEffect)(()=>{l.current&&s(getComputedStyle(l.current))},[l]),(0,b.createElement)(l4,(0,w.Z)({"data-orientation":"vertical"},i,{ref:u,sizes:n,style:{top:0,right:"ltr"===o.dir?0:void 0,left:"rtl"===o.dir?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":un(n)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,n)=>{if(o.viewport){let r=o.viewport.scrollTop+t.deltaY;e.onWheelScroll(r),r>0&&r{l.current&&o.viewport&&a&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:ue(a.paddingTop),paddingEnd:ue(a.paddingBottom)}})}}))}),[l1,l2]=lZ(l$),l4=(0,b.forwardRef)((e,t)=>{let{__scopeScrollArea:n,sizes:r,hasThumb:i,onThumbChange:o,onThumbPointerUp:a,onThumbPointerDown:s,onThumbPositionChange:l,onDragScroll:u,onWheelScroll:c,onResize:d,...f}=e,h=lU(l$,n),[p,m]=(0,b.useState)(null),v=(0,E.e)(t,e=>m(e)),g=(0,b.useRef)(null),y=(0,b.useRef)(""),x=h.viewport,j=r.content-r.viewport,k=(0,ly.W)(c),S=(0,ly.W)(l),C=ua(d,10);function M(e){if(g.current){let t=e.clientX-g.current.left,n=e.clientY-g.current.top;u({x:t,y:n})}}return(0,b.useEffect)(()=>{let e=e=>{let t=e.target,n=null==p?void 0:p.contains(t);n&&k(e,j)};return document.addEventListener("wheel",e,{passive:!1}),()=>document.removeEventListener("wheel",e,{passive:!1})},[x,p,j,k]),(0,b.useEffect)(S,[r,S]),us(p,C),us(h.content,C),(0,b.createElement)(l1,{scope:n,scrollbar:p,hasThumb:i,onThumbChange:(0,ly.W)(o),onThumbPointerUp:(0,ly.W)(a),onThumbPositionChange:S,onThumbPointerDown:(0,ly.W)(s)},(0,b.createElement)(O.WV.div,(0,w.Z)({},f,{ref:v,style:{position:"absolute",...f.style},onPointerDown:(0,_.M)(e.onPointerDown,e=>{if(0===e.button){let t=e.target;t.setPointerCapture(e.pointerId),g.current=p.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",M(e)}}),onPointerMove:(0,_.M)(e.onPointerMove,M),onPointerUp:(0,_.M)(e.onPointerUp,e=>{let t=e.target;t.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=y.current,g.current=null})})))}),l3="ScrollAreaThumb",l5=(0,b.forwardRef)((e,t)=>{let{forceMount:n,...r}=e,i=l2(l3,e.__scopeScrollArea);return(0,b.createElement)(T.z,{present:n||i.hasThumb},(0,b.createElement)(l6,(0,w.Z)({ref:t},r)))}),l6=(0,b.forwardRef)((e,t)=>{let{__scopeScrollArea:n,style:r,...i}=e,o=lU(l3,n),a=l2(l3,n),{onThumbPositionChange:s}=a,l=(0,E.e)(t,e=>a.onThumbChange(e)),u=(0,b.useRef)(),c=ua(()=>{u.current&&(u.current(),u.current=void 0)},100);return(0,b.useEffect)(()=>{let e=o.viewport;if(e){let t=()=>{if(c(),!u.current){let t=uo(e,s);u.current=t,s()}};return s(),e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)}},[o.viewport,c,s]),(0,b.createElement)(O.WV.div,(0,w.Z)({"data-state":a.hasThumb?"visible":"hidden"},i,{ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:(0,_.M)(e.onPointerDownCapture,e=>{let t=e.target,n=t.getBoundingClientRect(),r=e.clientX-n.left,i=e.clientY-n.top;a.onThumbPointerDown({x:r,y:i})}),onPointerUp:(0,_.M)(e.onPointerUp,a.onThumbPointerUp)}))}),l8="ScrollAreaCorner",l7=(0,b.forwardRef)((e,t)=>{let n=lU(l8,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY),i="scroll"!==n.type&&r;return i?(0,b.createElement)(l9,(0,w.Z)({},e,{ref:t})):null}),l9=(0,b.forwardRef)((e,t)=>{let{__scopeScrollArea:n,...r}=e,i=lU(l8,n),[o,a]=(0,b.useState)(0),[s,l]=(0,b.useState)(0);return us(i.scrollbarX,()=>{var e;let t=(null===(e=i.scrollbarX)||void 0===e?void 0:e.offsetHeight)||0;i.onCornerHeightChange(t),l(t)}),us(i.scrollbarY,()=>{var e;let t=(null===(e=i.scrollbarY)||void 0===e?void 0:e.offsetWidth)||0;i.onCornerWidthChange(t),a(t)}),o&&s?(0,b.createElement)(O.WV.div,(0,w.Z)({},r,{ref:t,style:{width:o,height:s,position:"absolute",right:"ltr"===i.dir?0:void 0,left:"rtl"===i.dir?0:void 0,bottom:0,...e.style}})):null});function ue(e){return e?parseInt(e,10):0}function ut(e,t){let n=e/t;return isNaN(n)?0:n}function un(e){let t=ut(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function ur(e,t,n="ltr"){let r=un(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-i,a=t.content-t.viewport,s="ltr"===n?[0,a]:[-1*a,0],l=function(e,[t,n]){return Math.min(n,Math.max(t,e))}(e,s),u=ui([0,a],[0,o-r]);return u(l)}function ui(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}let uo=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return!function i(){let o={left:e.scrollLeft,top:e.scrollTop},a=n.left!==o.left,s=n.top!==o.top;(a||s)&&t(),n=o,r=window.requestAnimationFrame(i)}(),()=>window.cancelAnimationFrame(r)};function ua(e,t){let n=(0,ly.W)(e),r=(0,b.useRef)(0);return(0,b.useEffect)(()=>()=>window.clearTimeout(r.current),[]),(0,b.useCallback)(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function us(e,t){let n=(0,ly.W)(t);(0,M.b)(()=>{let t=0;if(e){let r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e,n])}let ul=b.forwardRef((e,t)=>{let{id:n,className:r,style:i,children:o,keyToResetScrollbars:a}=e;return(0,y.jsxs)(lW,{className:(0,em.cx)("w-full h-full overflow-hidden",r),style:i,children:[(0,y.jsx)(lq,{id:n,ref:t,className:"w-full h-full [&>div]:!block [&>div]:!h-full",children:o}),(0,y.jsx)(lK,{orientation:"vertical",className:"z-10 flex select-none touch-none transition-colors hover:bg-black/20 w-1.5 m-px",children:(0,y.jsx)(l5,{className:(0,em.cx)("flex-1 relative bg-gray-300 rounded",'before:content[""] before:absolute before:top-1/2 before:left-1/2 -translate-x-1/2 -translate-y-1/2 w-full h-full')})},a?"v-".concat(a):void 0),(0,y.jsx)(lK,{orientation:"horizontal",className:"z-10 flex flex-col select-none touch-none transition-colors duration-1000 hover:bg-black/20 h-1 m-px",children:(0,y.jsx)(l5,{className:(0,em.cx)("flex-1 relative bg-gray-300 rounded",'before:content[""] before:absolute before:top-1/2 before:left-1/2 -translate-x-1/2 -translate-y-1/2 w-full h-full')})},a?"h-".concat(a):void 0),(0,y.jsx)(l7,{className:"bg-black/70"})]})}),uu=(0,em.j)([lo,"z-20","overflow-hidden"],{variants:{variant:{default:"flex items-center justify-center w-full h-full",none:""}},defaultVariants:{variant:"default"}}),uc={show:{scale:[.95,1],transition:{duration:.1,ease:"easeOut"}},exit:{opacity:[1,0],scale:[1,.95],transition:{duration:.1,ease:"easeIn"}}},ud=b.forwardRef((e,t)=>{let{trigger:n,rootProps:r,open:i,onOpenChange:o,onSubmit:a,title:s,description:l,containerVariants:u,contentVariants:c,controls:d,children:f,bodyClassName:h,closeClassName:p,dynamicHeight:m=!0}=e,{open:v,onOpenChange:g}=le({open:i,onOpenChange:o});return(0,y.jsxs)(lF.fC,{open:v,onOpenChange:g,...r,children:[n&&(0,y.jsx)(lF.xz,{asChild:!0,children:n}),(0,y.jsx)(nC,{children:v?(0,y.jsx)(lF.h_,{forceMount:!0,children:(0,y.jsx)(lF.VY,{asChild:!0,forceMount:!0,ref:t,children:(0,y.jsxs)("div",{className:"fixed w-full h-full top-0 left-0 z-20",children:[(0,y.jsx)(lF.aV,{onClick:()=>g(!1),className:"fixed z-10 top-0 right-0 bottom-0 left-0 inset-0 transition-opacity opacity-0 open:opacity-10 dark:open:opacity-20 bg-black"}),(0,y.jsx)(s9.div,{variants:uc,initial:"init",animate:"show",exit:"exit",className:uu(u),children:(0,y.jsx)(up,{title:s,description:l,contentVariants:c,onSubmit:a,controls:d,bodyClassName:h,closeClassName:p,dynamicHeight:m,children:f})})]})})}):null})]})});function uf(e){let{className:t}=e;return(0,y.jsx)(lF.x8,{asChild:!0,type:"button",children:(0,y.jsx)("div",{className:(0,em.cx)("appearance-none",t),children:(0,y.jsx)(lu,{size:"small",variant:"ghost",type:"button",children:(0,y.jsx)(lc.QN4,{})})})})}let uh=(0,em.j)(["relative","z-40","overflow-hidden"],{variants:{variant:{default:[t4()],none:""}},defaultVariants:{variant:"default"}}),up=b.forwardRef((e,t)=>{let{children:n,onSubmit:r,title:i,description:o,controls:a,contentVariants:s,closeClassName:l,bodyClassName:u,dynamicHeight:c=!0}=e,{ref:d,height:f}=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],[t,n]=(0,b.useState)(0),r=(0,b.useRef)(null);return(0,b.useLayoutEffect)(()=>{if(!r.current)return;let e=r.current,t=()=>n(e.clientHeight);t(),r.current.addEventListener("resize",t);let i=new ResizeObserver(t);return i.observe(e),()=>{e.removeEventListener("resize",t),i.unobserve(e)}},e),{ref:r,height:t}}([n,o]),[h,p]=(0,b.useState)(!1);return(0,b.useEffect)(()=>{p(f>.7*window.innerHeight)},[f]),(0,y.jsxs)(r?"form":"div",{onSubmit:r,ref:t,className:uh(s),children:[i&&(0,y.jsx)(lF.Dx,{className:um({showSeparator:h}),children:i}),(0,y.jsx)(ul,{style:{height:c?"".concat(f,"px"):void 0,maxHeight:c?"70vh":void 0},children:(0,y.jsxs)("div",{ref:d,className:(0,em.cx)("p-4",u),children:[o&&(0,y.jsx)(lF.dk,{className:uv(),children:o}),n]})}),a&&(0,y.jsx)(ug,{separator:h,children:a}),(0,y.jsx)(uf,{className:l||"absolute top-3.5 right-2"})]})}),um=(0,em.j)(["pt-4 pb-2 px-4 w-full",t0({size:"20",weight:"semibold",font:"sans",color:"contrast"})],{variants:{showSeparator:{true:"border-b border-gray-200 dark:border-graydark-200"}}}),uv=(0,em.j)([t0({color:"subtle",size:"14"}),"py-2"]);function ug(e){let{children:t,separator:n=!0}=e;return(0,y.jsx)("div",{className:(0,em.cx)("py-2 mx-3",n?"border-t border-gray-200 dark:border-graydark-200":""),children:t})}var uy=n(55070),ub=n(77334);let ux="rovingFocusGroup.onEntryFocus",uw={bubbles:!1,cancelable:!0},uj="RovingFocusGroup",[uE,uk,uS]=S(uj),[u_,uC]=(0,j.b)(uj,[uS]),[uO,uM]=u_(uj),uT=(0,b.forwardRef)((e,t)=>(0,b.createElement)(uE.Provider,{scope:e.__scopeRovingFocusGroup},(0,b.createElement)(uE.Slot,{scope:e.__scopeRovingFocusGroup},(0,b.createElement)(uA,(0,w.Z)({},e,{ref:t}))))),uA=(0,b.forwardRef)((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,...c}=e,d=(0,b.useRef)(null),f=(0,E.e)(t,d),h=lV(o),[p=null,m]=(0,C.T)({prop:a,defaultProp:s,onChange:l}),[v,g]=(0,b.useState)(!1),y=(0,ly.W)(u),x=uk(n),j=(0,b.useRef)(!1);return(0,b.useEffect)(()=>{let e=d.current;if(e)return e.addEventListener(ux,y),()=>e.removeEventListener(ux,y)},[y]),(0,b.createElement)(uO,{scope:n,orientation:r,dir:h,loop:i,currentTabStopId:p,onItemFocus:(0,b.useCallback)(e=>m(e),[m]),onItemShiftTab:(0,b.useCallback)(()=>g(!0),[])},(0,b.createElement)(O.WV.div,(0,w.Z)({tabIndex:v?-1:0,"data-orientation":r},c,{ref:f,style:{outline:"none",...e.style},onMouseDown:(0,_.M)(e.onMouseDown,()=>{j.current=!0}),onFocus:(0,_.M)(e.onFocus,e=>{let t=!j.current;if(e.target===e.currentTarget&&t&&!v){let t=new CustomEvent(ux,uw);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=x().filter(e=>e.focusable),t=e.find(e=>e.active),n=e.find(e=>e.id===p),r=[t,n,...e].filter(Boolean),i=r.map(e=>e.ref.current);uR(i)}}j.current=!1}),onBlur:(0,_.M)(e.onBlur,()=>g(!1))})))}),uP=(0,b.forwardRef)((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,...o}=e,a=(0,A.M)(),s=uM("RovingFocusGroupItem",n),l=s.currentTabStopId===a,u=uk(n);return(0,b.createElement)(uE.ItemSlot,{scope:n,id:a,focusable:r,active:i},(0,b.createElement)(O.WV.span,(0,w.Z)({tabIndex:l?0:-1,"data-orientation":s.orientation},o,{ref:t,onMouseDown:(0,_.M)(e.onMouseDown,e=>{r?s.onItemFocus(a):e.preventDefault()}),onFocus:(0,_.M)(e.onFocus,()=>s.onItemFocus(a)),onKeyDown:(0,_.M)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey){s.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=function(e,t,n){var r;let i=(r=e.key,"rtl"!==n?r:"ArrowLeft"===r?"ArrowRight":"ArrowRight"===r?"ArrowLeft":r);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(i))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(i)))return uN[i]}(e,s.orientation,s.dir);if(void 0!==t){e.preventDefault();let i=u().filter(e=>e.focusable),o=i.map(e=>e.ref.current);if("last"===t)o.reverse();else if("prev"===t||"next"===t){var n,r;"prev"===t&&o.reverse();let i=o.indexOf(e.currentTarget);o=s.loop?(n=o,r=i+1,n.map((e,t)=>n[(r+t)%n.length])):o.slice(i+1)}setTimeout(()=>uR(o))}})})))}),uN={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function uR(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}var uD=n(49732),uL=n(70506);let uF=["Enter"," "],uz=["ArrowUp","PageDown","End"],uV=["ArrowDown","PageUp","Home",...uz],uI={ltr:[...uF,"ArrowRight"],rtl:[...uF,"ArrowLeft"]},uZ={ltr:["ArrowLeft"],rtl:["ArrowRight"]},uB="Menu",[uH,uU,uW]=S(uB),[uq,u$]=(0,j.b)(uB,[uW,th,uC]),uK=th(),uY=uC(),[uG,uX]=uq(uB),[uJ,uQ]=uq(uB),u0=(0,b.forwardRef)((e,t)=>{let{__scopeMenu:n,...r}=e,i=uK(n);return(0,b.createElement)(tv,(0,w.Z)({},i,r,{ref:t}))}),u1="MenuPortal",[u2,u4]=uq(u1,{forceMount:void 0}),u3="MenuContent",[u5,u6]=uq(u3),u8=(0,b.forwardRef)((e,t)=>{let n=u4(u3,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=uX(u3,e.__scopeMenu),a=uQ(u3,e.__scopeMenu);return(0,b.createElement)(uH.Provider,{scope:e.__scopeMenu},(0,b.createElement)(T.z,{present:r||o.open},(0,b.createElement)(uH.Slot,{scope:e.__scopeMenu},a.modal?(0,b.createElement)(u7,(0,w.Z)({},i,{ref:t})):(0,b.createElement)(u9,(0,w.Z)({},i,{ref:t})))))}),u7=(0,b.forwardRef)((e,t)=>{let n=uX(u3,e.__scopeMenu),r=(0,b.useRef)(null),i=(0,E.e)(t,r);return(0,b.useEffect)(()=>{let e=r.current;if(e)return(0,uD.R)(e)},[]),(0,b.createElement)(ce,(0,w.Z)({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:(0,_.M)(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),u9=(0,b.forwardRef)((e,t)=>{let n=uX(u3,e.__scopeMenu);return(0,b.createElement)(ce,(0,w.Z)({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),ce=(0,b.forwardRef)((e,t)=>{let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:c,onInteractOutside:d,onDismiss:f,disableOutsideScroll:h,...p}=e,m=uX(u3,n),v=uQ(u3,n),g=uK(n),y=uY(n),x=uU(n),[j,S]=(0,b.useState)(null),C=(0,b.useRef)(null),O=(0,E.e)(t,C,m.onContentChange),M=(0,b.useRef)(0),T=(0,b.useRef)(""),A=(0,b.useRef)(0),P=(0,b.useRef)(null),N=(0,b.useRef)("right"),R=(0,b.useRef)(0),D=h?uL.Z:b.Fragment,L=h?{as:k.g7,allowPinchZoom:!0}:void 0,F=e=>{var t,n;let r=T.current+e,i=x().filter(e=>!e.disabled),o=document.activeElement,a=null===(t=i.find(e=>e.ref.current===o))||void 0===t?void 0:t.textValue,s=i.map(e=>e.textValue),l=function(e,t,n){var r;let i=t.length>1&&Array.from(t).every(e=>e===t[0]),o=i?t[0]:t,a=n?e.indexOf(n):-1,s=(r=Math.max(a,0),e.map((t,n)=>e[(r+n)%e.length])),l=1===o.length;l&&(s=s.filter(e=>e!==n));let u=s.find(e=>e.toLowerCase().startsWith(o.toLowerCase()));return u!==n?u:void 0}(s,r,a),u=null===(n=i.find(e=>e.textValue===l))||void 0===n?void 0:n.ref.current;!function e(t){T.current=t,window.clearTimeout(M.current),""!==t&&(M.current=window.setTimeout(()=>e(""),1e3))}(r),u&&setTimeout(()=>u.focus())};(0,b.useEffect)(()=>()=>window.clearTimeout(M.current),[]),(0,uy.EW)();let z=(0,b.useCallback)(e=>{var t,n;let r=N.current===(null===(t=P.current)||void 0===t?void 0:t.side);return r&&function(e,t){if(!t)return!1;let n={x:e.clientX,y:e.clientY};return function(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,o=t.length-1;er!=u>r&&n<(l-a)*(r-s)/(u-s)+a;c&&(i=!i)}return i}(n,t)}(e,null===(n=P.current)||void 0===n?void 0:n.area)},[]);return(0,b.createElement)(u5,{scope:n,searchRef:T,onItemEnter:(0,b.useCallback)(e=>{z(e)&&e.preventDefault()},[z]),onItemLeave:(0,b.useCallback)(e=>{var t;z(e)||(null===(t=C.current)||void 0===t||t.focus(),S(null))},[z]),onTriggerLeave:(0,b.useCallback)(e=>{z(e)&&e.preventDefault()},[z]),pointerGraceTimerRef:A,onPointerGraceIntentChange:(0,b.useCallback)(e=>{P.current=e},[])},(0,b.createElement)(D,L,(0,b.createElement)(ub.M,{asChild:!0,trapped:i,onMountAutoFocus:(0,_.M)(o,e=>{var t;e.preventDefault(),null===(t=C.current)||void 0===t||t.focus()}),onUnmountAutoFocus:a},(0,b.createElement)(ev.XB,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:c,onInteractOutside:d,onDismiss:f},(0,b.createElement)(uT,(0,w.Z)({asChild:!0},y,{dir:v.dir,orientation:"vertical",loop:r,currentTabStopId:j,onCurrentTabStopIdChange:S,onEntryFocus:e=>{v.isUsingKeyboardRef.current||e.preventDefault()}}),(0,b.createElement)(tj,(0,w.Z)({role:"menu","aria-orientation":"vertical","data-state":cm(m.open),dir:v.dir},g,p,{ref:O,style:{outline:"none",...p.style},onKeyDown:(0,_.M)(p.onKeyDown,e=>{let t=e.target,n=t.closest('[role="menu"]')===e.currentTarget,r=e.ctrlKey||e.altKey||e.metaKey,i=1===e.key.length;n&&("Tab"===e.key&&e.preventDefault(),!r&&i&&F(e.key));let o=C.current;if(e.target!==o||!uV.includes(e.key))return;e.preventDefault();let a=x().filter(e=>!e.disabled),s=a.map(e=>e.ref.current);uz.includes(e.key)&&s.reverse(),function(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}(s)}),onBlur:(0,_.M)(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(M.current),T.current="")}),onPointerMove:(0,_.M)(e.onPointerMove,cg(e=>{let t=e.target,n=R.current!==e.clientX;if(e.currentTarget.contains(t)&&n){let t=e.clientX>R.current?"right":"left";N.current=t,R.current=e.clientX}}))})))))))}),ct=(0,b.forwardRef)((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,b.createElement)(O.WV.div,(0,w.Z)({role:"group"},r,{ref:t}))}),cn=(0,b.forwardRef)((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,b.createElement)(O.WV.div,(0,w.Z)({},r,{ref:t}))}),cr="MenuItem",ci="menu.itemSelect",co=(0,b.forwardRef)((e,t)=>{let{disabled:n=!1,onSelect:r,...i}=e,o=(0,b.useRef)(null),a=uQ(cr,e.__scopeMenu),s=u6(cr,e.__scopeMenu),l=(0,E.e)(t,o),u=(0,b.useRef)(!1);return(0,b.createElement)(ca,(0,w.Z)({},i,{ref:l,disabled:n,onClick:(0,_.M)(e.onClick,()=>{let e=o.current;if(!n&&e){let t=new CustomEvent(ci,{bubbles:!0,cancelable:!0});e.addEventListener(ci,e=>null==r?void 0:r(e),{once:!0}),(0,O.jH)(e,t),t.defaultPrevented?u.current=!1:a.onClose()}}),onPointerDown:t=>{var n;null===(n=e.onPointerDown)||void 0===n||n.call(e,t),u.current=!0},onPointerUp:(0,_.M)(e.onPointerUp,e=>{var t;u.current||null===(t=e.currentTarget)||void 0===t||t.click()}),onKeyDown:(0,_.M)(e.onKeyDown,e=>{let t=""!==s.searchRef.current;!n&&(!t||" "!==e.key)&&uF.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})}))}),ca=(0,b.forwardRef)((e,t)=>{let{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=u6(cr,n),s=uY(n),l=(0,b.useRef)(null),u=(0,E.e)(t,l),[c,d]=(0,b.useState)(!1),[f,h]=(0,b.useState)("");return(0,b.useEffect)(()=>{let e=l.current;if(e){var t;h((null!==(t=e.textContent)&&void 0!==t?t:"").trim())}},[o.children]),(0,b.createElement)(uH.ItemSlot,{scope:n,disabled:r,textValue:null!=i?i:f},(0,b.createElement)(uP,(0,w.Z)({asChild:!0},s,{focusable:!r}),(0,b.createElement)(O.WV.div,(0,w.Z)({role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},o,{ref:u,onPointerMove:(0,_.M)(e.onPointerMove,cg(e=>{if(r)a.onItemLeave(e);else if(a.onItemEnter(e),!e.defaultPrevented){let t=e.currentTarget;t.focus()}})),onPointerLeave:(0,_.M)(e.onPointerLeave,cg(e=>a.onItemLeave(e))),onFocus:(0,_.M)(e.onFocus,()=>d(!0)),onBlur:(0,_.M)(e.onBlur,()=>d(!1))}))))}),[cs,cl]=((e,t)=>{let{checked:n=!1,onCheckedChange:r,...i}=e;return(0,b.createElement)(cc,{scope:e.__scopeMenu,checked:n},(0,b.createElement)(co,(0,w.Z)({role:"menuitemcheckbox","aria-checked":n},i,{ref:t,"data-state":cv(n),onSelect:(0,_.M)(i.onSelect,()=>null==r?void 0:r(!n),{checkForDefaultPrevented:!1})})))},uq("MenuRadioGroup",{value:void 0,onValueChange:()=>{}})),cu=((e,t)=>{let{value:n,onValueChange:r,...i}=e,o=(0,ly.W)(r);return(0,b.createElement)(cs,{scope:e.__scopeMenu,value:n,onValueChange:o},(0,b.createElement)(ct,(0,w.Z)({},i,{ref:t})))},"MenuItemIndicator"),[cc,cd]=uq(cu,{checked:!1}),[cf,ch]=((e,t)=>{let{__scopeMenu:n,forceMount:r,...i}=e,o=cd(cu,n);return(0,b.createElement)(T.z,{present:r||o.checked},(0,b.createElement)(O.WV.span,(0,w.Z)({},i,{ref:t,"data-state":cv(o.checked)})))},uq("MenuSub")),cp="MenuSubTrigger";function cm(e){return e?"open":"closed"}function cv(e){return e?"checked":"unchecked"}function cg(e){return t=>"mouse"===t.pointerType?e(t):void 0}(e,t)=>{let n=uX(cp,e.__scopeMenu),r=uQ(cp,e.__scopeMenu),i=ch(cp,e.__scopeMenu),o=u6(cp,e.__scopeMenu),a=(0,b.useRef)(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:l}=o,u={__scopeMenu:e.__scopeMenu},c=(0,b.useCallback)(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return(0,b.useEffect)(()=>c,[c]),(0,b.useEffect)(()=>{let e=s.current;return()=>{window.clearTimeout(e),l(null)}},[s,l]),(0,b.createElement)(u0,(0,w.Z)({asChild:!0},u),(0,b.createElement)(ca,(0,w.Z)({id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":cm(n.open)},e,{ref:(0,E.F)(t,i.onTriggerChange),onClick:t=>{var r;null===(r=e.onClick)||void 0===r||r.call(e,t),e.disabled||t.defaultPrevented||(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:(0,_.M)(e.onPointerMove,cg(t=>{o.onItemEnter(t),t.defaultPrevented||e.disabled||n.open||a.current||(o.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),c()},100))})),onPointerLeave:(0,_.M)(e.onPointerLeave,cg(e=>{var t,r;c();let i=null===(t=n.content)||void 0===t?void 0:t.getBoundingClientRect();if(i){let t=null===(r=n.content)||void 0===r?void 0:r.dataset.side,a="right"===t,l=i[a?"left":"right"],u=i[a?"right":"left"];o.onPointerGraceIntentChange({area:[{x:e.clientX+(a?-5:5),y:e.clientY},{x:l,y:i.top},{x:u,y:i.top},{x:u,y:i.bottom},{x:l,y:i.bottom}],side:t}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(e),e.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:(0,_.M)(e.onKeyDown,t=>{let i=""!==o.searchRef.current;if(!e.disabled&&(!i||" "!==t.key)&&uI[r.dir].includes(t.key)){var a;n.onOpenChange(!0),null===(a=n.content)||void 0===a||a.focus(),t.preventDefault()}})})))},(e,t)=>{let n=u4(u3,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=uX(u3,e.__scopeMenu),a=uQ(u3,e.__scopeMenu),s=ch("MenuSubContent",e.__scopeMenu),l=(0,b.useRef)(null),u=(0,E.e)(t,l);return(0,b.createElement)(uH.Provider,{scope:e.__scopeMenu},(0,b.createElement)(T.z,{present:r||o.open},(0,b.createElement)(uH.Slot,{scope:e.__scopeMenu},(0,b.createElement)(ce,(0,w.Z)({id:s.contentId,"aria-labelledby":s.triggerId},i,{ref:u,align:"start",side:"rtl"===a.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{var t;a.isUsingKeyboardRef.current&&(null===(t=l.current)||void 0===t||t.focus()),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:(0,_.M)(e.onFocusOutside,e=>{e.target!==s.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:(0,_.M)(e.onEscapeKeyDown,a.onClose),onKeyDown:(0,_.M)(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=uZ[a.dir].includes(e.key);if(t&&n){var r;o.onOpenChange(!1),null===(r=s.trigger)||void 0===r||r.focus(),e.preventDefault()}})})))))};let cy=e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,s=uK(t),[l,u]=(0,b.useState)(null),c=(0,b.useRef)(!1),d=(0,ly.W)(o),f=lV(i);return(0,b.useEffect)(()=>{let e=()=>{c.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>c.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",t,{capture:!0}),document.removeEventListener("pointermove",t,{capture:!0})}},[]),(0,b.createElement)(tM,s,(0,b.createElement)(uG,{scope:t,open:n,onOpenChange:d,content:l,onContentChange:u},(0,b.createElement)(uJ,{scope:t,onClose:(0,b.useCallback)(()=>d(!1),[d]),isUsingKeyboardRef:c,dir:f,modal:a},r)))},cb=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,o=uX(u1,t);return(0,b.createElement)(u2,{scope:t,forceMount:n},(0,b.createElement)(T.z,{present:n||o.open},(0,b.createElement)(tT.h,{asChild:!0,container:i},r)))},cx="DropdownMenu",[cw,cj]=(0,j.b)(cx,[u$]),cE=u$(),[ck,cS]=cw(cx),c_=(0,b.forwardRef)((e,t)=>{let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,o=cS("DropdownMenuTrigger",n),a=cE(n);return(0,b.createElement)(u0,(0,w.Z)({asChild:!0},a),(0,b.createElement)(O.WV.button,(0,w.Z)({type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":!!o.open||void 0,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,disabled:r},i,{ref:(0,E.F)(t,o.triggerRef),onPointerDown:(0,_.M)(e.onPointerDown,e=>{r||0!==e.button||!1!==e.ctrlKey||(o.onOpenToggle(),o.open||e.preventDefault())}),onKeyDown:(0,_.M)(e.onKeyDown,e=>{!r&&(["Enter"," "].includes(e.key)&&o.onOpenToggle(),"ArrowDown"===e.key&&o.onOpenChange(!0),[" ","ArrowDown"].includes(e.key)&&e.preventDefault())})})))}),cC=(0,b.forwardRef)((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=cS("DropdownMenuContent",n),o=cE(n),a=(0,b.useRef)(!1);return(0,b.createElement)(u8,(0,w.Z)({id:i.contentId,"aria-labelledby":i.triggerId},o,r,{ref:t,onCloseAutoFocus:(0,_.M)(e.onCloseAutoFocus,e=>{var t;a.current||null===(t=i.triggerRef.current)||void 0===t||t.focus(),a.current=!1,e.preventDefault()}),onInteractOutside:(0,_.M)(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;(!i.modal||r)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)"}}))}),cO=(0,b.forwardRef)((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=cE(n);return(0,b.createElement)(cn,(0,w.Z)({},i,r,{ref:t}))}),cM=(0,b.forwardRef)((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=cE(n);return(0,b.createElement)(co,(0,w.Z)({},i,r,{ref:t}))}),cT=e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:o,onOpenChange:a,modal:s=!0}=e,l=cE(t),u=(0,b.useRef)(null),[c=!1,d]=(0,C.T)({prop:i,defaultProp:o,onChange:a});return(0,b.createElement)(ck,{scope:t,triggerId:(0,A.M)(),triggerRef:u,contentId:(0,A.M)(),open:c,onOpenChange:d,onOpenToggle:(0,b.useCallback)(()=>d(e=>!e),[d]),modal:s},(0,b.createElement)(cy,(0,w.Z)({},l,{open:c,onOpenChange:d,dir:r,modal:s}),n))},cA=e=>{let{__scopeDropdownMenu:t,...n}=e,r=cE(t);return(0,b.createElement)(cb,(0,w.Z)({},r,n))},cP="horizontal",cN=["horizontal","vertical"],cR=(0,b.forwardRef)((e,t)=>{let{decorative:n,orientation:r=cP,...i}=e,o=cD(r)?r:cP;return(0,b.createElement)(O.WV.div,(0,w.Z)({"data-orientation":o},n?{role:"none"}:{"aria-orientation":"vertical"===o?o:void 0,role:"separator"},i,{ref:t}))});function cD(e){return cN.includes(e)}cR.propTypes={orientation(e,t,n){let r=e[t],i=String(r);return r&&!cD(r)?Error(`Invalid prop \`orientation\` of value \`${i}\` supplied to \`${n}\`, expected one of: - horizontal - vertical -Defaulting to \`${cg}\`.`):null}};let cw=(0,eo.j)(["m-0 flex-shrink-0 cursor-default"],{variants:{variant:{vertical:"border-r",horizontal:"border-b"},color:{subtle:"border-gray-300 dark:border-graydark-300",verySubtle:"border-gray-100 dark:border-graydark-100",panel:"border-gray-100 dark:border-graydark-400/50"}},defaultVariants:{variant:"horizontal",color:"subtle"}}),cj=b.forwardRef((e,t)=>{let{variant:n,color:r,className:i,...o}=e;return(0,y.jsx)(cb,{ref:t,className:cw({variant:n,color:r,className:i}),...o})}),cE=function(){let{className:e,font:t,color:n="subtle",weight:r="medium",size:i="14",scaleSize:o,noWrap:a,ellipsis:s}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,eo.cx)(tU({font:t,color:n,weight:r,size:i,scaleSize:o,noWrap:a,ellipsis:s,className:e}),["relative","flex","items-center","tabular-nums","select-none","whitespace-nowrap","px-1.5","py-1.5"])},ck=function(){let{className:e,font:t,color:n="contrast",weight:r="medium",size:i="14",scaleSize:o,noWrap:a,ellipsis:s}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,eo.cx)(cE({font:t,color:n,weight:r,size:i,scaleSize:o,noWrap:a,ellipsis:s,className:e}),["group","cursor-pointer","rounded-sm","focus:outline-none","focus:text-gray-900","dark:focus:text-white","focus:bg-gray-300","dark:focus:bg-graydark-300","aria-selected:bg-gray-400","aria-selected:dark:bg-graydark-500","data-[disabled]:pointer-events-none","data-[disabled]:text-gray-700","dark:data-[disabled]:text-graydark-700"])},cS=e=>{let{className:t,font:n,color:r="verySubtle",weight:i="medium",size:o="14",scaleSize:a,noWrap:s,ellipsis:l}=e;return tU({font:n,color:r,weight:i,size:o,scaleSize:a,noWrap:s,ellipsis:l,className:t})},c_=e=>(0,eo.cx)(["h-px","my-2","mx-1.5",e]),cC=b.forwardRef((e,t)=>{let{className:n,color:r,...i}=e;return(0,y.jsx)(cj,{ref:t,className:c_(n),...i})}),cO=b.forwardRef((e,t)=>{let{className:n,font:r,color:i,weight:o,size:a="14",scaleSize:s,noWrap:l,ellipsis:u,...c}=e;return(0,y.jsx)("div",{ref:t,className:(0,eo.cx)(cE({className:n,font:r,color:i,weight:o,size:a,scaleSize:s,noWrap:l,ellipsis:u})),...c})}),cM=b.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,y.jsx)("div",{ref:t,className:(0,eo.cx)(["ml-auto","pl-5",n]),...r})}),cT=(0,eo.j)([s5,"relative","max-w-sm","z-30","py-1","data-[side=top]:bottom-1","data-[side=top]:origin-bottom","data-[side=bottom]:top-1","data-[side=bottom]:origin-tip","data-[side=left]:right-1","data-[side=left]:origin-right","data-[side=right]:left-1","data-[side=right]:origin-left"]),cA=e=>(0,eo.cx)(t$(),(0,eo.j)(["max-w-xs","shadow-sm","py-1","px-1"])({className:e})),cP={show:{opacity:[0,1],scale:[.95,1],transition:{duration:.1,ease:"easeOut"}},exit:{opacity:[1,0],scale:[1,.95],transition:{duration:.1,ease:"easeIn"}}},cN=b.forwardRef((e,t)=>{let{trigger:n,children:r,rootProps:i,contentProps:o,className:a,open:s,onOpenChange:l}=e,{open:u,onOpenChange:c}=s0({open:s,onOpenChange:l});return(0,y.jsxs)(cm,{open:u,onOpenChange:c,...i,children:[(0,y.jsx)(cd,{asChild:!0,children:n}),(0,y.jsx)(ng,{children:u?(0,y.jsx)(cv,{forceMount:!0,children:(0,y.jsx)(cf,{asChild:!0,forceMount:!0,ref:t,...o,children:(0,y.jsx)(sQ.div,{variants:cP,initial:"init",animate:"show",exit:"exit",className:cT(),children:(0,y.jsx)("div",{className:cA(a),children:r})})})}):null})]})}),cR=b.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,y.jsx)(cp,{ref:t,className:ck({className:n}),...r})}),cD=b.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,y.jsx)(ch,{ref:t,className:(0,eo.cx)("px-1.5",cS({className:n})),...r})}),cL=b.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,y.jsx)("div",{ref:t,className:(0,eo.cx)(["pr-2","opacity-70 group-hover:opacity-100",n]),...r})});var cF=n(39097),cz=n.n(cF);let cV={20:"h3",24:"h3",32:"h2",40:"h2",64:"h1"},cI={20:"font-semibold text-base md:text-xl",24:"font-bold text-xl md:text-2xl",32:"font-semibold text-2xl md:text-3xl",40:"font-semibold text-3xl md:text-4xl",64:"font-semibold text-4xl md:text-6xl"},cZ=b.forwardRef((e,t)=>{let{size:n="24",className:r,id:i,children:o,anchorLink:a,showAnchor:s,...l}=e,u=cV[n];if(a){let e=i||("string"==typeof o?encodeURI(o.toLowerCase().replace(/ /g,"-")):"");return(0,y.jsxs)("div",{className:(0,eo.cx)("relative flex flex-col gap-6 items-start",r),children:[(0,y.jsx)("div",{id:e,className:"absolute -top-[100px]"}),(0,y.jsxs)(cz(),{href:"#".concat(e),className:"relative group",children:[(0,y.jsx)(tW,{className:"hidden group-hover:block",children:(0,y.jsx)(le.POp,{className:"absolute top-1 -left-7 hidden md:block"})}),(0,y.jsx)(tW,{as:u,...l,ref:t,weight:"none",className:(0,eo.cx)("proportional-nums inline-block",cI[n]),children:o})]})]})}return(0,y.jsx)("div",{className:(0,eo.cx)("flex flex-col gap-6 items-start",r),children:(0,y.jsx)(tW,{as:u,...l,ref:t,weight:"none",className:(0,eo.cx)("proportional-nums inline-block",cI[n],r),children:o})})});var cB=n(96577),cH=n.n(cB);let cU=(0,eo.j)(["rounded"]);function cW(e){let{className:t,...n}=e;return(0,y.jsx)(cH(),{className:cU({className:t}),...n})}let[cq,c$]=(0,j.k)("Label",{id:void 0,controlRef:{current:null}}),cK=(0,b.forwardRef)((e,t)=>{let{htmlFor:n,id:r,...i}=e,o=(0,b.useRef)(null),a=(0,b.useRef)(null),s=(0,E.e)(t,a),l=(0,A.M)(r);return(0,b.useEffect)(()=>{if(n){let e=document.getElementById(n),t=a.current;if(t&&e){let t=()=>e.getAttribute("aria-labelledby"),n=[l,t()].filter(Boolean).join(" ");return e.setAttribute("aria-labelledby",n),o.current=e,()=>{var n;let r=null===(n=t())||void 0===n?void 0:n.replace(l,"");""===r?e.removeAttribute("aria-labelledby"):r&&e.setAttribute("aria-labelledby",r)}}}},[l,n]),(0,b.createElement)(cq,{id:l,controlRef:o},(0,b.createElement)(O.WV.span,(0,w.Z)({role:"label",id:l},i,{ref:s,onMouseDown:t=>{var n;null===(n=e.onMouseDown)||void 0===n||n.call(e,t),!t.defaultPrevented&&t.detail>1&&t.preventDefault()},onClick:t=>{var n;if(null===(n=e.onClick)||void 0===n||n.call(e,t),!o.current||t.defaultPrevented)return;let r=o.current.contains(t.target),i=!0===t.isTrusted;!r&&i&&(o.current.click(),o.current.focus())}})))}),cY=e=>{let t=c$("LabelConsumer"),{controlRef:n}=t;return(0,b.useEffect)(()=>{e&&(n.current=e)},[e,n]),t.id},cG=b.forwardRef((e,t)=>{let{font:n,size:r="14",scaleSize:i,weight:o,color:a="verySubtle",noWrap:s,ellipsis:l,className:u,...c}=e;return(0,y.jsx)(cK,{ref:t,...c,className:cS({font:n,size:r,scaleSize:i,color:a,weight:o,noWrap:s,ellipsis:l,className:u})})}),cX=(0,eo.j)(["cursor-pointer"],{variants:{disabled:{true:"opacity-50 pointer-events-none"},underline:{accent:"underline underline-offset-4 decoration-2 decoration-accentdark-900 dark:decoration-accentdark-900",default:"underline underline-offset-4",hover:"hover:underline underline-offset-4",none:""}},defaultVariants:{disabled:!1,underline:"default"}}),cJ=e=>{let{font:t,size:n,scaleSize:r,color:i,weight:o,noWrap:a,ellipsis:s,underline:l,disabled:u,className:c}=e;return(0,eo.cx)(tU({scaleSize:r,size:n,font:t,color:i,weight:o,noWrap:a,ellipsis:s,underline:l}),cX({disabled:u,underline:l}),c)},cQ=b.forwardRef((e,t)=>{let{href:n,font:r,size:i,scaleSize:o,color:a,weight:s,noWrap:l,ellipsis:u,underline:c,disabled:d,className:f,rel:h,target:p,onClick:m,...v}=e,g=(0,b.useCallback)(e=>{m&&(n||e.preventDefault(),m(e))},[m,n]);return(0,y.jsx)(cz(),{href:n||"#",ref:t,className:cJ({font:r,scaleSize:o,size:i,color:a,weight:s,noWrap:l,ellipsis:u,underline:c,disabled:d,className:f}),...v,onClick:g,rel:h||("_blank"===p?"noopener":void 0),target:p})}),c0=b.forwardRef((e,t)=>{let{href:n,disabled:r,variant:i,size:o,state:a,rounded:s,icon:l,className:u,tip:c,rel:d,target:f,onClick:h,...p}=e,m=d||("_blank"===f?"noopener":void 0),v=(0,b.useCallback)(e=>{h&&(n||e.preventDefault(),h(e))},[h,n]);return c?(0,y.jsx)(s8,{content:c,children:(0,y.jsx)(cz(),{href:n||"#",ref:t,className:s7({variant:i,size:o,state:a,rounded:s,disabled:r,icon:l,className:u}),onClick:v,...p,rel:m,target:f})}):(0,y.jsx)(cz(),{href:n||"#",ref:t,className:s7({variant:i,size:o,state:a,rounded:s,disabled:r,icon:l,className:u}),onClick:v,...p,rel:m,target:f})}),c1={src:"/_next/static/media/logo.0e2362ab.png"};function c2(e){let{size:t=30,className:n}=e;return(0,y.jsx)(cW,{priority:!0,src:"/_next/static/media/logo.0e2362ab.png",alt:"Logo",width:t,height:t,className:n})}let c4="Popover",[c3,c5]=(0,j.b)(c4,[tr]),c6=tr(),[c8,c7]=c3(c4),c9=(0,b.forwardRef)((e,t)=>{let{__scopePopover:n,...r}=e,i=c7("PopoverTrigger",n),o=c6(n),a=(0,E.e)(t,i.triggerRef),s=(0,b.createElement)(O.WV.button,(0,w.Z)({type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":du(i.open)},r,{ref:a,onClick:(0,_.M)(e.onClick,i.onOpenToggle)}));return i.hasCustomAnchor?s:(0,b.createElement)(ta,(0,w.Z)({asChild:!0},o),s)}),de="PopoverPortal",[dt,dn]=c3(de,{forceMount:void 0}),dr="PopoverContent",di=(0,b.forwardRef)((e,t)=>{let n=dn(dr,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,o=c7(dr,e.__scopePopover);return(0,b.createElement)(T.z,{present:r||o.open},o.modal?(0,b.createElement)(da,(0,w.Z)({},i,{ref:t})):(0,b.createElement)(ds,(0,w.Z)({},i,{ref:t})))}),da=(0,b.forwardRef)((e,t)=>{let n=c7(dr,e.__scopePopover),r=(0,b.useRef)(null),i=(0,E.e)(t,r),o=(0,b.useRef)(!1);return(0,b.useEffect)(()=>{let e=r.current;if(e)return(0,ux.R)(e)},[]),(0,b.createElement)(uw.Z,{as:k.g7,allowPinchZoom:!0},(0,b.createElement)(dl,(0,w.Z)({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:(0,_.M)(e.onCloseAutoFocus,e=>{var t;e.preventDefault(),o.current||null===(t=n.triggerRef.current)||void 0===t||t.focus()}),onPointerDownOutside:(0,_.M)(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;o.current=r},{checkForDefaultPrevented:!1}),onFocusOutside:(0,_.M)(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})))}),ds=(0,b.forwardRef)((e,t)=>{let n=c7(dr,e.__scopePopover),r=(0,b.useRef)(!1);return(0,b.createElement)(dl,(0,w.Z)({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var i,o;null===(i=e.onCloseAutoFocus)||void 0===i||i.call(e,t),t.defaultPrevented||(r.current||null===(o=n.triggerRef.current)||void 0===o||o.focus(),t.preventDefault()),r.current=!1},onInteractOutside:t=>{var i,o;null===(i=e.onInteractOutside)||void 0===i||i.call(e,t),t.defaultPrevented||(r.current=!0);let a=t.target,s=null===(o=n.triggerRef.current)||void 0===o?void 0:o.contains(a);s&&t.preventDefault()}}))}),dl=(0,b.forwardRef)((e,t)=>{let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,disableOutsidePointerEvents:a,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:c,...d}=e,f=c7(dr,n),h=c6(n);return(0,ur.EW)(),(0,b.createElement)(ui.M,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o},(0,b.createElement)(ea.XB,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:c,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>f.onOpenChange(!1)},(0,b.createElement)(tf,(0,w.Z)({"data-state":du(f.open),role:"dialog",id:f.contentId},h,d,{ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)"}}))))});function du(e){return e?"open":"closed"}let dc=e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:a=!1}=e,s=c6(t),l=(0,b.useRef)(null),[u,c]=(0,b.useState)(!1),[d=!1,f]=(0,C.T)({prop:r,defaultProp:i,onChange:o});return(0,b.createElement)(tb,s,(0,b.createElement)(c8,{scope:t,contentId:(0,A.M)(),triggerRef:l,open:d,onOpenChange:f,onOpenToggle:(0,b.useCallback)(()=>f(e=>!e),[f]),hasCustomAnchor:u,onCustomAnchorAdd:(0,b.useCallback)(()=>c(!0),[]),onCustomAnchorRemove:(0,b.useCallback)(()=>c(!1),[]),modal:a},n))},dd=e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,o=c7(de,t);return(0,b.createElement)(dt,{scope:t,forceMount:n},(0,b.createElement)(T.z,{present:n||o.open},(0,b.createElement)(tx.h,{asChild:!0,container:i},r)))},df=(0,eo.j)([s5,"relative","z-10","outline-none","max-w-sm","data-[side=top]:bottom-1","data-[side=top]:origin-bottom","data-[side=bottom]:top-1","data-[side=bottom]:origin-top","data-[side=left]:right-1","data-[side=left]:origin-right","data-[side=right]:left-1","data-[side=right]:origin-left"]),dh=(0,eo.cx)(t$(),(0,eo.j)(["py-1","px-1"])()),dp={show:{opacity:[0,1],scale:[.95,1],transition:{duration:.1,ease:"easeOut"}},exit:{opacity:[1,0],scale:[1,.95],transition:{duration:.1,ease:"easeIn"}}},dm=b.forwardRef((e,t)=>{let{trigger:n,children:r,rootProps:i,contentProps:o}=e,{open:a,onOpenChange:s}=s0({open:null==i?void 0:i.open,onOpenChange:null==i?void 0:i.onOpenChange});return(0,y.jsxs)(dc,{open:a,onOpenChange:s,...i,children:[(0,y.jsx)(c9,{asChild:!0,children:n}),(0,y.jsx)(ng,{children:a?(0,y.jsx)(dd,{forceMount:!0,children:(0,y.jsx)(di,{asChild:!0,forceMount:!0,ref:t,...o,children:(0,y.jsx)(sQ.div,{variants:dp,initial:"init",animate:"show",exit:"exit",className:df(),children:(0,y.jsx)(l4,{className:dh,children:r})})})}):null})]})}),dv="Progress",[dg,dy]=(0,j.b)(dv),[db,dx]=dg(dv),dw=(0,b.forwardRef)((e,t)=>{let{__scopeProgress:n,value:r,max:i,getValueLabel:o=dE,...a}=e,s=d_(i)?i:100,l=dC(r,s)?r:null,u=dS(l)?o(l,s):void 0;return(0,b.createElement)(db,{scope:n,value:l,max:s},(0,b.createElement)(O.WV.div,(0,w.Z)({"aria-valuemax":s,"aria-valuemin":0,"aria-valuenow":dS(l)?l:void 0,"aria-valuetext":u,role:"progressbar","data-state":dk(l,s),"data-value":null!=l?l:void 0,"data-max":s},a,{ref:t})))});dw.propTypes={max(e,t,n){let r=e[t],i=String(r);return r&&!d_(r)?Error(`Invalid prop \`max\` of value \`${i}\` supplied to \`${n}\`. Only numbers greater than 0 are valid max values. Defaulting to \`100\`.`):null},value(e,t,n){let r=e[t],i=String(r),o=d_(e.max)?e.max:100;return null==r||dC(r,o)?null:Error(`Invalid prop \`value\` of value \`${i}\` supplied to \`${n}\`. The \`value\` prop must be: +Defaulting to \`${cP}\`.`):null}};let cL=(0,em.j)(["m-0 flex-shrink-0 cursor-default"],{variants:{variant:{vertical:"border-r",horizontal:"border-b"},color:{subtle:"border-gray-300 dark:border-graydark-300",verySubtle:"border-gray-100 dark:border-graydark-100",panel:"border-gray-100 dark:border-graydark-400/50"}},defaultVariants:{variant:"horizontal",color:"subtle"}}),cF=b.forwardRef((e,t)=>{let{variant:n,color:r,className:i,...o}=e;return(0,y.jsx)(cR,{ref:t,className:cL({variant:n,color:r,className:i}),...o})}),cz=function(){let{className:e,font:t,color:n="subtle",weight:r="medium",size:i="14",scaleSize:o,noWrap:a,ellipsis:s}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,em.cx)(t0({font:t,color:n,weight:r,size:i,scaleSize:o,noWrap:a,ellipsis:s,className:e}),["relative","flex","items-center","tabular-nums","select-none","whitespace-nowrap","px-1.5","py-1.5"])},cV=function(){let{className:e,font:t,color:n="contrast",weight:r="medium",size:i="14",scaleSize:o,noWrap:a,ellipsis:s}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,em.cx)(cz({font:t,color:n,weight:r,size:i,scaleSize:o,noWrap:a,ellipsis:s,className:e}),["group","cursor-pointer","rounded-sm","focus:outline-none","focus:text-gray-900","dark:focus:text-white","focus:bg-gray-300","dark:focus:bg-graydark-300","aria-selected:bg-gray-400","aria-selected:dark:bg-graydark-500","data-[disabled]:pointer-events-none","data-[disabled]:text-gray-700","dark:data-[disabled]:text-graydark-700"])},cI=e=>{let{className:t,font:n,color:r="verySubtle",weight:i="medium",size:o="14",scaleSize:a,noWrap:s,ellipsis:l}=e;return t0({font:n,color:r,weight:i,size:o,scaleSize:a,noWrap:s,ellipsis:l,className:t})},cZ=e=>(0,em.cx)(["h-px","my-2","mx-1.5",e]),cB=b.forwardRef((e,t)=>{let{className:n,color:r,...i}=e;return(0,y.jsx)(cF,{ref:t,className:cZ(n),...i})}),cH=b.forwardRef((e,t)=>{let{className:n,font:r,color:i,weight:o,size:a="14",scaleSize:s,noWrap:l,ellipsis:u,...c}=e;return(0,y.jsx)("div",{ref:t,className:(0,em.cx)(cz({className:n,font:r,color:i,weight:o,size:a,scaleSize:s,noWrap:l,ellipsis:u})),...c})}),cU=b.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,y.jsx)("div",{ref:t,className:(0,em.cx)(["ml-auto","pl-5",n]),...r})}),cW=(0,em.j)([lo,"relative","max-w-sm","z-30","py-1","data-[side=top]:bottom-1","data-[side=top]:origin-bottom","data-[side=bottom]:top-1","data-[side=bottom]:origin-tip","data-[side=left]:right-1","data-[side=left]:origin-right","data-[side=right]:left-1","data-[side=right]:origin-left"]),cq=e=>(0,em.cx)(t4(),(0,em.j)(["max-w-xs","shadow-sm","py-1","px-1"])({className:e})),c$={show:{opacity:[0,1],scale:[.95,1],transition:{duration:.1,ease:"easeOut"}},exit:{opacity:[1,0],scale:[1,.95],transition:{duration:.1,ease:"easeIn"}}},cK=b.forwardRef((e,t)=>{let{trigger:n,children:r,rootProps:i,contentProps:o,className:a,open:s,onOpenChange:l}=e,{open:u,onOpenChange:c}=le({open:s,onOpenChange:l});return(0,y.jsxs)(cT,{open:u,onOpenChange:c,...i,children:[(0,y.jsx)(c_,{asChild:!0,children:n}),(0,y.jsx)(nC,{children:u?(0,y.jsx)(cA,{forceMount:!0,children:(0,y.jsx)(cC,{asChild:!0,forceMount:!0,ref:t,...o,children:(0,y.jsx)(s9.div,{variants:c$,initial:"init",animate:"show",exit:"exit",className:cW(),children:(0,y.jsx)("div",{className:cq(a),children:r})})})}):null})]})}),cY=b.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,y.jsx)(cM,{ref:t,className:cV({className:n}),...r})}),cG=b.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,y.jsx)(cO,{ref:t,className:(0,em.cx)("px-1.5",cI({className:n})),...r})}),cX=b.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,y.jsx)("div",{ref:t,className:(0,em.cx)(["pr-2","opacity-70 group-hover:opacity-100",n]),...r})});var cJ=n(39097),cQ=n.n(cJ);let c0={20:"h3",24:"h3",32:"h2",40:"h2",64:"h1"},c1={20:"font-semibold text-base md:text-xl",24:"font-bold text-xl md:text-2xl",32:"font-semibold text-2xl md:text-3xl",40:"font-semibold text-3xl md:text-4xl",64:"font-semibold text-4xl md:text-6xl"},c2=b.forwardRef((e,t)=>{let{size:n="24",className:r,id:i,children:o,anchorLink:a,showAnchor:s,...l}=e,u=c0[n];if(a){let e=i||("string"==typeof o?encodeURI(o.toLowerCase().replace(/ /g,"-")):"");return(0,y.jsxs)("div",{className:(0,em.cx)("relative flex flex-col gap-6 items-start",r),children:[(0,y.jsx)("div",{id:e,className:"absolute -top-[100px]"}),(0,y.jsxs)(cQ(),{href:"#".concat(e),className:"relative group",children:[(0,y.jsx)(t1,{className:"hidden group-hover:block",children:(0,y.jsx)(lc.POp,{className:"absolute top-1 -left-7 hidden md:block"})}),(0,y.jsx)(t1,{as:u,...l,ref:t,weight:"none",className:(0,em.cx)("proportional-nums inline-block",c1[n]),children:o})]})]})}return(0,y.jsx)("div",{className:(0,em.cx)("flex flex-col gap-6 items-start",r),children:(0,y.jsx)(t1,{as:u,...l,ref:t,weight:"none",className:(0,em.cx)("proportional-nums inline-block",c1[n],r),children:o})})});var c4=n(96577),c3=n.n(c4);let c5=(0,em.j)(["rounded"]);function c6(e){let{className:t,...n}=e;return(0,y.jsx)(c3(),{className:c5({className:t}),...n})}let[c8,c7]=(0,j.k)("Label",{id:void 0,controlRef:{current:null}}),c9=(0,b.forwardRef)((e,t)=>{let{htmlFor:n,id:r,...i}=e,o=(0,b.useRef)(null),a=(0,b.useRef)(null),s=(0,E.e)(t,a),l=(0,A.M)(r);return(0,b.useEffect)(()=>{if(n){let e=document.getElementById(n),t=a.current;if(t&&e){let t=()=>e.getAttribute("aria-labelledby"),n=[l,t()].filter(Boolean).join(" ");return e.setAttribute("aria-labelledby",n),o.current=e,()=>{var n;let r=null===(n=t())||void 0===n?void 0:n.replace(l,"");""===r?e.removeAttribute("aria-labelledby"):r&&e.setAttribute("aria-labelledby",r)}}}},[l,n]),(0,b.createElement)(c8,{id:l,controlRef:o},(0,b.createElement)(O.WV.span,(0,w.Z)({role:"label",id:l},i,{ref:s,onMouseDown:t=>{var n;null===(n=e.onMouseDown)||void 0===n||n.call(e,t),!t.defaultPrevented&&t.detail>1&&t.preventDefault()},onClick:t=>{var n;if(null===(n=e.onClick)||void 0===n||n.call(e,t),!o.current||t.defaultPrevented)return;let r=o.current.contains(t.target),i=!0===t.isTrusted;!r&&i&&(o.current.click(),o.current.focus())}})))}),de=e=>{let t=c7("LabelConsumer"),{controlRef:n}=t;return(0,b.useEffect)(()=>{e&&(n.current=e)},[e,n]),t.id},dt=b.forwardRef((e,t)=>{let{font:n,size:r="14",scaleSize:i,weight:o,color:a="verySubtle",noWrap:s,ellipsis:l,className:u,...c}=e;return(0,y.jsx)(c9,{ref:t,...c,className:cI({font:n,size:r,scaleSize:i,color:a,weight:o,noWrap:s,ellipsis:l,className:u})})}),dn=(0,em.j)(["cursor-pointer"],{variants:{disabled:{true:"opacity-50 pointer-events-none"},underline:{accent:"underline underline-offset-4 decoration-2 decoration-accentdark-900 dark:decoration-accentdark-900",default:"underline underline-offset-4",hover:"hover:underline underline-offset-4",none:""}},defaultVariants:{disabled:!1,underline:"default"}}),dr=e=>{let{font:t,size:n,scaleSize:r,color:i,weight:o,noWrap:a,ellipsis:s,underline:l,disabled:u,className:c}=e;return(0,em.cx)(t0({scaleSize:r,size:n,font:t,color:i,weight:o,noWrap:a,ellipsis:s,underline:l}),dn({disabled:u,underline:l}),c)},di=b.forwardRef((e,t)=>{let{href:n,font:r,size:i,scaleSize:o,color:a,weight:s,noWrap:l,ellipsis:u,underline:c,disabled:d,className:f,rel:h,target:p,onClick:m,...v}=e,g=(0,b.useCallback)(e=>{m&&(n||e.preventDefault(),m(e))},[m,n]);return(0,y.jsx)(cQ(),{href:n||"#",ref:t,className:dr({font:r,scaleSize:o,size:i,color:a,weight:s,noWrap:l,ellipsis:u,underline:c,disabled:d,className:f}),...v,onClick:g,rel:h||("_blank"===p?"noopener":void 0),target:p})}),da=b.forwardRef((e,t)=>{let{href:n,disabled:r,variant:i,size:o,state:a,rounded:s,icon:l,className:u,tip:c,rel:d,target:f,onClick:h,...p}=e,m=d||("_blank"===f?"noopener":void 0),v=(0,b.useCallback)(e=>{h&&(n||e.preventDefault(),h(e))},[h,n]);return c?(0,y.jsx)(ls,{content:c,children:(0,y.jsx)(cQ(),{href:n||"#",ref:t,className:ll({variant:i,size:o,state:a,rounded:s,disabled:r,icon:l,className:u}),onClick:v,...p,rel:m,target:f})}):(0,y.jsx)(cQ(),{href:n||"#",ref:t,className:ll({variant:i,size:o,state:a,rounded:s,disabled:r,icon:l,className:u}),onClick:v,...p,rel:m,target:f})}),ds={src:"/_next/static/media/logo.0e2362ab.png"};function dl(e){let{size:t=30,className:n}=e;return(0,y.jsx)(c6,{priority:!0,src:"/_next/static/media/logo.0e2362ab.png",alt:"Logo",width:t,height:t,className:n})}let du="Popover",[dc,dd]=(0,j.b)(du,[th]),df=th(),[dh,dp]=dc(du),dm=(0,b.forwardRef)((e,t)=>{let{__scopePopover:n,...r}=e,i=dp("PopoverTrigger",n),o=df(n),a=(0,E.e)(t,i.triggerRef),s=(0,b.createElement)(O.WV.button,(0,w.Z)({type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":dk(i.open)},r,{ref:a,onClick:(0,_.M)(e.onClick,i.onOpenToggle)}));return i.hasCustomAnchor?s:(0,b.createElement)(tv,(0,w.Z)({asChild:!0},o),s)}),dv="PopoverPortal",[dg,dy]=dc(dv,{forceMount:void 0}),db="PopoverContent",dx=(0,b.forwardRef)((e,t)=>{let n=dy(db,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,o=dp(db,e.__scopePopover);return(0,b.createElement)(T.z,{present:r||o.open},o.modal?(0,b.createElement)(dw,(0,w.Z)({},i,{ref:t})):(0,b.createElement)(dj,(0,w.Z)({},i,{ref:t})))}),dw=(0,b.forwardRef)((e,t)=>{let n=dp(db,e.__scopePopover),r=(0,b.useRef)(null),i=(0,E.e)(t,r),o=(0,b.useRef)(!1);return(0,b.useEffect)(()=>{let e=r.current;if(e)return(0,uD.R)(e)},[]),(0,b.createElement)(uL.Z,{as:k.g7,allowPinchZoom:!0},(0,b.createElement)(dE,(0,w.Z)({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:(0,_.M)(e.onCloseAutoFocus,e=>{var t;e.preventDefault(),o.current||null===(t=n.triggerRef.current)||void 0===t||t.focus()}),onPointerDownOutside:(0,_.M)(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;o.current=r},{checkForDefaultPrevented:!1}),onFocusOutside:(0,_.M)(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})))}),dj=(0,b.forwardRef)((e,t)=>{let n=dp(db,e.__scopePopover),r=(0,b.useRef)(!1);return(0,b.createElement)(dE,(0,w.Z)({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var i,o;null===(i=e.onCloseAutoFocus)||void 0===i||i.call(e,t),t.defaultPrevented||(r.current||null===(o=n.triggerRef.current)||void 0===o||o.focus(),t.preventDefault()),r.current=!1},onInteractOutside:t=>{var i,o;null===(i=e.onInteractOutside)||void 0===i||i.call(e,t),t.defaultPrevented||(r.current=!0);let a=t.target,s=null===(o=n.triggerRef.current)||void 0===o?void 0:o.contains(a);s&&t.preventDefault()}}))}),dE=(0,b.forwardRef)((e,t)=>{let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,disableOutsidePointerEvents:a,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:c,...d}=e,f=dp(db,n),h=df(n);return(0,uy.EW)(),(0,b.createElement)(ub.M,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o},(0,b.createElement)(ev.XB,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:c,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>f.onOpenChange(!1)},(0,b.createElement)(tj,(0,w.Z)({"data-state":dk(f.open),role:"dialog",id:f.contentId},h,d,{ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)"}}))))});function dk(e){return e?"open":"closed"}let dS=e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:a=!1}=e,s=df(t),l=(0,b.useRef)(null),[u,c]=(0,b.useState)(!1),[d=!1,f]=(0,C.T)({prop:r,defaultProp:i,onChange:o});return(0,b.createElement)(tM,s,(0,b.createElement)(dh,{scope:t,contentId:(0,A.M)(),triggerRef:l,open:d,onOpenChange:f,onOpenToggle:(0,b.useCallback)(()=>f(e=>!e),[f]),hasCustomAnchor:u,onCustomAnchorAdd:(0,b.useCallback)(()=>c(!0),[]),onCustomAnchorRemove:(0,b.useCallback)(()=>c(!1),[]),modal:a},n))},d_=e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,o=dp(dv,t);return(0,b.createElement)(dg,{scope:t,forceMount:n},(0,b.createElement)(T.z,{present:n||o.open},(0,b.createElement)(tT.h,{asChild:!0,container:i},r)))},dC=(0,em.j)([lo,"relative","z-10","outline-none","max-w-sm","data-[side=top]:bottom-1","data-[side=top]:origin-bottom","data-[side=bottom]:top-1","data-[side=bottom]:origin-top","data-[side=left]:right-1","data-[side=left]:origin-right","data-[side=right]:left-1","data-[side=right]:origin-left"]),dO=(0,em.cx)(t4(),(0,em.j)(["py-1","px-1"])()),dM={show:{opacity:[0,1],scale:[.95,1],transition:{duration:.1,ease:"easeOut"}},exit:{opacity:[1,0],scale:[1,.95],transition:{duration:.1,ease:"easeIn"}}},dT=b.forwardRef((e,t)=>{let{trigger:n,children:r,rootProps:i,contentProps:o}=e,{open:a,onOpenChange:s}=le({open:null==i?void 0:i.open,onOpenChange:null==i?void 0:i.onOpenChange});return(0,y.jsxs)(dS,{open:a,onOpenChange:s,...i,children:[(0,y.jsx)(dm,{asChild:!0,children:n}),(0,y.jsx)(nC,{children:a?(0,y.jsx)(d_,{forceMount:!0,children:(0,y.jsx)(dx,{asChild:!0,forceMount:!0,ref:t,...o,children:(0,y.jsx)(s9.div,{variants:dM,initial:"init",animate:"show",exit:"exit",className:dC(),children:(0,y.jsx)(ul,{className:dO,children:r})})})}):null})]})}),dA="Progress",[dP,dN]=(0,j.b)(dA),[dR,dD]=dP(dA),dL=(0,b.forwardRef)((e,t)=>{let{__scopeProgress:n,value:r,max:i,getValueLabel:o=dz,...a}=e,s=dZ(i)?i:100,l=dB(r,s)?r:null,u=dI(l)?o(l,s):void 0;return(0,b.createElement)(dR,{scope:n,value:l,max:s},(0,b.createElement)(O.WV.div,(0,w.Z)({"aria-valuemax":s,"aria-valuemin":0,"aria-valuenow":dI(l)?l:void 0,"aria-valuetext":u,role:"progressbar","data-state":dV(l,s),"data-value":null!=l?l:void 0,"data-max":s},a,{ref:t})))});dL.propTypes={max(e,t,n){let r=e[t],i=String(r);return r&&!dZ(r)?Error(`Invalid prop \`max\` of value \`${i}\` supplied to \`${n}\`. Only numbers greater than 0 are valid max values. Defaulting to \`100\`.`):null},value(e,t,n){let r=e[t],i=String(r),o=dZ(e.max)?e.max:100;return null==r||dB(r,o)?null:Error(`Invalid prop \`value\` of value \`${i}\` supplied to \`${n}\`. The \`value\` prop must be: - a positive number - less than the value passed to \`max\` (or 100 if no \`max\` prop is set) - \`null\` if the progress is indeterminate. -Defaulting to \`null\`.`)}};let dj=(0,b.forwardRef)((e,t)=>{var n;let{__scopeProgress:r,...i}=e,o=dx("ProgressIndicator",r);return(0,b.createElement)(O.WV.div,(0,w.Z)({"data-state":dk(o.value,o.max),"data-value":null!==(n=o.value)&&void 0!==n?n:void 0,"data-max":o.max},i,{ref:t}))});function dE(e,t){return`${Math.round(e/t*100)}%`}function dk(e,t){return null==e?"indeterminate":e===t?"complete":"loading"}function dS(e){return"number"==typeof e}function d_(e){return dS(e)&&!isNaN(e)&&e>0}function dC(e,t){return dS(e)&&!isNaN(e)&&e<=t&&e>=0}let dO=(0,eo.j)(["relative h-1 w-full overflow-hidden rounded-lg"],{variants:{variant:{gray:"bg-gray-700 dark:bg-graydark-700",accent:"bg-green-600 dark:bg-green-500"}},defaultVariants:{variant:"gray"}}),dM=b.forwardRef((e,t)=>{let{label:n,variant:r,className:i,value:o,max:a=100,...s}=e,l=null!=o?Math.round(o/a*100):null;return(0,y.jsxs)("div",{className:"flex flex-col gap-1 w-full",children:[(0,y.jsx)(dw,{...s,ref:t,value:o,max:a,className:dO({variant:r,className:i}),children:(0,y.jsx)(dj,{className:"absolute top-0 right-0 left-0 bottom-0 w-full bg-gray-300 dark:bg-graydark-300 transition-transform",style:{transform:"translateX(".concat(l,"%)")}})}),n&&(0,y.jsx)(tW,{color:"subtle",size:"12",ellipsis:!0,children:n})]})});function dT(e){let t=(0,b.useRef)({value:e,previous:e});return(0,b.useMemo)(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}let dA="Radio",[dP,dN]=(0,j.b)(dA),[dR,dD]=dP(dA),dL=(0,b.forwardRef)((e,t)=>{let{__scopeRadio:n,"aria-labelledby":r,name:i,checked:o=!1,required:a,disabled:s,value:l="on",onCheck:u,...c}=e,[d,f]=(0,b.useState)(null),h=(0,E.e)(t,e=>f(e)),p=cY(d),m=(0,b.useRef)(!1),v=!d||!!d.closest("form");return(0,b.createElement)(dR,{scope:n,checked:o,disabled:s},(0,b.createElement)(O.WV.button,(0,w.Z)({type:"button",role:"radio","aria-checked":o,"aria-labelledby":r||p,"data-state":dV(o),"data-disabled":s?"":void 0,disabled:s,value:l},c,{ref:h,onClick:(0,_.M)(e.onClick,e=>{o||null==u||u(),v&&(m.current=e.isPropagationStopped(),m.current||e.stopPropagation())})})),v&&(0,b.createElement)(dz,{control:d,bubbles:!m.current,name:i,value:l,checked:o,required:a,disabled:s,style:{transform:"translateX(-100%)"}}))}),dF=(0,b.forwardRef)((e,t)=>{let{__scopeRadio:n,forceMount:r,...i}=e,o=dD("RadioIndicator",n);return(0,b.createElement)(T.z,{present:r||o.checked},(0,b.createElement)(O.WV.span,(0,w.Z)({"data-state":dV(o.checked),"data-disabled":o.disabled?"":void 0},i,{ref:t})))}),dz=e=>{let{control:t,checked:n,bubbles:r=!0,...i}=e,o=(0,b.useRef)(null),a=dT(n),s=te(t);return(0,b.useEffect)(()=>{let e=o.current,t=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(t,"checked"),s=i.set;if(a!==n&&s){let t=new Event("click",{bubbles:r});s.call(e,n),e.dispatchEvent(t)}},[a,n,r]),(0,b.createElement)("input",(0,w.Z)({type:"radio","aria-hidden":!0,defaultChecked:n},i,{tabIndex:-1,ref:o,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function dV(e){return e?"checked":"unchecked"}let dI=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],dZ="RadioGroup",[dB,dH]=(0,j.b)(dZ,[uf,dN]),dU=uf(),dW=dN(),[dq,d$]=dB(dZ),dK=(0,b.forwardRef)((e,t)=>{let{__scopeRadioGroup:n,name:r,"aria-labelledby":i,defaultValue:o,value:a,required:s=!1,orientation:l,dir:u,loop:c=!0,onValueChange:d,...f}=e,h=cY(),p=dU(n),m=lk(u),[v,g]=(0,C.T)({prop:a,defaultProp:o,onChange:d});return(0,b.createElement)(dq,{scope:n,name:r,required:s,value:v,onValueChange:g},(0,b.createElement)(um,(0,w.Z)({asChild:!0},p,{orientation:l,dir:m,loop:c}),(0,b.createElement)(O.WV.div,(0,w.Z)({role:"radiogroup","aria-required":s,"aria-orientation":l,"aria-labelledby":i||h,dir:m},f,{ref:t}))))}),dY=(0,b.forwardRef)((e,t)=>{let{__scopeRadioGroup:n,disabled:r,...i}=e,o=d$("RadioGroupItem",n),a=dU(n),s=dW(n),l=(0,b.useRef)(null),u=(0,E.e)(t,l),c=o.value===i.value,d=(0,b.useRef)(!1);return(0,b.useEffect)(()=>{let e=e=>{dI.includes(e.key)&&(d.current=!0)},t=()=>d.current=!1;return document.addEventListener("keydown",e),document.addEventListener("keyup",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)}},[]),(0,b.createElement)(ug,(0,w.Z)({asChild:!0},a,{focusable:!r,active:c}),(0,b.createElement)(dL,(0,w.Z)({disabled:r,required:o.required,checked:c},s,i,{name:o.name,ref:u,onCheck:()=>o.onValueChange(i.value),onKeyDown:(0,_.M)(e=>{"Enter"===e.key&&e.preventDefault()}),onFocus:(0,_.M)(i.onFocus,()=>{var e;d.current&&(null===(e=l.current)||void 0===e||e.click())})})))}),dG=(0,b.forwardRef)((e,t)=>{let{__scopeRadioGroup:n,...r}=e,i=dW(n);return(0,b.createElement)(dF,(0,w.Z)({},i,r,{ref:t}))}),dX=(0,eo.j)(["relative flex items-center h-full justify-center w-full",'after:content-[""] after:block after:rounded-full after:bg-green-600 after:dark:bg-green-500'],{variants:{size:{small:"after:w-2 after:h-2 ",medium:"after:w-4 after:h-4"}},defaultVariants:{size:"small"}}),dJ=(0,eo.j)(["select-none","inline-flex items-center justify-center","m-0 p-0","outline-none","rounded-full","overflow-hidden","focus:ring ring-blue-500 dark:ring-blue-200","bg-white dark:bg-graydark-200","border border-gray-500 dark:border-graydark-400","enabled:hover:border-gray-700 enabled:hover:dark:border-graydark-600","text-gray-1100 dark:text-white","disabled:text-gray-600 disabled:dark:text-graydark-400","disabled:bg-gray-200 disabled:dark:bg-graydark-200"],{variants:{size:{small:"w-4 h-4",medium:"w-6 h-6"}},defaultVariants:{size:"small"}}),dQ=b.forwardRef((e,t)=>{let{size:n,className:r,children:i,...o}=e;return(0,y.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,y.jsx)(dY,{...o,className:dJ({size:n,className:r}),ref:t,children:(0,y.jsx)(dG,{className:dX({size:n})})}),(0,y.jsx)(tW,{size:"14",className:"relative top-px flex items-center",color:o.disabled?"verySubtle":"subtle",children:i})]})}),d0=b.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,y.jsx)(dK,{...r,className:(0,eo.cx)("flex gap-2",n),ref:t})}),d1="Tabs",[d2,d4]=(0,j.b)(d1,[uf]),d3=uf(),[d5,d6]=d2(d1),d8=(0,b.forwardRef)((e,t)=>{let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:o,orientation:a="horizontal",dir:s,activationMode:l="automatic",...u}=e,c=lk(s),[d,f]=(0,C.T)({prop:r,onChange:i,defaultProp:o});return(0,b.createElement)(d5,{scope:n,baseId:(0,A.M)(),value:d,onValueChange:f,orientation:a,dir:c,activationMode:l},(0,b.createElement)(O.WV.div,(0,w.Z)({dir:c,"data-orientation":a},u,{ref:t})))}),d7=(0,b.forwardRef)((e,t)=>{let{__scopeTabs:n,loop:r=!0,...i}=e,o=d6("TabsList",n),a=d3(n);return(0,b.createElement)(um,(0,w.Z)({asChild:!0},a,{orientation:o.orientation,dir:o.dir,loop:r}),(0,b.createElement)(O.WV.div,(0,w.Z)({role:"tablist","aria-orientation":o.orientation},i,{ref:t})))}),d9=(0,b.forwardRef)((e,t)=>{let{__scopeTabs:n,value:r,disabled:i=!1,...o}=e,a=d6("TabsTrigger",n),s=d3(n),l=ft(a.baseId,r),u=fn(a.baseId,r),c=r===a.value;return(0,b.createElement)(ug,(0,w.Z)({asChild:!0},s,{focusable:!i,active:c}),(0,b.createElement)(O.WV.button,(0,w.Z)({type:"button",role:"tab","aria-selected":c,"aria-controls":u,"data-state":c?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:l},o,{ref:t,onMouseDown:(0,_.M)(e.onMouseDown,e=>{i||0!==e.button||!1!==e.ctrlKey?e.preventDefault():a.onValueChange(r)}),onKeyDown:(0,_.M)(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&a.onValueChange(r)}),onFocus:(0,_.M)(e.onFocus,()=>{let e="manual"!==a.activationMode;c||i||!e||a.onValueChange(r)})})))}),fe=(0,b.forwardRef)((e,t)=>{let{__scopeTabs:n,value:r,forceMount:i,children:o,...a}=e,s=d6("TabsContent",n),l=ft(s.baseId,r),u=fn(s.baseId,r),c=r===s.value,d=(0,b.useRef)(c);return(0,b.useEffect)(()=>{let e=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,b.createElement)(T.z,{present:i||c},({present:n})=>(0,b.createElement)(O.WV.div,(0,w.Z)({"data-state":c?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":l,hidden:!n,id:u,tabIndex:0},a,{ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0}}),n&&o))});function ft(e,t){return`${e}-trigger-${t}`}function fn(e,t){return`${e}-content-${t}`}let fr=b.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,y.jsx)(d8,{ref:t,className:(0,eo.cx)("flex flex-col",n),...r})}),fi=b.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,y.jsx)(d7,{ref:t,className:(0,eo.cx)("flex flex-shrink-0 border-b border-gray-500 dark:border-graydark-500",n),...r})}),fo=b.forwardRef((e,t)=>{let{font:n,size:r="16",weight:i="medium",className:o,...a}=e;return(0,y.jsx)(d9,{ref:t,type:"button",className:(0,eo.cx)("px-10 h-12","flex-1 flex items-center justify-center","outline-none","select-none cursor-pointer","border-b-3","text-gray-1000 dark:text-graydark-1000","hover:text-gray-1100 hover:dark:text-white","border-transparent","data-[state=active]:text-accent-1100 data-[state=active]:dark:text-accentdark-1100","data-[state=active]:border-green-600 data-[state=active]:dark:border-green-500",tU({font:n,size:r,weight:i,ellipsis:!0}),o),...a})}),fa=b.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,y.jsx)(fe,{ref:t,className:(0,eo.cx)("flex-grow-1 pt-6 outline-none",n),...r})});(0,eo.j)(["relative appearance-none outline-none","p-2 m-0 w-full","min-h-[80px]",tU(),"tabular-nums","resize-y","rounded","focus:ring ring-blue-500 dark:ring-blue-200","text-gray-1100 dark:text-white","placeholder:text-gray-600 placeholder:dark:text-graydark-500","disabled:text-gray-400 disabled:dark:text-graydark-400"],{variants:{size:{small:"h-7 text-sm px-2",medium:"h-10 text-base px-3",large:"h-12 text-lg px-3"},variant:{default:["border","bg-white dark:bg-graydark-50","autofill:bg-blue-100 autofill:dark:bg-blue-800"],ghost:"bg-transparent"},state:{default:["border-gray-400 dark:border-graydark-400","enabled:hover:border-gray-500 enabled:hover:dark:border-graydark-500"],invalid:["border-red-500 dark:border-red-400"],valid:["border-green-500 dark:border-green-400"]},cursor:{default:"",text:"cursor-text"}},defaultVariants:{size:"small",variant:"default",cursor:"default",state:"default"}});let fs=(0,eo.j)(["font-sans [type=number]:font-mono","outline-none m-0 p-0 w-full","disabled:pointer-events-none","tabular-nums","rounded","text-gray-1100 dark:text-white","autofill:text-fill-gray-1100 autofill:dark:text-fill-white","autofill:placeholder:text-fill-gray-700 autofill:placeholder:dark:text-fill-graydark-700","placeholder:text-gray-700 placeholder:dark:text-graydark-700","disabled:text-gray-400 disabled:dark:text-graydark-400"],{variants:{size:{small:"h-7 text-sm px-2",medium:"h-10 text-base px-3",large:"h-12 text-lg px-3"},variant:{default:["border","bg-white dark:bg-graydark-50","autofill:bg-white autofill:dark:bg-graydark-50","autofill:shadow-fill-white autofill:dark:shadow-fill-graydark-50"],ghost:"bg-transparent"},state:{default:["border-gray-400 dark:border-graydark-400","enabled:hover:border-gray-500 enabled:hover:dark:border-graydark-500"],invalid:["border-red-500 dark:border-red-400"],valid:["border-green-500 dark:border-green-400"]},focus:{default:["focus:ring ring-blue-500 dark:ring-blue-200","focus:z-10"],none:""},cursor:{default:"",text:"cursor-text"},noSpin:{true:"[&::-webkit-outer-spin-button, &::-webkit-inner-spin-button]:appearance-none"}},defaultVariants:{size:"small",focus:"default",variant:"default",cursor:"default",state:"default"}}),fl=b.forwardRef((e,t)=>{let{variant:n,size:r,state:i,noSpin:o,cursor:a,focus:s,className:l,...u}=e;return(0,y.jsx)("input",{ref:t,className:fs({variant:n,size:r,state:i,noSpin:o,cursor:a,focus:s,className:l}),...u})});/*! ***************************************************************************** +Defaulting to \`null\`.`)}};let dF=(0,b.forwardRef)((e,t)=>{var n;let{__scopeProgress:r,...i}=e,o=dD("ProgressIndicator",r);return(0,b.createElement)(O.WV.div,(0,w.Z)({"data-state":dV(o.value,o.max),"data-value":null!==(n=o.value)&&void 0!==n?n:void 0,"data-max":o.max},i,{ref:t}))});function dz(e,t){return`${Math.round(e/t*100)}%`}function dV(e,t){return null==e?"indeterminate":e===t?"complete":"loading"}function dI(e){return"number"==typeof e}function dZ(e){return dI(e)&&!isNaN(e)&&e>0}function dB(e,t){return dI(e)&&!isNaN(e)&&e<=t&&e>=0}let dH=(0,em.j)(["relative h-1 w-full overflow-hidden rounded-lg"],{variants:{variant:{gray:"bg-gray-700 dark:bg-graydark-700",accent:"bg-green-600 dark:bg-green-500"}},defaultVariants:{variant:"gray"}}),dU=b.forwardRef((e,t)=>{let{label:n,variant:r,className:i,value:o,max:a=100,...s}=e,l=null!=o?Math.round(o/a*100):null;return(0,y.jsxs)("div",{className:"flex flex-col gap-1 w-full",children:[(0,y.jsx)(dL,{...s,ref:t,value:o,max:a,className:dH({variant:r,className:i}),children:(0,y.jsx)(dF,{className:"absolute top-0 right-0 left-0 bottom-0 w-full bg-gray-300 dark:bg-graydark-300 transition-transform",style:{transform:"translateX(".concat(l,"%)")}})}),n&&(0,y.jsx)(t1,{color:"subtle",size:"12",ellipsis:!0,children:n})]})});function dW(e){let t=(0,b.useRef)({value:e,previous:e});return(0,b.useMemo)(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}let dq="Radio",[d$,dK]=(0,j.b)(dq),[dY,dG]=d$(dq),dX=(0,b.forwardRef)((e,t)=>{let{__scopeRadio:n,"aria-labelledby":r,name:i,checked:o=!1,required:a,disabled:s,value:l="on",onCheck:u,...c}=e,[d,f]=(0,b.useState)(null),h=(0,E.e)(t,e=>f(e)),p=de(d),m=(0,b.useRef)(!1),v=!d||!!d.closest("form");return(0,b.createElement)(dY,{scope:n,checked:o,disabled:s},(0,b.createElement)(O.WV.button,(0,w.Z)({type:"button",role:"radio","aria-checked":o,"aria-labelledby":r||p,"data-state":d0(o),"data-disabled":s?"":void 0,disabled:s,value:l},c,{ref:h,onClick:(0,_.M)(e.onClick,e=>{o||null==u||u(),v&&(m.current=e.isPropagationStopped(),m.current||e.stopPropagation())})})),v&&(0,b.createElement)(dQ,{control:d,bubbles:!m.current,name:i,value:l,checked:o,required:a,disabled:s,style:{transform:"translateX(-100%)"}}))}),dJ=(0,b.forwardRef)((e,t)=>{let{__scopeRadio:n,forceMount:r,...i}=e,o=dG("RadioIndicator",n);return(0,b.createElement)(T.z,{present:r||o.checked},(0,b.createElement)(O.WV.span,(0,w.Z)({"data-state":d0(o.checked),"data-disabled":o.disabled?"":void 0},i,{ref:t})))}),dQ=e=>{let{control:t,checked:n,bubbles:r=!0,...i}=e,o=(0,b.useRef)(null),a=dW(n),s=tc(t);return(0,b.useEffect)(()=>{let e=o.current,t=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(t,"checked"),s=i.set;if(a!==n&&s){let t=new Event("click",{bubbles:r});s.call(e,n),e.dispatchEvent(t)}},[a,n,r]),(0,b.createElement)("input",(0,w.Z)({type:"radio","aria-hidden":!0,defaultChecked:n},i,{tabIndex:-1,ref:o,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function d0(e){return e?"checked":"unchecked"}let d1=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],d2="RadioGroup",[d4,d3]=(0,j.b)(d2,[uC,dK]),d5=uC(),d6=dK(),[d8,d7]=d4(d2),d9=(0,b.forwardRef)((e,t)=>{let{__scopeRadioGroup:n,name:r,"aria-labelledby":i,defaultValue:o,value:a,required:s=!1,orientation:l,dir:u,loop:c=!0,onValueChange:d,...f}=e,h=de(),p=d5(n),m=lV(u),[v,g]=(0,C.T)({prop:a,defaultProp:o,onChange:d});return(0,b.createElement)(d8,{scope:n,name:r,required:s,value:v,onValueChange:g},(0,b.createElement)(uT,(0,w.Z)({asChild:!0},p,{orientation:l,dir:m,loop:c}),(0,b.createElement)(O.WV.div,(0,w.Z)({role:"radiogroup","aria-required":s,"aria-orientation":l,"aria-labelledby":i||h,dir:m},f,{ref:t}))))}),fe=(0,b.forwardRef)((e,t)=>{let{__scopeRadioGroup:n,disabled:r,...i}=e,o=d7("RadioGroupItem",n),a=d5(n),s=d6(n),l=(0,b.useRef)(null),u=(0,E.e)(t,l),c=o.value===i.value,d=(0,b.useRef)(!1);return(0,b.useEffect)(()=>{let e=e=>{d1.includes(e.key)&&(d.current=!0)},t=()=>d.current=!1;return document.addEventListener("keydown",e),document.addEventListener("keyup",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)}},[]),(0,b.createElement)(uP,(0,w.Z)({asChild:!0},a,{focusable:!r,active:c}),(0,b.createElement)(dX,(0,w.Z)({disabled:r,required:o.required,checked:c},s,i,{name:o.name,ref:u,onCheck:()=>o.onValueChange(i.value),onKeyDown:(0,_.M)(e=>{"Enter"===e.key&&e.preventDefault()}),onFocus:(0,_.M)(i.onFocus,()=>{var e;d.current&&(null===(e=l.current)||void 0===e||e.click())})})))}),ft=(0,b.forwardRef)((e,t)=>{let{__scopeRadioGroup:n,...r}=e,i=d6(n);return(0,b.createElement)(dJ,(0,w.Z)({},i,r,{ref:t}))}),fn=(0,em.j)(["relative flex items-center h-full justify-center w-full",'after:content-[""] after:block after:rounded-full after:bg-green-600 after:dark:bg-green-500'],{variants:{size:{small:"after:w-2 after:h-2 ",medium:"after:w-4 after:h-4"}},defaultVariants:{size:"small"}}),fr=(0,em.j)(["select-none","inline-flex items-center justify-center","m-0 p-0","outline-none","rounded-full","overflow-hidden","focus:ring ring-blue-500 dark:ring-blue-200","bg-white dark:bg-graydark-200","border border-gray-500 dark:border-graydark-400","enabled:hover:border-gray-700 enabled:hover:dark:border-graydark-600","text-gray-1100 dark:text-white","disabled:text-gray-600 disabled:dark:text-graydark-400","disabled:bg-gray-200 disabled:dark:bg-graydark-200"],{variants:{size:{small:"w-4 h-4",medium:"w-6 h-6"}},defaultVariants:{size:"small"}}),fi=b.forwardRef((e,t)=>{let{size:n,className:r,children:i,...o}=e;return(0,y.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,y.jsx)(fe,{...o,className:fr({size:n,className:r}),ref:t,children:(0,y.jsx)(ft,{className:fn({size:n})})}),(0,y.jsx)(t1,{size:"14",className:"relative top-px flex items-center",color:o.disabled?"verySubtle":"subtle",children:i})]})}),fo=b.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,y.jsx)(d9,{...r,className:(0,em.cx)("flex gap-2",n),ref:t})}),fa="Tabs",[fs,fl]=(0,j.b)(fa,[uC]),fu=uC(),[fc,fd]=fs(fa),ff=(0,b.forwardRef)((e,t)=>{let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:o,orientation:a="horizontal",dir:s,activationMode:l="automatic",...u}=e,c=lV(s),[d,f]=(0,C.T)({prop:r,onChange:i,defaultProp:o});return(0,b.createElement)(fc,{scope:n,baseId:(0,A.M)(),value:d,onValueChange:f,orientation:a,dir:c,activationMode:l},(0,b.createElement)(O.WV.div,(0,w.Z)({dir:c,"data-orientation":a},u,{ref:t})))}),fh=(0,b.forwardRef)((e,t)=>{let{__scopeTabs:n,loop:r=!0,...i}=e,o=fd("TabsList",n),a=fu(n);return(0,b.createElement)(uT,(0,w.Z)({asChild:!0},a,{orientation:o.orientation,dir:o.dir,loop:r}),(0,b.createElement)(O.WV.div,(0,w.Z)({role:"tablist","aria-orientation":o.orientation},i,{ref:t})))}),fp=(0,b.forwardRef)((e,t)=>{let{__scopeTabs:n,value:r,disabled:i=!1,...o}=e,a=fd("TabsTrigger",n),s=fu(n),l=fv(a.baseId,r),u=fg(a.baseId,r),c=r===a.value;return(0,b.createElement)(uP,(0,w.Z)({asChild:!0},s,{focusable:!i,active:c}),(0,b.createElement)(O.WV.button,(0,w.Z)({type:"button",role:"tab","aria-selected":c,"aria-controls":u,"data-state":c?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:l},o,{ref:t,onMouseDown:(0,_.M)(e.onMouseDown,e=>{i||0!==e.button||!1!==e.ctrlKey?e.preventDefault():a.onValueChange(r)}),onKeyDown:(0,_.M)(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&a.onValueChange(r)}),onFocus:(0,_.M)(e.onFocus,()=>{let e="manual"!==a.activationMode;c||i||!e||a.onValueChange(r)})})))}),fm=(0,b.forwardRef)((e,t)=>{let{__scopeTabs:n,value:r,forceMount:i,children:o,...a}=e,s=fd("TabsContent",n),l=fv(s.baseId,r),u=fg(s.baseId,r),c=r===s.value,d=(0,b.useRef)(c);return(0,b.useEffect)(()=>{let e=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,b.createElement)(T.z,{present:i||c},({present:n})=>(0,b.createElement)(O.WV.div,(0,w.Z)({"data-state":c?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":l,hidden:!n,id:u,tabIndex:0},a,{ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0}}),n&&o))});function fv(e,t){return`${e}-trigger-${t}`}function fg(e,t){return`${e}-content-${t}`}let fy=b.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,y.jsx)(ff,{ref:t,className:(0,em.cx)("flex flex-col",n),...r})}),fb=b.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,y.jsx)(fh,{ref:t,className:(0,em.cx)("flex flex-shrink-0 border-b border-gray-500 dark:border-graydark-500",n),...r})}),fx=b.forwardRef((e,t)=>{let{font:n,size:r="16",weight:i="medium",className:o,...a}=e;return(0,y.jsx)(fp,{ref:t,type:"button",className:(0,em.cx)("px-10 h-12","flex-1 flex items-center justify-center","outline-none","select-none cursor-pointer","border-b-3","text-gray-1000 dark:text-graydark-1000","hover:text-gray-1100 hover:dark:text-white","border-transparent","data-[state=active]:text-accent-1100 data-[state=active]:dark:text-accentdark-1100","data-[state=active]:border-green-600 data-[state=active]:dark:border-green-500",t0({font:n,size:r,weight:i,ellipsis:!0}),o),...a})}),fw=b.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,y.jsx)(fm,{ref:t,className:(0,em.cx)("flex-grow-1 pt-6 outline-none",n),...r})});(0,em.j)(["relative appearance-none outline-none","p-2 m-0 w-full","min-h-[80px]",t0(),"tabular-nums","resize-y","rounded","focus:ring ring-blue-500 dark:ring-blue-200","text-gray-1100 dark:text-white","placeholder:text-gray-600 placeholder:dark:text-graydark-500","disabled:text-gray-400 disabled:dark:text-graydark-400"],{variants:{size:{small:"h-7 text-sm px-2",medium:"h-10 text-base px-3",large:"h-12 text-lg px-3"},variant:{default:["border","bg-white dark:bg-graydark-50","autofill:bg-blue-100 autofill:dark:bg-blue-800"],ghost:"bg-transparent"},state:{default:["border-gray-400 dark:border-graydark-400","enabled:hover:border-gray-500 enabled:hover:dark:border-graydark-500"],invalid:["border-red-500 dark:border-red-400"],valid:["border-green-500 dark:border-green-400"]},cursor:{default:"",text:"cursor-text"}},defaultVariants:{size:"small",variant:"default",cursor:"default",state:"default"}});let fj=(0,em.j)(["font-sans [type=number]:font-mono","outline-none m-0 p-0 w-full","disabled:pointer-events-none","tabular-nums","rounded","text-gray-1100 dark:text-white","autofill:text-fill-gray-1100 autofill:dark:text-fill-white","autofill:placeholder:text-fill-gray-700 autofill:placeholder:dark:text-fill-graydark-700","placeholder:text-gray-700 placeholder:dark:text-graydark-700","disabled:text-gray-400 disabled:dark:text-graydark-400"],{variants:{size:{small:"h-7 text-sm px-2",medium:"h-10 text-base px-3",large:"h-12 text-lg px-3"},variant:{default:["border","bg-white dark:bg-graydark-50","autofill:bg-white autofill:dark:bg-graydark-50","autofill:shadow-fill-white autofill:dark:shadow-fill-graydark-50"],ghost:"bg-transparent"},state:{default:["border-gray-400 dark:border-graydark-400","enabled:hover:border-gray-500 enabled:hover:dark:border-graydark-500"],invalid:["border-red-500 dark:border-red-400"],valid:["border-green-500 dark:border-green-400"]},focus:{default:["focus:ring ring-blue-500 dark:ring-blue-200","focus:z-10"],none:""},cursor:{default:"",text:"cursor-text"},noSpin:{true:"[&::-webkit-outer-spin-button, &::-webkit-inner-spin-button]:appearance-none"}},defaultVariants:{size:"small",focus:"default",variant:"default",cursor:"default",state:"default"}}),fE=b.forwardRef((e,t)=>{let{variant:n,size:r,state:i,noSpin:o,cursor:a,focus:s,className:l,...u}=e;return(0,y.jsx)("input",{ref:t,className:fj({variant:n,size:r,state:i,noSpin:o,cursor:a,focus:s,className:l}),...u})});/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any @@ -44,7 +44,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var fu=function(){return(fu=Object.assign||function(e){for(var t,n=1,r=arguments.length;n1){if(e.includes(t)){var r=e.split(t),i=r[0],o=r[1];if(o.length>n)return""+i+t+o.slice(0,n)}var a=e.length>n?RegExp("(\\d+)(\\d{"+n+"})"):RegExp("(\\d)(\\d+)"),s=e.match(a);if(s){var i=s[1],o=s[2];return""+i+t+o}}return e},fy=function(e,t){var n=t.groupSeparator,r=t.decimalSeparator,i=RegExp("\\d([^"+fd(void 0===n?",":n)+fd(void 0===r?".":r)+"0-9]+)"),o=e.match(i);return o?o[1]:void 0},fb=function(e){var t=e.value,n=e.decimalSeparator,r=e.intlConfig,i=e.decimalScale,o=e.prefix,a=void 0===o?"":o,s=e.suffix,l=void 0===s?"":s;if(""===t||void 0===t)return"";if("-"===t)return"-";var u=RegExp("^\\d?-"+(a?fd(a)+"?":"")+"\\d").test(t),c="."!==n?fx(t,n,u):t,d=fw((r?new Intl.NumberFormat(r.locale,r.currency?{style:"currency",currency:r.currency,minimumFractionDigits:i||0,maximumFractionDigits:20}:void 0):new Intl.NumberFormat(void 0,{minimumFractionDigits:i||0,maximumFractionDigits:20})).formatToParts(Number(c)),e),f=fy(d,fu({},e)),h=t.slice(-1)===n?n:"",p=(c.match(RegExp("\\d+\\.(\\d+)"))||[])[1];return(void 0===i&&p&&n&&(d=d.includes(n)?d.replace(RegExp("(\\d+)("+fd(n)+")(\\d+)","g"),"$1$2"+p):f&&!l?d.replace(f,""+n+p+f):""+d+n+p),l&&h)?""+d+h+l:f&&h?d.replace(f,""+h+f):f&&l?d.replace(f,""+h+l):[d,h,l].join("")},fx=function(e,t,n){var r=e;return t&&"."!==t&&(r=r.replace(RegExp(fd(t),"g"),"."),n&&"-"===t&&(r="-"+r.slice(1))),r},fw=function(e,t){var n=t.prefix,r=t.groupSeparator,i=t.decimalSeparator,o=t.decimalScale,a=t.disableGroupSeparators,s=void 0!==a&&a;return e.reduce(function(e,t,a){var l=t.type,u=t.value;return 0===a&&n?"minusSign"===l?[u,n]:"currency"===l?fc(fc([],e),[n]):[n,u]:"currency"===l?n?e:fc(fc([],e),[u]):"group"===l?s?e:fc(fc([],e),[void 0!==r?r:u]):"decimal"===l?void 0!==o&&0===o?e:fc(fc([],e),[void 0!==i?i:u]):"fraction"===l?fc(fc([],e),[void 0!==o?u.slice(0,o):u]):fc(fc([],e),[u])},[""]).join("")},fj={currencySymbol:"",groupSeparator:"",decimalSeparator:"",prefix:"",suffix:""},fE=function(e){var t=e||{},n=t.locale,r=t.currency;return(n?new Intl.NumberFormat(n,r?{currency:r,style:"currency"}:void 0):new Intl.NumberFormat).formatToParts(1000.1).reduce(function(e,t,n){return"currency"===t.type?0===n?fu(fu({},e),{currencySymbol:t.value,prefix:t.value}):fu(fu({},e),{currencySymbol:t.value,suffix:t.value}):"group"===t.type?fu(fu({},e),{groupSeparator:t.value}):"decimal"===t.type?fu(fu({},e),{decimalSeparator:t.value}):e},fj)},fk=function(e){return RegExp(/\d/,"gi").test(e)},fS=function(e,t,n){if(void 0===t&&(t="."),void 0===n||""===e||void 0===e)return e;if(!e.match(/\d/g))return"";var r=e.split(t),i=r[0],o=r[1];if(0===n)return i;var a=o||"";if(a.lengtht.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);it.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}(e,["allowDecimals","allowNegativeValue","id","name","className","customInput","decimalsLimit","defaultValue","disabled","maxLength","value","onValueChange","fixedDecimalLength","placeholder","decimalScale","prefix","suffix","intlConfig","step","min","max","disableGroupSeparators","disableAbbreviations","decimalSeparator","groupSeparator","onChange","onFocus","onBlur","onKeyDown","onKeyUp","transformRawValue"]);if(C&&fk(C))throw Error("decimalSeparator cannot be a number");if(O&&fk(O))throw Error("groupSeparator cannot be a number");var L=(0,b.useMemo)(function(){return fE(x)},[x]),F=C||L.decimalSeparator||"",z=O||L.groupSeparator||"";if(F&&z&&F===z&&!1===S)throw Error("decimalSeparator cannot be the same as groupSeparator");var V={decimalSeparator:F,groupSeparator:z,disableGroupSeparators:S,intlConfig:x,prefix:g||L.prefix,suffix:y},I={decimalSeparator:F,groupSeparator:z,allowDecimals:void 0===n||n,decimalsLimit:l||p||2,allowNegativeValue:void 0===r||r,disableAbbreviations:void 0!==_&&_,prefix:g||L.prefix,transformRawValue:R},Z=null!=u?fb(fu(fu({},V),{decimalScale:v,value:String(u)})):null!=f?fb(fu(fu({},V),{decimalScale:v,value:String(f)})):"",B=(0,b.useState)(Z),H=B[0],U=B[1],W=(0,b.useState)(!1),q=W[0],$=W[1],K=(0,b.useState)(0),Y=K[0],G=K[1],X=(0,b.useState)(0),J=X[0],Q=X[1],ee=(0,b.useState)(null),et=ee[0],en=ee[1],er=t||(0,b.useRef)(null),ei=function(e,t){$(!0);var n=f_({selectionStart:t,value:e,lastKeyStroke:et,stateValue:H,groupSeparator:z}),r=n.modifiedValue,i=n.cursorPosition,a=fv(fu({value:r},I));if(!d||!(a.replace(/-/g,"").length>d)){if(""===a||"-"===a||a===F){h&&h(void 0,o,{float:null,formatted:"",value:""}),U(a);return}var s=parseFloat(a.replace(F,".")),l=fb(fu({value:a},V));if(null!=i){var u=i+(l.length-e.length);G(u=u<=0?g?g.length:0:u),Q(J+1)}U(l),h&&h(a,o,{float:s,formatted:l,value:a})}};(0,b.useEffect)(function(){q&&"-"!==H&&er&&"object"==typeof er&&er.current&&er.current.setSelectionRange(Y,Y)},[H,Y,er,q,J]);var eo=fu({type:"text",inputMode:"decimal",id:i,name:o,className:a,onChange:function(e){var t=e.target;ei(t.value,t.selectionStart),M&&M(e)},onBlur:function(e){var t=e.target.value,n=fv(fu({value:t},I));if("-"===n||!n){U(""),A&&A(e);return}var r=fS(fg(n,F,p),F,void 0!==v?v:p),i=parseFloat(r.replace(F,".")),a=fb(fu(fu({},V),{value:r}));h&&h(r,o,{float:i,formatted:a,value:r}),U(a),A&&A(e)},onFocus:function(e){return T&&T(e),H?H.length:0},onKeyDown:function(e){var t=e.key;if(en(t),w&&("ArrowUp"===t||"ArrowDown"===t)){e.preventDefault(),G(H.length);var n=parseFloat(null!=f?String(f).replace(F,"."):fv(fu({value:H},I)))||0,r="ArrowUp"===t?n+w:n-w;if(void 0!==j&&rE)return;var i=String(w).includes(".")?Number(String(w).split(".")[1].length):void 0;ei(String(i?r.toFixed(i):r).replace(".",F))}P&&P(e)},onKeyUp:function(e){var t=e.key,n=e.currentTarget.selectionStart;if("ArrowUp"!==t&&"ArrowDown"!==t&&"-"!==H){var r=fy(H,{groupSeparator:z,decimalSeparator:F});if(r&&n&&n>H.length-r.length&&er&&"object"==typeof er&&er.current){var i=H.length-r.length;er.current.setSelectionRange(i,i)}}N&&N(e)},placeholder:m,disabled:void 0!==c&&c,value:null==f||"-"===H||F&&H===F?H:fb(fu(fu({},V),{decimalScale:q?void 0:v,value:String(f)})),ref:er},D);return s?b.createElement(s,fu({},eo)):b.createElement("input",fu({},eo))});function fO(e){let{units:t,variant:n,size:r="small",state:i,noSpin:o,focus:a,cursor:s,className:l,decimalsLimit:u,onValueChange:c,...d}=e,[f,h]=(0,b.useState)();return(0,b.useEffect)(()=>{h(navigator.language)},[]),(0,y.jsxs)("div",{className:"relative",children:[(0,y.jsx)(fC,{...d,decimalsLimit:u,intlConfig:f?{locale:f}:void 0,allowDecimals:!!u,autoComplete:"off",spellCheck:!1,onValueChange:c,className:(0,eo.cx)(fs({variant:n,size:r,state:i,focus:a,noSpin:o,cursor:s,className:l}),t?"pr-9":"")}),t&&(0,y.jsx)("div",{className:(0,eo.cx)("flex items-center absolute top-0 h-full","small"===r?"right-2":"","medium"===r?"right-3":"","large"===r?"right-3":""),children:(0,y.jsx)(tW,{size:"12",weight:"medium",color:"subtle",children:t})})]})}fC.displayName="CurrencyInput";var fM=n(6391),fT=n.n(fM);function fA(e,t){return e.decimalPlaces()>t?e.toFixed(t):e.toString()}let fP=(0,b.forwardRef)(function(e,t){let{value:n,placeholder:r=new(fT())(100),decimalsLimit:i=6,onChange:o,size:a="small",units:s,error:l,changed:u,onBlur:c,onFocus:d,...f}=e,h=(0,b.useMemo)(()=>new(fT())(n),[n]),[p,m]=(0,b.useState)(""),v=(0,b.useMemo)(()=>fN(p),[p]),g=(0,b.useCallback)(e=>{o&&o((e=fN(e))&&!isNaN(Number(e))?new(fT())(e):void 0)},[o]),x=(0,b.useCallback)(e=>{m(e),g(e)},[m,g]);return(0,b.useEffect)(()=>{if(!h.isEqualTo(v)){let e=fA(h,i);m(e)}},[h]),(0,y.jsx)(fO,{ref:t,...f,"data-testid":"numberfield",size:a,placeholder:r.isNaN()?"":r.toFixed(i),units:s,value:"NaN"!==p?p:"",decimalsLimit:i,onBlur:e=>{c&&c(e)},onFocus:e=>{d&&d(e)},onValueChange:e=>x(e||"")})});function fN(e){return(null==e?void 0:e.replace(/,/g,"."))||""}var fR=n(2850),fD=n(47025);let fL=new(fT())(0),fF=(0,b.forwardRef)(function(e,t){let{sc:n,placeholder:r=new(fT())(100),decimalsLimitFiat:i=6,decimalsLimitSc:o=6,onChange:a,size:s="medium",units:l="SC",showFiat:u=!0,error:c,changed:d,prefix:f,onBlur:h,onFocus:p,...m}=e,v=(0,b.useMemo)(()=>new(fT())(void 0===n?NaN:n),[n]),{settings:g}=(0,fR.Hv)(),x=(0,fD.BW)({config:{swr:{revalidateOnFocus:!1}}}),w=(0,b.useMemo)(()=>{var e;return g.siaCentral&&x.data?new(fT())((null===(e=x.data)||void 0===e?void 0:e.rates.sc[g.currency.id])||fL):fL},[x.data,g]),[j,E]=(0,b.useState)(),[k,S]=(0,b.useState)(""),[_,C]=(0,b.useState)(""),O=(0,b.useMemo)(()=>fz(k),[k]),M=(0,b.useMemo)(()=>fz(_),[_]),T=(0,b.useCallback)(e=>{a&&a((e=fz(e))&&!isNaN(Number(e))?new(fT())(e):void 0)},[a]),A=(0,b.useCallback)(e=>{let t=fA(e,i);C(t)},[C,i]),P=(0,b.useCallback)(e=>{let t=fA(e,o);return S(t),T(t),t},[S,o,T]),N=(0,b.useCallback)(e=>{S(e),T(e)},[S,T]),R=(0,b.useCallback)(e=>{let t=new(fT())(e).times(w);A(t)},[A,w]),D=(0,b.useCallback)(e=>{let t=new(fT())(e).dividedBy(w);P(t)},[P,w]),[L,F]=(0,b.useState)(!1);return(0,b.useEffect)(()=>{if(!v.isEqualTo(O)){let e=fA(v,o);S(e),"fiat"!==j&&R(e)}L||F(!0)},[v]),(0,b.useEffect)(()=>{L&&R(O)},[w]),(0,b.useEffect)(()=>{"sc"===j&&R(O)},[O]),(0,b.useEffect)(()=>{"fiat"===j&&D(M)},[M]),(0,y.jsxs)("div",{ref:t,className:(0,eo.cx)("flex flex-col bg-white dark:bg-graydark-50","focus-within:ring ring-blue-500 dark:ring-blue-200","border",c?"border-red-500 dark:border-red-400":d?"border-green-500 dark:border-green-400":"border-gray-200 dark:border-graydark-200","rounded"),children:[(0,y.jsx)(fO,{...m,"data-testid":"scInput",size:s,variant:"ghost",focus:"none",placeholder:r.toFixed(o),units:l,value:"NaN"!==k?k:"",decimalsLimit:o,allowNegativeValue:!1,onBlur:e=>{E(void 0),h&&h(e)},onFocus:e=>{E("sc"),p&&p(e)},onValueChange:e=>{N(e||"")}}),u&&g.siaCentral&&(0,y.jsx)(fO,{...m,"data-testid":"fiatInput",size:s,variant:"ghost",focus:"none",value:"NaN"!==_?_:"",units:g.currency.label,decimalsLimit:i,allowNegativeValue:!1,placeholder:"".concat(g.currency.prefix).concat(w?w.times(r).toFixed(i):"0.42"),prefix:f||g.currency.prefix,onFocus:e=>{E("fiat"),p&&p(e)},onBlur:e=>{E(void 0),h&&h(e)},onValueChange:e=>{C(e||"")}})]})});function fz(e){return(null==e?void 0:e.replace(/,/g,"."))||""}function fV(e){let{children:t}=e;return(0,y.jsx)(s8,{content:t,children:(0,y.jsx)("div",{className:"relative flex items-center inline mx-1",children:(0,y.jsx)(tW,{color:"subtle",children:(0,y.jsx)(le.RdX,{className:"scale-75"})})})})}function fI(e){let{values:t,options:n,onChange:r}=e;return(0,y.jsx)("div",{className:"flex flex-wrap gap-1",children:n.map(e=>(0,y.jsx)(s9,{variant:t.includes(e.value)?"active":"inactive",onClick:()=>{r(e.value)},children:e.label},e.value))})}function fZ(e){let{options:t,onClick:n,onRemove:r}=e;return(0,y.jsx)("div",{className:"flex flex-wrap gap-1",children:t.map(e=>(0,y.jsxs)(lb,{children:[(0,y.jsx)(s9,{variant:"active",onClick:()=>{n&&n(e.value)},children:e.label}),(0,y.jsx)(s9,{variant:"active",size:"small",onClick:()=>r(e.value),children:(0,y.jsx)(le.PcV,{})})]},e.value))})}let fB=(0,eo.j)(["font-sans","font-normal","tabular-nums","flex-shrink-0","rounded","flex items-center","bg-white dark:bg-graydark-200","hover:bg-gray-50 dark:hover:bg-graydark-300","disabled:bg-gray-200 disabled:dark:bg-graydark-200","autofill:bg-blue-100 autofill:dark:bg-blue-800","border","focus-within:z-10","focus-within:ring ring-blue-500 dark:ring-blue-200","text-gray-1100 dark:text-white","[&>select:disabled]:text-gray-600 [&>select:disabled]:dark:text-graydark-700"],{variants:{size:{small:"h-7 text-sm px-1",medium:"h-10 text-base px-3",large:"h-12 text-lg px-3"},state:{default:["border-gray-400 dark:border-graydark-400","enabled:hover:border-gray-500 enabled:hover:dark:border-graydark-500"],invalid:["border-red-500 dark:border-red-400"],valid:["border-green-500 dark:border-green-400"]}},defaultVariants:{state:"default",size:"small"}}),fH=b.forwardRef((e,t)=>{let{size:n,state:r,icon:i,className:o,...a}=e;return(0,y.jsxs)("div",{className:fB({size:n,state:r,className:o}),children:[i,(0,y.jsx)("select",{ref:t,...a,className:"appearance-none flex-1 bg-transparent outline-none w-full h-full pl-1 pr-1"}),(0,y.jsx)(le.Cp0,{className:"pointer-events-none scale-75"})]})}),fU=b.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,y.jsx)("option",{ref:t,...r,className:(0,eo.cx)("bg-white dark:bg-graydark-200","text-gray-1100 dark:text-white",n)})}),fW=(0,eo.j)(["bg-gray-300 dark:bg-graydark-300","relative","overflow-hidden","animate-pulse","rounded"]);function fq(e){let{className:t}=e;return(0,y.jsx)("div",{className:fW({className:t})})}let f$=(0,eo.j)(["rounded-full flex-shrink-0"],{variants:{size:{default:"w-2 h-2"}},defaultVariants:{size:"default"}}),fK=b.forwardRef((e,t)=>{let{size:n,className:r,...i}=e;return(0,y.jsx)("div",{ref:t,className:f$({size:n,className:r}),...i})}),fY="Switch",[fG,fX]=(0,j.b)(fY),[fJ,fQ]=fG(fY),f0=(0,b.forwardRef)((e,t)=>{let{__scopeSwitch:n,"aria-labelledby":r,name:i,checked:o,defaultChecked:a,required:s,disabled:l,value:u="on",onCheckedChange:c,...d}=e,[f,h]=(0,b.useState)(null),p=(0,E.e)(t,e=>h(e)),m=cY(f),v=(0,b.useRef)(!1),g=!f||!!f.closest("form"),[y=!1,x]=(0,C.T)({prop:o,defaultProp:a,onChange:c});return(0,b.createElement)(fJ,{scope:n,checked:y,disabled:l},(0,b.createElement)(O.WV.button,(0,w.Z)({type:"button",role:"switch","aria-checked":y,"aria-labelledby":r||m,"aria-required":s,"data-state":f4(y),"data-disabled":l?"":void 0,disabled:l,value:u},d,{ref:p,onClick:(0,_.M)(e.onClick,e=>{x(e=>!e),g&&(v.current=e.isPropagationStopped(),v.current||e.stopPropagation())})})),g&&(0,b.createElement)(f2,{control:f,bubbles:!v.current,name:i,value:u,checked:y,required:s,disabled:l,style:{transform:"translateX(-100%)"}}))}),f1=(0,b.forwardRef)((e,t)=>{let{__scopeSwitch:n,...r}=e,i=fQ("SwitchThumb",n);return(0,b.createElement)(O.WV.span,(0,w.Z)({"data-state":f4(i.checked),"data-disabled":i.disabled?"":void 0},r,{ref:t}))}),f2=e=>{let{control:t,checked:n,bubbles:r=!0,...i}=e,o=(0,b.useRef)(null),a=dT(n),s=te(t);return(0,b.useEffect)(()=>{let e=o.current,t=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(t,"checked"),s=i.set;if(a!==n&&s){let t=new Event("click",{bubbles:r});s.call(e,n),e.dispatchEvent(t)}},[a,n,r]),(0,b.createElement)("input",(0,w.Z)({type:"checkbox","aria-hidden":!0,defaultChecked:n},i,{tabIndex:-1,ref:o,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function f4(e){return e?"checked":"unchecked"}let f3=(0,eo.j)(["absolute left-0 rounded-full","transition-transform","bg-white dark:bg-graydark-500"],{variants:{size:{small:["w-3 h-3","translate-x-px","data-[state=checked]:translate-x-[9px]"],medium:["w-5 h-5","translate-x-0.5","data-[state=checked]:translate-x-[20px]"]}},defaultVariants:{size:"small"}}),f5=(0,eo.j)(["select-none outline-none","relative inline-flex items-center justify-center","m-0 rounded-full","focus:ring ring-blue-500 dark:ring-blue-200","border","bg-gray-300 dark:bg-graydark-50","autofill:bg-blue-100 autofill:dark:bg-blue-800","border-gray-400 dark:border-graydark-400","enabled:hover:border-gray-500 enabled:hover:dark:border-graydark-500","disabled:cursor-default","enabled:data-[state=checked]:bg-green-600 dark:enabled:data-[state=checked]:bg-green-500","disabled:data-[state=checked]:bg-green-600/50 dark:disabled:data-[state=checked]:bg-green-500/50"],{variants:{size:{small:"w-6 h-4",medium:"w-11 h-6"},state:{default:["border-gray-400 dark:border-graydark-400","enabled:hover:border-gray-500 enabled:hover:dark:border-graydark-500"],invalid:["border-red-500 dark:border-red-400"],valid:["border-green-500 dark:border-green-400"]}},defaultVariants:{size:"small",state:"default"}}),f6=(0,b.forwardRef)((e,t)=>{let{size:n,state:r,className:i,children:o,...a}=e;return(0,y.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,y.jsx)(f0,{className:f5({size:n,state:r,className:i}),...a,ref:t,children:(0,y.jsx)(f1,{className:f3({size:n})})}),o&&(0,y.jsx)(tW,{color:a.disabled?"subtle":"contrast",children:o})]})}),f8=(0,b.forwardRef)((e,t)=>{let{children:n,...r}=e,i=b.Children.toArray(n),o=i.find(he);if(o){let e=o.props.children,n=i.map(t=>t!==o?t:b.Children.count(e)>1?b.Children.only(null):(0,b.isValidElement)(e)?e.props.children:null);return(0,b.createElement)(f7,(0,w.Z)({},r,{ref:t}),(0,b.isValidElement)(e)?(0,b.cloneElement)(e,void 0,n):null)}return(0,b.createElement)(f7,(0,w.Z)({},r,{ref:t}),n)});f8.displayName="Slot";let f7=(0,b.forwardRef)((e,t)=>{let{children:n,...r}=e;return(0,b.isValidElement)(n)?(0,b.cloneElement)(n,{...function(e,t){let n={...t};for(let r in t){let i=e[r],o=t[r],a=/^on[A-Z]/.test(r);a?i&&o?n[r]=(...e)=>{o(...e),i(...e)}:i&&(n[r]=i):"style"===r?n[r]={...i,...o}:"className"===r&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props),ref:(0,E.F)(t,n.ref)}):b.Children.count(n)>1?b.Children.only(null):null});f7.displayName="SlotClone";let f9=({children:e})=>(0,b.createElement)(b.Fragment,null,e);function he(e){return(0,b.isValidElement)(e)&&e.type===f9}let ht=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{let n=(0,b.forwardRef)((e,n)=>{let{asChild:r,...i}=e,o=r?f8:t;return(0,b.useEffect)(()=>{window[Symbol.for("radix-ui")]=!0},[]),(0,b.createElement)(o,(0,w.Z)({},i,{ref:n}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),hn=(0,b.forwardRef)((e,t)=>{let{children:n,width:r=10,height:i=5,...o}=e;return(0,b.createElement)(ht.svg,(0,w.Z)({},o,{ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?n:(0,b.createElement)("polygon",{points:"0,0 30,0 15,10"}))}),hr="Popper",[hi,ho]=(0,j.b)(hr),[ha,hs]=hi(hr),hl=(0,b.forwardRef)((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,o=hs("PopperAnchor",n),a=(0,b.useRef)(null),s=(0,E.e)(t,a);return(0,b.useEffect)(()=>{o.onAnchorChange((null==r?void 0:r.current)||a.current)}),r?null:(0,b.createElement)(ht.div,(0,w.Z)({},i,{ref:s}))}),hu="PopperContent",[hc,hd]=hi(hu),[hf,hh]=hi(hu,{hasParent:!1,positionUpdateFns:new Set}),hp=(0,b.forwardRef)((e,t)=>{var n,r,i,o,a,s,l,u,c;let{__scopePopper:d,side:f="bottom",sideOffset:h=0,align:p="center",alignOffset:m=0,arrowPadding:v=0,collisionBoundary:g=[],collisionPadding:y=0,sticky:x="partial",hideWhenDetached:w=!1,avoidCollisions:j=!0,onPlaced:k,...S}=e,_=hs(hu,d),[C,O]=(0,b.useState)(null),T=(0,E.e)(t,e=>O(e)),[A,P]=(0,b.useState)(null),N=te(A),R=null!==(n=null==N?void 0:N.width)&&void 0!==n?n:0,D=null!==(r=null==N?void 0:N.height)&&void 0!==r?r:0,L="number"==typeof y?y:{top:0,right:0,bottom:0,left:0,...y},F=Array.isArray(g)?g:[g],z=F.length>0,V={padding:L,boundary:F.filter(hg),altBoundary:z},{reference:I,floating:Z,strategy:B,x:H,y:U,placement:W,middlewareData:q,update:$}=e8({strategy:"fixed",placement:f+("center"!==p?"-"+p:""),whileElementsMounted:e4,middleware:[hy(),eO({mainAxis:h+D,alignmentAxis:m}),j?eT({mainAxis:!0,crossAxis:!1,limiter:"partial"===x?eA():void 0,...V}):void 0,A?e7({element:A,padding:v}):void 0,j?ek({...V}):void 0,{name:"size",options:c={...V,apply:({elements:e,availableWidth:t,availableHeight:n})=>{e.floating.style.setProperty("--radix-popper-available-width",`${t}px`),e.floating.style.setProperty("--radix-popper-available-height",`${n}px`)}},async fn(e){let t,n;let{placement:r,rects:i,platform:o,elements:a}=e,{apply:s,...l}=c,u=await em(e,l),d=es(r),f=el(r);"top"===d||"bottom"===d?(t=d,n=f===(await (null==o.isRTL?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(n=d,t="end"===f?"top":"bottom");let h=eg(u.left,0),p=eg(u.right,0),m=eg(u.top,0),v=eg(u.bottom,0),g={availableHeight:i.floating.height-(["left","right"].includes(r)?2*(0!==m||0!==v?m+v:eg(u.top,u.bottom)):u[t]),availableWidth:i.floating.width-(["top","bottom"].includes(r)?2*(0!==h||0!==p?h+p:eg(u.left,u.right)):u[n])},y=await o.getDimensions(a.floating);null==s||s({...e,...g});let b=await o.getDimensions(a.floating);return y.width!==b.width||y.height!==b.height?{reset:{rects:!0}}:{}}},hb({arrowWidth:R,arrowHeight:D}),w?eC({strategy:"referenceHidden"}):void 0].filter(hv)});(0,M.b)(()=>{I(_.anchor)},[I,_.anchor]);let K=null!==H&&null!==U,[Y,G]=hx(W),X=(0,lr.W)(k);(0,M.b)(()=>{K&&(null==X||X())},[K,X]);let J=null===(i=q.arrow)||void 0===i?void 0:i.x,Q=null===(o=q.arrow)||void 0===o?void 0:o.y,ee=(null===(a=q.arrow)||void 0===a?void 0:a.centerOffset)!==0,[et,en]=(0,b.useState)();(0,M.b)(()=>{C&&en(window.getComputedStyle(C).zIndex)},[C]);let{hasParent:er,positionUpdateFns:ei}=hh(hu,d),eo=!er;(0,b.useLayoutEffect)(()=>{if(!eo)return ei.add($),()=>{ei.delete($)}},[eo,ei,$]),(0,M.b)(()=>{eo&&K&&Array.from(ei).reverse().forEach(e=>requestAnimationFrame(e))},[eo,K,ei]);let ea={"data-side":Y,"data-align":G,...S,ref:T,style:{...S.style,animation:K?void 0:"none",opacity:null!==(s=q.hide)&&void 0!==s&&s.referenceHidden?0:void 0}};return(0,b.createElement)("div",{ref:Z,"data-radix-popper-content-wrapper":"",style:{position:B,left:0,top:0,transform:K?`translate3d(${Math.round(H)}px, ${Math.round(U)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:et,"--radix-popper-transform-origin":[null===(l=q.transformOrigin)||void 0===l?void 0:l.x,null===(u=q.transformOrigin)||void 0===u?void 0:u.y].join(" ")},dir:e.dir},(0,b.createElement)(hc,{scope:d,placedSide:Y,onArrowChange:P,arrowX:J,arrowY:Q,shouldHideArrow:ee},eo?(0,b.createElement)(hf,{scope:d,hasParent:!0,positionUpdateFns:ei},(0,b.createElement)(ht.div,ea)):(0,b.createElement)(ht.div,ea)))}),hm={top:"bottom",right:"left",bottom:"top",left:"right"};function hv(e){return void 0!==e}function hg(e){return null!==e}let hy=()=>({name:"anchorCssProperties",fn(e){let{rects:t,elements:n}=e,{width:r,height:i}=t.reference;return n.floating.style.setProperty("--radix-popper-anchor-width",`${r}px`),n.floating.style.setProperty("--radix-popper-anchor-height",`${i}px`),{}}}),hb=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,a;let{placement:s,rects:l,middlewareData:u}=t,c=(null===(n=u.arrow)||void 0===n?void 0:n.centerOffset)!==0,d=c?0:e.arrowWidth,f=c?0:e.arrowHeight,[h,p]=hx(s),m={start:"0%",center:"50%",end:"100%"}[p],v=(null!==(r=null===(i=u.arrow)||void 0===i?void 0:i.x)&&void 0!==r?r:0)+d/2,g=(null!==(o=null===(a=u.arrow)||void 0===a?void 0:a.y)&&void 0!==o?o:0)+f/2,y="",b="";return"bottom"===h?(y=c?m:`${v}px`,b=`${-f}px`):"top"===h?(y=c?m:`${v}px`,b=`${l.floating.height+f}px`):"right"===h?(y=`${-f}px`,b=c?m:`${g}px`):"left"===h&&(y=`${l.floating.width+f}px`,b=c?m:`${g}px`),{data:{x:y,y:b}}}});function hx(e){let[t,n="center"]=e.split("-");return[t,n]}let hw=e=>{let{__scopePopper:t,children:n}=e,[r,i]=(0,b.useState)(null);return(0,b.createElement)(ha,{scope:t,anchor:r,onAnchorChange:i},n)},hj=(0,b.forwardRef)((e,t)=>{var n;let{container:r=null==globalThis?void 0:null===(n=globalThis.document)||void 0===n?void 0:n.body,...i}=e;return r?e5.createPortal((0,b.createElement)(ht.div,(0,w.Z)({},i,{ref:t})),r):null}),hE="dismissableLayer.update",hk=(0,b.createContext)({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),hS=(0,b.forwardRef)((e,t)=>{var n;let{disableOutsidePointerEvents:i=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:l,onDismiss:u,...c}=e,d=(0,b.useContext)(hk),[f,h]=(0,b.useState)(null),p=null!==(n=null==f?void 0:f.ownerDocument)&&void 0!==n?n:null==globalThis?void 0:globalThis.document,[,m]=(0,b.useState)({}),v=(0,E.e)(t,e=>h(e)),g=Array.from(d.layers),[y]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),x=g.indexOf(y),j=f?g.indexOf(f):-1,k=d.layersWithOutsidePointerEventsDisabled.size>0,S=j>=x,C=function(e,t=null==globalThis?void 0:globalThis.document){let n=(0,lr.W)(e),r=(0,b.useRef)(!1),i=(0,b.useRef)(()=>{});return(0,b.useEffect)(()=>{let e=e=>{if(e.target&&!r.current){let r={originalEvent:e};function o(){hC("dismissableLayer.pointerDownOutside",n,r,{discrete:!0})}"touch"===e.pointerType?(t.removeEventListener("click",i.current),i.current=o,t.addEventListener("click",i.current,{once:!0})):o()}r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",e),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}(e=>{let t=e.target,n=[...d.branches].some(e=>e.contains(t));!S||n||(null==a||a(e),null==l||l(e),e.defaultPrevented||null==u||u())},p),O=function(e,t=null==globalThis?void 0:globalThis.document){let n=(0,lr.W)(e),r=(0,b.useRef)(!1);return(0,b.useEffect)(()=>{let e=e=>{e.target&&!r.current&&hC("dismissableLayer.focusOutside",n,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}(e=>{let t=e.target,n=[...d.branches].some(e=>e.contains(t));n||(null==s||s(e),null==l||l(e),e.defaultPrevented||null==u||u())},p);return!function(e,t=null==globalThis?void 0:globalThis.document){let n=(0,lr.W)(e);(0,b.useEffect)(()=>{let e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e),()=>t.removeEventListener("keydown",e)},[n,t])}(e=>{let t=j===d.layers.size-1;t&&(null==o||o(e),!e.defaultPrevented&&u&&(e.preventDefault(),u()))},p),(0,b.useEffect)(()=>{if(f)return i&&(0===d.layersWithOutsidePointerEventsDisabled.size&&(r=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),h_(),()=>{i&&1===d.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=r)}},[f,p,i,d]),(0,b.useEffect)(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),h_())},[f,d]),(0,b.useEffect)(()=>{let e=()=>m({});return document.addEventListener(hE,e),()=>document.removeEventListener(hE,e)},[]),(0,b.createElement)(ht.div,(0,w.Z)({},c,{ref:v,style:{pointerEvents:k?S?"auto":"none":void 0,...e.style},onFocusCapture:(0,_.M)(e.onFocusCapture,O.onFocusCapture),onBlurCapture:(0,_.M)(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:(0,_.M)(e.onPointerDownCapture,C.onPointerDownCapture)}))});function h_(){let e=new CustomEvent(hE);document.dispatchEvent(e)}function hC(e,t,n,{discrete:r}){let i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});(t&&i.addEventListener(e,t,{once:!0}),r)?i&&(0,e5.flushSync)(()=>i.dispatchEvent(o)):i.dispatchEvent(o)}let hO="HoverCard",[hM,hT]=(0,j.b)(hO,[ho]),hA=ho(),[hP,hN]=hM(hO),hR=(0,b.forwardRef)((e,t)=>{let{__scopeHoverCard:n,...r}=e,i=hN("HoverCardTrigger",n),o=hA(n);return(0,b.createElement)(hl,(0,w.Z)({asChild:!0},o),(0,b.createElement)(ht.a,(0,w.Z)({"data-state":i.open?"open":"closed"},r,{ref:t,onPointerEnter:(0,_.M)(e.onPointerEnter,hZ(i.onOpen)),onPointerLeave:(0,_.M)(e.onPointerLeave,hZ(i.onClose)),onFocus:(0,_.M)(e.onFocus,i.onOpen),onBlur:(0,_.M)(e.onBlur,i.onClose),onTouchStart:(0,_.M)(e.onTouchStart,e=>e.preventDefault())})))}),hD="HoverCardPortal",[hL,hF]=hM(hD,{forceMount:void 0}),hz="HoverCardContent",hV=(0,b.forwardRef)((e,t)=>{let n=hF(hz,e.__scopeHoverCard),{forceMount:r=n.forceMount,...i}=e,o=hN(hz,e.__scopeHoverCard);return(0,b.createElement)(T.z,{present:r||o.open},(0,b.createElement)(hI,(0,w.Z)({"data-state":o.open?"open":"closed"},i,{onPointerEnter:(0,_.M)(e.onPointerEnter,hZ(o.onOpen)),onPointerLeave:(0,_.M)(e.onPointerLeave,hZ(o.onClose)),ref:t})))}),hI=(0,b.forwardRef)((e,t)=>{let{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,...l}=e,u=hN(hz,n),c=hA(n),d=(0,b.useRef)(null),f=(0,E.e)(t,d),[h,p]=(0,b.useState)(!1);return(0,b.useEffect)(()=>{if(h){let e=document.body;return i=e.style.userSelect||e.style.webkitUserSelect,e.style.userSelect="none",e.style.webkitUserSelect="none",()=>{e.style.userSelect=i,e.style.webkitUserSelect=i}}},[h]),(0,b.useEffect)(()=>{if(d.current){let e=()=>{p(!1),u.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var e;let t=(null===(e=document.getSelection())||void 0===e?void 0:e.toString())!=="";t&&(u.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",e),()=>{document.removeEventListener("pointerup",e),u.hasSelectionRef.current=!1,u.isPointerDownOnContentRef.current=!1}}},[u.isPointerDownOnContentRef,u.hasSelectionRef]),(0,b.useEffect)(()=>{if(d.current){let e=function(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}(d.current);e.forEach(e=>e.setAttribute("tabindex","-1"))}}),(0,b.createElement)(hS,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:s,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:(0,_.M)(a,e=>{e.preventDefault()}),onDismiss:u.onDismiss},(0,b.createElement)(hp,(0,w.Z)({},c,l,{onPointerDown:(0,_.M)(l.onPointerDown,e=>{e.currentTarget.contains(e.target)&&p(!0),u.hasSelectionRef.current=!1,u.isPointerDownOnContentRef.current=!0}),ref:f,style:{...l.style,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)",userSelect:h?"text":void 0,WebkitUserSelect:h?"text":void 0}})))});function hZ(e){return t=>"touch"===t.pointerType?void 0:e()}let hB=e=>{let{__scopeHoverCard:t,children:n,open:r,defaultOpen:i,onOpenChange:o,openDelay:a=700,closeDelay:s=300}=e,l=hA(t),u=(0,b.useRef)(0),c=(0,b.useRef)(0),d=(0,b.useRef)(!1),f=(0,b.useRef)(!1),[h=!1,p]=(0,C.T)({prop:r,defaultProp:i,onChange:o}),m=(0,b.useCallback)(()=>{clearTimeout(c.current),u.current=window.setTimeout(()=>p(!0),a)},[a,p]),v=(0,b.useCallback)(()=>{clearTimeout(u.current),d.current||f.current||(c.current=window.setTimeout(()=>p(!1),s))},[s,p]),g=(0,b.useCallback)(()=>p(!1),[p]);return(0,b.useEffect)(()=>()=>{clearTimeout(u.current),clearTimeout(c.current)},[]),(0,b.createElement)(hP,{scope:t,open:h,onOpenChange:p,onOpen:m,onClose:v,onDismiss:g,hasSelectionRef:d,isPointerDownOnContentRef:f},(0,b.createElement)(hw,l,n))},hH=e=>{let{__scopeHoverCard:t,forceMount:n,children:r,container:i}=e,o=hN(hD,t);return(0,b.createElement)(hL,{scope:t,forceMount:n},(0,b.createElement)(T.z,{present:n||o.open},(0,b.createElement)(hj,{asChild:!0,container:i},r)))},hU=(0,eo.j)([s5,"relative","z-10","data-[side=top]:bottom-1","data-[side=top]:origin-bottom","data-[side=bottom]:top-1","data-[side=bottom]:origin-top","data-[side=left]:right-1","data-[side=left]:origin-right","data-[side=right]:left-1","data-[side=right]:origin-left"]),hW=(0,eo.cx)(t$(),"max-w-sm","py-0.5","px-1"),hq={show:{opacity:[0,1],scale:[.95,1],transition:{duration:.1,ease:"easeOut"}},exit:{opacity:[1,0],scale:[1,.95],transition:{duration:.1,ease:"easeIn"}}},h$=b.forwardRef((e,t)=>{let{trigger:n,children:r,rootProps:i,contentProps:o}=e,{className:a,...s}=o||{},{open:l,onOpenChange:u}=s0({open:null==i?void 0:i.open,onOpenChange:null==i?void 0:i.onOpenChange});return(0,y.jsxs)(hB,{open:l,onOpenChange:u,...i,children:[n&&(0,y.jsx)(hR,{asChild:!0,children:n}),(0,y.jsx)(ng,{children:l?(0,y.jsx)(hH,{forceMount:!0,children:(0,y.jsx)(hV,{asChild:!0,forceMount:!0,ref:t,...s,children:(0,y.jsx)(sQ.div,{variants:hq,initial:"init",animate:"show",exit:"exit",className:hU(),children:(0,y.jsx)("div",{className:(0,eo.cx)(hW,a),children:r})})})}):null})]})});function hK(e,t=[]){let n=[],r=()=>{let t=n.map(e=>(0,b.createContext)(e));return function(n){let r=(null==n?void 0:n[e])||t;return(0,b.useMemo)(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return r.scopeName=e,[function(t,r){let i=(0,b.createContext)(r),o=n.length;function a(t){let{scope:n,children:r,...a}=t,s=(null==n?void 0:n[e][o])||i,l=(0,b.useMemo)(()=>a,Object.values(a));return(0,b.createElement)(s.Provider,{value:l},r)}return n=[...n,r],a.displayName=t+"Provider",[a,function(n,a){let s=(null==a?void 0:a[e][o])||i,l=(0,b.useContext)(s);if(l)return l;if(void 0!==r)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e),o=i[`__scope${r}`];return{...t,...o}},{});return(0,b.useMemo)(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}(r,...t)]}function hY(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function hG(...e){return t=>e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}function hX(...e){return(0,b.useCallback)(hG(...e),e)}let hJ=(0,b.forwardRef)((e,t)=>{let{children:n,...r}=e,i=b.Children.toArray(n),o=i.find(h1);if(o){let e=o.props.children,n=i.map(t=>t!==o?t:b.Children.count(e)>1?b.Children.only(null):(0,b.isValidElement)(e)?e.props.children:null);return(0,b.createElement)(hQ,(0,w.Z)({},r,{ref:t}),(0,b.isValidElement)(e)?(0,b.cloneElement)(e,void 0,n):null)}return(0,b.createElement)(hQ,(0,w.Z)({},r,{ref:t}),n)});hJ.displayName="Slot";let hQ=(0,b.forwardRef)((e,t)=>{let{children:n,...r}=e;return(0,b.isValidElement)(n)?(0,b.cloneElement)(n,{...function(e,t){let n={...t};for(let r in t){let i=e[r],o=t[r],a=/^on[A-Z]/.test(r);a?i&&o?n[r]=(...e)=>{o(...e),i(...e)}:i&&(n[r]=i):"style"===r?n[r]={...i,...o}:"className"===r&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props),ref:t?hG(t,n.ref):n.ref}):b.Children.count(n)>1?b.Children.only(null):null});hQ.displayName="SlotClone";let h0=({children:e})=>(0,b.createElement)(b.Fragment,null,e);function h1(e){return(0,b.isValidElement)(e)&&e.type===h0}let h2=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{let n=(0,b.forwardRef)((e,n)=>{let{asChild:r,...i}=e,o=r?hJ:t;return(0,b.useEffect)(()=>{window[Symbol.for("radix-ui")]=!0},[]),(0,b.createElement)(o,(0,w.Z)({},i,{ref:n}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function h4(e){let t=(0,b.useRef)(e);return(0,b.useEffect)(()=>{t.current=e}),(0,b.useMemo)(()=>(...e)=>{var n;return null===(n=t.current)||void 0===n?void 0:n.call(t,...e)},[])}let h3=(null==globalThis?void 0:globalThis.document)?b.useLayoutEffect:()=>{},h5=e=>{let{present:t,children:n}=e,r=function(e){var t;let[n,r]=(0,b.useState)(),i=(0,b.useRef)({}),o=(0,b.useRef)(e),a=(0,b.useRef)("none"),s=e?"mounted":"unmounted",[l,u]=(t={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},(0,b.useReducer)((e,n)=>{let r=t[e][n];return null!=r?r:e},s));return(0,b.useEffect)(()=>{let e=h6(i.current);a.current="mounted"===l?e:"none"},[l]),h3(()=>{let t=i.current,n=o.current,r=n!==e;if(r){let r=a.current,i=h6(t);e?u("MOUNT"):"none"===i||(null==t?void 0:t.display)==="none"?u("UNMOUNT"):n&&r!==i?u("ANIMATION_OUT"):u("UNMOUNT"),o.current=e}},[e,u]),h3(()=>{if(n){let e=e=>{let t=h6(i.current),r=t.includes(e.animationName);e.target===n&&r&&(0,e5.flushSync)(()=>u("ANIMATION_END"))},t=e=>{e.target===n&&(a.current=h6(i.current))};return n.addEventListener("animationstart",t),n.addEventListener("animationcancel",e),n.addEventListener("animationend",e),()=>{n.removeEventListener("animationstart",t),n.removeEventListener("animationcancel",e),n.removeEventListener("animationend",e)}}u("ANIMATION_END")},[n,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:(0,b.useCallback)(e=>{e&&(i.current=getComputedStyle(e)),r(e)},[])}}(t),i="function"==typeof n?n({present:r.isPresent}):b.Children.only(n),o=hX(r.ref,i.ref),a="function"==typeof n;return a||r.isPresent?(0,b.cloneElement)(i,{ref:o}):null};function h6(e){return(null==e?void 0:e.animationName)||"none"}h5.displayName="Presence";let h8=x["useId".toString()]||(()=>void 0),h7=0;function h9(e){let t=e+"CollectionProvider",[n,r]=hK(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=e+"CollectionSlot",s=b.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=o(a,n),s=hX(t,i.collectionRef);return b.createElement(hJ,{ref:s},r)}),l=e+"CollectionItemSlot",u="data-radix-collection-item",c=b.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,a=b.useRef(null),s=hX(t,a),c=o(l,n);return b.useEffect(()=>(c.itemMap.set(a,{ref:a,...i}),()=>void c.itemMap.delete(a))),b.createElement(hJ,{[u]:"",ref:s},r)});return[{Provider:e=>{let{scope:t,children:n}=e,r=b.useRef(null),o=b.useRef(new Map).current;return b.createElement(i,{scope:t,itemMap:o,collectionRef:r},n)},Slot:s,ItemSlot:c},function(t){let n=o(e+"CollectionConsumer",t),r=b.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${u}]`)),r=Array.from(n.itemMap.values()),i=r.sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current));return i},[n.collectionRef,n.itemMap]);return r},r]}let pe="dismissableLayer.update",pt=(0,b.createContext)({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),pn=(0,b.forwardRef)((e,t)=>{var n;let{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:l,onDismiss:u,...c}=e,d=(0,b.useContext)(pt),[f,h]=(0,b.useState)(null),p=null!==(n=null==f?void 0:f.ownerDocument)&&void 0!==n?n:null==globalThis?void 0:globalThis.document,[,m]=(0,b.useState)({}),v=hX(t,e=>h(e)),g=Array.from(d.layers),[y]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),x=g.indexOf(y),j=f?g.indexOf(f):-1,E=d.layersWithOutsidePointerEventsDisabled.size>0,k=j>=x,S=function(e,t=null==globalThis?void 0:globalThis.document){let n=h4(e),r=(0,b.useRef)(!1),i=(0,b.useRef)(()=>{});return(0,b.useEffect)(()=>{let e=e=>{if(e.target&&!r.current){let r={originalEvent:e};function o(){pi("dismissableLayer.pointerDownOutside",n,r,{discrete:!0})}"touch"===e.pointerType?(t.removeEventListener("click",i.current),i.current=o,t.addEventListener("click",i.current,{once:!0})):o()}r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",e),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}(e=>{let t=e.target,n=[...d.branches].some(e=>e.contains(t));!k||n||(null==a||a(e),null==l||l(e),e.defaultPrevented||null==u||u())},p),_=function(e,t=null==globalThis?void 0:globalThis.document){let n=h4(e),r=(0,b.useRef)(!1);return(0,b.useEffect)(()=>{let e=e=>{e.target&&!r.current&&pi("dismissableLayer.focusOutside",n,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}(e=>{let t=e.target,n=[...d.branches].some(e=>e.contains(t));n||(null==s||s(e),null==l||l(e),e.defaultPrevented||null==u||u())},p);return!function(e,t=null==globalThis?void 0:globalThis.document){let n=h4(e);(0,b.useEffect)(()=>{let e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e),()=>t.removeEventListener("keydown",e)},[n,t])}(e=>{let t=j===d.layers.size-1;t&&(null==i||i(e),!e.defaultPrevented&&u&&(e.preventDefault(),u()))},p),(0,b.useEffect)(()=>{if(f)return r&&(0===d.layersWithOutsidePointerEventsDisabled.size&&(o=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),pr(),()=>{r&&1===d.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=o)}},[f,p,r,d]),(0,b.useEffect)(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),pr())},[f,d]),(0,b.useEffect)(()=>{let e=()=>m({});return document.addEventListener(pe,e),()=>document.removeEventListener(pe,e)},[]),(0,b.createElement)(h2.div,(0,w.Z)({},c,{ref:v,style:{pointerEvents:E?k?"auto":"none":void 0,...e.style},onFocusCapture:hY(e.onFocusCapture,_.onFocusCapture),onBlurCapture:hY(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:hY(e.onPointerDownCapture,S.onPointerDownCapture)}))});function pr(){let e=new CustomEvent(pe);document.dispatchEvent(e)}function pi(e,t,n,{discrete:r}){var i,o;let a=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?(i=a,o=s,i&&(0,e5.flushSync)(()=>i.dispatchEvent(o))):a.dispatchEvent(s)}(e,t)=>(0,b.createElement)(h2.span,(0,w.Z)({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));let po="NavigationMenu",[pa,ps,pl]=h9(po),[pu,pc,pd]=h9(po),[pf,ph]=hK(po,[pl,pd]),[pp,pm]=pf(po),[pv,pg]=pf(po),[py,pb]=pf("NavigationMenuItem"),px=((e,t)=>{let{__scopeNavigationMenu:n,...r}=e,i=pm("NavigationMenuIndicator",n),o=ps(n),[a,s]=(0,b.useState)(null),[l,u]=(0,b.useState)(null),c="horizontal"===i.orientation,d=!!i.value;(0,b.useEffect)(()=>{var e;let t=o(),n=null===(e=t.find(e=>e.value===i.value))||void 0===e?void 0:e.ref.current;n&&s(n)},[o,i.value]);let f=()=>{a&&u({size:c?a.offsetWidth:a.offsetHeight,offset:c?a.offsetLeft:a.offsetTop})};return p_(a,f),p_(i.indicatorTrack,f),l?(0,b.createElement)(h2.div,(0,w.Z)({"aria-hidden":!0,"data-state":d?"visible":"hidden","data-orientation":i.orientation},r,{ref:t,style:{position:"absolute",...c?{left:0,width:l.size+"px",transform:`translateX(${l.offset}px)`}:{top:0,height:l.size+"px",transform:`translateY(${l.offset}px)`},...r.style}})):null},"NavigationMenuContent"),pw=((e,t)=>{let n=pm(px,e.__scopeNavigationMenu),{onViewportContentChange:r,onViewportContentRemove:i}=n;return h3(()=>{r(e.value,{ref:t,...e})},[e,t,r]),h3(()=>()=>i(e.value),[e.value,i]),null},"navigationMenu.rootContentDismiss"),pj=(0,b.forwardRef)((e,t)=>{let{__scopeNavigationMenu:n,value:r,triggerRef:i,focusProxyRef:o,wasEscapeCloseRef:a,onRootContentClose:s,onContentFocusOutside:l,...u}=e,c=pm(px,n),d=(0,b.useRef)(null),f=hX(d,t),h=function(e,t){return`${e}-trigger-${t}`}(c.baseId,r),p=function(e,t){return`${e}-content-${t}`}(c.baseId,r),m=ps(n),v=(0,b.useRef)(null),{onItemDismiss:g}=c;(0,b.useEffect)(()=>{let e=d.current;if(c.isRootMenu&&e){let t=()=>{var t;g(),s(),e.contains(document.activeElement)&&(null===(t=i.current)||void 0===t||t.focus())};return e.addEventListener(pw,t),()=>e.removeEventListener(pw,t)}},[c.isRootMenu,e.value,i,g,s]);let y=(0,b.useMemo)(()=>{let e=m(),t=e.map(e=>e.value);"rtl"===c.dir&&t.reverse();let n=t.indexOf(c.value),i=t.indexOf(c.previousValue),o=r===c.value,a=i===t.indexOf(r);if(!o&&!a)return v.current;let s=(()=>{if(n!==i){if(o&&-1!==i)return n>i?"from-end":"from-start";if(a&&-1!==n)return n>i?"to-start":"to-end"}return null})();return v.current=s,s},[c.previousValue,c.value,c.dir,m,r]);return(0,b.createElement)(pE,{asChild:!0},(0,b.createElement)(pn,(0,w.Z)({id:p,"aria-labelledby":h,"data-motion":y,"data-orientation":c.orientation},u,{ref:f,onDismiss:()=>{var e;let t=new Event(pw,{bubbles:!0,cancelable:!0});null===(e=d.current)||void 0===e||e.dispatchEvent(t)},onFocusOutside:hY(e.onFocusOutside,e=>{var t;l();let n=e.target;null!==(t=c.rootNavigationMenu)&&void 0!==t&&t.contains(n)&&e.preventDefault()}),onPointerDownOutside:hY(e.onPointerDownOutside,e=>{var t;let n=e.target,r=m().some(e=>{var t;return null===(t=e.ref.current)||void 0===t?void 0:t.contains(n)}),i=c.isRootMenu&&(null===(t=c.viewport)||void 0===t?void 0:t.contains(n));(r||i||!c.isRootMenu)&&e.preventDefault()}),onKeyDown:hY(e.onKeyDown,e=>{let t=e.altKey||e.ctrlKey||e.metaKey,n="Tab"===e.key&&!t;if(n){let t=function(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}(e.currentTarget),n=document.activeElement,i=t.findIndex(e=>e===n),a=e.shiftKey,s=a?t.slice(0,i).reverse():t.slice(i+1,t.length);if(pS(s))e.preventDefault();else{var r;null===(r=o.current)||void 0===r||r.focus()}}}),onEscapeKeyDown:hY(e.onEscapeKeyDown,e=>{a.current=!0})})))}),pE=((e,t)=>{let{__scopeNavigationMenu:n,children:r,...i}=e,o=pm("NavigationMenuViewport",n),a=hX(t,o.onViewportChange),s=pg(px,e.__scopeNavigationMenu),[l,u]=(0,b.useState)(null),[c,d]=(0,b.useState)(null),f=l?(null==l?void 0:l.width)+"px":void 0,h=l?(null==l?void 0:l.height)+"px":void 0,p=!!o.value,m=p?o.value:o.previousValue;return p_(c,()=>{c&&u({width:c.offsetWidth,height:c.offsetHeight})}),(0,b.createElement)(h2.div,(0,w.Z)({"data-state":function(e){return e?"open":"closed"}(p),"data-orientation":o.orientation},i,{ref:a,style:{pointerEvents:!p&&o.isRootMenu?"none":void 0,"--radix-navigation-menu-viewport-width":f,"--radix-navigation-menu-viewport-height":h,...i.style},onPointerEnter:hY(e.onPointerEnter,o.onContentEnter),onPointerLeave:hY(e.onPointerLeave,function(e){return t=>"mouse"===t.pointerType?e(t):void 0}(o.onContentLeave))}),Array.from(s.items).map(([e,{ref:t,forceMount:n,...r}])=>{let i=m===e;return(0,b.createElement)(h5,{key:e,present:n||i},(0,b.createElement)(pj,(0,w.Z)({},r,{ref:hG(t,e=>{i&&e&&d(e)})})))}))},(0,b.forwardRef)((e,t)=>{let{__scopeNavigationMenu:n,...r}=e,i=pm("FocusGroup",n);return(0,b.createElement)(pu.Provider,{scope:n},(0,b.createElement)(pu.Slot,{scope:n},(0,b.createElement)(h2.div,(0,w.Z)({dir:i.dir},r,{ref:t}))))})),pk=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"];(e,t)=>{let{__scopeNavigationMenu:n,...r}=e,i=pc(n),o=pm("FocusGroupItem",n);return(0,b.createElement)(pu.ItemSlot,{scope:n},(0,b.createElement)(h2.button,(0,w.Z)({},r,{ref:t,onKeyDown:hY(e.onKeyDown,e=>{let t=["Home","End",...pk].includes(e.key);if(t){let t=i().map(e=>e.ref.current),n="rtl"===o.dir?"ArrowRight":"ArrowLeft";if([n,"ArrowUp","End"].includes(e.key)&&t.reverse(),pk.includes(e.key)){let n=t.indexOf(e.currentTarget);t=t.slice(n+1)}setTimeout(()=>pS(t)),e.preventDefault()}})})))};function pS(e){let t=document.activeElement;return e.some(e=>e===t||(e.focus(),document.activeElement!==t))}function p_(e,t){let n=h4(t);h3(()=>{let t=0;if(e){let r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e,n])}var pC=n(38617);let pO=b.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,y.jsx)(dY,{...r,ref:t,className:(0,eo.cx)("select-none flex items-center rounded cursor-pointer","focus:ring ring-blue-500 dark:ring-blue-200","text-gray-700 dark:text-graydark-700","data-[state=checked]:text-gray-1100 data-[state=checked]:dark:text-white",n)})});function pM(e){let{className:t,tooltipClassName:n,tabIndex:r}=e,{theme:i,setTheme:o}=(0,pC.F)();return(0,y.jsxs)(dK,{value:i,tabIndex:r,className:(0,eo.cx)("flex gap-4",t),onValueChange:e=>o(e),children:[(0,y.jsx)(pO,{value:"system",children:(0,y.jsx)(s8,{className:n,sideOffset:16,content:"System",children:(0,y.jsx)(le.$Iz,{})})}),(0,y.jsx)(pO,{value:"light",children:(0,y.jsx)(s8,{className:n,sideOffset:16,content:"Light",children:(0,y.jsx)(le.JaG,{})})}),(0,y.jsx)(pO,{value:"dark",children:(0,y.jsx)(s8,{className:n,sideOffset:16,content:"Dark",children:(0,y.jsx)(le.osk,{})})})]})}var pT=n(74424);function pA(e){let{title:t,children:n,rootClassName:r,className:i,message:o,showBorderInactive:a,...s}=e,{getRootProps:l,getInputProps:u,isDragActive:c}=(0,pT.uI)(s);return(0,y.jsxs)("div",{...l(),className:(0,eo.cx)("outline-none",r),children:[(0,y.jsxs)("div",{className:(0,eo.cx)(c?"z-20":"","absolute","top-0","left-0","w-full","h-full","pointer-events-none","rounded","p-4","flex justify-center items-center text-center","border-2 border-dashed",a?["border-green-600 dark:border-green-500","hover:border-green-700 hover:dark:border-green-500"]:"border-transparent",c?["border-green-500 dark:border-green-600 bg-green-100/20 dark:bg-green-100/20","hover:border-green-500 hover:dark:border-green-600 hover:bg-green-100/20 hover:dark:bg-green-100/20"]:"",i),children:[(0,y.jsx)("input",{...u()}),o&&(0,y.jsx)(tq,{size:"14",children:t||"Drop your files here or click to to open the file picker."})]}),n]})}var pP=n(14582),pN=n(63739),pR=n(13980),pD=n.n(pR),pL=n(72779),pF=n.n(pL),pz=n(47440),pV=n(59309),pI=n(19067),pZ=n(71220),pB=n(28142);function pH(e){return"bandwidth"in e?e.bandwidth():0}var pU=["top","left","scale","width","stroke","strokeWidth","strokeDasharray","className","children","numTicks","lineStyle","offset","tickValues"];function pW(){return(pW=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,pU),g=null!=m?m:(0,pZ.Z)(r,void 0===f?10:f),y=(null!=p?p:0)+pH(r)/2,x=g.map(function(e,t){var n,o=(null!=(n=(0,pB.Z)(r(e)))?n:0)+y;return{index:t,from:new pI.Z({x:0,y:o}),to:new pI.Z({x:i,y:o})}});return b.createElement(pV.Z,{className:pF()("visx-rows",c),top:void 0===t?0:t,left:void 0===n?0:n},d?d({lines:x}):x.map(function(e){var t=e.from,n=e.to,r=e.index;return b.createElement(pz.default,pW({key:"row-line-"+r,from:t,to:n,stroke:a,strokeWidth:l,strokeDasharray:u,style:h},v))}))}pq.propTypes={tickValues:pD().array,width:pD().number.isRequired};var p$=["top","left","scale","height","stroke","strokeWidth","strokeDasharray","className","numTicks","lineStyle","offset","tickValues","children"];function pK(){return(pK=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,p$),g=null!=p?p:(0,pZ.Z)(r,void 0===d?10:d),y=(null!=h?h:0)+pH(r)/2,x=g.map(function(e,t){var n,o=(null!=(n=(0,pB.Z)(r(e)))?n:0)+y;return{index:t,from:new pI.Z({x:o,y:0}),to:new pI.Z({x:o,y:i})}});return b.createElement(pV.Z,{className:pF()("visx-columns",c),top:void 0===t?0:t,left:void 0===n?0:n},m?m({lines:x}):x.map(function(e){var t=e.from,n=e.to,r=e.index;return b.createElement(pz.default,pK({key:"column-line-"+r,from:t,to:n,stroke:a,strokeWidth:l,strokeDasharray:u,style:f},v))}))}pY.propTypes={tickValues:pD().array,height:pD().number.isRequired};var pG=n(64183),pX=n(8597);function pJ(e){var t=e.id,n=e.width,r=e.height,i=e.children;return b.createElement("defs",null,b.createElement("pattern",{id:t,width:n,height:r,patternUnits:"userSpaceOnUse"},i))}pJ.propTypes={id:pD().string.isRequired,width:pD().number.isRequired,height:pD().number.isRequired,children:pD().node.isRequired};var pQ={horizontal:"horizontal",vertical:"vertical",diagonal:"diagonal",diagonalRightToLeft:"diagonalRightToLeft"};function p0(e){var t=e.id,n=e.width,r=e.height,i=e.stroke,o=e.strokeWidth,a=e.strokeDasharray,s=e.strokeLinecap,l=void 0===s?"square":s,u=e.shapeRendering,c=void 0===u?"auto":u,d=e.orientation,f=void 0===d?["vertical"]:d,h=e.background,p=e.className,m=Array.isArray(f)?f:[f];return b.createElement(pJ,{id:t,width:n,height:r},!!h&&b.createElement("rect",{className:pF()("visx-pattern-line-background"),width:n,height:r,fill:h}),m.map(function(e,n){return b.createElement("path",{key:"visx-"+t+"-line-"+e+"-"+n,className:pF()("visx-pattern-line",p),d:function(e){var t=e.height;switch(e.orientation){case pQ.horizontal:return"M 0,"+t/2+" l "+t+",0";case pQ.diagonal:return"M 0,"+t+" l "+t+","+-t+" M "+-t/4+","+t/4+" l "+t/2+","+-t/2+"\n M "+3/4*t+","+5/4*t+" l "+t/2+","+-t/2;case pQ.diagonalRightToLeft:return"M 0,0 l "+t+","+t+"\n M "+-t/4+","+3/4*t+" l "+t/2+","+t/2+"\n M "+3/4*t+","+-t/4+" l "+t/2+","+t/2;case pQ.vertical:default:return"M "+t/2+", 0 l 0, "+t}}({orientation:e,height:r}),stroke:i,strokeWidth:o,strokeDasharray:a,strokeLinecap:l,shapeRendering:c})}))}p0.propTypes={id:pD().string.isRequired,width:pD().number.isRequired,height:pD().number.isRequired,className:pD().string,background:pD().string,stroke:pD().string,strokeWidth:pD().oneOfType([pD().number,pD().string]),strokeDasharray:pD().oneOfType([pD().string,pD().number]),strokeLinecap:pD().oneOf(["square","butt","round","inherit"]),shapeRendering:pD().oneOfType([pD().string,pD().number]),orientation:pD().array};var p1=["tooltipOpen"];function p2(){return(p2=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,p4);return b.createElement("div",p3({ref:t,className:pF()("visx-tooltip",n),style:p3({top:null==r||null==l?r:r+l,left:null==i||null==a?i:i+a},m&&{position:"absolute"},!h&&c)},v),d)});function p8(){return(p8=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,mn),g=!1,y=!1;if(u&&l){var x=void 0===r?0:r,w=void 0===f?0:f;if(l.width){var j=x+o+u.width-l.width,E=u.width-x-o;g=j>0&&j>E}else{var k=x+o+u.width-window.innerWidth,S=u.width-x-o;g=k>0&&k>S}if(l.height){var _=w+s+u.height-l.height,C=u.height-w-s;y=_>0&&_>C}else y=w+s+u.height>window.innerHeight;x=g?x-u.width-o:x+o,w=y?w-u.height-s:w+s,t="translate("+(x=Math.round(x))+"px, "+(w=Math.round(w))+"px)"}return b.createElement(p6,mr({ref:m,style:mr({left:0,top:0,transform:t},!p&&d)},v),b.createElement(mt,{value:{isFlippedVertically:!y,isFlippedHorizontally:!g}},n))}mi.propTypes={nodeRef:pD().oneOfType([pD().string,pD().func,pD().object])};var mo=((Er=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={rect:void 0,parentRect:void 0},n.nodeRef=b.createRef(),n.getRects=n.getRects.bind(function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n)),n}t.prototype=Object.create(e.prototype),t.prototype.constructor=t,p7(t,e);var n=t.prototype;return n.componentDidMount=function(){var e,t=this;this.node=null!=(e=this.nodeRef)&&e.current?this.nodeRef.current:e5.findDOMNode(this),this.setState(function(){return t.getRects()})},n.getRects=function(){if(!this.node)return this.state;var e=this.node,t=e.parentNode;return{rect:e.getBoundingClientRect?e.getBoundingClientRect():p9,parentRect:null!=t&&t.getBoundingClientRect?t.getBoundingClientRect():p9}},n.render=function(){return b.createElement(mi,p8({nodeRef:this.nodeRef,getRects:this.getRects},this.state,this.props))},t}(b.PureComponent)).displayName="withBoundingRects("+(mi.displayName||"")+")",Er),ma=n(99985);function ms(e,t){if("invert"in e&&void 0!==e.invert)return e.invert(t).valueOf();var n=e.range(),r=n[0],i=n[1],o=0,a=("step"in e&&void 0!==e.step?e.step():1)*(i-r)/Math.abs(i-r);if(a>0)for(;t>r+a*(o+1);)o+=1;else for(;t0?Math.min(e.dx,t.bounds.x1-a):Math.max(e.dx,t.bounds.x0-r),u=e.dy>0?Math.min(e.dy,t.bounds.y1-s):Math.max(e.dy,t.bounds.y0-i);return mv({},t,{isBrushing:!0,extent:mv({},t.extent,{x0:r+l,x1:a+l,y0:i+u,y1:s+u})})})},t.selectionDragEnd=function(){var e=t.props,n=e.updateBrush,r=e.onBrushEnd,i=e.onMoveSelectionChange;e.isControlled||n(function(e){var t=mv({},e,{isBrushing:!1,start:mv({},e.start,{x:Math.min(e.extent.x0,e.extent.x1),y:Math.min(e.extent.y0,e.extent.y1)}),end:mv({},e.end,{x:Math.max(e.extent.x0,e.extent.x1),y:Math.max(e.extent.y0,e.extent.y1)})});return r&&r(t),t}),i&&i()},t}return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,mg(t,e),t.prototype.render=function(){var e=this.props,t=e.width,n=e.height,r=e.stageWidth,i=e.stageHeight,o=e.brush,a=e.disableDraggingSelection,s=e.onMouseLeave,l=e.onMouseMove,u=e.onMouseUp,c=e.onClick,d=e.selectedBoxStyle,f=e.isControlled,h=e.isDragInProgress;return b.createElement(ma.Z,{width:t,height:n,resetOnStart:!0,onDragStart:this.selectionDragStart,onDragMove:this.selectionDragMove,onDragEnd:this.selectionDragEnd,isDragging:f?h:void 0},function(e){var h=e.isDragging,p=e.dragStart,m=e.dragEnd,v=e.dragMove;return b.createElement("g",null,h&&b.createElement("rect",{width:r,height:i,fill:"transparent",onPointerUp:f?void 0:m,onPointerMove:v,onPointerLeave:f?void 0:m,style:my}),b.createElement("rect",mv({x:Math.min(o.extent.x0,o.extent.x1),y:Math.min(o.extent.y0,o.extent.y1),width:t,height:n,className:"visx-brush-selection",onPointerDown:a?void 0:p,onPointerLeave:function(e){s&&s(e)},onPointerMove:function(e){v(e),l&&l(e)},onPointerUp:function(e){f||m(e),u&&u(e)},onClick:function(e){c&&c(e)},style:{pointerEvents:o.isBrushing||o.activeHandle?"none":"all",cursor:a?void 0:"move"}},d)))})},t}(b.Component);function mx(){return(mx=Object.assign?Object.assign.bind():function(e){for(var t=1;t0?Math.min(l,e.bounds.x1-o):Math.max(l,e.bounds.x0-n),c=u>0?Math.min(u,e.bounds.y1-a):Math.max(u,e.bounds.y0-r);return mx({},e,{isBrushing:!0,extent:mx({},e.extent,{x0:n+s,y0:r+c,x1:o+s,y1:a+c})})}),"select"===i&&n.updateBrush(function(e){var t=e.start,r=t.x,i=t.y,o={x:Math.min(Math.max(r+l,e.bounds.x0),e.bounds.x1),y:Math.min(Math.max(i+u,e.bounds.y0),e.bounds.y1)},a=n.getExtent(s,o);return mx({},e,{end:o,extent:a})})}},n.getExtent=function(e,t){var r=n.props,i=r.brushDirection,o=r.width,a=r.height;return{x0:"vertical"===i?0:Math.min(e.x||0,t.x||0),x1:"vertical"===i?o:Math.max(e.x||0,t.x||0),y0:"horizontal"===i?0:Math.min(e.y||0,t.y||0),y1:"horizontal"===i?a:Math.max(e.y||0,t.y||0)}},n.handleDragStart=function(e){var t=n.props,r=t.onBrushStart,i=t.left,o=t.top,a=t.inheritedMargin,s=t.useWindowMoveEvents,l=null!=a&&a.left?a.left:0,u=null!=a&&a.top?a.top:0,c={x:(e.x||0)+e.dx-i-l,y:(e.y||0)+e.dy-o-u},d=mx({},c);r&&r(c),n.updateBrush(function(t){return mx({},t,{start:c,end:d,extent:{x0:-1,x1:-1,y0:-1,y1:-1},isBrushing:!0,brushingType:"select",brushPageOffset:s?mu(e.event):void 0})})},n.handleBrushStart=function(e){var t=n.props,r=t.onBrushStart,i=t.left,o=t.top,a=t.inheritedMargin;if(r){var s=null!=a&&a.left?a.left:0,l=null!=a&&a.top?a.top:0;r({x:(e.x||0)+e.dx-i-s,y:(e.y||0)+e.dy-o-l})}},n.handleDragMove=function(e){var t=n.props,r=t.left,i=t.top,o=t.inheritedMargin,a=t.useWindowMoveEvents;if(e.isDragging&&!a){var s=(null==o?void 0:o.left)||0,l=(null==o?void 0:o.top)||0,u={x:(e.x||0)+e.dx-r-s,y:(e.y||0)+e.dy-i-l};n.updateBrush(function(e){var t=e.start,r=n.getExtent(t,u);return mx({},e,{end:u,extent:r})})}},n.handleDragEnd=function(){var e=n.props,t=e.onBrushEnd,r=e.resetOnEnd;e.useWindowMoveEvents||n.updateBrush(function(e){var i=e.extent,o=mx({},e,{start:{x:i.x0,y:i.y0},end:{x:i.x1,y:i.y1},isBrushing:!1,brushingType:void 0,activeHandle:null});return t&&t(o),r&&n.reset(),o})},n.getBrushWidth=function(){var e=n.state.extent,t=e.x0,r=e.x1;return Math.max(Math.max(t,r)-Math.min(t,r),0)},n.getBrushHeight=function(){var e=n.state.extent,t=e.y1,r=e.y0;return Math.max(Math.max(r,t)-Math.min(r,t),0)},n.handles=function(){var e=n.props.handleSize,t=n.state.extent,r=t.x0,i=t.x1,o=t.y0,a=t.y1,s=e/2,l=n.getBrushWidth(),u=n.getBrushHeight();return{top:{x:r-s,y:o-s,height:e,width:l+e},bottom:{x:r-s,y:a-s,height:e,width:l+e},right:{x:i-s,y:o-s,height:u+e,width:e},left:{x:r-s,y:o-s,height:u+e,width:e}}},n.corners=function(){var e=n.props.handleSize,t=n.state.extent,r=t.x0,i=t.x1,o=t.y0,a=t.y1,s=e/2;return{topLeft:{x:Math.min(r,i)-s,y:Math.min(o,a)-s,width:e,height:e},topRight:{x:Math.max(r,i)-s,y:Math.min(o,a)-s,width:e,height:e},bottomLeft:{x:Math.min(r,i)-s,y:Math.max(o,a)-s,width:e,height:e},bottomRight:{x:Math.max(r,i)-s,y:Math.max(o,a)-s,width:e,height:e}}},n.updateBrush=function(e){var t=n.props.onChange;n.setState(e,function(){t&&t(n.state)})},n.reset=function(){var e=n.props,t=e.width,r=e.height;n.updateBrush(function(){return{start:{x:0,y:0},end:{x:0,y:0},extent:{x0:-1,x1:-1,y0:-1,y1:-1},bounds:{x0:0,x1:t,y0:0,y1:r},isBrushing:!1,brushPageOffset:void 0,activeHandle:null,brushingType:void 0}})},n.handleBrushingTypeChange=function(e,t){n.updateBrush(function(n){var r=mx({},n,{brushingType:e,isBrushing:void 0!==e});return(t||void 0===e)&&(r.brushPageOffset=t),r})};var n,r=t.initialBrushPosition,i=r?n.getExtent(r.start,r.end):{x0:-1,x1:-1,y0:-1,y1:-1};return n.state={start:{x:Math.max(0,i.x0),y:Math.max(0,i.y0)},end:{x:Math.max(0,i.x1),y:Math.max(0,i.y1)},extent:i,bounds:{x0:0,x1:n.props.width,y0:0,y1:n.props.height},isBrushing:!1,brushingType:void 0,activeHandle:null},n}t.prototype=Object.create(e.prototype),t.prototype.constructor=t,mw(t,e);var n=t.prototype;return n.componentDidUpdate=function(e){var t=this;(this.props.width!==e.width||this.props.height!==e.height)&&this.setState(function(n){var r=n.start,i=n.end,o=n.extent;if(!(-1===o.x0&&-1===o.x1&&-1===o.y0&&-1===o.y1)){var a=t.props.width/e.width,s=t.props.height/e.height;r={x:a*o.x0,y:s*o.y0},i={x:a*o.x1,y:s*o.y1},o=t.getExtent(r,i)}return{start:r,end:i,extent:o,bounds:{x0:0,x1:t.props.width,y0:0,y1:t.props.height}}})},n.componentDidMount=function(){this.props.useWindowMoveEvents&&(window.addEventListener("mouseup",this.handleWindowPointerUp),window.addEventListener("mousemove",this.handleWindowPointerMove))},n.componentWillUnmount=function(){this.props.useWindowMoveEvents&&(window.removeEventListener("mouseup",this.handleWindowPointerUp),window.removeEventListener("mousemove",this.handleWindowPointerMove))},n.render=function(){var e=this,t=this.state,n=t.start,r=t.end,i=this.props,o=i.top,a=i.left,s=i.width,l=i.height,u=i.onMouseLeave,c=i.onMouseUp,d=i.onMouseMove,f=i.onBrushEnd,h=i.onClick,p=i.resizeTriggerAreas,m=i.selectedBoxStyle,v=i.disableDraggingSelection,g=i.clickSensitivity,y=i.useWindowMoveEvents,x=i.renderBrushHandle,w=this.state.brushingType,j=this.handles(),E=this.corners(),k=this.getBrushWidth(),S=this.getBrushHeight(),_=new Set(p);return b.createElement(pV.Z,{className:"visx-brush",top:o,left:a},b.createElement(ma.Z,{width:s,height:l,resetOnStart:!0,onDragStart:this.handleDragStart,onDragMove:this.handleDragMove,onDragEnd:this.handleDragEnd,isDragging:y?"select"===w:void 0},function(t){var n=t.dragStart,r=t.isDragging,i=t.dragMove,o=t.dragEnd;return b.createElement(pP.Z,{className:"visx-brush-overlay",fill:"transparent",x:0,y:0,width:s,height:l,onDoubleClick:function(){return e.reset()},onClick:function(t){var n=e.mouseUpTime-e.mouseDownTime;h&&n=0||(i[n]=e[n]);return i}(e,mO),g=o,y=s,x=a,w=l;return void 0!==m&&!m||g||y||x||w||(g="0",y="0",x="0",w="1"),b.createElement("defs",null,b.createElement("linearGradient",mM({id:n,x1:g,y1:x,x2:y,y2:w,gradientTransform:h?"rotate("+h+")":p},v),!!t&&t,!t&&b.createElement("stop",{offset:void 0===u?"0%":u,stopColor:r,stopOpacity:void 0===c?1:c}),!t&&b.createElement("stop",{offset:void 0===d?"100%":d,stopColor:i,stopOpacity:void 0===f?1:f})))}mT.propTypes={id:pD().string.isRequired,from:pD().string,to:pD().string,x1:pD().oneOfType([pD().string,pD().number]),x2:pD().oneOfType([pD().string,pD().number]),y1:pD().oneOfType([pD().string,pD().number]),y2:pD().oneOfType([pD().string,pD().number]),fromOffset:pD().oneOfType([pD().string,pD().number]),fromOpacity:pD().oneOfType([pD().string,pD().number]),toOffset:pD().oneOfType([pD().string,pD().number]),toOpacity:pD().oneOfType([pD().string,pD().number]),rotate:pD().oneOfType([pD().string,pD().number]),transform:pD().string,children:pD().node,vertical:pD().bool};var mA=n(78307),mP=n(74747);function mN(e,t){let n;if(void 0===t)for(let t of e)null!=t&&(n=t)&&(n=t);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(n=i)&&(n=i)}return n}var mR=n(12436),mD=n.n(mR),mL=n(55746),mF=n(45742),mz=n(27266),mV=["id","markerWidth","markerHeight","markerUnits","children"];function mI(){return(mI=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,mV);return b.createElement("defs",null,b.createElement("marker",mI({id:t,markerWidth:void 0===n?3:n,markerHeight:void 0===r?3:r,markerUnits:void 0===i?"userSpaceOnUse":i},a),o))}mZ.propTypes={id:pD().string.isRequired,size:pD().number,markerWidth:pD().oneOfType([pD().string,pD().number]),markerHeight:pD().oneOfType([pD().string,pD().number]),markerUnits:pD().string,refX:pD().oneOfType([pD().string,pD().number]),refY:pD().oneOfType([pD().string,pD().number]),strokeWidth:pD().number,children:pD().node.isRequired};var mB=["id","size","strokeWidth"];function mH(){return(mH=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,mB),s=2*r+o,l=s/2;return b.createElement(mZ,mH({id:t,markerWidth:s,markerHeight:s,refX:0,refY:l,orient:"auto-start-reverse",markerUnits:"strokeWidth",strokeWidth:o},a),b.createElement("circle",{r:r,cx:l,cy:l}))}var mW=n(64170),mq={top:"top",left:"left",bottom:"bottom"};function m$(){return(m$=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,m1),k=null!=g?g:"tickFormat"in v?v.tickFormat():mJ.Z,S=h===mq.left,_=h===mq.top,C=_||h===mq.bottom,O=function(e,t){if(void 0===t&&(t="center"),"start"!==t&&"bandwidth"in e){var n=e.bandwidth();return"center"===t&&(n/=2),e.round()&&(n=Math.round(n)),function(t){var r=e(t);return"number"==typeof r?r+n:r}}return e}(v),M=S||_?-1:1,T=v.range(),A=(void 0===(t=m)&&(t=0),"number"==typeof t?{start:t,end:t}:m0({start:0,end:0},t)),P=mQ({x:Number(T[0])+.5-A.start,y:0},C),N=mQ({x:Number(T[T.length-1])+.5+A.end,y:0},C),R=(null!=w?w:(0,pZ.Z)(v,d)).filter(function(e){return!l||0!==e&&"0"!==e}).map(function(e,t){return{value:e,index:t}}),D=R.map(function(e){var t=e.value,n=e.index,r=(0,pB.Z)(O(t));return{value:t,index:n,from:mQ({x:r,y:0},C),to:mQ({x:r,y:x*M},C),formattedValue:k(t,n,R)}});return b.createElement(pV.Z,{className:pF()("visx-axis",i),top:void 0===j?0:j,left:void 0===u?0:u},r(m2({},E,{axisFromPoint:P,axisToPoint:N,hideAxisLine:void 0!==o&&o,hideTicks:void 0!==a&&a,hideZero:l,horizontal:C,numTicks:d,orientation:h,rangePadding:m,scale:v,tickFormat:k,tickLength:x,tickPosition:O,tickSign:M,ticks:D})))}var m3=["axisClassName","labelOffset","tickLabelProps","tickLength"];function m5(){return(m5=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,m3);return b.createElement(m4,m5({axisClassName:pF()("visx-axis-bottom",t),labelOffset:void 0===n?8:n,orientation:mq.bottom,tickLabelProps:void 0===r?m6:r,tickLength:void 0===i?8:i},o))}var m7=["axisClassName","labelOffset","tickLabelProps","tickLength"];function m9(){return(m9=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,m7);return b.createElement(m4,m9({axisClassName:pF()("visx-axis-left",t),labelOffset:void 0===n?36:n,orientation:mq.left,tickLabelProps:void 0===r?ve:r,tickLength:void 0===i?8:i},o))}let vn=e=>new Date((null==e?void 0:e.timestamp)||0),vr=e=>(null==e?void 0:e.value)||0,vi="var(--colors-hiContrast)",vo={textAnchor:"middle",fontFamily:"var(--fonts-sans)",fontSize:10,fill:vi},va={dx:"-0.25em",dy:"0.25em",fontFamily:"var(--fonts-sans)",fontSize:10,textAnchor:"end",fill:vi};function vs(e){let{data:t,gradientColor:n,width:r,yMax:i,margin:o,xScale:a,yScale:s,hideBottomAxis:l=!1,hideLeftAxis:u=!1,top:c,left:d,curve:f="step",children:h}=e;return r<10?null:(0,y.jsxs)(pV.Z,{left:d||o.left,top:c||o.top,children:[(0,y.jsx)(mU,{id:"marker-circle",fill:"var(--colors-accent11)",size:1.5,refX:1.5}),(0,y.jsx)(mT,{id:"gradient",from:n,fromOpacity:1,to:n,toOpacity:.2}),(0,y.jsx)(mL.Z,{data:t,x:e=>a(vn(e))||0,y:e=>s(vr(e))||0,yScale:s,strokeWidth:1,stroke:"url(#gradient)",fill:"url(#gradient)",markerMid:"url(#marker-circle)",curve:"step"===f?mF.ZP:mz.Z}),!l&&(0,y.jsx)(m8,{top:i,scale:a,numTicks:r>520?10:5,stroke:vi,tickStroke:vi,tickLabelProps:()=>vo}),!u&&(0,y.jsx)(vt,{scale:s,numTicks:5,stroke:vi,tickStroke:vi,tickLabelProps:()=>va}),h]})}var vl=n(6692);let vu={inherit:vl.inherit,current:vl.current,transparent:vl.transparent,black:vl.black,white:vl.white,slate:vl.slate,zinc:vl.zinc,neutral:vl.neutral,stone:vl.stone,red:vl.red,orange:vl.orange,amber:vl.amber,yellow:vl.yellow,lime:vl.lime,green:vl.green,emerald:vl.emerald,teal:vl.teal,cyan:vl.cyan,sky:vl.sky,blue:vl.blue,indigo:vl.indigo,violet:vl.violet,purple:vl.purple,fuchsia:vl.fuchsia,pink:vl.pink,rose:vl.rose,mask:"rgba(30, 169, 76, .3)",accent:{50:"#F6FFF9",100:"#E9FBEF",200:"#D5F2DE",300:"#C9EED4",400:"#BBE8C9",500:"#9BDAAE",600:"#71C48A",700:"#3EAA5F",800:"#05872D",900:"#056B24",1e3:"#04511B",1100:"#011F0A"},accentdark:{50:"#05150A",100:"#051C0C",200:"#062811",300:"#073515",400:"#064018",500:"#075820",600:"#056824",700:"#077A2A",800:"#05872D",900:"#069F35",1e3:"#2FA052",1100:"#D9F4E1"},gray:{50:"hsl(206, 30.0%, 98.8%)",100:"hsl(210, 16.7%, 97.6%)",200:"hsl(209, 13.3%, 95.3%)",300:"hsl(209, 12.2%, 93.2%)",400:"hsl(208, 11.7%, 91.1%)",500:"hsl(208, 11.3%, 88.9%)",600:"hsl(207, 11.1%, 85.9%)",700:"hsl(205, 10.7%, 78.0%)",800:"hsl(206, 6.0%, 56.1%)",900:"hsl(206, 5.8%, 52.3%)",1e3:"hsl(206, 6.0%, 43.5%)",1100:"hsl(206, 24.0%, 9.0%)"},graydark:{50:"hsl(200, 7.0%, 8.8%)",100:"hsl(195, 7.1%, 11.0%)",200:"hsl(197, 6.8%, 13.6%)",300:"hsl(198, 6.6%, 15.8%)",400:"hsl(199, 6.4%, 17.9%)",500:"hsl(201, 6.2%, 20.5%)",600:"hsl(203, 6.0%, 24.3%)",700:"hsl(207, 5.6%, 31.6%)",800:"hsl(206, 6.0%, 43.9%)",900:"hsl(206, 5.2%, 49.5%)",1e3:"hsl(206, 6.0%, 63.0%)",1100:"hsl(210, 6.0%, 93.0%)"}};var vc=n(96206);let vd={top:10,bottom:15,left:10,right:10},vf="brush_pattern",vh="brush_gradient",vp=mD()(e=>e(),15),vm=(0,mA.Z)(e=>new Date((null==e?void 0:e.timestamp)||0)).left;void 0===Ei&&(Ei={style:{position:"relative",width:"inherit",height:"inherit"}}),void 0===Eo&&(Eo=function(e,t){return b.createElement("div",t,e)});var vv=n(70390),vg=n(3440),vy=n.n(vg);function vb(e){let{id:t,width:n,height:r,accessors:i,animationTrajectory:o,curve:a,data:s,config:l,scales:u,enabledGraph:c,enabledTip:d,isStack:f,todayOffset:h,numTicks:p,renderAreaSeries:m,renderAreaStack:v,renderBarGroup:g,renderBarStack:x,enableTooltipGlyph:w,renderTooltipGlyph:j,renderLineSeries:E,sharedTooltip:k,showHorizontalCrosshair:S,showTooltip:_,showVerticalCrosshair:C,snapTooltipToDatum:O,stackOffset:M,margin:T,theme:A,xAxisOrientation:P,yAxisOrientation:N,AreaSeries:R,AreaStack:D,Axis:L,BarGroup:F,BarSeries:z,BarStack:V,Grid:I,LineSeries:Z,Tooltip:B,XYChart:H}=e;return(0,y.jsxs)(H,{theme:A.xyChartTheme,xScale:u.x,yScale:u.y,height:Math.min(400,r),margin:T,captureEvents:!0,children:[(0,y.jsx)("g",{children:(0,y.jsx)("rect",{className:"fill-gray-600 dark:fill-graydark-600 h-full w-px y-0",style:{left:"".concat(100*h,"%")}})},"today-line-".concat(n,"-").concat(r)),(0,y.jsx)(mT,{id:"gradient-default",from:"gray",fromOpacity:1,to:"gray",toOpacity:.4}),Object.entries(l.data).map(e=>{let[n,r]=e,i=r.color;return(0,y.jsxs)(b.Fragment,{children:[(0,y.jsx)(p0,{id:"pattern-".concat(vx(t,n)),height:6,width:6,stroke:i,strokeWidth:.5,orientation:["diagonal"]}),(0,y.jsx)(mT,{id:"gradient-".concat(vx(t,n)),from:i,fromOpacity:1,to:i,toOpacity:f?.4:1})]},n)}),(0,y.jsx)(I,{rows:!1,columns:!0,strokeDasharray:"1,3",animationTrajectory:o,numTicks:p},"grid-".concat(o)),x&&(0,y.jsx)(V,{offset:M,children:c.map(e=>(0,y.jsx)(z,{dataKey:e,data:s,xAccessor:i.x[e],yAccessor:i.y[e],colorAccessor:()=>vw(t,e,l)},e))}),g&&(0,y.jsx)(F,{children:c.map(e=>(0,y.jsx)(z,{dataKey:e,data:s,xAccessor:i.x[e],yAccessor:i.y[e],colorAccessor:()=>vw(t,e,l)},e))}),m&&(0,y.jsx)(y.Fragment,{children:c.map(e=>(0,y.jsx)(R,{dataKey:e,data:s,xAccessor:i.x[e],yAccessor:i.y[e],stroke:vw(t,e,l),fill:vw(t,e,l),curve:a},e))}),v&&(0,y.jsx)(D,{curve:a,offset:M,renderLine:"wiggle"!==M,children:c.map(e=>(0,y.jsx)(R,{dataKey:e,data:s,xAccessor:i.x[e],yAccessor:i.y[e],stroke:vw(t,e,l),fill:vw(t,e,l)},e))}),E&&(0,y.jsx)(y.Fragment,{children:c.map(e=>{var t,n;return(0,y.jsx)(Z,{dataKey:e,data:s,xAccessor:i.x[e],yAccessor:i.y[e],stroke:(null===(n=l.data)||void 0===n?void 0:null===(t=n[e])||void 0===t?void 0:t.color)||"gray",curve:a},e)})}),(0,y.jsx)(L,{orientation:P,numTicks:p,animationTrajectory:o,tickFormat:e=>(0,vc.rN)(e),tickLength:12,tickLabelProps:e=>({...e,fill:A.labels.color,fontFamily:A.labels.fontFamily,y:"14px",fontWeight:"500",fontSize:"8"})},"time-axis-".concat(o)),(0,y.jsx)(L,{label:null==M?"SC":"expand"===M?"Fraction of total":"",orientation:N,numTicks:p,tickLength:0,rangePadding:0,animationTrajectory:o,tickFormat:()=>""},"temp-axis-".concat(o)),_&&(0,y.jsx)(B,{showHorizontalCrosshair:S,showVerticalCrosshair:C,snapTooltipToDatumX:O,snapTooltipToDatumY:O,showDatumGlyph:O&&!g,showSeriesGlyphs:k&&!g,renderGlyph:w?j:void 0,renderTooltip:e=>{var t,n;let{tooltipData:r}=e,o=null==r?void 0:null===(t=r.nearestDatum)||void 0===t?void 0:t.datum,a=null==r?void 0:null===(n=r.nearestDatum)||void 0===n?void 0:n.key,s=k?d:a?[a]:[],u=l.formatTimestamp||(e=>(0,vc.rN)(e,{timeStyle:"short",hour12:!1})),c=s.map(e=>{var t,n;return{key:e,category:(null===(n=l.data)||void 0===n?void 0:null===(t=n[e])||void 0===t?void 0:t.category)||""}}),h=vy()(c,"category"),p=l.categories?l.categories.map(e=>[e,h[e]]):Object.entries(h);return(0,y.jsxs)("div",{className:(0,eo.cx)(s5,"flex flex-col gap-2 py-1"),children:[(0,y.jsx)(tW,{font:"mono",size:"12",color:"contrast",className:"text-end",children:o?u(i.date(o)):"No date"}),(0,y.jsx)(cj,{color:"panel",className:"w-full"}),(0,y.jsx)("div",{className:(0,eo.cx)("grid gap-x-6 gap-y-4",p.length>1?"grid-cols-2":"grid-cols-1"),children:p.map(e=>{let[t,n]=e,r=o?n.reduce((e,t)=>{let{key:n}=t,r=i.y[n](o);return null==r||Number.isNaN(r)?e:e+r},0):0;return(0,y.jsxs)("div",{className:"flex flex-col gap-2 w-[250px]",children:[t&&(0,y.jsx)(tW,{weight:"semibold",children:t}),(0,y.jsxs)("div",{className:"grid grid-cols-2 gap-x-2 gap-y-1 items-center",children:[n.map(e=>{var t,n,r,s;let{key:u}=e,c=o&&i.y[u](o);return(0,y.jsxs)(b.Fragment,{children:[(0,y.jsx)(tW,{color:"accent",style:{color:null===(n=l.data)||void 0===n?void 0:null===(t=n[u])||void 0===t?void 0:t.color},className:(0,eo.cx)(a===u?"underline":""),children:(null===(s=l.data)||void 0===s?void 0:null===(r=s[u])||void 0===r?void 0:r.label)||u}),(0,y.jsx)(tW,{size:"12",style:{textAlign:"end"},className:(0,eo.cx)(a===u?"underline":""),children:null==c||Number.isNaN(c)?"–":l.format(c)})]},u)}),n.length>1&&f&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(tW,{className:"pt-2",children:"total"}),(0,y.jsx)(tW,{size:"12",weight:"bold",className:"pt-2 text-end",children:l.format(r)})]})]})]},t)})})]})}})]})}function vx(e,t){return"".concat(e,"-").concat(t)}function vw(e,t,n){var r;let i=vx(e,t);return(null===(r=n.data)||void 0===r?void 0:r[t])?n.data[t].pattern?"url(#pattern-".concat(i,")"):"url(#gradient-".concat(i,")"):"url(#gradient-default)"}var vj=n(24037),vE=n(86707);function vk(e){var t=e.top,n=e.left,r=e.className,i=e.children;return b.createElement(pV.Z,{className:pF()("visx-glyph",r),top:void 0===t?0:t,left:void 0===n?0:n},i)}vk.propTypes={top:pD().number,left:pD().number,className:pD().string,children:pD().node};var vS=["children","className","top","left","size"];function v_(){return(v_=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,vS),s=(0,vj.Z)();return(s.type(vE.Z),"number"==typeof o?s.size(o):o&&s.size(o),t)?b.createElement(b.Fragment,null,t({path:s})):b.createElement(vk,{top:r,left:i},b.createElement("path",v_({className:pF()("visx-glyph-star",n),d:s()||""},a)))}vC.propTypes={children:pD().func,className:pD().string,top:pD().number,left:pD().number,size:pD().oneOfType([pD().number,pD().func])};var vO=["top","left","className"];function vM(){return(vM=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,vO);return b.createElement(vk,{top:void 0===t?0:t,left:void 0===n?0:n},b.createElement("circle",vM({className:pF()("visx-glyph-dot",r)},i)))}vT.propTypes={className:pD().string,top:pD().number,left:pD().number,r:pD().number,cx:pD().number,cy:pD().number};var vA=n(9135),vP=["children","className","top","left","size"];function vN(){return(vN=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,vP),s=(0,vj.Z)();return(s.type(vA.Z),"number"==typeof o?s.size(o):o&&s.size(o),t)?b.createElement(b.Fragment,null,t({path:s})):b.createElement(vk,{top:r,left:i},b.createElement("path",vN({className:pF()("visx-glyph-cross",n),d:s()||""},a)))}vR.propTypes={children:pD().func,className:pD().string,top:pD().number,left:pD().number,size:pD().oneOfType([pD().number,pD().func])};var vD=n(46385),vL=n(20651),vF={red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"]},vz=vF.gray,vV=vz[7],vI=[vF.cyan[9],vF.cyan[3],vF.yellow[5],vF.red[4],vF.grape[8],vF.grape[5],vF.pink[9]];function vZ(){return(vZ=Object.assign?Object.assign.bind():function(e){for(var t=1;t{for(var n in t)vq(e,n,{get:t[n],enumerable:!0})})(v$,{assign:()=>gm,colors:()=>gf,createStringInterpolator:()=>El,skipAnimation:()=>gh,to:()=>Eu,willAdvance:()=>gp});var vK=ge(),vY=e=>v6(e,vK),vG=ge();vY.write=e=>v6(e,vG);var vX=ge();vY.onStart=e=>v6(e,vX);var vJ=ge();vY.onFrame=e=>v6(e,vJ);var vQ=ge();vY.onFinish=e=>v6(e,vQ);var v0=[];vY.setTimeout=(e,t)=>{let n=vY.now()+t,r=()=>{let e=v0.findIndex(e=>e.cancel==r);~e&&v0.splice(e,1),v3-=~e?1:0},i={time:n,handler:e,cancel:r};return v0.splice(v1(n),0,i),v3+=1,v8(),i};var v1=e=>~(~v0.findIndex(t=>t.time>e)||~v0.length);vY.cancel=e=>{vX.delete(e),vJ.delete(e),vQ.delete(e),vK.delete(e),vG.delete(e)},vY.sync=e=>{v5=!0,vY.batchedUpdates(e),v5=!1},vY.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...e){t=e,vY.onStart(n)}return r.handler=e,r.cancel=()=>{vX.delete(n),t=null},r};var v2="undefined"!=typeof window?window.requestAnimationFrame:()=>{};vY.use=e=>v2=e,vY.now="undefined"!=typeof performance?()=>performance.now():Date.now,vY.batchedUpdates=e=>e(),vY.catch=console.error,vY.frameLoop="always",vY.advance=()=>{"demand"!==vY.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):v9()};var v4=-1,v3=0,v5=!1;function v6(e,t){v5?(t.delete(e),e(0)):(t.add(e),v8())}function v8(){v4<0&&(v4=0,"demand"!==vY.frameLoop&&v2(v7))}function v7(){~v4&&(v2(v7),vY.batchedUpdates(v9))}function v9(){let e=v4;v4=vY.now();let t=v1(v4);if(t&&(gt(v0.splice(0,t),e=>e.handler()),v3-=t),!v3){v4=-1;return}vX.flush(),vK.flush(e?Math.min(64,v4-e):16.667),vJ.flush(),vG.flush(),vQ.flush()}function ge(){let e=new Set,t=e;return{add(n){v3+=t!=e||e.has(n)?0:1,e.add(n)},delete:n=>(v3-=t==e&&e.has(n)?1:0,e.delete(n)),flush(n){t.size&&(e=new Set,v3-=t.size,gt(t,t=>t(n)&&e.add(t)),v3+=e.size,t=e)}}}function gt(e,t){e.forEach(e=>{try{t(e)}catch(e){vY.catch(e)}})}function gn(){}var gr=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),gi={arr:Array.isArray,obj:e=>!!e&&"Object"===e.constructor.name,fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,und:e=>void 0===e};function go(e,t){if(gi.arr(e)){if(!gi.arr(t)||e.length!==t.length)return!1;for(let n=0;ne.forEach(t);function gs(e,t,n){if(gi.arr(e)){for(let r=0;rgi.und(e)?[]:gi.arr(e)?e:[e];function gu(e,t){if(e.size){let n=Array.from(e);e.clear(),ga(n,t)}}var gc=(e,...t)=>gu(e,e=>e(...t)),gd=()=>"undefined"==typeof window||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),gf=null,gh=!1,gp=gn,gm=e=>{e.to&&(Eu=e.to),e.now&&(vY.now=e.now),void 0!==e.colors&&(gf=e.colors),null!=e.skipAnimation&&(gh=e.skipAnimation),e.createStringInterpolator&&(El=e.createStringInterpolator),e.requestAnimationFrame&&vY.use(e.requestAnimationFrame),e.batchedUpdates&&(vY.batchedUpdates=e.batchedUpdates),e.willAdvance&&(gp=e.willAdvance),e.frameLoop&&(vY.frameLoop=e.frameLoop)},gv=new Set,gg=[],gy=[],gb=0,gx={get idle(){return!gv.size&&!gg.length},start(e){gb>e.priority?(gv.add(e),vY.onStart(gw)):(gj(e),vY(gk))},advance:gk,sort(e){if(gb)vY.onFrame(()=>gx.sort(e));else{let t=gg.indexOf(e);~t&&(gg.splice(t,1),gE(e))}},clear(){gg=[],gv.clear()}};function gw(){gv.forEach(gj),gv.clear(),vY(gk)}function gj(e){gg.includes(e)||gE(e)}function gE(e){gg.splice(function(e,t){let n=e.findIndex(t);return n<0?e.length:n}(gg,t=>t.priority>e.priority),0,e)}function gk(e){let t=gy;for(let n=0;n0}var gS="[-+]?\\d*\\.?\\d+",g_=gS+"%";function gC(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var gO=RegExp("rgb"+gC(gS,gS,gS)),gM=RegExp("rgba"+gC(gS,gS,gS,gS)),gT=RegExp("hsl"+gC(gS,g_,g_)),gA=RegExp("hsla"+gC(gS,g_,g_,gS)),gP=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,gN=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,gR=/^#([0-9a-fA-F]{6})$/,gD=/^#([0-9a-fA-F]{8})$/;function gL(e,t,n){return(n<0&&(n+=1),n>1&&(n-=1),n<1/6)?e+(t-e)*6*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function gF(e,t,n){let r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,o=gL(i,r,e+1/3),a=gL(i,r,e),s=gL(i,r,e-1/3);return Math.round(255*o)<<24|Math.round(255*a)<<16|Math.round(255*s)<<8}function gz(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function gV(e){let t=parseFloat(e);return(t%360+360)%360/360}function gI(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function gZ(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function gB(e){let t;let n="number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=gR.exec(e))?parseInt(t[1]+"ff",16)>>>0:gf&&void 0!==gf[e]?gf[e]:(t=gO.exec(e))?(gz(t[1])<<24|gz(t[2])<<16|gz(t[3])<<8|255)>>>0:(t=gM.exec(e))?(gz(t[1])<<24|gz(t[2])<<16|gz(t[3])<<8|gI(t[4]))>>>0:(t=gP.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=gD.exec(e))?parseInt(t[1],16)>>>0:(t=gN.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=gT.exec(e))?(255|gF(gV(t[1]),gZ(t[2]),gZ(t[3])))>>>0:(t=gA.exec(e))?(gF(gV(t[1]),gZ(t[2]),gZ(t[3]))|gI(t[4]))>>>0:null;if(null===n)return e;n=n||0;let r=(4278190080&n)>>>24,i=(16711680&n)>>>16,o=(65280&n)>>>8,a=(255&n)/255;return`rgba(${r}, ${i}, ${o}, ${a})`}var gH=(e,t,n)=>{if(gi.fun(e))return e;if(gi.arr(e))return gH({range:e,output:t,extrapolate:n});if(gi.str(e.output[0]))return El(e);let r=e.output,i=e.range||[0,1],o=e.extrapolateLeft||e.extrapolate||"extend",a=e.extrapolateRight||e.extrapolate||"extend",s=e.easing||(e=>e);return t=>{let n=function(e,t){for(var n=1;n=e);++n);return n-1}(t,i);return function(e,t,n,r,i,o,a,s,l){let u=l?l(e):e;if(un){if("identity"===s)return u;"clamp"===s&&(u=n)}return r===i?r:t===n?e<=t?r:i:(t===-1/0?u=-u:n===1/0?u-=t:u=(u-t)/(n-t),u=o(u),r===-1/0?u=-u:i===1/0?u+=r:u=u*(i-r)+r,u)}(t,i[n],i[n+1],r[n],r[n+1],s,o,a,e.map)}},gU=Symbol.for("FluidValue.get"),gW=Symbol.for("FluidValue.observers"),gq=e=>!!(e&&e[gU]),g$=e=>e&&e[gU]?e[gU]():e,gK=e=>e[gW]||null;function gY(e,t){let n=e[gW];n&&n.forEach(e=>{e.eventObserved?e.eventObserved(t):e(t)})}var gG=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");gX(this,e)}},gX=(e,t)=>g0(e,gU,t);function gJ(e,t){if(e[gU]){let n=e[gW];n||g0(e,gW,n=new Set),!n.has(t)&&(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function gQ(e,t){let n=e[gW];if(n&&n.has(t)){let r=n.size-1;r?n.delete(t):e[gW]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var g0=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),g1=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,g2=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,g4=RegExp(`(${g1.source})(%|[a-z]+)`,"i"),g3=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,g5=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,g6=e=>{let[t,n]=g8(e);if(!t||gd())return e;let r=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(r)return r.trim();if(n&&n.startsWith("--")){let e=window.getComputedStyle(document.documentElement).getPropertyValue(n);if(e)return e}else if(n&&g5.test(n))return g6(n);else if(n)return n;return e},g8=e=>{let t=g5.exec(e);if(!t)return[,];let[,n,r]=t;return[n,r]},g7=(e,t,n,r,i)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${i})`,g9=e=>{Ec||(Ec=gf?RegExp(`(${Object.keys(gf).join("|")})(?!\\w)`,"g"):/^\b$/);let t=e.output.map(e=>g$(e).replace(g5,g6).replace(g2,gB).replace(Ec,gB)),n=t.map(e=>e.match(g1).map(Number)),r=n[0].map((e,t)=>n.map(e=>{if(!(t in e))throw Error('The arity of each "output" value must be equal');return e[t]})),i=r.map(t=>gH({...e,output:t}));return e=>{let n=!g4.test(t[0])&&t.find(e=>g4.test(e))?.replace(g1,""),r=0;return t[0].replace(g1,()=>`${i[r++](e)}${n||""}`).replace(g3,g7)}},ye="react-spring: ",yt=e=>{let t=!1;if("function"!=typeof e)throw TypeError(`${ye}once requires a function parameter`);return(...n)=>{t||(e(...n),t=!0)}},yn=yt(console.warn),yr=yt(console.warn);function yi(e){return gi.str(e)&&("#"==e[0]||/\d/.test(e)||!gd()&&g5.test(e)||e in(gf||{}))}var yo=gd()?b.useEffect:b.useLayoutEffect,ya=()=>{let e=(0,b.useRef)(!1);return yo(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function ys(){let e=(0,b.useState)()[1],t=ya();return()=>{t.current&&e(Math.random())}}var yl=e=>(0,b.useEffect)(e,yu),yu=[];function yc(e){let t=(0,b.useRef)();return(0,b.useEffect)(()=>{t.current=e}),t.current}var yd=Symbol.for("Animated:node"),yf=e=>!!e&&e[yd]===e,yh=e=>e&&e[yd],yp=(e,t)=>gr(e,yd,t),ym=e=>e&&e[yd]&&e[yd].getPayload(),yv=class{constructor(){yp(this,this)}getPayload(){return this.payload||[]}},yg=class extends yv{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,gi.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new yg(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return gi.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value!==e&&(this._value=e,!0)}reset(){let{done:e}=this;this.done=!1,gi.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},yy=class extends yg{constructor(e){super(0),this._string=null,this._toString=gH({output:[e,e]})}static create(e){return new yy(e)}getValue(){let e=this._string;return null==e?this._string=this._toString(this._value):e}setValue(e){if(gi.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else{if(!super.setValue(e))return!1;this._string=null}return!0}reset(e){e&&(this._toString=gH({output:[this.getValue(),e]})),this._value=0,super.reset()}},yb={dependencies:null},yx=class extends yv{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){let t={};return gs(this.source,(n,r)=>{yf(n)?t[r]=n.getValue(e):gq(n)?t[r]=g$(n):e||(t[r]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&ga(this.payload,e=>e.reset())}_makePayload(e){if(e){let t=new Set;return gs(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){yb.dependencies&&gq(e)&&yb.dependencies.add(e);let t=ym(e);t&&ga(t,e=>this.add(e))}},yw=class extends yx{constructor(e){super(e)}static create(e){return new yw(e)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){let t=this.getPayload();return e.length==t.length?t.map((t,n)=>t.setValue(e[n])).some(Boolean):(super.setValue(e.map(yj)),!0)}};function yj(e){let t=yi(e)?yy:yg;return t.create(e)}function yE(e){let t=yh(e);return t?t.constructor:gi.arr(e)?yw:yi(e)?yy:yg}var yk=(e,t)=>{let n=!gi.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,b.forwardRef)((r,i)=>{let o=(0,b.useRef)(null),a=n&&(0,b.useCallback)(e=>{o.current=(i&&(gi.fun(i)?i(e):i.current=e),e)},[i]),[s,l]=function(e,t){let n=new Set;return yb.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new yx(e),yb.dependencies=null,[e,n]}(r,t),u=ys(),c=()=>{let e=o.current;if(n&&!e)return;let r=!!e&&t.applyAnimatedValues(e,s.getValue(!0));!1===r&&u()},d=new yS(c,l),f=(0,b.useRef)();yo(()=>(f.current=d,ga(l,e=>gJ(e,d)),()=>{f.current&&(ga(f.current.deps,e=>gQ(e,f.current)),vY.cancel(f.current.update))})),(0,b.useEffect)(c,[]),yl(()=>()=>{let e=f.current;ga(e.deps,t=>gQ(t,e))});let h=t.getComponentProps(s.getValue());return b.createElement(e,{...h,ref:a})})},yS=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){"change"==e.type&&vY.write(this.update)}},y_=Symbol.for("AnimatedComponent"),yC=e=>gi.str(e)?e:e&&gi.str(e.displayName)?e.displayName:gi.fun(e)&&e.name||null;function yO(e,...t){return gi.fun(e)?e(...t):e}var yM=(e,t)=>!0===e||!!(t&&e&&(gi.fun(e)?e(t):gl(e).includes(t))),yT=(e,t)=>gi.obj(e)?t&&e[t]:e,yA=(e,t)=>!0===e.default?e[t]:e.default?e.default[t]:void 0,yP=e=>e,yN=(e,t=yP)=>{let n=yR;e.default&&!0!==e.default&&(n=Object.keys(e=e.default));let r={};for(let i of n){let n=t(e[i],i);gi.und(n)||(r[i]=n)}return r},yR=["config","onProps","onStart","onChange","onPause","onResume","onRest"],yD={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function yL(e){let t=function(e){let t={},n=0;if(gs(e,(e,r)=>{!yD[r]&&(t[r]=e,n++)}),n)return t}(e);if(t){let n={to:t};return gs(e,(e,r)=>r in t||(n[r]=e)),n}return{...e}}function yF(e){return e=g$(e),gi.arr(e)?e.map(yF):yi(e)?v$.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function yz(e){for(let t in e)return!0;return!1}function yV(e){return gi.fun(e)||gi.arr(e)&&gi.obj(e[0])}function yI(e,t){e.ref?.delete(e),t?.delete(e)}function yZ(e,t){t&&e.ref!==t&&(e.ref?.delete(e),t.add(e),e.ref=t)}var yB={tension:170,friction:26,mass:1,damping:1,easing:e=>e,clamp:!1},yH=class{constructor(){this.velocity=0,Object.assign(this,yB)}};function yU(e,t){if(gi.und(t.decay)){let n=!gi.und(t.tension)||!gi.und(t.friction);!n&&gi.und(t.frequency)&&gi.und(t.damping)&&gi.und(t.mass)||(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}else e.duration=void 0}var yW=[],yq=class{constructor(){this.changed=!1,this.values=yW,this.toValues=null,this.fromValues=yW,this.config=new yH,this.immediate=!1}};function y$(e,{key:t,props:n,defaultProps:r,state:i,actions:o}){return new Promise((a,s)=>{let l,u;let c=yM(n.cancel??r?.cancel,t);if(c)h();else{gi.und(n.pause)||(i.paused=yM(n.pause,t));let e=r?.pause;!0!==e&&(e=i.paused||yM(e,t)),l=yO(n.delay||0,t),e?(i.resumeQueue.add(f),o.pause()):(o.resume(),f())}function d(){i.resumeQueue.add(f),i.timeouts.delete(u),u.cancel(),l=u.time-vY.now()}function f(){l>0&&!v$.skipAnimation?(i.delayed=!0,u=vY.setTimeout(h,l),i.pauseQueue.add(d),i.timeouts.add(u)):h()}function h(){i.delayed&&(i.delayed=!1),i.pauseQueue.delete(d),i.timeouts.delete(u),e<=(i.cancelId||0)&&(c=!0);try{o.start({...n,callId:e,cancel:c},a)}catch(e){s(e)}}})}var yK=(e,t)=>1==t.length?t[0]:t.some(e=>e.cancelled)?yX(e.get()):t.every(e=>e.noop)?yY(e.get()):yG(e.get(),t.every(e=>e.finished)),yY=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),yG=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),yX=e=>({value:e,cancelled:!0,finished:!1});function yJ(e,t,n,r){let{callId:i,parentId:o,onRest:a}=t,{asyncTo:s,promise:l}=n;return o||e!==s||t.reset?n.promise=(async()=>{let u,c,d;n.asyncId=i,n.asyncTo=e;let f=yN(t,(e,t)=>"onRest"===t?void 0:e),h=new Promise((e,t)=>(u=e,c=t)),p=e=>{let t=i<=(n.cancelId||0)&&yX(r)||i!==n.asyncId&&yG(r,!1);if(t)throw e.result=t,c(e),e},m=(e,t)=>{let o=new y0,a=new y1;return(async()=>{if(v$.skipAnimation)throw yQ(n),a.result=yG(r,!1),c(a),a;p(o);let s=gi.obj(e)?{...e}:{...t,to:e};s.parentId=i,gs(f,(e,t)=>{gi.und(s[t])&&(s[t]=e)});let l=await r.start(s);return p(o),n.paused&&await new Promise(e=>{n.resumeQueue.add(e)}),l})()};if(v$.skipAnimation)return yQ(n),yG(r,!1);try{let t;t=gi.arr(e)?(async e=>{for(let t of e)await m(t)})(e):Promise.resolve(e(m,r.stop.bind(r))),await Promise.all([t.then(u),h]),d=yG(r.get(),!0,!1)}catch(e){if(e instanceof y0)d=e.result;else if(e instanceof y1)d=e.result;else throw e}finally{i==n.asyncId&&(n.asyncId=o,n.asyncTo=o?s:void 0,n.promise=o?l:void 0)}return gi.fun(a)&&vY.batchedUpdates(()=>{a(d,r,r.item)}),d})():l}function yQ(e,t){gu(e.timeouts,e=>e.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var y0=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},y1=class extends Error{constructor(){super("SkipAnimationSignal")}},y2=e=>e instanceof y3,y4=1,y3=class extends gG{constructor(){super(...arguments),this.id=y4++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){let e=yh(this);return e&&e.getValue()}to(...e){return v$.to(this,e)}interpolate(...e){return yn(`${ye}The "interpolate" function is deprecated in v9 (use "to" instead)`),v$.to(this,e)}toJSON(){return this.get()}observerAdded(e){1==e&&this._attach()}observerRemoved(e){0==e&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){gY(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||gx.sort(this),gY(this,{type:"priority",parent:this,priority:e})}},y5=Symbol.for("SpringPhase"),y6=e=>(1&e[y5])>0,y8=e=>(2&e[y5])>0,y7=e=>(4&e[y5])>0,y9=(e,t)=>t?e[y5]|=3:e[y5]&=-3,be=(e,t)=>t?e[y5]|=4:e[y5]&=-5,bt=class extends y3{constructor(e,t){if(super(),this.animation=new yq,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!gi.und(e)||!gi.und(t)){let n=gi.obj(e)?{...e}:{...t,from:e};gi.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(y8(this)||this._state.asyncTo)||y7(this)}get goal(){return g$(this.animation.to)}get velocity(){let e=yh(this);return e instanceof yg?e.lastVelocity||0:e.getPayload().map(e=>e.lastVelocity||0)}get hasAnimated(){return y6(this)}get isAnimating(){return y8(this)}get isPaused(){return y7(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1,r=this.animation,{toValues:i}=r,{config:o}=r,a=ym(r.to);!a&&gq(r.to)&&(i=gl(g$(r.to))),r.values.forEach((s,l)=>{if(s.done)return;let u=s.constructor==yy?1:a?a[l].lastPosition:i[l],c=r.immediate,d=u;if(!c){let t;if(d=s.lastPosition,o.tension<=0){s.done=!0;return}let n=s.elapsedTime+=e,i=r.fromValues[l],a=null!=s.v0?s.v0:s.v0=gi.arr(o.velocity)?o.velocity[l]:o.velocity,f=o.precision||(i==u?.005:Math.min(1,.001*Math.abs(u-i)));if(gi.und(o.duration)){if(o.decay){let e=!0===o.decay?.998:o.decay,r=Math.exp(-(1-e)*n);d=i+a/(1-e)*(1-r),c=Math.abs(s.lastPosition-d)<=f,t=a*r}else{t=null==s.lastVelocity?a:s.lastVelocity;let n=o.restVelocity||f/10,r=o.clamp?0:o.bounce,l=!gi.und(r),h=i==u?s.v0>0:in)&&(c=Math.abs(u-d)<=f));++e){l&&(d==u||d>u==h)&&(t=-t*r,d=u);let e=-(1e-6*o.tension)*(d-u),n=-(.001*o.friction)*t,i=(e+n)/o.mass;t+=1*i,d+=1*t}}}else{let r=1;o.duration>0&&(this._memoizedDuration!==o.duration&&(this._memoizedDuration=o.duration,s.durationProgress>0&&(s.elapsedTime=o.duration*s.durationProgress,n=s.elapsedTime+=e)),r=(r=(o.progress||0)+n/this._memoizedDuration)>1?1:r<0?0:r,s.durationProgress=r),t=((d=i+o.easing(r)*(u-i))-s.lastPosition)/e,c=1==r}s.lastVelocity=t,Number.isNaN(d)&&(console.warn("Got NaN while animating:",this),c=!0)}a&&!a[l].done&&(c=!1),c?s.done=!0:t=!1,s.setValue(d,o.round)&&(n=!0)});let s=yh(this),l=s.getValue();if(t){let e=g$(r.to);(l!==e||n)&&!o.decay?(s.setValue(e),this._onChange(e)):n&&o.decay&&this._onChange(l),this._stop()}else n&&this._onChange(l)}set(e){return vY.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(y8(this)){let{to:e,config:t}=this.animation;vY.batchedUpdates(()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()})}return this}update(e){let t=this.queue||(this.queue=[]);return t.push(e),this}start(e,t){let n;return gi.und(e)?(n=this.queue||[],this.queue=[]):n=[gi.obj(e)?e:{...t,to:e}],Promise.all(n.map(e=>{let t=this._update(e);return t})).then(e=>yK(this,e))}stop(e){let{to:t}=this.animation;return this._focus(this.get()),yQ(this._state,e&&this._lastCallId),vY.batchedUpdates(()=>this._stop(t,e)),this}reset(){this._update({reset:!0})}eventObserved(e){"change"==e.type?this._start():"priority"==e.type&&(this.priority=e.priority+1)}_prepareNode(e){let t=this.key||"",{to:n,from:r}=e;(null==(n=gi.obj(n)?n[t]:n)||yV(n))&&(n=void 0),null==(r=gi.obj(r)?r[t]:r)&&(r=void 0);let i={to:n,from:r};return y6(this)||(e.reverse&&([n,r]=[r,n]),r=g$(r),gi.und(r)?yh(this)||this._set(n):this._set(r)),i}_update({...e},t){let{key:n,defaultProps:r}=this;e.default&&Object.assign(r,yN(e,(e,t)=>/^on/.test(t)?yT(e,n):e)),bs(this,e,"onProps"),bl(this,"onProps",e,this);let i=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");let o=this._state;return y$(++this._lastCallId,{key:n,props:e,defaultProps:r,state:o,actions:{pause:()=>{y7(this)||(be(this,!0),gc(o.pauseQueue),bl(this,"onPause",yG(this,bn(this,this.animation.to)),this))},resume:()=>{y7(this)&&(be(this,!1),y8(this)&&this._resume(),gc(o.resumeQueue),bl(this,"onResume",yG(this,bn(this,this.animation.to)),this))},start:this._merge.bind(this,i)}}).then(n=>{if(e.loop&&n.finished&&!(t&&n.noop)){let t=br(e);if(t)return this._update(t,!0)}return n})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(yX(this));let r=!gi.und(e.to),i=!gi.und(e.from);if(r||i){if(!(t.callId>this._lastToId))return n(yX(this));this._lastToId=t.callId}let{key:o,defaultProps:a,animation:s}=this,{to:l,from:u}=s,{to:c=l,from:d=u}=e;i&&!r&&(!t.default||gi.und(c))&&(c=d),t.reverse&&([c,d]=[d,c]);let f=!go(d,u);f&&(s.from=d),d=g$(d);let h=!go(c,l);h&&this._focus(c);let p=yV(t.to),{config:m}=s,{decay:v,velocity:g}=m;(r||i)&&(m.velocity=0),t.config&&!p&&function(e,t,n){for(let r in n&&(yU(n={...n},t),t={...n,...t}),yU(e,t),Object.assign(e,t),yB)null==e[r]&&(e[r]=yB[r]);let{frequency:r,damping:i}=e,{mass:o}=e;gi.und(r)||(r<.01&&(r=.01),i<0&&(i=0),e.tension=Math.pow(2*Math.PI/r,2)*o,e.friction=4*Math.PI*i*o/r)}(m,yO(t.config,o),t.config!==a.config?yO(a.config,o):void 0);let y=yh(this);if(!y||gi.und(c))return n(yG(this,!0));let b=gi.und(t.reset)?i&&!t.default:!gi.und(d)&&yM(t.reset,o),x=b?d:this.get(),w=yF(c),j=gi.num(w)||gi.arr(w)||yi(w),E=!p&&(!j||yM(a.immediate||t.immediate,o));if(h){let e=yE(c);if(e!==y.constructor){if(E)y=this._set(w);else throw Error(`Cannot animate between ${y.constructor.name} and ${e.name}, as the "to" prop suggests`)}}let k=y.constructor,S=gq(c),_=!1;if(!S){let e=b||!y6(this)&&f;(h||e)&&(S=!(_=go(yF(x),w))),(go(s.immediate,E)||E)&&go(m.decay,v)&&go(m.velocity,g)||(S=!0)}if(_&&y8(this)&&(s.changed&&!b?S=!0:S||this._stop(l)),!p&&((S||gq(l))&&(s.values=y.getPayload(),s.toValues=gq(c)?null:k==yy?[1]:gl(w)),s.immediate==E||(s.immediate=E,E||b||this._set(l)),S)){let{onRest:e}=s;ga(ba,e=>bs(this,t,e));let r=yG(this,bn(this,l));gc(this._pendingCalls,r),this._pendingCalls.add(n),s.changed&&vY.batchedUpdates(()=>{s.changed=!b,e?.(r,this),b?yO(a.onRest,r):s.onStart?.(r,this)})}b&&this._set(x),p?n(yJ(t.to,t,this._state,this)):S?this._start():y8(this)&&!h?this._pendingCalls.add(n):n(yY(x))}_focus(e){let t=this.animation;e!==t.to&&(gK(this)&&this._detach(),t.to=e,gK(this)&&this._attach())}_attach(){let e=0,{to:t}=this.animation;gq(t)&&(gJ(t,this),y2(t)&&(e=t.priority+1)),this.priority=e}_detach(){let{to:e}=this.animation;gq(e)&&gQ(e,this)}_set(e,t=!0){let n=g$(e);if(!gi.und(n)){let e=yh(this);if(!e||!go(n,e.getValue())){let r=yE(n);e&&e.constructor==r?e.setValue(n):yp(this,r.create(n)),e&&vY.batchedUpdates(()=>{this._onChange(n,t)})}}return yh(this)}_onStart(){let e=this.animation;e.changed||(e.changed=!0,bl(this,"onStart",yG(this,bn(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),yO(this.animation.onChange,e,this)),yO(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){let e=this.animation;yh(this).reset(g$(e.to)),e.immediate||(e.fromValues=e.values.map(e=>e.lastPosition)),y8(this)||(y9(this,!0),y7(this)||this._resume())}_resume(){v$.skipAnimation?this.finish():gx.start(this)}_stop(e,t){if(y8(this)){y9(this,!1);let n=this.animation;ga(n.values,e=>{e.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),gY(this,{type:"idle",parent:this});let r=t?yX(this.get()):yG(this.get(),bn(this,e??n.to));gc(this._pendingCalls,r),n.changed&&(n.changed=!1,bl(this,"onRest",r,this))}}};function bn(e,t){let n=yF(t),r=yF(e.get());return go(r,n)}function br(e,t=e.loop,n=e.to){let r=yO(t);if(r){let i=!0!==r&&yL(r),o=(i||e).reverse,a=!i||i.reset;return bi({...e,loop:t,default:!1,pause:void 0,to:!o||yV(n)?n:void 0,from:a?e.from:void 0,reset:a,...i})}}function bi(e){let{to:t,from:n}=e=yL(e),r=new Set;return gi.obj(t)&&bo(t,r),gi.obj(n)&&bo(n,r),e.keys=r.size?Array.from(r):null,e}function bo(e,t){gs(e,(e,n)=>null!=e&&t.add(n))}var ba=["onStart","onRest","onChange","onPause","onResume"];function bs(e,t,n){e.animation[n]=t[n]!==yA(t,n)?yT(t[n],e.key):void 0}function bl(e,t,...n){e.animation[t]?.(...n),e.defaultProps[t]?.(...n)}var bu=["onStart","onChange","onRest"],bc=1,bd=class{constructor(e,t){this.id=bc++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(e=>e.idle&&!e.isDelayed&&!e.isPaused)}get item(){return this._item}set item(e){this._item=e}get(){let e={};return this.each((t,n)=>e[n]=t.get()),e}set(e){for(let t in e){let n=e[t];gi.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(bi(e)),this}start(e){let{queue:t}=this;return(e?t=gl(e).map(bi):this.queue=[],this._flush)?this._flush(this,t):(by(this,t),bf(this,t))}stop(e,t){if(!!e!==e&&(t=e),t){let n=this.springs;ga(gl(t),t=>n[t].stop(!!e))}else yQ(this._state,this._lastAsyncId),this.each(t=>t.stop(!!e));return this}pause(e){if(gi.und(e))this.start({pause:!0});else{let t=this.springs;ga(gl(e),e=>t[e].pause())}return this}resume(e){if(gi.und(e))this.start({pause:!1});else{let t=this.springs;ga(gl(e),e=>t[e].resume())}return this}each(e){gs(this.springs,e)}_onFrame(){let{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,i=this._changed.size>0;(r&&!this._started||i&&!this._started)&&(this._started=!0,gu(e,([e,t])=>{t.value=this.get(),e(t,this,this._item)}));let o=!r&&this._started,a=i||o&&n.size?this.get():null;i&&t.size&&gu(t,([e,t])=>{t.value=a,e(t,this,this._item)}),o&&(this._started=!1,gu(n,([e,t])=>{t.value=a,e(t,this,this._item)}))}eventObserved(e){if("change"==e.type)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else{if("idle"!=e.type)return;this._active.delete(e.parent)}vY.onFrame(this._onFrame)}};function bf(e,t){return Promise.all(t.map(t=>bh(e,t))).then(t=>yK(e,t))}async function bh(e,t,n){let{keys:r,to:i,from:o,loop:a,onRest:s,onResolve:l}=t,u=gi.obj(t.default)&&t.default;a&&(t.loop=!1),!1===i&&(t.to=null),!1===o&&(t.from=null);let c=gi.arr(i)||gi.fun(i)?i:void 0;c?(t.to=void 0,t.onRest=void 0,u&&(u.onRest=void 0)):ga(bu,n=>{let r=t[n];if(gi.fun(r)){let i=e._events[n];t[n]=({finished:e,cancelled:t})=>{let n=i.get(r);n?(e||(n.finished=!1),t&&(n.cancelled=!0)):i.set(r,{value:null,finished:e||!1,cancelled:t||!1})},u&&(u[n]=t[n])}});let d=e._state;!d.paused===t.pause?(d.paused=t.pause,gc(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);let f=(r||Object.keys(e.springs)).map(n=>e.springs[n].start(t)),h=!0===t.cancel||!0===yA(t,"cancel");(c||h&&d.asyncId)&&f.push(y$(++e._lastAsyncId,{props:t,state:d,actions:{pause:gn,resume:gn,start(t,n){h?(yQ(d,e._lastAsyncId),n(yX(e))):(t.onRest=s,n(yJ(c,t,d,e)))}}})),d.paused&&await new Promise(e=>{d.resumeQueue.add(e)});let p=yK(e,await Promise.all(f));if(a&&p.finished&&!(n&&p.noop)){let n=br(t,a,i);if(n)return by(e,[n]),bh(e,n,!0)}return l&&vY.batchedUpdates(()=>l(p,e,e.item)),p}function bp(e,t){let n={...e.springs};return t&&ga(gl(t),e=>{gi.und(e.keys)&&(e=bi(e)),gi.obj(e.to)||(e={...e,to:void 0}),bg(n,e,e=>bv(e))}),bm(e,n),n}function bm(e,t){gs(t,(t,n)=>{e.springs[n]||(e.springs[n]=t,gJ(t,e))})}function bv(e,t){let n=new bt;return n.key=e,t&&gJ(n,t),n}function bg(e,t,n){t.keys&&ga(t.keys,r=>{let i=e[r]||(e[r]=n(r));i._prepareNode(t)})}function by(e,t){ga(t,t=>{bg(e.springs,t,t=>bv(t,e))})}var bb=({children:e,...t})=>{let n=(0,b.useContext)(bx),r=t.pause||!!n.pause,i=t.immediate||!!n.immediate;t=function(e,t){let[n]=(0,b.useState)(()=>({inputs:t,result:e()})),r=(0,b.useRef)(),i=r.current,o=i;if(o){let n=!!(t&&o.inputs&&function(e,t){if(e.length!==t.length)return!1;for(let n=0;n{r.current=o,i==n&&(n.inputs=n.result=void 0)},[o]),o.result}(()=>({pause:r,immediate:i}),[r,i]);let{Provider:o}=bx;return b.createElement(o,{value:t},e)},bx=(Object.assign(bb,b.createContext({})),bb.Provider._context=bb,bb.Consumer._context=bb,bb);bb.Provider=bx.Provider,bb.Consumer=bx.Consumer;var bw=()=>{let e=[],t=function(t){yr(`${ye}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`);let r=[];return ga(e,(e,i)=>{if(gi.und(t))r.push(e.start());else{let o=n(t,e,i);o&&r.push(e.start(o))}}),r};t.current=e,t.add=function(t){e.includes(t)||e.push(t)},t.delete=function(t){let n=e.indexOf(t);~n&&e.splice(n,1)},t.pause=function(){return ga(e,e=>e.pause(...arguments)),this},t.resume=function(){return ga(e,e=>e.resume(...arguments)),this},t.set=function(t){ga(e,(e,n)=>{let r=gi.fun(t)?t(n,e):t;r&&e.set(r)})},t.start=function(t){let n=[];return ga(e,(e,r)=>{if(gi.und(t))n.push(e.start());else{let i=this._getProps(t,e,r);i&&n.push(e.start(i))}}),n},t.stop=function(){return ga(e,e=>e.stop(...arguments)),this},t.update=function(t){return ga(e,(e,n)=>e.update(this._getProps(t,e,n))),this};let n=function(e,t,n){return gi.fun(e)?e(n,t):e};return t._getProps=n,t};function bj(e,t){let n=gi.fun(e),[[r],i]=function(e,t,n){let r=gi.fun(t)&&t;r&&!n&&(n=[]);let i=(0,b.useMemo)(()=>r||3==arguments.length?bw():void 0,[]),o=(0,b.useRef)(0),a=ys(),s=(0,b.useMemo)(()=>({ctrls:[],queue:[],flush(e,t){let n=bp(e,t),r=o.current>0&&!s.queue.length&&!Object.keys(n).some(t=>!e.springs[t]);return r?bf(e,t):new Promise(r=>{bm(e,n),s.queue.push(()=>{r(bf(e,t))}),a()})}}),[]),l=(0,b.useRef)([...s.ctrls]),u=[],c=yc(e)||0;function d(e,n){for(let i=e;i{ga(l.current.slice(e,c),e=>{yI(e,i),e.stop(!0)}),l.current.length=e,d(c,e)},[e]),(0,b.useMemo)(()=>{d(0,Math.min(c,e))},n);let f=l.current.map((e,t)=>bp(e,u[t])),h=(0,b.useContext)(bb),p=yc(h),m=h!==p&&yz(h);yo(()=>{o.current++,s.ctrls=l.current;let{queue:e}=s;e.length&&(s.queue=[],ga(e,e=>e())),ga(l.current,(e,t)=>{i?.add(e),m&&e.start({default:h});let n=u[t];n&&(yZ(e,n.ref),e.ref?e.queue.push(n):e.start(n))})}),yl(()=>()=>{ga(s.ctrls,e=>e.stop(!0))});let v=f.map(e=>({...e}));return i?[v,i]:v}(1,n?e:[e],n?t||[]:t);return n||2==arguments.length?[r,i]:r}function bE(e,t,n){let r=gi.fun(t)&&t,{reset:i,sort:o,trail:a=0,expires:s=!0,exitBeforeEnter:l=!1,onDestroyed:u,ref:c,config:d}=r?r():t,f=(0,b.useMemo)(()=>r||3==arguments.length?bw():void 0,[]),h=gl(e),p=[],m=(0,b.useRef)(null),v=i?null:m.current;yo(()=>{m.current=p}),yl(()=>(ga(p,e=>{f?.add(e.ctrl),e.ctrl.ref=f}),()=>{ga(m.current,e=>{e.expired&&clearTimeout(e.expirationId),yI(e.ctrl,f),e.ctrl.stop(!0)})}));let g=function(e,{key:t,keys:n=t},r){if(null===n){let t=new Set;return e.map(e=>{let n=r&&r.find(n=>n.item===e&&"leave"!==n.phase&&!t.has(n));return n?(t.add(n),n.key):bk++})}return gi.und(n)?e:gi.fun(n)?e.map(n):gl(n)}(h,r?r():t,v),y=i&&m.current||[];yo(()=>ga(y,({ctrl:e,item:t,key:n})=>{yI(e,f),yO(u,t,n)}));let x=[];if(v&&ga(v,(e,t)=>{e.expired?(clearTimeout(e.expirationId),y.push(e)):~(t=x[t]=g.indexOf(e.key))&&(p[t]=e)}),ga(h,(e,t)=>{p[t]||(p[t]={key:g[t],item:e,phase:"mount",ctrl:new bd},p[t].ctrl.item=e)}),x.length){let e=-1,{leave:n}=r?r():t;ga(x,(t,r)=>{let i=v[r];~t?(e=p.indexOf(i),p[e]={...i,item:h[t]}):n&&p.splice(++e,0,i)})}gi.fun(o)&&p.sort((e,t)=>o(e.item,t.item));let w=-a,j=ys(),E=yN(t),k=new Map,S=(0,b.useRef)(new Map),_=(0,b.useRef)(!1);ga(p,(e,n)=>{let i,o;let u=e.key,f=e.phase,h=r?r():t,p=yO(h.delay||0,u);if("mount"==f)i=h.enter,o="enter";else{let e=0>g.indexOf(u);if("leave"!=f){if(e)i=h.leave,o="leave";else{if(!(i=h.update))return;o="update"}}else{if(e)return;i=h.enter,o="enter"}}if(i=yO(i,e.item,n),!(i=gi.obj(i)?yL(i):{to:i}).config){let t=d||E.config;i.config=yO(t,e.item,n,o)}w+=a;let y={...E,delay:p+w,ref:c,immediate:h.immediate,reset:!1,...i};if("enter"==o&&gi.und(y.from)){let i=r?r():t,o=gi.und(i.initial)||v?i.from:i.initial;y.from=yO(o,e.item,n)}let{onResolve:b}=y;y.onResolve=e=>{yO(b,e);let t=m.current,n=t.find(e=>e.key===u);if(n){if(e.cancelled&&"update"!=n.phase)return;if(n.ctrl.idle){let e=t.every(e=>e.ctrl.idle);if("leave"==n.phase){let t=yO(s,n.item);if(!1!==t){let r=!0===t?0:t;if(n.expired=!0,!e&&r>0){r<=2147483647&&(n.expirationId=setTimeout(j,r));return}}}e&&t.some(e=>e.expired)&&(S.current.delete(n),l&&(_.current=!0),j())}}};let x=bp(e.ctrl,y);"leave"===o&&l?S.current.set(e,{phase:o,springs:x,payload:y}):k.set(e,{phase:o,springs:x,payload:y})});let C=(0,b.useContext)(bb),O=yc(C),M=C!==O&&yz(C);yo(()=>{M&&ga(p,e=>{e.ctrl.start({default:C})})},[C]),ga(k,(e,t)=>{if(S.current.size){let e=p.findIndex(e=>e.key===t.key);p.splice(e,1)}}),yo(()=>{ga(S.current.size?S.current:k,({phase:e,payload:t},n)=>{let{ctrl:r}=n;n.phase=e,f?.add(r),M&&"enter"==e&&r.start({default:C}),t&&(yZ(r,t.ref),(r.ref||f)&&!_.current?r.update(t):(r.start(t),_.current&&(_.current=!1)))})},i?void 0:n);let T=e=>b.createElement(b.Fragment,null,p.map((t,n)=>{let{springs:r}=k.get(t)||t.ctrl,i=e({...r},t.item,t,n);return i&&i.type?b.createElement(i.type,{...i.props,key:gi.str(t.key)||gi.num(t.key)?t.key:t.ctrl.id,ref:i.ref}):i}));return f?[T,f]:T}var bk=1,bS=class extends y3{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=gH(...t);let n=this._get(),r=yE(n);yp(this,r.create(n))}advance(e){let t=this._get(),n=this.get();go(t,n)||(yh(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&bC(this._active)&&bO(this)}_get(){let e=gi.arr(this.source)?this.source.map(g$):gl(g$(this.source));return this.calc(...e)}_start(){this.idle&&!bC(this._active)&&(this.idle=!1,ga(ym(this),e=>{e.done=!1}),v$.skipAnimation?(vY.batchedUpdates(()=>this.advance()),bO(this)):gx.start(this))}_attach(){let e=1;ga(gl(this.source),t=>{gq(t)&&gJ(t,this),y2(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){ga(gl(this.source),e=>{gq(e)&&gQ(e,this)}),this._active.clear(),bO(this)}eventObserved(e){"change"==e.type?e.idle?this.advance():(this._active.add(e.parent),this._start()):"idle"==e.type?this._active.delete(e.parent):"priority"==e.type&&(this.priority=gl(this.source).reduce((e,t)=>Math.max(e,(y2(t)?t.priority:0)+1),0))}};function b_(e){return!1!==e.idle}function bC(e){return!e.size||Array.from(e).every(b_)}function bO(e){e.idle||(e.idle=!0,ga(ym(e),e=>{e.done=!0}),gY(e,{type:"idle",parent:e}))}var bM=(e,...t)=>new bS(e,t);v$.assign({createStringInterpolator:g9,to:(e,t)=>new bS(e,t)}),gx.advance;var bT=/^--/,bA={},bP={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},bN=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),bR=["Webkit","Ms","Moz","O"];bP=Object.keys(bP).reduce((e,t)=>(bR.forEach(n=>e[bN(n,t)]=e[t]),e),bP);var bD=/^(matrix|translate|scale|rotate|skew)/,bL=/^(translate)/,bF=/^(rotate|skew)/,bz=(e,t)=>gi.num(e)&&0!==e?e+t:e,bV=(e,t)=>gi.arr(e)?e.every(e=>bV(e,t)):gi.num(e)?e===t:parseFloat(e)===t,bI=class extends yx{constructor({x:e,y:t,z:n,...r}){let i=[],o=[];(e||t||n)&&(i.push([e||0,t||0,n||0]),o.push(e=>[`translate3d(${e.map(e=>bz(e,"px")).join(",")})`,bV(e,0)])),gs(r,(e,t)=>{if("transform"===t)i.push([e||""]),o.push(e=>[e,""===e]);else if(bD.test(t)){if(delete r[t],gi.und(e))return;let n=bL.test(t)?"px":bF.test(t)?"deg":"";i.push(gl(e)),o.push("rotate3d"===t?([e,t,r,i])=>[`rotate3d(${e},${t},${r},${bz(i,n)})`,bV(i,0)]:e=>[`${t}(${e.map(e=>bz(e,n)).join(",")})`,bV(e,t.startsWith("scale")?1:0)])}}),i.length&&(r.transform=new bZ(i,o)),super(r)}},bZ=class extends gG{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return ga(this.inputs,(n,r)=>{let i=g$(n[0]),[o,a]=this.transforms[r](gi.arr(i)?i:n.map(g$));e+=" "+o,t=t&&a}),t?"none":e}observerAdded(e){1==e&&ga(this.inputs,e=>ga(e,e=>gq(e)&&gJ(e,this)))}observerRemoved(e){0==e&&ga(this.inputs,e=>ga(e,e=>gq(e)&&gQ(e,this)))}eventObserved(e){"change"==e.type&&(this._value=null),gY(this,e)}};v$.assign({batchedUpdates:e5.unstable_batchedUpdates,createStringInterpolator:g9,colors:{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}});var bB=((e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=e=>new yx(e),getComponentProps:r=e=>e}={})=>{let i={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},o=e=>{let t=yC(e)||"Anonymous";return(e=gi.str(e)?o[e]||(o[e]=yk(e,i)):e[y_]||(e[y_]=yk(e,i))).displayName=`Animated(${t})`,e};return gs(e,(t,n)=>{gi.arr(e)&&(n=yC(t)),o[n]=o(t)}),{animated:o}})(["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"],{applyAnimatedValues:function(e,t){if(!e.nodeType||!e.setAttribute)return!1;let n="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName,{style:r,children:i,scrollTop:o,scrollLeft:a,viewBox:s,...l}=t,u=Object.values(l),c=Object.keys(l).map(t=>n||e.hasAttribute(t)?t:bA[t]||(bA[t]=t.replace(/([A-Z])/g,e=>"-"+e.toLowerCase())));for(let t in void 0!==i&&(e.textContent=i),r)if(r.hasOwnProperty(t)){var d;let n=null==(d=r[t])||"boolean"==typeof d||""===d?"":"number"!=typeof d||0===d||bT.test(t)||bP.hasOwnProperty(t)&&bP[t]?(""+d).trim():d+"px";bT.test(t)?e.style.setProperty(t,n):e.style[t]=n}c.forEach((t,n)=>{e.setAttribute(t,u[n])}),void 0!==o&&(e.scrollTop=o),void 0!==a&&(e.scrollLeft=a),void 0!==s&&e.setAttribute("viewBox",s)},createAnimatedStyle:e=>new bI(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}).animated,bH=n(23442),bU=(0,b.createContext)({});function bW(e){var t=e.x,n=e.y,r=e.dx,i=e.dy,o=e.children,a=(0,b.useMemo)(function(){return{x:t,y:n,dx:r,dy:i}},[t,n,r,i]);return b.createElement(bU.Provider,{value:a},o)}function bq(){return(bq=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,bJ),p=(0,b.useContext)(bY)||{},m=p.innerHeight,v=p.innerWidth,g=p.margin,y=p.xScale,x=p.yScale,w=p.dataRegistry,j=(0,b.useMemo)(function(){return y?bG(y):0},[y]),E=(0,b.useMemo)(function(){return x?bG(x):0},[x]);if((!s||!l)&&!a)return console.warn("[@visx/xychart/BaseAnnotation]: dataKey or x/yAccessors must be specified."),null;var k=s&&l||null==a?null:null==w?void 0:w.get(a),S=s||(null==k?void 0:k.xAccessor),_=l||(null==k?void 0:k.yAccessor);if(!y||!x||!v||!m||!S||!_||!g)return null;var C=(null!=(t=(0,pB.Z)(y(S(o))))?t:NaN)+j/2,O=(null!=(n=(0,pB.Z)(x(_(o))))?n:NaN)+E/2,M=C+c+16>g.left+v?-c:c,T=O+f+16>g.top+m?-f:f;return bX(C)&&bX(O)?b.createElement(r,bQ({width:v,height:m},h,{x:C,y:O,dx:M,dy:T}),i):null}b0.propTypes={dataKey:pD().string,xAccessor:pD().func,yAccessor:pD().func};var b1=["x","y","AnnotationComponent"],b2=["editable"];function b4(){return(b4=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function b5(e){var t=e.x,n=void 0===t?0:t,r=e.y,i=void 0===r?0:r,o=e.AnnotationComponent,a=b3(e,b1),s=(0,b.useRef)({x:n,y:i}),l=bj({from:{x:s.current.x-n,y:s.current.y-i},to:{x:0,y:0},reset:!0});return(0,b.useEffect)(function(){s.current={x:n,y:i}},[n,i]),b.createElement(bB.g,{transform:bM([l.x,l.y],function(e,t){return"translate("+e+", "+t+")"})},b.createElement(o,b4({x:n,y:i},a)))}function b6(e){var t=e.editable,n=b3(e,b2),r=(0,b.useCallback)(function(e){return b.createElement(b5,b4({AnnotationComponent:t?bK:bW},e))},[t]);return b.createElement(b0,b4({AnnotationComponent:r},n))}b6.propTypes={editable:pD().bool};var b8=n(12766),b7=n(54073),b9=n.n(b7),xe=["d","stroke","fill"];function xt(){return(xt=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,xe),o=(0,b.useRef)(t),a=(0,b.useCallback)(b9()(function(e){o.current=e},50),[]),s=(0,b8.interpolatePath)(o.current,t);a(t);var l=bj({from:{t:0},to:{t:1},reset:!0,delay:0}).t,u=bj({stroke:void 0===n?"transparent":n,fill:void 0===r?"transparent":r});return b.createElement(bB.path,xt({className:"visx-path",d:l.to(s),stroke:u.stroke,fill:u.fill},i))}var xr=n(12935),xi=n(12151);function xo(){return(xo=Object.assign?Object.assign.bind():function(e){for(var t=1;tt?1:e>=t?0:NaN}function xv(e){let t=e,n=e;function r(e,t,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r>>1;0>n(e[o],t)?r=o+1:i=o}return r}return 1===e.length&&(t=(t,n)=>e(t)-n,n=(t,n)=>xm(e(t),n)),{left:r,center:function(e,n,i,o){null==i&&(i=0),null==o&&(o=e.length);let a=r(e,n,i,o-1);return a>i&&t(e[a-1],n)>-t(e[a],n)?a-1:a},right:function(e,t,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r>>1;n(e[o],t)>0?i=o:r=o+1}return r}}}let xg=xv(xm);xg.right;let xy=xg.left;function xb(e){var t,n,r=e.scale,i=e.accessor,o=e.scaledValue,a=e.data;if("invert"in r&&"function"==typeof r.invert){var s=xv(i).left,l=Number(r.invert(o)),u=s(a,l),c=a[u-1],d=a[u];n=(t=!c||Math.abs(l-i(c))>Math.abs(l-i(d))?d:c)===c?u-1:u}else{if(!("step"in r)||void 0===r.step)return console.warn("[visx/xychart/findNearestDatum] encountered incompatible scale type, bailing"),null;var f=r.domain(),h=r.range().map(Number),p=[].concat(h).sort(function(e,t){return e-t}),m=xy(function(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((t-e)/n)),o=Array(i);++r=0||(i[n]=e[n]);return i}(e,xA),C=(0,b.useContext)(bY),O=C.colorScale,M=C.theme,T=C.horizontal,A=(0,b.useMemo)(function(){return w?xs(j,w):void 0},[j,w]),P=(0,b.useMemo)(function(){return xs(j,x)},[j,x]),N=(0,b.useMemo)(function(){return k?xs(S,k):void 0},[S,k]),R=(0,b.useMemo)(function(){return xs(S,E)},[S,E]),D=(0,b.useCallback)(function(e){return bX(j(x(e)))&&bX(S(E(e)))},[j,x,S,E]),L=null!=(t=null!=(n=null==O?void 0:O(l))?n:null==M?void 0:null==(r=M.colors)?void 0:r[0])?t:"#222",F="AREASERIES_EVENT_SOURCE-"+l,z=x_({dataKey:l,enableEvents:void 0===v||v,onBlur:c,onFocus:d,onPointerMove:f,onPointerOut:h,onPointerUp:p,onPointerDown:m,source:F,allowedSources:[xu,F]}),V=(0,b.useMemo)(function(){var e=xl(T?j:S);return T?{x0:null!=A?A:e,x1:P,y:R}:{x:P,y0:null!=N?N:e,y1:R}},[j,S,T,P,R,A,N]),I=!!(d||c),Z=(0,b.useCallback)(function(e){var t=e.glyphs;return I?t.map(function(e){return b.createElement(b.Fragment,{key:e.key},xT(xP({},e,{color:"transparent",onFocus:z.onFocus,onBlur:z.onBlur})))}):null},[I,z.onFocus,z.onBlur]);return b.createElement(b.Fragment,null,b.createElement(xr.Z,xP({},V,_,{curve:a,defined:D}),function(e){var t=e.path;return b.createElement(o,xP({className:"visx-area",stroke:"transparent",fill:L,strokeLinecap:"round"},_,{d:t(s)||""},z))}),y&&b.createElement(xi.Z,xP({x:P,y:R,defined:D,curve:a},u),function(e){var t=e.path;return b.createElement(o,xP({className:"visx-line",fill:"transparent",stroke:L,strokeWidth:2,pointerEvents:"none",strokeLinecap:"round"},u,{d:t(s)||""}))}),I&&b.createElement(xO,{dataKey:l,data:s,xAccessor:x,yAccessor:E,xScale:j,yScale:S,renderGlyphs:Z}))}xN.propTypes={renderLine:pD().bool};var xR=xa(xN);function xD(){return(xD=Object.assign?Object.assign.bind():function(e){for(var t=1;t1)for(var n,r,i,o=1,a=e[t[0]],s=a.length;o=0;)n[t]=t;return n}function xB(e,t){return e[t]}function xH(e){let t=[];return t.key=e,t}Array.prototype.slice;var xU=n(74322),xW=n(58543);function xq(e,t){let n,r;if(void 0===t)for(let t of e)null!=t&&(void 0===n?t>=t&&(n=r=t):(n>t&&(n=t),r=o&&(n=r=o):(n>o&&(n=o),r=0?"positiveSum":"negativeSum"]+=i})}}),Object.values(e)},[o,l]),d=(0,b.useMemo)(function(){var e=r?null:c.some(function(e){return e.negativeSum<0}),t=function(){var e=xV([]),t=xZ,n=xI,r=xB;function i(i){var o,a,s,l=Array.from(e.apply(this,arguments),xH),u=l.length,c=-1;for(let e of i)for(a=0,++c;a0&&0===r&&(o?i.xScale=function(e){return e.domain(xq(e.domain().concat(f)))}:i.yScale=function(e){return e.domain(xq(e.domain().concat(f)))}),i}).filter(function(e){return e}))),function(){return s(u)}},[u,f,o,d,a,s,l]),{seriesChildren:l,dataKeys:u,stackedData:d}}function xJ(e,t,n){var r,i,o,a,s=e.xScale,l=e.yScale,u=e.point,c=(n?xw:xx)(e),d=(null==c?void 0:c.index)==null?null:t[c.index];return c&&d&&u?{index:c.index,datum:d,distanceX:n&&u.x>=(null!=(r=s((0,xz.l8)(c.datum)))?r:1/0)&&u.x<=(null!=(i=s((0,xz.xf)(c.datum)))?i:-1/0)?0:c.distanceX,distanceY:n?c.distanceY:u.y<=(null!=(o=l((0,xz.l8)(c.datum)))?o:-1/0)&&u.y>=(null!=(a=l((0,xz.xf)(c.datum)))?a:1/0)?0:c.distanceY}:null}var xQ=["data","dataKey","xAccessor","yAccessor","curve","PathComponent","lineProps","renderLine"];function x0(){return(x0=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(a,xQ)),u=x0({fill:null!=(n=null!=(r=null==g?void 0:g(e.key))?r:null==E?void 0:null==(i=E.colors)?void 0:i[0])?n:"#222"},l);return{key:t+"-"+e.key,accessors:O,data:e,areaProps:u,lineProps:s}})},[C,O,g,_,E]),T=(0,b.useCallback)(function(e){var t,n,r=null==(t=_.find(function(t){return t.props.dataKey===e.dataKey}))?void 0:null==(n=t.props)?void 0:n.data;return r?xJ(e,r,x):null},[_,x]),A="AREASTACK_EVENT_SOURCE-"+S.join("-"),P=x_({dataKey:S,enableEvents:void 0===o||o,findNearestDatum:T,onBlur:s,onFocus:l,onPointerMove:u,onPointerOut:c,onPointerUp:d,onPointerDown:f,source:A,allowedSources:[xu,A]}),N=!!(l||s),R=(0,b.useCallback)(function(e){var t=e.glyphs;return N?t.map(function(e){return b.createElement(b.Fragment,{key:e.key},xT(x0({},e,{color:"transparent",onFocus:P.onFocus,onBlur:P.onBlur})))}):null},[N,P.onFocus,P.onBlur]);return!S.some(function(e){return null==y.get(e)})&&w&&j&&g?b.createElement("g",{className:"visx-area-stack"},M.map(function(e){return b.createElement(xr.Z,x0({key:e.key,curve:i},e.accessors),function(t){var r=t.path;return b.createElement(n,x0({className:"visx-area",stroke:"transparent",d:r(e.data)||""},e.areaProps,P))})}),m&&M.map(function(e){return b.createElement(xF.Z,x0({key:"line-"+e.key,x:e.accessors.x||e.accessors.x1,y:e.accessors.y||e.accessors.y1,defined:e.accessors.defined,curve:i},e.lineProps),function(t){var r=t.path;return b.createElement(n,x0({className:"visx-line",fill:"transparent",stroke:e.areaProps.fill,strokeWidth:2,pointerEvents:"none"},e.lineProps,{d:r(e.data)||""}))})}),N&&M.map(function(e,t){var n=M[M.length-t-1];return b.createElement(xO,{key:"glyphs-"+n.key,dataKey:n.key,data:n.data,xAccessor:n.accessors.x||n.accessors.x1,yAccessor:n.accessors.y||n.accessors.y1,xScale:x1,yScale:x1,renderGlyphs:R})})):null}function x4(){return(x4=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,x6),c=(0,b.useContext)(bY),d=c.theme,f=c.xScale,h=c.yScale,p=c.margin,m=c.width,v=c.height,g=u.orientation,y=(0,b.useMemo)(function(){var e,t,n,r;return"left"===g||"right"===g?null==d?void 0:null==(e=d.axisStyles)?void 0:null==(t=e.y)?void 0:t[g]:null==d?void 0:null==(n=d.axisStyles)?void 0:null==(r=n.x)?void 0:r[g]},[d,g]),x=u.tickLabelProps,w=(0,b.useMemo)(function(){return x||y?function(e,t,n){return x8({},null==y?void 0:y.tickLabel,{width:"left"===g||"right"===g?null==p?void 0:p[g]:void 0},null==x?void 0:x(e,t,n))}:void 0},[x,y,g,p]),j="bottom"===g?(null!=v?v:0)-(null!=(t=null==p?void 0:p.bottom)?t:0):"top"===g&&null!=(n=null==p?void 0:p.top)?n:0,E="left"===g?null!=(r=null==p?void 0:p.left)?r:0:"right"===g?(null!=m?m:0)-(null!=(i=null==p?void 0:p.right)?i:0):0,k="left"===g||"right"===g?h:f;return k?b.createElement(l,x8({top:j,left:E,labelProps:null==y?void 0:y.axisLabel,stroke:null==y?void 0:null==(o=y.axisLine)?void 0:o.stroke,strokeWidth:null==y?void 0:null==(a=y.axisLine)?void 0:a.strokeWidth,tickLength:null==y?void 0:y.tickLength,tickStroke:null==y?void 0:null==(s=y.tickLine)?void 0:s.stroke},u,{tickLabelProps:w,scale:k})):null}function x9(){return(x9=Object.assign?Object.assign.bind():function(e){for(var t=1;t=h&&l.y<=p;return wn({},u,{distanceX:0,distanceY:m?0:Math.abs(l.y-(h+p)/2)})}var v=a(i(u.datum)),g=(null!=v?v:1/0)+(null!=c?c:1/0),y=g+d,b=l.x>=g&&l.x<=y;return wn({},u,{distanceY:0,distanceX:b?0:Math.abs(l.x-(g+y)/2)})}(e,k,v)},[k,v]),_="BARGROUP_EVENT_SOURCE-"+E.join("-")+"}",C=x_({dataKey:E,enableEvents:void 0===f||f,findNearestDatum:S,onBlur:a,onFocus:s,onPointerMove:l,onPointerOut:u,onPointerUp:c,onPointerDown:d,source:_,allowedSources:[xu,_]}),O=(0,b.useMemo)(function(){return x?xl(x):0},[x]),M=(0,b.useMemo)(function(){return w?xl(w):0},[w]),T=E.map(function(e){return m.get(e)});if(T.some(function(e){return null==e})||!x||!w||!p)return null;var A=bG(k),P=T.map(function(e){var t,n=e.xAccessor,r=e.yAccessor,i=e.data,o=e.key,a=function(e){var t,i;return v?(null!=(t=x(n(e)))?t:NaN)-O:(null!=(i=w(r(e)))?i:NaN)-M},s=v?function(e){var t;return null!=(t=w(r(e)))?t:NaN}:function(e){var t;return null!=(t=x(n(e)))?t:NaN},l=null!=(t=k(o))?t:0,u=v?function(e){return O+Math.min(0,a(e))}:function(e){return s(e)+l},c=v?function(e){return s(e)+l}:function(e){return M+Math.min(0,a(e))},d=v?function(e){return Math.abs(a(e))}:function(){return A},f=v?function(){return A}:function(e){return Math.abs(a(e))},h=j.find(function(e){return e.props.dataKey===o}),m=(null==h?void 0:h.props)||{},g=m.colorAccessor;return{key:o,radius:m.radius,radiusAll:m.radiusAll,radiusBottom:m.radiusBottom,radiusLeft:m.radiusLeft,radiusRight:m.radiusRight,radiusTop:m.radiusTop,bars:i.map(function(e,t){var n,r=u(e);if(!bX(r))return null;var i=c(e);if(!bX(i))return null;var a=d(e);if(!bX(a))return null;var s=f(e);return bX(s)?{key:o+"-"+t,x:r,y:i,width:a,height:s,fill:null!=(n=null==g?void 0:g(e,t))?n:p(o)}:null}).filter(function(e){return e})}});return b.createElement("g",{className:"visx-bar-group"},P.map(function(e){return e&&b.createElement(o,wr({horizontal:v,xScale:x,yScale:w},e,C,{key:e.key}))}))}wi.propTypes={children:pD().node.isRequired,padding:pD().number,sortBars:pD().func};var wo=n(10897),wa=function(e){return!!(null==e?void 0:e.includes("url("))},ws=function(e){return wa(e)?"rgba(0,0,0,0.1)":e},wl=["bars","xScale","yScale","horizontal","radius","radiusAll","radiusTop","radiusRight","radiusBottom","radiusLeft"],wu=["bars","xScale","yScale","horizontal","radius","radiusAll","radiusTop","radiusRight","radiusBottom","radiusLeft"];function wc(){return(wc=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function wf(e){return{x:e.x,y:e.y,width:e.width,height:e.height,fill:ws(e.fill),opacity:1}}function wh(e){var t=e.bars,n=(e.xScale,e.yScale,e.horizontal,e.radius),r=e.radiusAll,i=e.radiusTop,o=e.radiusRight,a=e.radiusBottom,s=e.radiusLeft,l=wd(e,wl);return b.createElement(b.Fragment,null,t.map(function(e){var t=e.key,u=e.fill,c=e.x,d=e.y,f=e.width,h=e.height;return b.createElement(wo.Z,{key:t,x:c,y:d,width:f,height:h,radius:n,all:r,top:i,right:o,bottom:a,left:s},function(e){var t=e.path;return b.createElement(xn,wc({className:"visx-bar visx-bar-rounded",d:t,fill:u},l))})}))}function wp(e){var t,n,r,i=e.bars,o=e.xScale,a=e.yScale,s=e.horizontal,l=(e.radius,e.radiusAll,e.radiusTop,e.radiusRight,e.radiusBottom,e.radiusLeft,wd(e,wu)),u=bE(i,wc({},(n=(t={horizontal:s,scale:s?o:a}).scale,r=!!t.horizontal,(0,b.useMemo)(function(){var e=xl(n);function t(t){var n=t.x,i=t.y,o=t.width,a=t.height;return{x:r?null!=e?e:0:n,y:r?i:null!=e?e:0,width:r?0:o,height:r?a:0,fill:ws(t.fill),opacity:0}}return{unique:!0,from:t,leave:t,enter:wf,update:wf,keys:function(e){return e.key}}},[n,r])))),c=!!(l.onFocus||l.onBlur);return b.createElement(b.Fragment,null,u(function(e,t,n){var r=e.x,i=e.y,o=e.width,a=e.height,s=e.fill,u=e.opacity,d=n.key;return null==t||null==d?null:b.createElement(bB.rect,wc({key:d,tabIndex:c?0:void 0,className:"visx-bar",x:r,y:i,width:o,height:a,fill:wa(t.fill)?t.fill:s,opacity:u},l))}))}function wm(e){return null==e.radius?b.createElement(wp,e):b.createElement(wh,wc({},e,{radius:e.radius}))}function wv(){return(wv=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,wy),j=(0,b.useContext)(bY),E=j.colorScale,k=j.horizontal,S=j.theme,_=j.innerWidth,C=j.innerHeight,O=(0,b.useMemo)(function(){return xs(g,v)},[g,v]),M=(0,b.useMemo)(function(){return xs(x,y)},[x,y]),T=bG(k?x:g)||(k?void 0===C?0:C:void 0===_?0:_)/s.length*(1-Math.min(1,Math.max(0,void 0===o?.1:o))),A=(0,b.useMemo)(function(){return g?xl(g):0},[g]),P=(0,b.useMemo)(function(){return x?xl(x):0},[x]),N=null!=(t=null!=(n=null==E?void 0:E(l))?n:null==S?void 0:null==(r=S.colors)?void 0:r[0])?t:"#222",R=(0,b.useMemo)(function(){var e=k?0:-T/2,t=k?-T/2:0;return s.map(function(n,r){var i,o=O(n)+e;if(!bX(o))return null;var s=M(n)+t;if(!bX(s))return null;var l=k?o-A:s-P;return bX(l)?{key:""+r,x:k?A+Math.min(0,l):o,y:k?s:P+Math.min(0,l),width:k?Math.abs(l):T,height:k?T:Math.abs(l),fill:null!=(i=null==a?void 0:a(n,r))?i:N}:null}).filter(function(e){return e})},[T,N,a,s,O,M,k,A,P]),D="BARSERIES_EVENT_SOURCE-"+l,L=x_({dataKey:l,enableEvents:void 0===m||m,onBlur:u,onFocus:c,onPointerMove:d,onPointerOut:f,onPointerUp:h,onPointerDown:p,source:D,allowedSources:[xu,D]});return b.createElement("g",{className:"vx-bar-series"},b.createElement(i,wb({bars:R,horizontal:k,xScale:g,yScale:x},L,w)))}wx.propTypes={barPadding:pD().number,colorAccessor:pD().func};var ww=xa(wx),wj=["colorAccessor"];function wE(){return(wE=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,wj);return b.createElement(ww,wE({},n,{colorAccessor:t,BarsComponent:wm}))}var wS=n(15590);function w_(){return(w_=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,wP),i=(0,b.useCallback)(function(e){return b.createElement(wA,wN({},e,{renderGlyph:n}))},[n]);return b.createElement(xM,wN({},r,{renderGlyphs:i}))}var wD=n(93353),wL=n(63962),wF=["rows","columns","GridRowsComponent","GridColumnsComponent"];function wz(){return(wz=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,wF),l=(0,b.useContext)(bY),u=l.theme,c=l.xScale,d=l.yScale,f=l.margin,h=l.innerWidth,p=l.innerHeight,m=null==u?void 0:u.gridStyles;return b.createElement(b.Fragment,null,n&&d&&null!=h&&b.createElement(o,wz({left:null==f?void 0:f.left,lineStyle:m,width:h,scale:d},s)),i&&c&&null!=p&&b.createElement(a,wz({top:null==f?void 0:f.top,lineStyle:m,height:p,scale:c},s)))}wV.propTypes={rows:pD().bool,columns:pD().bool};var wI=["animationTrajectory"];function wZ(){return(wZ=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,wI),r=(0,b.useMemo)(function(){return function(e){return b.createElement(wD.Z,wZ({},e,{animationTrajectory:t}))}},[t]),i=(0,b.useMemo)(function(){return function(e){return b.createElement(wL.Z,wZ({},e,{animationTrajectory:t}))}},[t]);return b.createElement(wV,wZ({GridRowsComponent:r,GridColumnsComponent:i},n))}var wH=["colorAccessor","curve","data","dataKey","onBlur","onFocus","onPointerMove","onPointerOut","onPointerUp","onPointerDown","enableEvents","xAccessor","xScale","yAccessor","yScale","PathComponent"];function wU(){return(wU=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,wH),E=(0,b.useContext)(bY),k=E.colorScale,S=E.theme,_=(0,b.useMemo)(function(){return xs(v,m)},[v,m]),C=(0,b.useMemo)(function(){return xs(y,g)},[y,g]),O=(0,b.useCallback)(function(e){return bX(v(m(e)))&&bX(y(g(e)))},[v,m,y,g]),M=null!=(t=null!=(n=null==k?void 0:k(s))?n:null==S?void 0:null==(r=S.colors)?void 0:r[0])?t:"#222",T="LINESERIES_EVENT_SOURCE-"+s,A=x_({dataKey:s,enableEvents:void 0===p||p,onBlur:l,onFocus:u,onPointerMove:c,onPointerOut:d,onPointerUp:f,onPointerDown:h,source:T,allowedSources:[xu,T]}),P=!!(u||l),N=(0,b.useCallback)(function(e){var t=e.glyphs;return P?t.map(function(e){return b.createElement(b.Fragment,{key:e.key},xT(wU({},e,{color:"transparent",onFocus:A.onFocus,onBlur:A.onBlur})))}):null},[P,A.onFocus,A.onBlur]);return b.createElement(b.Fragment,null,b.createElement(xi.Z,wU({x:_,y:C,defined:O,curve:o},j),function(e){var t,n=e.path;return b.createElement(w,wU({stroke:null!=(t=null==i?void 0:i(s))?t:M,strokeWidth:2,fill:"transparent",strokeLinecap:"round"},j,{d:n(a)||""},A))}),P&&b.createElement(xO,{dataKey:s,data:a,xAccessor:m,yAccessor:g,xScale:v,yScale:y,renderGlyphs:N}))}wW.propTypes={colorAccessor:pD().func};var wq=xa(wW);function w$(){return(w$=Object.assign?Object.assign.bind():function(e){for(var t=1;twX.every(n=>e[n]===t[n]);function wQ(e,t){return(wQ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var w0=function(e){function t(){return e.apply(this,arguments)||this}t.prototype=Object.create(e.prototype),t.prototype.constructor=t,wQ(t,e);var n=t.prototype;return n.componentWillUnmount=function(){this.node&&document.body&&(document.body.removeChild(this.node),delete this.node)},n.render=function(){return(this.node||"undefined"==typeof document||(this.node=document.createElement("div"),null!=this.props.zIndex&&(this.node.style.zIndex=""+this.props.zIndex),document.body.append(this.node)),this.node)?e5.createPortal(this.props.children,this.node):null},t}(b.PureComponent);w0.propTypes={zIndex:pD().oneOfType([pD().number,pD().string])};var w1=["detectBounds","zIndex"],w2=["left","top","detectBounds","zIndex"];function w4(){return(w4=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}var w5=["debounce","detectBounds","horizontalCrosshairStyle","glyphStyle","renderTooltip","renderGlyph","resizeObserverPolyfill","scroll","showDatumGlyph","showHorizontalCrosshair","showSeriesGlyphs","showVerticalCrosshair","snapTooltipToDatumX","snapTooltipToDatumY","verticalCrosshairStyle","zIndex"],w6=["x","y"];function w8(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}function w7(){return(w7=Object.assign?Object.assign.bind():function(e){for(var t=1;t(f.current=!0,()=>void(f.current=!1)));let[h,p,m]=(0,b.useMemo)(()=>{let e=()=>{if(!u.current.element)return;let{left:e,top:t,width:n,height:r,bottom:i,right:a,x:s,y:c}=u.current.element.getBoundingClientRect(),d={left:e,top:t,width:n,height:r,bottom:i,right:a,x:s,y:c};u.current.element instanceof HTMLElement&&o&&(d.height=u.current.element.offsetHeight,d.width=u.current.element.offsetWidth),Object.freeze(d),f.current&&!wJ(u.current.lastBounds,d)&&l(u.current.lastBounds=d)};return[e,d?wG()(e,d):e,c?wG()(e,c):e]},[l,o,c,d]);function v(){u.current.scrollContainers&&(u.current.scrollContainers.forEach(e=>e.removeEventListener("scroll",m,!0)),u.current.scrollContainers=null),u.current.resizeObserver&&(u.current.resizeObserver.disconnect(),u.current.resizeObserver=null)}function g(){u.current.element&&(u.current.resizeObserver=new a(m),u.current.resizeObserver.observe(u.current.element),r&&u.current.scrollContainers&&u.current.scrollContainers.forEach(e=>e.addEventListener("scroll",m,{capture:!0,passive:!0})))}return t=!!r,(0,b.useEffect)(()=>{if(t)return window.addEventListener("scroll",m,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",m,!0)},[m,t]),(0,b.useEffect)(()=>(window.addEventListener("resize",p),()=>void window.removeEventListener("resize",p)),[p]),(0,b.useEffect)(()=>{v(),g()},[r,m,p]),(0,b.useEffect)(()=>v,[]),[e=>{e&&e!==u.current.element&&(v(),u.current.element=e,u.current.scrollContainers=function e(t){let n=[];if(!t||t===document.body)return n;let{overflow:r,overflowX:i,overflowY:o}=window.getComputedStyle(t);return[r,i,o].some(e=>"auto"===e||"scroll"===e)&&n.push(t),[...n,...e(t.parentElement)]}(e),g())},s,h]}(w3(ei,w1)))[0],ec=el[1],ed=el[2],ef=(0,b.useMemo)(function(){return function(e){var t=e.left,n=e.top,r=e.detectBounds,i=e.zIndex,o=w3(e,w2),a=null==i?es:i,s=(null==r?ea:r)?mo:p6,l=(void 0===t?0:t)+(ec.left||0)+window.scrollX,u=(void 0===n?0:n)+(ec.top||0)+window.scrollY;return b.createElement(w0,{zIndex:a},b.createElement(s,w4({left:l,top:u},o)))}},[ea,es,ec.left,ec.top]),{containerRef:eu,containerBounds:ec,forceRefreshBounds:ed,TooltipInPortal:ef}),L=D.containerRef,F=D.TooltipInPortal,z=D.forceRefreshBounds,V=(0,b.useCallback)(function(e){var t;L(null!=(t=null==e?void 0:e.parentElement)?t:null)},[L]),I=null!=R&&R.tooltipOpen?o(w7({},R,{colorScale:_})):null,Z=(null==R?void 0:R.tooltipOpen)&&null!=I,B=(0,b.useRef)(!1);(0,b.useEffect)(function(){Z&&!B.current&&z(),B.current=Z},[Z,z]);var H=null==R?void 0:R.tooltipLeft,U=null==R?void 0:R.tooltipTop,W=A?bG(A):0,q=P?bG(P):0,$=(0,b.useCallback)(function(e,t){var n,r,i=null==N?void 0:N.get(e),o=null==i?void 0:i.xAccessor,a=null==i?void 0:i.yAccessor;return{left:A&&o?null!=(n=Number(A(o(t)))+W/2)?n:0:void 0,top:P&&a?null!=(r=Number(P(a(t)))+q/2)?r:0:void 0}},[N,W,q,A,P]),K=null==R?void 0:null==(eh=R.tooltipData)?void 0:eh.nearestDatum,Y=null!=(ep=null==K?void 0:K.key)?ep:"";if(Z&&K&&(y||w)){var G=$(Y,K.datum),X=G.left,J=G.top;H=y&&bX(X)?X:H,U=w&&bX(J)?J:U}var Q=[];if(Z&&(void 0!==c&&c||p)){var ee=Number(null!=(e_=null==i?void 0:i.radius)?e_:4);if(p)Object.values(null!=(eC=null==R?void 0:null==(eO=R.tooltipData)?void 0:eO.datumByKey)?eC:{}).forEach(function(e){var t,n,r,o=e.key,a=e.datum,s=e.index,l=null!=(t=null!=(n=null==_?void 0:_(o))?n:null==C?void 0:null==(r=C.htmlLabel)?void 0:r.color)?t:"#222",u=$(o,a),c=u.left,d=u.top;bX(c)&&bX(d)&&Q.push({key:o,color:l,datum:a,index:s,size:ee,x:c,y:d,glyphStyle:i,isNearestDatum:!!K&&K.key===o})});else if(K){var et=$(Y,K.datum),en=et.left,er=et.top;if(bX(en)&&bX(er)){var ei,eo,ea,es,el,eu,ec,ed,ef,eh,ep,em,ev,eg,ey,eb,ex,ew,ej,eE,ek,eS,e_,eC,eO,eM,eT,eA,eP,eN,eR,eD=null!=(eM=null!=(eT=null!=(eA=null!=(eP=Y&&(null==_?void 0:_(Y)))?eP:null)?eA:null==C?void 0:null==(eN=C.gridStyles)?void 0:eN.stroke)?eT:null==C?void 0:null==(eR=C.htmlLabel)?void 0:eR.color)?eM:"#222";Q.push({key:Y,color:eD,datum:K.datum,index:K.index,size:ee,x:en,y:er,glyphStyle:i,isNearestDatum:!0})}}}return b.createElement(b.Fragment,null,b.createElement("svg",{ref:V,style:je}),Z&&b.createElement(b.Fragment,null,v&&b.createElement(F,{className:"visx-crosshair visx-crosshair-vertical",left:H,top:null==T?void 0:T.top,offsetLeft:0,offsetTop:0,detectBounds:!1,style:w9},b.createElement("svg",{width:"1",height:O,overflow:"visible"},b.createElement("line",w7({x1:0,x2:0,y1:0,y2:O,strokeWidth:1.5,stroke:null!=(em=null!=(ev=null==C?void 0:null==(eg=C.gridStyles)?void 0:eg.stroke)?ev:null==C?void 0:null==(ey=C.htmlLabel)?void 0:ey.color)?em:"#222"},j)))),f&&b.createElement(F,{className:"visx-crosshair visx-crosshair-horizontal",left:null==T?void 0:T.left,top:U,offsetLeft:0,offsetTop:0,detectBounds:!1,style:w9},b.createElement("svg",{width:M,height:"1",overflow:"visible"},b.createElement("line",w7({x1:0,x2:M,y1:0,y2:0,strokeWidth:1.5,stroke:null!=(eb=null!=(ex=null==C?void 0:null==(ew=C.gridStyles)?void 0:ew.stroke)?ex:null==C?void 0:null==(ej=C.htmlLabel)?void 0:ej.color)?eb:"#222"},r)))),Q.map(function(e,t){var n=e.x,r=e.y,i=w8(e,w6);return b.createElement(F,{key:t,className:"visx-tooltip-glyph",left:n,top:r,offsetLeft:0,offsetTop:0,detectBounds:!1,style:w9},b.createElement("svg",{overflow:"visible"},s(w7({x:0,y:0},i))))}),b.createElement(F,w7({left:H,top:U,style:w7({},p5,{background:null!=(eE=null==C?void 0:C.backgroundColor)?eE:"white",boxShadow:"0 1px 2px "+(null!=C&&null!=(ek=C.htmlLabel)&&ek.color?(null==C?void 0:null==(eS=C.htmlLabel)?void 0:eS.color)+"55":"#22222255")},null==C?void 0:C.htmlLabel)},k),I)))}function ji(e){var t=(0,b.useContext)(xc);return null!=t&&t.tooltipOpen?b.createElement(jr,e):null}function jo(e){var t=e.children,n=(0,b.useMemo)(function(){var e;return{all:e=e||new Map,on:function(t,n){var r=e.get(t);r&&r.push(n)||e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&r.splice(r.indexOf(n)>>>0,1)},emit:function(t,n){(e.get(t)||[]).slice().map(function(e){e(n)}),(e.get("*")||[]).slice().map(function(e){e(t,n)})}}},[]);return b.createElement(xd.Provider,{value:n},t)}function ja(){return(ja=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(t,p1);return p2({},e(n),{tooltipOpen:!0})}:{tooltipOpen:!0,tooltipLeft:e.tooltipLeft,tooltipTop:e.tooltipTop,tooltipData:e.tooltipData})},[r]),o=(0,b.useCallback)(function(){return r({tooltipOpen:!1,tooltipLeft:void 0,tooltipTop:void 0,tooltipData:void 0})},[r]),{tooltipOpen:n.tooltipOpen,tooltipLeft:n.tooltipLeft,tooltipTop:n.tooltipTop,tooltipData:n.tooltipData,updateTooltip:r,showTooltip:i,hideTooltip:o}),c=u.tooltipOpen,d=u.tooltipLeft,f=u.tooltipTop,h=u.tooltipData,p=u.updateTooltip,m=u.hideTooltip,v=(0,b.useRef)(null),g=(0,b.useRef)(function(e){var t=e.svgPoint,n=e.index,r=e.key,i=e.datum,o=e.distanceX,a=e.distanceY;v.current&&(v.current.cancel(),v.current=null);var s=Math.sqrt(Math.pow(bX(o)?o:1/0,2)+Math.pow(bX(a)?a:1/0,2));p(function(e){var o,a,l,u=e.tooltipData,c=null!=u&&u.nearestDatum&&bX(u.nearestDatum.distance)?u.nearestDatum.distance:1/0;return{tooltipOpen:!0,tooltipLeft:null==t?void 0:t.x,tooltipTop:null==t?void 0:t.y,tooltipData:{nearestDatum:(null!=(o=null==u?void 0:null==(a=u.nearestDatum)?void 0:a.key)?o:"")!==r&&c0&&o>0&&y({width:m,height:o,margin:l})},[y,m,o,l]);var j=xh({source:xu});return(xS({dataKey:"nearest"===(void 0===h?"nearest":h)?xk:xE,onPointerMove:u,onPointerOut:c,onPointerUp:d,onPointerDown:f,allowedSources:jx}),y)?null==m||null==o?b.createElement(vv.Z,null,function(t){return b.createElement(jw,jy({},e,{width:null==e.width?t.width:e.width,height:null==e.height?t.height:e.height}))}):null==x?b.createElement(js,null,b.createElement(jw,e)):null==w?b.createElement(jo,null,b.createElement(jw,e)):m>0&&o>0?b.createElement("svg",{width:m,height:o,"aria-label":void 0===t?"XYChart":t},i,r&&b.createElement("rect",jy({x:l.left,y:l.top,width:m-l.left-l.right,height:o-l.top-l.bottom,fill:"transparent"},j))):null:v&&g?b.createElement(jg,{xScale:v,yScale:g,theme:p,initialDimensions:{width:m,height:o,margin:l},horizontal:a},b.createElement(jw,e)):(console.warn("[@visx/xychart] XYChart: When no DataProvider is available in context, you must pass xScale & yScale config to XYChart."),null)}function jj(e){return b.createElement(xR,e)}function jE(e){return b.createElement(x2,e)}function jk(){return(jk=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function jT(e){var t=e.bars,n=(e.horizontal,e.xScale,e.yScale,e.radius),r=e.radiusAll,i=e.radiusTop,o=e.radiusRight,a=e.radiusBottom,s=e.radiusLeft,l=jM(e,j_),u=!!(l.onFocus||l.onBlur);return b.createElement(b.Fragment,null,t.map(function(e){var t=e.key,c=jM(e,jC);return null==n?b.createElement("rect",jO({key:t,className:"visx-bar",tabIndex:u?0:void 0},c,l)):b.createElement(wo.Z,jO({key:t,className:"visx-bar",tabIndex:u?0:void 0,radius:n,all:r,top:i,right:o,bottom:a,left:s},c,l))}))}function jA(){return(jA=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,jN);return b.createElement(ww,jR({},n,{colorAccessor:t,BarsComponent:jT}))};function jL(){return(jL=Object.assign?Object.assign.bind():function(e){for(var t=1;tr(e),className:"flex flex-col gap-1",children:[(0,y.jsx)(dQ,{value:"line",children:"Line"}),(0,y.jsx)(dQ,{disabled:f||h,value:"areastack",children:"Area Stack"}),(0,y.jsx)(dQ,{disabled:f||h,value:"barstack",children:"Bar Stack"}),(0,y.jsx)(dQ,{disabled:f,value:"area",children:"Area"}),(0,y.jsx)(dQ,{disabled:f,value:"bargroup",children:"Bar Group"})]})]}),(0,y.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,y.jsx)(tW,{weight:"semibold",children:"Stack series offset"}),(0,y.jsxs)(d0,{value:l,onValueChange:e=>u(e),className:"flex flex-col gap-1",children:[(0,y.jsxs)(dQ,{disabled:!s,value:"none",children:["Auto",(0,y.jsx)(fV,{children:"zero-baseline"})]}),(0,y.jsxs)(dQ,{disabled:!s,value:"expand",children:["Expand",(0,y.jsx)(fV,{children:"values sum to 1"})]}),(0,y.jsxs)(dQ,{disabled:!s,value:"wiggle",children:["Wiggle",(0,y.jsx)(fV,{children:"stream graph"})]})]})]}),(0,y.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,y.jsx)(tW,{weight:"semibold",children:"Curve shape"}),(0,y.jsxs)(d0,{value:i,onValueChange:e=>o(e),className:"flex flex-col gap-1",children:[(0,y.jsx)(dQ,{disabled:!a,value:"linear",children:"Linear"}),(0,y.jsx)(dQ,{disabled:!a,value:"cardinal",children:"Cardinal"}),(0,y.jsx)(dQ,{disabled:!a,value:"step",children:"Step"})]})]}),(0,y.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,y.jsx)(tW,{weight:"semibold",children:"Axes"}),(0,y.jsx)("div",{className:"flex flex-col gap-6",children:(0,y.jsxs)(d0,{value:c,onValueChange:e=>d(e),className:"flex flex-col gap-1",children:[(0,y.jsx)(dQ,{value:"bottom",children:"Bottom"}),(0,y.jsx)(dQ,{value:"top",children:"Top"})]})})]})]})})}let j3=(0,b.forwardRef)((e,t)=>{let{className:n}=e;return(0,y.jsxs)("div",{ref:t,className:(0,eo.cx)("flex gap-1 items-center",n),children:[(0,y.jsx)(j5,{}),(0,y.jsx)(j5,{}),(0,y.jsx)(j5,{})]})});function j5(){return(0,y.jsx)("div",{className:"w-1 h-1 bg-slate-400 dark:bg-slate-200 rounded-full animate-pulselight [&:nth-child(2)]:animation-delay-500 [&:nth-child(3)]:animation-delay-1000"})}function j6(e){let{id:t,height:n,data:r,config:i,actionsLeft:o,isLoading:a,actionsRight:s,chartType:l="areastack",curveType:u="linear",stackOffset:c="none",variant:d="panel",allowConfiguration:f=!0}=e,h=function(e,t,n,r,i,o){let a=(0,b.useMemo)(()=>{if(t.sort((e,t)=>e.timestamp>t.timestamp?1:-1),0===t.length)return[];let e=t[t.length-1];return[...t,{...e,timestamp:e.timestamp+jq(1)}]},[t]),s=(0,b.useMemo)(()=>{if(a.length<2)return 0;let e=[a[0].timestamp,a[a.length-1].timestamp],t=new Date().getTime();return t>e[0]&&t"dark"===c?vW:vU,[c]),[f,h]=(0,b.useState)("center"),[p,m]=(0,b.useState)([!1,!1]),[v,g]=p,[x,w]=(0,b.useState)("bottom"),[j,E]=(0,b.useState)("right"),[k,S]=(0,b.useState)(!0),[_,C]=(0,b.useState)(!0),[O,M]=(0,b.useState)(!1),[T,A]=(0,b.useState)(!0),[P,N]=(0,b.useState)(!0),[R,D]=(0,b.useState)(r),[L,F]=(0,b.useState)(i),[z,V]=(0,b.useState)(o),I=d.xyChartTheme.gridStyles.stroke,[Z,B]=(0,b.useState)(!1),[H,U]=(0,b.useState)("star"),W=(0,b.useCallback)(e=>{let{x:t,y:n,size:r,color:i,onPointerMove:o,onPointerOut:a,onPointerUp:s,isNearestDatum:l}=e,u={onPointerMove:o,onPointerOut:a,onPointerUp:s};return"star"===H?(0,y.jsx)(vC,{left:t,top:n,stroke:I,fill:i,size:10*r,...u}):"circle"===H?(0,y.jsx)(vT,{left:t,top:n,stroke:I,fill:i,r:r,...u}):"cross"===H?(0,y.jsx)(vR,{left:t,top:n,stroke:I,fill:i,size:10*r,...u}):(0,y.jsx)("text",{x:t,y:n,dx:"-0.75em",dy:"0.25em",fontSize:14,...u,children:l?"\uD83C\uDF4D":"\uD83C\uDF4C"})},[H,I]),q=(0,b.useMemo)(()=>Object.keys(jU()(t[0],"timestamp")),[t]),$=(0,b.useMemo)(()=>n.enabledGraph||q,[q,n]),K=(0,b.useMemo)(()=>n.enabledTip||q,[q,n]),Y=(0,b.useMemo)(()=>({x:q.reduce((e,t)=>({...e,[t]:e=>e.timestamp}),{}),y:q.reduce((e,t)=>({...e,[t]:e=>e[t]}),{}),date:e=>e.timestamp}),[q]),G=["line","area","areastack"].includes(R),X=["barstack","areastack"].includes(R),J=(0,b.useMemo)(()=>({x:{type:"band",paddingInner:G?1:.3},y:{type:"linear"}}),[G]),Q=(0,b.useMemo)(()=>"cardinal"===L&&vD.ZP||"step"===L&&mF.ZP||vL.Z,[L]),ee=(0,b.useMemo)(()=>({top:30,bottom:"top"===x?0:20,left:0,right:0}),[x]);return{id:e,accessors:Y,animationTrajectory:f,config:n,scales:J,data:a,curve:Q,chartData:t,numTicks:4,isLine:G,isStack:X,todayOffset:s,initialChartType:r,chartType:R,curveType:L,keys:q,enabledGraph:$,enabledTip:K,renderBarGroup:"bargroup"===R,renderBarStack:"barstack"===R,enableTooltipGlyph:Z,renderTooltipGlyph:W,renderAreaSeries:"area"===R,renderAreaStack:"areastack"===R,renderLineSeries:"line"===R,sharedTooltip:P,showGridColumns:g,showGridRows:v,showHorizontalCrosshair:O,showTooltip:k,showVerticalCrosshair:_,snapTooltipToDatum:!X&&T,stackOffset:z,theme:d,margin:ee,xAxisOrientation:x,yAxisOrientation:j,setUseAnimatedComponents:u,setAnimationTrajectory:h,setGridProps:m,setXAxisOrientation:w,setYAxisOrientation:E,setShowTooltip:S,setShowVerticalCrosshair:C,setShowHorizontalCrosshair:M,setSnapTooltipToDatum:A,setSharedTooltip:N,setChartType:D,setCurveType:F,setStackOffset:V,setEnableTooltipGlyph:B,setTooltipGlyphComponent:U,...l?{Annotation:b6,AreaSeries:xL,AreaStack:x3,Axis:we,BarGroup:wg,BarSeries:wk,BarStack:wM,GlyphSeries:wR,Grid:wB,LineSeries:wK,Tooltip:ji,XYChart:jw}:{AreaSeries:jj,AreaStack:jE,Axis:jS,BarGroup:jP,BarSeries:jD,BarStack:jF,Grid:jZ,LineSeries:jB,Tooltip:ji,XYChart:jw}}}(t,r,i,l,u,c),p=(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)("div",{className:"flex gap-2 absolute top-3 right-4",children:[s,"panel"===d&&f&&(0,y.jsx)(j4,{...h})]}),(0,y.jsx)("div",{className:"flex gap-2 absolute top-3 left-4",children:o}),(0,y.jsx)(vv.Z,{children:e=>{let{width:t,height:n}=e;return a?(0,y.jsx)("div",{className:"flex items-center justify-center h-full",children:(0,y.jsx)(j3,{className:"scale-150"})}):(0,y.jsx)(vb,{...h,width:t,height:n})}})]});return"panel"===d?(0,y.jsx)(tK,{className:"relative p-px",style:{height:n},children:p}):(0,y.jsx)("div",{className:"relative p-px",style:{height:n},children:p})}/*! ***************************************************************************** +***************************************************************************** */var fk=function(){return(fk=Object.assign||function(e){for(var t,n=1,r=arguments.length;n1){if(e.includes(t)){var r=e.split(t),i=r[0],o=r[1];if(o.length>n)return""+i+t+o.slice(0,n)}var a=e.length>n?RegExp("(\\d+)(\\d{"+n+"})"):RegExp("(\\d)(\\d+)"),s=e.match(a);if(s){var i=s[1],o=s[2];return""+i+t+o}}return e},fN=function(e,t){var n=t.groupSeparator,r=t.decimalSeparator,i=RegExp("\\d([^"+f_(void 0===n?",":n)+f_(void 0===r?".":r)+"0-9]+)"),o=e.match(i);return o?o[1]:void 0},fR=function(e){var t=e.value,n=e.decimalSeparator,r=e.intlConfig,i=e.decimalScale,o=e.prefix,a=void 0===o?"":o,s=e.suffix,l=void 0===s?"":s;if(""===t||void 0===t)return"";if("-"===t)return"-";var u=RegExp("^\\d?-"+(a?f_(a)+"?":"")+"\\d").test(t),c="."!==n?fD(t,n,u):t,d=fL((r?new Intl.NumberFormat(r.locale,r.currency?{style:"currency",currency:r.currency,minimumFractionDigits:i||0,maximumFractionDigits:20}:void 0):new Intl.NumberFormat(void 0,{minimumFractionDigits:i||0,maximumFractionDigits:20})).formatToParts(Number(c)),e),f=fN(d,fk({},e)),h=t.slice(-1)===n?n:"",p=(c.match(RegExp("\\d+\\.(\\d+)"))||[])[1];return(void 0===i&&p&&n&&(d=d.includes(n)?d.replace(RegExp("(\\d+)("+f_(n)+")(\\d+)","g"),"$1$2"+p):f&&!l?d.replace(f,""+n+p+f):""+d+n+p),l&&h)?""+d+h+l:f&&h?d.replace(f,""+h+f):f&&l?d.replace(f,""+h+l):[d,h,l].join("")},fD=function(e,t,n){var r=e;return t&&"."!==t&&(r=r.replace(RegExp(f_(t),"g"),"."),n&&"-"===t&&(r="-"+r.slice(1))),r},fL=function(e,t){var n=t.prefix,r=t.groupSeparator,i=t.decimalSeparator,o=t.decimalScale,a=t.disableGroupSeparators,s=void 0!==a&&a;return e.reduce(function(e,t,a){var l=t.type,u=t.value;return 0===a&&n?"minusSign"===l?[u,n]:"currency"===l?fS(fS([],e),[n]):[n,u]:"currency"===l?n?e:fS(fS([],e),[u]):"group"===l?s?e:fS(fS([],e),[void 0!==r?r:u]):"decimal"===l?void 0!==o&&0===o?e:fS(fS([],e),[void 0!==i?i:u]):"fraction"===l?fS(fS([],e),[void 0!==o?u.slice(0,o):u]):fS(fS([],e),[u])},[""]).join("")},fF={currencySymbol:"",groupSeparator:"",decimalSeparator:"",prefix:"",suffix:""},fz=function(e){var t=e||{},n=t.locale,r=t.currency;return(n?new Intl.NumberFormat(n,r?{currency:r,style:"currency"}:void 0):new Intl.NumberFormat).formatToParts(1000.1).reduce(function(e,t,n){return"currency"===t.type?0===n?fk(fk({},e),{currencySymbol:t.value,prefix:t.value}):fk(fk({},e),{currencySymbol:t.value,suffix:t.value}):"group"===t.type?fk(fk({},e),{groupSeparator:t.value}):"decimal"===t.type?fk(fk({},e),{decimalSeparator:t.value}):e},fF)},fV=function(e){return RegExp(/\d/,"gi").test(e)},fI=function(e,t,n){if(void 0===t&&(t="."),void 0===n||""===e||void 0===e)return e;if(!e.match(/\d/g))return"";var r=e.split(t),i=r[0],o=r[1];if(0===n)return i;var a=o||"";if(a.lengtht.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);it.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}(e,["allowDecimals","allowNegativeValue","id","name","className","customInput","decimalsLimit","defaultValue","disabled","maxLength","value","onValueChange","fixedDecimalLength","placeholder","decimalScale","prefix","suffix","intlConfig","step","min","max","disableGroupSeparators","disableAbbreviations","decimalSeparator","groupSeparator","onChange","onFocus","onBlur","onKeyDown","onKeyUp","transformRawValue"]);if(C&&fV(C))throw Error("decimalSeparator cannot be a number");if(O&&fV(O))throw Error("groupSeparator cannot be a number");var L=(0,b.useMemo)(function(){return fz(x)},[x]),F=C||L.decimalSeparator||"",z=O||L.groupSeparator||"";if(F&&z&&F===z&&!1===S)throw Error("decimalSeparator cannot be the same as groupSeparator");var V={decimalSeparator:F,groupSeparator:z,disableGroupSeparators:S,intlConfig:x,prefix:g||L.prefix,suffix:y},I={decimalSeparator:F,groupSeparator:z,allowDecimals:void 0===n||n,decimalsLimit:l||p||2,allowNegativeValue:void 0===r||r,disableAbbreviations:void 0!==_&&_,prefix:g||L.prefix,transformRawValue:R},Z=null!=u?fR(fk(fk({},V),{decimalScale:v,value:String(u)})):null!=f?fR(fk(fk({},V),{decimalScale:v,value:String(f)})):"",B=(0,b.useState)(Z),H=B[0],U=B[1],W=(0,b.useState)(!1),q=W[0],$=W[1],K=(0,b.useState)(0),Y=K[0],G=K[1],X=(0,b.useState)(0),J=X[0],Q=X[1],ee=(0,b.useState)(null),et=ee[0],en=ee[1],er=t||(0,b.useRef)(null),ei=function(e,t){$(!0);var n=fZ({selectionStart:t,value:e,lastKeyStroke:et,stateValue:H,groupSeparator:z}),r=n.modifiedValue,i=n.cursorPosition,a=fA(fk({value:r},I));if(!d||!(a.replace(/-/g,"").length>d)){if(""===a||"-"===a||a===F){h&&h(void 0,o,{float:null,formatted:"",value:""}),U(a);return}var s=parseFloat(a.replace(F,".")),l=fR(fk({value:a},V));if(null!=i){var u=i+(l.length-e.length);G(u=u<=0?g?g.length:0:u),Q(J+1)}U(l),h&&h(a,o,{float:s,formatted:l,value:a})}};(0,b.useEffect)(function(){q&&"-"!==H&&er&&"object"==typeof er&&er.current&&er.current.setSelectionRange(Y,Y)},[H,Y,er,q,J]);var eo=fk({type:"text",inputMode:"decimal",id:i,name:o,className:a,onChange:function(e){var t=e.target;ei(t.value,t.selectionStart),M&&M(e)},onBlur:function(e){var t=e.target.value,n=fA(fk({value:t},I));if("-"===n||!n){U(""),A&&A(e);return}var r=fI(fP(n,F,p),F,void 0!==v?v:p),i=parseFloat(r.replace(F,".")),a=fR(fk(fk({},V),{value:r}));h&&h(r,o,{float:i,formatted:a,value:r}),U(a),A&&A(e)},onFocus:function(e){return T&&T(e),H?H.length:0},onKeyDown:function(e){var t=e.key;if(en(t),w&&("ArrowUp"===t||"ArrowDown"===t)){e.preventDefault(),G(H.length);var n=parseFloat(null!=f?String(f).replace(F,"."):fA(fk({value:H},I)))||0,r="ArrowUp"===t?n+w:n-w;if(void 0!==j&&rE)return;var i=String(w).includes(".")?Number(String(w).split(".")[1].length):void 0;ei(String(i?r.toFixed(i):r).replace(".",F))}P&&P(e)},onKeyUp:function(e){var t=e.key,n=e.currentTarget.selectionStart;if("ArrowUp"!==t&&"ArrowDown"!==t&&"-"!==H){var r=fN(H,{groupSeparator:z,decimalSeparator:F});if(r&&n&&n>H.length-r.length&&er&&"object"==typeof er&&er.current){var i=H.length-r.length;er.current.setSelectionRange(i,i)}}N&&N(e)},placeholder:m,disabled:void 0!==c&&c,value:null==f||"-"===H||F&&H===F?H:fR(fk(fk({},V),{decimalScale:q?void 0:v,value:String(f)})),ref:er},D);return s?b.createElement(s,fk({},eo)):b.createElement("input",fk({},eo))});function fH(e){let{units:t,variant:n,size:r="small",state:i,noSpin:o,focus:a,cursor:s,className:l,decimalsLimit:u,onValueChange:c,...d}=e,[f,h]=(0,b.useState)();return(0,b.useEffect)(()=>{h(navigator.language)},[]),(0,y.jsxs)("div",{className:"relative",children:[(0,y.jsx)(fB,{...d,decimalsLimit:u,intlConfig:f?{locale:f}:void 0,allowDecimals:!!u,autoComplete:"off",spellCheck:!1,onValueChange:c,className:(0,em.cx)(fj({variant:n,size:r,state:i,focus:a,noSpin:o,cursor:s,className:l}),t?"pr-9":"")}),t&&(0,y.jsx)("div",{className:(0,em.cx)("flex items-center absolute top-0 h-full","small"===r?"right-2":"","medium"===r?"right-3":"","large"===r?"right-3":""),children:(0,y.jsx)(t1,{size:"12",weight:"medium",color:"subtle",children:t})})]})}fB.displayName="CurrencyInput";var fU=n(6391),fW=n.n(fU);function fq(e,t){return e.decimalPlaces()>t?e.toFixed(t):e.toString()}let f$=(0,b.forwardRef)(function(e,t){let{value:n,placeholder:r=new(fW())(100),decimalsLimit:i=6,onChange:o,size:a="small",units:s,error:l,changed:u,onBlur:c,onFocus:d,...f}=e,h=(0,b.useMemo)(()=>new(fW())(n),[n]),[p,m]=(0,b.useState)(""),v=(0,b.useMemo)(()=>fK(p),[p]),g=(0,b.useCallback)(e=>{o&&o((e=fK(e))&&!isNaN(Number(e))?new(fW())(e):void 0)},[o]),x=(0,b.useCallback)(e=>{m(e),g(e)},[m,g]);return(0,b.useEffect)(()=>{if(!h.isEqualTo(v)){let e=fq(h,i);m(e)}},[h]),(0,y.jsx)(fH,{ref:t,...f,"data-testid":"numberfield",size:a,placeholder:r.isNaN()?"":r.toFixed(i),units:s,value:"NaN"!==p?p:"",decimalsLimit:i,onBlur:e=>{c&&c(e)},onFocus:e=>{d&&d(e)},onValueChange:e=>x(e||"")})});function fK(e){return(null==e?void 0:e.replace(/,/g,"."))||""}var fY=n(2850),fG=n(47025);let fX=new(fW())(0),fJ=(0,b.forwardRef)(function(e,t){let{sc:n,placeholder:r=new(fW())(100),decimalsLimitFiat:i=6,decimalsLimitSc:o=6,onChange:a,size:s="medium",units:l="SC",showFiat:u=!0,error:c,changed:d,prefix:f,onBlur:h,onFocus:p,...m}=e,v=(0,b.useMemo)(()=>new(fW())(void 0===n?NaN:n),[n]),{settings:g}=(0,fY.Hv)(),x=(0,fG.BW)({config:{swr:{revalidateOnFocus:!1}}}),w=(0,b.useMemo)(()=>{var e;return g.siaCentral&&x.data?new(fW())((null===(e=x.data)||void 0===e?void 0:e.rates.sc[g.currency.id])||fX):fX},[x.data,g]),[j,E]=(0,b.useState)(),[k,S]=(0,b.useState)(""),[_,C]=(0,b.useState)(""),O=(0,b.useMemo)(()=>fQ(k),[k]),M=(0,b.useMemo)(()=>fQ(_),[_]),T=(0,b.useCallback)(e=>{a&&a((e=fQ(e))&&!isNaN(Number(e))?new(fW())(e):void 0)},[a]),A=(0,b.useCallback)(e=>{let t=fq(e,i);C(t)},[C,i]),P=(0,b.useCallback)(e=>{let t=fq(e,o);return S(t),T(t),t},[S,o,T]),N=(0,b.useCallback)(e=>{S(e),T(e)},[S,T]),R=(0,b.useCallback)(e=>{let t=new(fW())(e).times(w);A(t)},[A,w]),D=(0,b.useCallback)(e=>{let t=new(fW())(e).dividedBy(w);P(t)},[P,w]),[L,F]=(0,b.useState)(!1);return(0,b.useEffect)(()=>{if(!v.isEqualTo(O)){let e=fq(v,o);S(e),"fiat"!==j&&R(e)}L||F(!0)},[v]),(0,b.useEffect)(()=>{L&&R(O)},[w]),(0,b.useEffect)(()=>{"sc"===j&&R(O)},[O]),(0,b.useEffect)(()=>{"fiat"===j&&D(M)},[M]),(0,y.jsxs)("div",{ref:t,className:(0,em.cx)("flex flex-col bg-white dark:bg-graydark-50","focus-within:ring ring-blue-500 dark:ring-blue-200","border",c?"border-red-500 dark:border-red-400":d?"border-green-500 dark:border-green-400":"border-gray-200 dark:border-graydark-200","rounded"),children:[(0,y.jsx)(fH,{...m,"data-testid":"scInput",size:s,variant:"ghost",focus:"none",placeholder:r.toFixed(o),units:l,value:"NaN"!==k?k:"",decimalsLimit:o,allowNegativeValue:!1,onBlur:e=>{E(void 0),h&&h(e)},onFocus:e=>{E("sc"),p&&p(e)},onValueChange:e=>{N(e||"")}}),u&&g.siaCentral&&(0,y.jsx)(fH,{...m,"data-testid":"fiatInput",size:s,variant:"ghost",focus:"none",value:"NaN"!==_?_:"",units:g.currency.label,decimalsLimit:i,allowNegativeValue:!1,placeholder:"".concat(g.currency.prefix).concat(w?w.times(r).toFixed(i):"0.42"),prefix:f||g.currency.prefix,onFocus:e=>{E("fiat"),p&&p(e)},onBlur:e=>{E(void 0),h&&h(e)},onValueChange:e=>{C(e||"")}})]})});function fQ(e){return(null==e?void 0:e.replace(/,/g,"."))||""}function f0(e){let{children:t}=e;return(0,y.jsx)(ls,{content:t,children:(0,y.jsx)("div",{className:"relative flex items-center inline mx-1",children:(0,y.jsx)(t1,{color:"subtle",children:(0,y.jsx)(lc.RdX,{className:"scale-75"})})})})}function f1(e){let{values:t,options:n,onChange:r}=e;return(0,y.jsx)("div",{className:"flex flex-wrap gap-1",children:n.map(e=>(0,y.jsx)(lu,{variant:t.includes(e.value)?"active":"inactive",onClick:()=>{r(e.value)},children:e.label},e.value))})}function f2(e){let{options:t,onClick:n,onRemove:r}=e;return(0,y.jsx)("div",{className:"flex flex-wrap gap-1",children:t.map(e=>(0,y.jsxs)(lR,{children:[(0,y.jsx)(lu,{variant:"active",onClick:()=>{n&&n(e.value)},children:e.label}),(0,y.jsx)(lu,{variant:"active",size:"small",onClick:()=>r(e.value),children:(0,y.jsx)(lc.PcV,{})})]},e.value))})}let f4=(0,em.j)(["font-sans","font-normal","tabular-nums","flex-shrink-0","rounded","flex items-center","bg-white dark:bg-graydark-200","hover:bg-gray-50 dark:hover:bg-graydark-300","disabled:bg-gray-200 disabled:dark:bg-graydark-200","autofill:bg-blue-100 autofill:dark:bg-blue-800","border","focus-within:z-10","focus-within:ring ring-blue-500 dark:ring-blue-200","text-gray-1100 dark:text-white","[&>select:disabled]:text-gray-600 [&>select:disabled]:dark:text-graydark-700"],{variants:{size:{small:"h-7 text-sm px-1",medium:"h-10 text-base px-3",large:"h-12 text-lg px-3"},state:{default:["border-gray-400 dark:border-graydark-400","enabled:hover:border-gray-500 enabled:hover:dark:border-graydark-500"],invalid:["border-red-500 dark:border-red-400"],valid:["border-green-500 dark:border-green-400"]}},defaultVariants:{state:"default",size:"small"}}),f3=b.forwardRef((e,t)=>{let{size:n,state:r,icon:i,className:o,...a}=e;return(0,y.jsxs)("div",{className:f4({size:n,state:r,className:o}),children:[i,(0,y.jsx)("select",{ref:t,...a,className:"appearance-none flex-1 bg-transparent outline-none w-full h-full pl-1 pr-1"}),(0,y.jsx)(lc.Cp0,{className:"pointer-events-none scale-75"})]})}),f5=b.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,y.jsx)("option",{ref:t,...r,className:(0,em.cx)("bg-white dark:bg-graydark-200","text-gray-1100 dark:text-white",n)})}),f6=(0,em.j)(["bg-gray-300 dark:bg-graydark-300","relative","overflow-hidden","animate-pulse","rounded"]);function f8(e){let{className:t}=e;return(0,y.jsx)("div",{className:f6({className:t})})}let f7=(0,em.j)(["rounded-full flex-shrink-0"],{variants:{size:{default:"w-2 h-2"}},defaultVariants:{size:"default"}}),f9=b.forwardRef((e,t)=>{let{size:n,className:r,...i}=e;return(0,y.jsx)("div",{ref:t,className:f7({size:n,className:r}),...i})}),he="Switch",[ht,hn]=(0,j.b)(he),[hr,hi]=ht(he),ho=(0,b.forwardRef)((e,t)=>{let{__scopeSwitch:n,"aria-labelledby":r,name:i,checked:o,defaultChecked:a,required:s,disabled:l,value:u="on",onCheckedChange:c,...d}=e,[f,h]=(0,b.useState)(null),p=(0,E.e)(t,e=>h(e)),m=de(f),v=(0,b.useRef)(!1),g=!f||!!f.closest("form"),[y=!1,x]=(0,C.T)({prop:o,defaultProp:a,onChange:c});return(0,b.createElement)(hr,{scope:n,checked:y,disabled:l},(0,b.createElement)(O.WV.button,(0,w.Z)({type:"button",role:"switch","aria-checked":y,"aria-labelledby":r||m,"aria-required":s,"data-state":hl(y),"data-disabled":l?"":void 0,disabled:l,value:u},d,{ref:p,onClick:(0,_.M)(e.onClick,e=>{x(e=>!e),g&&(v.current=e.isPropagationStopped(),v.current||e.stopPropagation())})})),g&&(0,b.createElement)(hs,{control:f,bubbles:!v.current,name:i,value:u,checked:y,required:s,disabled:l,style:{transform:"translateX(-100%)"}}))}),ha=(0,b.forwardRef)((e,t)=>{let{__scopeSwitch:n,...r}=e,i=hi("SwitchThumb",n);return(0,b.createElement)(O.WV.span,(0,w.Z)({"data-state":hl(i.checked),"data-disabled":i.disabled?"":void 0},r,{ref:t}))}),hs=e=>{let{control:t,checked:n,bubbles:r=!0,...i}=e,o=(0,b.useRef)(null),a=dW(n),s=tc(t);return(0,b.useEffect)(()=>{let e=o.current,t=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(t,"checked"),s=i.set;if(a!==n&&s){let t=new Event("click",{bubbles:r});s.call(e,n),e.dispatchEvent(t)}},[a,n,r]),(0,b.createElement)("input",(0,w.Z)({type:"checkbox","aria-hidden":!0,defaultChecked:n},i,{tabIndex:-1,ref:o,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function hl(e){return e?"checked":"unchecked"}let hu=(0,em.j)(["absolute left-0 rounded-full","transition-transform","bg-white dark:bg-graydark-500"],{variants:{size:{small:["w-3 h-3","translate-x-px","data-[state=checked]:translate-x-[9px]"],medium:["w-5 h-5","translate-x-0.5","data-[state=checked]:translate-x-[20px]"]}},defaultVariants:{size:"small"}}),hc=(0,em.j)(["select-none outline-none","relative inline-flex items-center justify-center","m-0 rounded-full","focus:ring ring-blue-500 dark:ring-blue-200","border","bg-gray-300 dark:bg-graydark-50","autofill:bg-blue-100 autofill:dark:bg-blue-800","border-gray-400 dark:border-graydark-400","enabled:hover:border-gray-500 enabled:hover:dark:border-graydark-500","disabled:cursor-default","enabled:data-[state=checked]:bg-green-600 dark:enabled:data-[state=checked]:bg-green-500","disabled:data-[state=checked]:bg-green-600/50 dark:disabled:data-[state=checked]:bg-green-500/50"],{variants:{size:{small:"w-6 h-4",medium:"w-11 h-6"},state:{default:["border-gray-400 dark:border-graydark-400","enabled:hover:border-gray-500 enabled:hover:dark:border-graydark-500"],invalid:["border-red-500 dark:border-red-400"],valid:["border-green-500 dark:border-green-400"]}},defaultVariants:{size:"small",state:"default"}}),hd=(0,b.forwardRef)((e,t)=>{let{size:n,state:r,className:i,children:o,...a}=e;return(0,y.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,y.jsx)(ho,{className:hc({size:n,state:r,className:i}),...a,ref:t,children:(0,y.jsx)(ha,{className:hu({size:n})})}),o&&(0,y.jsx)(t1,{color:a.disabled?"subtle":"contrast",children:o})]})}),hf=(0,b.forwardRef)((e,t)=>{let{children:n,...r}=e,i=b.Children.toArray(n),o=i.find(hm);if(o){let e=o.props.children,n=i.map(t=>t!==o?t:b.Children.count(e)>1?b.Children.only(null):(0,b.isValidElement)(e)?e.props.children:null);return(0,b.createElement)(hh,(0,w.Z)({},r,{ref:t}),(0,b.isValidElement)(e)?(0,b.cloneElement)(e,void 0,n):null)}return(0,b.createElement)(hh,(0,w.Z)({},r,{ref:t}),n)});hf.displayName="Slot";let hh=(0,b.forwardRef)((e,t)=>{let{children:n,...r}=e;return(0,b.isValidElement)(n)?(0,b.cloneElement)(n,{...function(e,t){let n={...t};for(let r in t){let i=e[r],o=t[r],a=/^on[A-Z]/.test(r);a?i&&o?n[r]=(...e)=>{o(...e),i(...e)}:i&&(n[r]=i):"style"===r?n[r]={...i,...o}:"className"===r&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props),ref:(0,E.F)(t,n.ref)}):b.Children.count(n)>1?b.Children.only(null):null});hh.displayName="SlotClone";let hp=({children:e})=>(0,b.createElement)(b.Fragment,null,e);function hm(e){return(0,b.isValidElement)(e)&&e.type===hp}let hv=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{let n=(0,b.forwardRef)((e,n)=>{let{asChild:r,...i}=e,o=r?hf:t;return(0,b.useEffect)(()=>{window[Symbol.for("radix-ui")]=!0},[]),(0,b.createElement)(o,(0,w.Z)({},i,{ref:n}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),hg=(0,b.forwardRef)((e,t)=>{let{children:n,width:r=10,height:i=5,...o}=e;return(0,b.createElement)(hv.svg,(0,w.Z)({},o,{ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?n:(0,b.createElement)("polygon",{points:"0,0 30,0 15,10"}))}),hy="Popper",[hb,hx]=(0,j.b)(hy),[hw,hj]=hb(hy),hE=(0,b.forwardRef)((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,o=hj("PopperAnchor",n),a=(0,b.useRef)(null),s=(0,E.e)(t,a);return(0,b.useEffect)(()=>{o.onAnchorChange((null==r?void 0:r.current)||a.current)}),r?null:(0,b.createElement)(hv.div,(0,w.Z)({},i,{ref:s}))}),hk="PopperContent",[hS,h_]=hb(hk),[hC,hO]=hb(hk,{hasParent:!1,positionUpdateFns:new Set}),hM=(0,b.forwardRef)((e,t)=>{var n,r,i,o,a,s,l,u,c;let{__scopePopper:d,side:f="bottom",sideOffset:h=0,align:p="center",alignOffset:m=0,arrowPadding:v=0,collisionBoundary:g=[],collisionPadding:y=0,sticky:x="partial",hideWhenDetached:w=!1,avoidCollisions:j=!0,onPlaced:k,...S}=e,_=hj(hk,d),[C,O]=(0,b.useState)(null),T=(0,E.e)(t,e=>O(e)),[A,P]=(0,b.useState)(null),N=tc(A),R=null!==(n=null==N?void 0:N.width)&&void 0!==n?n:0,D=null!==(r=null==N?void 0:N.height)&&void 0!==r?r:0,L="number"==typeof y?y:{top:0,right:0,bottom:0,left:0,...y},F=Array.isArray(g)?g:[g],z=F.length>0,V={padding:L,boundary:F.filter(hP),altBoundary:z},{reference:I,floating:Z,strategy:B,x:H,y:U,placement:W,middlewareData:q,update:$}=ts({strategy:"fixed",placement:f+("center"!==p?"-"+p:""),whileElementsMounted:tr,middleware:[hN(),ez({mainAxis:h+D,alignmentAxis:m}),j?eI({mainAxis:!0,crossAxis:!1,limiter:"partial"===x?eZ():void 0,...V}):void 0,A?tl({element:A,padding:v}):void 0,j?eR({...V}):void 0,{name:"size",options:c={...V,apply:({elements:e,availableWidth:t,availableHeight:n})=>{e.floating.style.setProperty("--radix-popper-available-width",`${t}px`),e.floating.style.setProperty("--radix-popper-available-height",`${n}px`)}},async fn(e){let t,n;let{placement:r,rects:i,platform:o,elements:a}=e,{apply:s,...l}=c,u=await eS(e,l),d=eg(r),f=ey(r);"top"===d||"bottom"===d?(t=d,n=f===(await (null==o.isRTL?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(n=d,t="end"===f?"top":"bottom");let h=eC(u.left,0),p=eC(u.right,0),m=eC(u.top,0),v=eC(u.bottom,0),g={availableHeight:i.floating.height-(["left","right"].includes(r)?2*(0!==m||0!==v?m+v:eC(u.top,u.bottom)):u[t]),availableWidth:i.floating.width-(["top","bottom"].includes(r)?2*(0!==h||0!==p?h+p:eC(u.left,u.right)):u[n])},y=await o.getDimensions(a.floating);null==s||s({...e,...g});let b=await o.getDimensions(a.floating);return y.width!==b.width||y.height!==b.height?{reset:{rects:!0}}:{}}},hR({arrowWidth:R,arrowHeight:D}),w?eF({strategy:"referenceHidden"}):void 0].filter(hA)});(0,M.b)(()=>{I(_.anchor)},[I,_.anchor]);let K=null!==H&&null!==U,[Y,G]=hD(W),X=(0,ly.W)(k);(0,M.b)(()=>{K&&(null==X||X())},[K,X]);let J=null===(i=q.arrow)||void 0===i?void 0:i.x,Q=null===(o=q.arrow)||void 0===o?void 0:o.y,ee=(null===(a=q.arrow)||void 0===a?void 0:a.centerOffset)!==0,[et,en]=(0,b.useState)();(0,M.b)(()=>{C&&en(window.getComputedStyle(C).zIndex)},[C]);let{hasParent:er,positionUpdateFns:ei}=hO(hk,d),eo=!er;(0,b.useLayoutEffect)(()=>{if(!eo)return ei.add($),()=>{ei.delete($)}},[eo,ei,$]),(0,M.b)(()=>{eo&&K&&Array.from(ei).reverse().forEach(e=>requestAnimationFrame(e))},[eo,K,ei]);let ea={"data-side":Y,"data-align":G,...S,ref:T,style:{...S.style,animation:K?void 0:"none",opacity:null!==(s=q.hide)&&void 0!==s&&s.referenceHidden?0:void 0}};return(0,b.createElement)("div",{ref:Z,"data-radix-popper-content-wrapper":"",style:{position:B,left:0,top:0,transform:K?`translate3d(${Math.round(H)}px, ${Math.round(U)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:et,"--radix-popper-transform-origin":[null===(l=q.transformOrigin)||void 0===l?void 0:l.x,null===(u=q.transformOrigin)||void 0===u?void 0:u.y].join(" ")},dir:e.dir},(0,b.createElement)(hS,{scope:d,placedSide:Y,onArrowChange:P,arrowX:J,arrowY:Q,shouldHideArrow:ee},eo?(0,b.createElement)(hC,{scope:d,hasParent:!0,positionUpdateFns:ei},(0,b.createElement)(hv.div,ea)):(0,b.createElement)(hv.div,ea)))}),hT={top:"bottom",right:"left",bottom:"top",left:"right"};function hA(e){return void 0!==e}function hP(e){return null!==e}let hN=()=>({name:"anchorCssProperties",fn(e){let{rects:t,elements:n}=e,{width:r,height:i}=t.reference;return n.floating.style.setProperty("--radix-popper-anchor-width",`${r}px`),n.floating.style.setProperty("--radix-popper-anchor-height",`${i}px`),{}}}),hR=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,a;let{placement:s,rects:l,middlewareData:u}=t,c=(null===(n=u.arrow)||void 0===n?void 0:n.centerOffset)!==0,d=c?0:e.arrowWidth,f=c?0:e.arrowHeight,[h,p]=hD(s),m={start:"0%",center:"50%",end:"100%"}[p],v=(null!==(r=null===(i=u.arrow)||void 0===i?void 0:i.x)&&void 0!==r?r:0)+d/2,g=(null!==(o=null===(a=u.arrow)||void 0===a?void 0:a.y)&&void 0!==o?o:0)+f/2,y="",b="";return"bottom"===h?(y=c?m:`${v}px`,b=`${-f}px`):"top"===h?(y=c?m:`${v}px`,b=`${l.floating.height+f}px`):"right"===h?(y=`${-f}px`,b=c?m:`${g}px`):"left"===h&&(y=`${l.floating.width+f}px`,b=c?m:`${g}px`),{data:{x:y,y:b}}}});function hD(e){let[t,n="center"]=e.split("-");return[t,n]}let hL=e=>{let{__scopePopper:t,children:n}=e,[r,i]=(0,b.useState)(null);return(0,b.createElement)(hw,{scope:t,anchor:r,onAnchorChange:i},n)},hF=(0,b.forwardRef)((e,t)=>{var n;let{container:r=null==globalThis?void 0:null===(n=globalThis.document)||void 0===n?void 0:n.body,...i}=e;return r?to.createPortal((0,b.createElement)(hv.div,(0,w.Z)({},i,{ref:t})),r):null}),hz="dismissableLayer.update",hV=(0,b.createContext)({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),hI=(0,b.forwardRef)((e,t)=>{var n;let{disableOutsidePointerEvents:i=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:l,onDismiss:u,...c}=e,d=(0,b.useContext)(hV),[f,h]=(0,b.useState)(null),p=null!==(n=null==f?void 0:f.ownerDocument)&&void 0!==n?n:null==globalThis?void 0:globalThis.document,[,m]=(0,b.useState)({}),v=(0,E.e)(t,e=>h(e)),g=Array.from(d.layers),[y]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),x=g.indexOf(y),j=f?g.indexOf(f):-1,k=d.layersWithOutsidePointerEventsDisabled.size>0,S=j>=x,C=function(e,t=null==globalThis?void 0:globalThis.document){let n=(0,ly.W)(e),r=(0,b.useRef)(!1),i=(0,b.useRef)(()=>{});return(0,b.useEffect)(()=>{let e=e=>{if(e.target&&!r.current){let r={originalEvent:e};function o(){hB("dismissableLayer.pointerDownOutside",n,r,{discrete:!0})}"touch"===e.pointerType?(t.removeEventListener("click",i.current),i.current=o,t.addEventListener("click",i.current,{once:!0})):o()}r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",e),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}(e=>{let t=e.target,n=[...d.branches].some(e=>e.contains(t));!S||n||(null==a||a(e),null==l||l(e),e.defaultPrevented||null==u||u())},p),O=function(e,t=null==globalThis?void 0:globalThis.document){let n=(0,ly.W)(e),r=(0,b.useRef)(!1);return(0,b.useEffect)(()=>{let e=e=>{e.target&&!r.current&&hB("dismissableLayer.focusOutside",n,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}(e=>{let t=e.target,n=[...d.branches].some(e=>e.contains(t));n||(null==s||s(e),null==l||l(e),e.defaultPrevented||null==u||u())},p);return!function(e,t=null==globalThis?void 0:globalThis.document){let n=(0,ly.W)(e);(0,b.useEffect)(()=>{let e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e),()=>t.removeEventListener("keydown",e)},[n,t])}(e=>{let t=j===d.layers.size-1;t&&(null==o||o(e),!e.defaultPrevented&&u&&(e.preventDefault(),u()))},p),(0,b.useEffect)(()=>{if(f)return i&&(0===d.layersWithOutsidePointerEventsDisabled.size&&(r=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),hZ(),()=>{i&&1===d.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=r)}},[f,p,i,d]),(0,b.useEffect)(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),hZ())},[f,d]),(0,b.useEffect)(()=>{let e=()=>m({});return document.addEventListener(hz,e),()=>document.removeEventListener(hz,e)},[]),(0,b.createElement)(hv.div,(0,w.Z)({},c,{ref:v,style:{pointerEvents:k?S?"auto":"none":void 0,...e.style},onFocusCapture:(0,_.M)(e.onFocusCapture,O.onFocusCapture),onBlurCapture:(0,_.M)(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:(0,_.M)(e.onPointerDownCapture,C.onPointerDownCapture)}))});function hZ(){let e=new CustomEvent(hz);document.dispatchEvent(e)}function hB(e,t,n,{discrete:r}){let i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});(t&&i.addEventListener(e,t,{once:!0}),r)?i&&(0,to.flushSync)(()=>i.dispatchEvent(o)):i.dispatchEvent(o)}let hH="HoverCard",[hU,hW]=(0,j.b)(hH,[hx]),hq=hx(),[h$,hK]=hU(hH),hY=(0,b.forwardRef)((e,t)=>{let{__scopeHoverCard:n,...r}=e,i=hK("HoverCardTrigger",n),o=hq(n);return(0,b.createElement)(hE,(0,w.Z)({asChild:!0},o),(0,b.createElement)(hv.a,(0,w.Z)({"data-state":i.open?"open":"closed"},r,{ref:t,onPointerEnter:(0,_.M)(e.onPointerEnter,h2(i.onOpen)),onPointerLeave:(0,_.M)(e.onPointerLeave,h2(i.onClose)),onFocus:(0,_.M)(e.onFocus,i.onOpen),onBlur:(0,_.M)(e.onBlur,i.onClose),onTouchStart:(0,_.M)(e.onTouchStart,e=>e.preventDefault())})))}),hG="HoverCardPortal",[hX,hJ]=hU(hG,{forceMount:void 0}),hQ="HoverCardContent",h0=(0,b.forwardRef)((e,t)=>{let n=hJ(hQ,e.__scopeHoverCard),{forceMount:r=n.forceMount,...i}=e,o=hK(hQ,e.__scopeHoverCard);return(0,b.createElement)(T.z,{present:r||o.open},(0,b.createElement)(h1,(0,w.Z)({"data-state":o.open?"open":"closed"},i,{onPointerEnter:(0,_.M)(e.onPointerEnter,h2(o.onOpen)),onPointerLeave:(0,_.M)(e.onPointerLeave,h2(o.onClose)),ref:t})))}),h1=(0,b.forwardRef)((e,t)=>{let{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,...l}=e,u=hK(hQ,n),c=hq(n),d=(0,b.useRef)(null),f=(0,E.e)(t,d),[h,p]=(0,b.useState)(!1);return(0,b.useEffect)(()=>{if(h){let e=document.body;return i=e.style.userSelect||e.style.webkitUserSelect,e.style.userSelect="none",e.style.webkitUserSelect="none",()=>{e.style.userSelect=i,e.style.webkitUserSelect=i}}},[h]),(0,b.useEffect)(()=>{if(d.current){let e=()=>{p(!1),u.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var e;let t=(null===(e=document.getSelection())||void 0===e?void 0:e.toString())!=="";t&&(u.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",e),()=>{document.removeEventListener("pointerup",e),u.hasSelectionRef.current=!1,u.isPointerDownOnContentRef.current=!1}}},[u.isPointerDownOnContentRef,u.hasSelectionRef]),(0,b.useEffect)(()=>{if(d.current){let e=function(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}(d.current);e.forEach(e=>e.setAttribute("tabindex","-1"))}}),(0,b.createElement)(hI,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:s,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:(0,_.M)(a,e=>{e.preventDefault()}),onDismiss:u.onDismiss},(0,b.createElement)(hM,(0,w.Z)({},c,l,{onPointerDown:(0,_.M)(l.onPointerDown,e=>{e.currentTarget.contains(e.target)&&p(!0),u.hasSelectionRef.current=!1,u.isPointerDownOnContentRef.current=!0}),ref:f,style:{...l.style,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)",userSelect:h?"text":void 0,WebkitUserSelect:h?"text":void 0}})))});function h2(e){return t=>"touch"===t.pointerType?void 0:e()}let h4=e=>{let{__scopeHoverCard:t,children:n,open:r,defaultOpen:i,onOpenChange:o,openDelay:a=700,closeDelay:s=300}=e,l=hq(t),u=(0,b.useRef)(0),c=(0,b.useRef)(0),d=(0,b.useRef)(!1),f=(0,b.useRef)(!1),[h=!1,p]=(0,C.T)({prop:r,defaultProp:i,onChange:o}),m=(0,b.useCallback)(()=>{clearTimeout(c.current),u.current=window.setTimeout(()=>p(!0),a)},[a,p]),v=(0,b.useCallback)(()=>{clearTimeout(u.current),d.current||f.current||(c.current=window.setTimeout(()=>p(!1),s))},[s,p]),g=(0,b.useCallback)(()=>p(!1),[p]);return(0,b.useEffect)(()=>()=>{clearTimeout(u.current),clearTimeout(c.current)},[]),(0,b.createElement)(h$,{scope:t,open:h,onOpenChange:p,onOpen:m,onClose:v,onDismiss:g,hasSelectionRef:d,isPointerDownOnContentRef:f},(0,b.createElement)(hL,l,n))},h3=e=>{let{__scopeHoverCard:t,forceMount:n,children:r,container:i}=e,o=hK(hG,t);return(0,b.createElement)(hX,{scope:t,forceMount:n},(0,b.createElement)(T.z,{present:n||o.open},(0,b.createElement)(hF,{asChild:!0,container:i},r)))},h5=(0,em.j)([lo,"relative","z-10","data-[side=top]:bottom-1","data-[side=top]:origin-bottom","data-[side=bottom]:top-1","data-[side=bottom]:origin-top","data-[side=left]:right-1","data-[side=left]:origin-right","data-[side=right]:left-1","data-[side=right]:origin-left"]),h6=(0,em.cx)(t4(),"max-w-sm","py-0.5","px-1"),h8={show:{opacity:[0,1],scale:[.95,1],transition:{duration:.1,ease:"easeOut"}},exit:{opacity:[1,0],scale:[1,.95],transition:{duration:.1,ease:"easeIn"}}},h7=b.forwardRef((e,t)=>{let{trigger:n,children:r,rootProps:i,contentProps:o}=e,{className:a,...s}=o||{},{open:l,onOpenChange:u}=le({open:null==i?void 0:i.open,onOpenChange:null==i?void 0:i.onOpenChange});return(0,y.jsxs)(h4,{open:l,onOpenChange:u,...i,children:[n&&(0,y.jsx)(hY,{asChild:!0,children:n}),(0,y.jsx)(nC,{children:l?(0,y.jsx)(h3,{forceMount:!0,children:(0,y.jsx)(h0,{asChild:!0,forceMount:!0,ref:t,...s,children:(0,y.jsx)(s9.div,{variants:h8,initial:"init",animate:"show",exit:"exit",className:h5(),children:(0,y.jsx)("div",{className:(0,em.cx)(h6,a),children:r})})})}):null})]})});function h9(e,t=[]){let n=[],r=()=>{let t=n.map(e=>(0,b.createContext)(e));return function(n){let r=(null==n?void 0:n[e])||t;return(0,b.useMemo)(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return r.scopeName=e,[function(t,r){let i=(0,b.createContext)(r),o=n.length;function a(t){let{scope:n,children:r,...a}=t,s=(null==n?void 0:n[e][o])||i,l=(0,b.useMemo)(()=>a,Object.values(a));return(0,b.createElement)(s.Provider,{value:l},r)}return n=[...n,r],a.displayName=t+"Provider",[a,function(n,a){let s=(null==a?void 0:a[e][o])||i,l=(0,b.useContext)(s);if(l)return l;if(void 0!==r)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e),o=i[`__scope${r}`];return{...t,...o}},{});return(0,b.useMemo)(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}(r,...t)]}function pe(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function pt(...e){return t=>e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}function pn(...e){return(0,b.useCallback)(pt(...e),e)}let pr=(0,b.forwardRef)((e,t)=>{let{children:n,...r}=e,i=b.Children.toArray(n),o=i.find(pa);if(o){let e=o.props.children,n=i.map(t=>t!==o?t:b.Children.count(e)>1?b.Children.only(null):(0,b.isValidElement)(e)?e.props.children:null);return(0,b.createElement)(pi,(0,w.Z)({},r,{ref:t}),(0,b.isValidElement)(e)?(0,b.cloneElement)(e,void 0,n):null)}return(0,b.createElement)(pi,(0,w.Z)({},r,{ref:t}),n)});pr.displayName="Slot";let pi=(0,b.forwardRef)((e,t)=>{let{children:n,...r}=e;return(0,b.isValidElement)(n)?(0,b.cloneElement)(n,{...function(e,t){let n={...t};for(let r in t){let i=e[r],o=t[r],a=/^on[A-Z]/.test(r);a?i&&o?n[r]=(...e)=>{o(...e),i(...e)}:i&&(n[r]=i):"style"===r?n[r]={...i,...o}:"className"===r&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props),ref:t?pt(t,n.ref):n.ref}):b.Children.count(n)>1?b.Children.only(null):null});pi.displayName="SlotClone";let po=({children:e})=>(0,b.createElement)(b.Fragment,null,e);function pa(e){return(0,b.isValidElement)(e)&&e.type===po}let ps=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{let n=(0,b.forwardRef)((e,n)=>{let{asChild:r,...i}=e,o=r?pr:t;return(0,b.useEffect)(()=>{window[Symbol.for("radix-ui")]=!0},[]),(0,b.createElement)(o,(0,w.Z)({},i,{ref:n}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function pl(e){let t=(0,b.useRef)(e);return(0,b.useEffect)(()=>{t.current=e}),(0,b.useMemo)(()=>(...e)=>{var n;return null===(n=t.current)||void 0===n?void 0:n.call(t,...e)},[])}let pu=(null==globalThis?void 0:globalThis.document)?b.useLayoutEffect:()=>{},pc=e=>{let{present:t,children:n}=e,r=function(e){var t;let[n,r]=(0,b.useState)(),i=(0,b.useRef)({}),o=(0,b.useRef)(e),a=(0,b.useRef)("none"),s=e?"mounted":"unmounted",[l,u]=(t={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},(0,b.useReducer)((e,n)=>{let r=t[e][n];return null!=r?r:e},s));return(0,b.useEffect)(()=>{let e=pd(i.current);a.current="mounted"===l?e:"none"},[l]),pu(()=>{let t=i.current,n=o.current,r=n!==e;if(r){let r=a.current,i=pd(t);e?u("MOUNT"):"none"===i||(null==t?void 0:t.display)==="none"?u("UNMOUNT"):n&&r!==i?u("ANIMATION_OUT"):u("UNMOUNT"),o.current=e}},[e,u]),pu(()=>{if(n){let e=e=>{let t=pd(i.current),r=t.includes(e.animationName);e.target===n&&r&&(0,to.flushSync)(()=>u("ANIMATION_END"))},t=e=>{e.target===n&&(a.current=pd(i.current))};return n.addEventListener("animationstart",t),n.addEventListener("animationcancel",e),n.addEventListener("animationend",e),()=>{n.removeEventListener("animationstart",t),n.removeEventListener("animationcancel",e),n.removeEventListener("animationend",e)}}u("ANIMATION_END")},[n,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:(0,b.useCallback)(e=>{e&&(i.current=getComputedStyle(e)),r(e)},[])}}(t),i="function"==typeof n?n({present:r.isPresent}):b.Children.only(n),o=pn(r.ref,i.ref),a="function"==typeof n;return a||r.isPresent?(0,b.cloneElement)(i,{ref:o}):null};function pd(e){return(null==e?void 0:e.animationName)||"none"}pc.displayName="Presence";let pf=x["useId".toString()]||(()=>void 0),ph=0;function pp(e){let t=e+"CollectionProvider",[n,r]=h9(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=e+"CollectionSlot",s=b.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=o(a,n),s=pn(t,i.collectionRef);return b.createElement(pr,{ref:s},r)}),l=e+"CollectionItemSlot",u="data-radix-collection-item",c=b.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,a=b.useRef(null),s=pn(t,a),c=o(l,n);return b.useEffect(()=>(c.itemMap.set(a,{ref:a,...i}),()=>void c.itemMap.delete(a))),b.createElement(pr,{[u]:"",ref:s},r)});return[{Provider:e=>{let{scope:t,children:n}=e,r=b.useRef(null),o=b.useRef(new Map).current;return b.createElement(i,{scope:t,itemMap:o,collectionRef:r},n)},Slot:s,ItemSlot:c},function(t){let n=o(e+"CollectionConsumer",t),r=b.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${u}]`)),r=Array.from(n.itemMap.values()),i=r.sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current));return i},[n.collectionRef,n.itemMap]);return r},r]}let pm="dismissableLayer.update",pv=(0,b.createContext)({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),pg=(0,b.forwardRef)((e,t)=>{var n;let{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:l,onDismiss:u,...c}=e,d=(0,b.useContext)(pv),[f,h]=(0,b.useState)(null),p=null!==(n=null==f?void 0:f.ownerDocument)&&void 0!==n?n:null==globalThis?void 0:globalThis.document,[,m]=(0,b.useState)({}),v=pn(t,e=>h(e)),g=Array.from(d.layers),[y]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),x=g.indexOf(y),j=f?g.indexOf(f):-1,E=d.layersWithOutsidePointerEventsDisabled.size>0,k=j>=x,S=function(e,t=null==globalThis?void 0:globalThis.document){let n=pl(e),r=(0,b.useRef)(!1),i=(0,b.useRef)(()=>{});return(0,b.useEffect)(()=>{let e=e=>{if(e.target&&!r.current){let r={originalEvent:e};function o(){pb("dismissableLayer.pointerDownOutside",n,r,{discrete:!0})}"touch"===e.pointerType?(t.removeEventListener("click",i.current),i.current=o,t.addEventListener("click",i.current,{once:!0})):o()}r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",e),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}(e=>{let t=e.target,n=[...d.branches].some(e=>e.contains(t));!k||n||(null==a||a(e),null==l||l(e),e.defaultPrevented||null==u||u())},p),_=function(e,t=null==globalThis?void 0:globalThis.document){let n=pl(e),r=(0,b.useRef)(!1);return(0,b.useEffect)(()=>{let e=e=>{e.target&&!r.current&&pb("dismissableLayer.focusOutside",n,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}(e=>{let t=e.target,n=[...d.branches].some(e=>e.contains(t));n||(null==s||s(e),null==l||l(e),e.defaultPrevented||null==u||u())},p);return!function(e,t=null==globalThis?void 0:globalThis.document){let n=pl(e);(0,b.useEffect)(()=>{let e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e),()=>t.removeEventListener("keydown",e)},[n,t])}(e=>{let t=j===d.layers.size-1;t&&(null==i||i(e),!e.defaultPrevented&&u&&(e.preventDefault(),u()))},p),(0,b.useEffect)(()=>{if(f)return r&&(0===d.layersWithOutsidePointerEventsDisabled.size&&(o=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),py(),()=>{r&&1===d.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=o)}},[f,p,r,d]),(0,b.useEffect)(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),py())},[f,d]),(0,b.useEffect)(()=>{let e=()=>m({});return document.addEventListener(pm,e),()=>document.removeEventListener(pm,e)},[]),(0,b.createElement)(ps.div,(0,w.Z)({},c,{ref:v,style:{pointerEvents:E?k?"auto":"none":void 0,...e.style},onFocusCapture:pe(e.onFocusCapture,_.onFocusCapture),onBlurCapture:pe(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:pe(e.onPointerDownCapture,S.onPointerDownCapture)}))});function py(){let e=new CustomEvent(pm);document.dispatchEvent(e)}function pb(e,t,n,{discrete:r}){var i,o;let a=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?(i=a,o=s,i&&(0,to.flushSync)(()=>i.dispatchEvent(o))):a.dispatchEvent(s)}(e,t)=>(0,b.createElement)(ps.span,(0,w.Z)({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));let px="NavigationMenu",[pw,pj,pE]=pp(px),[pk,pS,p_]=pp(px),[pC,pO]=h9(px,[pE,p_]),[pM,pT]=pC(px),[pA,pP]=pC(px),[pN,pR]=pC("NavigationMenuItem"),pD=((e,t)=>{let{__scopeNavigationMenu:n,...r}=e,i=pT("NavigationMenuIndicator",n),o=pj(n),[a,s]=(0,b.useState)(null),[l,u]=(0,b.useState)(null),c="horizontal"===i.orientation,d=!!i.value;(0,b.useEffect)(()=>{var e;let t=o(),n=null===(e=t.find(e=>e.value===i.value))||void 0===e?void 0:e.ref.current;n&&s(n)},[o,i.value]);let f=()=>{a&&u({size:c?a.offsetWidth:a.offsetHeight,offset:c?a.offsetLeft:a.offsetTop})};return pZ(a,f),pZ(i.indicatorTrack,f),l?(0,b.createElement)(ps.div,(0,w.Z)({"aria-hidden":!0,"data-state":d?"visible":"hidden","data-orientation":i.orientation},r,{ref:t,style:{position:"absolute",...c?{left:0,width:l.size+"px",transform:`translateX(${l.offset}px)`}:{top:0,height:l.size+"px",transform:`translateY(${l.offset}px)`},...r.style}})):null},"NavigationMenuContent"),pL=((e,t)=>{let n=pT(pD,e.__scopeNavigationMenu),{onViewportContentChange:r,onViewportContentRemove:i}=n;return pu(()=>{r(e.value,{ref:t,...e})},[e,t,r]),pu(()=>()=>i(e.value),[e.value,i]),null},"navigationMenu.rootContentDismiss"),pF=(0,b.forwardRef)((e,t)=>{let{__scopeNavigationMenu:n,value:r,triggerRef:i,focusProxyRef:o,wasEscapeCloseRef:a,onRootContentClose:s,onContentFocusOutside:l,...u}=e,c=pT(pD,n),d=(0,b.useRef)(null),f=pn(d,t),h=function(e,t){return`${e}-trigger-${t}`}(c.baseId,r),p=function(e,t){return`${e}-content-${t}`}(c.baseId,r),m=pj(n),v=(0,b.useRef)(null),{onItemDismiss:g}=c;(0,b.useEffect)(()=>{let e=d.current;if(c.isRootMenu&&e){let t=()=>{var t;g(),s(),e.contains(document.activeElement)&&(null===(t=i.current)||void 0===t||t.focus())};return e.addEventListener(pL,t),()=>e.removeEventListener(pL,t)}},[c.isRootMenu,e.value,i,g,s]);let y=(0,b.useMemo)(()=>{let e=m(),t=e.map(e=>e.value);"rtl"===c.dir&&t.reverse();let n=t.indexOf(c.value),i=t.indexOf(c.previousValue),o=r===c.value,a=i===t.indexOf(r);if(!o&&!a)return v.current;let s=(()=>{if(n!==i){if(o&&-1!==i)return n>i?"from-end":"from-start";if(a&&-1!==n)return n>i?"to-start":"to-end"}return null})();return v.current=s,s},[c.previousValue,c.value,c.dir,m,r]);return(0,b.createElement)(pz,{asChild:!0},(0,b.createElement)(pg,(0,w.Z)({id:p,"aria-labelledby":h,"data-motion":y,"data-orientation":c.orientation},u,{ref:f,onDismiss:()=>{var e;let t=new Event(pL,{bubbles:!0,cancelable:!0});null===(e=d.current)||void 0===e||e.dispatchEvent(t)},onFocusOutside:pe(e.onFocusOutside,e=>{var t;l();let n=e.target;null!==(t=c.rootNavigationMenu)&&void 0!==t&&t.contains(n)&&e.preventDefault()}),onPointerDownOutside:pe(e.onPointerDownOutside,e=>{var t;let n=e.target,r=m().some(e=>{var t;return null===(t=e.ref.current)||void 0===t?void 0:t.contains(n)}),i=c.isRootMenu&&(null===(t=c.viewport)||void 0===t?void 0:t.contains(n));(r||i||!c.isRootMenu)&&e.preventDefault()}),onKeyDown:pe(e.onKeyDown,e=>{let t=e.altKey||e.ctrlKey||e.metaKey,n="Tab"===e.key&&!t;if(n){let t=function(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}(e.currentTarget),n=document.activeElement,i=t.findIndex(e=>e===n),a=e.shiftKey,s=a?t.slice(0,i).reverse():t.slice(i+1,t.length);if(pI(s))e.preventDefault();else{var r;null===(r=o.current)||void 0===r||r.focus()}}}),onEscapeKeyDown:pe(e.onEscapeKeyDown,e=>{a.current=!0})})))}),pz=((e,t)=>{let{__scopeNavigationMenu:n,children:r,...i}=e,o=pT("NavigationMenuViewport",n),a=pn(t,o.onViewportChange),s=pP(pD,e.__scopeNavigationMenu),[l,u]=(0,b.useState)(null),[c,d]=(0,b.useState)(null),f=l?(null==l?void 0:l.width)+"px":void 0,h=l?(null==l?void 0:l.height)+"px":void 0,p=!!o.value,m=p?o.value:o.previousValue;return pZ(c,()=>{c&&u({width:c.offsetWidth,height:c.offsetHeight})}),(0,b.createElement)(ps.div,(0,w.Z)({"data-state":function(e){return e?"open":"closed"}(p),"data-orientation":o.orientation},i,{ref:a,style:{pointerEvents:!p&&o.isRootMenu?"none":void 0,"--radix-navigation-menu-viewport-width":f,"--radix-navigation-menu-viewport-height":h,...i.style},onPointerEnter:pe(e.onPointerEnter,o.onContentEnter),onPointerLeave:pe(e.onPointerLeave,function(e){return t=>"mouse"===t.pointerType?e(t):void 0}(o.onContentLeave))}),Array.from(s.items).map(([e,{ref:t,forceMount:n,...r}])=>{let i=m===e;return(0,b.createElement)(pc,{key:e,present:n||i},(0,b.createElement)(pF,(0,w.Z)({},r,{ref:pt(t,e=>{i&&e&&d(e)})})))}))},(0,b.forwardRef)((e,t)=>{let{__scopeNavigationMenu:n,...r}=e,i=pT("FocusGroup",n);return(0,b.createElement)(pk.Provider,{scope:n},(0,b.createElement)(pk.Slot,{scope:n},(0,b.createElement)(ps.div,(0,w.Z)({dir:i.dir},r,{ref:t}))))})),pV=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"];(e,t)=>{let{__scopeNavigationMenu:n,...r}=e,i=pS(n),o=pT("FocusGroupItem",n);return(0,b.createElement)(pk.ItemSlot,{scope:n},(0,b.createElement)(ps.button,(0,w.Z)({},r,{ref:t,onKeyDown:pe(e.onKeyDown,e=>{let t=["Home","End",...pV].includes(e.key);if(t){let t=i().map(e=>e.ref.current),n="rtl"===o.dir?"ArrowRight":"ArrowLeft";if([n,"ArrowUp","End"].includes(e.key)&&t.reverse(),pV.includes(e.key)){let n=t.indexOf(e.currentTarget);t=t.slice(n+1)}setTimeout(()=>pI(t)),e.preventDefault()}})})))};function pI(e){let t=document.activeElement;return e.some(e=>e===t||(e.focus(),document.activeElement!==t))}function pZ(e,t){let n=pl(t);pu(()=>{let t=0;if(e){let r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e,n])}var pB=n(38617);let pH=b.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,y.jsx)(fe,{...r,ref:t,className:(0,em.cx)("select-none flex items-center rounded cursor-pointer","focus:ring ring-blue-500 dark:ring-blue-200","text-gray-700 dark:text-graydark-700","data-[state=checked]:text-gray-1100 data-[state=checked]:dark:text-white",n)})});function pU(e){let{className:t,tooltipClassName:n,tabIndex:r}=e,{theme:i,setTheme:o}=(0,pB.F)();return(0,y.jsxs)(d9,{value:i,tabIndex:r,className:(0,em.cx)("flex gap-4",t),onValueChange:e=>o(e),children:[(0,y.jsx)(pH,{value:"system",children:(0,y.jsx)(ls,{className:n,sideOffset:16,content:"System",children:(0,y.jsx)(lc.$Iz,{})})}),(0,y.jsx)(pH,{value:"light",children:(0,y.jsx)(ls,{className:n,sideOffset:16,content:"Light",children:(0,y.jsx)(lc.JaG,{})})}),(0,y.jsx)(pH,{value:"dark",children:(0,y.jsx)(ls,{className:n,sideOffset:16,content:"Dark",children:(0,y.jsx)(lc.osk,{})})})]})}var pW=n(74424);function pq(e){let{title:t,children:n,rootClassName:r,className:i,message:o,showBorderInactive:a,...s}=e,{getRootProps:l,getInputProps:u,isDragActive:c}=(0,pW.uI)(s);return(0,y.jsxs)("div",{...l(),className:(0,em.cx)("outline-none",r),children:[(0,y.jsxs)("div",{className:(0,em.cx)(c?"z-20":"","absolute","top-0","left-0","w-full","h-full","pointer-events-none","rounded","p-4","flex justify-center items-center text-center","border-2 border-dashed",a?["border-green-600 dark:border-green-500","hover:border-green-700 hover:dark:border-green-500"]:"border-transparent",c?["border-green-500 dark:border-green-600 bg-green-100/20 dark:bg-green-100/20","hover:border-green-500 hover:dark:border-green-600 hover:bg-green-100/20 hover:dark:bg-green-100/20"]:"",i),children:[(0,y.jsx)("input",{...u()}),o&&(0,y.jsx)(t2,{size:"14",children:t||"Drop your files here or click to to open the file picker."})]}),n]})}var p$=n(14582),pK=n(63739),pY=n(13980),pG=n.n(pY),pX=n(72779),pJ=n.n(pX),pQ=n(47440),p0=n(59309),p1=n(19067),p2=n(71220),p4=n(28142);function p3(e){return"bandwidth"in e?e.bandwidth():0}var p5=["top","left","scale","width","stroke","strokeWidth","strokeDasharray","className","children","numTicks","lineStyle","offset","tickValues"];function p6(){return(p6=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,p5),g=null!=m?m:(0,p2.Z)(r,void 0===f?10:f),y=(null!=p?p:0)+p3(r)/2,x=g.map(function(e,t){var n,o=(null!=(n=(0,p4.Z)(r(e)))?n:0)+y;return{index:t,from:new p1.Z({x:0,y:o}),to:new p1.Z({x:i,y:o})}});return b.createElement(p0.Z,{className:pJ()("visx-rows",c),top:void 0===t?0:t,left:void 0===n?0:n},d?d({lines:x}):x.map(function(e){var t=e.from,n=e.to,r=e.index;return b.createElement(pQ.default,p6({key:"row-line-"+r,from:t,to:n,stroke:a,strokeWidth:l,strokeDasharray:u,style:h},v))}))}p8.propTypes={tickValues:pG().array,width:pG().number.isRequired};var p7=["top","left","scale","height","stroke","strokeWidth","strokeDasharray","className","numTicks","lineStyle","offset","tickValues","children"];function p9(){return(p9=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,p7),g=null!=p?p:(0,p2.Z)(r,void 0===d?10:d),y=(null!=h?h:0)+p3(r)/2,x=g.map(function(e,t){var n,o=(null!=(n=(0,p4.Z)(r(e)))?n:0)+y;return{index:t,from:new p1.Z({x:o,y:0}),to:new p1.Z({x:o,y:i})}});return b.createElement(p0.Z,{className:pJ()("visx-columns",c),top:void 0===t?0:t,left:void 0===n?0:n},m?m({lines:x}):x.map(function(e){var t=e.from,n=e.to,r=e.index;return b.createElement(pQ.default,p9({key:"column-line-"+r,from:t,to:n,stroke:a,strokeWidth:l,strokeDasharray:u,style:f},v))}))}me.propTypes={tickValues:pG().array,height:pG().number.isRequired};var mt=n(64183),mn=n(8597);function mr(e){var t=e.id,n=e.width,r=e.height,i=e.children;return b.createElement("defs",null,b.createElement("pattern",{id:t,width:n,height:r,patternUnits:"userSpaceOnUse"},i))}mr.propTypes={id:pG().string.isRequired,width:pG().number.isRequired,height:pG().number.isRequired,children:pG().node.isRequired};var mi={horizontal:"horizontal",vertical:"vertical",diagonal:"diagonal",diagonalRightToLeft:"diagonalRightToLeft"};function mo(e){var t=e.id,n=e.width,r=e.height,i=e.stroke,o=e.strokeWidth,a=e.strokeDasharray,s=e.strokeLinecap,l=void 0===s?"square":s,u=e.shapeRendering,c=void 0===u?"auto":u,d=e.orientation,f=void 0===d?["vertical"]:d,h=e.background,p=e.className,m=Array.isArray(f)?f:[f];return b.createElement(mr,{id:t,width:n,height:r},!!h&&b.createElement("rect",{className:pJ()("visx-pattern-line-background"),width:n,height:r,fill:h}),m.map(function(e,n){return b.createElement("path",{key:"visx-"+t+"-line-"+e+"-"+n,className:pJ()("visx-pattern-line",p),d:function(e){var t=e.height;switch(e.orientation){case mi.horizontal:return"M 0,"+t/2+" l "+t+",0";case mi.diagonal:return"M 0,"+t+" l "+t+","+-t+" M "+-t/4+","+t/4+" l "+t/2+","+-t/2+"\n M "+3/4*t+","+5/4*t+" l "+t/2+","+-t/2;case mi.diagonalRightToLeft:return"M 0,0 l "+t+","+t+"\n M "+-t/4+","+3/4*t+" l "+t/2+","+t/2+"\n M "+3/4*t+","+-t/4+" l "+t/2+","+t/2;case mi.vertical:default:return"M "+t/2+", 0 l 0, "+t}}({orientation:e,height:r}),stroke:i,strokeWidth:o,strokeDasharray:a,strokeLinecap:l,shapeRendering:c})}))}mo.propTypes={id:pG().string.isRequired,width:pG().number.isRequired,height:pG().number.isRequired,className:pG().string,background:pG().string,stroke:pG().string,strokeWidth:pG().oneOfType([pG().number,pG().string]),strokeDasharray:pG().oneOfType([pG().string,pG().number]),strokeLinecap:pG().oneOf(["square","butt","round","inherit"]),shapeRendering:pG().oneOfType([pG().string,pG().number]),orientation:pG().array};var ma=["tooltipOpen"];function ms(){return(ms=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,ml);return b.createElement("div",mu({ref:t,className:pJ()("visx-tooltip",n),style:mu({top:null==r||null==l?r:r+l,left:null==i||null==a?i:i+a},m&&{position:"absolute"},!h&&c)},v),d)});function mf(){return(mf=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,mg),g=!1,y=!1;if(u&&l){var x=void 0===r?0:r,w=void 0===f?0:f;if(l.width){var j=x+o+u.width-l.width,E=u.width-x-o;g=j>0&&j>E}else{var k=x+o+u.width-window.innerWidth,S=u.width-x-o;g=k>0&&k>S}if(l.height){var _=w+s+u.height-l.height,C=u.height-w-s;y=_>0&&_>C}else y=w+s+u.height>window.innerHeight;x=g?x-u.width-o:x+o,w=y?w-u.height-s:w+s,t="translate("+(x=Math.round(x))+"px, "+(w=Math.round(w))+"px)"}return b.createElement(md,my({ref:m,style:my({left:0,top:0,transform:t},!p&&d)},v),b.createElement(mv,{value:{isFlippedVertically:!y,isFlippedHorizontally:!g}},n))}mb.propTypes={nodeRef:pG().oneOfType([pG().string,pG().func,pG().object])};var mx=((Ey=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={rect:void 0,parentRect:void 0},n.nodeRef=b.createRef(),n.getRects=n.getRects.bind(function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n)),n}t.prototype=Object.create(e.prototype),t.prototype.constructor=t,mh(t,e);var n=t.prototype;return n.componentDidMount=function(){var e,t=this;this.node=null!=(e=this.nodeRef)&&e.current?this.nodeRef.current:to.findDOMNode(this),this.setState(function(){return t.getRects()})},n.getRects=function(){if(!this.node)return this.state;var e=this.node,t=e.parentNode;return{rect:e.getBoundingClientRect?e.getBoundingClientRect():mp,parentRect:null!=t&&t.getBoundingClientRect?t.getBoundingClientRect():mp}},n.render=function(){return b.createElement(mb,mf({nodeRef:this.nodeRef,getRects:this.getRects},this.state,this.props))},t}(b.PureComponent)).displayName="withBoundingRects("+(mb.displayName||"")+")",Ey),mw=n(99985);function mj(e,t){if("invert"in e&&void 0!==e.invert)return e.invert(t).valueOf();var n=e.range(),r=n[0],i=n[1],o=0,a=("step"in e&&void 0!==e.step?e.step():1)*(i-r)/Math.abs(i-r);if(a>0)for(;t>r+a*(o+1);)o+=1;else for(;t0?Math.min(e.dx,t.bounds.x1-a):Math.max(e.dx,t.bounds.x0-r),u=e.dy>0?Math.min(e.dy,t.bounds.y1-s):Math.max(e.dy,t.bounds.y0-i);return mA({},t,{isBrushing:!0,extent:mA({},t.extent,{x0:r+l,x1:a+l,y0:i+u,y1:s+u})})})},t.selectionDragEnd=function(){var e=t.props,n=e.updateBrush,r=e.onBrushEnd,i=e.onMoveSelectionChange;e.isControlled||n(function(e){var t=mA({},e,{isBrushing:!1,start:mA({},e.start,{x:Math.min(e.extent.x0,e.extent.x1),y:Math.min(e.extent.y0,e.extent.y1)}),end:mA({},e.end,{x:Math.max(e.extent.x0,e.extent.x1),y:Math.max(e.extent.y0,e.extent.y1)})});return r&&r(t),t}),i&&i()},t}return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,mP(t,e),t.prototype.render=function(){var e=this.props,t=e.width,n=e.height,r=e.stageWidth,i=e.stageHeight,o=e.brush,a=e.disableDraggingSelection,s=e.onMouseLeave,l=e.onMouseMove,u=e.onMouseUp,c=e.onClick,d=e.selectedBoxStyle,f=e.isControlled,h=e.isDragInProgress;return b.createElement(mw.Z,{width:t,height:n,resetOnStart:!0,onDragStart:this.selectionDragStart,onDragMove:this.selectionDragMove,onDragEnd:this.selectionDragEnd,isDragging:f?h:void 0},function(e){var h=e.isDragging,p=e.dragStart,m=e.dragEnd,v=e.dragMove;return b.createElement("g",null,h&&b.createElement("rect",{width:r,height:i,fill:"transparent",onPointerUp:f?void 0:m,onPointerMove:v,onPointerLeave:f?void 0:m,style:mN}),b.createElement("rect",mA({x:Math.min(o.extent.x0,o.extent.x1),y:Math.min(o.extent.y0,o.extent.y1),width:t,height:n,className:"visx-brush-selection",onPointerDown:a?void 0:p,onPointerLeave:function(e){s&&s(e)},onPointerMove:function(e){v(e),l&&l(e)},onPointerUp:function(e){f||m(e),u&&u(e)},onClick:function(e){c&&c(e)},style:{pointerEvents:o.isBrushing||o.activeHandle?"none":"all",cursor:a?void 0:"move"}},d)))})},t}(b.Component);function mD(){return(mD=Object.assign?Object.assign.bind():function(e){for(var t=1;t0?Math.min(l,e.bounds.x1-o):Math.max(l,e.bounds.x0-n),c=u>0?Math.min(u,e.bounds.y1-a):Math.max(u,e.bounds.y0-r);return mD({},e,{isBrushing:!0,extent:mD({},e.extent,{x0:n+s,y0:r+c,x1:o+s,y1:a+c})})}),"select"===i&&n.updateBrush(function(e){var t=e.start,r=t.x,i=t.y,o={x:Math.min(Math.max(r+l,e.bounds.x0),e.bounds.x1),y:Math.min(Math.max(i+u,e.bounds.y0),e.bounds.y1)},a=n.getExtent(s,o);return mD({},e,{end:o,extent:a})})}},n.getExtent=function(e,t){var r=n.props,i=r.brushDirection,o=r.width,a=r.height;return{x0:"vertical"===i?0:Math.min(e.x||0,t.x||0),x1:"vertical"===i?o:Math.max(e.x||0,t.x||0),y0:"horizontal"===i?0:Math.min(e.y||0,t.y||0),y1:"horizontal"===i?a:Math.max(e.y||0,t.y||0)}},n.handleDragStart=function(e){var t=n.props,r=t.onBrushStart,i=t.left,o=t.top,a=t.inheritedMargin,s=t.useWindowMoveEvents,l=null!=a&&a.left?a.left:0,u=null!=a&&a.top?a.top:0,c={x:(e.x||0)+e.dx-i-l,y:(e.y||0)+e.dy-o-u},d=mD({},c);r&&r(c),n.updateBrush(function(t){return mD({},t,{start:c,end:d,extent:{x0:-1,x1:-1,y0:-1,y1:-1},isBrushing:!0,brushingType:"select",brushPageOffset:s?mk(e.event):void 0})})},n.handleBrushStart=function(e){var t=n.props,r=t.onBrushStart,i=t.left,o=t.top,a=t.inheritedMargin;if(r){var s=null!=a&&a.left?a.left:0,l=null!=a&&a.top?a.top:0;r({x:(e.x||0)+e.dx-i-s,y:(e.y||0)+e.dy-o-l})}},n.handleDragMove=function(e){var t=n.props,r=t.left,i=t.top,o=t.inheritedMargin,a=t.useWindowMoveEvents;if(e.isDragging&&!a){var s=(null==o?void 0:o.left)||0,l=(null==o?void 0:o.top)||0,u={x:(e.x||0)+e.dx-r-s,y:(e.y||0)+e.dy-i-l};n.updateBrush(function(e){var t=e.start,r=n.getExtent(t,u);return mD({},e,{end:u,extent:r})})}},n.handleDragEnd=function(){var e=n.props,t=e.onBrushEnd,r=e.resetOnEnd;e.useWindowMoveEvents||n.updateBrush(function(e){var i=e.extent,o=mD({},e,{start:{x:i.x0,y:i.y0},end:{x:i.x1,y:i.y1},isBrushing:!1,brushingType:void 0,activeHandle:null});return t&&t(o),r&&n.reset(),o})},n.getBrushWidth=function(){var e=n.state.extent,t=e.x0,r=e.x1;return Math.max(Math.max(t,r)-Math.min(t,r),0)},n.getBrushHeight=function(){var e=n.state.extent,t=e.y1,r=e.y0;return Math.max(Math.max(r,t)-Math.min(r,t),0)},n.handles=function(){var e=n.props.handleSize,t=n.state.extent,r=t.x0,i=t.x1,o=t.y0,a=t.y1,s=e/2,l=n.getBrushWidth(),u=n.getBrushHeight();return{top:{x:r-s,y:o-s,height:e,width:l+e},bottom:{x:r-s,y:a-s,height:e,width:l+e},right:{x:i-s,y:o-s,height:u+e,width:e},left:{x:r-s,y:o-s,height:u+e,width:e}}},n.corners=function(){var e=n.props.handleSize,t=n.state.extent,r=t.x0,i=t.x1,o=t.y0,a=t.y1,s=e/2;return{topLeft:{x:Math.min(r,i)-s,y:Math.min(o,a)-s,width:e,height:e},topRight:{x:Math.max(r,i)-s,y:Math.min(o,a)-s,width:e,height:e},bottomLeft:{x:Math.min(r,i)-s,y:Math.max(o,a)-s,width:e,height:e},bottomRight:{x:Math.max(r,i)-s,y:Math.max(o,a)-s,width:e,height:e}}},n.updateBrush=function(e){var t=n.props.onChange;n.setState(e,function(){t&&t(n.state)})},n.reset=function(){var e=n.props,t=e.width,r=e.height;n.updateBrush(function(){return{start:{x:0,y:0},end:{x:0,y:0},extent:{x0:-1,x1:-1,y0:-1,y1:-1},bounds:{x0:0,x1:t,y0:0,y1:r},isBrushing:!1,brushPageOffset:void 0,activeHandle:null,brushingType:void 0}})},n.handleBrushingTypeChange=function(e,t){n.updateBrush(function(n){var r=mD({},n,{brushingType:e,isBrushing:void 0!==e});return(t||void 0===e)&&(r.brushPageOffset=t),r})};var n,r=t.initialBrushPosition,i=r?n.getExtent(r.start,r.end):{x0:-1,x1:-1,y0:-1,y1:-1};return n.state={start:{x:Math.max(0,i.x0),y:Math.max(0,i.y0)},end:{x:Math.max(0,i.x1),y:Math.max(0,i.y1)},extent:i,bounds:{x0:0,x1:n.props.width,y0:0,y1:n.props.height},isBrushing:!1,brushingType:void 0,activeHandle:null},n}t.prototype=Object.create(e.prototype),t.prototype.constructor=t,mL(t,e);var n=t.prototype;return n.componentDidUpdate=function(e){var t=this;(this.props.width!==e.width||this.props.height!==e.height)&&this.setState(function(n){var r=n.start,i=n.end,o=n.extent;if(!(-1===o.x0&&-1===o.x1&&-1===o.y0&&-1===o.y1)){var a=t.props.width/e.width,s=t.props.height/e.height;r={x:a*o.x0,y:s*o.y0},i={x:a*o.x1,y:s*o.y1},o=t.getExtent(r,i)}return{start:r,end:i,extent:o,bounds:{x0:0,x1:t.props.width,y0:0,y1:t.props.height}}})},n.componentDidMount=function(){this.props.useWindowMoveEvents&&(window.addEventListener("mouseup",this.handleWindowPointerUp),window.addEventListener("mousemove",this.handleWindowPointerMove))},n.componentWillUnmount=function(){this.props.useWindowMoveEvents&&(window.removeEventListener("mouseup",this.handleWindowPointerUp),window.removeEventListener("mousemove",this.handleWindowPointerMove))},n.render=function(){var e=this,t=this.state,n=t.start,r=t.end,i=this.props,o=i.top,a=i.left,s=i.width,l=i.height,u=i.onMouseLeave,c=i.onMouseUp,d=i.onMouseMove,f=i.onBrushEnd,h=i.onClick,p=i.resizeTriggerAreas,m=i.selectedBoxStyle,v=i.disableDraggingSelection,g=i.clickSensitivity,y=i.useWindowMoveEvents,x=i.renderBrushHandle,w=this.state.brushingType,j=this.handles(),E=this.corners(),k=this.getBrushWidth(),S=this.getBrushHeight(),_=new Set(p);return b.createElement(p0.Z,{className:"visx-brush",top:o,left:a},b.createElement(mw.Z,{width:s,height:l,resetOnStart:!0,onDragStart:this.handleDragStart,onDragMove:this.handleDragMove,onDragEnd:this.handleDragEnd,isDragging:y?"select"===w:void 0},function(t){var n=t.dragStart,r=t.isDragging,i=t.dragMove,o=t.dragEnd;return b.createElement(p$.Z,{className:"visx-brush-overlay",fill:"transparent",x:0,y:0,width:s,height:l,onDoubleClick:function(){return e.reset()},onClick:function(t){var n=e.mouseUpTime-e.mouseDownTime;h&&n=0||(i[n]=e[n]);return i}(e,mH),g=o,y=s,x=a,w=l;return void 0!==m&&!m||g||y||x||w||(g="0",y="0",x="0",w="1"),b.createElement("defs",null,b.createElement("linearGradient",mU({id:n,x1:g,y1:x,x2:y,y2:w,gradientTransform:h?"rotate("+h+")":p},v),!!t&&t,!t&&b.createElement("stop",{offset:void 0===u?"0%":u,stopColor:r,stopOpacity:void 0===c?1:c}),!t&&b.createElement("stop",{offset:void 0===d?"100%":d,stopColor:i,stopOpacity:void 0===f?1:f})))}mW.propTypes={id:pG().string.isRequired,from:pG().string,to:pG().string,x1:pG().oneOfType([pG().string,pG().number]),x2:pG().oneOfType([pG().string,pG().number]),y1:pG().oneOfType([pG().string,pG().number]),y2:pG().oneOfType([pG().string,pG().number]),fromOffset:pG().oneOfType([pG().string,pG().number]),fromOpacity:pG().oneOfType([pG().string,pG().number]),toOffset:pG().oneOfType([pG().string,pG().number]),toOpacity:pG().oneOfType([pG().string,pG().number]),rotate:pG().oneOfType([pG().string,pG().number]),transform:pG().string,children:pG().node,vertical:pG().bool};var mq=n(78307),m$=n(74747);function mK(e,t){let n;if(void 0===t)for(let t of e)null!=t&&(n=t)&&(n=t);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(n=i)&&(n=i)}return n}var mY=n(12436),mG=n.n(mY),mX=n(55746),mJ=n(45742),mQ=n(27266),m0=["id","markerWidth","markerHeight","markerUnits","children"];function m1(){return(m1=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,m0);return b.createElement("defs",null,b.createElement("marker",m1({id:t,markerWidth:void 0===n?3:n,markerHeight:void 0===r?3:r,markerUnits:void 0===i?"userSpaceOnUse":i},a),o))}m2.propTypes={id:pG().string.isRequired,size:pG().number,markerWidth:pG().oneOfType([pG().string,pG().number]),markerHeight:pG().oneOfType([pG().string,pG().number]),markerUnits:pG().string,refX:pG().oneOfType([pG().string,pG().number]),refY:pG().oneOfType([pG().string,pG().number]),strokeWidth:pG().number,children:pG().node.isRequired};var m4=["id","size","strokeWidth"];function m3(){return(m3=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,m4),s=2*r+o,l=s/2;return b.createElement(m2,m3({id:t,markerWidth:s,markerHeight:s,refX:0,refY:l,orient:"auto-start-reverse",markerUnits:"strokeWidth",strokeWidth:o},a),b.createElement("circle",{r:r,cx:l,cy:l}))}var m6=n(64170),m8={top:"top",left:"left",bottom:"bottom"};function m7(){return(m7=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,va),k=null!=g?g:"tickFormat"in v?v.tickFormat():vr.Z,S=h===m8.left,_=h===m8.top,C=_||h===m8.bottom,O=function(e,t){if(void 0===t&&(t="center"),"start"!==t&&"bandwidth"in e){var n=e.bandwidth();return"center"===t&&(n/=2),e.round()&&(n=Math.round(n)),function(t){var r=e(t);return"number"==typeof r?r+n:r}}return e}(v),M=S||_?-1:1,T=v.range(),A=(void 0===(t=m)&&(t=0),"number"==typeof t?{start:t,end:t}:vo({start:0,end:0},t)),P=vi({x:Number(T[0])+.5-A.start,y:0},C),N=vi({x:Number(T[T.length-1])+.5+A.end,y:0},C),R=(null!=w?w:(0,p2.Z)(v,d)).filter(function(e){return!l||0!==e&&"0"!==e}).map(function(e,t){return{value:e,index:t}}),D=R.map(function(e){var t=e.value,n=e.index,r=(0,p4.Z)(O(t));return{value:t,index:n,from:vi({x:r,y:0},C),to:vi({x:r,y:x*M},C),formattedValue:k(t,n,R)}});return b.createElement(p0.Z,{className:pJ()("visx-axis",i),top:void 0===j?0:j,left:void 0===u?0:u},r(vs({},E,{axisFromPoint:P,axisToPoint:N,hideAxisLine:void 0!==o&&o,hideTicks:void 0!==a&&a,hideZero:l,horizontal:C,numTicks:d,orientation:h,rangePadding:m,scale:v,tickFormat:k,tickLength:x,tickPosition:O,tickSign:M,ticks:D})))}var vu=["axisClassName","labelOffset","tickLabelProps","tickLength"];function vc(){return(vc=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,vu);return b.createElement(vl,vc({axisClassName:pJ()("visx-axis-bottom",t),labelOffset:void 0===n?8:n,orientation:m8.bottom,tickLabelProps:void 0===r?vd:r,tickLength:void 0===i?8:i},o))}var vh=["axisClassName","labelOffset","tickLabelProps","tickLength"];function vp(){return(vp=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,vh);return b.createElement(vl,vp({axisClassName:pJ()("visx-axis-left",t),labelOffset:void 0===n?36:n,orientation:m8.left,tickLabelProps:void 0===r?vm:r,tickLength:void 0===i?8:i},o))}let vg=e=>new Date((null==e?void 0:e.timestamp)||0),vy=e=>(null==e?void 0:e.value)||0,vb="var(--colors-hiContrast)",vx={textAnchor:"middle",fontFamily:"var(--fonts-sans)",fontSize:10,fill:vb},vw={dx:"-0.25em",dy:"0.25em",fontFamily:"var(--fonts-sans)",fontSize:10,textAnchor:"end",fill:vb};function vj(e){let{data:t,gradientColor:n,width:r,yMax:i,margin:o,xScale:a,yScale:s,hideBottomAxis:l=!1,hideLeftAxis:u=!1,top:c,left:d,curve:f="step",children:h}=e;return r<10?null:(0,y.jsxs)(p0.Z,{left:d||o.left,top:c||o.top,children:[(0,y.jsx)(m5,{id:"marker-circle",fill:"var(--colors-accent11)",size:1.5,refX:1.5}),(0,y.jsx)(mW,{id:"gradient",from:n,fromOpacity:1,to:n,toOpacity:.2}),(0,y.jsx)(mX.Z,{data:t,x:e=>a(vg(e))||0,y:e=>s(vy(e))||0,yScale:s,strokeWidth:1,stroke:"url(#gradient)",fill:"url(#gradient)",markerMid:"url(#marker-circle)",curve:"step"===f?mJ.ZP:mQ.Z}),!l&&(0,y.jsx)(vf,{top:i,scale:a,numTicks:r>520?10:5,stroke:vb,tickStroke:vb,tickLabelProps:()=>vx}),!u&&(0,y.jsx)(vv,{scale:s,numTicks:5,stroke:vb,tickStroke:vb,tickLabelProps:()=>vw}),h]})}var vE=n(6692);let vk={inherit:vE.inherit,current:vE.current,transparent:vE.transparent,black:vE.black,white:vE.white,slate:vE.slate,zinc:vE.zinc,neutral:vE.neutral,stone:vE.stone,red:vE.red,orange:vE.orange,amber:vE.amber,yellow:vE.yellow,lime:vE.lime,green:vE.green,emerald:vE.emerald,teal:vE.teal,cyan:vE.cyan,sky:vE.sky,blue:vE.blue,indigo:vE.indigo,violet:vE.violet,purple:vE.purple,fuchsia:vE.fuchsia,pink:vE.pink,rose:vE.rose,mask:"rgba(30, 169, 76, .3)",accent:{50:"#F6FFF9",100:"#E9FBEF",200:"#D5F2DE",300:"#C9EED4",400:"#BBE8C9",500:"#9BDAAE",600:"#71C48A",700:"#3EAA5F",800:"#05872D",900:"#056B24",1e3:"#04511B",1100:"#011F0A"},accentdark:{50:"#05150A",100:"#051C0C",200:"#062811",300:"#073515",400:"#064018",500:"#075820",600:"#056824",700:"#077A2A",800:"#05872D",900:"#069F35",1e3:"#2FA052",1100:"#D9F4E1"},gray:{50:"hsl(206, 30.0%, 98.8%)",100:"hsl(210, 16.7%, 97.6%)",200:"hsl(209, 13.3%, 95.3%)",300:"hsl(209, 12.2%, 93.2%)",400:"hsl(208, 11.7%, 91.1%)",500:"hsl(208, 11.3%, 88.9%)",600:"hsl(207, 11.1%, 85.9%)",700:"hsl(205, 10.7%, 78.0%)",800:"hsl(206, 6.0%, 56.1%)",900:"hsl(206, 5.8%, 52.3%)",1e3:"hsl(206, 6.0%, 43.5%)",1100:"hsl(206, 24.0%, 9.0%)"},graydark:{50:"hsl(200, 7.0%, 8.8%)",100:"hsl(195, 7.1%, 11.0%)",200:"hsl(197, 6.8%, 13.6%)",300:"hsl(198, 6.6%, 15.8%)",400:"hsl(199, 6.4%, 17.9%)",500:"hsl(201, 6.2%, 20.5%)",600:"hsl(203, 6.0%, 24.3%)",700:"hsl(207, 5.6%, 31.6%)",800:"hsl(206, 6.0%, 43.9%)",900:"hsl(206, 5.2%, 49.5%)",1e3:"hsl(206, 6.0%, 63.0%)",1100:"hsl(210, 6.0%, 93.0%)"}};var vS=n(96206);let v_={top:10,bottom:15,left:10,right:10},vC="brush_pattern",vO="brush_gradient",vM=mG()(e=>e(),15),vT=(0,mq.Z)(e=>new Date((null==e?void 0:e.timestamp)||0)).left;void 0===Eb&&(Eb={style:{position:"relative",width:"inherit",height:"inherit"}}),void 0===Ex&&(Ex=function(e,t){return b.createElement("div",t,e)});var vA=n(70390),vP=n(3440),vN=n.n(vP);function vR(e){let{id:t,width:n,height:r,accessors:i,animationTrajectory:o,curve:a,data:s,config:l,scales:u,enabledGraph:c,enabledTip:d,isStack:f,todayOffset:h,numTicks:p,renderAreaSeries:m,renderAreaStack:v,renderBarGroup:g,renderBarStack:x,enableTooltipGlyph:w,renderTooltipGlyph:j,renderLineSeries:E,sharedTooltip:k,showHorizontalCrosshair:S,showTooltip:_,showVerticalCrosshair:C,snapTooltipToDatum:O,stackOffset:M,margin:T,theme:A,xAxisOrientation:P,yAxisOrientation:N,AreaSeries:R,AreaStack:D,Axis:L,BarGroup:F,BarSeries:z,BarStack:V,Grid:I,LineSeries:Z,Tooltip:B,XYChart:H}=e;return(0,y.jsxs)(H,{theme:A.xyChartTheme,xScale:u.x,yScale:u.y,height:Math.min(400,r),margin:T,captureEvents:!0,children:[(0,y.jsx)("g",{children:(0,y.jsx)("rect",{className:"fill-gray-600 dark:fill-graydark-600 h-full w-px y-0",style:{left:"".concat(100*h,"%")}})},"today-line-".concat(n,"-").concat(r)),(0,y.jsx)(mW,{id:"gradient-default",from:"gray",fromOpacity:1,to:"gray",toOpacity:.4}),Object.entries(l.data).map(e=>{let[n,r]=e,i=r.color;return(0,y.jsxs)(b.Fragment,{children:[(0,y.jsx)(mo,{id:"pattern-".concat(vD(t,n)),height:6,width:6,stroke:i,strokeWidth:.5,orientation:["diagonal"]}),(0,y.jsx)(mW,{id:"gradient-".concat(vD(t,n)),from:i,fromOpacity:1,to:i,toOpacity:f?.4:1})]},n)}),(0,y.jsx)(I,{rows:!1,columns:!0,strokeDasharray:"1,3",animationTrajectory:o,numTicks:p},"grid-".concat(o)),x&&(0,y.jsx)(V,{offset:M,children:c.map(e=>(0,y.jsx)(z,{dataKey:e,data:s,xAccessor:i.x[e],yAccessor:i.y[e],colorAccessor:()=>vL(t,e,l)},e))}),g&&(0,y.jsx)(F,{children:c.map(e=>(0,y.jsx)(z,{dataKey:e,data:s,xAccessor:i.x[e],yAccessor:i.y[e],colorAccessor:()=>vL(t,e,l)},e))}),m&&(0,y.jsx)(y.Fragment,{children:c.map(e=>(0,y.jsx)(R,{dataKey:e,data:s,xAccessor:i.x[e],yAccessor:i.y[e],stroke:vL(t,e,l),fill:vL(t,e,l),curve:a},e))}),v&&(0,y.jsx)(D,{curve:a,offset:M,renderLine:"wiggle"!==M,children:c.map(e=>(0,y.jsx)(R,{dataKey:e,data:s,xAccessor:i.x[e],yAccessor:i.y[e],stroke:vL(t,e,l),fill:vL(t,e,l)},e))}),E&&(0,y.jsx)(y.Fragment,{children:c.map(e=>{var t,n;return(0,y.jsx)(Z,{dataKey:e,data:s,xAccessor:i.x[e],yAccessor:i.y[e],stroke:(null===(n=l.data)||void 0===n?void 0:null===(t=n[e])||void 0===t?void 0:t.color)||"gray",curve:a},e)})}),(0,y.jsx)(L,{orientation:P,numTicks:p,animationTrajectory:o,tickFormat:e=>(0,vS.rN)(e),tickLength:12,tickLabelProps:e=>({...e,fill:A.labels.color,fontFamily:A.labels.fontFamily,y:"14px",fontWeight:"500",fontSize:"8"})},"time-axis-".concat(o)),(0,y.jsx)(L,{label:null==M?"SC":"expand"===M?"Fraction of total":"",orientation:N,numTicks:p,tickLength:0,rangePadding:0,animationTrajectory:o,tickFormat:()=>""},"temp-axis-".concat(o)),_&&(0,y.jsx)(B,{showHorizontalCrosshair:S,showVerticalCrosshair:C,snapTooltipToDatumX:O,snapTooltipToDatumY:O,showDatumGlyph:O&&!g,showSeriesGlyphs:k&&!g,renderGlyph:w?j:void 0,renderTooltip:e=>{var t,n;let{tooltipData:r}=e,o=null==r?void 0:null===(t=r.nearestDatum)||void 0===t?void 0:t.datum,a=null==r?void 0:null===(n=r.nearestDatum)||void 0===n?void 0:n.key,s=k?d:a?[a]:[],u=l.formatTimestamp||(e=>(0,vS.rN)(e,{timeStyle:"short",hour12:!1})),c=s.map(e=>{var t,n;return{key:e,category:(null===(n=l.data)||void 0===n?void 0:null===(t=n[e])||void 0===t?void 0:t.category)||""}}),h=vN()(c,"category"),p=l.categories?l.categories.map(e=>[e,h[e]]):Object.entries(h);return(0,y.jsxs)("div",{className:(0,em.cx)(lo,"flex flex-col gap-2 py-1"),children:[(0,y.jsx)(t1,{font:"mono",size:"12",color:"contrast",className:"text-end",children:o?u(i.date(o)):"No date"}),(0,y.jsx)(cF,{color:"panel",className:"w-full"}),(0,y.jsx)("div",{className:(0,em.cx)("grid gap-x-6 gap-y-4",p.length>1?"grid-cols-2":"grid-cols-1"),children:p.map(e=>{let[t,n]=e,r=o?n.reduce((e,t)=>{let{key:n}=t,r=i.y[n](o);return null==r||Number.isNaN(r)?e:e+r},0):0;return(0,y.jsxs)("div",{className:"flex flex-col gap-2 w-[250px]",children:[t&&(0,y.jsx)(t1,{weight:"semibold",children:t}),(0,y.jsxs)("div",{className:"grid grid-cols-2 gap-x-2 gap-y-1 items-center",children:[n.map(e=>{var t,n,r,s;let{key:u}=e,c=o&&i.y[u](o);return(0,y.jsxs)(b.Fragment,{children:[(0,y.jsx)(t1,{color:"accent",style:{color:null===(n=l.data)||void 0===n?void 0:null===(t=n[u])||void 0===t?void 0:t.color},className:(0,em.cx)(a===u?"underline":""),children:(null===(s=l.data)||void 0===s?void 0:null===(r=s[u])||void 0===r?void 0:r.label)||u}),(0,y.jsx)(t1,{size:"12",style:{textAlign:"end"},className:(0,em.cx)(a===u?"underline":""),children:null==c||Number.isNaN(c)?"–":l.format(c)})]},u)}),n.length>1&&f&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(t1,{className:"pt-2",children:"total"}),(0,y.jsx)(t1,{size:"12",weight:"bold",className:"pt-2 text-end",children:l.format(r)})]})]})]},t)})})]})}})]})}function vD(e,t){return"".concat(e,"-").concat(t)}function vL(e,t,n){var r;let i=vD(e,t);return(null===(r=n.data)||void 0===r?void 0:r[t])?n.data[t].pattern?"url(#pattern-".concat(i,")"):"url(#gradient-".concat(i,")"):"url(#gradient-default)"}var vF=n(24037),vz=n(86707);function vV(e){var t=e.top,n=e.left,r=e.className,i=e.children;return b.createElement(p0.Z,{className:pJ()("visx-glyph",r),top:void 0===t?0:t,left:void 0===n?0:n},i)}vV.propTypes={top:pG().number,left:pG().number,className:pG().string,children:pG().node};var vI=["children","className","top","left","size"];function vZ(){return(vZ=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,vI),s=(0,vF.Z)();return(s.type(vz.Z),"number"==typeof o?s.size(o):o&&s.size(o),t)?b.createElement(b.Fragment,null,t({path:s})):b.createElement(vV,{top:r,left:i},b.createElement("path",vZ({className:pJ()("visx-glyph-star",n),d:s()||""},a)))}vB.propTypes={children:pG().func,className:pG().string,top:pG().number,left:pG().number,size:pG().oneOfType([pG().number,pG().func])};var vH=["top","left","className"];function vU(){return(vU=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,vH);return b.createElement(vV,{top:void 0===t?0:t,left:void 0===n?0:n},b.createElement("circle",vU({className:pJ()("visx-glyph-dot",r)},i)))}vW.propTypes={className:pG().string,top:pG().number,left:pG().number,r:pG().number,cx:pG().number,cy:pG().number};var vq=n(9135),v$=["children","className","top","left","size"];function vK(){return(vK=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,v$),s=(0,vF.Z)();return(s.type(vq.Z),"number"==typeof o?s.size(o):o&&s.size(o),t)?b.createElement(b.Fragment,null,t({path:s})):b.createElement(vV,{top:r,left:i},b.createElement("path",vK({className:pJ()("visx-glyph-cross",n),d:s()||""},a)))}vY.propTypes={children:pG().func,className:pG().string,top:pG().number,left:pG().number,size:pG().oneOfType([pG().number,pG().func])};var vG=n(46385),vX=n(20651),vJ={red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"]},vQ=vJ.gray,v0=vQ[7],v1=[vJ.cyan[9],vJ.cyan[3],vJ.yellow[5],vJ.red[4],vJ.grape[8],vJ.grape[5],vJ.pink[9]];function v2(){return(v2=Object.assign?Object.assign.bind():function(e){for(var t=1;t{for(var n in t)v8(e,n,{get:t[n],enumerable:!0})})(v7,{assign:()=>gT,colors:()=>gC,createStringInterpolator:()=>EE,skipAnimation:()=>gO,to:()=>Ek,willAdvance:()=>gM});var v9=gm(),ge=e=>gd(e,v9),gt=gm();ge.write=e=>gd(e,gt);var gn=gm();ge.onStart=e=>gd(e,gn);var gr=gm();ge.onFrame=e=>gd(e,gr);var gi=gm();ge.onFinish=e=>gd(e,gi);var go=[];ge.setTimeout=(e,t)=>{let n=ge.now()+t,r=()=>{let e=go.findIndex(e=>e.cancel==r);~e&&go.splice(e,1),gu-=~e?1:0},i={time:n,handler:e,cancel:r};return go.splice(ga(n),0,i),gu+=1,gf(),i};var ga=e=>~(~go.findIndex(t=>t.time>e)||~go.length);ge.cancel=e=>{gn.delete(e),gr.delete(e),gi.delete(e),v9.delete(e),gt.delete(e)},ge.sync=e=>{gc=!0,ge.batchedUpdates(e),gc=!1},ge.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...e){t=e,ge.onStart(n)}return r.handler=e,r.cancel=()=>{gn.delete(n),t=null},r};var gs="undefined"!=typeof window?window.requestAnimationFrame:()=>{};ge.use=e=>gs=e,ge.now="undefined"!=typeof performance?()=>performance.now():Date.now,ge.batchedUpdates=e=>e(),ge.catch=console.error,ge.frameLoop="always",ge.advance=()=>{"demand"!==ge.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):gp()};var gl=-1,gu=0,gc=!1;function gd(e,t){gc?(t.delete(e),e(0)):(t.add(e),gf())}function gf(){gl<0&&(gl=0,"demand"!==ge.frameLoop&&gs(gh))}function gh(){~gl&&(gs(gh),ge.batchedUpdates(gp))}function gp(){let e=gl;gl=ge.now();let t=ga(gl);if(t&&(gv(go.splice(0,t),e=>e.handler()),gu-=t),!gu){gl=-1;return}gn.flush(),v9.flush(e?Math.min(64,gl-e):16.667),gr.flush(),gt.flush(),gi.flush()}function gm(){let e=new Set,t=e;return{add(n){gu+=t!=e||e.has(n)?0:1,e.add(n)},delete:n=>(gu-=t==e&&e.has(n)?1:0,e.delete(n)),flush(n){t.size&&(e=new Set,gu-=t.size,gv(t,t=>t(n)&&e.add(t)),gu+=e.size,t=e)}}}function gv(e,t){e.forEach(e=>{try{t(e)}catch(e){ge.catch(e)}})}function gg(){}var gy=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),gb={arr:Array.isArray,obj:e=>!!e&&"Object"===e.constructor.name,fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,und:e=>void 0===e};function gx(e,t){if(gb.arr(e)){if(!gb.arr(t)||e.length!==t.length)return!1;for(let n=0;ne.forEach(t);function gj(e,t,n){if(gb.arr(e)){for(let r=0;rgb.und(e)?[]:gb.arr(e)?e:[e];function gk(e,t){if(e.size){let n=Array.from(e);e.clear(),gw(n,t)}}var gS=(e,...t)=>gk(e,e=>e(...t)),g_=()=>"undefined"==typeof window||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),gC=null,gO=!1,gM=gg,gT=e=>{e.to&&(Ek=e.to),e.now&&(ge.now=e.now),void 0!==e.colors&&(gC=e.colors),null!=e.skipAnimation&&(gO=e.skipAnimation),e.createStringInterpolator&&(EE=e.createStringInterpolator),e.requestAnimationFrame&&ge.use(e.requestAnimationFrame),e.batchedUpdates&&(ge.batchedUpdates=e.batchedUpdates),e.willAdvance&&(gM=e.willAdvance),e.frameLoop&&(ge.frameLoop=e.frameLoop)},gA=new Set,gP=[],gN=[],gR=0,gD={get idle(){return!gA.size&&!gP.length},start(e){gR>e.priority?(gA.add(e),ge.onStart(gL)):(gF(e),ge(gV))},advance:gV,sort(e){if(gR)ge.onFrame(()=>gD.sort(e));else{let t=gP.indexOf(e);~t&&(gP.splice(t,1),gz(e))}},clear(){gP=[],gA.clear()}};function gL(){gA.forEach(gF),gA.clear(),ge(gV)}function gF(e){gP.includes(e)||gz(e)}function gz(e){gP.splice(function(e,t){let n=e.findIndex(t);return n<0?e.length:n}(gP,t=>t.priority>e.priority),0,e)}function gV(e){let t=gN;for(let n=0;n0}var gI="[-+]?\\d*\\.?\\d+",gZ=gI+"%";function gB(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var gH=RegExp("rgb"+gB(gI,gI,gI)),gU=RegExp("rgba"+gB(gI,gI,gI,gI)),gW=RegExp("hsl"+gB(gI,gZ,gZ)),gq=RegExp("hsla"+gB(gI,gZ,gZ,gI)),g$=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,gK=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,gY=/^#([0-9a-fA-F]{6})$/,gG=/^#([0-9a-fA-F]{8})$/;function gX(e,t,n){return(n<0&&(n+=1),n>1&&(n-=1),n<1/6)?e+(t-e)*6*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function gJ(e,t,n){let r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,o=gX(i,r,e+1/3),a=gX(i,r,e),s=gX(i,r,e-1/3);return Math.round(255*o)<<24|Math.round(255*a)<<16|Math.round(255*s)<<8}function gQ(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function g0(e){let t=parseFloat(e);return(t%360+360)%360/360}function g1(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function g2(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function g4(e){let t;let n="number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=gY.exec(e))?parseInt(t[1]+"ff",16)>>>0:gC&&void 0!==gC[e]?gC[e]:(t=gH.exec(e))?(gQ(t[1])<<24|gQ(t[2])<<16|gQ(t[3])<<8|255)>>>0:(t=gU.exec(e))?(gQ(t[1])<<24|gQ(t[2])<<16|gQ(t[3])<<8|g1(t[4]))>>>0:(t=g$.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=gG.exec(e))?parseInt(t[1],16)>>>0:(t=gK.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=gW.exec(e))?(255|gJ(g0(t[1]),g2(t[2]),g2(t[3])))>>>0:(t=gq.exec(e))?(gJ(g0(t[1]),g2(t[2]),g2(t[3]))|g1(t[4]))>>>0:null;if(null===n)return e;n=n||0;let r=(4278190080&n)>>>24,i=(16711680&n)>>>16,o=(65280&n)>>>8,a=(255&n)/255;return`rgba(${r}, ${i}, ${o}, ${a})`}var g3=(e,t,n)=>{if(gb.fun(e))return e;if(gb.arr(e))return g3({range:e,output:t,extrapolate:n});if(gb.str(e.output[0]))return EE(e);let r=e.output,i=e.range||[0,1],o=e.extrapolateLeft||e.extrapolate||"extend",a=e.extrapolateRight||e.extrapolate||"extend",s=e.easing||(e=>e);return t=>{let n=function(e,t){for(var n=1;n=e);++n);return n-1}(t,i);return function(e,t,n,r,i,o,a,s,l){let u=l?l(e):e;if(un){if("identity"===s)return u;"clamp"===s&&(u=n)}return r===i?r:t===n?e<=t?r:i:(t===-1/0?u=-u:n===1/0?u-=t:u=(u-t)/(n-t),u=o(u),r===-1/0?u=-u:i===1/0?u+=r:u=u*(i-r)+r,u)}(t,i[n],i[n+1],r[n],r[n+1],s,o,a,e.map)}},g5=Symbol.for("FluidValue.get"),g6=Symbol.for("FluidValue.observers"),g8=e=>!!(e&&e[g5]),g7=e=>e&&e[g5]?e[g5]():e,g9=e=>e[g6]||null;function ye(e,t){let n=e[g6];n&&n.forEach(e=>{e.eventObserved?e.eventObserved(t):e(t)})}var yt=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");yn(this,e)}},yn=(e,t)=>yo(e,g5,t);function yr(e,t){if(e[g5]){let n=e[g6];n||yo(e,g6,n=new Set),!n.has(t)&&(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function yi(e,t){let n=e[g6];if(n&&n.has(t)){let r=n.size-1;r?n.delete(t):e[g6]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var yo=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),ya=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,ys=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,yl=RegExp(`(${ya.source})(%|[a-z]+)`,"i"),yu=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,yc=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,yd=e=>{let[t,n]=yf(e);if(!t||g_())return e;let r=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(r)return r.trim();if(n&&n.startsWith("--")){let e=window.getComputedStyle(document.documentElement).getPropertyValue(n);if(e)return e}else if(n&&yc.test(n))return yd(n);else if(n)return n;return e},yf=e=>{let t=yc.exec(e);if(!t)return[,];let[,n,r]=t;return[n,r]},yh=(e,t,n,r,i)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${i})`,yp=e=>{ES||(ES=gC?RegExp(`(${Object.keys(gC).join("|")})(?!\\w)`,"g"):/^\b$/);let t=e.output.map(e=>g7(e).replace(yc,yd).replace(ys,g4).replace(ES,g4)),n=t.map(e=>e.match(ya).map(Number)),r=n[0].map((e,t)=>n.map(e=>{if(!(t in e))throw Error('The arity of each "output" value must be equal');return e[t]})),i=r.map(t=>g3({...e,output:t}));return e=>{let n=!yl.test(t[0])&&t.find(e=>yl.test(e))?.replace(ya,""),r=0;return t[0].replace(ya,()=>`${i[r++](e)}${n||""}`).replace(yu,yh)}},ym="react-spring: ",yv=e=>{let t=!1;if("function"!=typeof e)throw TypeError(`${ym}once requires a function parameter`);return(...n)=>{t||(e(...n),t=!0)}},yg=yv(console.warn),yy=yv(console.warn);function yb(e){return gb.str(e)&&("#"==e[0]||/\d/.test(e)||!g_()&&yc.test(e)||e in(gC||{}))}var yx=g_()?b.useEffect:b.useLayoutEffect,yw=()=>{let e=(0,b.useRef)(!1);return yx(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function yj(){let e=(0,b.useState)()[1],t=yw();return()=>{t.current&&e(Math.random())}}var yE=e=>(0,b.useEffect)(e,yk),yk=[];function yS(e){let t=(0,b.useRef)();return(0,b.useEffect)(()=>{t.current=e}),t.current}var y_=Symbol.for("Animated:node"),yC=e=>!!e&&e[y_]===e,yO=e=>e&&e[y_],yM=(e,t)=>gy(e,y_,t),yT=e=>e&&e[y_]&&e[y_].getPayload(),yA=class{constructor(){yM(this,this)}getPayload(){return this.payload||[]}},yP=class extends yA{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,gb.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new yP(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return gb.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value!==e&&(this._value=e,!0)}reset(){let{done:e}=this;this.done=!1,gb.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},yN=class extends yP{constructor(e){super(0),this._string=null,this._toString=g3({output:[e,e]})}static create(e){return new yN(e)}getValue(){let e=this._string;return null==e?this._string=this._toString(this._value):e}setValue(e){if(gb.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else{if(!super.setValue(e))return!1;this._string=null}return!0}reset(e){e&&(this._toString=g3({output:[this.getValue(),e]})),this._value=0,super.reset()}},yR={dependencies:null},yD=class extends yA{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){let t={};return gj(this.source,(n,r)=>{yC(n)?t[r]=n.getValue(e):g8(n)?t[r]=g7(n):e||(t[r]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&gw(this.payload,e=>e.reset())}_makePayload(e){if(e){let t=new Set;return gj(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){yR.dependencies&&g8(e)&&yR.dependencies.add(e);let t=yT(e);t&&gw(t,e=>this.add(e))}},yL=class extends yD{constructor(e){super(e)}static create(e){return new yL(e)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){let t=this.getPayload();return e.length==t.length?t.map((t,n)=>t.setValue(e[n])).some(Boolean):(super.setValue(e.map(yF)),!0)}};function yF(e){let t=yb(e)?yN:yP;return t.create(e)}function yz(e){let t=yO(e);return t?t.constructor:gb.arr(e)?yL:yb(e)?yN:yP}var yV=(e,t)=>{let n=!gb.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,b.forwardRef)((r,i)=>{let o=(0,b.useRef)(null),a=n&&(0,b.useCallback)(e=>{o.current=(i&&(gb.fun(i)?i(e):i.current=e),e)},[i]),[s,l]=function(e,t){let n=new Set;return yR.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new yD(e),yR.dependencies=null,[e,n]}(r,t),u=yj(),c=()=>{let e=o.current;if(n&&!e)return;let r=!!e&&t.applyAnimatedValues(e,s.getValue(!0));!1===r&&u()},d=new yI(c,l),f=(0,b.useRef)();yx(()=>(f.current=d,gw(l,e=>yr(e,d)),()=>{f.current&&(gw(f.current.deps,e=>yi(e,f.current)),ge.cancel(f.current.update))})),(0,b.useEffect)(c,[]),yE(()=>()=>{let e=f.current;gw(e.deps,t=>yi(t,e))});let h=t.getComponentProps(s.getValue());return b.createElement(e,{...h,ref:a})})},yI=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){"change"==e.type&&ge.write(this.update)}},yZ=Symbol.for("AnimatedComponent"),yB=e=>gb.str(e)?e:e&&gb.str(e.displayName)?e.displayName:gb.fun(e)&&e.name||null;function yH(e,...t){return gb.fun(e)?e(...t):e}var yU=(e,t)=>!0===e||!!(t&&e&&(gb.fun(e)?e(t):gE(e).includes(t))),yW=(e,t)=>gb.obj(e)?t&&e[t]:e,yq=(e,t)=>!0===e.default?e[t]:e.default?e.default[t]:void 0,y$=e=>e,yK=(e,t=y$)=>{let n=yY;e.default&&!0!==e.default&&(n=Object.keys(e=e.default));let r={};for(let i of n){let n=t(e[i],i);gb.und(n)||(r[i]=n)}return r},yY=["config","onProps","onStart","onChange","onPause","onResume","onRest"],yG={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function yX(e){let t=function(e){let t={},n=0;if(gj(e,(e,r)=>{!yG[r]&&(t[r]=e,n++)}),n)return t}(e);if(t){let n={to:t};return gj(e,(e,r)=>r in t||(n[r]=e)),n}return{...e}}function yJ(e){return e=g7(e),gb.arr(e)?e.map(yJ):yb(e)?v7.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function yQ(e){for(let t in e)return!0;return!1}function y0(e){return gb.fun(e)||gb.arr(e)&&gb.obj(e[0])}function y1(e,t){e.ref?.delete(e),t?.delete(e)}function y2(e,t){t&&e.ref!==t&&(e.ref?.delete(e),t.add(e),e.ref=t)}var y4={tension:170,friction:26,mass:1,damping:1,easing:e=>e,clamp:!1},y3=class{constructor(){this.velocity=0,Object.assign(this,y4)}};function y5(e,t){if(gb.und(t.decay)){let n=!gb.und(t.tension)||!gb.und(t.friction);!n&&gb.und(t.frequency)&&gb.und(t.damping)&&gb.und(t.mass)||(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}else e.duration=void 0}var y6=[],y8=class{constructor(){this.changed=!1,this.values=y6,this.toValues=null,this.fromValues=y6,this.config=new y3,this.immediate=!1}};function y7(e,{key:t,props:n,defaultProps:r,state:i,actions:o}){return new Promise((a,s)=>{let l,u;let c=yU(n.cancel??r?.cancel,t);if(c)h();else{gb.und(n.pause)||(i.paused=yU(n.pause,t));let e=r?.pause;!0!==e&&(e=i.paused||yU(e,t)),l=yH(n.delay||0,t),e?(i.resumeQueue.add(f),o.pause()):(o.resume(),f())}function d(){i.resumeQueue.add(f),i.timeouts.delete(u),u.cancel(),l=u.time-ge.now()}function f(){l>0&&!v7.skipAnimation?(i.delayed=!0,u=ge.setTimeout(h,l),i.pauseQueue.add(d),i.timeouts.add(u)):h()}function h(){i.delayed&&(i.delayed=!1),i.pauseQueue.delete(d),i.timeouts.delete(u),e<=(i.cancelId||0)&&(c=!0);try{o.start({...n,callId:e,cancel:c},a)}catch(e){s(e)}}})}var y9=(e,t)=>1==t.length?t[0]:t.some(e=>e.cancelled)?bn(e.get()):t.every(e=>e.noop)?be(e.get()):bt(e.get(),t.every(e=>e.finished)),be=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),bt=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),bn=e=>({value:e,cancelled:!0,finished:!1});function br(e,t,n,r){let{callId:i,parentId:o,onRest:a}=t,{asyncTo:s,promise:l}=n;return o||e!==s||t.reset?n.promise=(async()=>{let u,c,d;n.asyncId=i,n.asyncTo=e;let f=yK(t,(e,t)=>"onRest"===t?void 0:e),h=new Promise((e,t)=>(u=e,c=t)),p=e=>{let t=i<=(n.cancelId||0)&&bn(r)||i!==n.asyncId&&bt(r,!1);if(t)throw e.result=t,c(e),e},m=(e,t)=>{let o=new bo,a=new ba;return(async()=>{if(v7.skipAnimation)throw bi(n),a.result=bt(r,!1),c(a),a;p(o);let s=gb.obj(e)?{...e}:{...t,to:e};s.parentId=i,gj(f,(e,t)=>{gb.und(s[t])&&(s[t]=e)});let l=await r.start(s);return p(o),n.paused&&await new Promise(e=>{n.resumeQueue.add(e)}),l})()};if(v7.skipAnimation)return bi(n),bt(r,!1);try{let t;t=gb.arr(e)?(async e=>{for(let t of e)await m(t)})(e):Promise.resolve(e(m,r.stop.bind(r))),await Promise.all([t.then(u),h]),d=bt(r.get(),!0,!1)}catch(e){if(e instanceof bo)d=e.result;else if(e instanceof ba)d=e.result;else throw e}finally{i==n.asyncId&&(n.asyncId=o,n.asyncTo=o?s:void 0,n.promise=o?l:void 0)}return gb.fun(a)&&ge.batchedUpdates(()=>{a(d,r,r.item)}),d})():l}function bi(e,t){gk(e.timeouts,e=>e.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var bo=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},ba=class extends Error{constructor(){super("SkipAnimationSignal")}},bs=e=>e instanceof bu,bl=1,bu=class extends yt{constructor(){super(...arguments),this.id=bl++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){let e=yO(this);return e&&e.getValue()}to(...e){return v7.to(this,e)}interpolate(...e){return yg(`${ym}The "interpolate" function is deprecated in v9 (use "to" instead)`),v7.to(this,e)}toJSON(){return this.get()}observerAdded(e){1==e&&this._attach()}observerRemoved(e){0==e&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){ye(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||gD.sort(this),ye(this,{type:"priority",parent:this,priority:e})}},bc=Symbol.for("SpringPhase"),bd=e=>(1&e[bc])>0,bf=e=>(2&e[bc])>0,bh=e=>(4&e[bc])>0,bp=(e,t)=>t?e[bc]|=3:e[bc]&=-3,bm=(e,t)=>t?e[bc]|=4:e[bc]&=-5,bv=class extends bu{constructor(e,t){if(super(),this.animation=new y8,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!gb.und(e)||!gb.und(t)){let n=gb.obj(e)?{...e}:{...t,from:e};gb.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(bf(this)||this._state.asyncTo)||bh(this)}get goal(){return g7(this.animation.to)}get velocity(){let e=yO(this);return e instanceof yP?e.lastVelocity||0:e.getPayload().map(e=>e.lastVelocity||0)}get hasAnimated(){return bd(this)}get isAnimating(){return bf(this)}get isPaused(){return bh(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1,r=this.animation,{toValues:i}=r,{config:o}=r,a=yT(r.to);!a&&g8(r.to)&&(i=gE(g7(r.to))),r.values.forEach((s,l)=>{if(s.done)return;let u=s.constructor==yN?1:a?a[l].lastPosition:i[l],c=r.immediate,d=u;if(!c){let t;if(d=s.lastPosition,o.tension<=0){s.done=!0;return}let n=s.elapsedTime+=e,i=r.fromValues[l],a=null!=s.v0?s.v0:s.v0=gb.arr(o.velocity)?o.velocity[l]:o.velocity,f=o.precision||(i==u?.005:Math.min(1,.001*Math.abs(u-i)));if(gb.und(o.duration)){if(o.decay){let e=!0===o.decay?.998:o.decay,r=Math.exp(-(1-e)*n);d=i+a/(1-e)*(1-r),c=Math.abs(s.lastPosition-d)<=f,t=a*r}else{t=null==s.lastVelocity?a:s.lastVelocity;let n=o.restVelocity||f/10,r=o.clamp?0:o.bounce,l=!gb.und(r),h=i==u?s.v0>0:in)&&(c=Math.abs(u-d)<=f));++e){l&&(d==u||d>u==h)&&(t=-t*r,d=u);let e=-(1e-6*o.tension)*(d-u),n=-(.001*o.friction)*t,i=(e+n)/o.mass;t+=1*i,d+=1*t}}}else{let r=1;o.duration>0&&(this._memoizedDuration!==o.duration&&(this._memoizedDuration=o.duration,s.durationProgress>0&&(s.elapsedTime=o.duration*s.durationProgress,n=s.elapsedTime+=e)),r=(r=(o.progress||0)+n/this._memoizedDuration)>1?1:r<0?0:r,s.durationProgress=r),t=((d=i+o.easing(r)*(u-i))-s.lastPosition)/e,c=1==r}s.lastVelocity=t,Number.isNaN(d)&&(console.warn("Got NaN while animating:",this),c=!0)}a&&!a[l].done&&(c=!1),c?s.done=!0:t=!1,s.setValue(d,o.round)&&(n=!0)});let s=yO(this),l=s.getValue();if(t){let e=g7(r.to);(l!==e||n)&&!o.decay?(s.setValue(e),this._onChange(e)):n&&o.decay&&this._onChange(l),this._stop()}else n&&this._onChange(l)}set(e){return ge.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(bf(this)){let{to:e,config:t}=this.animation;ge.batchedUpdates(()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()})}return this}update(e){let t=this.queue||(this.queue=[]);return t.push(e),this}start(e,t){let n;return gb.und(e)?(n=this.queue||[],this.queue=[]):n=[gb.obj(e)?e:{...t,to:e}],Promise.all(n.map(e=>{let t=this._update(e);return t})).then(e=>y9(this,e))}stop(e){let{to:t}=this.animation;return this._focus(this.get()),bi(this._state,e&&this._lastCallId),ge.batchedUpdates(()=>this._stop(t,e)),this}reset(){this._update({reset:!0})}eventObserved(e){"change"==e.type?this._start():"priority"==e.type&&(this.priority=e.priority+1)}_prepareNode(e){let t=this.key||"",{to:n,from:r}=e;(null==(n=gb.obj(n)?n[t]:n)||y0(n))&&(n=void 0),null==(r=gb.obj(r)?r[t]:r)&&(r=void 0);let i={to:n,from:r};return bd(this)||(e.reverse&&([n,r]=[r,n]),r=g7(r),gb.und(r)?yO(this)||this._set(n):this._set(r)),i}_update({...e},t){let{key:n,defaultProps:r}=this;e.default&&Object.assign(r,yK(e,(e,t)=>/^on/.test(t)?yW(e,n):e)),bj(this,e,"onProps"),bE(this,"onProps",e,this);let i=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");let o=this._state;return y7(++this._lastCallId,{key:n,props:e,defaultProps:r,state:o,actions:{pause:()=>{bh(this)||(bm(this,!0),gS(o.pauseQueue),bE(this,"onPause",bt(this,bg(this,this.animation.to)),this))},resume:()=>{bh(this)&&(bm(this,!1),bf(this)&&this._resume(),gS(o.resumeQueue),bE(this,"onResume",bt(this,bg(this,this.animation.to)),this))},start:this._merge.bind(this,i)}}).then(n=>{if(e.loop&&n.finished&&!(t&&n.noop)){let t=by(e);if(t)return this._update(t,!0)}return n})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(bn(this));let r=!gb.und(e.to),i=!gb.und(e.from);if(r||i){if(!(t.callId>this._lastToId))return n(bn(this));this._lastToId=t.callId}let{key:o,defaultProps:a,animation:s}=this,{to:l,from:u}=s,{to:c=l,from:d=u}=e;i&&!r&&(!t.default||gb.und(c))&&(c=d),t.reverse&&([c,d]=[d,c]);let f=!gx(d,u);f&&(s.from=d),d=g7(d);let h=!gx(c,l);h&&this._focus(c);let p=y0(t.to),{config:m}=s,{decay:v,velocity:g}=m;(r||i)&&(m.velocity=0),t.config&&!p&&function(e,t,n){for(let r in n&&(y5(n={...n},t),t={...n,...t}),y5(e,t),Object.assign(e,t),y4)null==e[r]&&(e[r]=y4[r]);let{frequency:r,damping:i}=e,{mass:o}=e;gb.und(r)||(r<.01&&(r=.01),i<0&&(i=0),e.tension=Math.pow(2*Math.PI/r,2)*o,e.friction=4*Math.PI*i*o/r)}(m,yH(t.config,o),t.config!==a.config?yH(a.config,o):void 0);let y=yO(this);if(!y||gb.und(c))return n(bt(this,!0));let b=gb.und(t.reset)?i&&!t.default:!gb.und(d)&&yU(t.reset,o),x=b?d:this.get(),w=yJ(c),j=gb.num(w)||gb.arr(w)||yb(w),E=!p&&(!j||yU(a.immediate||t.immediate,o));if(h){let e=yz(c);if(e!==y.constructor){if(E)y=this._set(w);else throw Error(`Cannot animate between ${y.constructor.name} and ${e.name}, as the "to" prop suggests`)}}let k=y.constructor,S=g8(c),_=!1;if(!S){let e=b||!bd(this)&&f;(h||e)&&(S=!(_=gx(yJ(x),w))),(gx(s.immediate,E)||E)&&gx(m.decay,v)&&gx(m.velocity,g)||(S=!0)}if(_&&bf(this)&&(s.changed&&!b?S=!0:S||this._stop(l)),!p&&((S||g8(l))&&(s.values=y.getPayload(),s.toValues=g8(c)?null:k==yN?[1]:gE(w)),s.immediate==E||(s.immediate=E,E||b||this._set(l)),S)){let{onRest:e}=s;gw(bw,e=>bj(this,t,e));let r=bt(this,bg(this,l));gS(this._pendingCalls,r),this._pendingCalls.add(n),s.changed&&ge.batchedUpdates(()=>{s.changed=!b,e?.(r,this),b?yH(a.onRest,r):s.onStart?.(r,this)})}b&&this._set(x),p?n(br(t.to,t,this._state,this)):S?this._start():bf(this)&&!h?this._pendingCalls.add(n):n(be(x))}_focus(e){let t=this.animation;e!==t.to&&(g9(this)&&this._detach(),t.to=e,g9(this)&&this._attach())}_attach(){let e=0,{to:t}=this.animation;g8(t)&&(yr(t,this),bs(t)&&(e=t.priority+1)),this.priority=e}_detach(){let{to:e}=this.animation;g8(e)&&yi(e,this)}_set(e,t=!0){let n=g7(e);if(!gb.und(n)){let e=yO(this);if(!e||!gx(n,e.getValue())){let r=yz(n);e&&e.constructor==r?e.setValue(n):yM(this,r.create(n)),e&&ge.batchedUpdates(()=>{this._onChange(n,t)})}}return yO(this)}_onStart(){let e=this.animation;e.changed||(e.changed=!0,bE(this,"onStart",bt(this,bg(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),yH(this.animation.onChange,e,this)),yH(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){let e=this.animation;yO(this).reset(g7(e.to)),e.immediate||(e.fromValues=e.values.map(e=>e.lastPosition)),bf(this)||(bp(this,!0),bh(this)||this._resume())}_resume(){v7.skipAnimation?this.finish():gD.start(this)}_stop(e,t){if(bf(this)){bp(this,!1);let n=this.animation;gw(n.values,e=>{e.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),ye(this,{type:"idle",parent:this});let r=t?bn(this.get()):bt(this.get(),bg(this,e??n.to));gS(this._pendingCalls,r),n.changed&&(n.changed=!1,bE(this,"onRest",r,this))}}};function bg(e,t){let n=yJ(t),r=yJ(e.get());return gx(r,n)}function by(e,t=e.loop,n=e.to){let r=yH(t);if(r){let i=!0!==r&&yX(r),o=(i||e).reverse,a=!i||i.reset;return bb({...e,loop:t,default:!1,pause:void 0,to:!o||y0(n)?n:void 0,from:a?e.from:void 0,reset:a,...i})}}function bb(e){let{to:t,from:n}=e=yX(e),r=new Set;return gb.obj(t)&&bx(t,r),gb.obj(n)&&bx(n,r),e.keys=r.size?Array.from(r):null,e}function bx(e,t){gj(e,(e,n)=>null!=e&&t.add(n))}var bw=["onStart","onRest","onChange","onPause","onResume"];function bj(e,t,n){e.animation[n]=t[n]!==yq(t,n)?yW(t[n],e.key):void 0}function bE(e,t,...n){e.animation[t]?.(...n),e.defaultProps[t]?.(...n)}var bk=["onStart","onChange","onRest"],bS=1,b_=class{constructor(e,t){this.id=bS++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(e=>e.idle&&!e.isDelayed&&!e.isPaused)}get item(){return this._item}set item(e){this._item=e}get(){let e={};return this.each((t,n)=>e[n]=t.get()),e}set(e){for(let t in e){let n=e[t];gb.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(bb(e)),this}start(e){let{queue:t}=this;return(e?t=gE(e).map(bb):this.queue=[],this._flush)?this._flush(this,t):(bN(this,t),bC(this,t))}stop(e,t){if(!!e!==e&&(t=e),t){let n=this.springs;gw(gE(t),t=>n[t].stop(!!e))}else bi(this._state,this._lastAsyncId),this.each(t=>t.stop(!!e));return this}pause(e){if(gb.und(e))this.start({pause:!0});else{let t=this.springs;gw(gE(e),e=>t[e].pause())}return this}resume(e){if(gb.und(e))this.start({pause:!1});else{let t=this.springs;gw(gE(e),e=>t[e].resume())}return this}each(e){gj(this.springs,e)}_onFrame(){let{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,i=this._changed.size>0;(r&&!this._started||i&&!this._started)&&(this._started=!0,gk(e,([e,t])=>{t.value=this.get(),e(t,this,this._item)}));let o=!r&&this._started,a=i||o&&n.size?this.get():null;i&&t.size&&gk(t,([e,t])=>{t.value=a,e(t,this,this._item)}),o&&(this._started=!1,gk(n,([e,t])=>{t.value=a,e(t,this,this._item)}))}eventObserved(e){if("change"==e.type)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else{if("idle"!=e.type)return;this._active.delete(e.parent)}ge.onFrame(this._onFrame)}};function bC(e,t){return Promise.all(t.map(t=>bO(e,t))).then(t=>y9(e,t))}async function bO(e,t,n){let{keys:r,to:i,from:o,loop:a,onRest:s,onResolve:l}=t,u=gb.obj(t.default)&&t.default;a&&(t.loop=!1),!1===i&&(t.to=null),!1===o&&(t.from=null);let c=gb.arr(i)||gb.fun(i)?i:void 0;c?(t.to=void 0,t.onRest=void 0,u&&(u.onRest=void 0)):gw(bk,n=>{let r=t[n];if(gb.fun(r)){let i=e._events[n];t[n]=({finished:e,cancelled:t})=>{let n=i.get(r);n?(e||(n.finished=!1),t&&(n.cancelled=!0)):i.set(r,{value:null,finished:e||!1,cancelled:t||!1})},u&&(u[n]=t[n])}});let d=e._state;!d.paused===t.pause?(d.paused=t.pause,gS(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);let f=(r||Object.keys(e.springs)).map(n=>e.springs[n].start(t)),h=!0===t.cancel||!0===yq(t,"cancel");(c||h&&d.asyncId)&&f.push(y7(++e._lastAsyncId,{props:t,state:d,actions:{pause:gg,resume:gg,start(t,n){h?(bi(d,e._lastAsyncId),n(bn(e))):(t.onRest=s,n(br(c,t,d,e)))}}})),d.paused&&await new Promise(e=>{d.resumeQueue.add(e)});let p=y9(e,await Promise.all(f));if(a&&p.finished&&!(n&&p.noop)){let n=by(t,a,i);if(n)return bN(e,[n]),bO(e,n,!0)}return l&&ge.batchedUpdates(()=>l(p,e,e.item)),p}function bM(e,t){let n={...e.springs};return t&&gw(gE(t),e=>{gb.und(e.keys)&&(e=bb(e)),gb.obj(e.to)||(e={...e,to:void 0}),bP(n,e,e=>bA(e))}),bT(e,n),n}function bT(e,t){gj(t,(t,n)=>{e.springs[n]||(e.springs[n]=t,yr(t,e))})}function bA(e,t){let n=new bv;return n.key=e,t&&yr(n,t),n}function bP(e,t,n){t.keys&&gw(t.keys,r=>{let i=e[r]||(e[r]=n(r));i._prepareNode(t)})}function bN(e,t){gw(t,t=>{bP(e.springs,t,t=>bA(t,e))})}var bR=({children:e,...t})=>{let n=(0,b.useContext)(bD),r=t.pause||!!n.pause,i=t.immediate||!!n.immediate;t=function(e,t){let[n]=(0,b.useState)(()=>({inputs:t,result:e()})),r=(0,b.useRef)(),i=r.current,o=i;if(o){let n=!!(t&&o.inputs&&function(e,t){if(e.length!==t.length)return!1;for(let n=0;n{r.current=o,i==n&&(n.inputs=n.result=void 0)},[o]),o.result}(()=>({pause:r,immediate:i}),[r,i]);let{Provider:o}=bD;return b.createElement(o,{value:t},e)},bD=(Object.assign(bR,b.createContext({})),bR.Provider._context=bR,bR.Consumer._context=bR,bR);bR.Provider=bD.Provider,bR.Consumer=bD.Consumer;var bL=()=>{let e=[],t=function(t){yy(`${ym}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`);let r=[];return gw(e,(e,i)=>{if(gb.und(t))r.push(e.start());else{let o=n(t,e,i);o&&r.push(e.start(o))}}),r};t.current=e,t.add=function(t){e.includes(t)||e.push(t)},t.delete=function(t){let n=e.indexOf(t);~n&&e.splice(n,1)},t.pause=function(){return gw(e,e=>e.pause(...arguments)),this},t.resume=function(){return gw(e,e=>e.resume(...arguments)),this},t.set=function(t){gw(e,(e,n)=>{let r=gb.fun(t)?t(n,e):t;r&&e.set(r)})},t.start=function(t){let n=[];return gw(e,(e,r)=>{if(gb.und(t))n.push(e.start());else{let i=this._getProps(t,e,r);i&&n.push(e.start(i))}}),n},t.stop=function(){return gw(e,e=>e.stop(...arguments)),this},t.update=function(t){return gw(e,(e,n)=>e.update(this._getProps(t,e,n))),this};let n=function(e,t,n){return gb.fun(e)?e(n,t):e};return t._getProps=n,t};function bF(e,t){let n=gb.fun(e),[[r],i]=function(e,t,n){let r=gb.fun(t)&&t;r&&!n&&(n=[]);let i=(0,b.useMemo)(()=>r||3==arguments.length?bL():void 0,[]),o=(0,b.useRef)(0),a=yj(),s=(0,b.useMemo)(()=>({ctrls:[],queue:[],flush(e,t){let n=bM(e,t),r=o.current>0&&!s.queue.length&&!Object.keys(n).some(t=>!e.springs[t]);return r?bC(e,t):new Promise(r=>{bT(e,n),s.queue.push(()=>{r(bC(e,t))}),a()})}}),[]),l=(0,b.useRef)([...s.ctrls]),u=[],c=yS(e)||0;function d(e,n){for(let i=e;i{gw(l.current.slice(e,c),e=>{y1(e,i),e.stop(!0)}),l.current.length=e,d(c,e)},[e]),(0,b.useMemo)(()=>{d(0,Math.min(c,e))},n);let f=l.current.map((e,t)=>bM(e,u[t])),h=(0,b.useContext)(bR),p=yS(h),m=h!==p&&yQ(h);yx(()=>{o.current++,s.ctrls=l.current;let{queue:e}=s;e.length&&(s.queue=[],gw(e,e=>e())),gw(l.current,(e,t)=>{i?.add(e),m&&e.start({default:h});let n=u[t];n&&(y2(e,n.ref),e.ref?e.queue.push(n):e.start(n))})}),yE(()=>()=>{gw(s.ctrls,e=>e.stop(!0))});let v=f.map(e=>({...e}));return i?[v,i]:v}(1,n?e:[e],n?t||[]:t);return n||2==arguments.length?[r,i]:r}function bz(e,t,n){let r=gb.fun(t)&&t,{reset:i,sort:o,trail:a=0,expires:s=!0,exitBeforeEnter:l=!1,onDestroyed:u,ref:c,config:d}=r?r():t,f=(0,b.useMemo)(()=>r||3==arguments.length?bL():void 0,[]),h=gE(e),p=[],m=(0,b.useRef)(null),v=i?null:m.current;yx(()=>{m.current=p}),yE(()=>(gw(p,e=>{f?.add(e.ctrl),e.ctrl.ref=f}),()=>{gw(m.current,e=>{e.expired&&clearTimeout(e.expirationId),y1(e.ctrl,f),e.ctrl.stop(!0)})}));let g=function(e,{key:t,keys:n=t},r){if(null===n){let t=new Set;return e.map(e=>{let n=r&&r.find(n=>n.item===e&&"leave"!==n.phase&&!t.has(n));return n?(t.add(n),n.key):bV++})}return gb.und(n)?e:gb.fun(n)?e.map(n):gE(n)}(h,r?r():t,v),y=i&&m.current||[];yx(()=>gw(y,({ctrl:e,item:t,key:n})=>{y1(e,f),yH(u,t,n)}));let x=[];if(v&&gw(v,(e,t)=>{e.expired?(clearTimeout(e.expirationId),y.push(e)):~(t=x[t]=g.indexOf(e.key))&&(p[t]=e)}),gw(h,(e,t)=>{p[t]||(p[t]={key:g[t],item:e,phase:"mount",ctrl:new b_},p[t].ctrl.item=e)}),x.length){let e=-1,{leave:n}=r?r():t;gw(x,(t,r)=>{let i=v[r];~t?(e=p.indexOf(i),p[e]={...i,item:h[t]}):n&&p.splice(++e,0,i)})}gb.fun(o)&&p.sort((e,t)=>o(e.item,t.item));let w=-a,j=yj(),E=yK(t),k=new Map,S=(0,b.useRef)(new Map),_=(0,b.useRef)(!1);gw(p,(e,n)=>{let i,o;let u=e.key,f=e.phase,h=r?r():t,p=yH(h.delay||0,u);if("mount"==f)i=h.enter,o="enter";else{let e=0>g.indexOf(u);if("leave"!=f){if(e)i=h.leave,o="leave";else{if(!(i=h.update))return;o="update"}}else{if(e)return;i=h.enter,o="enter"}}if(i=yH(i,e.item,n),!(i=gb.obj(i)?yX(i):{to:i}).config){let t=d||E.config;i.config=yH(t,e.item,n,o)}w+=a;let y={...E,delay:p+w,ref:c,immediate:h.immediate,reset:!1,...i};if("enter"==o&&gb.und(y.from)){let i=r?r():t,o=gb.und(i.initial)||v?i.from:i.initial;y.from=yH(o,e.item,n)}let{onResolve:b}=y;y.onResolve=e=>{yH(b,e);let t=m.current,n=t.find(e=>e.key===u);if(n){if(e.cancelled&&"update"!=n.phase)return;if(n.ctrl.idle){let e=t.every(e=>e.ctrl.idle);if("leave"==n.phase){let t=yH(s,n.item);if(!1!==t){let r=!0===t?0:t;if(n.expired=!0,!e&&r>0){r<=2147483647&&(n.expirationId=setTimeout(j,r));return}}}e&&t.some(e=>e.expired)&&(S.current.delete(n),l&&(_.current=!0),j())}}};let x=bM(e.ctrl,y);"leave"===o&&l?S.current.set(e,{phase:o,springs:x,payload:y}):k.set(e,{phase:o,springs:x,payload:y})});let C=(0,b.useContext)(bR),O=yS(C),M=C!==O&&yQ(C);yx(()=>{M&&gw(p,e=>{e.ctrl.start({default:C})})},[C]),gw(k,(e,t)=>{if(S.current.size){let e=p.findIndex(e=>e.key===t.key);p.splice(e,1)}}),yx(()=>{gw(S.current.size?S.current:k,({phase:e,payload:t},n)=>{let{ctrl:r}=n;n.phase=e,f?.add(r),M&&"enter"==e&&r.start({default:C}),t&&(y2(r,t.ref),(r.ref||f)&&!_.current?r.update(t):(r.start(t),_.current&&(_.current=!1)))})},i?void 0:n);let T=e=>b.createElement(b.Fragment,null,p.map((t,n)=>{let{springs:r}=k.get(t)||t.ctrl,i=e({...r},t.item,t,n);return i&&i.type?b.createElement(i.type,{...i.props,key:gb.str(t.key)||gb.num(t.key)?t.key:t.ctrl.id,ref:i.ref}):i}));return f?[T,f]:T}var bV=1,bI=class extends bu{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=g3(...t);let n=this._get(),r=yz(n);yM(this,r.create(n))}advance(e){let t=this._get(),n=this.get();gx(t,n)||(yO(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&bB(this._active)&&bH(this)}_get(){let e=gb.arr(this.source)?this.source.map(g7):gE(g7(this.source));return this.calc(...e)}_start(){this.idle&&!bB(this._active)&&(this.idle=!1,gw(yT(this),e=>{e.done=!1}),v7.skipAnimation?(ge.batchedUpdates(()=>this.advance()),bH(this)):gD.start(this))}_attach(){let e=1;gw(gE(this.source),t=>{g8(t)&&yr(t,this),bs(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){gw(gE(this.source),e=>{g8(e)&&yi(e,this)}),this._active.clear(),bH(this)}eventObserved(e){"change"==e.type?e.idle?this.advance():(this._active.add(e.parent),this._start()):"idle"==e.type?this._active.delete(e.parent):"priority"==e.type&&(this.priority=gE(this.source).reduce((e,t)=>Math.max(e,(bs(t)?t.priority:0)+1),0))}};function bZ(e){return!1!==e.idle}function bB(e){return!e.size||Array.from(e).every(bZ)}function bH(e){e.idle||(e.idle=!0,gw(yT(e),e=>{e.done=!0}),ye(e,{type:"idle",parent:e}))}var bU=(e,...t)=>new bI(e,t);v7.assign({createStringInterpolator:yp,to:(e,t)=>new bI(e,t)}),gD.advance;var bW=/^--/,bq={},b$={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},bK=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),bY=["Webkit","Ms","Moz","O"];b$=Object.keys(b$).reduce((e,t)=>(bY.forEach(n=>e[bK(n,t)]=e[t]),e),b$);var bG=/^(matrix|translate|scale|rotate|skew)/,bX=/^(translate)/,bJ=/^(rotate|skew)/,bQ=(e,t)=>gb.num(e)&&0!==e?e+t:e,b0=(e,t)=>gb.arr(e)?e.every(e=>b0(e,t)):gb.num(e)?e===t:parseFloat(e)===t,b1=class extends yD{constructor({x:e,y:t,z:n,...r}){let i=[],o=[];(e||t||n)&&(i.push([e||0,t||0,n||0]),o.push(e=>[`translate3d(${e.map(e=>bQ(e,"px")).join(",")})`,b0(e,0)])),gj(r,(e,t)=>{if("transform"===t)i.push([e||""]),o.push(e=>[e,""===e]);else if(bG.test(t)){if(delete r[t],gb.und(e))return;let n=bX.test(t)?"px":bJ.test(t)?"deg":"";i.push(gE(e)),o.push("rotate3d"===t?([e,t,r,i])=>[`rotate3d(${e},${t},${r},${bQ(i,n)})`,b0(i,0)]:e=>[`${t}(${e.map(e=>bQ(e,n)).join(",")})`,b0(e,t.startsWith("scale")?1:0)])}}),i.length&&(r.transform=new b2(i,o)),super(r)}},b2=class extends yt{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return gw(this.inputs,(n,r)=>{let i=g7(n[0]),[o,a]=this.transforms[r](gb.arr(i)?i:n.map(g7));e+=" "+o,t=t&&a}),t?"none":e}observerAdded(e){1==e&&gw(this.inputs,e=>gw(e,e=>g8(e)&&yr(e,this)))}observerRemoved(e){0==e&&gw(this.inputs,e=>gw(e,e=>g8(e)&&yi(e,this)))}eventObserved(e){"change"==e.type&&(this._value=null),ye(this,e)}};v7.assign({batchedUpdates:to.unstable_batchedUpdates,createStringInterpolator:yp,colors:{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}});var b4=((e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=e=>new yD(e),getComponentProps:r=e=>e}={})=>{let i={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},o=e=>{let t=yB(e)||"Anonymous";return(e=gb.str(e)?o[e]||(o[e]=yV(e,i)):e[yZ]||(e[yZ]=yV(e,i))).displayName=`Animated(${t})`,e};return gj(e,(t,n)=>{gb.arr(e)&&(n=yB(t)),o[n]=o(t)}),{animated:o}})(["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"],{applyAnimatedValues:function(e,t){if(!e.nodeType||!e.setAttribute)return!1;let n="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName,{style:r,children:i,scrollTop:o,scrollLeft:a,viewBox:s,...l}=t,u=Object.values(l),c=Object.keys(l).map(t=>n||e.hasAttribute(t)?t:bq[t]||(bq[t]=t.replace(/([A-Z])/g,e=>"-"+e.toLowerCase())));for(let t in void 0!==i&&(e.textContent=i),r)if(r.hasOwnProperty(t)){var d;let n=null==(d=r[t])||"boolean"==typeof d||""===d?"":"number"!=typeof d||0===d||bW.test(t)||b$.hasOwnProperty(t)&&b$[t]?(""+d).trim():d+"px";bW.test(t)?e.style.setProperty(t,n):e.style[t]=n}c.forEach((t,n)=>{e.setAttribute(t,u[n])}),void 0!==o&&(e.scrollTop=o),void 0!==a&&(e.scrollLeft=a),void 0!==s&&e.setAttribute("viewBox",s)},createAnimatedStyle:e=>new b1(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}).animated,b3=n(23442),b5=(0,b.createContext)({});function b6(e){var t=e.x,n=e.y,r=e.dx,i=e.dy,o=e.children,a=(0,b.useMemo)(function(){return{x:t,y:n,dx:r,dy:i}},[t,n,r,i]);return b.createElement(b5.Provider,{value:a},o)}function b8(){return(b8=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,xr),p=(0,b.useContext)(xe)||{},m=p.innerHeight,v=p.innerWidth,g=p.margin,y=p.xScale,x=p.yScale,w=p.dataRegistry,j=(0,b.useMemo)(function(){return y?xt(y):0},[y]),E=(0,b.useMemo)(function(){return x?xt(x):0},[x]);if((!s||!l)&&!a)return console.warn("[@visx/xychart/BaseAnnotation]: dataKey or x/yAccessors must be specified."),null;var k=s&&l||null==a?null:null==w?void 0:w.get(a),S=s||(null==k?void 0:k.xAccessor),_=l||(null==k?void 0:k.yAccessor);if(!y||!x||!v||!m||!S||!_||!g)return null;var C=(null!=(t=(0,p4.Z)(y(S(o))))?t:NaN)+j/2,O=(null!=(n=(0,p4.Z)(x(_(o))))?n:NaN)+E/2,M=C+c+16>g.left+v?-c:c,T=O+f+16>g.top+m?-f:f;return xn(C)&&xn(O)?b.createElement(r,xi({width:v,height:m},h,{x:C,y:O,dx:M,dy:T}),i):null}xo.propTypes={dataKey:pG().string,xAccessor:pG().func,yAccessor:pG().func};var xa=["x","y","AnnotationComponent"],xs=["editable"];function xl(){return(xl=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function xc(e){var t=e.x,n=void 0===t?0:t,r=e.y,i=void 0===r?0:r,o=e.AnnotationComponent,a=xu(e,xa),s=(0,b.useRef)({x:n,y:i}),l=bF({from:{x:s.current.x-n,y:s.current.y-i},to:{x:0,y:0},reset:!0});return(0,b.useEffect)(function(){s.current={x:n,y:i}},[n,i]),b.createElement(b4.g,{transform:bU([l.x,l.y],function(e,t){return"translate("+e+", "+t+")"})},b.createElement(o,xl({x:n,y:i},a)))}function xd(e){var t=e.editable,n=xu(e,xs),r=(0,b.useCallback)(function(e){return b.createElement(xc,xl({AnnotationComponent:t?b9:b6},e))},[t]);return b.createElement(xo,xl({AnnotationComponent:r},n))}xd.propTypes={editable:pG().bool};var xf=n(12766),xh=n(54073),xp=n.n(xh),xm=["d","stroke","fill"];function xv(){return(xv=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,xm),o=(0,b.useRef)(t),a=(0,b.useCallback)(xp()(function(e){o.current=e},50),[]),s=(0,xf.interpolatePath)(o.current,t);a(t);var l=bF({from:{t:0},to:{t:1},reset:!0,delay:0}).t,u=bF({stroke:void 0===n?"transparent":n,fill:void 0===r?"transparent":r});return b.createElement(b4.path,xv({className:"visx-path",d:l.to(s),stroke:u.stroke,fill:u.fill},i))}var xy=n(12935),xb=n(12151);function xx(){return(xx=Object.assign?Object.assign.bind():function(e){for(var t=1;tt?1:e>=t?0:NaN}function xA(e){let t=e,n=e;function r(e,t,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r>>1;0>n(e[o],t)?r=o+1:i=o}return r}return 1===e.length&&(t=(t,n)=>e(t)-n,n=(t,n)=>xT(e(t),n)),{left:r,center:function(e,n,i,o){null==i&&(i=0),null==o&&(o=e.length);let a=r(e,n,i,o-1);return a>i&&t(e[a-1],n)>-t(e[a],n)?a-1:a},right:function(e,t,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r>>1;n(e[o],t)>0?i=o:r=o+1}return r}}}let xP=xA(xT);xP.right;let xN=xP.left;function xR(e){var t,n,r=e.scale,i=e.accessor,o=e.scaledValue,a=e.data;if("invert"in r&&"function"==typeof r.invert){var s=xA(i).left,l=Number(r.invert(o)),u=s(a,l),c=a[u-1],d=a[u];n=(t=!c||Math.abs(l-i(c))>Math.abs(l-i(d))?d:c)===c?u-1:u}else{if(!("step"in r)||void 0===r.step)return console.warn("[visx/xychart/findNearestDatum] encountered incompatible scale type, bailing"),null;var f=r.domain(),h=r.range().map(Number),p=[].concat(h).sort(function(e,t){return e-t}),m=xN(function(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((t-e)/n)),o=Array(i);++r=0||(i[n]=e[n]);return i}(e,xq),C=(0,b.useContext)(xe),O=C.colorScale,M=C.theme,T=C.horizontal,A=(0,b.useMemo)(function(){return w?xj(j,w):void 0},[j,w]),P=(0,b.useMemo)(function(){return xj(j,x)},[j,x]),N=(0,b.useMemo)(function(){return k?xj(S,k):void 0},[S,k]),R=(0,b.useMemo)(function(){return xj(S,E)},[S,E]),D=(0,b.useCallback)(function(e){return xn(j(x(e)))&&xn(S(E(e)))},[j,x,S,E]),L=null!=(t=null!=(n=null==O?void 0:O(l))?n:null==M?void 0:null==(r=M.colors)?void 0:r[0])?t:"#222",F="AREASERIES_EVENT_SOURCE-"+l,z=xZ({dataKey:l,enableEvents:void 0===v||v,onBlur:c,onFocus:d,onPointerMove:f,onPointerOut:h,onPointerUp:p,onPointerDown:m,source:F,allowedSources:[xk,F]}),V=(0,b.useMemo)(function(){var e=xE(T?j:S);return T?{x0:null!=A?A:e,x1:P,y:R}:{x:P,y0:null!=N?N:e,y1:R}},[j,S,T,P,R,A,N]),I=!!(d||c),Z=(0,b.useCallback)(function(e){var t=e.glyphs;return I?t.map(function(e){return b.createElement(b.Fragment,{key:e.key},xW(x$({},e,{color:"transparent",onFocus:z.onFocus,onBlur:z.onBlur})))}):null},[I,z.onFocus,z.onBlur]);return b.createElement(b.Fragment,null,b.createElement(xy.Z,x$({},V,_,{curve:a,defined:D}),function(e){var t=e.path;return b.createElement(o,x$({className:"visx-area",stroke:"transparent",fill:L,strokeLinecap:"round"},_,{d:t(s)||""},z))}),y&&b.createElement(xb.Z,x$({x:P,y:R,defined:D,curve:a},u),function(e){var t=e.path;return b.createElement(o,x$({className:"visx-line",fill:"transparent",stroke:L,strokeWidth:2,pointerEvents:"none",strokeLinecap:"round"},u,{d:t(s)||""}))}),I&&b.createElement(xH,{dataKey:l,data:s,xAccessor:x,yAccessor:E,xScale:j,yScale:S,renderGlyphs:Z}))}xK.propTypes={renderLine:pG().bool};var xY=xw(xK);function xG(){return(xG=Object.assign?Object.assign.bind():function(e){for(var t=1;t1)for(var n,r,i,o=1,a=e[t[0]],s=a.length;o=0;)n[t]=t;return n}function x4(e,t){return e[t]}function x3(e){let t=[];return t.key=e,t}Array.prototype.slice;var x5=n(74322),x6=n(58543);function x8(e,t){let n,r;if(void 0===t)for(let t of e)null!=t&&(void 0===n?t>=t&&(n=r=t):(n>t&&(n=t),r=o&&(n=r=o):(n>o&&(n=o),r=0?"positiveSum":"negativeSum"]+=i})}}),Object.values(e)},[o,l]),d=(0,b.useMemo)(function(){var e=r?null:c.some(function(e){return e.negativeSum<0}),t=function(){var e=x0([]),t=x2,n=x1,r=x4;function i(i){var o,a,s,l=Array.from(e.apply(this,arguments),x3),u=l.length,c=-1;for(let e of i)for(a=0,++c;a0&&0===r&&(o?i.xScale=function(e){return e.domain(x8(e.domain().concat(f)))}:i.yScale=function(e){return e.domain(x8(e.domain().concat(f)))}),i}).filter(function(e){return e}))),function(){return s(u)}},[u,f,o,d,a,s,l]),{seriesChildren:l,dataKeys:u,stackedData:d}}function wr(e,t,n){var r,i,o,a,s=e.xScale,l=e.yScale,u=e.point,c=(n?xL:xD)(e),d=(null==c?void 0:c.index)==null?null:t[c.index];return c&&d&&u?{index:c.index,datum:d,distanceX:n&&u.x>=(null!=(r=s((0,xQ.l8)(c.datum)))?r:1/0)&&u.x<=(null!=(i=s((0,xQ.xf)(c.datum)))?i:-1/0)?0:c.distanceX,distanceY:n?c.distanceY:u.y<=(null!=(o=l((0,xQ.l8)(c.datum)))?o:-1/0)&&u.y>=(null!=(a=l((0,xQ.xf)(c.datum)))?a:1/0)?0:c.distanceY}:null}var wi=["data","dataKey","xAccessor","yAccessor","curve","PathComponent","lineProps","renderLine"];function wo(){return(wo=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(a,wi)),u=wo({fill:null!=(n=null!=(r=null==g?void 0:g(e.key))?r:null==E?void 0:null==(i=E.colors)?void 0:i[0])?n:"#222"},l);return{key:t+"-"+e.key,accessors:O,data:e,areaProps:u,lineProps:s}})},[C,O,g,_,E]),T=(0,b.useCallback)(function(e){var t,n,r=null==(t=_.find(function(t){return t.props.dataKey===e.dataKey}))?void 0:null==(n=t.props)?void 0:n.data;return r?wr(e,r,x):null},[_,x]),A="AREASTACK_EVENT_SOURCE-"+S.join("-"),P=xZ({dataKey:S,enableEvents:void 0===o||o,findNearestDatum:T,onBlur:s,onFocus:l,onPointerMove:u,onPointerOut:c,onPointerUp:d,onPointerDown:f,source:A,allowedSources:[xk,A]}),N=!!(l||s),R=(0,b.useCallback)(function(e){var t=e.glyphs;return N?t.map(function(e){return b.createElement(b.Fragment,{key:e.key},xW(wo({},e,{color:"transparent",onFocus:P.onFocus,onBlur:P.onBlur})))}):null},[N,P.onFocus,P.onBlur]);return!S.some(function(e){return null==y.get(e)})&&w&&j&&g?b.createElement("g",{className:"visx-area-stack"},M.map(function(e){return b.createElement(xy.Z,wo({key:e.key,curve:i},e.accessors),function(t){var r=t.path;return b.createElement(n,wo({className:"visx-area",stroke:"transparent",d:r(e.data)||""},e.areaProps,P))})}),m&&M.map(function(e){return b.createElement(xJ.Z,wo({key:"line-"+e.key,x:e.accessors.x||e.accessors.x1,y:e.accessors.y||e.accessors.y1,defined:e.accessors.defined,curve:i},e.lineProps),function(t){var r=t.path;return b.createElement(n,wo({className:"visx-line",fill:"transparent",stroke:e.areaProps.fill,strokeWidth:2,pointerEvents:"none"},e.lineProps,{d:r(e.data)||""}))})}),N&&M.map(function(e,t){var n=M[M.length-t-1];return b.createElement(xH,{key:"glyphs-"+n.key,dataKey:n.key,data:n.data,xAccessor:n.accessors.x||n.accessors.x1,yAccessor:n.accessors.y||n.accessors.y1,xScale:wa,yScale:wa,renderGlyphs:R})})):null}function wl(){return(wl=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,wd),c=(0,b.useContext)(xe),d=c.theme,f=c.xScale,h=c.yScale,p=c.margin,m=c.width,v=c.height,g=u.orientation,y=(0,b.useMemo)(function(){var e,t,n,r;return"left"===g||"right"===g?null==d?void 0:null==(e=d.axisStyles)?void 0:null==(t=e.y)?void 0:t[g]:null==d?void 0:null==(n=d.axisStyles)?void 0:null==(r=n.x)?void 0:r[g]},[d,g]),x=u.tickLabelProps,w=(0,b.useMemo)(function(){return x||y?function(e,t,n){return wf({},null==y?void 0:y.tickLabel,{width:"left"===g||"right"===g?null==p?void 0:p[g]:void 0},null==x?void 0:x(e,t,n))}:void 0},[x,y,g,p]),j="bottom"===g?(null!=v?v:0)-(null!=(t=null==p?void 0:p.bottom)?t:0):"top"===g&&null!=(n=null==p?void 0:p.top)?n:0,E="left"===g?null!=(r=null==p?void 0:p.left)?r:0:"right"===g?(null!=m?m:0)-(null!=(i=null==p?void 0:p.right)?i:0):0,k="left"===g||"right"===g?h:f;return k?b.createElement(l,wf({top:j,left:E,labelProps:null==y?void 0:y.axisLabel,stroke:null==y?void 0:null==(o=y.axisLine)?void 0:o.stroke,strokeWidth:null==y?void 0:null==(a=y.axisLine)?void 0:a.strokeWidth,tickLength:null==y?void 0:y.tickLength,tickStroke:null==y?void 0:null==(s=y.tickLine)?void 0:s.stroke},u,{tickLabelProps:w,scale:k})):null}function wp(){return(wp=Object.assign?Object.assign.bind():function(e){for(var t=1;t=h&&l.y<=p;return wg({},u,{distanceX:0,distanceY:m?0:Math.abs(l.y-(h+p)/2)})}var v=a(i(u.datum)),g=(null!=v?v:1/0)+(null!=c?c:1/0),y=g+d,b=l.x>=g&&l.x<=y;return wg({},u,{distanceY:0,distanceX:b?0:Math.abs(l.x-(g+y)/2)})}(e,k,v)},[k,v]),_="BARGROUP_EVENT_SOURCE-"+E.join("-")+"}",C=xZ({dataKey:E,enableEvents:void 0===f||f,findNearestDatum:S,onBlur:a,onFocus:s,onPointerMove:l,onPointerOut:u,onPointerUp:c,onPointerDown:d,source:_,allowedSources:[xk,_]}),O=(0,b.useMemo)(function(){return x?xE(x):0},[x]),M=(0,b.useMemo)(function(){return w?xE(w):0},[w]),T=E.map(function(e){return m.get(e)});if(T.some(function(e){return null==e})||!x||!w||!p)return null;var A=xt(k),P=T.map(function(e){var t,n=e.xAccessor,r=e.yAccessor,i=e.data,o=e.key,a=function(e){var t,i;return v?(null!=(t=x(n(e)))?t:NaN)-O:(null!=(i=w(r(e)))?i:NaN)-M},s=v?function(e){var t;return null!=(t=w(r(e)))?t:NaN}:function(e){var t;return null!=(t=x(n(e)))?t:NaN},l=null!=(t=k(o))?t:0,u=v?function(e){return O+Math.min(0,a(e))}:function(e){return s(e)+l},c=v?function(e){return s(e)+l}:function(e){return M+Math.min(0,a(e))},d=v?function(e){return Math.abs(a(e))}:function(){return A},f=v?function(){return A}:function(e){return Math.abs(a(e))},h=j.find(function(e){return e.props.dataKey===o}),m=(null==h?void 0:h.props)||{},g=m.colorAccessor;return{key:o,radius:m.radius,radiusAll:m.radiusAll,radiusBottom:m.radiusBottom,radiusLeft:m.radiusLeft,radiusRight:m.radiusRight,radiusTop:m.radiusTop,bars:i.map(function(e,t){var n,r=u(e);if(!xn(r))return null;var i=c(e);if(!xn(i))return null;var a=d(e);if(!xn(a))return null;var s=f(e);return xn(s)?{key:o+"-"+t,x:r,y:i,width:a,height:s,fill:null!=(n=null==g?void 0:g(e,t))?n:p(o)}:null}).filter(function(e){return e})}});return b.createElement("g",{className:"visx-bar-group"},P.map(function(e){return e&&b.createElement(o,wy({horizontal:v,xScale:x,yScale:w},e,C,{key:e.key}))}))}wb.propTypes={children:pG().node.isRequired,padding:pG().number,sortBars:pG().func};var wx=n(10897),ww=function(e){return!!(null==e?void 0:e.includes("url("))},wj=function(e){return ww(e)?"rgba(0,0,0,0.1)":e},wE=["bars","xScale","yScale","horizontal","radius","radiusAll","radiusTop","radiusRight","radiusBottom","radiusLeft"],wk=["bars","xScale","yScale","horizontal","radius","radiusAll","radiusTop","radiusRight","radiusBottom","radiusLeft"];function wS(){return(wS=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function wC(e){return{x:e.x,y:e.y,width:e.width,height:e.height,fill:wj(e.fill),opacity:1}}function wO(e){var t=e.bars,n=(e.xScale,e.yScale,e.horizontal,e.radius),r=e.radiusAll,i=e.radiusTop,o=e.radiusRight,a=e.radiusBottom,s=e.radiusLeft,l=w_(e,wE);return b.createElement(b.Fragment,null,t.map(function(e){var t=e.key,u=e.fill,c=e.x,d=e.y,f=e.width,h=e.height;return b.createElement(wx.Z,{key:t,x:c,y:d,width:f,height:h,radius:n,all:r,top:i,right:o,bottom:a,left:s},function(e){var t=e.path;return b.createElement(xg,wS({className:"visx-bar visx-bar-rounded",d:t,fill:u},l))})}))}function wM(e){var t,n,r,i=e.bars,o=e.xScale,a=e.yScale,s=e.horizontal,l=(e.radius,e.radiusAll,e.radiusTop,e.radiusRight,e.radiusBottom,e.radiusLeft,w_(e,wk)),u=bz(i,wS({},(n=(t={horizontal:s,scale:s?o:a}).scale,r=!!t.horizontal,(0,b.useMemo)(function(){var e=xE(n);function t(t){var n=t.x,i=t.y,o=t.width,a=t.height;return{x:r?null!=e?e:0:n,y:r?i:null!=e?e:0,width:r?0:o,height:r?a:0,fill:wj(t.fill),opacity:0}}return{unique:!0,from:t,leave:t,enter:wC,update:wC,keys:function(e){return e.key}}},[n,r])))),c=!!(l.onFocus||l.onBlur);return b.createElement(b.Fragment,null,u(function(e,t,n){var r=e.x,i=e.y,o=e.width,a=e.height,s=e.fill,u=e.opacity,d=n.key;return null==t||null==d?null:b.createElement(b4.rect,wS({key:d,tabIndex:c?0:void 0,className:"visx-bar",x:r,y:i,width:o,height:a,fill:ww(t.fill)?t.fill:s,opacity:u},l))}))}function wT(e){return null==e.radius?b.createElement(wM,e):b.createElement(wO,wS({},e,{radius:e.radius}))}function wA(){return(wA=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,wN),j=(0,b.useContext)(xe),E=j.colorScale,k=j.horizontal,S=j.theme,_=j.innerWidth,C=j.innerHeight,O=(0,b.useMemo)(function(){return xj(g,v)},[g,v]),M=(0,b.useMemo)(function(){return xj(x,y)},[x,y]),T=xt(k?x:g)||(k?void 0===C?0:C:void 0===_?0:_)/s.length*(1-Math.min(1,Math.max(0,void 0===o?.1:o))),A=(0,b.useMemo)(function(){return g?xE(g):0},[g]),P=(0,b.useMemo)(function(){return x?xE(x):0},[x]),N=null!=(t=null!=(n=null==E?void 0:E(l))?n:null==S?void 0:null==(r=S.colors)?void 0:r[0])?t:"#222",R=(0,b.useMemo)(function(){var e=k?0:-T/2,t=k?-T/2:0;return s.map(function(n,r){var i,o=O(n)+e;if(!xn(o))return null;var s=M(n)+t;if(!xn(s))return null;var l=k?o-A:s-P;return xn(l)?{key:""+r,x:k?A+Math.min(0,l):o,y:k?s:P+Math.min(0,l),width:k?Math.abs(l):T,height:k?T:Math.abs(l),fill:null!=(i=null==a?void 0:a(n,r))?i:N}:null}).filter(function(e){return e})},[T,N,a,s,O,M,k,A,P]),D="BARSERIES_EVENT_SOURCE-"+l,L=xZ({dataKey:l,enableEvents:void 0===m||m,onBlur:u,onFocus:c,onPointerMove:d,onPointerOut:f,onPointerUp:h,onPointerDown:p,source:D,allowedSources:[xk,D]});return b.createElement("g",{className:"vx-bar-series"},b.createElement(i,wR({bars:R,horizontal:k,xScale:g,yScale:x},L,w)))}wD.propTypes={barPadding:pG().number,colorAccessor:pG().func};var wL=xw(wD),wF=["colorAccessor"];function wz(){return(wz=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,wF);return b.createElement(wL,wz({},n,{colorAccessor:t,BarsComponent:wT}))}var wI=n(15590);function wZ(){return(wZ=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,w$),i=(0,b.useCallback)(function(e){return b.createElement(wq,wK({},e,{renderGlyph:n}))},[n]);return b.createElement(xU,wK({},r,{renderGlyphs:i}))}var wG=n(93353),wX=n(63962),wJ=["rows","columns","GridRowsComponent","GridColumnsComponent"];function wQ(){return(wQ=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,wJ),l=(0,b.useContext)(xe),u=l.theme,c=l.xScale,d=l.yScale,f=l.margin,h=l.innerWidth,p=l.innerHeight,m=null==u?void 0:u.gridStyles;return b.createElement(b.Fragment,null,n&&d&&null!=h&&b.createElement(o,wQ({left:null==f?void 0:f.left,lineStyle:m,width:h,scale:d},s)),i&&c&&null!=p&&b.createElement(a,wQ({top:null==f?void 0:f.top,lineStyle:m,height:p,scale:c},s)))}w0.propTypes={rows:pG().bool,columns:pG().bool};var w1=["animationTrajectory"];function w2(){return(w2=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,w1),r=(0,b.useMemo)(function(){return function(e){return b.createElement(wG.Z,w2({},e,{animationTrajectory:t}))}},[t]),i=(0,b.useMemo)(function(){return function(e){return b.createElement(wX.Z,w2({},e,{animationTrajectory:t}))}},[t]);return b.createElement(w0,w2({GridRowsComponent:r,GridColumnsComponent:i},n))}var w3=["colorAccessor","curve","data","dataKey","onBlur","onFocus","onPointerMove","onPointerOut","onPointerUp","onPointerDown","enableEvents","xAccessor","xScale","yAccessor","yScale","PathComponent"];function w5(){return(w5=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,w3),E=(0,b.useContext)(xe),k=E.colorScale,S=E.theme,_=(0,b.useMemo)(function(){return xj(v,m)},[v,m]),C=(0,b.useMemo)(function(){return xj(y,g)},[y,g]),O=(0,b.useCallback)(function(e){return xn(v(m(e)))&&xn(y(g(e)))},[v,m,y,g]),M=null!=(t=null!=(n=null==k?void 0:k(s))?n:null==S?void 0:null==(r=S.colors)?void 0:r[0])?t:"#222",T="LINESERIES_EVENT_SOURCE-"+s,A=xZ({dataKey:s,enableEvents:void 0===p||p,onBlur:l,onFocus:u,onPointerMove:c,onPointerOut:d,onPointerUp:f,onPointerDown:h,source:T,allowedSources:[xk,T]}),P=!!(u||l),N=(0,b.useCallback)(function(e){var t=e.glyphs;return P?t.map(function(e){return b.createElement(b.Fragment,{key:e.key},xW(w5({},e,{color:"transparent",onFocus:A.onFocus,onBlur:A.onBlur})))}):null},[P,A.onFocus,A.onBlur]);return b.createElement(b.Fragment,null,b.createElement(xb.Z,w5({x:_,y:C,defined:O,curve:o},j),function(e){var t,n=e.path;return b.createElement(w,w5({stroke:null!=(t=null==i?void 0:i(s))?t:M,strokeWidth:2,fill:"transparent",strokeLinecap:"round"},j,{d:n(a)||""},A))}),P&&b.createElement(xH,{dataKey:s,data:a,xAccessor:m,yAccessor:g,xScale:v,yScale:y,renderGlyphs:N}))}w6.propTypes={colorAccessor:pG().func};var w8=xw(w6);function w7(){return(w7=Object.assign?Object.assign.bind():function(e){for(var t=1;tjn.every(n=>e[n]===t[n]);function ji(e,t){return(ji=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var jo=function(e){function t(){return e.apply(this,arguments)||this}t.prototype=Object.create(e.prototype),t.prototype.constructor=t,ji(t,e);var n=t.prototype;return n.componentWillUnmount=function(){this.node&&document.body&&(document.body.removeChild(this.node),delete this.node)},n.render=function(){return(this.node||"undefined"==typeof document||(this.node=document.createElement("div"),null!=this.props.zIndex&&(this.node.style.zIndex=""+this.props.zIndex),document.body.append(this.node)),this.node)?to.createPortal(this.props.children,this.node):null},t}(b.PureComponent);jo.propTypes={zIndex:pG().oneOfType([pG().number,pG().string])};var ja=["detectBounds","zIndex"],js=["left","top","detectBounds","zIndex"];function jl(){return(jl=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}var jc=["debounce","detectBounds","horizontalCrosshairStyle","glyphStyle","renderTooltip","renderGlyph","resizeObserverPolyfill","scroll","showDatumGlyph","showHorizontalCrosshair","showSeriesGlyphs","showVerticalCrosshair","snapTooltipToDatumX","snapTooltipToDatumY","verticalCrosshairStyle","zIndex"],jd=["x","y"];function jf(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}function jh(){return(jh=Object.assign?Object.assign.bind():function(e){for(var t=1;t(f.current=!0,()=>void(f.current=!1)));let[h,p,m]=(0,b.useMemo)(()=>{let e=()=>{if(!u.current.element)return;let{left:e,top:t,width:n,height:r,bottom:i,right:a,x:s,y:c}=u.current.element.getBoundingClientRect(),d={left:e,top:t,width:n,height:r,bottom:i,right:a,x:s,y:c};u.current.element instanceof HTMLElement&&o&&(d.height=u.current.element.offsetHeight,d.width=u.current.element.offsetWidth),Object.freeze(d),f.current&&!jr(u.current.lastBounds,d)&&l(u.current.lastBounds=d)};return[e,d?jt()(e,d):e,c?jt()(e,c):e]},[l,o,c,d]);function v(){u.current.scrollContainers&&(u.current.scrollContainers.forEach(e=>e.removeEventListener("scroll",m,!0)),u.current.scrollContainers=null),u.current.resizeObserver&&(u.current.resizeObserver.disconnect(),u.current.resizeObserver=null)}function g(){u.current.element&&(u.current.resizeObserver=new a(m),u.current.resizeObserver.observe(u.current.element),r&&u.current.scrollContainers&&u.current.scrollContainers.forEach(e=>e.addEventListener("scroll",m,{capture:!0,passive:!0})))}return t=!!r,(0,b.useEffect)(()=>{if(t)return window.addEventListener("scroll",m,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",m,!0)},[m,t]),(0,b.useEffect)(()=>(window.addEventListener("resize",p),()=>void window.removeEventListener("resize",p)),[p]),(0,b.useEffect)(()=>{v(),g()},[r,m,p]),(0,b.useEffect)(()=>v,[]),[e=>{e&&e!==u.current.element&&(v(),u.current.element=e,u.current.scrollContainers=function e(t){let n=[];if(!t||t===document.body)return n;let{overflow:r,overflowX:i,overflowY:o}=window.getComputedStyle(t);return[r,i,o].some(e=>"auto"===e||"scroll"===e)&&n.push(t),[...n,...e(t.parentElement)]}(e),g())},s,h]}(ju(ei,ja)))[0],ec=el[1],ed=el[2],ef=(0,b.useMemo)(function(){return function(e){var t=e.left,n=e.top,r=e.detectBounds,i=e.zIndex,o=ju(e,js),a=null==i?es:i,s=(null==r?ea:r)?mx:md,l=(void 0===t?0:t)+(ec.left||0)+window.scrollX,u=(void 0===n?0:n)+(ec.top||0)+window.scrollY;return b.createElement(jo,{zIndex:a},b.createElement(s,jl({left:l,top:u},o)))}},[ea,es,ec.left,ec.top]),{containerRef:eu,containerBounds:ec,forceRefreshBounds:ed,TooltipInPortal:ef}),L=D.containerRef,F=D.TooltipInPortal,z=D.forceRefreshBounds,V=(0,b.useCallback)(function(e){var t;L(null!=(t=null==e?void 0:e.parentElement)?t:null)},[L]),I=null!=R&&R.tooltipOpen?o(jh({},R,{colorScale:_})):null,Z=(null==R?void 0:R.tooltipOpen)&&null!=I,B=(0,b.useRef)(!1);(0,b.useEffect)(function(){Z&&!B.current&&z(),B.current=Z},[Z,z]);var H=null==R?void 0:R.tooltipLeft,U=null==R?void 0:R.tooltipTop,W=A?xt(A):0,q=P?xt(P):0,$=(0,b.useCallback)(function(e,t){var n,r,i=null==N?void 0:N.get(e),o=null==i?void 0:i.xAccessor,a=null==i?void 0:i.yAccessor;return{left:A&&o?null!=(n=Number(A(o(t)))+W/2)?n:0:void 0,top:P&&a?null!=(r=Number(P(a(t)))+q/2)?r:0:void 0}},[N,W,q,A,P]),K=null==R?void 0:null==(eh=R.tooltipData)?void 0:eh.nearestDatum,Y=null!=(ep=null==K?void 0:K.key)?ep:"";if(Z&&K&&(y||w)){var G=$(Y,K.datum),X=G.left,J=G.top;H=y&&xn(X)?X:H,U=w&&xn(J)?J:U}var Q=[];if(Z&&(void 0!==c&&c||p)){var ee=Number(null!=(e_=null==i?void 0:i.radius)?e_:4);if(p)Object.values(null!=(eC=null==R?void 0:null==(eO=R.tooltipData)?void 0:eO.datumByKey)?eC:{}).forEach(function(e){var t,n,r,o=e.key,a=e.datum,s=e.index,l=null!=(t=null!=(n=null==_?void 0:_(o))?n:null==C?void 0:null==(r=C.htmlLabel)?void 0:r.color)?t:"#222",u=$(o,a),c=u.left,d=u.top;xn(c)&&xn(d)&&Q.push({key:o,color:l,datum:a,index:s,size:ee,x:c,y:d,glyphStyle:i,isNearestDatum:!!K&&K.key===o})});else if(K){var et=$(Y,K.datum),en=et.left,er=et.top;if(xn(en)&&xn(er)){var ei,eo,ea,es,el,eu,ec,ed,ef,eh,ep,em,ev,eg,ey,eb,ex,ew,ej,eE,ek,eS,e_,eC,eO,eM,eT,eA,eP,eN,eR,eD=null!=(eM=null!=(eT=null!=(eA=null!=(eP=Y&&(null==_?void 0:_(Y)))?eP:null)?eA:null==C?void 0:null==(eN=C.gridStyles)?void 0:eN.stroke)?eT:null==C?void 0:null==(eR=C.htmlLabel)?void 0:eR.color)?eM:"#222";Q.push({key:Y,color:eD,datum:K.datum,index:K.index,size:ee,x:en,y:er,glyphStyle:i,isNearestDatum:!0})}}}return b.createElement(b.Fragment,null,b.createElement("svg",{ref:V,style:jm}),Z&&b.createElement(b.Fragment,null,v&&b.createElement(F,{className:"visx-crosshair visx-crosshair-vertical",left:H,top:null==T?void 0:T.top,offsetLeft:0,offsetTop:0,detectBounds:!1,style:jp},b.createElement("svg",{width:"1",height:O,overflow:"visible"},b.createElement("line",jh({x1:0,x2:0,y1:0,y2:O,strokeWidth:1.5,stroke:null!=(em=null!=(ev=null==C?void 0:null==(eg=C.gridStyles)?void 0:eg.stroke)?ev:null==C?void 0:null==(ey=C.htmlLabel)?void 0:ey.color)?em:"#222"},j)))),f&&b.createElement(F,{className:"visx-crosshair visx-crosshair-horizontal",left:null==T?void 0:T.left,top:U,offsetLeft:0,offsetTop:0,detectBounds:!1,style:jp},b.createElement("svg",{width:M,height:"1",overflow:"visible"},b.createElement("line",jh({x1:0,x2:M,y1:0,y2:0,strokeWidth:1.5,stroke:null!=(eb=null!=(ex=null==C?void 0:null==(ew=C.gridStyles)?void 0:ew.stroke)?ex:null==C?void 0:null==(ej=C.htmlLabel)?void 0:ej.color)?eb:"#222"},r)))),Q.map(function(e,t){var n=e.x,r=e.y,i=jf(e,jd);return b.createElement(F,{key:t,className:"visx-tooltip-glyph",left:n,top:r,offsetLeft:0,offsetTop:0,detectBounds:!1,style:jp},b.createElement("svg",{overflow:"visible"},s(jh({x:0,y:0},i))))}),b.createElement(F,jh({left:H,top:U,style:jh({},mc,{background:null!=(eE=null==C?void 0:C.backgroundColor)?eE:"white",boxShadow:"0 1px 2px "+(null!=C&&null!=(ek=C.htmlLabel)&&ek.color?(null==C?void 0:null==(eS=C.htmlLabel)?void 0:eS.color)+"55":"#22222255")},null==C?void 0:C.htmlLabel)},k),I)))}function jb(e){var t=(0,b.useContext)(xS);return null!=t&&t.tooltipOpen?b.createElement(jy,e):null}function jx(e){var t=e.children,n=(0,b.useMemo)(function(){var e;return{all:e=e||new Map,on:function(t,n){var r=e.get(t);r&&r.push(n)||e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&r.splice(r.indexOf(n)>>>0,1)},emit:function(t,n){(e.get(t)||[]).slice().map(function(e){e(n)}),(e.get("*")||[]).slice().map(function(e){e(t,n)})}}},[]);return b.createElement(x_.Provider,{value:n},t)}function jw(){return(jw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(t,ma);return ms({},e(n),{tooltipOpen:!0})}:{tooltipOpen:!0,tooltipLeft:e.tooltipLeft,tooltipTop:e.tooltipTop,tooltipData:e.tooltipData})},[r]),o=(0,b.useCallback)(function(){return r({tooltipOpen:!1,tooltipLeft:void 0,tooltipTop:void 0,tooltipData:void 0})},[r]),{tooltipOpen:n.tooltipOpen,tooltipLeft:n.tooltipLeft,tooltipTop:n.tooltipTop,tooltipData:n.tooltipData,updateTooltip:r,showTooltip:i,hideTooltip:o}),c=u.tooltipOpen,d=u.tooltipLeft,f=u.tooltipTop,h=u.tooltipData,p=u.updateTooltip,m=u.hideTooltip,v=(0,b.useRef)(null),g=(0,b.useRef)(function(e){var t=e.svgPoint,n=e.index,r=e.key,i=e.datum,o=e.distanceX,a=e.distanceY;v.current&&(v.current.cancel(),v.current=null);var s=Math.sqrt(Math.pow(xn(o)?o:1/0,2)+Math.pow(xn(a)?a:1/0,2));p(function(e){var o,a,l,u=e.tooltipData,c=null!=u&&u.nearestDatum&&xn(u.nearestDatum.distance)?u.nearestDatum.distance:1/0;return{tooltipOpen:!0,tooltipLeft:null==t?void 0:t.x,tooltipTop:null==t?void 0:t.y,tooltipData:{nearestDatum:(null!=(o=null==u?void 0:null==(a=u.nearestDatum)?void 0:a.key)?o:"")!==r&&c0&&o>0&&y({width:m,height:o,margin:l})},[y,m,o,l]);var j=xO({source:xk});return(xI({dataKey:"nearest"===(void 0===h?"nearest":h)?xV:xz,onPointerMove:u,onPointerOut:c,onPointerUp:d,onPointerDown:f,allowedSources:jD}),y)?null==m||null==o?b.createElement(vA.Z,null,function(t){return b.createElement(jL,jN({},e,{width:null==e.width?t.width:e.width,height:null==e.height?t.height:e.height}))}):null==x?b.createElement(jj,null,b.createElement(jL,e)):null==w?b.createElement(jx,null,b.createElement(jL,e)):m>0&&o>0?b.createElement("svg",{width:m,height:o,"aria-label":void 0===t?"XYChart":t},i,r&&b.createElement("rect",jN({x:l.left,y:l.top,width:m-l.left-l.right,height:o-l.top-l.bottom,fill:"transparent"},j))):null:v&&g?b.createElement(jP,{xScale:v,yScale:g,theme:p,initialDimensions:{width:m,height:o,margin:l},horizontal:a},b.createElement(jL,e)):(console.warn("[@visx/xychart] XYChart: When no DataProvider is available in context, you must pass xScale & yScale config to XYChart."),null)}function jF(e){return b.createElement(xY,e)}function jz(e){return b.createElement(ws,e)}function jV(){return(jV=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function jW(e){var t=e.bars,n=(e.horizontal,e.xScale,e.yScale,e.radius),r=e.radiusAll,i=e.radiusTop,o=e.radiusRight,a=e.radiusBottom,s=e.radiusLeft,l=jU(e,jZ),u=!!(l.onFocus||l.onBlur);return b.createElement(b.Fragment,null,t.map(function(e){var t=e.key,c=jU(e,jB);return null==n?b.createElement("rect",jH({key:t,className:"visx-bar",tabIndex:u?0:void 0},c,l)):b.createElement(wx.Z,jH({key:t,className:"visx-bar",tabIndex:u?0:void 0,radius:n,all:r,top:i,right:o,bottom:a,left:s},c,l))}))}function jq(){return(jq=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,jK);return b.createElement(wL,jY({},n,{colorAccessor:t,BarsComponent:jW}))};function jX(){return(jX=Object.assign?Object.assign.bind():function(e){for(var t=1;tr(e),className:"flex flex-col gap-1",children:[(0,y.jsx)(fi,{value:"line",children:"Line"}),(0,y.jsx)(fi,{disabled:f||h,value:"areastack",children:"Area Stack"}),(0,y.jsx)(fi,{disabled:f||h,value:"barstack",children:"Bar Stack"}),(0,y.jsx)(fi,{disabled:f,value:"area",children:"Area"}),(0,y.jsx)(fi,{disabled:f,value:"bargroup",children:"Bar Group"})]})]}),(0,y.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,y.jsx)(t1,{weight:"semibold",children:"Stack series offset"}),(0,y.jsxs)(fo,{value:l,onValueChange:e=>u(e),className:"flex flex-col gap-1",children:[(0,y.jsxs)(fi,{disabled:!s,value:"none",children:["Auto",(0,y.jsx)(f0,{children:"zero-baseline"})]}),(0,y.jsxs)(fi,{disabled:!s,value:"expand",children:["Expand",(0,y.jsx)(f0,{children:"values sum to 1"})]}),(0,y.jsxs)(fi,{disabled:!s,value:"wiggle",children:["Wiggle",(0,y.jsx)(f0,{children:"stream graph"})]})]})]}),(0,y.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,y.jsx)(t1,{weight:"semibold",children:"Curve shape"}),(0,y.jsxs)(fo,{value:i,onValueChange:e=>o(e),className:"flex flex-col gap-1",children:[(0,y.jsx)(fi,{disabled:!a,value:"linear",children:"Linear"}),(0,y.jsx)(fi,{disabled:!a,value:"cardinal",children:"Cardinal"}),(0,y.jsx)(fi,{disabled:!a,value:"step",children:"Step"})]})]}),(0,y.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,y.jsx)(t1,{weight:"semibold",children:"Axes"}),(0,y.jsx)("div",{className:"flex flex-col gap-6",children:(0,y.jsxs)(fo,{value:c,onValueChange:e=>d(e),className:"flex flex-col gap-1",children:[(0,y.jsx)(fi,{value:"bottom",children:"Bottom"}),(0,y.jsx)(fi,{value:"top",children:"Top"})]})})]})]})})}let Eu=(0,b.forwardRef)((e,t)=>{let{className:n}=e;return(0,y.jsxs)("div",{ref:t,className:(0,em.cx)("flex gap-1 items-center",n),children:[(0,y.jsx)(Ec,{}),(0,y.jsx)(Ec,{}),(0,y.jsx)(Ec,{})]})});function Ec(){return(0,y.jsx)("div",{className:"w-1 h-1 bg-slate-400 dark:bg-slate-200 rounded-full animate-pulselight [&:nth-child(2)]:animation-delay-500 [&:nth-child(3)]:animation-delay-1000"})}function Ed(e){let{id:t,height:n,data:r,config:i,actionsLeft:o,isLoading:a,actionsRight:s,chartType:l="areastack",curveType:u="linear",stackOffset:c="none",variant:d="panel",allowConfiguration:f=!0}=e,h=function(e,t,n,r,i,o){let a=(0,b.useMemo)(()=>{if(t.sort((e,t)=>e.timestamp>t.timestamp?1:-1),0===t.length)return[];let e=t[t.length-1];return[...t,{...e,timestamp:e.timestamp+j8(1)}]},[t]),s=(0,b.useMemo)(()=>{if(a.length<2)return 0;let e=[a[0].timestamp,a[a.length-1].timestamp],t=new Date().getTime();return t>e[0]&&t"dark"===c?v6:v5,[c]),[f,h]=(0,b.useState)("center"),[p,m]=(0,b.useState)([!1,!1]),[v,g]=p,[x,w]=(0,b.useState)("bottom"),[j,E]=(0,b.useState)("right"),[k,S]=(0,b.useState)(!0),[_,C]=(0,b.useState)(!0),[O,M]=(0,b.useState)(!1),[T,A]=(0,b.useState)(!0),[P,N]=(0,b.useState)(!0),[R,D]=(0,b.useState)(r),[L,F]=(0,b.useState)(i),[z,V]=(0,b.useState)(o),I=d.xyChartTheme.gridStyles.stroke,[Z,B]=(0,b.useState)(!1),[H,U]=(0,b.useState)("star"),W=(0,b.useCallback)(e=>{let{x:t,y:n,size:r,color:i,onPointerMove:o,onPointerOut:a,onPointerUp:s,isNearestDatum:l}=e,u={onPointerMove:o,onPointerOut:a,onPointerUp:s};return"star"===H?(0,y.jsx)(vB,{left:t,top:n,stroke:I,fill:i,size:10*r,...u}):"circle"===H?(0,y.jsx)(vW,{left:t,top:n,stroke:I,fill:i,r:r,...u}):"cross"===H?(0,y.jsx)(vY,{left:t,top:n,stroke:I,fill:i,size:10*r,...u}):(0,y.jsx)("text",{x:t,y:n,dx:"-0.75em",dy:"0.25em",fontSize:14,...u,children:l?"\uD83C\uDF4D":"\uD83C\uDF4C"})},[H,I]),q=(0,b.useMemo)(()=>Object.keys(j5()(t[0],"timestamp")),[t]),$=(0,b.useMemo)(()=>n.enabledGraph||q,[q,n]),K=(0,b.useMemo)(()=>n.enabledTip||q,[q,n]),Y=(0,b.useMemo)(()=>({x:q.reduce((e,t)=>({...e,[t]:e=>e.timestamp}),{}),y:q.reduce((e,t)=>({...e,[t]:e=>e[t]}),{}),date:e=>e.timestamp}),[q]),G=["line","area","areastack"].includes(R),X=["barstack","areastack"].includes(R),J=(0,b.useMemo)(()=>({x:{type:"band",paddingInner:G?1:.3},y:{type:"linear"}}),[G]),Q=(0,b.useMemo)(()=>"cardinal"===L&&vG.ZP||"step"===L&&mJ.ZP||vX.Z,[L]),ee=(0,b.useMemo)(()=>({top:30,bottom:"top"===x?0:20,left:0,right:0}),[x]);return{id:e,accessors:Y,animationTrajectory:f,config:n,scales:J,data:a,curve:Q,chartData:t,numTicks:4,isLine:G,isStack:X,todayOffset:s,initialChartType:r,chartType:R,curveType:L,keys:q,enabledGraph:$,enabledTip:K,renderBarGroup:"bargroup"===R,renderBarStack:"barstack"===R,enableTooltipGlyph:Z,renderTooltipGlyph:W,renderAreaSeries:"area"===R,renderAreaStack:"areastack"===R,renderLineSeries:"line"===R,sharedTooltip:P,showGridColumns:g,showGridRows:v,showHorizontalCrosshair:O,showTooltip:k,showVerticalCrosshair:_,snapTooltipToDatum:!X&&T,stackOffset:z,theme:d,margin:ee,xAxisOrientation:x,yAxisOrientation:j,setUseAnimatedComponents:u,setAnimationTrajectory:h,setGridProps:m,setXAxisOrientation:w,setYAxisOrientation:E,setShowTooltip:S,setShowVerticalCrosshair:C,setShowHorizontalCrosshair:M,setSnapTooltipToDatum:A,setSharedTooltip:N,setChartType:D,setCurveType:F,setStackOffset:V,setEnableTooltipGlyph:B,setTooltipGlyphComponent:U,...l?{Annotation:xd,AreaSeries:xX,AreaStack:wu,Axis:wm,BarGroup:wP,BarSeries:wV,BarStack:wU,GlyphSeries:wY,Grid:w4,LineSeries:w9,Tooltip:jb,XYChart:jL}:{AreaSeries:jF,AreaStack:jz,Axis:jI,BarGroup:j$,BarSeries:jG,BarStack:jJ,Grid:j2,LineSeries:j4,Tooltip:jb,XYChart:jL}}}(t,r,i,l,u,c),p=(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)("div",{className:"flex gap-2 absolute top-3 right-4",children:[s,"panel"===d&&f&&(0,y.jsx)(El,{...h})]}),(0,y.jsx)("div",{className:"flex gap-2 absolute top-3 left-4",children:o}),(0,y.jsx)(vA.Z,{children:e=>{let{width:t,height:n}=e;return a?(0,y.jsx)("div",{className:"flex items-center justify-center h-full",children:(0,y.jsx)(Eu,{className:"scale-150"})}):(0,y.jsx)(vR,{...h,width:t,height:n})}})]});return"panel"===d?(0,y.jsx)(t3,{className:"relative p-px",style:{height:n},children:p}):(0,y.jsx)("div",{className:"relative p-px",style:{height:n},children:p})}/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any @@ -57,7 +57,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */function j8(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((r=r.apply(e,t||[])).next())})}function j7(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]-1?(j9('UA "Edge" => assuming success'),[2,!0]):EE(document.body,e)?(j9("copyUsingTempSelection worked"),[2,!0]):((i=document.createElement("div")).setAttribute("style","-webkit-user-select: text !important"),i.textContent="temporary element",document.body.appendChild(i),o=EE(i,e),document.body.removeChild(i),o)?(j9("copyUsingTempElem worked"),[2,!0]):(a=e["text/plain"],j9("copyTextUsingDOM"),(s=document.createElement("div")).setAttribute("style","-webkit-user-select: text !important"),l=s,s.attachShadow&&(j9("Using shadow DOM."),l=s.attachShadow({mode:"open"})),(u=document.createElement("span")).innerText=a,l.appendChild(u),document.body.appendChild(s),Ek(u),c=document.execCommand("copy"),ES(),document.body.removeChild(s),c)?(j9("copyTextUsingDOM worked"),[2,!0]):[2,!1]})})}(((n={})["text/plain"]=e,n)))throw Error("writeText() failed");return[2]})})}let EC={data:""},EO=e=>"object"==typeof window?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||EC,EM=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,ET=/\/\*[^]*?\*\/|\s\s+|\n/g,EA=(e,t)=>{let n="",r="",i="";for(let o in e){let a=e[o];"@"==o[0]?"i"==o[1]?n=o+" "+a+";":r+="f"==o[1]?EA(a,o):o+"{"+EA(a,"k"==o[1]?"":t)+"}":"object"==typeof a?r+=EA(a,t?t.replace(/([^,])+/g,e=>o.replace(/(^:.*)|([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)):o):null!=a&&(o=o.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=EA.p?EA.p(o,a):o+":"+a+";")}return n+(t&&i?t+"{"+i+"}":i)+r},EP={},EN=e=>{if("object"==typeof e){let t="";for(let n in e)t+=n+EN(e[n]);return t}return e},ER=(e,t,n,r,i)=>{var o;let a=EN(e),s=EP[a]||(EP[a]=(e=>{let t=0,n=11;for(;t>>0;return"go"+n})(a));if(!EP[s]){let t=a!==e?e:(e=>{let t,n=[{}];for(;t=EM.exec(e.replace(ET,""));)t[4]?n.shift():t[3]?n.unshift(n[0][t[3]]=n[0][t[3]]||{}):n[0][t[1]]=t[2];return n[0]})(e);EP[s]=EA(i?{["@keyframes "+s]:t}:t,n?"":"."+s)}return o=EP[s],-1==t.data.indexOf(o)&&(t.data=r?o+t.data:t.data+o),s},ED=(e,t,n)=>e.reduce((e,r,i)=>{let o=t[i];if(o&&o.call){let e=o(n),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;o=t?"."+t:e&&"object"==typeof e?e.props?"":EA(e,""):!1===e?"":e}return e+r+(null==o?"":o)},"");function EL(e){let t=this||{},n=e.call?e(t.p):e;return ER(n.unshift?n.raw?ED(n,[].slice.call(arguments,1),t.p):n.reduce((e,n)=>Object.assign(e,n&&n.call?n(t.p):n),{}):n,EO(t.target),t.g,t.o,t.k)}EL.bind({g:1});let EF,Ez,EV,EI=EL.bind({k:1});function EZ(e,t){let n=this||{};return function(){let r=arguments;function i(o,a){let s=Object.assign({},o),l=s.className||i.className;n.p=Object.assign({theme:Ez&&Ez()},s),n.o=/ *go\d+/.test(l),s.className=EL.apply(n,r)+(l?" "+l:""),t&&(s.ref=a);let u=e;return e[0]&&(u=s.as||e,delete s.as),EV&&u[0]&&EV(s),EF(u,s)}return t?t(i):i}}function EB(){return(EB=Object.assign||function(e){for(var t=1;t-1&&EX.splice(e,1)}},[n]);var i=n.toasts.map(function(t){var n,r,i;return EB({},e,e[t.type],t,{duration:t.duration||(null==(n=e[t.type])?void 0:n.duration)||(null==(r=e)?void 0:r.duration)||E0[t.type],style:EB({},e.style,null==(i=e[t.type])?void 0:i.style,t.style)})});return EB({},n,{toasts:i})},E2=function(e){return function(t,n){var r,i=(void 0===(r=e)&&(r="blank"),EB({createdAt:Date.now(),visible:!0,type:r,ariaProps:{role:"status","aria-live":"polite"},message:t,pauseDuration:0},n,{id:(null==n?void 0:n.id)||EW()}));return EQ({type:g.UPSERT_TOAST,toast:i}),i.id}},E4=function(e,t){return E2("blank")(e,t)};E4.error=E2("error"),E4.success=E2("success"),E4.loading=E2("loading"),E4.custom=E2("custom"),E4.dismiss=function(e){EQ({type:g.DISMISS_TOAST,toastId:e})},E4.remove=function(e){return EQ({type:g.REMOVE_TOAST,toastId:e})},E4.promise=function(e,t,n){var r=E4.loading(t.loading,EB({},n,null==n?void 0:n.loading));return e.then(function(e){return E4.success(EU(t.success,e),EB({id:r},n,null==n?void 0:n.success)),e}).catch(function(e){E4.error(EU(t.error,e),EB({id:r},n,null==n?void 0:n.error))}),e};var E3=function(e){var t=E1(e),n=t.toasts,r=t.pausedAt;(0,b.useEffect)(function(){if(!r){var e=Date.now(),t=n.map(function(t){if(t.duration!==1/0){var n=(t.duration||0)+t.pauseDuration-(e-t.createdAt);if(n<0){t.visible&&E4.dismiss(t.id);return}return setTimeout(function(){return E4.dismiss(t.id)},n)}});return function(){t.forEach(function(e){return e&&clearTimeout(e)})}}},[n,r]);var i=(0,b.useMemo)(function(){return{startPause:function(){EQ({type:g.START_PAUSE,time:Date.now()})},endPause:function(){r&&EQ({type:g.END_PAUSE,time:Date.now()})},updateHeight:function(e,t){return EQ({type:g.UPDATE_TOAST,toast:{id:e,height:t}})},calculateOffset:function(e,t){var r,i=t||{},o=i.reverseOrder,a=void 0!==o&&o,s=i.gutter,l=void 0===s?8:s,u=i.defaultPosition,c=n.filter(function(t){return(t.position||u)===(e.position||u)&&t.height}),d=c.findIndex(function(t){return t.id===e.id}),f=c.filter(function(e,t){return t * {\n pointer-events: auto;\n }\n"]);return kO=function(){return e},e}c=b.createElement,EA.p=void 0,EF=c,Ez=void 0,EV=void 0;var kM=function(e,t){var n=e.includes("top"),r=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return EB({left:0,right:0,display:"flex",position:"absolute",transition:Eq()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:"translateY("+t*(n?1:-1)+"px)"},n?{top:0}:{bottom:0},r)},kT=EL(kO()),kA=function(e){var t=e.reverseOrder,n=e.position,r=void 0===n?"top-center":n,i=e.toastOptions,o=e.gutter,a=e.children,s=e.containerStyle,l=e.containerClassName,u=E3(i),c=u.toasts,d=u.handlers;return(0,b.createElement)("div",{style:EB({position:"fixed",zIndex:9999,top:16,left:16,right:16,bottom:16,pointerEvents:"none"},s),className:l,onMouseEnter:d.startPause,onMouseLeave:d.endPause},c.map(function(e){var n,i=e.position||r,s=kM(i,d.calculateOffset(e,{reverseOrder:t,gutter:o,defaultPosition:r})),l=e.height?void 0:(n=function(t){d.updateHeight(e.id,t.height)},function(e){e&&setTimeout(function(){n(e.getBoundingClientRect())})});return(0,b.createElement)("div",{ref:l,className:e.visible?kT:"",key:e.id,style:s},"custom"===e.type?EU(e.message,e):a?a(e):(0,b.createElement)(kC,{toast:e,position:i}))}))};let kP=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};E4((0,y.jsx)(tW,{wrapEllipsis:!0,children:"string"==typeof e&&e.length>200?"".concat(e.slice(0,200)):e}),kL(t))},kN=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};E4(e,kL(t))},kR=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};E4.success((0,y.jsx)(tW,{wrapEllipsis:!0,children:"string"==typeof e&&e.length>200?"".concat(e.slice(0,200),"..."):e}),kL(t))},kD=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};E4.error((0,y.jsx)(tW,{wrapEllipsis:!0,children:"string"==typeof e&&e.length>200?"".concat(e.slice(0,200),"..."):e}),kL(t))};function kL(){let{className:e,...t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{position:"top-center",duration:6e3,className:(0,eo.cx)(s5,t$(),"font-sans font-normal","text-gray-1100 dark:text-white","max-w-[800px] overflow-hidden text-ellipsis","[&>div]:overflow-hidden","[&>div]:flex-1",e),success:{icon:(0,y.jsx)("div",{className:"!flex-none w-5",children:(0,y.jsx)(le.tEK,{className:"w-5 text-green-600"})})},error:{icon:(0,y.jsx)("div",{className:"!flex-none w-5",children:(0,y.jsx)(le.Jsc,{className:"w-5 text-red-600"})})},...t}}function kF(){return(0,y.jsx)(kA,{toastOptions:kL()})}let kz=(e,t)=>{let n=t?"Copied ".concat(t," to clipboard"):"Copied to clipboard";kP(n),E_(e)},kV=(e,t,n)=>{kN(t,n),E_(e)};function kI(e,t){return e?t&&e.length>t?"".concat(e.slice(0,t),"..."):"".concat(e.slice(0,t)):""}function kZ(e){return(e||"").replace(/^addr:/,"").replace(/^txid:/,"").replace(/^fcid:/,"").replace(/^h:/,"").replace(/^scoid:/,"").replace(/^key:/,"")}function kB(e,t,n){return t?"".concat(e," ").concat(kI(t,n)):"".concat(e)}function kH(e,t){return"miner"===t?"minerPayout":"siafundClaim"===t?"siafundClaim":"contract"===t?"contractPayout":"foundation"===t?"foundationSubsidy":e.storageProofs&&e.storageProofs.length>0?"storageProof":e.fileContracts&&e.fileContracts.length>0&&e.fileContractRevisions&&e.fileContractRevisions.length>0?"contractRenewal":e.fileContractRevisions&&e.fileContractRevisions.length>0?"contractRevision":e.fileContracts&&e.fileContracts.length>0?"contractFormation":e.arbitraryData&&e.arbitraryData.length>0&&0===atob(e.arbitraryData[0]).indexOf("HostAnnouncement")?"hostAnnouncement":e.siafundOutputs&&e.siafundOutputs.length>0?"siafund":e.siacoinOutputs&&e.siacoinOutputs.length>0?"siacoin":void 0}let kU={transaction:"transaction",contract:"contract",block:"block",output:"output",address:"address",ip:"IP"},kW={siacoin:"siacoin transfer",siafund:"siafund transfer",contractFormation:"contract formation",contractRenewal:"contract renewal",contractRevision:"contract revision",contractPayout:"contract payout",storageProof:"storage proof",minerPayout:"miner payout",siafundClaim:"siafund claim",foundationSubsidy:"foundation subsidy",hostAnnouncement:"host announcement"};function kq(e){return e?kU[e]:void 0}function k$(e){return e?kW[e]:void 0}function kK(e){let{value:t,displayValue:n,type:r,label:i,href:o,maxLength:a,size:s,scaleSize:l,weight:u,color:c="contrast",className:d}=e,f=i||kq(r),h=a||("ip"===r?20:12),p=kZ(t),m=n||p,v="".concat(null==m?void 0:m.slice(0,h)).concat(((null==m?void 0:m.length)||0)>h?"...":"");return(0,y.jsxs)("div",{className:(0,eo.cx)("flex items-center",d),children:[o?(0,y.jsx)(cQ,{href:o,underline:"hover",size:s,scaleSize:l,color:c,weight:u,ellipsis:!0,children:v}):(0,y.jsx)(tW,{size:s,scaleSize:l,color:c,weight:u,ellipsis:!0,children:v}),(0,y.jsx)("div",{className:"ml-1 flex items-center",children:(0,y.jsx)(s9,{variant:"ghost",size:"none",onClick:e=>{e.stopPropagation(),kz(p,f)},children:(0,y.jsx)(tW,{color:c,children:(0,y.jsx)(le.olJ,{className:"10"===s?"scale-75":"scale-90"})})})})]})}function kY(e){let{value:t,displayValue:n,type:r,href:i,maxLength:o,size:a,scaleSize:s,color:l="contrast",menu:u,className:c}=e,d=o||("ip"===r?20:12),f=kZ(t),h=n||f,p="".concat(null==h?void 0:h.slice(0,d)).concat(((null==h?void 0:h.length)||0)>d?"...":"");return(0,y.jsxs)("div",{className:(0,eo.cx)("flex items-center",c),children:[i?(0,y.jsx)(cQ,{href:i,underline:"hover",size:a,scaleSize:s,color:l,ellipsis:!0,children:p}):(0,y.jsx)(tW,{size:a,scaleSize:s,color:l,ellipsis:!0,children:p}),(0,y.jsx)("div",{className:"ml-1 flex items-center",children:u})]})}function kG(e){let{value:t,size:n,scaleSize:r,tooltip:i="",variant:o="change"}=e,a=(0,vc.yF)(String(t),{units:"SF"});return(0,y.jsx)(s8,{content:(i?"".concat(i," "):"")+a,children:(0,y.jsxs)(tW,{size:n,scaleSize:r,weight:"medium",font:"mono",color:"change"===o?t>0?"green":t<0?"red":"subtle":"contrast",children:["change"===o&&t>0?"+":"",a]})})}function kX(e){let{value:t,size:n,scaleSize:r,tooltip:i="",variant:o="change",fixed:a=3,dynamicUnits:s=!0,extendedSuffix:l,showTooltip:u=!0}=e,c=t.isGreaterThan(0)?"+":t.isLessThan(0)?"-":"",d="change"===o?t.isGreaterThan(0)?"green":t.isLessThan(0)?"red":"subtle":"contrast",f=(0,y.jsxs)(tW,{size:n,scaleSize:r,weight:"medium",font:"mono",ellipsis:!0,color:d,children:["change"===o?"".concat(c).concat((0,vc.Vz)(t.absoluteValue(),{fixed:a,dynamicUnits:s})):(0,vc.Vz)(t,{fixed:a,dynamicUnits:s}),(0,y.jsx)(tW,{size:"20",weight:"medium",font:"mono",ellipsis:!0,color:"subtle",children:l?"".concat(l):""})]});return u?(0,y.jsx)(s8,{content:(i?"".concat(i," "):"")+(0,vc.Vz)(t,{fixed:16,dynamicUnits:!1}),children:f}):f}function kJ(e){let{value:t,size:n="14",weight:r="semibold",tooltip:i="",variant:o="change",color:a,format:s}=e,l=t.isGreaterThan(0)?"+":t.isLessThan(0)?"-":"",u="change"===o?t.isGreaterThan(0)?"green":t.isLessThan(0)?"red":"subtle":"contrast";return(0,y.jsx)(s8,{content:(i?"".concat(i," "):"")+s(t),children:(0,y.jsx)(tW,{size:n,weight:r,font:"mono",ellipsis:!0,color:a||u,children:"change"===o?"".concat(l).concat(s(t.absoluteValue())):s(t)})})}var kQ=n(61258),k0=n.n(kQ);function k1(e){let{skeletonCount:t=10}=e;return(0,y.jsx)(y.Fragment,{children:k0()(t,e=>(0,y.jsxs)("div",{className:(0,eo.cx)("relative flex gap-4 p-3.5",(0,eo.cx)("border-t border-gray-200 dark:border-graydark-300","first:border-none")),children:[(0,y.jsx)(fq,{className:"w-[60px] h-[50px]"}),(0,y.jsxs)("div",{className:"flex flex-col gap-2 w-full",children:[(0,y.jsx)(fq,{className:"w-[90%] h-[20px]"}),(0,y.jsx)(fq,{className:"w-[140px] h-[14px]"})]})]},e))})}var k2=n(29193),k4=n(23779),k3=n.n(k4);function k5(e){let{type:t,label:n,initials:r,href:i,src:o,shape:a}=e,s=(0,y.jsx)(lp,{interactive:!!i,fallback:r||t&&(t||n||"").split(" ").map(e=>e.charAt(0).toUpperCase).join(""),src:o,shape:a||(t&&"address"!==t&&"block"!==t?"circle":"square")}),l=i&&(0,y.jsx)(cQ,{href:i,underline:"none",children:s}),u=l||s;return t?(0,y.jsx)(s8,{content:n||kq(t),children:(0,y.jsx)("div",{className:"",children:u})}):u}function k6(e){let{label:t,type:n,avatar:r,avatarShape:i,initials:o,href:a,onClick:s,children:l}=e;return(0,y.jsxs)("div",{className:(0,eo.cx)("flex gap-4 p-4",(0,eo.cx)("border-t border-gray-200 dark:border-graydark-300","first:border-none")),onClick:s,children:[(0,y.jsx)(k5,{label:t,type:n,shape:i,src:r,initials:o||(n||t||"").split(" ").map(e=>e.charAt(0).toUpperCase()).join(""),href:a}),l]})}function k8(e){let t=e.sc,n=e.sf,r=e.hash&&(0,y.jsx)(kK,{value:e.hash,type:e.type,label:e.label,href:e.href,color:"subtle"}),i=e.label||"transaction"===e.type&&e.txType&&k$(e.txType)||kq(e.type),o=!function(e){if(!e)return!1;try{return new URL(e),!0}catch(e){return!1}}(i)?k3()(i):i;return(0,y.jsx)(k6,{...e,children:(0,y.jsxs)("div",{className:"flex flex-col items-center gap-1 w-full",children:[(0,y.jsxs)("div",{className:"flex gap-2 items-center w-full",children:[(0,y.jsxs)("div",{className:"flex gap-2 items-center",children:[e.height&&e.blockHref&&(0,y.jsx)(tW,{color:"subtle",weight:"semibold",children:(0,y.jsx)(cQ,{href:e.blockHref,underline:"none",children:(0,vc.yF)(e.height)})}),(0,y.jsx)(tW,{weight:"medium",children:o||r})]}),(0,y.jsx)("div",{className:"flex-1"}),!!t&&(0,y.jsx)(kX,{variant:e.scVariant,value:t}),!!n&&(0,y.jsx)(kG,{variant:e.sfVariant,value:n})]}),(0,y.jsxs)("div",{className:"flex justify-between w-full",children:[(0,y.jsx)("div",{className:"flex gap-1",children:!!o&&r}),(0,y.jsxs)("div",{className:"flex gap-1 items-center",children:[e.unconfirmed?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(tW,{color:"verySubtle",children:"unconfirmed"}),e.timestamp?(0,y.jsx)(tW,{color:"verySubtle",children:(0,y.jsx)(le.Bpb,{className:"scale-50"})}):null]}):null,e.timestamp&&(0,y.jsx)(tW,{color:"subtle",children:(0,k2.Z)(new Date(e.timestamp),new Date,{addSuffix:!0})})]})]})]})})}function k7(e){let{title:t,actions:n,entities:r,emptyMessage:i,skeletonCount:o=10,children:a}=e;return(0,y.jsx)(tK,{children:(0,y.jsxs)("div",{className:"flex flex-col rounded overflow-hidden",children:[(t||n)&&(0,y.jsxs)("div",{className:"flex items-center p-4 border-b border-gray-200 dark:border-graydark-300",children:[t&&(0,y.jsx)(cZ,{size:"20",font:"mono",ellipsis:!0,children:t}),(0,y.jsx)("div",{className:"flex-1"}),n]}),(0,y.jsxs)("div",{className:"flex flex-col rounded overflow-hidden",children:[(null==r?void 0:r.length)===0&&(0,y.jsx)("div",{className:(0,eo.cx)("flex items-center justify-center h-[84px]",(0,eo.cx)("border-t border-gray-200 dark:border-graydark-300","first:border-none")),children:(0,y.jsx)(tW,{size:"18",color:"subtle",children:i||"No results"})}),a||(null==r?void 0:r.map((e,t)=>(0,y.jsx)(k8,{...e},e.hash||e.label||t)))||(0,y.jsx)(k1,{skeletonCount:o})]})]})})}function k9(e){let{label:t,entityType:n,entityValue:r,actions:i,href:o,value:a,extendedSuffix:s,hash:l,sc:u,sf:c,comment:d,commentTip:f,scaleSize:h="40",isLoading:p,onClick:m}=e,v=(0,y.jsx)(tW,{color:"subtle",size:"12",className:"h-6",children:d});return(0,y.jsx)(tK,{children:(0,y.jsx)("div",{className:(0,eo.cx)("flex items-center py-2 px-4 h-full min-w-[250px]",m?"cursor-pointer":""),onClick:m,children:(0,y.jsxs)("div",{className:"flex flex-col gap-4 flex-wrap items-start w-full",children:[(0,y.jsxs)("div",{className:"flex relative top-px flex-1 w-full gap-6 items-center justify-between",children:[(0,y.jsx)(tW,{color:"subtle",ellipsis:!0,scaleSize:"14",children:"string"==typeof t?k3()(t):t}),i]}),(0,y.jsxs)("div",{className:"flex flex-col items-end md:items-start gap-2 md:flex-2",children:[p?(0,y.jsx)(fq,{className:"h-12 w-[150px]"}):(0,y.jsxs)(y.Fragment,{children:[void 0!==u&&(0,y.jsx)(kX,{extendedSuffix:s,scaleSize:h,variant:"value",value:u,fixed:0}),void 0!==c&&(0,y.jsx)(kG,{scaleSize:h,variant:"value",value:c}),n&&(r?(0,y.jsx)(kK,{scaleSize:h,label:kq(n),href:o,value:r,displayValue:"block"===n&&r?Number(r).toLocaleString():r,className:"relative top-0.5"}):(0,y.jsx)(tW,{font:"mono",weight:"medium",scaleSize:h,children:"-"})),l&&(0,y.jsx)(kK,{scaleSize:h,label:"hash",value:l}),void 0!==a&&(0,y.jsx)(tW,{font:"mono",weight:"medium",scaleSize:h,ellipsis:!0,children:a})]}),v?(0,y.jsx)("div",{className:"mt-1",children:p?(0,y.jsx)("div",{className:"mt-1 h-6 justify-center",children:(0,y.jsx)(fq,{className:"h-4 w-[100px]"})}):f?(0,y.jsx)(s8,{content:f,children:v}):v}):null]})]})})})}function Se(e){let{title:t,actions:n,name:r}=e;return(0,y.jsxs)("div",{className:"flex gap-0.5 items-center",children:[t?(0,y.jsx)(cG,{htmlFor:r,noWrap:!0,children:t}):null,n]})}function St(e){var t;let{form:n,name:r}=e,i=n.formState.errors[r],o=null===(t=n.formState.errors[r])||void 0===t?void 0:t.message;return i?(0,y.jsx)(tW,{size:"14",color:"red",children:o}):null}function Sn(e){let{form:t,title:n,actions:r,name:i,className:o,wrap:a}=e,s=t.formState.errors[i];return n||s?(0,y.jsxs)("div",{className:(0,eo.cx)("flex justify-between items-center gap-x-4 overflow-hidden",a?"flex-wrap":"",o),children:[(0,y.jsx)(Se,{name:i,title:n,actions:r}),(0,y.jsx)(St,{form:t,name:i})]}):null}function Sr(e){let{children:t,...n}=e;return(0,y.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,y.jsx)(Sn,{...n}),t]})}function Si(e){let{form:t,size:n="medium",variant:r="accent",children:i}=e;return(0,y.jsx)(y.Fragment,{children:(0,y.jsx)(s9,{size:n,variant:r,state:t.formState.isSubmitting?"waiting":void 0,type:"submit",children:t.formState.isSubmitting?(0,y.jsx)(j3,{}):i})})}function So(e){let{formik:t,title:n,name:r,placeholder:i,disabled:o,readOnly:a,autoComplete:s="off",spellCheck:l=!1,tabIndex:u,allowDecimals:c=!1,decimalsLimitFiat:d=3,decimalsLimitSc:f=3,decimalsLimit:h=2,disableGroupSeparators:p=!1,showFiat:m=!0,units:v,type:g,variants:b}=e;return(0,y.jsx)(Sc,{formik:t,title:n,name:r,children:"number"===g?(0,y.jsx)(Ss,{formik:t,name:r,units:v,disabled:o,readOnly:a,tabIndex:u,decimalsLimit:h,allowDecimals:c,disableGroupSeparators:p,placeholder:i,variants:b}):"siacoin"===g?(0,y.jsx)(Sl,{formik:t,name:r,disabled:o,readOnly:a,placeholder:i,tabIndex:u,showFiat:m,decimalsLimitFiat:d,decimalsLimitSc:f,variants:b}):(0,y.jsx)(Sa,{formik:t,name:r,autoComplete:s,disabled:o,readOnly:a,placeholder:i,tabIndex:u,spellCheck:l,type:g,variants:b})})}function Sa(e){let{formik:t,name:n,placeholder:r,autoComplete:i="off",disabled:o,readOnly:a,tabIndex:s,spellCheck:l=!1,type:u,variants:c}=e;return(0,y.jsx)(fl,{id:n,name:n,autoComplete:i,disabled:o,spellCheck:l,placeholder:r,tabIndex:s,readOnly:a||t.isSubmitting,type:u,onBlur:t.handleBlur,onChange:t.handleChange,value:t.values[n]||"",...c})}function Ss(e){let{formik:t,name:n,units:r,disabled:i,readOnly:o,tabIndex:a,placeholder:s,decimalsLimit:l,allowDecimals:u=!1,disableGroupSeparators:c=!1,variants:d}=e;return(0,y.jsx)(fP,{id:n,units:r,name:n,placeholder:new(fT())(s),disabled:i,allowDecimals:u,decimalsLimit:l,disableGroupSeparators:c,readOnly:o||t.isSubmitting,tabIndex:a,onBlur:t.handleBlur,onChange:e=>t.setFieldValue(n,e),value:t.values[n],...d})}function Sl(e){let{formik:t,name:n,disabled:r,readOnly:i,tabIndex:o,placeholder:a,showFiat:s,decimalsLimitFiat:l=3,decimalsLimitSc:u=3,variants:c}=e;return(0,y.jsx)(fF,{id:n,name:n,disabled:r,showFiat:s,decimalsLimitFiat:l,decimalsLimitSc:u,readOnly:i||t.isSubmitting,tabIndex:o,onFocus:()=>t.setFieldTouched(n),sc:new(fT())(t.values[n]),placeholder:new(fT())(a),onChange:e=>t.setFieldValue(n,null==e?void 0:e.toString()),...c})}function Su(e){var t,n;let{formik:r,title:i,name:o,withStatusError:a=!1,className:s}=e,l=r.errors[o]&&r.touched[o]||a&&(null===(t=r.status)||void 0===t?void 0:t.error),u=r.errors[o]||a&&(null===(n=r.status)||void 0===n?void 0:n.error);return(i||l)&&(0,y.jsxs)("div",{className:(0,eo.cx)("flex justify-between items-center gap-4",s),children:[i?(0,y.jsx)(cG,{htmlFor:o,children:i}):(0,y.jsx)("div",{}),l&&(0,y.jsx)(tW,{size:"14",color:"red",children:u})]})}function Sc(e){let{children:t,...n}=e;return(0,y.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,y.jsx)(Su,{...n}),t]})}function Sd(e){var t;let{formik:n,size:r="medium",variant:i="accent",withStatusError:o=!0,children:a}=e;return(0,y.jsxs)(y.Fragment,{children:[o&&(null===(t=n.status)||void 0===t?void 0:t.error)&&(0,y.jsx)(tW,{color:"red",children:n.status.error}),(0,y.jsx)(s9,{size:r,variant:i,state:n.isSubmitting?"waiting":void 0,type:"submit",children:n.isSubmitting?(0,y.jsx)(j3,{}):a})]})}function Sf(e){let{columns:t,data:n,context:r,sortField:i,sortDirection:o,sortableColumns:a,toggleSort:s,summary:l,rowSize:u="default",pageSize:c,isLoading:d,emptyState:f,focusId:h,focusColor:p="default"}=e,m="emptyState";!d||(null==n?void 0:n.length)||(m="skeleton"),(null==n?void 0:n.length)&&(m="currentData");let v=(0,b.useCallback)((e,n,r)=>(0,eo.cx)(0===e?"pl-6":"pl-4",e===t.length-1?"pr-6":"pr-4",r?[0===e?"rounded-tl-lg":"",e===t.length-1?"rounded-tr-lg":""]:"",n),[t]),g=(0,b.useCallback)((e,t)=>(0,eo.cx)("flex items-center",t),[]);return(0,y.jsxs)(tK,{children:[(0,y.jsxs)("table",{className:"relative z-10 table-auto border-collapse w-full",children:[(0,y.jsx)("thead",{className:(0,eo.cx)("sticky top-0 z-20 bg-white dark:bg-graydark-100","shadow-border-b shadow-gray-400 dark:shadow-graydark-300"),children:(0,y.jsx)("tr",{children:t.map((e,t)=>{let{id:n,icon:r,label:l,tip:u,cellClassName:c,contentClassName:d}=e,f=(null==a?void 0:a.includes(n))&&!!s,h=i===n;return(0,y.jsx)("th",{className:(0,eo.cx)(v(t,c,!1),"border-b border-gray-400 dark:border-graydark-400"),children:(0,y.jsx)("div",{className:(0,eo.cx)("overflow-hidden","py-3"),children:(0,y.jsxs)("div",{onClick:()=>{f&&s(n)},className:(0,eo.cx)(g(t,d),f?"cursor-pointer":""),children:[(0,y.jsx)(s8,{content:u,children:(0,y.jsxs)(tW,{color:"subtle",className:"relative flex gap-1",ellipsis:!0,children:[r?(0,y.jsx)("div",{children:r}):null,(0,y.jsx)(tW,{ellipsis:!0,size:"12",weight:"medium",children:l})]})}),h&&(0,y.jsx)(tW,{color:"contrast",children:"asc"===o?(0,y.jsx)(le.kqg,{className:"scale-75"}):(0,y.jsx)(le.EMN,{className:"scale-75"})}),f&&!h&&(0,y.jsx)(tW,{color:"verySubtle",children:(0,y.jsx)(le.kqg,{className:"scale-75"})})]})})},n)})})}),(0,y.jsxs)("tbody",{className:"bg-gray-50 dark:bg-graydark-50",children:[l&&(0,y.jsx)("tr",{className:"bg-gray-50 dark:bg-graydark-50 border-l border-r border-b border-gray-200 dark:border-graydark-200",children:t.map((e,t)=>{let{id:n,summary:r,contentClassName:i,cellClassName:o}=e;return(0,y.jsx)("td",{className:v(t,o,!1),children:(0,y.jsx)("div",{className:g(t,i),children:r&&r()})},n)})}),"currentData"===m&&(null==n?void 0:n.map(e=>(0,y.jsx)("tr",{id:e.id,onClick:e.onClick,className:(0,eo.cx)("border-b border-gray-200/50 dark:border-graydark-100",e.onClick?"cursor-pointer":""),children:t.map((t,n)=>{let{id:i,render:o,contentClassName:a,cellClassName:s}=t;return(0,y.jsx)("td",{className:(0,eo.cx)(v(n,s,!1),h===e.id?["shadow-border-y","first:shadow-border-tlb","last:shadow-border-trb"]:"","default"===p?"!shadow-blue-900 dark:!shadow-blue-200":"","blue"===p?"!shadow-blue-500 dark:!shadow-blue-400":"","red"===p?"!shadow-red-500 dark:!shadow-red-400":"","amber"===p?"!shadow-amber-500 dark:!shadow-amber-500":"","green"===p?"!shadow-green-500 dark:!shadow-green-400":""),children:(0,y.jsx)("div",{className:(0,eo.cx)(g(n,a),"dense"===u?"h-[50px]":"h-[100px]"),children:(0,y.jsx)(o,{data:e,context:r})})},"".concat(i,"/").concat(e.id))})},e.id))),"skeleton"===m&&k0()(c).map(e=>(0,y.jsx)("tr",{className:"border-b border-gray-200/50 dark:border-graydark-100",children:t.map((e,t)=>{let{id:n,contentClassName:r,cellClassName:i}=e;return(0,y.jsx)("td",{className:v(t,i,!1),children:(0,y.jsx)("div",{className:(0,eo.cx)(g(t,r),"dense"===u?"h-[50px]":"h-[100px]")})},"".concat(t,"/").concat(n))})},e))]})]}),"emptyState"===m&&f]})}var Sh=n(5632);function Sp(e){let{offset:t,limit:n,datasetTotal:r,isLoading:i}=e,o=(0,Sh.useRouter)();return(0,y.jsxs)(lb,{children:[(0,y.jsx)(s9,{icon:"contrast",disabled:t<=0,size:"small",variant:"gray",className:"rounded-r-none",onClick:()=>o.push({query:{...o.query,offset:0}}),children:(0,y.jsx)("div",{className:"flex scale-[0.65]",children:(0,y.jsx)(le.XJM,{})})}),(0,y.jsx)(s9,{icon:"contrast",disabled:t<=0,size:"small",variant:"gray",className:"rounded-none",onClick:()=>o.push({query:{...o.query,offset:Math.max(t-n,0)}}),children:(0,y.jsx)(le.bdU,{})}),(0,y.jsx)(s9,{state:"waiting",className:"rounded-none px-3",children:r>0?"".concat(t+1," - ").concat(Math.min(t+n,r)," of ").concat(r?r.toLocaleString():""):i?(0,y.jsx)(j3,{className:"px-2"}):"No results"}),(0,y.jsx)(s9,{icon:"contrast",disabled:t+n>=r,size:"small",variant:"gray",className:"rounded-none",onClick:()=>o.push({query:{...o.query,offset:Math.min(t+n,r)}}),children:(0,y.jsx)(le.VUy,{})}),(0,y.jsx)(s9,{icon:"contrast",disabled:t+n>=r,size:"small",variant:"gray",className:"rounded-l-none",onClick:()=>o.push({query:{...o.query,offset:Math.floor(r/n)*n}}),children:(0,y.jsx)("div",{className:"flex",style:{transform:"scale(0.65)"},children:(0,y.jsx)(le.RRj,{})})})]})}function Sm(e){let{offset:t,limit:n,pageTotal:r,isLoading:i}=e,o=(0,Sh.useRouter)(),a=Math.min(t+n,t+r);return(0,y.jsxs)(lb,{children:[(0,y.jsx)(s9,{icon:"contrast",disabled:t<=0,size:"small",variant:"gray",className:"rounded-r-none",onClick:()=>o.push({query:{...o.query,offset:0}}),children:(0,y.jsx)("div",{className:"flex scale-[0.65]",children:(0,y.jsx)(le.XJM,{})})}),(0,y.jsx)(s9,{icon:"contrast",disabled:t<=0,size:"small",variant:"gray",className:"rounded-none",onClick:()=>o.push({query:{...o.query,offset:Math.max(t-n,0)}}),children:(0,y.jsx)(le.bdU,{})}),i?(0,y.jsx)(s9,{className:"rounded-none px-3",state:"waiting",color:"subtle",children:(0,y.jsx)(j3,{className:"px-2"})}):r?(0,y.jsxs)(s9,{className:"rounded-none px-3",state:"waiting",children:[t+1," - ",a]}):(0,y.jsx)(s9,{className:"rounded-none px-3",state:"waiting",color:"subtle",children:"none"}),(0,y.jsx)(s9,{icon:"contrast",disabled:r!==n,size:"small",variant:"gray",className:"rounded-none",onClick:()=>o.push({query:{...o.query,offset:t+n}}),children:(0,y.jsx)(le.VUy,{})})]})}function Sv(e){let{title:t,nav:n,stats:r,actions:i}=e;return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)("div",{className:"flex items-center gap-2 px-6 h-14 z-10 bg-white dark:bg-graydark-50 border-b border-gray-500 dark:border-graydark-500",children:[t?"string"==typeof t?(0,y.jsx)(tW,{font:"mono",size:"18",weight:"bold",className:"hidden lg:block relative -top-px",children:t}):t:null,(0,y.jsxs)("div",{className:"flex-1 flex gap-4 items-center justify-between h-full px-1 -mx-1 overflow-x-hidden",children:[(0,y.jsx)("div",{className:"flex gap-2 items-center h-full flex-1 overflow-x-hidden",children:n}),(0,y.jsx)("div",{className:"flex gap-2 items-center h-full",children:i})]})]}),r&&(0,y.jsx)("div",{className:"flex items-center gap-2 px-6 py-3 h-10 z-10 bg-gray-50 dark:bg-graydark-50 border-b border-gray-300 dark:border-graydark-300",children:r})]})}let Sg=("string"==typeof(d={src:"/_next/static/media/background-pattern.b997b25c.jpg",height:104,width:34,blurDataURL:"data:image/jpeg;base64,/9j/2wBDAAoHBwgHBgoICAgLCgoLDhgQDg0NDh0VFhEYIx8lJCIfIiEmKzcvJik0KSEiMEExNDk7Pj4+JS5ESUM8SDc9Pjv/2wBDAQoLCw4NDhwQEBw7KCIoOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozv/wAARCAAIAAMDASIAAhEBAxEB/8QAFQABAQAAAAAAAAAAAAAAAAAAAAX/xAAZEAADAAMAAAAAAAAAAAAAAAAAAQISIpH/xAAUAQEAAAAAAAAAAAAAAAAAAAAA/8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMRAD8ArRbxWi6AAP/Z",blurWidth:3,blurHeight:8})?{src:d}:d).src;function Sy(e){let{children:t}=e;return(0,y.jsxs)("div",{className:"relative -z-10 opacity-100 pointer-events-none",children:[(0,y.jsx)("div",{className:"fixed top-0 left-0 right-0 bottom-0 z-10 bg-white dark:bg-graydark-50"}),(0,y.jsx)("div",{className:"fixed top-0 left-0 right-0 w-[200vw] h-[200vh] opacity-30 z-30 translate-x[-50vw] translate-y[-100vh]",style:{backgroundImage:"url(".concat(Sg,")"),backgroundPositionY:"bottom",backgroundSize:"auto"}}),(0,y.jsx)("div",{className:"fixed top-0 left-0 right-0 bottom-0 opacity-95 z-40 bg-white dark:bg-graydark-50"}),t]})}var Sb=n(97729),Sx=n.n(Sb);function Sw(e){let{appName:t,title:n,children:r}=e,i=n?"".concat(t," - ").concat(n):t;return(0,y.jsxs)(Sx(),{children:[(0,y.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1.0"}),(0,y.jsx)("link",{rel:"apple-touch-icon",sizes:"180x180",href:"/apple-touch-icon.png"}),(0,y.jsx)("link",{rel:"icon",type:"image/png",sizes:"32x32",href:"/favicon-32x32.png"}),(0,y.jsx)("link",{rel:"icon",type:"image/png",sizes:"16x16",href:"/favicon-16x16.png"}),(0,y.jsx)("link",{rel:"manifest",href:"/site.webmanifest"}),(0,y.jsx)("link",{rel:"mask-icon",href:"/safari-pinned-tab.svg",color:"#1ed660"}),(0,y.jsx)("meta",{name:"msapplication-TileColor",content:"#2b5797"}),(0,y.jsx)("meta",{name:"theme-color",content:"#ffffff"}),r,(0,y.jsx)("title",{children:i})]})}function Sj(e){let{appName:t,title:n,children:r}=e;return(0,y.jsxs)("div",{className:"h-screen",children:[(0,y.jsx)(Sw,{appName:t,title:n}),r]})}function SE(e){let{appName:t,title:n,children:r,filters:i,actions:o}=e;return(0,y.jsxs)(Sj,{appName:t,title:n,children:[(0,y.jsx)(Sy,{}),(0,y.jsx)("div",{className:"flex h-full",children:(0,y.jsxs)("div",{className:"flex flex-col flex-1",children:[(0,y.jsx)(Sv,{nav:i,actions:o}),(0,y.jsx)("div",{className:"flex-1",children:(0,y.jsx)(lw,{className:"h-full",children:r})})]})})]})}function Sk(e){let{size:t="12",wallet:{sc:n,sf:r}}=e;return(0,y.jsx)(tW,{size:t,weight:"medium",children:"".concat((0,vc.Vz)(n,{fixed:0})," ").concat(r&&r>0?" | ".concat((0,vc.ES)(r)):"")})}var SS=n(82876);function S_(e){let{title:t,children:n,route:r,onClick:i}=e,o=(0,SS.usePathname)(),a=r&&("/"===r?o===r:null==o?void 0:o.startsWith(r));return r?(0,y.jsx)(cQ,{href:r,className:"no-underline",children:(0,y.jsx)(s8,{side:"right",align:"center",delayDuration:0,sideOffset:5,content:t,children:(0,y.jsx)(s9,{icon:"contrast",size:"none",variant:"state","data-state":a?"open":"closed",onClick:i,children:n})})}):(0,y.jsx)(s8,{side:"right",align:"center",delayDuration:0,sideOffset:5,content:t,children:(0,y.jsx)(s9,{icon:"contrast",size:"none",variant:"state","data-state":a?"open":"closed",onClick:i,children:n})})}function SC(e){let{walletBalance:t,isSynced:n,routes:r}=e;return(0,y.jsx)(S_,{title:"Wallet",route:r.wallet.view,children:(0,y.jsxs)("div",{className:"flex flex-col gap-3 items-center",children:[(0,y.jsx)(le.oaN,{}),n&&t&&(0,y.jsx)(Sk,{wallet:{sc:t}})]})})}function SO(e){let{routes:t,profile:n,isSynced:r,showWallet:i=!0,walletBalance:o,lock:a,openSettings:s,children:l}=e;return(0,y.jsx)(tK,{className:"relative overflow-hidden z-10 h-full w-[75px] rounded-none border-y-0",children:(0,y.jsxs)("div",{className:"flex flex-col items-center h-full",children:[(0,y.jsx)("div",{className:"flex items-center justify-center",style:{height:"".concat(60,"px")},children:n||(0,y.jsx)(c2,{size:30})}),(0,y.jsxs)("div",{className:"flex flex-col gap-6 items-center pt-4 pb-6 h-full",children:[(0,y.jsx)("div",{className:"flex flex-col gap-6 items-center",children:l}),(0,y.jsx)("div",{className:"flex-1"}),(0,y.jsx)(cj,{className:"w-full"}),i&&(0,y.jsx)(SC,{routes:t,isSynced:r,walletBalance:o}),(0,y.jsx)(S_,{title:"Blockchain node",route:t.node.index,children:(0,y.jsx)(le.kBK,{})}),(0,y.jsx)(S_,{title:"App preferences",onClick:()=>s(),children:(0,y.jsx)(le.UG6,{})}),(0,y.jsx)(S_,{title:"Lock app",onClick:a,children:(0,y.jsx)(le.mBM,{})})]})]})})}var SM=Object.create,ST=Object.defineProperty,SA=Object.getOwnPropertyDescriptor,SP=Object.getOwnPropertyNames,SN=Object.getPrototypeOf,SR=Object.prototype.hasOwnProperty,SD=(m=null!=(p=(f=(e,t)=>{var r,i;r=e,i=function(e){var t,n=void 0===Number.MAX_SAFE_INTEGER?9007199254740991:Number.MAX_SAFE_INTEGER,r=2*536870912,i=new WeakMap,o=(t=function(e,t){return i.set(e,t),t},function(e){var o=i.get(e),a=void 0===o?e.size:on)throw Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;e.has(a);)a=Math.floor(Math.random()*n);return t(e,a)});e.addUniqueNumber=function(e){var t=o(e);return e.add(t),t},e.generateUniqueNumber=o},"object"==typeof e&&"u">typeof t?i(e):"function"==typeof define&&n.amdO?define(["exports"],i):i((r="u">typeof globalThis?globalThis:r||self).fastUniqueNumbers={})},()=>(h||f((h={exports:{}}).exports,h),h.exports))())?SM(SN(p)):{},((e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let n of SP(t))SR.call(e,n)||void 0===n||ST(e,n,{get:()=>t[n],enumerable:!(r=SA(t,n))||r.enumerable});return e})(p&&p.__esModule?m:ST(m,"default",{value:p,enumerable:!0}),p)),SL=e=>void 0!==e.method&&"call"===e.method,SF=e=>null===e.error&&"number"==typeof e.id;v=e=>{let t=new Map([[0,()=>{}]]),n=new Map([[0,()=>{}]]),r=new Map,i=new Worker(e);return i.addEventListener("message",({data:e})=>{if(SL(e)){let{params:{timerId:i,timerType:o}}=e;if("interval"===o){let e=t.get(i);if("number"==typeof e){let t=r.get(e);if(void 0===t||t.timerId!==i||t.timerType!==o)throw Error("The timer is in an undefined state.")}else if("u">typeof e)e();else throw Error("The timer is in an undefined state.")}else if("timeout"===o){let e=n.get(i);if("number"==typeof e){let t=r.get(e);if(void 0===t||t.timerId!==i||t.timerType!==o)throw Error("The timer is in an undefined state.")}else if("u">typeof e)e(),n.delete(i);else throw Error("The timer is in an undefined state.")}}else if(SF(e)){let{id:i}=e,o=r.get(i);if(void 0===o)throw Error("The timer is in an undefined state.");let{timerId:a,timerType:s}=o;r.delete(i),"interval"===s?t.delete(a):n.delete(a)}else{let{error:{message:t}}=e;throw Error(t)}}),{clearInterval:e=>{let n=(0,SD.generateUniqueNumber)(r);r.set(n,{timerId:e,timerType:"interval"}),t.set(e,n),i.postMessage({id:n,method:"clear",params:{timerId:e,timerType:"interval"}})},clearTimeout:e=>{let t=(0,SD.generateUniqueNumber)(r);r.set(t,{timerId:e,timerType:"timeout"}),n.set(e,t),i.postMessage({id:t,method:"clear",params:{timerId:e,timerType:"timeout"}})},setInterval:(e,n)=>{let r=(0,SD.generateUniqueNumber)(t);return t.set(r,()=>{e(),"function"==typeof t.get(r)&&i.postMessage({id:null,method:"set",params:{delay:n,now:performance.now(),timerId:r,timerType:"interval"}})}),i.postMessage({id:null,method:"set",params:{delay:n,now:performance.now(),timerId:r,timerType:"interval"}}),r},setTimeout:(e,t)=>{let r=(0,SD.generateUniqueNumber)(n);return n.set(r,e),i.postMessage({id:null,method:"set",params:{delay:t,now:performance.now(),timerId:r,timerType:"timeout"}}),r}}},a=null,()=>{if(null!==a)return a;let e=new Blob(['(()=>{"use strict";const e=new Map,t=new Map,r=(e,t)=>{let r,o;const i=performance.now();r=i,o=e-Math.max(0,i-t);return{expected:r+o,remainingDelay:o}},o=(e,t,r,i)=>{const s=performance.now();s>r?postMessage({id:null,method:"call",params:{timerId:t,timerType:i}}):e.set(t,setTimeout(o,r-s,e,t,r,i))};addEventListener("message",(i=>{let{data:s}=i;try{if("clear"===s.method){const{id:r,params:{timerId:o,timerType:i}}=s;if("interval"===i)(t=>{const r=e.get(t);if(void 0===r)throw new Error(\'There is no interval scheduled with the given id "\'.concat(t,\'".\'));clearTimeout(r),e.delete(t)})(o),postMessage({error:null,id:r});else{if("timeout"!==i)throw new Error(\'The given type "\'.concat(i,\'" is not supported\'));(e=>{const r=t.get(e);if(void 0===r)throw new Error(\'There is no timeout scheduled with the given id "\'.concat(e,\'".\'));clearTimeout(r),t.delete(e)})(o),postMessage({error:null,id:r})}}else{if("set"!==s.method)throw new Error(\'The given method "\'.concat(s.method,\'" is not supported\'));{const{params:{delay:i,now:n,timerId:a,timerType:d}}=s;if("interval"===d)((t,i,s)=>{const{expected:n,remainingDelay:a}=r(t,s);e.set(i,setTimeout(o,a,e,i,n,"interval"))})(i,a,n);else{if("timeout"!==d)throw new Error(\'The given type "\'.concat(d,\'" is not supported\'));((e,i,s)=>{const{expected:n,remainingDelay:a}=r(e,s);t.set(i,setTimeout(o,a,t,i,n,"timeout"))})(i,a,n)}}}}catch(e){postMessage({error:{message:e.message},id:s.id,result:null})}}))})();'],{type:"application/javascript; charset=utf-8"}),t=URL.createObjectURL(e);return a=v(t),setTimeout(()=>URL.revokeObjectURL(t)),a};var Sz=(typeof window>"u"?"undefined":typeof window)=="object",SV={setTimeout:Sz?setTimeout.bind(window):setTimeout,clearTimeout:Sz?clearTimeout.bind(window):clearTimeout,setInterval:Sz?setInterval.bind(window):setInterval,clearInterval:Sz?clearInterval.bind(window):clearInterval},SI={},SZ=class{name;closed=!1;mc=new MessageChannel;constructor(e){this.name=e,SI[e]=SI[e]||[],SI[e].push(this),this.mc.port1.start(),this.mc.port2.start(),this.onStorage=this.onStorage.bind(this),window.addEventListener("storage",this.onStorage)}onStorage(e){if(e.storageArea!==window.localStorage||e.key.substring(0,this.name.length)!==this.name||null===e.newValue)return;let t=JSON.parse(e.newValue);this.mc.port2.postMessage(t)}postMessage(e){if(this.closed)throw Error("InvalidStateError");let t=JSON.stringify(e),n=`${this.name}:${String(Date.now())}${String(Math.random())}`;window.localStorage.setItem(n,t),SV.setTimeout(()=>{window.localStorage.removeItem(n)},500),SI[this.name].forEach(e=>{e!==this&&e.mc.port2.postMessage(JSON.parse(t))})}close(){if(this.closed)return;this.closed=!0,this.mc.port1.close(),this.mc.port2.close(),window.removeEventListener("storage",this.onStorage);let e=SI[this.name].indexOf(this);SI[this.name].splice(e,1)}get onmessage(){return this.mc.port1.onmessage}set onmessage(e){this.mc.port1.onmessage=e}get onmessageerror(){return this.mc.port1.onmessageerror}set onmessageerror(e){this.mc.port1.onmessageerror=e}addEventListener(e,t){return this.mc.port1.addEventListener(e,t)}removeEventListener(e,t){return this.mc.port1.removeEventListener(e,t)}dispatchEvent(e){return this.mc.port1.dispatchEvent(e)}},SB=typeof window>"u"?void 0:"function"==typeof window.BroadcastChannel?window.BroadcastChannel:SZ;function SH(){return Math.random().toString(36).substring(2)}var SU=class{options;channel;token=SH();isLeader=!1;isDead=!1;isApplying=!1;reApply=!1;intervals=[];listeners=[];deferred;constructor(e,t){this.channel=e,this.options=t,this.apply=this.apply.bind(this),this.awaitLeadership=this.awaitLeadership.bind(this),this.sendAction=this.sendAction.bind(this)}async apply(){if(this.isLeader||this.isDead)return!1;if(this.isApplying)return this.reApply=!0,!1;this.isApplying=!0;let e=!1,t=t=>{let{token:n,action:r}=t.data;n!==this.token&&(0===r&&n>this.token&&(e=!0),1===r&&(e=!0))};this.channel.addEventListener("message",t);try{return this.sendAction(0),await function(e=0){return new Promise(t=>SV.setTimeout(t,e))}(this.options.responseTime),this.channel.removeEventListener("message",t),this.isApplying=!1,e?!!this.reApply&&this.apply():(this.assumeLead(),!0)}catch{return!1}}awaitLeadership(){if(this.isLeader)return Promise.resolve();let e=!1,t=null;return new Promise(n=>{let r=()=>{if(e)return;e=!0;try{SV.clearInterval(t)}catch{}let r=this.intervals.indexOf(t);r>=0&&this.intervals.splice(r,1),this.channel.removeEventListener("message",i),n()};t=SV.setInterval(()=>{this.apply().then(()=>{this.isLeader&&r()})},this.options.fallbackInterval),this.intervals.push(t);let i=e=>{let{action:t}=e.data;2===t&&this.apply().then(()=>{this.isLeader&&r()})};this.channel.addEventListener("message",i)})}sendAction(e){this.channel.postMessage({action:e,token:this.token})}assumeLead(){this.isLeader=!0;let e=e=>{let{action:t}=e.data;0===t&&this.sendAction(1)};return this.channel.addEventListener("message",e),this.listeners.push(e),this.sendAction(1)}waitForLeadership(){return this.deferred||(this.deferred=this.awaitLeadership()),this.deferred}close(){if(!this.isDead){this.isDead=!0,this.isLeader=!1,this.sendAction(2);try{this.listeners.forEach(e=>this.channel.removeEventListener("message",e)),this.intervals.forEach(e=>SV.clearInterval(e))}catch{}}}},SW=class{channel;options;elector;token=SH();registry=new Map;allIdle=!1;isLastActive=!1;constructor(e){let{channelName:t}=e;this.options=e,this.channel=new SB(t),this.registry.set(this.token,1),e.leaderElection&&(this.elector=new SU(this.channel,{fallbackInterval:2e3,responseTime:100}),this.elector.waitForLeadership()),this.channel.addEventListener("message",e=>{let{action:t,token:n,data:r}=e.data;switch(t){case 3:this.registry.set(n,2);break;case 4:this.registry.delete(n);break;case 5:this.idle(n);break;case 6:this.active(n);break;case 7:this.prompt(n);break;case 8:this.start(n);break;case 9:this.reset(n);break;case 10:this.activate(n);break;case 11:this.pause(n);break;case 12:this.resume(n);break;case 13:this.options.onMessage(r)}}),this.send(3)}get isLeader(){if(!this.elector)throw Error('❌ Leader election is not enabled. To Enable it set the "leaderElection" property to true.');return this.elector.isLeader}prompt(e=this.token){this.registry.set(e,0);let t=[...this.registry.values()].every(e=>0===e);e===this.token&&this.send(7),t&&this.options.onPrompt()}idle(e=this.token){this.registry.set(e,2);let t=[...this.registry.values()].every(e=>2===e);e===this.token&&this.send(5),!this.allIdle&&t&&(this.allIdle=!0,this.options.onIdle())}active(e=this.token){this.allIdle=!1,this.registry.set(e,1);let t=[...this.registry.values()].some(e=>1===e);e===this.token&&this.send(6),t&&this.options.onActive(),this.isLastActive=e===this.token}start(e=this.token){this.allIdle=!1,this.registry.set(e,1),e===this.token?this.send(8):this.options.start(!0),this.isLastActive=e===this.token}reset(e=this.token){this.allIdle=!1,this.registry.set(e,1),e===this.token?this.send(9):this.options.reset(!0),this.isLastActive=e===this.token}activate(e=this.token){this.allIdle=!1,this.registry.set(e,1),e===this.token?this.send(10):this.options.activate(!0),this.isLastActive=e===this.token}pause(e=this.token){e===this.token?this.send(11):this.options.pause(!0)}resume(e=this.token){e===this.token?this.send(12):this.options.resume(!0)}message(e){try{this.channel.postMessage({action:13,token:this.token,data:e})}catch{}}send(e){try{this.channel.postMessage({action:e,token:this.token})}catch{}}close(){this.options.leaderElection&&this.elector.close(),this.send(4),this.channel.close()}},Sq=Sz?document:null,S$=["mousemove","keydown","wheel","DOMMouseScroll","mousewheel","mousedown","touchstart","touchmove","MSPointerDown","MSPointerMove","visibilitychange","focus"];function SK(e,t){let n=0;return function(...r){let i=new Date().getTime();if(!(i-nDate.now();function SG(e){let{route:t}=e,n=(0,fR.Nf)({route:t,config:{swr:{refreshInterval:3e4}}});return{isConnected:!n.error,isValidating:n.isValidating}}function SX(e){let{appName:t,title:n,navTitle:r,profile:i,size:o="4",banner:a,nav:s,actions:l,stats:u,children:c,sidenav:d,connectivityRoute:f,isSynced:h,showWallet:p,walletBalance:m,routes:v,scroll:g=!0,openSettings:x}=e,{lock:w,settings:j}=(0,fR.Hv)();return!function(e){let{lock:t,route:n,routes:r}=e,{isConnected:i,isValidating:o}=SG({route:n}),{settings:a}=(0,fR.Hv)(),s=(0,Sh.useRouter)();(0,b.useEffect)(()=>{if(o)return;let e=!s.asPath.startsWith(r.login),n=!a.password||!i;if(e&&n){t();return}},[s,a.password,i,o])}({lock:w,route:f,routes:v}),!function(e){let{enabled:t,lock:n,lockTimeout:r}=e,i=(0,b.useCallback)(()=>{n()},[n]);!function({timeout:e=12e5,promptTimeout:t=0,promptBeforeIdle:n=0,element:r=Sq,events:i=S$,timers:o,immediateEvents:a=[],onPresenceChange:s=()=>{},onPrompt:l=()=>{},onIdle:u=()=>{},onActive:c=()=>{},onAction:d=()=>{},onMessage:f=()=>{},debounce:h=0,throttle:p=0,eventsThrottle:m=200,startOnMount:v=!0,startManually:g=!1,stopOnIdle:y=!1,crossTab:x=!1,name:w="idle-timer",syncTimers:j=0,leaderElection:E=!1,disabled:k=!1}={}){let S=(0,b.useRef)(SY()),_=(0,b.useRef)(SY()),C=(0,b.useRef)(null),O=(0,b.useRef)(null),M=(0,b.useRef)(0),T=(0,b.useRef)(0),A=(0,b.useRef)(0),P=(0,b.useRef)(0),N=(0,b.useRef)(!1),R=(0,b.useRef)(!1),D=(0,b.useRef)(!1),L=(0,b.useRef)(!0),F=(0,b.useRef)(!1),z=(0,b.useRef)(null),V=(0,b.useRef)(null),I=(0,b.useRef)(e),Z=(0,b.useRef)(0);(0,b.useEffect)(()=>{if(t&&console.warn("⚠️ IdleTimer -- The `promptTimeout` property has been deprecated in favor of `promptBeforeIdle`. It will be removed in the next major release."),n&&t)throw Error("❌ Both promptTimeout and promptBeforeIdle can not be set. The promptTimeout property will be deprecated in a future version.");if(e>=2147483647)throw Error(`\u274C The value for the timeout property must fit in a 32 bit signed integer, 2147483647.`);if(t>=2147483647)throw Error(`\u274C The value for the promptTimeout property must fit in a 32 bit signed integer, 2147483647.`);if(n>=2147483647)throw Error(`\u274C The value for the promptBeforeIdle property must fit in a 32 bit signed integer, 2147483647.`);if(n>=e)throw Error(`\u274C The value for the promptBeforeIdle property must be less than the timeout property, ${e}.`);if(n?(I.current=e-n,Z.current=n):(I.current=e,Z.current=t),!L.current){if(g||k)return;N.current&&(G.current(null,eA),V.current&&V.current.active()),ed()}},[e,t,n,g,k]);let B=(0,b.useRef)(y);(0,b.useEffect)(()=>{B.current=y},[y]);let H=(0,b.useRef)(a),U=(0,b.useRef)(r),W=(0,b.useRef)([...new Set([...i,...a]).values()]),q=(0,b.useRef)(k);(0,b.useEffect)(()=>{q.current=k,!L.current&&(k?ep():g||ed())},[k]);let $=(0,b.useRef)(s);(0,b.useEffect)(()=>{$.current=s},[s]);let K=(0,b.useRef)(l);(0,b.useEffect)(()=>{K.current=l},[l]);let Y=(0,b.useRef)(u);(0,b.useEffect)(()=>{Y.current=u},[u]);let G=(0,b.useRef)(c);(0,b.useEffect)(()=>{G.current=c},[c]);let X=(0,b.useRef)(d);(0,b.useEffect)(()=>{X.current=d},[d]);let J=(0,b.useRef)(f);(0,b.useEffect)(()=>{J.current=f},[f]);let Q=(0,b.useMemo)(()=>{let e=(e,t)=>X.current(e,t);return h>0?function(e,t){let n;function r(...i){n&&clearTimeout(n),n=setTimeout(()=>{e(...i),n=null},t)}return r.cancel=function(){clearTimeout(n)},r}(e,h):p>0?SK(e,p):e},[p,h]),ee=(0,b.useRef)();(0,b.useEffect)(()=>{x&&j&&(ee.current=SK(()=>{V.current.active()},j))},[x,j]);let et=()=>{null!==z.current&&(SV.clearTimeout(z.current),z.current=null)},en=(e,t=!0)=>{et(),z.current=SV.setTimeout(ea,e||I.current),t&&(O.current=SY())},er=e=>{R.current||N.current||(K.current(e,eA),$.current({type:"active",prompted:!0},eA)),P.current=0,A.current=SY(),R.current=!0,en(Z.current,!1)},ei=()=>{et(),N.current||(Y.current(null,eA),$.current({type:"idle"},eA)),N.current=!0,C.current=SY(),B.current?ec():R.current&&(A.current=0,R.current=!1)},eo=e=>{et(),(N.current||R.current)&&(G.current(e,eA),$.current({type:"active",prompted:!1},eA)),R.current=!1,A.current=0,N.current=!1,M.current+=SY()-C.current,T.current+=SY()-C.current,eu(),en()},ea=e=>{if(!N.current){Q.cancel&&Q.cancel();let t=SY()-O.current;if(!(I.current+Z.current0&&!R.current){V.current?V.current.prompt():er(e);return}V.current?V.current.idle():ei();return}V.current?V.current.active():eo(e)},es=e=>{if(v||O.current||(O.current=SY(),G.current(null,eA)),Q(e,eA),R.current)return;if(et(),!N.current&&H.current.includes(e.type)){ea(e);return}let t=SY()-O.current;if(N.current&&!y||!N.current&&t>=I.current){ea(e);return}D.current=!1,P.current=0,A.current=0,en(),x&&j&&ee.current()},el=(0,b.useRef)(es);(0,b.useEffect)(()=>{let e=F.current;e&&ec(),m>0?el.current=SK(es,m):el.current=es,e&&eu()},[m,p,h,X,x,j]);let eu=()=>{Sz&&U.current&&(F.current||(W.current.forEach(e=>{U.current.addEventListener(e,el.current,{capture:!0,passive:!0})}),F.current=!0))},ec=(e=!1)=>{Sz&&U.current&&(F.current||e)&&(W.current.forEach(e=>{U.current.removeEventListener(e,el.current,{capture:!0})}),F.current=!1)},ed=(0,b.useCallback)(e=>!q.current&&(et(),eu(),N.current=!1,R.current=!1,D.current=!1,P.current=0,A.current=0,V.current&&!e&&V.current.start(),en(),!0),[z,N,q,I,V]),ef=(0,b.useCallback)(e=>!q.current&&(et(),eu(),_.current=SY(),M.current+=SY()-C.current,T.current+=SY()-C.current,M.current=0,N.current=!1,R.current=!1,D.current=!1,P.current=0,A.current=0,V.current&&!e&&V.current.reset(),g||en(),!0),[z,N,I,g,q,V]),eh=(0,b.useCallback)(e=>!q.current&&(et(),eu(),(N.current||R.current)&&eo(),N.current=!1,R.current=!1,D.current=!1,P.current=0,A.current=0,_.current=SY(),V.current&&!e&&V.current.activate(),en(),!0),[z,N,R,q,I,V]),ep=(0,b.useCallback)((e=!1)=>!q.current&&!D.current&&(P.current=ej(),D.current=!0,ec(),et(),V.current&&!e&&V.current.pause(),!0),[z,q,V]),em=(0,b.useCallback)((e=!1)=>!q.current&&!!D.current&&(D.current=!1,R.current||eu(),N.current||en(P.current),A.current&&(A.current=SY()),V.current&&!e&&V.current.resume(),!0),[z,I,q,P,V]),ev=(0,b.useCallback)((e,t)=>(V.current?(t&&J.current(e,eA),V.current.message(e)):t&&J.current(e,eA),!0),[f]),eg=(0,b.useCallback)(()=>N.current,[N]),ey=(0,b.useCallback)(()=>R.current,[R]),eb=(0,b.useCallback)(()=>V.current?V.current.isLeader:null,[V]),ex=(0,b.useCallback)(()=>V.current?V.current.isLastActive:null,[V]),ew=(0,b.useCallback)(()=>V.current?V.current.token:null,[V]),ej=(0,b.useCallback)(()=>{if(D.current)return P.current;let e=Math.floor((P.current?P.current:Z.current+I.current)-(O.current?SY()-O.current:0));return e<0?0:Math.abs(e)},[I,Z,R,P,O]),eE=(0,b.useCallback)(()=>Math.round(SY()-_.current),[_]),ek=(0,b.useCallback)(()=>Math.round(SY()-S.current),[S]),eS=(0,b.useCallback)(()=>C.current?new Date(C.current):null,[C]),e_=(0,b.useCallback)(()=>O.current?new Date(O.current):null,[O]),eC=(0,b.useCallback)(()=>N.current?Math.round(SY()-C.current+M.current):Math.round(M.current),[C,M]),eO=(0,b.useCallback)(()=>N.current?Math.round(SY()-C.current+T.current):Math.round(T.current),[C,T]),eM=(0,b.useCallback)(()=>{let e=Math.round(eE()-eC());return e>=0?e:0},[C,M]),eT=(0,b.useCallback)(()=>{let e=Math.round(ek()-eO());return e>=0?e:0},[C,M]);(0,b.useEffect)(()=>{if(h>0&&p>0)throw Error("❌ onAction can either be throttled or debounced, not both.");o&&(SV.setTimeout=o.setTimeout,SV.clearTimeout=o.clearTimeout,SV.setInterval=o.setInterval,SV.clearInterval=o.clearInterval);let e=()=>{V.current&&V.current.close(),Q.cancel&&Q.cancel(),et(),ec(!0)};return Sz&&window.addEventListener("beforeunload",e),()=>{Sz&&window.removeEventListener("beforeunload",e),V.current&&V.current.close(),Q.cancel&&Q.cancel(),et(),ec(!0)}},[]),(0,b.useEffect)(()=>{V.current&&V.current.close(),x?V.current=new SW({channelName:w,leaderElection:E,onPrompt:()=>{er()},onIdle:()=>{ei()},onActive:()=>{eo()},onMessage:e=>{J.current(e,eA)},start:ed,reset:ef,activate:eh,pause:ep,resume:em}):V.current=null},[x,w,E,K,Y,G,J,ed,ef,ep,em]),(0,b.useEffect)(()=>{L.current||(et(),ec(!0)),g||k||(v?ed():eu())},[g,v,k,L]),(0,b.useEffect)(()=>{if(!L.current){let e=[...new Set([...i,...a]).values()];ec(),W.current=e,U.current=r,H.current=a,g||k||(v?ed():eu())}},[r,JSON.stringify(i),JSON.stringify(a),L,k,g,v]),(0,b.useEffect)(()=>{L.current&&(L.current=!1)},[L]);let eA={message:ev,start:ed,reset:ef,activate:eh,pause:ep,resume:em,isIdle:eg,isPrompted:ey,isLeader:eb,isLastActiveTab:ex,getTabId:ew,getRemainingTime:ej,getElapsedTime:eE,getTotalElapsedTime:ek,getLastIdleTime:eS,getLastActiveTime:e_,getIdleTime:eC,getTotalIdleTime:eO,getActiveTime:eM,getTotalActiveTime:eT,setOnPresenceChange:e=>{s=e,$.current=e},setOnPrompt:e=>{l=e,K.current=e},setOnIdle:e=>{u=e,Y.current=e},setOnActive:e=>{c=e,G.current=e},setOnAction:e=>{d=e,X.current=e},setOnMessage:e=>{f=e,J.current=e}}}({disabled:!t,onIdle:i,timeout:r,throttle:5e3,eventsThrottle:5e3})}({enabled:!!j.autoLock,lockTimeout:j.autoLockTimeout,lock:w}),(0,y.jsxs)(Sj,{appName:t,title:n,children:[(0,y.jsx)(Sy,{}),(0,y.jsxs)("div",{className:"flex flex-col h-full w-full",children:[a,(0,y.jsxs)("div",{className:"flex flex-1 w-full overflow-hidden",children:[(0,y.jsx)(SO,{routes:v,profile:i,openSettings:x,lock:w,showWallet:p,walletBalance:m,isSynced:h,children:d}),(0,y.jsxs)("div",{className:"flex flex-col flex-1 overflow-hidden",children:[(0,y.jsx)(Sv,{title:void 0===r?n:r,nav:s,actions:l,stats:u}),g?(0,y.jsx)(l4,{className:"z-0",children:(0,y.jsx)(lw,{size:o,pad:!1,children:(0,y.jsx)("div",{className:"flex flex-col gap-5",children:c})})}):(0,y.jsx)(lw,{size:o,pad:!1,className:"flex-1 flex flex-col gap-5 overflow-hidden",children:c})]})]})]})]})}function SJ(e,t,n,r){let[i,o]=(0,b.useState)();return(0,b.useEffect)(()=>{!t&&e&&o(e.length)},[t,e,o]),(0,b.useMemo)(()=>n?"error":void 0===i||i>0&&!e?"loading":0===i?0===r.length?"noneYet":"noneMatchingFilters":void 0,[e,i,n,r])}function SQ(e){let{filtered:t}=e;return(0,y.jsxs)("div",{className:"flex flex-col gap-8 justify-center items-center h-[300px]",children:[(0,y.jsx)(tW,{children:(0,y.jsx)(le.Hb6,{className:"scale-[200%]"})}),(0,y.jsx)(tW,{color:"subtle",className:"text-center max-w-[500px]",children:t?"No matching alerts.":"There are currently no alerts."})]})}(0,b.createContext)(null).Consumer;let S0=[];function S1(e){let{open:t,onOpenChange:n,dismissOne:r,dismissMany:i,alerts:o,dataFieldOrder:a,dataFields:s}=e,l=SJ(o.data,o.isValidating,o.error,S0),[u,c]=(0,b.useState)(),d=(0,b.useMemo)(()=>{var e;return(null===(e=o.data)||void 0===e?void 0:e.filter(e=>!u||e.severity===u))||[]},[o.data,u]),f=(0,b.useCallback)(e=>{let t=Object.keys(e).sort((e,t)=>{let n=a.indexOf(e),r=a.indexOf(t);return -1===n&&-1===r?0:-1===n?1:-1===r?-1:n-r});return t},[a]);return(0,y.jsx)(l6,{open:t,onOpenChange:e=>{n(e)},contentVariants:{className:"w-[500px] h-[80vh]"},title:(0,y.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,y.jsxs)(cZ,{size:"20",children:["Alerts ",o.data?"(".concat(o.data.length,")"):""]}),(0,y.jsxs)("div",{className:"flex gap-1",children:[(0,y.jsx)(s9,{variant:"info"===u?"accent":"gray",onClick:()=>"info"===u?c(void 0):c("info"),children:"info"}),(0,y.jsx)(s9,{variant:"warning"===u?"accent":"gray",onClick:()=>"warning"===u?c(void 0):c("warning"),children:"warning"}),(0,y.jsx)(s9,{variant:"error"===u?"accent":"gray",onClick:()=>"error"===u?c(void 0):c("error"),children:"error"}),(0,y.jsx)(s9,{variant:"critical"===u?"accent":"gray",onClick:()=>"critical"===u?c(void 0):c("critical"),children:"critical"}),(0,y.jsx)("div",{className:"flex-1"}),!l&&!!d.length&&(0,y.jsxs)(s9,{tip:u?"dismiss ".concat(d.length):"dismiss all",onClick:()=>i(d.map(e=>e.id),u),children:[(0,y.jsx)(le.NlZ,{}),d.length>0?" ".concat(d.length):""]})]})]}),children:(0,y.jsxs)("div",{className:(0,eo.cx)("flex flex-col overflow-hidden -m-4","border-t border-gray-200 dark:border-graydark-300"),children:["noneYet"===l&&(0,y.jsx)(SQ,{filtered:!1}),"error"===l&&(0,y.jsx)("div",{className:(0,eo.cx)("flex items-center justify-center h-[100px]",S3()),children:(0,y.jsx)(tW,{size:"18",color:"subtle",children:o.error.message})}),"loading"===l&&(0,y.jsx)(S4,{}),!l&&(0,y.jsx)("div",{className:"flex flex-col",children:d.length?d.map(e=>(0,y.jsxs)("div",{className:(0,eo.cx)("flex flex-col gap-1 w-full p-4","border-t border-gray-200 dark:border-graydark-300","first:border-none"),children:[(0,y.jsxs)("div",{className:"flex justify-between gap-1 w-full",children:[(0,y.jsx)("div",{className:"flex-1 overflow-hidden",children:(0,y.jsxs)(tW,{weight:"medium",className:"w-full",children:[e.severity,": ",e.message]})}),(0,y.jsx)(s9,{tip:"Dismiss alert",onClick:()=>r(e.id),children:(0,y.jsx)(le.NlZ,{})})]}),(0,y.jsxs)("div",{className:"flex justify-between w-full",children:[(0,y.jsx)(tW,{color:"subtle",ellipsis:!0,children:"timestamp"}),(0,y.jsx)(tW,{color:"contrast",ellipsis:!0,children:(0,vc.rN)(e.timestamp,{timeStyle:"medium"})})]}),f(e.data).map(t=>{var n;let r=e.data[t];if(null==r||"object"==typeof r&&!Object.keys(r).length)return null;let i=(null==s?void 0:null===(n=s[t])||void 0===n?void 0:n.render)||S2;return(0,y.jsx)(i,{label:t,value:r},t)})]},e.id)):(0,y.jsx)(SQ,{filtered:!!u})})]})})}function S2(e){let{label:t,value:n}=e;return(0,y.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,y.jsx)(tW,{color:"subtle",children:t}),(0,y.jsx)(tW,{color:"contrast",ellipsis:!0,children:String(n)})]})}function S4(){return(0,y.jsx)(y.Fragment,{children:k0()(10,e=>(0,y.jsx)("div",{className:(0,eo.cx)("relative flex gap-4 p-3.5",S3()),children:(0,y.jsxs)("div",{className:"flex flex-col gap-2 w-full",children:[(0,y.jsxs)("div",{className:"flex justify-between gap-2 w-full",children:[(0,y.jsx)(fq,{className:"w-[160px] h-[20px]"}),(0,y.jsx)(fq,{className:"w-[160px] h-[20px]"})]}),(0,y.jsx)(fq,{className:"w-[100px] h-[20px]"}),(0,y.jsx)(fq,{className:"w-full h-[120px]"})]})},e))})}function S3(){return(0,eo.cx)("border-t border-gray-200 dark:border-graydark-300","first:border-none")}var S5=n(89644),S6=n.n(S5),S8=n(63955),S7=n(45861),S9=n.n(S7);function _e(e){let{form:t,field:n,name:r}=e,i=t.watch(r),o=t.formState.touchedFields[r]&&!!t.formState.errors[r],{ref:a,onChange:s,onBlur:l}=t.register(r,n.validation),u=(0,b.useCallback)(e=>{var r;s(e),null===(r=n.trigger)||void 0===r||r.forEach(e=>t.trigger(e))},[s,t,n]),c=(0,b.useCallback)((e,i)=>{var o;t.setValue(r,e,"boolean"==typeof i?i?{shouldValidate:!0,shouldDirty:!0,shouldTouch:!0}:void 0:i),null===(o=n.trigger)||void 0===o||o.forEach(e=>t.trigger(e))},[r,t,n]);return{ref:a,name:r,value:i,error:o,onBlur:l,onChange:u,setValue:c}}function _t(e){return(0,b.useCallback)(t=>{kD(S9()(t).map(t=>{let[n,r]=t;return"".concat(e[n].title||n,": ").concat(null==r?void 0:r.message)}).join(", "))},[e])}function _n(e){let{name:t,form:n,fields:r,size:i="small",autoComplete:o,spellCheck:a,state:s=!0,group:l=!0}=e,u=r[t],{ref:c,onChange:d,onBlur:f,error:h}=_e({name:t,form:n,field:u}),p=(0,y.jsx)(fl,{ref:c,name:t,placeholder:u.placeholder,size:i,autoComplete:o,type:u.type,readOnly:u.readOnly,spellCheck:a,onClick:u.onClick,state:s?h?"invalid":n.formState.dirtyFields[t]?"valid":"default":"default",onChange:d,onBlur:f});return l?(0,y.jsx)(Sr,{title:u.title,actions:u.actions,name:t,form:n,children:p}):p}var _r=n(829),_i=n.n(_r);async function _o(e){let{api:t,route:n,password:r}=e;try{return await S6().get("".concat(t,"/api").concat(n),{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Basic "+btoa(":".concat(r))},timeout:1e4}),{}}catch(n){let e=n.code,t=n.response;if((null==t?void 0:t.status)===504)return{error:"Error, check that daemon is running"};if((null==t?void 0:t.status)===401)return{error:"Error, wrong password"};if("ECONNABORTED"===e)return{error:"Error, daemon did not respond"};return{error:"Error, something went wrong"}}}function _a(e){let{appName:t,route:n,routes:r}=e,i=(0,Sh.useRouter)(),{settings:o,setSettings:a}=(0,fR.Hv)(),{allowCustomApi:s}=o,l=(0,b.useMemo)(()=>({api:o.api,password:""}),[o.api]),u=(0,S8.cI)({mode:"onBlur",defaultValues:l});(0,b.useEffect)(()=>{u.clearErrors()},[s]);let c=(0,b.useCallback)(async e=>{let t="";if(s){let n=new URL(e.api);t="".concat(n.protocol,"//").concat(n.host)}let{error:c}=await _o({api:t,route:n,password:e.password});c?u.setError("password",{message:c}):(a({api:t,password:e.password,recentApis:{...o.recentApis,[t]:{lastUsed:new Date().getTime()}}}),i.push(i.query.prev?decodeURIComponent(i.query.prev):r.home),u.reset(l))},[s,u,i,r,o,a,l,n]),d=function(e){let{allowCustomApi:t}=e;return{api:{type:"text",title:"API",placeholder:"http://127.0.0.1:9980",validation:{validate:{required:e=>!t||!!e||"API is required",url:e=>{try{let t=new URL(e);return!!t.protocol&&!!t.host||"invalid API URL"}catch(e){return"invalid API URL"}},https:e=>{let t="https:"===window.location.protocol;return!t||t&&e.startsWith("https")||"API must use HTTPS"}}}},password:{type:"password",title:"Password",placeholder:"Enter password",validation:{required:"password is required"}}}}({allowCustomApi:s}),f=_t(d),h=u.formState.errors.api||u.formState.errors.password,p=_i()(Object.entries(o.recentApis),e=>{let[t,{lastUsed:n}]=e;return-n}).map(e=>{let[t]=e;return t});return(0,y.jsx)("div",{className:"flex flex-col items-center justify-center gap-6 h-full",children:(0,y.jsx)(tK,{className:"relative top-[-50px] w-[300px] p-2.5",children:(0,y.jsxs)("div",{className:"flex flex-col justify-between h-full",children:[(0,y.jsxs)("div",{className:"flex justify-between items-center",children:[(0,y.jsx)(tW,{font:"mono",weight:"bold",size:"20",children:t}),(0,y.jsx)(cN,{trigger:(0,y.jsx)(s9,{icon:"hover",variant:"ghost",children:(0,y.jsx)(le.shL,{})}),children:(0,y.jsx)(cR,{onSelect:()=>a({allowCustomApi:!s}),children:s?"Hide custom API":"Show custom API"})})]}),(0,y.jsx)(cj,{className:"w-full mt-2 mb-3"}),(0,y.jsx)("form",{onSubmit:u.handleSubmit(c,f),children:(0,y.jsxs)("div",{className:"flex flex-col gap-1.5",children:[s?(0,y.jsxs)(lb,{children:[(0,y.jsx)(_n,{name:"api",form:u,fields:d,group:!1}),p.length>1&&(0,y.jsx)(cN,{trigger:(0,y.jsx)(s9,{type:"button",children:(0,y.jsx)(le.wGX,{})}),children:p.map(e=>(0,y.jsx)(cR,{onSelect:()=>u.setValue("api",e),children:e},e))})]}):null,(0,y.jsx)(_n,{name:"password",form:u,fields:d,group:!1}),h&&(0,y.jsx)(tW,{size:"14",color:"red",children:h.message}),(0,y.jsx)(Si,{size:"small",form:u,children:"Unlock"})]})})]})})})}var _s=n(9156),_l=n(24511);let _u={address:"",siacoin:void 0,includeFee:!1},_c=_l.Ry().shape({address:_l.Z_().required("Required"),siacoin:_l.Z_().required("Required").test("greater than zero","Must be greater than zero",e=>!new(fT())(e||0).isZero())});function _d(e){let{address:t,siacoin:n,fee:r,transactionId:i}=e,o=n.plus(r);return(0,y.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,y.jsxs)("div",{className:"flex gap-6 justify-between items-center",children:[(0,y.jsx)(tW,{color:"verySubtle",noWrap:!0,children:"Address"}),(0,y.jsx)(kK,{value:t,type:"address"})]}),(0,y.jsxs)("div",{className:"flex gap-2 justify-between items-center",children:[(0,y.jsx)(tW,{color:"verySubtle",noWrap:!0,children:"Amount"}),(0,y.jsx)("div",{className:"flex relative top-[-0.5px]",children:(0,y.jsx)(kX,{size:"14",value:n,variant:"value",dynamicUnits:!1})})]}),(0,y.jsxs)("div",{className:"flex gap-2 justify-between items-center",children:[(0,y.jsx)(tW,{color:"verySubtle",noWrap:!0,children:"Network fee"}),(0,y.jsx)("div",{className:"flex relative top-[-0.5px]",children:(0,y.jsx)(kX,{size:"14",value:r,variant:"value",dynamicUnits:!1})})]}),(0,y.jsxs)("div",{className:"flex items-center gap-2 justify-between",children:[(0,y.jsx)(tW,{color:"verySubtle",noWrap:!0,children:"Total"}),(0,y.jsx)("div",{className:"flex relative top-[-0.5px]",children:(0,y.jsx)(kX,{size:"14",value:o,variant:"value",dynamicUnits:!1})})]}),i&&(0,y.jsxs)("div",{className:"flex gap-6 items-center justify-between",children:[(0,y.jsx)(tW,{color:"verySubtle",noWrap:!0,children:"Transaction ID"}),(0,y.jsx)(kK,{value:i,type:"transaction"})]})]})}function _f(e){let{activeStep:t,steps:n,onChange:r}=e,i=n.findIndex(e=>e.id===t),o=n.length-1;return(0,y.jsxs)("div",{className:"relative w-full mt-8 mb-3",children:[(0,y.jsx)("div",{className:"absolute w-full h-1 bg-gray-500 dark:bg-graydark-500 rounded-lg"}),(0,y.jsx)("div",{className:"absolute h-1 bg-accent-800 dark:bg-accentdark-800 rounded-lg",style:{width:"".concat(i/o*100,"%")}}),n.map((e,n)=>{let{id:a,label:s}=e,l=t===a,u=i>=n,c=n===o,d=0===n,f=u&&i!==o;return(0,y.jsxs)("div",{className:(0,eo.cx)("absolute h-2 w-2 -top-0.5",f?"cursor-pointer":"cursor-default"),style:{left:"calc(".concat(n/o*100,"% - ").concat(c?8:d?0:4,"px)")},onClick:()=>{f&&r(a)},children:[(0,y.jsx)(tW,{color:l?"contrast":"verySubtle",className:(0,eo.cx)("absolute top-[-30px]",d?"left-0":"",c?"right-0":"",d||c?"":"-translate-x-1/2"),noWrap:!0,children:s}),(0,y.jsx)("div",{className:(0,eo.cx)("absolute left-0 top-0 h-full w-full rounded-lg border",u?"bg-accent-800 dark-accentdark-800":"bg-gray-500 dark:bg-graydark-500",u?"border-accent-900 dark:border-accentdark-900":"border-gray-600 dark:border-graydark-600")}),l&&(0,y.jsx)("div",{className:"absolute left-0 top-0 h-full w-full rounded-lg bg-accent-800 dark:bg-accentdark-800 animate-pingslow"})]},a)})]})}function _h(e){let{data:{address:t,siacoin:n},fee:r,transactionId:i}=e;return(0,y.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,y.jsx)(_d,{address:t,siacoin:n,fee:r,transactionId:i}),(0,y.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 my-4",children:[(0,y.jsx)(tW,{children:(0,y.jsx)(le.Z$8,{})}),(0,y.jsx)(tW,{children:"Transaction successfully broadcasted."})]})]})}let _p=(0,vc.qN)(.00393),_m={address:"",siacoin:new(fT())(0),includeFee:!1};function _v(e){let{trigger:t,open:n,onOpenChange:r,balance:i,send:o}=e,[a,s]=(0,b.useState)("setup"),[l,u]=(0,b.useState)(),[c,d]=(0,b.useState)(_m),f=function(e){let{balance:t,fee:n,onComplete:r}=e,i=(0,_s.TA)({initialValues:_u,validationSchema:_c,onSubmit:async e=>{if(!e.siacoin)return;let o=e.includeFee?(0,vc.qN)(e.siacoin).minus(n):(0,vc.qN)(e.siacoin);if(t){if(t.isLessThan((0,vc.qN)(e.siacoin).plus(n))){i.setStatus({error:"Not enough funds in wallet."});return}i.setStatus({}),r({includeFee:e.includeFee,address:e.address,siacoin:o})}}}),o=(0,vc.qN)(i.values.siacoin||0),a=(0,y.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,y.jsx)(So,{formik:i,variants:{size:"medium"},title:"Address",name:"address",placeholder:"e3b1050aef388438668b52983cf78f40925af8f0aa8b9de80c18eadcefce8388d168a313e3f2",autoComplete:"off",type:"text"}),(0,y.jsx)(So,{formik:i,title:"Siacoin",name:"siacoin",placeholder:"100",type:"siacoin"}),(0,y.jsxs)("div",{className:"flex items-center",children:[(0,y.jsx)(f6,{name:"includeFee",onCheckedChange:e=>i.setFieldValue("includeFee",e),children:"Include fee"}),(0,y.jsx)(fV,{children:"Include or exclude the network fee from the above transaction value."}),(0,y.jsx)("div",{className:"flex flex-1"})]}),(0,y.jsxs)("div",{className:"flex flex-col gap-2 my-1",children:[(0,y.jsxs)("div",{className:"flex gap-2 justify-between items-center",children:[(0,y.jsx)(tW,{color:"verySubtle",children:"Network fee"}),(0,y.jsx)("div",{className:"flex relative top-[-0.5px]",children:(0,y.jsx)(kX,{size:"14",value:n,variant:"value",dynamicUnits:!1})})]}),(0,y.jsxs)("div",{className:"flex justify-between gap-2 items-center",children:[(0,y.jsx)(tW,{color:"verySubtle",children:"Total"}),(0,y.jsx)("div",{className:"flex relative top-[-0.5px]",children:(0,y.jsx)(kX,{size:"14",value:i.values.includeFee?o:o.plus(n),variant:"value",dynamicUnits:!1})})]})]})]});return{formik:i,form:a}}({balance:i,fee:_p,onComplete:e=>{d(e),s("confirm")}}),h=function(e){let{send:t,formData:n,fee:r,onConfirm:i}=e,{address:o,siacoin:a}=n||{},s=(0,_s.TA)({initialValues:{},onSubmit:async()=>{let{transactionId:e,error:n}=await t({address:o,sc:a});if(n){s.setStatus({error:n});return}i({transactionId:e})}}),l=(0,y.jsx)("div",{className:"flex flex-col gap-4",children:(0,y.jsx)(_d,{address:o,siacoin:a,fee:r})});return{form:l,formik:s}}({fee:_p,formData:c,send:o,onConfirm:e=>{let{transactionId:t}=e;u(t),s("done")}}),p=(0,b.useMemo)(()=>"setup"===a?{submitLabel:"Generate transaction",formik:f.formik}:"confirm"===a?{submitLabel:"Broadcast transaction",formik:h.formik}:void 0,[a,f,h]);return(0,y.jsx)(l6,{trigger:t,open:n,onOpenChange:e=>{e||(f.formik.resetForm(),h.formik.resetForm(),s("setup")),r(e)},title:"Send siacoin",onSubmit:p?p.formik.handleSubmit:void 0,controls:p&&(0,y.jsx)("div",{className:"flex flex-col gap-1",children:(0,y.jsx)(Sd,{formik:p.formik,children:p.submitLabel})}),contentVariants:{className:"w-[400px]"},children:(0,y.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,y.jsx)(_f,{onChange:e=>s(e),activeStep:a,steps:[{id:"setup",label:"Setup"},{id:"confirm",label:"Confirm"},{id:"done",label:"Complete"}]}),(0,y.jsx)(cj,{className:"w-full mt-4"}),"setup"===a&&f.form,"confirm"===a&&h.form,"done"===a&&(0,y.jsx)(_h,{data:c,fee:_p,transactionId:l})]})})}let _g="[a-fA-F\\d:]",_y=e=>e&&e.includeBoundaries?"(?:(?<=\\s|^)(?=".concat(_g,")|(?<=").concat(_g,")(?=\\s|$))"):"",_b="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",_x="[a-fA-F\\d]{1,4}",_w="\n(?:\n(?:".concat(_x,":){7}(?:").concat(_x,"|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8\n(?:").concat(_x,":){6}(?:").concat(_b,"|:").concat(_x,"|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4\n(?:").concat(_x,":){5}(?::").concat(_b,"|(?::").concat(_x,"){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4\n(?:").concat(_x,":){4}(?:(?::").concat(_x,"){0,1}:").concat(_b,"|(?::").concat(_x,"){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4\n(?:").concat(_x,":){3}(?:(?::").concat(_x,"){0,2}:").concat(_b,"|(?::").concat(_x,"){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4\n(?:").concat(_x,":){2}(?:(?::").concat(_x,"){0,3}:").concat(_b,"|(?::").concat(_x,"){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4\n(?:").concat(_x,":){1}(?:(?::").concat(_x,"){0,4}:").concat(_b,"|(?::").concat(_x,"){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4\n(?::(?:(?::").concat(_x,"){0,5}:").concat(_b,"|(?::").concat(_x,"){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4\n)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1\n").replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),_j=new RegExp("(?:^".concat(_b,"$)|(?:^").concat(_w,"$)")),_E=new RegExp("^".concat(_b,"$")),_k=new RegExp("^".concat(_w,"$")),_S=e=>e&&e.exact?_j:RegExp("(?:".concat(_y(e)).concat(_b).concat(_y(e),")|(?:").concat(_y(e)).concat(_w).concat(_y(e),")"),"g");_S.v4=e=>e&&e.exact?_E:RegExp("".concat(_y(e)).concat(_b).concat(_y(e)),"g"),_S.v6=e=>e&&e.exact?_k:RegExp("".concat(_y(e)).concat(_w).concat(_y(e)),"g");let __=()=>RegExp("^(((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]).){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))|((([a-zA-Z]|[a-zA-Z][a-zA-Z0-9-]*[a-zA-Z0-9]).)+([A-Za-z|[A-Za-z][A-Za-z0-9‌​-]*[A-Za-z0-9])))$","g"),_C={port:9981,ip:""},_O=_l.Ry().shape({port:_l.Rx().required("Required").min(0,"Out of valid range").max(65535,"Out of valid range"),ip:_l.Z_().required("Required").test("ip","Invalid hostname or IP address",e=>__().test(e||""))});function _M(e){let{trigger:t,open:n,connect:r,onOpenChange:i}=e,o=(0,_s.TA)({initialValues:_C,validationSchema:_O,onSubmit:async(e,t)=>{let n="".concat(e.ip,":").concat(e.port),o=await r(n);if(o.error){let e=o.error.replace("invalid peer address: address ".concat(n,":"),"");t.setStatus({error:e})}else kP("Connected to peer"),t.resetForm(),i(!1)}});return(0,y.jsx)(l6,{trigger:t,title:"Connect peer",open:n,onOpenChange:e=>{e||o.resetForm(),i(e)},contentVariants:{className:"w-[400px]"},children:(0,y.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,y.jsx)(tq,{size:"14",children:"Connect to a peer by IP address."}),(0,y.jsx)("form",{onSubmit:o.handleSubmit,children:(0,y.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,y.jsx)(So,{formik:o,title:"Address",name:"ip",placeholder:"host.acme.com or 127.0.0.1",autoComplete:"off",type:"text",variants:{size:"medium"}}),(0,y.jsx)(So,{formik:o,title:"Port",name:"port",disableGroupSeparators:!0,placeholder:"9981",autoComplete:"off",type:"number",variants:{size:"medium"}}),(0,y.jsx)(Sd,{formik:o,size:"medium",children:"Connect"})]})})]})})}function _T(e){var t;let{id:n,transaction:r,trigger:i,open:o,onOpenChange:a}=e;return(0,y.jsx)(l6,{title:kB((null==r?void 0:r.txType)?k3()(k$(r.txType)):"Transaction",n,16),trigger:i,open:o,onOpenChange:a,contentVariants:{className:"w-[800px]"},children:r?(0,y.jsxs)("div",{className:"flex flex-col gap-4 pb-10 w-full overflow-hidden",children:[(0,y.jsxs)("div",{className:"flex flex-wrap gap-4",children:[(0,y.jsxs)("div",{className:"flex items-baseline gap-2",children:[(0,y.jsx)(tW,{children:"Inflow"}),(0,y.jsx)(kX,{value:new(fT())((null==r?void 0:r.inflow)||0)})]}),(0,y.jsxs)("div",{className:"flex items-baseline gap-2",children:[(0,y.jsx)(tW,{children:"Outflow"}),(0,y.jsx)(kX,{value:new(fT())((null==r?void 0:r.outflow)||0).negated()})]}),(0,y.jsxs)("div",{className:"flex items-baseline gap-2",children:[(0,y.jsx)(tW,{children:"Miner fee"}),(0,y.jsx)(kX,{value:new(fT())((null==r?void 0:null===(t=r.raw.minerFees)||void 0===t?void 0:t.reduce((e,t)=>e.plus(t),new(fT())(0)))||0)})]}),(0,y.jsx)("div",{className:"flex-1"}),(0,y.jsxs)("div",{className:"flex items-baseline gap-2",children:[(0,y.jsx)(tW,{children:"Timestamp"}),(0,y.jsx)(tW,{children:(0,vc.rN)((null==r?void 0:r.timestamp)||0,{timeStyle:"short"})})]})]}),(0,y.jsx)(lm,{children:JSON.stringify(null==r?void 0:r.raw,null,2)})]}):(0,y.jsx)(tW,{children:"Could not find transaction in wallet"})})}_l.Ry().shape({address:_l.Z_().required("Required"),description:_l.Z_().required("Required"),index:_l.Rx().integer().required("Required")});var _A=n(38001);function _P(e){let{title:t,description:n,address:r}=e;return(0,y.jsxs)("div",{className:"flex flex-col gap-4 items-center justify-center",children:[t&&(0,y.jsx)(cZ,{size:"20",font:"mono",children:t}),n&&(0,y.jsx)(tW,{children:n}),(0,y.jsx)("div",{className:"relative p-[5px] bg-white h-[210px] w-[210px]",children:(0,y.jsx)("div",{className:"absolute",children:(0,y.jsx)(_A.Z,{size:200,value:r})})}),(0,y.jsx)(kK,{type:"address",value:r})]})}function _N(e){let{address:t,isValidating:n,trigger:r,open:i,onOpenChange:o}=e;return(0,y.jsx)(l6,{title:kB("Address",kZ(t)||"",16),trigger:r,open:i,onOpenChange:o,contentVariants:{className:"w-[400px]"},children:(0,y.jsx)("div",{className:"flex flex-col gap-4",children:t||n?(0,y.jsx)(_P,{address:t||""}):(0,y.jsx)(tW,{children:"Could not retreive wallet address"})})})}function _R(e){let{isSynced:t,isWalletSynced:n,syncPercent:r,walletScanPercent:i}=e;return t?n?null:(0,y.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,y.jsx)(tW,{color:"amber",children:(0,y.jsx)(le.qdM,{})}),(0,y.jsxs)(tW,{size:"14",children:["Wallet is scanning (",i,"%), transaction data may be incomplete."]})]}):(0,y.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,y.jsx)(tW,{color:"amber",children:(0,y.jsx)(le.qdM,{})}),(0,y.jsxs)(tW,{size:"14",children:["Blockchain is syncing (",r,"%), transaction data may be incomplete."]})]})}let _D={docs:{index:"https://docs.sia.tech",sia101:"https://docs.sia.tech/get-started-with-sia/sia101",renting:"https://docs.sia.tech/renting/about-renting",wallet:"https://docs.sia.tech/your-sia-wallet/wallet-overview",hosting:"https://docs.sia.tech/hosting/about-hosting-on-sia",mining:"https://docs.sia.tech/mining/about-mining-on-sia",embarcadero:"https://github.com/SiaFoundation/embarcadero",siad:"https://api.sia.tech",siaui:"https://docs.sia.tech/your-sia-wallet/sia-ui-faqs",brand:"https://docs.sia.tech/sia-integrations/sia-brand-guidelines"},website:{index:"https://sia.tech",tos:"https://sia.tech/terms-of-service",privacy:"https://sia.tech/privacy-policy"},github:{index:"https://github.com/SiaFoundation",embarcadero:"https://github.com/SiaFoundation/embarcadero",siad:"https://github.com/SiaFoundation/siad",renterd:"https://github.com/SiaFoundation/renterd",walletd:"https://github.com/SiaFoundation/walletd",hostd:"https://github.com/SiaFoundation/hostd",siaui:"https://gitlab.com/NebulousLabs/Sia-UI"},discord:"https://sia.tech/discord"};function _L(){let{settings:e,setCurrency:t,currencyOptions:n}=(0,fR.Hv)();return(0,y.jsx)(fH,{disabled:!e.siaCentral,value:e.currency.id,onChange:e=>t(e.currentTarget.value),children:n.map(e=>{let{id:t,label:n}=e;return(0,y.jsx)(fU,{value:t,children:n},t)})})}function _F(e){let{open:t,onOpenChange:n,securityEl:r}=e,{settings:i,setSettings:o,gpu:a}=(0,fR.Hv)();return(0,y.jsx)(l6,{open:t,title:"App preferences",onOpenChange:n,contentVariants:{className:"w-[450px]"},children:(0,y.jsxs)("div",{className:"flex flex-col gap-6 mb-2",children:[(0,y.jsx)("div",{className:"flex flex-col gap-4",children:(0,y.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,y.jsx)(tW,{size:"16",weight:"bold",children:"Display"}),(0,y.jsx)(tq,{size:"14",children:"Configure visual and locale display preferences."}),(0,y.jsx)(ln,{children:(0,y.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,y.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,y.jsx)(tW,{children:(0,y.jsx)(le.RdX,{})}),(0,y.jsx)(cZ,{size:"20",className:"flex-1",children:"Currency"}),(0,y.jsx)(_L,{})]}),(0,y.jsx)(tq,{size:"14",children:"Select a currency for price conversions from Siacoin. Requires Sia Central third-party data enabled under Privacy."})]})}),(0,y.jsx)(ln,{children:(0,y.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,y.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,y.jsx)(tW,{children:(0,y.jsx)(le.RdX,{})}),(0,y.jsx)(cZ,{size:"20",className:"flex-1",children:"Theme"}),(0,y.jsx)(pM,{})]}),(0,y.jsx)(tq,{size:"14",children:"Switch between a dark or light mode, or follow your system's settings."})]})}),(0,y.jsx)(ln,{children:(0,y.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,y.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,y.jsx)(tW,{children:(0,y.jsx)(le.RdX,{})}),(0,y.jsx)(cZ,{size:"20",className:"flex-1",children:"GPU"}),(0,y.jsx)(f6,{disabled:!a.canGpuRender,checked:a.canGpuRender&&a.isGpuEnabled,onCheckedChange:a.setIsGpuEnabled,size:"medium"})]}),(0,y.jsxs)(tq,{size:"14",children:["Enable features that require a GPU."," ",a.canGpuRender?"":"This device does not support GPU rendering."]})]})})]})}),(0,y.jsx)(cj,{className:"w-full"}),(0,y.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,y.jsx)(tW,{size:"16",weight:"bold",children:"Security"}),(0,y.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,y.jsx)(tq,{size:"14",children:"Configure security preferences."}),(0,y.jsx)(ln,{children:(0,y.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,y.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,y.jsx)(tW,{children:(0,y.jsx)(le.RdX,{})}),(0,y.jsx)(cZ,{size:"20",className:"flex-1",children:"Lock app"}),(0,y.jsx)(f6,{size:"medium",checked:i.autoLock,onCheckedChange:e=>o({autoLock:e})}),(0,y.jsxs)(fH,{disabled:!i.autoLock,value:String(i.autoLockTimeout),onChange:e=>{o({autoLockTimeout:Number(e.currentTarget.value)})},children:[(0,y.jsx)(fU,{value:jW(5),children:"5 minutes"}),(0,y.jsx)(fU,{value:jW(10),children:"10 minutes"}),(0,y.jsx)(fU,{value:jW(20),children:"20 minutes"}),(0,y.jsx)(fU,{value:jW(30),children:"30 minutes"}),(0,y.jsx)(fU,{value:jW(60),children:"1 hour"})]})]}),(0,y.jsx)(tq,{size:"14",children:"Automatically lock the app after a certain period of inactivity."})]})}),r]})]}),(0,y.jsx)(cj,{className:"w-full"}),(0,y.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,y.jsx)(tW,{size:"16",weight:"bold",children:"Privacy"}),(0,y.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,y.jsx)(tq,{size:"14",children:"Configure privacy preferences. The app uses the third-party APIs listed below to improve the user experience. All third-party APIs are optional and can be toggled on or off."}),(0,y.jsx)(ln,{children:(0,y.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,y.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,y.jsx)(tW,{children:(0,y.jsx)(le.RdX,{})}),(0,y.jsx)(cZ,{size:"20",className:"flex-1",children:"Sia Central"}),(0,y.jsx)(f6,{size:"medium",checked:i.siaCentral,onCheckedChange:e=>o({siaCentral:e})})]}),(0,y.jsx)(tq,{size:"14",children:"The app fetches Siacoin exchange rates from the Sia Central API."})]})})]})]}),(0,y.jsx)(cj,{className:"w-full"}),(0,y.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,y.jsx)(tW,{size:"16",weight:"bold",children:"Help"}),(0,y.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,y.jsx)(tq,{size:"14",children:"Find information about the Sia software at our website, documentation site, and on Github. Join our active Discord community for discussion and help troubleshooting issues."}),(0,y.jsxs)("div",{className:"flex gap-4",children:[(0,y.jsxs)(cQ,{href:_D.website.index,target:"_blank",className:"flex items-center gap-1",children:[(0,y.jsx)(le.lq1,{}),"Website"]}),(0,y.jsxs)(cQ,{href:_D.docs.index,target:"_blank",className:"flex items-center gap-1",children:[(0,y.jsx)(le.RdX,{}),"Docs"]}),(0,y.jsxs)(cQ,{href:_D.github.index,target:"_blank",className:"flex items-center gap-1",children:[(0,y.jsx)(le.Sfn,{}),"About"]}),(0,y.jsxs)(cQ,{href:_D.discord,target:"_blank",className:"flex items-center gap-1",children:[(0,y.jsx)(le.b47,{}),"Discord"]})]})]})]})]})})}function _z(e){let{sc:t,isSynced:n,syncingMessage:r}=e;return t?n?(0,y.jsx)(tK,{className:"hidden sm:flex h-7 px-3 items-center",children:(0,y.jsx)(tW,{size:"12",weight:"semibold",children:(0,vc.Vz)(t)})}):(0,y.jsx)(s8,{content:r||"Blockchain is syncing, balance may be incorrect.",children:(0,y.jsxs)(tK,{className:"hidden sm:flex h-7 pl-2 pr-3 gap-1.5 items-center",children:[(0,y.jsx)(tW,{color:"amber",children:(0,y.jsx)(le.qdM,{className:""})}),(0,y.jsx)(tW,{size:"12",weight:"semibold",children:(0,vc.Vz)(t)})]})}):null}function _V(e){let{isSynced:t,isWalletSynced:n,syncPercent:r,walletScanPercent:i,sc:o,sendSiacoin:a,receiveSiacoin:s}=e;return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(_z,{isSynced:t&&n,syncingMessage:t?"Wallet is scanning (".concat(i,"%), balance may be incorrect."):"Blockchain is syncing (".concat(r,"%), balance may be incorrect."),sc:o}),s&&(0,y.jsxs)(s9,{size:"small",onClick:s,children:[(0,y.jsx)(le.xHM,{}),"Receive"]}),(0,y.jsxs)(s9,{size:"small",variant:"accent",onClick:a,children:[(0,y.jsx)(le.rW0,{}),"Send"]})]})}let _I={default:e=>"".concat((0,vc.rN)(e))};function _Z(e){let{total:t,start:n,end:r,count:i}=e,o=r-n;return{total:t,diff:o,change:0===n?void 0:o/n*100,latest:r,average:t/i}}function _B(e,t){return e.reduce((e,n)=>e+((null==t?void 0:t[n])||0),0)}function _H(e){let{balances:t,isLoading:n,chartType:r="area"}=e,{resolvedTheme:i}=(0,pC.F)(),o=(0,b.useMemo)(()=>"light"===i?{sc:{label:"siacoin",color:vu.accent[800]}}:{sc:{label:"siacoin",color:vu.accentdark[800]}},[i]),a=(0,b.useMemo)(()=>{let e=function(e,t){if(!e||!e.length)return[];let n=Object.keys(jU()(e[0],"timestamp"));e.sort((e,t)=>e.timestamp>t.timestamp?1:-1);let r=[];return"delta"===t?e.forEach((t,i)=>{let o={...t};0!==i&&(n.forEach(n=>{let r=t[n],a=e[i-1][n];o[n]=r-a}),r.push(o))}):r=e.slice(1),r}(t,"none"),i=function(e){if(!e||!e.length)return{};let t=Object.keys(jU()(e[0],"timestamp"));e.sort((e,t)=>e.timestamp>t.timestamp?1:-1);let n=t.reduce((t,n)=>({...t,[n]:function(e,t){var n,r;let i=(null===(n=t[0])||void 0===n?void 0:n[e])||0,o=(null===(r=t[t.length-1])||void 0===r?void 0:r[e])||0,a=t.reduce((t,n)=>t+(n[e]||0),0);return _Z({total:a,start:i,end:o,count:t.length})}(n,e)}),{});return{...n,total:function(e,t){let n=_B(e,t[0]),r=_B(e,t[t.length-1]),i=t.reduce((t,n)=>t+_B(e,n),0);return _Z({total:i,start:n,end:r,count:t.length})}(t,e)}}(t);return{data:e,stats:i,config:{enabledGraph:["sc"],enabledTip:["sc"],data:{sc:o.sc},format:e=>(0,vc.Vz)(e),formatTimestamp:_I.default||_I.default,disableAnimations:!0},chartType:r,isLoading:n}},[t,n,o,r]);return(0,y.jsx)("div",{className:"relative",children:(0,y.jsx)(j6,{id:"balance",height:200,allowConfiguration:!1,data:a.data,config:a.config,chartType:a.chartType})})}function _U(e){let{peers:t,connectPeer:n}=e;return(0,y.jsx)(k7,{title:"Peers",actions:(0,y.jsx)(s9,{onClick:n,children:"Connect"}),entities:(null==t?void 0:t.map(e=>({type:"ip",hash:e})))||[]})}function _W(e){let{size:t,label:n,enabled:r=!0,onChange:i,color:o}=e;return(0,y.jsxs)("div",{className:(0,eo.cx)("flex gap-1.5 items-center",r?"opacity-100":"opacity-50",i?"cursor-pointer":"cursor-auto",i&&(r?"hover:opacity-90":"hover:opacity-60")),onClick:()=>i&&i(!r),children:[o&&(0,y.jsx)("div",{className:"relative top-px",children:(0,y.jsx)(fK,{style:{backgroundColor:o}})}),(0,y.jsx)(tW,{size:t,children:n})]})}function _q(e){return 1008*e}function _$(e){return 4320*e}function _K(e){return e/16666666666666669e-22}function _Y(e){return e/1008}function _G(e,t){return new Date().getTime()+_K(t-e)}function _X(e){let{children:t,variant:n,align:r}=e;return(0,y.jsx)("div",{className:"relative",style:{top:"primary"===n?"6px":void 0,left:"start"===r?"0px":void 0,right:"end"===r?"0px":void 0},children:(0,y.jsx)(tW,{size:"10",color:"primary"===n?"contrast":"verySubtle",dir:"start"===r?"rtl":"ltr",weight:"primary"===n?"semibold":"regular",ellipsis:!0,children:t})})}function _J(e){let{date:t,align:n,variant:r}=e;return t?(0,y.jsx)(_X,{variant:r,align:n,children:(0,vc.rN)(t)}):null}function _Q(e){let{blockHeight:t,align:n,variant:r}=e;return t?(0,y.jsx)(_X,{variant:r,align:n,children:t.toLocaleString()}):null}function _0(e){let{label:t,currentHeight:n,range:r,startHeight:i,endHeight:o,color:a,align:s,rounded:l,className:u,showDates:c}=e;if(!i||!o)return null;let d=r.endHeight-r.startHeight,f=_K(d),h=_G(n,r.startHeight),p=_G(n,i),m=_G(n,o),v=(p-h)/f,g=(m-h)/f;return(0,y.jsxs)("div",{className:(0,eo.cx)("group flex items-center justify-center","absolute -top-[5px] h-4","cursor-pointer","transition-colors"),style:{left:_1(v),width:_1(g-v)},children:[(0,y.jsx)("div",{className:(0,eo.cx)("z-0 absolute w-full h-full","rounded-md","group-hover:bg-blue-500/10 dark:group-hover:bg-blue-200/10"),style:{width:"calc(100% + 8px)",left:"-4px"}}),(0,y.jsx)("div",{className:(0,eo.cx)("z-10 absolute w-full h-1.5",u,"start"===l?"rounded-l-lg":"end"===l?"rounded-r-lg":"rounded-lg","border-y","start"===l?"border-l":"end"===l?"border-r":"border","blue"===a?["bg-blue-300 dark:bg-blue-300","group-hover:bg-blue-400 dark:group-hover:bg-blue-400","border-blue-500/50 dark:border-blue-500/50"]:[],"green"===a?["bg-green-300 dark:bg-green-300","group-hover:bg-green-400 dark:group-hover:bg-green-400","border-green-500/50 dark:border-green-500/50"]:[],"amber"===a?["bg-amber-300 dark:bg-amber-300","group-hover:bg-amber-400 dark:group-hover:bg-amber-400","border-amber-500/50 dark:border-amber-500/50"]:[])}),(0,y.jsxs)("div",{className:"hidden group-hover:flex absolute justify-between gap-2 bottom-[100%]",style:"center"===s?{width:"100%"}:"end"===s?{right:_1(1-g)}:{left:_1(v)},children:[(0,y.jsx)(_Q,{blockHeight:i,align:"start",variant:"primary"}),(0,y.jsx)(_X,{variant:"primary",children:t}),(0,y.jsx)(_Q,{blockHeight:o,align:"end",variant:"primary"})]}),c&&(0,y.jsxs)("div",{className:"flex group-hover/segments:hidden absolute justify-between gap-2 top-[100%]",style:"center"===s?{width:"100%"}:"end"===s?{right:_1(1-g)}:{left:_1(v)},children:[(0,y.jsx)(_J,{date:p,align:"start",variant:"secondary"}),(0,y.jsx)(_J,{date:m,align:"start",variant:"secondary"})]}),(0,y.jsxs)("div",{className:"hidden group-hover:flex absolute justify-between gap-2 top-[100%]",style:"center"===s?{width:"100%"}:"end"===s?{right:_1(1-g)}:{left:_1(v)},children:[(0,y.jsx)(_J,{date:p,align:"start",variant:"secondary"}),(0,y.jsx)(_J,{date:m,align:"start",variant:"secondary"})]})]})}function _1(e){return"".concat(100*e,"%")}function _2(e){let{currentHeight:t,eventHeight:n,range:r,label:i,bottomLabel:o,color:a,className:s,unconfirmedPing:l=!0}=e,u=!!n&&n>t,c=n&&!u&&t-n<6,d=r.endHeight-r.startHeight,f=_K(d),h=_G(t,r.startHeight),p=n?_G(t,n):0;return n?(0,y.jsx)("div",{className:(0,eo.cx)("group","absolute -top-[5px] w-4 h-4","flex items-center justify-center","rounded-full cursor-pointer","-translate-x-1/2",s),style:{left:"".concat(100*(p?(p-h)/f:0),"%")},children:(0,y.jsxs)("div",{className:(0,eo.cx)("relative w-full h-full","flex items-center justify-center","rounded-full cursor-pointer"),children:[l&&c&&(0,y.jsx)("div",{className:(0,eo.cx)("z-0 absolute w-1.5 h-1.5","rounded-full","bg-amber-500 dark:bg-amber-200","animate-pingslow")}),(0,y.jsx)("div",{className:(0,eo.cx)("z-0 absolute w-4 h-4","rounded-full","group-hover:bg-blue-500/10 dark:group-hover:bg-blue-200/10")}),(0,y.jsx)("div",{className:(0,eo.cx)("absolute w-1.5 h-1.5","rounded-full","border","green"===a?["bg-green-500 dark:bg-green-500","group-hover:bg-green-600 dark:group-hover:bg-green-600","border-white dark:border-white"]:[],"amber"===a?["bg-amber-500 dark:bg-amber-500","group-hover:bg-amber-600 dark:group-hover:bg-amber-600","border-white dark:border-white"]:[],"gray"===a?["bg-gray-700 dark:bg-graydark-900","group-hover:bg-gray-800 dark:group-hover:bg-graydark-800","border-white dark:border-white"]:[],"blue"===a?["bg-blue-300 dark:bg-blue-300","group-hover:bg-blue-400 dark:group-hover:bg-blue-400","border-white dark:border-white"]:[])}),(0,y.jsxs)("div",{className:"hidden group-hover:flex absolute justify-between gap-1 bottom-[100%] left-1.5",children:[(0,y.jsx)(_Q,{blockHeight:n,align:"start",variant:"primary"}),(0,y.jsx)(_X,{variant:"primary",children:i})]}),(0,y.jsxs)("div",{className:"hidden group-hover:flex absolute justify-between gap-1 top-[100%] left-1.5",children:[(0,y.jsx)(_J,{date:p,align:"start",variant:"secondary"}),o&&(0,y.jsx)(_X,{variant:"secondary",children:o})]})]})}):null}function _4(e){let{currentHeight:t,contractHeightStart:n,contractHeightEnd:r,proofWindowHeightStart:i,proofWindowHeightEnd:o,revisionHeight:a,proofHeight:s,range:l}=e,u=t-n<6;return(0,y.jsx)("div",{className:"group/main relative w-full",children:(0,y.jsx)("div",{className:"relative py-6",children:(0,y.jsxs)("div",{className:"relative z-10 h-1.5",children:[(0,y.jsx)("div",{className:"absolute h-full w-full bg-gray-300 dark:bg-graydark-400 rounded-lg"}),(0,y.jsxs)("div",{className:"group/segments",children:[(0,y.jsx)(_0,{label:"contract duration",currentHeight:t,startHeight:n,endHeight:r,range:l,color:"blue",align:"center",rounded:"start",className:u?"border-dotted opacity-50":"",showDates:!0}),(0,y.jsx)(_0,{label:"proof window",currentHeight:t,startHeight:i,endHeight:o,range:l,color:"green",align:"end",rounded:"end",className:u?"border-dotted opacity-50":""}),(0,y.jsx)(_2,{label:"contract formation",bottomLabel:u?"unconfirmed":"",currentHeight:t,eventHeight:n,range:l,color:u?"amber":"blue",className:"z-20"}),(0,y.jsx)(_2,{label:"last revision",currentHeight:t,eventHeight:a,range:l,color:"green",className:"z-20"}),(0,y.jsx)(_2,{label:"storage proof",currentHeight:t,eventHeight:s,range:l,color:"green",className:"z-20"}),(0,y.jsx)(_2,{label:"current block",currentHeight:t,eventHeight:t,range:l,color:"gray",className:"z-10",unconfirmedPing:!1})]})]})})})}var _3=n(17335),_5=n.n(_3);function _6(e){let{label:t,columns:n,enabled:r,setColumnsVisible:i,setColumnsHidden:o}=e,a=0===_5()(n,r).length,s=_5()(n,r).length===n.length;return(0,y.jsxs)(cO,{children:[(0,y.jsx)(cG,{children:t}),(0,y.jsxs)(cM,{children:[(0,y.jsx)(s9,{tip:"".concat(t,": show all"),icon:a?"contrast":"hover",variant:"ghost",onClick:e=>{e.stopPropagation(),i(n)},children:(0,y.jsx)(le.xVB,{})}),(0,y.jsx)(s9,{icon:s?"contrast":"hover",tip:"".concat(t,": hide all"),variant:"ghost",onClick:e=>{e.stopPropagation(),o(n)},children:(0,y.jsx)(le.pHg,{})})]})]})}function _8(e){let{title:t,children:n}=e;return(0,y.jsxs)("div",{className:"flex flex-col gap-6",children:[t&&(0,y.jsx)(cZ,{anchorLink:!0,size:"24",children:t}),(0,y.jsx)(tK,{className:"p-6",children:(0,y.jsx)("div",{className:"flex flex-col gap-6",children:n})})]})}function _7(e){let{title:t,description:n,control:r}=e;return(0,y.jsxs)("div",{className:"flex gap-10 justify-between",children:[(0,y.jsxs)("div",{className:"flex flex-col gap-2 max-w-[600px]",children:[(0,y.jsx)(cZ,{size:"20",children:t}),(0,y.jsx)(tq,{size:"14",children:n})]}),(0,y.jsx)("div",{className:"",children:r})]})}function _9(e){let{open:t,params:n,trigger:r,onOpenChange:i}=e,{body:o,title:a,variant:s,action:l,onConfirm:u}=n||{},c=(0,S8.cI)(),d=(0,b.useCallback)(()=>{u&&u(),i(!1)},[u,i]);return(0,y.jsx)(l6,{title:a,trigger:r,open:t,onOpenChange:i,contentVariants:{className:"w-[400px]"},children:(0,y.jsx)("form",{onSubmit:c.handleSubmit(d),children:(0,y.jsxs)("div",{className:"flex flex-col gap-4",children:[o,(0,y.jsx)("div",{className:"flex gap-1 justify-end",children:(0,y.jsx)(Si,{variant:s,form:c,size:"small",children:l})})]})})})}function Ce(e){let{name:t,peerCount:n,isSynced:r,nodeBlockHeight:i,connectPeer:o}=e;return(0,y.jsxs)("div",{className:"flex justify-between items-center",children:[(0,y.jsx)(tW,{font:"mono",weight:"bold",size:"20",children:t}),(0,y.jsxs)("div",{className:"flex items-center",children:[n?(0,y.jsxs)(s9,{className:"relative left-2 only:left-0",variant:"ghost",onClick:o,tip:"".concat(n," connected peers"),children:[(0,y.jsx)(tW,{color:"subtle",children:n.toLocaleString()}),(0,y.jsx)(le.RK4,{})]}):null,i&&r?(0,y.jsx)(s8,{content:"Blockchain is synced",children:(0,y.jsx)("div",{className:"relative left-2",children:(0,y.jsxs)(s9,{variant:"ghost",state:"waiting",children:[(0,y.jsx)(tW,{color:"subtle",children:i.toLocaleString()}),(0,y.jsx)(tW,{color:"green",children:(0,y.jsx)(le.Y3p,{})})]})})}):null]})]})}function Ct(e){let{nodeBlockHeight:t,networkBlockHeight:n,moreThan100BlocksToSync:r,percent:i}=e;return(0,y.jsxs)("div",{className:"flex flex-col justify-between h-full mb-1",children:[(0,y.jsx)(dM,{variant:"accent",value:t&&n?t:0,max:n||1,className:""}),(0,y.jsxs)("div",{className:"flex justify-between mt-1.5",children:[(0,y.jsx)(tW,{color:"subtle",size:"10",children:"Syncing..."}),t&&n?r?(0,y.jsx)(tW,{color:"subtle",size:"10",children:"".concat(t.toLocaleString()," / ").concat(n.toLocaleString()," (").concat(i,"%)")}):(0,y.jsx)(tW,{color:"subtle",size:"10",children:"(".concat(i,"%)")}):null]})]})}function Cn(e){let{name:t,peerCount:n,connectPeer:r,isSynced:i,syncPercent:o,nodeBlockHeight:a,estimatedBlockHeight:s,firstTimeSyncing:l,moreThan100BlocksToSync:u,children:c}=e;return(0,y.jsx)(h$,{rootProps:{openDelay:100},contentProps:{side:"right",align:"start",sideOffset:5,className:"!max-w-none"},trigger:(0,y.jsxs)("div",{className:"relative hover:scale-105 transition-transform",children:[i||100===o||0===o?null:(0,y.jsx)("div",{className:"absolute -bottom-2.5 w-full flex justify-center",children:(0,y.jsxs)(tW,{className:"bg-amber-500 py-px px-1 rounded-sm scale-75",size:"10",children:[o,"%"]})}),(0,y.jsx)(c2,{size:30})]}),children:(0,y.jsxs)("div",{className:"flex flex-col gap-2 px-1 pt-1 pb-2 w-[300px]",children:[(0,y.jsx)(Ce,{nodeBlockHeight:a,isSynced:i,name:t,peerCount:n,connectPeer:r}),i?(0,y.jsx)(cj,{className:"w-full mb-0.5"}):(0,y.jsx)(Ct,{percent:o,nodeBlockHeight:a,networkBlockHeight:s,moreThan100BlocksToSync:u}),l&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(tW,{color:"contrast",size:"14",children:"Welcome to Sia! The blockchain is syncing to the current network height. Depending on your system this process may take a while."}),(0,y.jsx)(cj,{className:"w-full mb-1"})]}),c]})})}function Cr(e){let{testnetName:t}=e;return(0,y.jsxs)("div",{className:"flex gap-2 items-center justify-center py-2 px-3 bg-amber-600 dark:bg-amber-500",children:[(0,y.jsx)(tW,{color:"lo",children:(0,y.jsx)(le.RdX,{})}),(0,y.jsxs)(tW,{size:"14",color:"lo",children:["You are on the ",t,"."]})]})}function Ci(e){let{type:t,label:n,link:r,tip:i,icon:o,value:a,onClick:s,decimalsLimit:l,units:u}=e;return(0,y.jsxs)("div",{className:"flex justify-between items-center",children:[(0,y.jsx)(s8,{align:"start",side:"bottom",content:i,children:(0,y.jsxs)("div",{className:"flex gap-1 items-center relative overflow-hidden",children:[(0,y.jsx)(tW,{className:"flex relative",children:o||(0,y.jsx)(le.RdX,{})}),(0,y.jsx)(tW,{size:"12",ellipsis:!0,children:r?(0,y.jsx)(cQ,{href:r,target:"_blank",children:n}):n})]})}),(0,y.jsx)("div",{className:(0,eo.cx)("flex items-center",s?"cursor-pointer":""),onClick:()=>{s&&s(a)},children:"siacoin"===t?(0,y.jsx)(kX,{value:a,variant:"value",size:"12",fixed:l,dynamicUnits:!1,showTooltip:!1}):(0,y.jsx)(kJ,{value:a,variant:"value",size:"12",format:e=>"".concat(fA(e,l)," ").concat(u)})})]})}function Co(e){let{name:t,form:n,fields:r}=e,i=r[t],{average:o,suggestion:a,units:s,suggestionTip:l,averageTip:u,after:c,decimalsLimitSc:d=6,decimalsLimitFiat:f=6,tipsDecimalsLimitSc:h=0}=i,{setValue:p,value:m,error:v}=_e({name:t,field:i,form:n}),g=c||(()=>null);return(0,y.jsxs)("div",{className:"flex flex-col gap-3 items-end",children:[(0,y.jsxs)("div",{className:"flex flex-col gap-3 w-[220px]",children:[(0,y.jsx)(fF,{name:t,size:"small",sc:m,units:s,decimalsLimitSc:d,decimalsLimitFiat:f,error:v,changed:n.formState.dirtyFields[t],placeholder:a||o,onChange:e=>{p(e,!0)},onBlur:()=>{p(m,!0)}}),(0,y.jsx)(g,{name:t,form:n,fields:r}),o&&(0,y.jsx)(Ci,{type:"siacoin",label:"Network average",tip:u||"Averages provided by Sia Central.",decimalsLimit:h,value:(0,vc.qN)(o),onClick:()=>{p(o,!0)}}),a&&l&&(0,y.jsx)(Ci,{type:"siacoin",label:"Suggestion",tip:l,decimalsLimit:h,value:(0,vc.qN)(a),onClick:()=>{p(a,!0)}})]}),(0,y.jsx)("div",{className:"h-[20px]",children:(0,y.jsx)(Sn,{form:n,name:t})})]})}function Ca(e){let{name:t,form:n,fields:r}=e,i=r[t],{average:o,averageTip:a,suggestion:s,suggestionTip:l,decimalsLimit:u=2,placeholder:c,units:d}=i,{setValue:f,value:h,error:p}=_e({form:n,field:i,name:t});return(0,y.jsxs)("div",{className:"flex flex-col gap-3 items-end",children:[(0,y.jsxs)("div",{className:"flex flex-col gap-3 w-[220px]",children:[(0,y.jsx)(fP,{name:t,value:h,units:d,decimalsLimit:u,placeholder:c?new(fT())(c):void 0,state:p?"invalid":n.formState.dirtyFields[t]?"valid":"default",onChange:e=>{let t=void 0!==e?new(fT())(e):void 0;f(t,!0)},onBlur:()=>{f(h,!0)}}),(0,y.jsxs)("div",{className:"flex flex-col gap-2",children:[o&&(0,y.jsx)(Ci,{type:"number",label:"Network average",tip:a||"Averages provided by Sia Central.",decimalsLimit:u,value:o,units:d,onClick:()=>{f(o,!0)}}),s&&l&&(0,y.jsx)(Ci,{type:"number",label:"Suggestion",tip:l,decimalsLimit:u,value:s,units:d,onClick:()=>{f(s,!0)}})]})]}),(0,y.jsx)("div",{className:"h-[20px]",children:(0,y.jsx)(Sn,{form:n,name:t})})]})}function Cs(e){let{label:t,link:n,tip:r,value:i,onClick:o}=e;return(0,y.jsxs)("div",{className:"flex justify-between items-center",children:[(0,y.jsx)(s8,{align:"start",side:"bottom",content:r,children:(0,y.jsxs)("div",{className:"flex gap-1 items-center relative overflow-hidden",children:[(0,y.jsx)(tW,{className:"flex relative",children:(0,y.jsx)(le.RdX,{})}),(0,y.jsx)(tW,{size:"12",children:n?(0,y.jsx)(cQ,{href:n,target:"_blank",children:t}):t})]})}),(0,y.jsx)("div",{className:"flex cursor-pointer items-center",onClick:o,children:(0,y.jsx)(tW,{size:"12",children:(0,y.jsx)(lg,{children:i})})})]})}function Cl(e){let{name:t,form:n,fields:r,type:i}=e,o=r[t],{placeholder:a,suggestion:s,suggestionTip:l}=o,{ref:u,onChange:c,setValue:d,onBlur:f,error:h}=_e({name:t,form:n,field:o});return(0,y.jsxs)("div",{className:"flex flex-col gap-3 items-end",children:[(0,y.jsxs)("div",{className:"flex flex-col gap-3 w-[220px]",children:[(0,y.jsx)(fl,{ref:u,name:t,placeholder:a,type:i,state:h?"invalid":n.formState.dirtyFields[t]?"valid":"default",onChange:c,onBlur:f}),(0,y.jsx)("div",{className:"flex flex-col gap-2",children:s&&l&&(0,y.jsx)(Cs,{label:"Suggestion",tip:l,value:s,onClick:()=>{d(s,!0)}})})]}),(0,y.jsx)("div",{className:"h-[20px]",children:(0,y.jsx)(Sn,{form:n,name:t})})]})}function Cu(e){let{name:t,form:n,fields:r}=e,i=r[t],{suggestion:o,suggestionTip:a}=i,{setValue:s,value:l,error:u}=_e({name:t,field:i,form:n});return(0,y.jsxs)("div",{className:"flex flex-col gap-3 items-end",children:[(0,y.jsxs)("div",{className:"flex flex-col gap-3 w-[220px]",children:[(0,y.jsx)("div",{className:"flex justify-end w-full",children:(0,y.jsx)(f6,{name:t,size:"medium",checked:l,state:u?"invalid":n.formState.dirtyFields[t]?"valid":"default",onCheckedChange:e=>{s(e,!0)},onBlur:()=>{s(l,!0)}})}),(0,y.jsx)("div",{className:"flex flex-col gap-2",children:void 0!==o&&a&&(0,y.jsx)(Cs,{label:"Suggestion",tip:a,value:o?"on":"off",onClick:()=>{s(o,!0)}})})]}),(0,y.jsx)("div",{className:"h-[20px]",children:(0,y.jsx)(Sn,{form:n,name:t})})]})}function Cc(e){let{name:t,form:n,fields:r}=e,i=r[t],{options:o,suggestion:a,suggestionTip:s}=i,{ref:l,onChange:u,setValue:c,onBlur:d,value:f,error:h}=_e({name:t,form:n,field:i});return(0,y.jsxs)("div",{className:"flex flex-col gap-3 items-end",children:[(0,y.jsxs)("div",{className:"flex flex-col gap-3 w-[220px]",children:[(0,y.jsx)("div",{className:"flex justify-end w-full",children:(0,y.jsx)(fH,{ref:l,name:t,size:"small",value:f,state:h?"invalid":n.formState.dirtyFields[t]?"valid":"default",onChange:u,onBlur:d,children:null==o?void 0:o.map(e=>(0,y.jsx)(fU,{value:e.value,children:e.label},e.value))})}),(0,y.jsx)("div",{className:"flex flex-col gap-2",children:void 0!==a&&s&&(0,y.jsx)(Cs,{label:"Suggestion",tip:s,value:a?"on":"off",onClick:()=>{c(a,!0)}})})]}),(0,y.jsx)("div",{className:"h-[20px]",children:(0,y.jsx)(Sn,{form:n,name:t})})]})}function Cd(e){let{title:t,category:n,form:r,fields:i}=e,o=Object.entries(i).filter(e=>{let[t,i]=e;return i.category===n&&!i.hidden&&(!i.show||i.show(r.getValues()))});return 0===o.length?null:(0,y.jsx)(_8,{title:t,children:o.map((e,t)=>{let[n,a]=e;return(0,y.jsxs)(b.Fragment,{children:[(0,y.jsx)(_7,{title:a.title,description:a.description,control:"number"===a.type?(0,y.jsx)(Ca,{form:r,name:n,fields:i}):"siacoin"===a.type?(0,y.jsx)(Co,{form:r,name:n,fields:i}):"text"===a.type?(0,y.jsx)(Cl,{form:r,name:n,fields:i}):"password"===a.type?(0,y.jsx)(Cl,{form:r,type:"password",fields:i,name:n}):"boolean"===a.type?(0,y.jsx)(Cu,{form:r,name:n,fields:i}):"select"===a.type?(0,y.jsx)(Cc,{form:r,name:n,fields:i}):null}),t{l(e,!0)},onBlur:()=>{l(u,!0)}}),a]});return o?(0,y.jsx)(Sr,{title:s.title,name:t,form:n,children:d}):d}var Ch=n(75652),Cp=n.n(Ch);le.lg1,le.eHR,le.I$H,le.KiD,le.P5r,le.CCF,le.w9S,le.EL$,le.aPl,le.wEY,le.EOT,le.kSc,le.W$S,le.lJ7,le.ORH,le.ka0,le.BdP,le.d19,le.Mes,le.VUg,le.U_S,le.T85;let Cm=e=>{let{__scopeTooltip:t,delayDuration:n=700,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:o}=e,[a,s]=(0,b.useState)(!0),l=(0,b.useRef)(!1),u=(0,b.useRef)(0);return(0,b.useEffect)(()=>{let e=u.current;return()=>window.clearTimeout(e)},[]),(0,b.createElement)(t_,{scope:t,isOpenDelayed:a,delayDuration:n,onOpen:(0,b.useCallback)(()=>{window.clearTimeout(u.current),s(!1)},[]),onClose:(0,b.useCallback)(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>s(!0),r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:(0,b.useCallback)(e=>{l.current=e},[]),disableHoverableContent:i},o)};function Cv(e){let{children:t}=e,[n,r]=(0,b.useState)(!1);return(0,b.useEffect)(()=>{r(!0)},[]),(0,y.jsx)("div",{children:n?t:null})}function Cg(e){let{passwordProtectRequestHooks:t,fallback:n,children:r,lockRoutes:i}=e;return(0,y.jsx)(Cv,{children:(0,y.jsx)(fR.kl,{fallback:n,children:(0,y.jsx)(pC.f,{attribute:"class",children:(0,y.jsx)(Cm,{children:(0,y.jsx)(fR.bW,{lockRoutes:i,passwordProtectRequestHooks:t,children:(0,y.jsxs)("div",{id:"root",className:s5,children:[(0,y.jsx)(kF,{}),r]})})})})})})}n(331);var Cy=n(30898),Cb=n.n(Cy),Cx=n(92762);let Cw=[];function Cj(e,t){let{columns:n,columnsDefaultVisible:r,defaultSortField:i,sortOptions:o,disabledCategories:a}={disabledCategories:Cw,...t},[s,l]=(0,Cx.Z)("".concat(e,"/enabledColumns"),{defaultValue:r}),[u,c]=(0,Cx.Z)("".concat(e,"/sortField"),{defaultValue:i}),[d,f]=(0,Cx.Z)("".concat(e,"/sortDirection"),{defaultValue:"desc"}),h=(0,b.useCallback)(e=>{l(t=>t.includes(e)?t.filter(t=>t!==e):t.concat(e))},[l]),p=(0,b.useCallback)(e=>{l(t=>Cp()([...t,...e]))},[l]),m=(0,b.useCallback)(e=>{l(t=>_5()(t,e))},[l]),v=(0,b.useCallback)(()=>{l(r)},[l,r]),g=(0,b.useCallback)(e=>{if(u!==e){c(e),f("asc");return}f(e=>"desc"===e?"asc":"desc")},[u,c,f]),y=(0,b.useMemo)(()=>n.filter(e=>{let t=null==a?void 0:a.includes(e.category||"");return!e.fixed&&!t}),[n,a]),x=(0,b.useMemo)(()=>n.filter(e=>{let t=e.fixed||s.includes(e.id),n=null==a?void 0:a.includes(e.category||"");return t&&!n}).map(e=>e.id),[n,s,a]),w=(0,b.useMemo)(()=>{if(!o)return[];let e=o.map(e=>e.id);return Cb()(e,x)},[o,x]);return{configurableColumns:y,enabledColumns:x,toggleColumnVisibility:h,toggleSort:g,setSortDirection:f,setSortField:c,sortableColumns:w,sortField:u,setColumnsVisible:p,setColumnsHidden:m,sortDirection:d,resetDefaultColumnVisibility:v}}function CE(){let e=(0,Sh.useRouter)(),[t,n]=(0,b.useState)([]),r=(0,b.useCallback)(t=>{n(e=>{let n=e.filter(e=>e.id!==t.id);return n.concat(t)}),e.replace({query:{}})},[e,n]),i=(0,b.useCallback)(()=>{n([]),e.replace({query:{}})},[e,n]),o=(0,b.useCallback)(t=>{n(e=>e.filter(e=>e.id!==t)),e.replace({query:{}})},[e,n]),a=(0,b.useCallback)(()=>{t.length&&(n(e=>e.slice(0,-1)),e.replace({query:{}}))},[e,n,t]);return{filters:t,setFilter:r,removeFilter:o,removeLastFilter:a,resetFilters:i}}function Ck(e){let{dataset:t,filters:n,sortField:r,sortDirection:i}=e;return(0,b.useMemo)(()=>{if(!t)return null;let e=Object.entries(n).map(e=>{let[t,n]=e;return n}),o=e.length?t.filter(t=>{for(let n of e)if(!n.fn(t))return!1;return!0}):t;return[...o=o.sort((e,t)=>{let n=e[r],o=t[r];return"desc"===i?n instanceof fT()&&o instanceof fT()?n.lte(o)?1:-1:n<=o?1:-1:n instanceof fT()&&o instanceof fT()?n.gte(o)?1:-1:n>=o?1:-1})]},[t,n,r,i])}function CS(){let e=(0,Sh.useRouter)(),[t,n]=(0,b.useState)([]),r=(0,b.useCallback)(t=>{n(e=>{let n=e.filter(e=>e.id!==t.id);return n.concat(t)}),e.replace({query:{}})},[e,n]),i=(0,b.useCallback)(()=>{n([]),e.replace({query:{}})},[e,n]),o=(0,b.useCallback)(t=>{n(e=>e.filter(e=>e.id!==t)),e.replace({query:{}})},[e,n]),a=(0,b.useCallback)(()=>{t.length&&(n(e=>e.slice(0,-1)),e.replace({query:{}}))},[e,n,t]);return{filters:t,setFilter:r,removeFilter:o,removeLastFilter:a,resetFilters:i}}let C_=new(fT())(0);function CC(e){let{sc:t}=e,{settings:n}=(0,fR.Hv)(),r=(0,fD.BW)({config:{swr:{revalidateOnFocus:!1}}}),i=(0,b.useMemo)(()=>{var e;return n.siaCentral&&r.data?new(fT())((null===(e=r.data)||void 0===e?void 0:e.rates.sc[n.currency.id])||C_):C_},[r.data,n]),o=(0,b.useMemo)(()=>new(fT())(t).times(i),[t,i]);return i.isZero()?{}:{fiat:o,currency:n.currency}}function CO(e){return new(fT())(e).div(1e3).div(1e3).div(1e3).div(1e3)}function CM(e){return new(fT())(e).times(1e3).times(1e3).times(1e3).times(1e3)}function CT(e,t){let n=t.reduce((e,t)=>{let n=e.startHeight,r=e.endHeight;return t.contractHeightStartr&&(r=t.contractHeightEnd),{startHeight:n,endHeight:r}},{startHeight:e,endHeight:0});n.endHeight=Math.max(n.endHeight,e)+720,n.startHeight=n.startHeight-720;let r=[],i=n.startHeight;for(;i<=n.endHeight;)r.push(i),i+=jq(1);let o=r.reduce((e,t)=>({...e,[t]:{total:null,timestamp:t}}),{});return{allDatesMap:o,range:n}}let CA=/^[a-z]{2}$/i;function CP(e){if(!CA.test(e)){let t=typeof e;throw TypeError("cc argument must be an ISO 3166-1 alpha-2 string, but got '".concat("string"===t?e:t,"' instead."))}let t=[...e.toUpperCase()].map(e=>e.codePointAt()+127397);return String.fromCodePoint(...t)}},2850:function(e,t,n){"use strict";n.d(t,{bW:function(){return L},kl:function(){return $},gw:function(){return i},Tc:function(){return U},du:function(){return W},Hv:function(){return D},iv:function(){return Z},rB:function(){return B},Nf:function(){return I},Tu:function(){return q},mw:function(){return z},q0:function(){return F},Tb:function(){return O},V1:function(){return V},Q5:function(){return H},D:function(){return T}});var r=n(79381);function i(e){return new Promise(t=>setTimeout(t,e))}var o=n(89644),a=n.n(o),s=n(2784);function l(e){return{...e,config:{...null==e?void 0:e.config}}}function u(e){return{...e,config:{...null==e?void 0:e.config}}}function c(e){return{...e,config:{...null==e?void 0:e.config}}}function d(e,t,n){return(null==n?void 0:n.api)||(null==t?void 0:t.api)||e.api}function f(e,t,n){var r,i;let o=function(e,t,n){var r,i,o,a;let s={"Content-Type":"application/json",...null===(i=t.config)||void 0===i?void 0:null===(r=i.axios)||void 0===r?void 0:r.headers,...null==n?void 0:null===(a=n.config)||void 0===a?void 0:null===(o=a.axios)||void 0===o?void 0:o.headers},l=d(e,t,n);return e.api===l&&e.password&&(s.Authorization="Basic "+btoa(":".concat(e.password))),s}(e,t,n);return{responseType:"json",...null===(r=t.config)||void 0===r?void 0:r.axios,...null==n?void 0:null===(i=n.config)||void 0===i?void 0:i.axios,headers:o}}function h(e,t,n,r){if(!t)return null;let i=(null==n?void 0:n.params)||{};if(r&&r.params&&(i={...i,...r.params}),!(t=function(e,t){if(e&&t){let n=Object.keys(t);for(let r of n){let n=String(t[r]);e.includes(":".concat(r))?e=e.replace(":".concat(r),n):e.includes("?")?e+="&".concat(r,"=").concat(encodeURIComponent(n)):e+="?".concat(r,"=").concat(encodeURIComponent(n))}}return e}(t,i)))return null;let o=d(e,n,r);return o===e.api?"".concat(o,"/api").concat(t):"".concat(o).concat(t)}function p(e,t,n,r){let i=d(e,n,r);return i===e.api?t.replace("".concat(i,"/api"),""):t.replace(i,"")}var m=n(52322),v=n(82876),g=n(92762);function y(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((r=r.apply(e,t||[])).next())})}let b=["geforce 320m","geforce 8600","geforce 8600m gt","geforce 8800 gs","geforce 8800 gt","geforce 9400","geforce 9400m g","geforce 9400m","geforce 9600m gt","geforce 9600m","geforce fx go5200","geforce gt 120","geforce gt 130","geforce gt 330m","geforce gtx 285","google swiftshader","intel g41","intel g45","intel gma 4500mhd","intel gma x3100","intel hd 3000","intel q45","legacy","mali-2","mali-3","mali-4","quadro fx 1500","quadro fx 4","quadro fx 5","radeon hd 2400","radeon hd 2600","radeon hd 4670","radeon hd 4850","radeon hd 4870","radeon hd 5670","radeon hd 5750","radeon hd 6290","radeon hd 6300","radeon hd 6310","radeon hd 6320","radeon hd 6490m","radeon hd 6630m","radeon hd 6750m","radeon hd 6770m","radeon hd 6970m","sgx 543","sgx543"];function x(e){return e=e.toLowerCase().replace(/.*angle ?\((.+)\)(?: on vulkan [0-9.]+)?$/i,"$1").replace(/\s(\d{1,2}gb|direct3d.+$)|\(r\)| \([^)]+\)$/g,"").replace(/(?:vulkan|opengl) \d+\.\d+(?:\.\d+)?(?: \((.*)\))?/,"$1")}let w="undefined"==typeof window,j=(()=>{if(w)return;let{userAgent:e,platform:t,maxTouchPoints:n}=window.navigator,r=/(iphone|ipod|ipad)/i.test(e),i="iPad"===t||"MacIntel"===t&&n>0&&!window.MSStream;return{isIpad:i,isMobile:/android/i.test(e)||r||i,isSafari12:/Version\/12.+Safari/.test(e)}})();class E extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}}let k=[],S=[];function _(e){return null!=e}let C=({mobileTiers:e=[0,15,30,60],desktopTiers:t=[0,15,30,60],override:n={},glContext:r,failIfMajorPerformanceCaveat:i=!1,benchmarksURL:o="https://unpkg.com/detect-gpu@5.0.34/dist/benchmarks"}={})=>y(void 0,void 0,void 0,function*(){let a={};if(w)return{tier:0,type:"SSR"};let{isIpad:s=!!(null==j?void 0:j.isIpad),isMobile:l=!!(null==j?void 0:j.isMobile),screenSize:u=window.screen,loadBenchmarks:c=e=>y(void 0,void 0,void 0,function*(){let t=yield fetch(`${o}/${e}`).then(e=>e.json());if(4>parseInt(t.shift().split(".")[0],10))throw new E("Detect GPU benchmark data is out of date. Please update to version 4x");return t})}=n,{renderer:d}=n,f=(e,t,n,r,i)=>({device:i,fps:r,gpu:n,isMobile:l,tier:e,type:t}),h,p="";if(d)h=[d=x(d)];else{var m;let e=r||function(e,t=!1){let n={alpha:!1,antialias:!1,depth:!1,failIfMajorPerformanceCaveat:t,powerPreference:"high-performance",stencil:!1};e&&delete n.powerPreference;let r=window.document.createElement("canvas"),i=r.getContext("webgl",n)||r.getContext("experimental-webgl",n);return null!=i?i:void 0}(null==j?void 0:j.isSafari12,i);if(!e)return f(0,"WEBGL_UNSUPPORTED");let t=e.getExtension("WEBGL_debug_renderer_info");if(t&&(d=e.getParameter(t.UNMASKED_RENDERER_WEBGL)),!d)return f(1,"FALLBACK");p=d,h="apple gpu"===(m=d=x(d))?function(e,t,n){let r;if(!n)return[t];let i=function(e){let t=e.createShader(35633),n=e.createShader(35632),r=e.createProgram();if(!(n&&t&&r))return;e.shaderSource(t,"\n precision highp float;\n attribute vec3 aPosition;\n varying float vvv;\n void main() {\n vvv = 0.31622776601683794;\n gl_Position = vec4(aPosition, 1.0);\n }\n "),e.shaderSource(n,"\n precision highp float;\n varying float vvv;\n void main() {\n vec4 enc = vec4(1.0, 255.0, 65025.0, 16581375.0) * vvv;\n enc = fract(enc);\n enc -= enc.yzww * vec4(1.0 / 255.0, 1.0 / 255.0, 1.0 / 255.0, 0.0);\n gl_FragColor = enc;\n }\n "),e.compileShader(t),e.compileShader(n),e.attachShader(r,t),e.attachShader(r,n),e.linkProgram(r),e.detachShader(r,t),e.detachShader(r,n),e.deleteShader(t),e.deleteShader(n),e.useProgram(r);let i=e.createBuffer();e.bindBuffer(34962,i),e.bufferData(34962,new Float32Array([-1,-1,0,3,-1,0,-1,3,0]),35044);let o=e.getAttribLocation(r,"aPosition");e.vertexAttribPointer(o,3,5126,!1,0,0),e.enableVertexAttribArray(o),e.clearColor(1,1,1,1),e.clear(16384),e.viewport(0,0,1,1),e.drawArrays(4,0,3);let a=new Uint8Array(4);return e.readPixels(0,0,1,1,6408,5121,a),e.deleteProgram(r),e.deleteBuffer(i),a.join("")}(e),o="801621810",a="8016218135",s="80162181161",l=(null==j?void 0:j.isIpad)?[["a7",s,12],["a8",a,15],["a8x",a,15],["a9",a,15],["a9x",a,15],["a10",a,15],["a10x",a,15],["a12",o,15],["a12x",o,15],["a12z",o,15],["a14",o,15],["m1",o,15]]:[["a7",s,12],["a8",a,12],["a9",a,15],["a10",a,15],["a11",o,15],["a12",o,15],["a13",o,15],["a14",o,15]];return"80162181255"===i?r=l.filter(([,,e])=>e>=14):(r=l.filter(([,e])=>e===i)).length||(r=l),r.map(([e])=>`apple ${e} gpu`)}(e,m,l):[m]}let v=(yield Promise.all(h.map(function(e){var t;return y(this,void 0,void 0,function*(){let n;let r=(e=>{let t=l?["adreno","apple","mali-t","mali","nvidia","powervr","samsung"]:["intel","apple","amd","radeon","nvidia","geforce"];for(let n of t)if(e.includes(n))return n})(e);if(!r)return;let i=`${l?"m":"d"}-${r}${s?"-ipad":""}.json`,o=a[i]=null!==(t=a[i])&&void 0!==t?t:c(i);try{n=yield o}catch(e){if(e instanceof E)throw e;return}let d=function(e){var t;let n=(e=e.replace(/\([^)]+\)/,"")).match(/\d+/)||e.match(/(\W|^)([A-Za-z]{1,3})(\W|$)/g);return null!==(t=null==n?void 0:n.join("").replace(/\W|amd/g,""))&&void 0!==t?t:""}(e),f=n.filter(([,e])=>e===d);f.length||(f=n.filter(([t])=>t.includes(e)));let h=f.length;if(0===h)return;let p=e.split(/[.,()\[\]/\s]/g).sort().filter((e,t,n)=>0===t||e!==n[t-1]).join(" "),m,[v,,,,g]=h>1?f.map(e=>[e,function(e,t){if(e===t)return 0;let n=e;e.length>t.length&&(e=t,t=n);let r=e.length,i=t.length;for(;r>0&&e.charCodeAt(~-r)===t.charCodeAt(~-i);)r--,i--;let o,a=0;for(;au?l>u?u+1:l:l>s?s+1:l;return u}(p,e[2])]).sort(([,e],[,t])=>e-t)[0][0]:f[0],y=Number.MAX_VALUE,{devicePixelRatio:b}=window,x=u.width*b*u.height*b;for(let e of g){let[t,n]=e,r=t*n,i=Math.abs(x-r);ie===n?t-r:e-n);if(!v.length){let e=b.find(e=>d.includes(e));return e?f(0,"BLOCKLISTED",e):f(1,"FALLBACK",`${d} (${p})`)}let[,g,C,O]=v[0];if(-1===g)return f(0,"BLOCKLISTED",C,g,O);let M=l?e:t,T=0;for(let e=0;e=M[e]&&(T=e);return f(T,"BENCHMARK",C,g,O)});function O(){var e,t;let n=null===(e=(t=window).matchMedia)||void 0===e?void 0:e.call(t,"(prefers-reduced-motion: reduce)");return!n||!!n.matches}let M=(0,s.createContext)({}),T=()=>(0,s.useContext)(M);function A(e){let{children:t}=e,n=function(){let[e,t]=(0,s.useState)({}),n=(0,s.useCallback)((e,n)=>{t(t=>({...t,[e]:{key:e,...n}}))},[t]),r=(0,s.useCallback)(e=>{t(t=>(delete t[e],{...t}))},[t]),i=(0,s.useCallback)(()=>{t({})},[t]),o=(0,s.useMemo)(()=>Object.entries(e).map(e=>e[1]),[e]);return{setWorkflow:n,removeWorkflow:r,resetWorkflows:i,workflows:o}}();return(0,m.jsx)(M.Provider,{value:n,children:t})}let P=[{id:"usd",label:"USD",prefix:"$",fixed:2},{id:"cad",label:"CAD",prefix:"$",fixed:2},{id:"eur",label:"EUR",prefix:"€",fixed:2},{id:"gbp",label:"GBP",prefix:"\xa3",fixed:2},{id:"jpy",label:"JPY",prefix:"\xa5",fixed:2},{id:"aud",label:"AUD",prefix:"$",fixed:2},{id:"rub",label:"RUB",prefix:"₽",fixed:2},{id:"cny",label:"CNY",prefix:"\xa5",fixed:2},{id:"btc",label:"BTC",prefix:"₿",fixed:6},{id:"eth",label:"ETH",prefix:"Ξ",fixed:6}],N={api:"",allowCustomApi:!1,siaCentral:!0,password:void 0,currency:P[0],recentApis:{},autoLock:!1,autoLockTimeout:6e5},R=(0,s.createContext)({}),D=()=>(0,s.useContext)(R);function L(e){let{children:t,...n}=e,i=function(e){let{passwordProtectRequestHooks:t,lockRoutes:n,defaultSettings:i}=e,o=(0,s.useMemo)(()=>({...N,...i}),[i]),[a,l]=(0,g.Z)("v0/settings",{defaultValue:o});(0,s.useEffect)(()=>{l(e=>({...o,...e}))},[]);let u=(0,s.useMemo)(()=>({...o,...a}),[a,o]),{resetWorkflows:c}=T(),d=(0,s.useCallback)(e=>{l(t=>({...t,...e}))},[l]),f=(0,s.useCallback)(e=>{let t=P.find(t=>t.id===e);t&&d({currency:t})},[d]),h=(0,v.useRouter)(),p=(0,v.usePathname)(),[m,y]=(0,s.useState)({}),b=(0,s.useCallback)((e,t)=>{y(n=>({...n,[e]:t}))},[y]),x=(0,s.useCallback)(()=>{for(let[e,t]of(n&&h.push("".concat(n.login,"?prev=").concat([n.login].includes(p)?n.home:p)),d({password:""}),c(),(0,r.JG)(()=>!0,void 0,{revalidate:!1}),Object.entries(m)))t&&t()},[h,n,d,c,m,p]),w=(0,s.useMemo)(()=>!!u.password,[u]),j=function(){let e=O(),[t,n]=(0,s.useState)(!1),[r,i]=(0,s.useState)(!1),[{isGpuEnabled:o,hasUserSet:a},l]=(0,g.Z)("v1/gpuFeatures",{defaultValue:{isGpuEnabled:!e,hasUserSet:!1}}),u=(0,s.useCallback)(function(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];l(n=>({...n,isGpuEnabled:e,hasUserSet:t}))},[l]),c=(0,s.useCallback)(async()=>{let e=!1;{let t=await C();console.log("GPU",t),e=t.tier>0,!a&&t.tier<2&&u(!1,!1)}i(e),n(!0)},[i,u,a]);return(0,s.useEffect)(()=>{c()},[]),{hasCheckedGpu:t,canGpuRender:r,isGpuEnabled:o,shouldRender:r&&o,setCanGpuRender:i,setIsGpuEnabled:u}}();return{settings:u,setSettings:d,setCurrency:f,currencyOptions:P,gpu:j,lock:x,isUnlocked:w,passwordProtectRequestHooks:t,setOnLockCallback:b}}(n);return(0,m.jsx)(R.Provider,{value:i,children:t})}function F(e){var t;let n=(0,s.useMemo)(()=>u(e),[e]),{settings:i,passwordProtectRequestHooks:o}=D(),l=h(i,n.route,n,void 0),c=(0,s.useMemo)(()=>{var t,r;return t=l?"".concat(l).concat(JSON.stringify(void 0!==e.payload?e.payload:"")):null,r=n.disabled||o&&!i.password,!t||r?null:t},[l,e,n,o,i]);return(0,r.ZP)(c,async()=>{if(!n.route)throw Error("No route");let t=f(i,n,void 0);if(!l)throw Error("No route");try{let n=await a().post(l,e.payload,t);return n.data}catch(t){let e=Error(t.response.data);throw e.status=t.response.status||500,e}},null===(t=n.config)||void 0===t?void 0:t.swr)}function z(e,t){let{setWorkflow:n,removeWorkflow:i}=T(),{mutate:o}=(0,r.kY)(),{settings:s}=D(),u=l(e);return{post:async e=>{let r=c(e);try{let l;let c=f(s,u,r),d=h(s,u.route,u,r);if(!d)throw Error("No route");"payload"in r&&(l=r.payload);let m="".concat(d).concat(JSON.stringify(void 0!==e.payload?e.payload:"")),v=p(s,d,e,r);n(m,{path:v,payload:l});let g=await a().post(d,l,c);return t&&await t(function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e=>e,i=arguments.length>2?arguments[2]:void 0;return o(n=>{if("string"!=typeof n)return!1;let i=p(s,n,e,r);return t(i)},n,i)},r,g),i(m),{status:g.status,data:g.data}}catch(e){var l,d;return{status:null===(l=e.response)||void 0===l?void 0:l.status,error:(null===(d=e.response)||void 0===d?void 0:d.data)||e.message}}}}}function V(e,t){let{mutate:n}=(0,r.kY)(),{settings:i}=D(),{setWorkflow:o,removeWorkflow:s}=T(),u=l(e);return{put:async e=>{let r=c(e);try{let l;let c=f(i,u,r),d=h(i,u.route,u,r);if(!d)throw Error("No route");"payload"in r&&(l=r.payload);let m="".concat(d).concat(JSON.stringify(void 0!==e.payload?e.payload:"")),v=p(i,d,e,r);o(m,{path:v,payload:l});let g=await a().put(d,l,c);return t&&await t(function(t){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e=>e,a=arguments.length>2?arguments[2]:void 0;return n(n=>{if("string"!=typeof n)return!1;let o=p(i,n,e,r);return t(o)},o,a)},r,g),s(m),{status:g.status,data:g.data}}catch(e){var l,d;return{status:null===(l=e.response)||void 0===l?void 0:l.status,error:(null===(d=e.response)||void 0===d?void 0:d.data)||e.message}}}}}function I(e){var t,n,i;let o=(0,s.useMemo)(()=>u(e),[e]),{settings:l,passwordProtectRequestHooks:c}=D(),d=h(l,o.route,o,void 0);return(0,r.ZP)((n=e.standalone?"".concat(e.standalone,"/").concat(d):d,i=o.disabled||c&&!l.password,!n||i?null:n),async()=>{if(!o.route)throw Error("No route");let e=f(l,o,void 0);if(!d)throw Error("No route");try{let t=await a().get(d,e);return t.data}catch(t){let e=Error(t.response.data);throw e.status=t.response.status||500,e}},null===(t=o.config)||void 0===t?void 0:t.swr)}function Z(e,t){let{mutate:n}=(0,r.kY)(),{settings:i}=D(),{setWorkflow:o,removeWorkflow:s}=T(),u=l(e);return{delete:async e=>{let r=c(e);try{let l=f(i,u,r),c=h(i,u.route,u,r);if(!c)throw Error("No route");let d=p(i,c,e,r);o(c,{path:d});let m=await a().delete(c,l);return t&&await t(function(t){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e=>e,a=arguments.length>2?arguments[2]:void 0;return n(n=>{if("string"!=typeof n)return!1;let o=p(i,n,e,r);return t(o)},o,a)},r,m),s(c),{status:m.status,data:m.data}}catch(e){var l,d;return{status:null===(l=e.response)||void 0===l?void 0:l.status,error:(null===(d=e.response)||void 0===d?void 0:d.data)||e.message}}}}}function B(e){var t;let{get:n}=function(e){let{settings:t}=D(),n=l(e);return{get:async e=>{let r=c(e);try{let e=f(t,n,r),i=h(t,n.route,n,r);if(!i)throw Error("No route");let o=await a().get(i,e);return{status:o.status,data:o.data}}catch(t){var i,o,s,l;let e=(null===(i=t.response)||void 0===i?void 0:i.data)instanceof Blob?await (null===(o=t.response)||void 0===o?void 0:o.data.text()):(null===(s=t.response)||void 0===s?void 0:s.data)||t.message;return{status:null===(l=t.response)||void 0===l?void 0:l.status,error:e}}}}}({...e,config:{...e.config,axios:{...null===(t=e.config)||void 0===t?void 0:t.axios,responseType:"blob"}}});return{get:async(e,t)=>{let r=await n(t);return r.data&&function(e,t){let n=URL.createObjectURL(t),r=document.createElement("a");r.href=n,r.download=e,document.body.appendChild(r),r.click(),setTimeout(()=>{document.body.removeChild(r),URL.revokeObjectURL(n)},100)}(e,r.data),r}}}function H(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3,[n,r]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{if(n)return;let i=setInterval(()=>{e()&&(r(!0),clearInterval(i))},t);return()=>clearInterval(i)},[e,n,t]),n}function U(){return Math.round((new Date().getTime()-14336e8)/6e5)}function W(){return Math.round((new Date().getTime()-16736e8)/6e5)}function q(e){let{settings:t}=D();return(0,s.useMemo)(()=>function(n,i,o){return(0,r.JG)(r=>{if("string"!=typeof r)return!1;let i=p(t,r,e,void 0);return n(i)},i,o)},[t,e])}function $(e){let{fallback:t,cacheProvider:n,children:i}=e;return(0,m.jsx)(A,{children:(0,m.jsx)(r.J$,{value:{fallback:t||{},provider:n},children:i})})}},88242:function(e,t,n){"use strict";function r(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 i(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}n.d(t,{aXP:function(){return tJ},eHR:function(){return t5},xHM:function(){return t6},L6f:function(){return t8},rW0:function(){return t7},osk:function(){return t9},JaG:function(){return ne},wWN:function(){return iH},Dkj:function(){return iQ},fi8:function(){return iB},EMN:function(){return ns},bdU:function(){return nl},VUy:function(){return nu},Cp0:function(){return nc},kqg:function(){return nd},Mes:function(){return nf},DI$:function(){return np},NlZ:function(){return nS},Y3p:function(){return nC},Z$8:function(){return n_},tEK:function(){return nO},F3j:function(){return nM},PcV:function(){return nA},QN4:function(){return nT},Jsc:function(){return nP},bQp:function(){return nR},Y9T:function(){return nN},wEY:function(){return nF},olJ:function(){return nz},KiD:function(){return nZ},B4q:function(){return nq},_Eq:function(){return nB},VHe:function(){return iG},Jrl:function(){return n$},aPl:function(){return nK},kBK:function(){return iK},c_L:function(){return nJ},Bpb:function(){return nQ},vzB:function(){return n0},iG7:function(){return n5},nDH:function(){return n6},d19:function(){return n8},w9S:function(){return n7},VBo:function(){return iU},q0D:function(){return rr},Hb6:function(){return rn},CCF:function(){return ri},L37:function(){return rs},ROc:function(){return iX},UG6:function(){return iY},lq1:function(){return rl},zvn:function(){return iW},EL$:function(){return rc},BdP:function(){return rv},e1T:function(){return rg},P5r:function(){return ry},RdX:function(){return rb},U_S:function(){return rx},V8Q:function(){return r_},POp:function(){return rC},nCM:function(){return rT},kSc:function(){return rM},TtX:function(){return rO},mBM:function(){return i$},b47:function(){return rN},Sfn:function(){return rR},W$S:function(){return rI},T85:function(){return rZ},c6N:function(){return rB},Ckx:function(){return rH},EOT:function(){return rU},RK4:function(){return rq},XJM:function(){return rG},RRj:function(){return rX},ka0:function(){return rJ},hzZ:function(){return r1},n6M:function(){return r2},VUg:function(){return r8},owP:function(){return r7},Fs9:function(){return r9},wGX:function(){return ie},Wet:function(){return ii},ZEk:function(){return io},$Iz:function(){return ic},UBs:function(){return id},shL:function(){return ih},hiv:function(){return ip},mli:function(){return iv},lJ7:function(){return iJ},ORH:function(){return ix},I98:function(){return iw},R$6:function(){return ij},JCW:function(){return iM},xVB:function(){return iT},pHg:function(){return iA},I$H:function(){return iP},oaN:function(){return iq},qdM:function(){return iN},Gu6:function(){return iR},SmH:function(){return iz},RFr:function(){return iV},lg1:function(){return iI}});var a,s,l,u,c,d,f,h,p,m,v,g,y,b,x,w,j,E,k,S,_,C,O,M,T,A,P,N,R,D,L,F,z,V,I,Z,B,H,U,W,q,$,K,Y,G,X,J,Q,ee,et,en,er,ei,eo,ea,es,el,eu,ec,ed,ef,eh,ep,em,ev,eg,ey,eb,ex,ew,ej,eE,ek,eS,e_,eC,eO,eM,eT,eA,eP,eN,eR,eD,eL,eF,ez,eV,eI,eZ,eB,eH,eU,eW,eq,e$,eK,eY,eG,eX,eJ,eQ,e0,e1,e2,e4,e3,e5,e6,e8,e7,e9,te,tt,tn,tr,ti,to,ta,ts,tl,tu,tc,td,tf,th,tp,tm,tv,tg,ty,tb,tx,tw,tj,tE,tk,tS,t_,tC,tO,tM,tT,tA,tP,tN,tR,tD,tL,tF,tz=["width","height","viewBox"],tV=["tabindex"],tI={focusable:"false",preserveAspectRatio:"xMidYMid meet"},tZ=n(13980),tB=n.n(tZ),tH=n(2784);function tU(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 tW(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var tK=["className","children","tabIndex"],tY=["tabindex"],tG=tH.forwardRef(function(e,t){var n=e.className,r=e.children,a=e.tabIndex,s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.width,n=e.height,r=e.viewBox,a=void 0===r?"0 0 ".concat(t," ").concat(n):r,s=o(e,tz),l=s.tabindex,u=o(s,tV),c=i(i(i({},tI),u),{},{width:t,height:n,viewBox:a});return c["aria-label"]||c["aria-labelledby"]||c.title?(c.role="img",null!=l&&(c.focusable="true",c.tabindex=l)):c["aria-hidden"]=!0,c}(tW(tW({},t$(e,tK)),{},{tabindex:a})),l=s.tabindex,u=t$(s,tY);return n&&(u.className=n),null!=l&&(u.tabIndex=l),t&&(u.ref=t),tH.createElement("svg",u,r)});tG.displayName="Icon",tG.propTypes={"aria-hidden":tB().string,"aria-label":tB().string,"aria-labelledby":tB().string,children:tB().node,className:tB().string,height:tB().oneOfType([tB().number,tB().string]),preserveAspectRatio:tB().string,tabIndex:tB().string,viewBox:tB().string,width:tB().oneOfType([tB().number,tB().string]),xmlns:tB().string},tG.defaultProps={xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid meet"};var tX=["children"],tJ=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,tX);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),a||(a=tH.createElement("path",{d:"M17 15L17 8 15 8 15 15 8 15 8 17 15 17 15 24 17 24 17 17 24 17 24 15z"})),n)}),tQ=["children"],t0=["children"],t1=["children"],t2=["children"],t4=["children"],t3=["children"],t5=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,tQ);return tH.createElement(tG,tq({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),s||(s=tH.createElement("path",{d:"M14 19H18V21H14z"})),l||(l=tH.createElement("path",{d:"M6,2V28a2,2,0,0,0,2,2H24a2,2,0,0,0,2-2V2ZM24,28H8V16H24Zm0-14H8V10H24ZM8,8V4H24V8Z"})),n)}),t6=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,t0);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),u||(u=tH.createElement("path",{d:"M22 26L22 24 9.41 24 26 7.41 24.59 6 8 22.59 8 10 6 10 6 26 22 26z"})),n)}),t8=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,t1);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),c||(c=tH.createElement("path",{d:"M22 6L22 8 9.41 8 26 24.59 24.59 26 8 9.41 8 22 6 22 6 6 22 6z"})),n)}),t7=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,t2);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),d||(d=tH.createElement("path",{d:"M10 6L10 8 22.59 8 6 24.59 7.41 26 24 9.41 24 22 26 22 26 6 10 6z"})),n)}),t9=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,t4);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),f||(f=tH.createElement("path",{d:"M7.2,2.3c-1,4.4,1.7,8.7,6.1,9.8c0.1,0,0.1,0,0.2,0c-1.1,1.2-2.7,1.8-4.3,1.8c-0.1,0-0.2,0-0.2,0C5.6,13.8,3,11,3.2,7.7 C3.2,5.3,4.8,3.1,7.2,2.3 M8,1L8,1C4.1,1.6,1.5,5.3,2.1,9.1c0.6,3.3,3.4,5.8,6.8,5.9c0.1,0,0.2,0,0.3,0c2.3,0,4.4-1.1,5.8-3 c0.2-0.2,0.1-0.6-0.1-0.7c-0.1-0.1-0.2-0.1-0.3-0.1c-3.9-0.3-6.7-3.8-6.4-7.6C8.3,3,8.4,2.4,8.6,1.8c0.1-0.3,0-0.6-0.3-0.7 C8.1,1,8.1,1,8,1z"})),n)}),ne=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,t3);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),h||(h=tH.createElement("path",{d:"M7.5 1H8.5V3.5H7.5z"})),p||(p=tH.createElement("path",{d:"M10.8 3.4H13.3V4.4H10.8z",transform:"rotate(-45.001 12.074 3.922)"})),m||(m=tH.createElement("path",{d:"M12.5 7.5H15V8.5H12.5z"})),v||(v=tH.createElement("path",{d:"M11.6 10.8H12.6V13.3H11.6z",transform:"rotate(-45.001 12.077 12.075)"})),g||(g=tH.createElement("path",{d:"M7.5 12.5H8.5V15H7.5z"})),y||(y=tH.createElement("path",{d:"M2.7 11.6H5.2V12.6H2.7z",transform:"rotate(-45.001 3.929 12.078)"})),b||(b=tH.createElement("path",{d:"M1 7.5H3.5V8.5H1z"})),x||(x=tH.createElement("path",{d:"M3.4 2.7H4.4V5.2H3.4z",transform:"rotate(-45.001 3.926 3.925)"})),w||(w=tH.createElement("path",{d:"M8,6c1.1,0,2,0.9,2,2s-0.9,2-2,2S6,9.1,6,8S6.9,6,8,6 M8,5C6.3,5,5,6.3,5,8s1.3,3,3,3s3-1.3,3-3S9.7,5,8,5z"})),n)}),nt=["children"],nn=["children"],nr=["children"],ni=["children"],no=["children"],na=["children"],ns=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,nt);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),j||(j=tH.createElement("path",{d:"M24 12L16 22 8 12z"})),n)}),nl=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,nn);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),E||(E=tH.createElement("path",{d:"M20 24L10 16 20 8z"})),n)}),nu=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,nr);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),k||(k=tH.createElement("path",{d:"M12 8L22 16 12 24z"})),n)}),nc=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,ni);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),S||(S=tH.createElement("path",{d:"M24 24L16 32 8 24zM8 8L16 0 24 8z"})),n)}),nd=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,no);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),_||(_=tH.createElement("path",{d:"M8 20L16 10 24 20z"})),n)}),nf=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,na);return tH.createElement(tG,tq({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),C||(C=tH.createElement("path",{d:"M30,15H27.9492A12.0071,12.0071,0,0,0,17,4.0508V2H15V4.0508A12.0071,12.0071,0,0,0,4.0508,15H2v2H4.0508A12.0071,12.0071,0,0,0,15,27.9492V30h2V27.9492A12.0071,12.0071,0,0,0,27.9492,17H30ZM17,25.9492V22H15v3.9492A10.0166,10.0166,0,0,1,6.0508,17H10V15H6.0508A10.0166,10.0166,0,0,1,15,6.0508V10h2V6.0508A10.0166,10.0166,0,0,1,25.9492,15H22v2h3.9492A10.0166,10.0166,0,0,1,17,25.9492Z"})),n)}),nh=["children"],np=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,nh);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),O||(O=tH.createElement("path",{d:"M26,4H6A2,2,0,0,0,4,6V26a2,2,0,0,0,2,2H26a2,2,0,0,0,2-2V6A2,2,0,0,0,26,4ZM14,21.5,9,16.5427,10.5908,15,14,18.3456,21.4087,11l1.5918,1.5772Z"})),M||(M=tH.createElement("path",{fill:"none",d:"M14,21.5,9,16.5427,10.5908,15,14,18.3456,21.4087,11l1.5918,1.5772Z","data-icon-path":"inner-path"})),n)}),nm=["children"],nv=["children"],ng=["children"],ny=["children"],nb=["children"],nx=["children"],nw=["children"],nj=["children"],nE=["children"],nk=["children"],nS=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,nm);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),T||(T=tH.createElement("path",{d:"M13 24L4 15 5.414 13.586 13 21.171 26.586 7.586 28 9 13 24z"})),n)}),n_=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,nv);return tH.createElement(tG,tq({width:32,height:32,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),A||(A=tH.createElement("path",{d:"M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2ZM14,21.5908l-5-5L10.5906,15,14,18.4092,21.41,11l1.5957,1.5859Z"})),P||(P=tH.createElement("path",{fill:"none",d:"M14 21.591L9 16.591 10.591 15 14 18.409 21.41 11 23.005 12.585 14 21.591z","data-icon-path":"inner-path"})),n)}),nC=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,ng);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),N||(N=tH.createElement("path",{d:"M8,1C4.1,1,1,4.1,1,8c0,3.9,3.1,7,7,7s7-3.1,7-7C15,4.1,11.9,1,8,1z M7,11L4.3,8.3l0.9-0.8L7,9.3l4-3.9l0.9,0.8L7,11z"})),R||(R=tH.createElement("path",{d:"M7,11L4.3,8.3l0.9-0.8L7,9.3l4-3.9l0.9,0.8L7,11z","data-icon-path":"inner-path",opacity:"0"})),n)}),nO=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,ny);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),D||(D=tH.createElement("path",{d:"M14 21.414L9 16.413 10.413 15 14 18.586 21.585 11 23 12.415 14 21.414z"})),L||(L=tH.createElement("path",{d:"M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2Zm0,26A12,12,0,1,1,28,16,12,12,0,0,1,16,28Z"})),n)}),nM=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,nb);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),F||(F=tH.createElement("path",{d:"M11 8L6 13 5.3 12.3 9.6 8 5.3 3.7 6 3z"})),n)}),nT=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,nx);return tH.createElement(tG,tq({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),z||(z=tH.createElement("path",{d:"M24 9.4L22.6 8 16 14.6 9.4 8 8 9.4 14.6 16 8 22.6 9.4 24 16 17.4 22.6 24 24 22.6 17.4 16 24 9.4z"})),n)}),nA=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,nw);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),V||(V=tH.createElement("path",{d:"M24 9.4L22.6 8 16 14.6 9.4 8 8 9.4 14.6 16 8 22.6 9.4 24 16 17.4 22.6 24 24 22.6 17.4 16 24 9.4z"})),n)}),nP=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,nj);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),I||(I=tH.createElement("path",{d:"M16,2C8.2,2,2,8.2,2,16s6.2,14,14,14s14-6.2,14-14S23.8,2,16,2z M16,28C9.4,28,4,22.6,4,16S9.4,4,16,4s12,5.4,12,12 S22.6,28,16,28z"})),Z||(Z=tH.createElement("path",{d:"M21.4 23L16 17.6 10.6 23 9 21.4 14.4 16 9 10.6 10.6 9 16 14.4 21.4 9 23 10.6 17.6 16 23 21.4z"})),n)}),nN=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,nE);return tH.createElement(tG,tq({width:32,height:32,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),B||(B=tH.createElement("path",{d:"M11 18L12.41 19.41 15 16.83 15 29 17 29 17 16.83 19.59 19.41 21 18 16 13 11 18z"})),H||(H=tH.createElement("path",{d:"M23.5,22H23V20h.5a4.5,4.5,0,0,0,.36-9L23,11l-.1-.82a7,7,0,0,0-13.88,0L9,11,8.14,11a4.5,4.5,0,0,0,.36,9H9v2H8.5A6.5,6.5,0,0,1,7.2,9.14a9,9,0,0,1,17.6,0A6.5,6.5,0,0,1,23.5,22Z"})),n)}),nR=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,nk);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),U||(U=tH.createElement("path",{d:"M11 18L12.41 19.41 15 16.83 15 29 17 29 17 16.83 19.59 19.41 21 18 16 13 11 18z"})),W||(W=tH.createElement("path",{d:"M23.5,22H23V20h.5a4.5,4.5,0,0,0,.36-9L23,11l-.1-.82a7,7,0,0,0-13.88,0L9,11,8.14,11a4.5,4.5,0,0,0,.36,9H9v2H8.5A6.5,6.5,0,0,1,7.2,9.14a9,9,0,0,1,17.6,0A6.5,6.5,0,0,1,23.5,22Z"})),n)}),nD=["children"],nL=["children"],nF=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,nD);return tH.createElement(tG,tq({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),q||(q=tH.createElement("path",{d:"M31 16L24 23 22.59 21.59 28.17 16 22.59 10.41 24 9 31 16zM1 16L8 9 9.41 10.41 3.83 16 9.41 21.59 8 23 1 16z"})),$||($=tH.createElement("path",{d:"M5.91 15H26.080000000000002V17H5.91z",transform:"rotate(-75 15.996 16)"})),n)}),nz=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,nL);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),K||(K=tH.createElement("path",{d:"M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z"})),Y||(Y=tH.createElement("path",{d:"M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z"})),n)}),nV=["children"],nI=["children"],nZ=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,nV);return tH.createElement(tG,tq({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),G||(G=tH.createElement("path",{d:"M21,12V10H17V7H15v3H13a2.002,2.002,0,0,0-2,2v3a2.002,2.002,0,0,0,2,2h6v3H11v2h4v3h2V22h2a2.0023,2.0023,0,0,0,2-2V17a2.002,2.002,0,0,0-2-2H13V12Z"})),X||(X=tH.createElement("path",{d:"M16,4A12,12,0,1,1,4,16,12.0353,12.0353,0,0,1,16,4m0-2A14,14,0,1,0,30,16,14.0412,14.0412,0,0,0,16,2Z"})),n)}),nB=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,nI);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),J||(J=tH.createElement("circle",{cx:"22",cy:"24",r:"2"})),Q||(Q=tH.createElement("path",{d:"M29.7769,23.4785A8.64,8.64,0,0,0,22,18a8.64,8.64,0,0,0-7.7769,5.4785L14,24l.2231.5215A8.64,8.64,0,0,0,22,30a8.64,8.64,0,0,0,7.7769-5.4785L30,24ZM22,28a4,4,0,1,1,4-4A4.0045,4.0045,0,0,1,22,28Z"})),ee||(ee=tH.createElement("circle",{cx:"8",cy:"8",r:"1"})),et||(et=tH.createElement("circle",{cx:"8",cy:"16",r:"1"})),en||(en=tH.createElement("circle",{cx:"8",cy:"24",r:"1"})),er||(er=tH.createElement("path",{d:"M5,21h7V19H5V13H21v3h2V5a2,2,0,0,0-2-2H5A2,2,0,0,0,3,5V27a2,2,0,0,0,2,2h7V27H5ZM5,5H21v6H5Z"})),n)}),nH=["children"],nU=["children"],nW=["children"],nq=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,nH);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),ei||(ei=tH.createElement("path",{d:"M8 18H12V20H8zM14 18H18V20H14zM8 14H12V16H8zM14 22H18V24H14zM20 14H24V16H20zM20 22H24V24H20z"})),eo||(eo=tH.createElement("path",{d:"M27,3H5A2.0025,2.0025,0,0,0,3,5V27a2.0025,2.0025,0,0,0,2,2H27a2.0025,2.0025,0,0,0,2-2V5A2.0025,2.0025,0,0,0,27,3Zm0,2,0,4H5V5ZM5,27V11H27l0,16Z"})),n)}),n$=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,nU);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),ea||(ea=tH.createElement("path",{d:"M12 12H14V24H12zM18 12H20V24H18z"})),es||(es=tH.createElement("path",{d:"M4 6V8H6V28a2 2 0 002 2H24a2 2 0 002-2V8h2V6zM8 28V8H24V28zM12 2H20V4H12z"})),n)}),nK=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,nW);return tH.createElement(tG,tq({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),el||(el=tH.createElement("path",{d:"M8 4V8H4V4H8M2 2v8h8V2zM18 7v4H14V7h4M12 5v8h8V5zM8 16v4H4V16H8M2 14v8h8V14z"})),eu||(eu=tH.createElement("path",{d:"M22,10v6H16v6H10v8H30V10Zm-4,8h4v4H18ZM16,28H12V24h4Zm6,0H18V24h4Zm6,0H24V24h4Zm0-6H24V18h4Zm-4-6V12h4v4Z"})),n)}),nY=["children"],nG=["children"],nX=["children"],nJ=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,nY);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),ec||(ec=tH.createElement("path",{d:"M25.7,9.3l-7-7C18.5,2.1,18.3,2,18,2H8C6.9,2,6,2.9,6,4v24c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V10C26,9.7,25.9,9.5,25.7,9.3 z M18,4.4l5.6,5.6H18V4.4z M24,28H8V4h8v6c0,1.1,0.9,2,2,2h6V28z"})),ed||(ed=tH.createElement("path",{d:"M10 22H22V24H10zM10 16H22V18H10z"})),n)}),nQ=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,nG);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),ef||(ef=tH.createElement("circle",{cx:"16",cy:"16",r:"8"})),n)}),n0=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,nX);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eh||(eh=tH.createElement("path",{d:"M13 7L12.3 6.3 8.5 10.1 8.5 1 7.5 1 7.5 10.1 3.7 6.3 3 7 8 12zM13 12v2H3v-2H2v2l0 0c0 .6.4 1 1 1h10c.6 0 1-.4 1-1l0 0v-2H13z"})),n)}),n1=["children"],n2=["children"],n4=["children"],n3=["children"],n5=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,n1);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),ep||(ep=tH.createElement("path",{d:"M10 6H14V10H10zM18 6H22V10H18zM10 14H14V18H10zM18 14H22V18H18zM10 22H14V26H10zM18 22H22V26H18z"})),n)}),n6=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,n2);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),em||(em=tH.createElement("path",{d:"M16,2A14,14,0,1,0,30,16,14.0158,14.0158,0,0,0,16,2Zm5,3.1055a12.0136,12.0136,0,0,1,2.9158,1.8994L23.5034,8H21ZM13.3784,27.7026A11.9761,11.9761,0,0,1,8.1157,6.9761L9.4648,9h3.3423l-1.5,4H7.2793L5.8967,17.1475,8.4648,21h5l1.4319,2.1475ZM16,28c-.2034,0-.4016-.02-.6025-.03l1.3967-4.19a1.9876,1.9876,0,0,0-.2334-1.7412l-1.4319-2.1475A1.9962,1.9962,0,0,0,13.4648,19h-3.93L8.1033,16.8525,8.7207,15H11v2h2V14.1812l2.9363-7.83-1.8726-.7022L13.5571,7H10.5352L9.728,5.7891A11.7941,11.7941,0,0,1,19,4.395V8a2.0025,2.0025,0,0,0,2,2h2.5857A1.9865,1.9865,0,0,0,25,9.4141l.1406-.1407.2818-.68A11.9813,11.9813,0,0,1,27.3,12H22.5986a1.9927,1.9927,0,0,0-1.9719,1.665L20.03,17.1064a1.99,1.99,0,0,0,.991,2.086l2.1647,1.4638,1.4585,3.646A11.9577,11.9577,0,0,1,16,28Zm8.8145-8.6563L22.1,17.5088l-.1-.06L22.5986,14h5.2207a11.743,11.743,0,0,1-1.7441,8.4951Z"})),n)}),n8=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,n4);return tH.createElement(tG,tq({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),ev||(ev=tH.createElement("path",{d:"M21,30a8,8,0,1,1,8-8A8,8,0,0,1,21,30Zm0-14a6,6,0,1,0,6,6A6,6,0,0,0,21,16Z"})),eg||(eg=tH.createElement("path",{d:"M22.59 25L20 22.41 20 18 22 18 22 21.59 24 23.59 22.59 25z"})),ey||(ey=tH.createElement("path",{d:"M28,6a2,2,0,0,0-2-2H22V2H20V4H12V2H10V4H6A2,2,0,0,0,4,6V26a2,2,0,0,0,2,2h4V26H6V6h4V8h2V6h8V8h2V6h4v6h2Z"})),n)}),n7=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,n3);return tH.createElement(tG,tq({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eb||(eb=tH.createElement("path",{d:"M18 31h2V29a1.0006 1.0006 0 011-1h6a1.0006 1.0006 0 011 1v2h2V29a3.0033 3.0033 0 00-3-3H21a3.0033 3.0033 0 00-3 3zM24 25a4 4 0 114-4A4.0039 4.0039 0 0124 25zm0-6a2 2 0 102 2A2.0027 2.0027 0 0024 19zM2 31H4V29a1.0009 1.0009 0 011-1h6a1.0009 1.0009 0 011 1v2h2V29a3.0033 3.0033 0 00-3-3H5a3.0033 3.0033 0 00-3 3zM8 25a4 4 0 114-4A4.0042 4.0042 0 018 25zm0-6a2 2 0 102 2A2.0023 2.0023 0 008 19zM18 16h2V14a1.0009 1.0009 0 011-1h6a1.0009 1.0009 0 011 1v2h2V14a3.0033 3.0033 0 00-3-3H21a3.0033 3.0033 0 00-3 3zM24 10a4 4 0 114-4A4.0042 4.0042 0 0124 10zm0-6a2 2 0 102 2A2.0023 2.0023 0 0024 4zM2 16H4V14a1.0013 1.0013 0 011-1h6a1.0013 1.0013 0 011 1v2h2V14a3.0033 3.0033 0 00-3-3H5a3.0033 3.0033 0 00-3 3zM8 10a4 4 0 114-4A4.0045 4.0045 0 018 10zM8 4a2 2 0 102 2A2.002 2.002 0 008 4z"})),n)}),n9=["children"],re=["children"],rt=["children"],rn=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,n9);return tH.createElement(tG,tq({width:32,height:32,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),ex||(ex=tH.createElement("path",{d:"M18,28H14a2,2,0,0,1-2-2V18.41L4.59,11A2,2,0,0,1,4,9.59V6A2,2,0,0,1,6,4H26a2,2,0,0,1,2,2V9.59A2,2,0,0,1,27.41,11L20,18.41V26A2,2,0,0,1,18,28ZM6,6V9.59l8,8V26h4V17.59l8-8V6Z"})),n)}),rr=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,re);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),ew||(ew=tH.createElement("path",{d:"M18,28H14a2,2,0,0,1-2-2V18.41L4.59,11A2,2,0,0,1,4,9.59V6A2,2,0,0,1,6,4H26a2,2,0,0,1,2,2V9.59A2,2,0,0,1,27.41,11L20,18.41V26A2,2,0,0,1,18,28ZM6,6V9.59l8,8V26h4V17.59l8-8V6Z"})),n)}),ri=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,rt);return tH.createElement(tG,tq({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),ej||(ej=tH.createElement("path",{d:"M2 28H30V30H2zM27 11a1 1 0 001-1V7a1 1 0 00-.66-.94l-11-4a1 1 0 00-.68 0l-11 4A1 1 0 004 7v3a1 1 0 001 1H6V24H4v2H28V24H26V11zM6 7.7L16 4.06 26 7.7V9H6zM18 24H14V11h4zM8 11h4V24H8zM24 24H20V11h4z"})),n)}),ro=["children"],ra=["children"],rs=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,ro);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eE||(eE=tH.createElement("path",{d:"M26 20L24 20 24 24 20 24 20 26 24 26 24 30 26 30 26 26 30 26 30 24 26 24z"})),ek||(ek=tH.createElement("path",{d:"M28,8H16l-3.4-3.4C12.2,4.2,11.7,4,11.2,4H4C2.9,4,2,4.9,2,6v20c0,1.1,0.9,2,2,2h14v-2H4V6h7.2l3.4,3.4l0.6,0.6H28v8h2v-8 C30,8.9,29.1,8,28,8z"})),n)}),rl=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,ra);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eS||(eS=tH.createElement("path",{d:"M14,4a7,7,0,1,1-7,7,7,7,0,0,1,7-7m0-2a9,9,0,1,0,9,9A9,9,0,0,0,14,2Z"})),e_||(e_=tH.createElement("path",{d:"M28,11a13.9563,13.9563,0,0,0-4.1051-9.8949L22.4813,2.5187A11.9944,11.9944,0,0,1,5.5568,19.5194l-.0381-.0381L4.1051,20.8949A13.9563,13.9563,0,0,0,14,25v3H10v2H20V28H16V24.84A14.0094,14.0094,0,0,0,28,11Z"})),n)}),ru=["children"],rc=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,ru);return tH.createElement(tG,tq({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eC||(eC=tH.createElement("path",{d:"M16,.0005,4,5.9784V20.0443a12,12,0,0,0,24,0V5.9784Zm6.83,27.3138L16,23.9119V26.14l5.0361,2.5088A10.0025,10.0025,0,0,1,6,20.0443V7.21L16,2.2284,26,7.21v3.75L16,5.9783V8.2062l10,4.9816v3.75L16,11.9562v2.2279l10,4.9815v.8787a9.9045,9.9045,0,0,1-.37,2.6871L16,17.934v2.2279l8.8952,4.4313A10.0252,10.0252,0,0,1,22.83,27.3143Z"})),n)}),rd=["children"],rf=["children"],rh=["children"],rp=["children"],rm=["children"],rv=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,rd);return tH.createElement(tG,tq({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eO||(eO=tH.createElement("path",{d:"M11 24H21V26H11zM13 28H19V30H13zM16 2A10 10 0 006 12a9.19 9.19 0 003.46 7.62c1 .93 1.54 1.46 1.54 2.38h2c0-1.84-1.11-2.87-2.19-3.86A7.2 7.2 0 018 12a8 8 0 0116 0 7.2 7.2 0 01-2.82 6.14c-1.07 1-2.18 2-2.18 3.86h2c0-.92.53-1.45 1.54-2.39A9.18 9.18 0 0026 12 10 10 0 0016 2z"})),n)}),rg=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,rf);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eM||(eM=tH.createElement("path",{d:"M19,14a3,3,0,1,0-3-3A3,3,0,0,0,19,14Zm0-4a1,1,0,1,1-1,1A1,1,0,0,1,19,10Z"})),eT||(eT=tH.createElement("path",{d:"M26,4H6A2,2,0,0,0,4,6V26a2,2,0,0,0,2,2H26a2,2,0,0,0,2-2V6A2,2,0,0,0,26,4Zm0,22H6V20l5-5,5.59,5.59a2,2,0,0,0,2.82,0L21,19l5,5Zm0-4.83-3.59-3.59a2,2,0,0,0-2.82,0L18,19.17l-5.59-5.59a2,2,0,0,0-2.82,0L6,17.17V6H26Z"})),n)}),ry=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,rh);return tH.createElement(tG,tq({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eA||(eA=tH.createElement("path",{d:"M29.53,6.15a1,1,0,0,0-1,0L20,10.38V7a1,1,0,0,0-1.45-.89L10,10.38V3A1,1,0,0,0,9,2H3A1,1,0,0,0,2,3V28H30V7A1,1,0,0,0,29.53,6.15ZM22,26H18V19h4Zm6,0H24V18a1,1,0,0,0-1-1H17a1,1,0,0,0-1,1v8H4V4H8v9.62l10-5v5l10-5Z"})),n)}),rb=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,rp);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eP||(eP=tH.createElement("path",{d:"M8.5 11L8.5 6.5 6.5 6.5 6.5 7.5 7.5 7.5 7.5 11 6 11 6 12 10 12 10 11zM8 3.5c-.4 0-.8.3-.8.8S7.6 5 8 5c.4 0 .8-.3.8-.8S8.4 3.5 8 3.5z"})),eN||(eN=tH.createElement("path",{d:"M8,15c-3.9,0-7-3.1-7-7s3.1-7,7-7s7,3.1,7,7S11.9,15,8,15z M8,2C4.7,2,2,4.7,2,8s2.7,6,6,6s6-2.7,6-6S11.3,2,8,2z"})),n)}),rx=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,rm);return tH.createElement(tG,tq({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eR||(eR=tH.createElement("path",{d:"M29.88,15.52l-6-11A1,1,0,0,0,23,4H9a1,1,0,0,0-.88.52l-6,11a1,1,0,0,0,0,1l6,11A1,1,0,0,0,9,28H23a1,1,0,0,0,.88-.52l6-11A1,1,0,0,0,29.88,15.52ZM22.93,7l4.39,8h-9.5ZM16,14.14,10.82,6H21.18ZM9.07,7l5.11,8H4.68ZM4.68,17h9.5L9.07,25ZM16,17.86,21.18,26H10.82ZM22.93,25l-5.11-8h9.5Z"})),n)}),rw=["children"],rj=["children"],rE=["children"],rk=["children"],rS=["children"],r_=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,rw);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eD||(eD=tH.createElement("path",{d:"M13,14H3c-0.6,0-1-0.4-1-1V3c0-0.6,0.4-1,1-1h5v1H3v10h10V8h1v5C14,13.6,13.6,14,13,14z"})),eL||(eL=tH.createElement("path",{d:"M10 1L10 2 13.3 2 9 6.3 9.7 7 14 2.7 14 6 15 6 15 1z"})),n)}),rC=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,rj);return tH.createElement(tG,tq({width:20,height:20,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eF||(eF=tH.createElement("path",{d:"M29.25,6.76a6,6,0,0,0-8.5,0l1.42,1.42a4,4,0,1,1,5.67,5.67l-8,8a4,4,0,1,1-5.67-5.66l1.41-1.42-1.41-1.42-1.42,1.42a6,6,0,0,0,0,8.5A6,6,0,0,0,17,25a6,6,0,0,0,4.27-1.76l8-8A6,6,0,0,0,29.25,6.76Z"})),ez||(ez=tH.createElement("path",{d:"M4.19,24.82a4,4,0,0,1,0-5.67l8-8a4,4,0,0,1,5.67,0A3.94,3.94,0,0,1,19,14a4,4,0,0,1-1.17,2.85L15.71,19l1.42,1.42,2.12-2.12a6,6,0,0,0-8.51-8.51l-8,8a6,6,0,0,0,0,8.51A6,6,0,0,0,7,28a6.07,6.07,0,0,0,4.28-1.76L9.86,24.82A4,4,0,0,1,4.19,24.82Z"})),n)}),rO=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,rE);return tH.createElement(tG,tq({width:32,height:32,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eV||(eV=tH.createElement("path",{d:"M16 8H30V10H16zM6 10.59L3.41 8 2 9.41 6 13.41 14 5.41 12.59 4 6 10.59zM16 22H30V24H16zM6 24.59L3.41 22 2 23.41 6 27.41 14 19.41 12.59 18 6 24.59z"})),n)}),rM=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,rk);return tH.createElement(tG,tq({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eI||(eI=tH.createElement("path",{d:"M16 8H30V10H16zM6 10.59L3.41 8 2 9.41 6 13.41 14 5.41 12.59 4 6 10.59zM16 22H30V24H16zM6 24.59L3.41 22 2 23.41 6 27.41 14 19.41 12.59 18 6 24.59z"})),n)}),rT=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,rS);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eZ||(eZ=tH.createElement("path",{d:"M16 8H30V10H16zM6 10.59L3.41 8 2 9.41 6 13.41 14 5.41 12.59 4 6 10.59zM16 22H30V24H16zM6 24.59L3.41 22 2 23.41 6 27.41 14 19.41 12.59 18 6 24.59z"})),n)}),rA=["children"],rP=["children"],rN=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,rA);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eB||(eB=tH.createElement("path",{d:"M13.647,14.907a1.4482,1.4482,0,1,0,1.326,1.443A1.385,1.385,0,0,0,13.647,14.907Zm4.745,0a1.4482,1.4482,0,1,0,1.326,1.443A1.385,1.385,0,0,0,18.392,14.907Z"})),eH||(eH=tH.createElement("path",{d:"M24.71,4H7.29A2.6714,2.6714,0,0,0,4.625,6.678V24.254A2.6714,2.6714,0,0,0,7.29,26.932H22.032l-.689-2.405,1.664,1.547L24.58,27.53,27.375,30V6.678A2.6714,2.6714,0,0,0,24.71,4ZM19.692,20.978s-.468-.559-.858-1.053a4.1021,4.1021,0,0,0,2.353-1.547,7.4391,7.4391,0,0,1-1.495.767,8.5564,8.5564,0,0,1-1.885.559,9.1068,9.1068,0,0,1-3.367-.013,10.9127,10.9127,0,0,1-1.911-.559,7.6184,7.6184,0,0,1-.949-.442c-.039-.026-.078-.039-.117-.065a.18.18,0,0,1-.052-.039c-.234-.13-.364-.221-.364-.221a4.0432,4.0432,0,0,0,2.275,1.534c-.39.494-.871,1.079-.871,1.079a4.7134,4.7134,0,0,1-3.965-1.976,17.409,17.409,0,0,1,1.872-7.579,6.4285,6.4285,0,0,1,3.653-1.365l.13.156a8.77,8.77,0,0,0-3.419,1.703s.286-.156.767-.377a9.7625,9.7625,0,0,1,2.951-.819,1.2808,1.2808,0,0,1,.221-.026,11,11,0,0,1,2.626-.026A10.5971,10.5971,0,0,1,21.2,11.917a8.6518,8.6518,0,0,0-3.237-1.651l.182-.208a6.4285,6.4285,0,0,1,3.653,1.365,17.409,17.409,0,0,1,1.872,7.579A4.752,4.752,0,0,1,19.692,20.978Z"})),n)}),rR=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,rP);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eU||(eU=tH.createElement("path",{fillRule:"evenodd",d:"M16,2a14,14,0,0,0-4.43,27.28c.7.13,1-.3,1-.67s0-1.21,0-2.38c-3.89.84-4.71-1.88-4.71-1.88A3.71,3.71,0,0,0,6.24,22.3c-1.27-.86.1-.85.1-.85A2.94,2.94,0,0,1,8.48,22.9a3,3,0,0,0,4.08,1.16,2.93,2.93,0,0,1,.88-1.87c-3.1-.36-6.37-1.56-6.37-6.92a5.4,5.4,0,0,1,1.44-3.76,5,5,0,0,1,.14-3.7s1.17-.38,3.85,1.43a13.3,13.3,0,0,1,7,0c2.67-1.81,3.84-1.43,3.84-1.43a5,5,0,0,1,.14,3.7,5.4,5.4,0,0,1,1.44,3.76c0,5.38-3.27,6.56-6.39,6.91a3.33,3.33,0,0,1,.95,2.59c0,1.87,0,3.38,0,3.84s.25.81,1,.67A14,14,0,0,0,16,2Z"})),n)}),rD=["children"],rL=["children"],rF=["children"],rz=["children"],rV=["children"],rI=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,rD);return tH.createElement(tG,tq({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eW||(eW=tH.createElement("path",{d:"M16.59 20.41L20.17 24 20.17 24 16.58 27.59 18 29 23 24 18 19 16.59 20.41zM23.59 20.41L27.17 24 27.17 24 23.58 27.59 25 29 30 24 25 19 23.59 20.41z"})),eq||(eq=tH.createElement("path",{d:"M14,23H4V7.91l11.43,7.91a1,1,0,0,0,1.14,0L28,7.91V17h2V7a2,2,0,0,0-2-2H4A2,2,0,0,0,2,7V23a2,2,0,0,0,2,2H14ZM25.8,7,16,13.78,6.2,7Z"})),n)}),rZ=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,rL);return tH.createElement(tG,tq({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),e$||(e$=tH.createElement("path",{d:"M25.3943,24a7.8772,7.8772,0,0,0-1.6707-8.5684,3.918,3.918,0,0,0-1.0844-4.414l2.7759-2.7759a2.0025,2.0025,0,0,0,0-2.8286L22.5869,2.5849a2.0021,2.0021,0,0,0-2.8286,0L6.5859,15.7573a2.0027,2.0027,0,0,0,0,2.8286l2.8282,2.8282a2.0024,2.0024,0,0,0,2.8286,0l4.7749-4.7754a3.9329,3.9329,0,0,0,5.5139.4326A5.9442,5.9442,0,0,1,23.1775,24H16v4H4v2H28V24ZM10.8281,20,8,17.1714,9.8787,15.293l2.8283,2.8281ZM16,14a3.9811,3.9811,0,0,0,.0762.7524L14.1211,16.707l-2.8284-2.8281,9.88-9.88L24.001,6.8271l-3.2488,3.2491A3.9771,3.9771,0,0,0,16,14Zm4,2a2,2,0,1,1,2-2A2.0023,2.0023,0,0,1,20,16Zm6,12H18V26h8Z"})),n)}),rB=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,rF);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eK||(eK=tH.createElement("path",{d:"M8,1C4.1,1,1,4.1,1,8s3.1,7,7,7s7-3.1,7-7S11.9,1,8,1z M10.7,11.5L8,8.8l-2.7,2.7l-0.8-0.8L7.2,8L4.5,5.3l0.8-0.8L8,7.2 l2.7-2.7l0.8,0.8L8.8,8l2.7,2.7L10.7,11.5z"})),eY||(eY=tH.createElement("path",{d:"M10.7,11.5L8,8.8l-2.7,2.7l-0.8-0.8L7.2,8L4.5,5.3l0.8-0.8L8,7.2l2.7-2.7l0.8,0.8L8.8,8 l2.7,2.7L10.7,11.5z","data-icon-path":"inner-path",opacity:"0"})),n)}),rH=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,rz);return tH.createElement(tG,tq({width:32,height:32,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eG||(eG=tH.createElement("path",{d:"M16,2C8.2,2,2,8.2,2,16s6.2,14,14,14s14-6.2,14-14S23.8,2,16,2z M16,28C9.4,28,4,22.6,4,16S9.4,4,16,4s12,5.4,12,12 S22.6,28,16,28z"})),eX||(eX=tH.createElement("path",{d:"M21.4 23L16 17.6 10.6 23 9 21.4 14.4 16 9 10.6 10.6 9 16 14.4 21.4 9 23 10.6 17.6 16 23 21.4z"})),n)}),rU=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,rV);return tH.createElement(tG,tq({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eJ||(eJ=tH.createElement("path",{d:"M2 22H30V24H2zM2 26H30V28H2zM24 10a2 2 0 102 2 2 2 0 00-2-2zM16 16a4 4 0 114-4A4.0045 4.0045 0 0116 16zm0-6a2 2 0 102 2A2.002 2.002 0 0016 10zM8 10a2 2 0 102 2 2 2 0 00-2-2z"})),eQ||(eQ=tH.createElement("path",{d:"M28,20H4a2.0051,2.0051,0,0,1-2-2V6A2.0051,2.0051,0,0,1,4,4H28a2.0051,2.0051,0,0,1,2,2V18A2.0027,2.0027,0,0,1,28,20ZM28,6H4V18H28Z"})),n)}),rW=["children"],rq=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,rW);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),e0||(e0=tH.createElement("circle",{cx:"21",cy:"26",r:"2"})),e1||(e1=tH.createElement("circle",{cx:"21",cy:"6",r:"2"})),e2||(e2=tH.createElement("circle",{cx:"4",cy:"16",r:"2"})),e4||(e4=tH.createElement("path",{d:"M28,12a3.9962,3.9962,0,0,0-3.8579,3H19.8579a3.9655,3.9655,0,0,0-5.4914-2.6426L11.19,8.3872A3.9626,3.9626,0,0,0,12,6a4,4,0,1,0-4,4,3.96,3.96,0,0,0,1.6338-.3574l3.176,3.97a3.9239,3.9239,0,0,0,0,4.7744l-3.1758,3.97A3.96,3.96,0,0,0,8,22a4,4,0,1,0,4,4,3.9624,3.9624,0,0,0-.81-2.3872l3.1758-3.97A3.9658,3.9658,0,0,0,19.8579,17h4.2842A3.9934,3.9934,0,1,0,28,12ZM6,6A2,2,0,1,1,8,8,2.0023,2.0023,0,0,1,6,6ZM8,28a2,2,0,1,1,2-2A2.0023,2.0023,0,0,1,8,28Zm8-10a2,2,0,1,1,2-2A2.0023,2.0023,0,0,1,16,18Zm12,0a2,2,0,1,1,2-2A2.0023,2.0023,0,0,1,28,18Z"})),n)}),r$=["children"],rK=["children"],rY=["children"],rG=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,r$);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),e3||(e3=tH.createElement("path",{d:"M14 16L24 6 25.4 7.4 16.8 16 25.4 24.6 24 26zM8 4H10V28H8z"})),n)}),rX=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,rK);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),e5||(e5=tH.createElement("path",{d:"M18 16L8 26 6.6 24.6 15.2 16 6.6 7.4 8 6zM22 4H24V28H22z"})),n)}),rJ=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,rY);return tH.createElement(tG,tq({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),e6||(e6=tH.createElement("path",{d:"M21,2a8.9977,8.9977,0,0,0-8.6119,11.6118L2,24v6H8L18.3881,19.6118A9,9,0,1,0,21,2Zm0,16a7.0125,7.0125,0,0,1-2.0322-.3022L17.821,17.35l-.8472.8472-3.1811,3.1812L12.4141,20,11,21.4141l1.3787,1.3786-1.5859,1.586L9.4141,23,8,24.4141l1.3787,1.3786L7.1716,28H4V24.8284l9.8023-9.8023.8472-.8474-.3473-1.1467A7,7,0,1,1,21,18Z"})),e8||(e8=tH.createElement("circle",{cx:"22",cy:"10",r:"2"})),n)}),rQ=["children"],r0=["children"],r1=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,rQ);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),e7||(e7=tH.createElement("path",{d:"M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2ZM8,18a2,2,0,1,1,2-2A2,2,0,0,1,8,18Zm8,0a2,2,0,1,1,2-2A2,2,0,0,1,16,18Zm8,0a2,2,0,1,1,2-2A2,2,0,0,1,24,18Z"})),e9||(e9=tH.createElement("path",{fill:"none",d:"M10,16a2,2,0,1,1-2-2A2,2,0,0,1,10,16Zm6-2a2,2,0,1,0,2,2A2,2,0,0,0,16,14Zm8,0a2,2,0,1,0,2,2A2,2,0,0,0,24,14Z","data-icon-path":"inner-path"})),n)}),r2=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,r0);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),te||(te=tH.createElement("path",{d:"M29.37,14.75,20,10V6a4,4,0,0,0-8,0v4L2.63,14.75a1,1,0,0,0-.63.93v5a1,1,0,0,0,1,1,1,1,0,0,0,.29-.05L12,18v5L8.55,24.72a1,1,0,0,0-.55.9V29a1,1,0,0,0,1,1,.9.9,0,0,0,.28,0L16,28l6.72,2A.9.9,0,0,0,23,30a1,1,0,0,0,1-1V25.62a1,1,0,0,0-.55-.9L20,23V18l8.71,3.61a1,1,0,0,0,.29.05,1,1,0,0,0,1-1v-5A1,1,0,0,0,29.37,14.75ZM28,19.15,18,15v9.24l4,2v1.43l-6-1.75-6,1.75V26.24l4-2V15L4,19.15V16.3l10-5.07V6a2,2,0,0,1,4,0v5.23L28,16.3Z"})),n)}),r4=["children"],r3=["children"],r5=["children"],r6=["children"],r8=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,r4);return tH.createElement(tG,tq({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),tt||(tt=tH.createElement("path",{d:"M30 18A6 6 0 1020 22.46v7.54l4-1.8926 4 1.8926V22.46A5.98 5.98 0 0030 18zm-4 8.84l-2-.9467L22 26.84V23.65a5.8877 5.8877 0 004 0zM24 22a4 4 0 114-4A4.0045 4.0045 0 0124 22zM9 14H16V16H9zM9 8H19V10H9z"})),tn||(tn=tH.createElement("path",{d:"M6,30a2.0021,2.0021,0,0,1-2-2V4A2.0021,2.0021,0,0,1,6,2H22a2.0021,2.0021,0,0,1,2,2V8H22V4H6V28H16v2Z"})),n)}),r7=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,r3);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),tr||(tr=tH.createElement("circle",{cx:"11",cy:"15.5",r:"1.5"})),ti||(ti=tH.createElement("path",{d:"M12,12H10V8h2a2,2,0,0,0,0-4H10A2.0023,2.0023,0,0,0,8,6v.5H6V6a4.0045,4.0045,0,0,1,4-4h2a4,4,0,0,1,0,8Z"})),to||(to=tH.createElement("path",{d:"M22.4479,21.0337A10.971,10.971,0,0,0,19.9211,4.7446l-.999,1.73A8.9967,8.9967,0,1,1,5,14H3a10.9916,10.9916,0,0,0,18.0338,8.4478L28.5859,30,30,28.5859Z"})),n)}),r9=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,r5);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),ta||(ta=tH.createElement("path",{d:"M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2Zm0,26A12,12,0,1,1,28,16,12,12,0,0,1,16,28Z"})),n)}),ie=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,r6);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),ts||(ts=tH.createElement("path",{d:"M20.59 22L15 16.41 15 7 17 7 17 15.58 22 20.59 20.59 22z"})),tl||(tl=tH.createElement("path",{d:"M16,2A13.94,13.94,0,0,0,6,6.23V2H4v8h8V8H7.08A12,12,0,1,1,4,16H2A14,14,0,1,0,16,2Z"})),n)}),it=["children"],ir=["children"],ii=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,it);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),tu||(tu=tH.createElement("path",{d:"M18,28A12,12,0,1,0,6,16v6.2L2.4,18.6,1,20l6,6,6-6-1.4-1.4L8,22.2V16H8A10,10,0,1,1,18,26Z"})),n)}),io=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,ir);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),tc||(tc=tH.createElement("path",{d:"M13.9,4.6l-2.5-2.5C11.3,2.1,11.1,2,11,2H3C2.4,2,2,2.4,2,3v10c0,0.6,0.4,1,1,1h10c0.6,0,1-0.4,1-1V5 C14,4.9,13.9,4.7,13.9,4.6z M6,3h4v2H6V3z M10,13H6V9h4V13z M11,13V9c0-0.6-0.4-1-1-1H6C5.4,8,5,8.4,5,9v4H3V3h2v2c0,0.6,0.4,1,1,1 h4c0.6,0,1-0.4,1-1V3.2l2,2V13H11z"})),n)}),ia=["children"],is=["children"],il=["children"],iu=["children"],ic=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,ia);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),td||(td=tH.createElement("path",{d:"M28,4H4A2,2,0,0,0,2,6V22a2,2,0,0,0,2,2h8v4H8v2H24V28H20V24h8a2,2,0,0,0,2-2V6A2,2,0,0,0,28,4ZM18,28H14V24h4Zm10-6H4V6H28Z"})),n)}),id=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,is);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),tf||(tf=tH.createElement("path",{d:"M15,14.3L10.7,10c1.9-2.3,1.6-5.8-0.7-7.7S4.2,0.7,2.3,3S0.7,8.8,3,10.7c2,1.7,5,1.7,7,0l4.3,4.3L15,14.3z M2,6.5 C2,4,4,2,6.5,2S11,4,11,6.5S9,11,6.5,11S2,9,2,6.5z"})),n)}),ih=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,il);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),th||(th=tH.createElement("path",{d:"M13.5,8.4c0-0.1,0-0.3,0-0.4c0-0.1,0-0.3,0-0.4l1-0.8c0.4-0.3,0.4-0.9,0.2-1.3l-1.2-2C13.3,3.2,13,3,12.6,3 c-0.1,0-0.2,0-0.3,0.1l-1.2,0.4c-0.2-0.1-0.4-0.3-0.7-0.4l-0.3-1.3C10.1,1.3,9.7,1,9.2,1H6.8c-0.5,0-0.9,0.3-1,0.8L5.6,3.1 C5.3,3.2,5.1,3.3,4.9,3.4L3.7,3C3.6,3,3.5,3,3.4,3C3,3,2.7,3.2,2.5,3.5l-1.2,2C1.1,5.9,1.2,6.4,1.6,6.8l0.9,0.9c0,0.1,0,0.3,0,0.4 c0,0.1,0,0.3,0,0.4L1.6,9.2c-0.4,0.3-0.5,0.9-0.2,1.3l1.2,2C2.7,12.8,3,13,3.4,13c0.1,0,0.2,0,0.3-0.1l1.2-0.4 c0.2,0.1,0.4,0.3,0.7,0.4l0.3,1.3c0.1,0.5,0.5,0.8,1,0.8h2.4c0.5,0,0.9-0.3,1-0.8l0.3-1.3c0.2-0.1,0.4-0.2,0.7-0.4l1.2,0.4 c0.1,0,0.2,0.1,0.3,0.1c0.4,0,0.7-0.2,0.9-0.5l1.1-2c0.2-0.4,0.2-0.9-0.2-1.3L13.5,8.4z M12.6,12l-1.7-0.6c-0.4,0.3-0.9,0.6-1.4,0.8 L9.2,14H6.8l-0.4-1.8c-0.5-0.2-0.9-0.5-1.4-0.8L3.4,12l-1.2-2l1.4-1.2c-0.1-0.5-0.1-1.1,0-1.6L2.2,6l1.2-2l1.7,0.6 C5.5,4.2,6,4,6.5,3.8L6.8,2h2.4l0.4,1.8c0.5,0.2,0.9,0.5,1.4,0.8L12.6,4l1.2,2l-1.4,1.2c0.1,0.5,0.1,1.1,0,1.6l1.4,1.2L12.6,12z"})),tp||(tp=tH.createElement("path",{d:"M8,11c-1.7,0-3-1.3-3-3s1.3-3,3-3s3,1.3,3,3C11,9.6,9.7,11,8,11C8,11,8,11,8,11z M8,6C6.9,6,6,6.8,6,7.9C6,7.9,6,8,6,8 c0,1.1,0.8,2,1.9,2c0,0,0.1,0,0.1,0c1.1,0,2-0.8,2-1.9c0,0,0-0.1,0-0.1C10,6.9,9.2,6,8,6C8.1,6,8,6,8,6z"})),n)}),ip=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,iu);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),tm||(tm=tH.createElement("path",{d:"M30 8h-4.1c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2v2h14.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30V8zM21 12c-1.7 0-3-1.3-3-3s1.3-3 3-3 3 1.3 3 3S22.7 12 21 12zM2 24h4.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30v-2H15.9c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2V24zM11 20c1.7 0 3 1.3 3 3s-1.3 3-3 3-3-1.3-3-3S9.3 20 11 20z"})),n)}),im=["children"],iv=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,im);return tH.createElement(tG,tq({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),tv||(tv=tH.createElement("path",{d:"M8 15H24V17H8z"})),n)}),ig=["children"],iy=["children"],ib=["children"],ix=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,ig);return tH.createElement(tG,tq({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),tg||(tg=tH.createElement("path",{d:"M23,9h6a2,2,0,0,0,2-2V3a2,2,0,0,0-2-2H23a2,2,0,0,0-2,2V4H11V3A2,2,0,0,0,9,1H3A2,2,0,0,0,1,3V7A2,2,0,0,0,3,9H9a2,2,0,0,0,2-2V6h4V26a2.0023,2.0023,0,0,0,2,2h4v1a2,2,0,0,0,2,2h6a2,2,0,0,0,2-2V25a2,2,0,0,0-2-2H23a2,2,0,0,0-2,2v1H17V17h4v1a2,2,0,0,0,2,2h6a2,2,0,0,0,2-2V14a2,2,0,0,0-2-2H23a2,2,0,0,0-2,2v1H17V6h4V7A2,2,0,0,0,23,9Zm0-6h6V7H23ZM9,7H3V3H9ZM23,25h6v4H23Zm0-11h6v4H23Z",transform:"translate(0 .005)"})),n)}),iw=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,iy);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),ty||(ty=tH.createElement("path",{d:"M29.391,14.527L17.473,2.609C17.067,2.203,16.533,2,16,2s-1.067,0.203-1.473,0.609L2.609,14.527C2.203,14.933,2,15.466,2,16 s0.203,1.067,0.609,1.473l11.917,11.917C14.933,29.797,15.467,30,16,30s1.067-0.203,1.473-0.609l11.917-11.917 C29.797,17.067,30,16.534,30,16S29.797,14.933,29.391,14.527z M21,18H11v-4h10V18z"})),tb||(tb=tH.createElement("path",{fill:"none",d:"M11 14H21V18H11z","data-icon-path":"inner-path"})),n)}),ij=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,ib);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),tx||(tx=tH.createElement("path",{d:"M3 9L3.7 9.7 7.5 5.9 7.5 15 8.5 15 8.5 5.9 12.3 9.7 13 9 8 4zM3 4V2h10v2h1V2c0-.6-.4-1-1-1H3C2.4 1 2 1.4 2 2v2H3z"})),n)}),iE=["children"],ik=["children"],iS=["children"],i_=["children"],iC=["children"],iO=["children"],iM=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,iE);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),tw||(tw=tH.createElement("path",{d:"M21,26H4a2,2,0,0,1-2-2V8A2,2,0,0,1,4,6H21a2,2,0,0,1,2,2v4.06l5.42-3.87A1,1,0,0,1,30,9V23a1,1,0,0,1-1.58.81L23,19.94V24A2,2,0,0,1,21,26ZM4,8V24H21V18a1,1,0,0,1,1.58-.81L28,21.06V10.94l-5.42,3.87A1,1,0,0,1,21,14V8Z"})),n)}),iT=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,ik);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),tj||(tj=tH.createElement("path",{d:"M15.5,7.8C14.3,4.7,11.3,2.6,8,2.5C4.7,2.6,1.7,4.7,0.5,7.8c0,0.1,0,0.2,0,0.3c1.2,3.1,4.1,5.2,7.5,5.3 c3.3-0.1,6.3-2.2,7.5-5.3C15.5,8.1,15.5,7.9,15.5,7.8z M8,12.5c-2.7,0-5.4-2-6.5-4.5c1-2.5,3.8-4.5,6.5-4.5s5.4,2,6.5,4.5 C13.4,10.5,10.6,12.5,8,12.5z"})),tE||(tE=tH.createElement("path",{d:"M8,5C6.3,5,5,6.3,5,8s1.3,3,3,3s3-1.3,3-3S9.7,5,8,5z M8,10c-1.1,0-2-0.9-2-2s0.9-2,2-2s2,0.9,2,2S9.1,10,8,10z"})),n)}),iA=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,iS);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),tk||(tk=tH.createElement("path",{d:"M2.6,11.3l0.7-0.7C2.6,9.8,1.9,9,1.5,8c1-2.5,3.8-4.5,6.5-4.5c0.7,0,1.4,0.1,2,0.4l0.8-0.8C9.9,2.7,9,2.5,8,2.5 C4.7,2.6,1.7,4.7,0.5,7.8c0,0.1,0,0.2,0,0.3C1,9.3,1.7,10.4,2.6,11.3z"})),tS||(tS=tH.createElement("path",{d:"M6 7.9c.1-1 .9-1.8 1.8-1.8l.9-.9C7.2 4.7 5.5 5.6 5.1 7.2 5 7.7 5 8.3 5.1 8.8L6 7.9zM15.5 7.8c-.6-1.5-1.6-2.8-2.9-3.7L15 1.7 14.3 1 1 14.3 1.7 15l2.6-2.6c1.1.7 2.4 1 3.7 1.1 3.3-.1 6.3-2.2 7.5-5.3C15.5 8.1 15.5 7.9 15.5 7.8zM10 8c0 1.1-.9 2-2 2-.3 0-.7-.1-1-.3L9.7 7C9.9 7.3 10 7.6 10 8zM8 12.5c-1 0-2.1-.3-3-.8l1.3-1.3c1.4.9 3.2.6 4.2-.8.7-1 .7-2.4 0-3.4l1.4-1.4c1.1.8 2 1.9 2.6 3.2C13.4 10.5 10.6 12.5 8 12.5z"})),n)}),iP=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,i_);return tH.createElement(tG,tq({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),t_||(t_=tH.createElement("path",{d:"M22 17H24V19H22z"})),tC||(tC=tH.createElement("path",{d:"M28,8H4V5H26V3H4A2,2,0,0,0,2,5V26a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10A2,2,0,0,0,28,8ZM4,26V10H28v3H20a2,2,0,0,0-2,2v6a2,2,0,0,0,2,2h8v3ZM28,15v6H20V15Z"})),n)}),iN=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,iC);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),tO||(tO=tH.createElement("path",{d:"M8,1C4.1,1,1,4.1,1,8s3.1,7,7,7s7-3.1,7-7S11.9,1,8,1z M8,14c-3.3,0-6-2.7-6-6s2.7-6,6-6s6,2.7,6,6S11.3,14,8,14z"})),tM||(tM=tH.createElement("path",{d:"M7.5 4H8.5V9H7.5zM8 10.2c-.4 0-.8.3-.8.8s.3.8.8.8c.4 0 .8-.3.8-.8S8.4 10.2 8 10.2z"})),n)}),iR=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,iO);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),tT||(tT=tH.createElement("path",{d:"M8,1C4.2,1,1,4.2,1,8s3.2,7,7,7s7-3.1,7-7S11.9,1,8,1z M7.5,4h1v5h-1C7.5,9,7.5,4,7.5,4z M8,12.2 c-0.4,0-0.8-0.4-0.8-0.8s0.3-0.8,0.8-0.8c0.4,0,0.8,0.4,0.8,0.8S8.4,12.2,8,12.2z"})),tA||(tA=tH.createElement("path",{d:"M7.5,4h1v5h-1C7.5,9,7.5,4,7.5,4z M8,12.2c-0.4,0-0.8-0.4-0.8-0.8s0.3-0.8,0.8-0.8 c0.4,0,0.8,0.4,0.8,0.8S8.4,12.2,8,12.2z","data-icon-path":"inner-path",opacity:"0"})),n)}),iD=["children"],iL=["children"],iF=["children"],iz=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,iD);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),tP||(tP=tH.createElement("path",{d:"M26.0022,4H5.998A1.998,1.998,0,0,0,4,5.998V26.002A1.998,1.998,0,0,0,5.998,28H26.0022A1.9979,1.9979,0,0,0,28,26.002V5.998A1.9979,1.9979,0,0,0,26.0022,4ZM14.8752,8h2.25V18h-2.25ZM16,24a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,16,24Z"})),tN||(tN=tH.createElement("path",{fill:"none",d:"M14.8751,8h2.25V18h-2.25ZM16,24a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,16,24Z","data-icon-path":"inner-path"})),n)}),iV=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,iL);return tH.createElement(tG,tq({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),tR||(tR=tH.createElement("path",{d:"M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2ZM28,15H22A24.26,24.26,0,0,0,19.21,4.45,12,12,0,0,1,28,15ZM16,28a5,5,0,0,1-.67,0A21.85,21.85,0,0,1,12,17H20a21.85,21.85,0,0,1-3.3,11A5,5,0,0,1,16,28ZM12,15a21.85,21.85,0,0,1,3.3-11,6,6,0,0,1,1.34,0A21.85,21.85,0,0,1,20,15Zm.76-10.55A24.26,24.26,0,0,0,10,15h-6A12,12,0,0,1,12.79,4.45ZM4.05,17h6a24.26,24.26,0,0,0,2.75,10.55A12,12,0,0,1,4.05,17ZM19.21,27.55A24.26,24.26,0,0,0,22,17h6A12,12,0,0,1,19.21,27.55Z"})),n)}),iI=tH.forwardRef(function(e,t){var n=e.children,r=t$(e,iF);return tH.createElement(tG,tq({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),tD||(tD=tH.createElement("path",{d:"M29.3164,8.0513l-18-6A1,1,0,0,0,10.4,2.2L4,7V2H2V30H4V11l6.4,4.8a1,1,0,0,0,.9165.1489l18-6a1,1,0,0,0,0-1.8974ZM10,13,4.6665,9,10,5Zm4-.0542-2,.667V4.3872l2,.667Zm4-1.333-2,.6665V5.7207l2,.6665Zm2-.667V7.0542L25.8379,9Z"})),tL||(tL=tH.createElement("path",{d:"M20,22a4,4,0,0,0-8,0h2a2,2,0,1,1,2,2H8v2h8A4.0045,4.0045,0,0,0,20,22Z"})),tF||(tF=tH.createElement("path",{d:"M26,22a4.0045,4.0045,0,0,0-4,4h2a2,2,0,1,1,2,2H12v2H26a4,4,0,0,0,0-8Z"})),n)}),iZ=n(52322);function iB(e){let{size:t=24}=e;return(0,iZ.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:t,width:t,fill:"currentColor",viewBox:"0 0 448 512",children:(0,iZ.jsx)("path",{d:"M96 152v8H48v-8C48 68.1 116.1 0 200 0h48c83.9 0 152 68.1 152 152v8H352v-8c0-57.4-46.6-104-104-104H200C142.6 48 96 94.6 96 152zM0 224c0-17.7 14.3-32 32-32H416c17.7 0 32 14.3 32 32s-14.3 32-32 32h-5.1L388.5 469c-2.6 24.4-23.2 43-47.7 43H107.2c-24.6 0-45.2-18.5-47.7-43L37.1 256H32c-17.7 0-32-14.3-32-32z"})})}function iH(e){let{size:t=24}=e;return(0,iZ.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:"currentColor",viewBox:"0 0 512 512",children:(0,iZ.jsx)("path",{d:"M464 64C490.5 64 512 85.49 512 112V176C512 202.5 490.5 224 464 224H48C21.49 224 0 202.5 0 176V112C0 85.49 21.49 64 48 64H464zM448 128H320V160H448V128zM464 288C490.5 288 512 309.5 512 336V400C512 426.5 490.5 448 464 448H48C21.49 448 0 426.5 0 400V336C0 309.5 21.49 288 48 288H464zM192 352V384H448V352H192z"})})}function iU(e){let{size:t=24,className:n}=e;return(0,iZ.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,className:n,fill:"currentColor",viewBox:"0 0 384 512",children:(0,iZ.jsx)("path",{d:"M256 0v128h128L256 0zM224 128L224 0H48C21.49 0 0 21.49 0 48v416C0 490.5 21.49 512 48 512h288c26.51 0 48-21.49 48-48V160h-127.1C238.3 160 224 145.7 224 128zM64 72C64 67.63 67.63 64 72 64h80C156.4 64 160 67.63 160 72v16C160 92.38 156.4 96 152 96h-80C67.63 96 64 92.38 64 88V72zM64 136C64 131.6 67.63 128 72 128h80C156.4 128 160 131.6 160 136v16C160 156.4 156.4 160 152 160h-80C67.63 160 64 156.4 64 152V136zM304 384c8.875 0 16 7.125 16 16S312.9 416 304 416h-47.25c-16.38 0-31.25-9.125-38.63-23.88c-2.875-5.875-8-6.5-10.12-6.5s-7.25 .625-10 6.125l-7.75 15.38C187.6 412.6 181.1 416 176 416H174.9c-6.5-.5-12-4.75-14-11L144 354.6L133.4 386.5C127.5 404.1 111 416 92.38 416H80C71.13 416 64 408.9 64 400S71.13 384 80 384h12.38c4.875 0 9.125-3.125 10.62-7.625l18.25-54.63C124.5 311.9 133.6 305.3 144 305.3s19.5 6.625 22.75 16.5l13.88 41.63c19.75-16.25 54.13-9.75 66 14.12c2 4 6 6.5 10.12 6.5H304z"})})}function iW(e){let{size:t=24,className:n}=e;return(0,iZ.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:"currentColor",viewBox:"0 0 512 512",className:n,children:(0,iZ.jsx)("path",{d:"M464 288h-416C21.5 288 0 309.5 0 336v96C0 458.5 21.5 480 48 480h416c26.5 0 48-21.5 48-48v-96C512 309.5 490.5 288 464 288zM320 416c-17.62 0-32-14.38-32-32s14.38-32 32-32s32 14.38 32 32S337.6 416 320 416zM416 416c-17.62 0-32-14.38-32-32s14.38-32 32-32s32 14.38 32 32S433.6 416 416 416zM464 32h-416C21.5 32 0 53.5 0 80v192.4C13.41 262.3 29.92 256 48 256h416c18.08 0 34.59 6.254 48 16.41V80C512 53.5 490.5 32 464 32z"})})}function iq(e){let{size:t=24,className:n}=e;return(0,iZ.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:t,width:t,className:n,fill:"currentColor",viewBox:"0 0 512 512",children:(0,iZ.jsx)("path",{d:"M448 32C465.7 32 480 46.33 480 64C480 81.67 465.7 96 448 96H80C71.16 96 64 103.2 64 112C64 120.8 71.16 128 80 128H448C483.3 128 512 156.7 512 192V416C512 451.3 483.3 480 448 480H64C28.65 480 0 451.3 0 416V96C0 60.65 28.65 32 64 32H448zM416 336C433.7 336 448 321.7 448 304C448 286.3 433.7 272 416 272C398.3 272 384 286.3 384 304C384 321.7 398.3 336 416 336z"})})}function i$(e){let{size:t=24}=e;return(0,iZ.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:"currentColor",viewBox:"0 0 448 512",children:(0,iZ.jsx)("path",{d:"M80 192V144C80 64.47 144.5 0 224 0C303.5 0 368 64.47 368 144V192H384C419.3 192 448 220.7 448 256V448C448 483.3 419.3 512 384 512H64C28.65 512 0 483.3 0 448V256C0 220.7 28.65 192 64 192H80zM144 192H304V144C304 99.82 268.2 64 224 64C179.8 64 144 99.82 144 144V192z"})})}function iK(e){let{size:t=24}=e;return(0,iZ.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:"currentColor",viewBox:"0 0 448 512",children:(0,iZ.jsx)("path",{d:"M7.994 153.5c1.326 0 2.687 .3508 3.975 1.119L208 271.5v223.8c0 9.741-7.656 16.71-16.01 16.71c-2.688 0-5.449-.7212-8.05-2.303l-152.2-92.47C12.13 405.3 0 383.3 0 359.5v-197.7C0 156.1 3.817 153.5 7.994 153.5zM426.2 117.2c0 2.825-1.352 5.647-4.051 7.248L224 242.6L25.88 124.4C23.19 122.8 21.85 119.1 21.85 117.2c0-2.8 1.32-5.603 3.965-7.221l165.1-100.9C201.7 3.023 212.9 0 224 0s22.27 3.023 32.22 9.07l165.1 100.9C424.8 111.6 426.2 114.4 426.2 117.2zM440 153.5C444.2 153.5 448 156.1 448 161.8v197.7c0 23.75-12.12 45.75-31.78 57.69l-152.2 92.5C261.5 511.3 258.7 512 256 512C247.7 512 240 505 240 495.3V271.5l196-116.9C437.3 153.8 438.7 153.5 440 153.5z"})})}function iY(e){let{size:t=24}=e;return(0,iZ.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",width:t,height:t,fill:"currentColor",children:(0,iZ.jsx)("path",{d:"M495.9 166.6C499.2 175.2 496.4 184.9 489.6 191.2L446.3 230.6C447.4 238.9 448 247.4 448 256C448 264.6 447.4 273.1 446.3 281.4L489.6 320.8C496.4 327.1 499.2 336.8 495.9 345.4C491.5 357.3 486.2 368.8 480.2 379.7L475.5 387.8C468.9 398.8 461.5 409.2 453.4 419.1C447.4 426.2 437.7 428.7 428.9 425.9L373.2 408.1C359.8 418.4 344.1 427 329.2 433.6L316.7 490.7C314.7 499.7 307.7 506.1 298.5 508.5C284.7 510.8 270.5 512 255.1 512C241.5 512 227.3 510.8 213.5 508.5C204.3 506.1 197.3 499.7 195.3 490.7L182.8 433.6C167 427 152.2 418.4 138.8 408.1L83.14 425.9C74.3 428.7 64.55 426.2 58.63 419.1C50.52 409.2 43.12 398.8 36.52 387.8L31.84 379.7C25.77 368.8 20.49 357.3 16.06 345.4C12.82 336.8 15.55 327.1 22.41 320.8L65.67 281.4C64.57 273.1 64 264.6 64 256C64 247.4 64.57 238.9 65.67 230.6L22.41 191.2C15.55 184.9 12.82 175.3 16.06 166.6C20.49 154.7 25.78 143.2 31.84 132.3L36.51 124.2C43.12 113.2 50.52 102.8 58.63 92.95C64.55 85.8 74.3 83.32 83.14 86.14L138.8 103.9C152.2 93.56 167 84.96 182.8 78.43L195.3 21.33C197.3 12.25 204.3 5.04 213.5 3.51C227.3 1.201 241.5 0 256 0C270.5 0 284.7 1.201 298.5 3.51C307.7 5.04 314.7 12.25 316.7 21.33L329.2 78.43C344.1 84.96 359.8 93.56 373.2 103.9L428.9 86.14C437.7 83.32 447.4 85.8 453.4 92.95C461.5 102.8 468.9 113.2 475.5 124.2L480.2 132.3C486.2 143.2 491.5 154.7 495.9 166.6V166.6zM256 336C300.2 336 336 300.2 336 255.1C336 211.8 300.2 175.1 256 175.1C211.8 175.1 176 211.8 176 255.1C176 300.2 211.8 336 256 336z"})})}function iG(e){let{size:t=24}=e;return(0,iZ.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",height:t,width:t,fill:"currentColor",children:(0,iZ.jsx)("path",{d:"M448 80v48c0 44.2-100.3 80-224 80S0 172.2 0 128V80C0 35.8 100.3 0 224 0S448 35.8 448 80zM393.2 214.7c20.8-7.4 39.9-16.9 54.8-28.6V288c0 44.2-100.3 80-224 80S0 332.2 0 288V186.1c14.9 11.8 34 21.2 54.8 28.6C99.7 230.7 159.5 240 224 240s124.3-9.3 169.2-25.3zM0 346.1c14.9 11.8 34 21.2 54.8 28.6C99.7 390.7 159.5 400 224 400s124.3-9.3 169.2-25.3c20.8-7.4 39.9-16.9 54.8-28.6V432c0 44.2-100.3 80-224 80S0 476.2 0 432V346.1z"})})}function iX(e){let{size:t=24}=e;return(0,iZ.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",height:t,width:t,fill:"currentColor",children:(0,iZ.jsx)("path",{d:"M64 480H448c35.3 0 64-28.7 64-64V160c0-35.3-28.7-64-64-64H298.5c-17 0-33.3-6.7-45.3-18.7L226.7 50.7c-12-12-28.3-18.7-45.3-18.7H64C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64z"})})}function iJ(e){let{size:t=24}=e;return(0,iZ.jsxs)("svg",{version:"1.1",id:"icon",xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",width:t,height:t,fill:"currentColor",viewBox:"0 0 32 32",children:[(0,iZ.jsx)("polygon",{points:"23,9.2 20.4,6.6 19,8 23,12 30,5 28.6,3.6 "}),(0,iZ.jsx)("polygon",{points:"12,5.4 10.6,4 8,6.6 5.4,4 4,5.4 6.6,8 4,10.6 5.4,12 8,9.4 10.6,12 12,10.6 9.4,8 "}),(0,iZ.jsx)("polygon",{points:"12,21.4 10.6,20 8,22.6 5.4,20 4,21.4 6.6,24 4,26.6 5.4,28 8,25.4 10.6,28 12,26.6 9.4,24 "}),(0,iZ.jsx)("polygon",{points:"17,15 17,2 15,2 15,15 2,15 2,17 15,17 15,30 17,30 17,17 30,17 30,15 "}),(0,iZ.jsx)("rect",{fill:"none",width:"32",height:"32"})]})}function iQ(e){let{size:t=24}=e;return(0,iZ.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:t,width:t,fill:"currentColor",viewBox:"0 0 448 512",children:(0,iZ.jsx)("path",{d:"M224 0c-17.7 0-32 14.3-32 32V51.2C119 66 64 130.6 64 208v18.8c0 47-17.3 92.4-48.5 127.6l-7.4 8.3c-8.4 9.4-10.4 22.9-5.3 34.4S19.4 416 32 416H416c12.6 0 24-7.4 29.2-18.9s3.1-25-5.3-34.4l-7.4-8.3C401.3 319.2 384 273.9 384 226.8V208c0-77.4-55-142-128-156.8V32c0-17.7-14.3-32-32-32zm45.3 493.3c12-12 18.7-28.3 18.7-45.3H224 160c0 17 6.7 33.3 18.7 45.3s28.3 18.7 45.3 18.7s33.3-6.7 45.3-18.7z"})})}},9969:function(e,t,n){"use strict";n.d(t,{pz:function(){return ee},HI:function(){return o},Z7:function(){return q},Uy:function(){return $},e$:function(){return J},oe:function(){return Q},S0:function(){return et},YX:function(){return G},oV:function(){return L},sg:function(){return F},B$:function(){return D},d_:function(){return a},DQ:function(){return s},cq:function(){return N},IK:function(){return R},GP:function(){return P},nH:function(){return l},$:function(){return k},s2:function(){return O},ni:function(){return M},uf:function(){return _},Os:function(){return T},FV:function(){return E},wy:function(){return V},xw:function(){return Z},Jv:function(){return z},p$:function(){return ei},Iy:function(){return I},Q5:function(){return B},ZM:function(){return eo},f$:function(){return el},yu:function(){return H},KJ:function(){return U},og:function(){return K},Wl:function(){return d},cQ:function(){return c},ys:function(){return p},QL:function(){return h},Tu:function(){return m},aO:function(){return b},gU:function(){return g},a0:function(){return w},cg:function(){return y},Qq:function(){return v},RF:function(){return es}});var r=n(79381),i=n(2850);let o="/bus/state";function a(e){return(0,i.Nf)({...e,route:o})}function s(e){return(0,i.Nf)({...e,route:"/bus/consensus/state"})}function l(){let e=a({config:{swr:{revalidateOnFocus:!1}}}),t=(0,r.ZP)(e,()=>{var t;return(null===(t=e.data)||void 0===t?void 0:t.network)==="Zen Testnet"?(0,i.du)():(0,i.Tc)()},{refreshInterval:6e4,keepPreviousData:!0});return t.data||0}let u="/bus/syncer/peers";function c(e){return(0,i.Nf)({...e,route:u})}function d(e){return(0,i.mw)({...e,route:"/bus/syncer/connect"},async e=>{e(e=>e===u)})}let f="/bus/txpool/transactions";function h(e){return(0,i.Nf)({...e,route:f})}function p(e){return(0,i.mw)({...e,route:"/bus/txpool/broadcast"},async e=>{await (0,i.gw)(2e3),e(e=>e.startsWith(f)||e.startsWith(x))})}function m(e){return(0,i.Nf)({...e,route:"/bus/wallet"})}function v(e){return(0,i.Nf)({...e,route:"/bus/wallet/transactions"})}function g(e){return(0,i.mw)({...e,route:"/bus/wallet/fund"})}function y(e){return(0,i.mw)({...e,route:"/bus/wallet/sign"})}function b(e){return(0,i.mw)({...e,route:"/bus/wallet/discard"})}let x="/bus/wallet/pending";function w(e){return(0,i.Nf)({...e,route:x})}let j="/bus/search/hosts";function E(e){return(0,i.q0)({...e,route:j})}function k(e){return(0,i.Nf)({...e,route:"/bus/host/:hostKey"})}let S="/bus/hosts/blocklist";function _(e){return(0,i.Nf)({...e,route:S})}let C="/bus/hosts/allowlist";function O(e){return(0,i.Nf)({...e,route:C})}function M(e){return(0,i.V1)({...e,route:"/bus/hosts/allowlist"},async e=>{e(e=>!![j,C,A].find(t=>e.startsWith(t)))})}function T(e){return(0,i.V1)({...e,route:"/bus/hosts/blocklist"},async e=>{e(e=>!![j,S,A].find(t=>e.startsWith(t)))})}let A="/bus/contracts";function P(e){return(0,i.Nf)({...e,route:A})}function N(e){return(0,i.Nf)({...e,route:"/bus/contract/:id"})}function R(e){return(0,i.iv)({...e,route:"/bus/contracts/:id/delete"})}function D(e){return(0,i.Nf)({...e,route:"/bus/buckets"})}function L(e){return(0,i.mw)({...e,route:"/bus/buckets"},async e=>{e(e=>e.startsWith("/bus/buckets"))})}function F(e){return(0,i.iv)({...e,route:"/bus/buckets/:name"},async e=>{e(e=>e.startsWith("/bus/buckets"))})}function z(e){return(0,i.Nf)({...e,route:"/bus/objects/:key"})}function V(e){return(0,i.Nf)({...e,route:"/bus/objects/:key"})}function I(e){return(0,i.Nf)({...e,route:"/bus/search/objects"})}function Z(e){return(0,i.iv)({...e,route:"/bus/objects/:key"},async e=>{e(e=>e.startsWith("/bus/objects/"))})}function B(e){return(0,i.Nf)({...e,route:"/bus/stats/objects"})}function H(e){return(0,i.Nf)({...e,route:"/bus/setting/:key"})}function U(e){return(0,i.V1)({...e,route:"/bus/setting/:key"},async(e,t)=>{e(e=>e.startsWith("/bus/setting/".concat(t.params.key)))})}let W="/bus/alerts";function q(e){return(0,i.Nf)({...e,route:W})}function $(e){return(0,i.mw)({...e,route:"/bus/alerts/dismiss"},async e=>{e(e=>e.startsWith(W))})}function K(e){return(0,i.Nf)({...e,route:"/bus/slab/:key/objects"})}let Y="/autopilot/state";function G(e){return(0,i.Nf)({...e,route:Y})}let X="/autopilot/config";function J(e){return(0,i.Nf)({...e,route:X})}function Q(e){return(0,i.V1)({...e,route:X},async e=>{e(e=>e===X);let t=async()=>{await (0,i.gw)(1e3),e(e=>e===Y)};t()})}let ee="/autopilot/hosts";function et(e){return(0,i.q0)({...e,route:ee})}var en=n(54073),er=n.n(en);function ei(e){return(0,i.rB)({...e,route:"/worker/objects/:key"})}function eo(e){var t;return(0,i.V1)({...e,config:{...null==e?void 0:e.config,axios:{...null==e?void 0:null===(t=e.config)||void 0===t?void 0:t.axios,headers:{"Content-Type":"multipart/form-data"}}},route:"/worker/objects/:key"},async e=>{e(e=>e.startsWith("/bus/objects"))})}let ea=er()(e=>e(),5e3),es="/worker/rhp/scan";function el(e){return(0,i.mw)({...e,route:es},async(e,t,n)=>{let{payload:{hostKey:r}}=t;e(e=>e.startsWith("/autopilot/hosts"),e=>null==e?void 0:e.map(e=>e.host.publicKey===r?{...e,host:{...e.host,interactions:{...e.host.interactions,LastScan:new Date().toISOString(),LastScanSuccess:!n.data.scanError},settings:n.data.settings}}:e),!1),e(e=>e.startsWith("/bus/search/hosts"),e=>null==e?void 0:e.map(e=>e.publicKey===r?{...e,interactions:{...e.interactions,LastScan:new Date().toISOString(),LastScanSuccess:!n.data.scanError},settings:n.data.settings}:e),!1),ea(()=>{e(e=>e.startsWith("/autopilot/hosts")||e.startsWith("/bus/search/hosts"),e=>e,!0)})})}},47025:function(e,t,n){"use strict";n.d(t,{BW:function(){return s},JL:function(){return o},BF:function(){return a}});var r=n(2850);let i="https://api.siacentral.com/v2";function o(e){let{settings:t}=(0,r.Hv)();return(0,r.Nf)({api:i,...e,route:"/hosts/list?showinactive=false&sort=download_speed&dir=desc&protocol=rhp3&page=0&limit=1000",disabled:(null==e?void 0:e.disabled)||!t.siaCentral})}function a(e){let{settings:t}=(0,r.Hv)();return(0,r.Nf)({api:i,...e,route:"/hosts/network/averages",disabled:(null==e?void 0:e.disabled)||!t.siaCentral})}function s(e){let{settings:t}=(0,r.Hv)();return(0,r.Nf)({api:i,...e,route:"/market/exchange-rate?currencies=sc",disabled:(null==e?void 0:e.disabled)||!t.siaCentral})}n(98537)},96206:function(e,t,n){"use strict";n.d(t,{vW:function(){return o},rN:function(){return s},yF:function(){return a},Vz:function(){return f},ES:function(){return h},qN:function(){return c},ll:function(){return u}}),n(81395),n(18149);var r=n(6391),i=n.n(r);function o(e,t){let n="number"==typeof e?e:e instanceof i()?e.toNumber():Number(e),{fixed:r=2}=t||{};if(!n)return"0 B";if(n<1e3)return"".concat(n," B");let o=Math.floor(Math.log10(n)/Math.log10(1e3)),a=n/Math.pow(1e3,o);return a.toFixed(r)+" "+["B","KB","MB","GB","TB","PB","EB"][o]}function a(e,t){let{fixed:n=0,units:r="",abbreviated:o=!1}=t||{},a=new(i())(e||0);if(o){let e=a.toNumber();if(e<1e3)return a.toString();let t=["","K","M","B","t","q","Q","s","S","o","n","d","U","D"],i=Math.floor(Math.log10(e)/Math.log10(1e3)),o=e/Math.pow(1e3,i);return"".concat(o.toFixed(n)).concat(t[i]?" ".concat(t[i]):"").concat(r?" ".concat(r):"")}return"".concat(a.toFormat(n)).concat(r?" ".concat(r):"")}function s(e,t){let n;return n=navigator.language,new Intl.DateTimeFormat(n,{dateStyle:"short",...t}).format(new Date(e))}r.BigNumber.config({EXPONENTIAL_AT:1e9}),r.BigNumber.config({DECIMAL_PLACES:30});let l=new r.BigNumber("10").exponentiatedBy(24);function u(e,t){return void 0!==t?new r.BigNumber(new r.BigNumber(e).dividedBy(l).toFixed(t)):new r.BigNumber(e).dividedBy(l)}function c(e){return new r.BigNumber(new r.BigNumber(e).times(l).toFixed(0))}let d={fixed:3,dynamicUnits:!0,hastingUnits:!1};function f(e,t){let{fixed:n,dynamicUnits:i,hastingUnits:o}={...d,...t},a=new r.BigNumber(1e12),s=new r.BigNumber(1e3),l=new r.BigNumber(e),c=new r.BigNumber(e).abs(),f=l.isNegative()?"-":"";if(!i)return"".concat(f).concat(u(c).toFormat(n)," SC");if(c.dividedBy(a).isLessThan(1))return o?"".concat(f).concat(c," H"):"".concat(f,"0 SC");let h=["pS","nS","uS","mS","SC","KS","MS","GS","TS"];for(let e=0;ee.multipliedBy(s),new r.BigNumber(1)),i=c.dividedBy(a.multipliedBy(t));if(i.isLessThan(s)||e===h.length-1)return"".concat(f).concat(i.toFormat(n)," ").concat(h[e])}return""}function h(e){return e.toLocaleString()+" SF"}},2271:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createAsyncLocalStorage",{enumerable:!0,get:function(){return o}});let n=Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available");class r{disable(){throw n}getStore(){}run(){throw n}exit(){throw n}enterWith(){throw n}}let i=globalThis.AsyncLocalStorage;function o(){return i?new i:new r}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},26252:function(e,t,n){"use strict";function r(e){}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"clientHookInServerComponentError",{enumerable:!0,get:function(){return r}}),n(43219),n(2784),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},55046:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ReadonlyURLSearchParams:function(){return h},useSearchParams:function(){return p},usePathname:function(){return m},ServerInsertedHTMLContext:function(){return l.ServerInsertedHTMLContext},useServerInsertedHTML:function(){return l.useServerInsertedHTML},useRouter:function(){return v},useParams:function(){return g},useSelectedLayoutSegments:function(){return y},useSelectedLayoutSegment:function(){return b},redirect:function(){return u.redirect},permanentRedirect:function(){return u.permanentRedirect},RedirectType:function(){return u.RedirectType},notFound:function(){return c.notFound}});let r=n(2784),i=n(60587),o=n(58839),a=n(26252),s=n(4424),l=n(44673),u=n(75903),c=n(47067),d=Symbol("internal for urlsearchparams readonly");function f(){return Error("ReadonlyURLSearchParams cannot be modified")}class h{[Symbol.iterator](){return this[d][Symbol.iterator]()}append(){throw f()}delete(){throw f()}set(){throw f()}sort(){throw f()}constructor(e){this[d]=e,this.entries=e.entries.bind(e),this.forEach=e.forEach.bind(e),this.get=e.get.bind(e),this.getAll=e.getAll.bind(e),this.has=e.has.bind(e),this.keys=e.keys.bind(e),this.values=e.values.bind(e),this.toString=e.toString.bind(e),this.size=e.size}}function p(){(0,a.clientHookInServerComponentError)("useSearchParams");let e=(0,r.useContext)(o.SearchParamsContext),t=(0,r.useMemo)(()=>e?new h(e):null,[e]);return t}function m(){return(0,a.clientHookInServerComponentError)("usePathname"),(0,r.useContext)(o.PathnameContext)}function v(){(0,a.clientHookInServerComponentError)("useRouter");let e=(0,r.useContext)(i.AppRouterContext);if(null===e)throw Error("invariant expected app router to be mounted");return e}function g(){(0,a.clientHookInServerComponentError)("useParams");let e=(0,r.useContext)(i.GlobalLayoutRouterContext),t=(0,r.useContext)(o.PathParamsContext);return e?function e(t,n){void 0===n&&(n={});let r=t[1];for(let t of Object.values(r)){let r=t[0],i=Array.isArray(r),o=i?r[1]:r;if(!o||o.startsWith("__PAGE__"))continue;let a=i&&("c"===r[2]||"oc"===r[2]);a?n[r[0]]=r[1].split("/"):i&&(n[r[0]]=r[1]),n=e(t,n)}return n}(e.tree):t}function y(e){void 0===e&&(e="children"),(0,a.clientHookInServerComponentError)("useSelectedLayoutSegments");let{tree:t}=(0,r.useContext)(i.LayoutRouterContext);return function e(t,n,r,i){let o;if(void 0===r&&(r=!0),void 0===i&&(i=[]),r)o=t[1][n];else{var a;let e=t[1];o=null!=(a=e.children)?a:Object.values(e)[0]}if(!o)return i;let l=o[0],u=(0,s.getSegmentValue)(l);return!u||u.startsWith("__PAGE__")?i:(i.push(u),e(o,n,!1,i))}(t,e)}function b(e){void 0===e&&(e="children"),(0,a.clientHookInServerComponentError)("useSelectedLayoutSegment");let t=y(e);return 0===t.length?null:t[0]}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},47067:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{notFound:function(){return r},isNotFoundError:function(){return i}});let n="NEXT_NOT_FOUND";function r(){let e=Error(n);throw e.digest=n,e}function i(e){return(null==e?void 0:e.digest)===n}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},75903:function(e,t,n){"use strict";var r,i;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{RedirectType:function(){return r},getRedirectError:function(){return s},redirect:function(){return l},permanentRedirect:function(){return u},isRedirectError:function(){return c},getURLFromRedirectError:function(){return d},getRedirectTypeFromError:function(){return f}});let o=n(7552),a="NEXT_REDIRECT";function s(e,t,n){void 0===n&&(n=!1);let r=Error(a);r.digest=a+";"+t+";"+e+";"+n;let i=o.requestAsyncStorage.getStore();return i&&(r.mutableCookies=i.mutableCookies),r}function l(e,t){throw void 0===t&&(t="replace"),s(e,t,!1)}function u(e,t){throw void 0===t&&(t="replace"),s(e,t,!0)}function c(e){if("string"!=typeof(null==e?void 0:e.digest))return!1;let[t,n,r,i]=e.digest.split(";",4);return t===a&&("replace"===n||"push"===n)&&"string"==typeof r&&("true"===i||"false"===i)}function d(e){return c(e)?e.digest.split(";",3)[2]:null}function f(e){if(!c(e))throw Error("Not a redirect error");return e.digest.split(";",3)[1]}(i=r||(r={})).push="push",i.replace="replace",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7552:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"requestAsyncStorage",{enumerable:!0,get:function(){return i}});let r=n(2271),i=(0,r.createAsyncLocalStorage)();("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4424:function(e,t){"use strict";function n(e){return Array.isArray(e)?e[1]:e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSegmentValue",{enumerable:!0,get:function(){return n}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},23116:function(e,t){"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{PrefetchKind:function(){return n},ACTION_REFRESH:function(){return i},ACTION_NAVIGATE:function(){return o},ACTION_RESTORE:function(){return a},ACTION_SERVER_PATCH:function(){return s},ACTION_PREFETCH:function(){return l},ACTION_FAST_REFRESH:function(){return u},ACTION_SERVER_ACTION:function(){return c}});let i="refresh",o="navigate",a="restore",s="server-patch",l="prefetch",u="fast-refresh",c="server-action";(r=n||(n={})).AUTO="auto",r.FULL="full",r.TEMPORARY="temporary",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},25146:function(e,t,n){"use strict";function r(e,t,n,r){return!1}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDomainLocale",{enumerable:!0,get:function(){return r}}),n(67858),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},80920:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Image",{enumerable:!0,get:function(){return y}});let r=n(43219),i=n(16794),o=i._(n(2784)),a=r._(n(28316)),s=r._(n(37412)),l=n(31918),u=n(97686),c=n(45802);n(84759);let d=n(54365),f=r._(n(2088)),h={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0};function p(e,t,n,r,i,o){let a=null==e?void 0:e.src;if(!e||e["data-loaded-src"]===a)return;e["data-loaded-src"]=a;let s="decode"in e?e.decode():Promise.resolve();s.catch(()=>{}).then(()=>{if(e.parentElement&&e.isConnected){if("empty"!==t&&i(!0),null==n?void 0:n.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let r=!1,i=!1;n.current({...t,nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>r,isPropagationStopped:()=>i,persist:()=>{},preventDefault:()=>{r=!0,t.preventDefault()},stopPropagation:()=>{i=!0,t.stopPropagation()}})}(null==r?void 0:r.current)&&r.current(e)}})}function m(e){let[t,n]=o.version.split("."),r=parseInt(t,10),i=parseInt(n,10);return r>18||18===r&&i>=3?{fetchPriority:e}:{fetchpriority:e}}let v=(0,o.forwardRef)((e,t)=>{let{src:n,srcSet:r,sizes:i,height:a,width:s,decoding:l,className:u,style:c,fetchPriority:d,placeholder:f,loading:h,unoptimized:v,fill:g,onLoadRef:y,onLoadingCompleteRef:b,setBlurComplete:x,setShowAltText:w,onLoad:j,onError:E,...k}=e;return o.default.createElement("img",{...k,...m(d),loading:h,width:s,height:a,decoding:l,"data-nimg":g?"fill":"1",className:u,style:c,sizes:i,srcSet:r,src:n,ref:(0,o.useCallback)(e=>{t&&("function"==typeof t?t(e):"object"==typeof t&&(t.current=e)),e&&(E&&(e.src=e.src),e.complete&&p(e,f,y,b,x,v))},[n,f,y,b,x,E,v,t]),onLoad:e=>{let t=e.currentTarget;p(t,f,y,b,x,v)},onError:e=>{w(!0),"empty"!==f&&x(!0),E&&E(e)}})});function g(e){let{isAppRouter:t,imgAttributes:n}=e,r={as:"image",imageSrcSet:n.srcSet,imageSizes:n.sizes,crossOrigin:n.crossOrigin,referrerPolicy:n.referrerPolicy,...m(n.fetchPriority)};return t&&a.default.preload?(a.default.preload(n.src,r),null):o.default.createElement(s.default,null,o.default.createElement("link",{key:"__nimg-"+n.src+n.srcSet+n.sizes,rel:"preload",href:n.srcSet?void 0:n.src,...r}))}let y=(0,o.forwardRef)((e,t)=>{let n=(0,o.useContext)(d.RouterContext),r=(0,o.useContext)(c.ImageConfigContext),i=(0,o.useMemo)(()=>{let e=h||r||u.imageConfigDefault,t=[...e.deviceSizes,...e.imageSizes].sort((e,t)=>e-t),n=e.deviceSizes.sort((e,t)=>e-t);return{...e,allSizes:t,deviceSizes:n}},[r]),{onLoad:a,onLoadingComplete:s}=e,p=(0,o.useRef)(a);(0,o.useEffect)(()=>{p.current=a},[a]);let m=(0,o.useRef)(s);(0,o.useEffect)(()=>{m.current=s},[s]);let[y,b]=(0,o.useState)(!1),[x,w]=(0,o.useState)(!1),{props:j,meta:E}=(0,l.getImgProps)(e,{defaultLoader:f.default,imgConf:i,blurComplete:y,showAltText:x});return o.default.createElement(o.default.Fragment,null,o.default.createElement(v,{...j,unoptimized:E.unoptimized,placeholder:E.placeholder,fill:E.fill,onLoadRef:p,onLoadingCompleteRef:m,setBlurComplete:b,setShowAltText:w,ref:t}),E.priority?o.default.createElement(g,{isAppRouter:!n,imgAttributes:j}):null)});("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},13814:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return x}});let r=n(43219),i=r._(n(2784)),o=n(31068),a=n(33134),s=n(39585),l=n(51570),u=n(19868),c=n(54365),d=n(60587),f=n(93629),h=n(25146),p=n(10694),m=n(23116),v=new Set;function g(e,t,n,r,i,o){if(!o&&!(0,a.isLocalURL)(t))return;if(!r.bypassPrefetchedCheck){let i=void 0!==r.locale?r.locale:"locale"in e?e.locale:void 0,o=t+"%"+n+"%"+i;if(v.has(o))return;v.add(o)}let s=o?e.prefetch(t,i):e.prefetch(t,n,r);Promise.resolve(s).catch(e=>{})}function y(e){return"string"==typeof e?e:(0,s.formatUrl)(e)}let b=i.default.forwardRef(function(e,t){let n,r;let{href:s,as:v,children:b,prefetch:x=null,passHref:w,replace:j,shallow:E,scroll:k,locale:S,onClick:_,onMouseEnter:C,onTouchStart:O,legacyBehavior:M=!1,...T}=e;n=b,M&&("string"==typeof n||"number"==typeof n)&&(n=i.default.createElement("a",null,n));let A=i.default.useContext(c.RouterContext),P=i.default.useContext(d.AppRouterContext),N=null!=A?A:P,R=!A,D=!1!==x,L=null===x?m.PrefetchKind.AUTO:m.PrefetchKind.FULL,{href:F,as:z}=i.default.useMemo(()=>{if(!A){let e=y(s);return{href:e,as:v?y(v):e}}let[e,t]=(0,o.resolveHref)(A,s,!0);return{href:e,as:v?(0,o.resolveHref)(A,v):t||e}},[A,s,v]),V=i.default.useRef(F),I=i.default.useRef(z);M&&(r=i.default.Children.only(n));let Z=M?r&&"object"==typeof r&&r.ref:t,[B,H,U]=(0,f.useIntersection)({rootMargin:"200px"}),W=i.default.useCallback(e=>{(I.current!==z||V.current!==F)&&(U(),I.current=z,V.current=F),B(e),Z&&("function"==typeof Z?Z(e):"object"==typeof Z&&(Z.current=e))},[z,Z,F,U,B]);i.default.useEffect(()=>{N&&H&&D&&g(N,F,z,{locale:S},{kind:L},R)},[z,F,H,S,D,null==A?void 0:A.locale,N,R,L]);let q={ref:W,onClick(e){M||"function"!=typeof _||_(e),M&&r.props&&"function"==typeof r.props.onClick&&r.props.onClick(e),N&&!e.defaultPrevented&&function(e,t,n,r,o,s,l,u,c,d){let{nodeName:f}=e.currentTarget,h="A"===f.toUpperCase();if(h&&(function(e){let t=e.currentTarget,n=t.getAttribute("target");return n&&"_self"!==n||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which}(e)||!c&&!(0,a.isLocalURL)(n)))return;e.preventDefault();let p=()=>{let e=null==l||l;"beforePopState"in t?t[o?"replace":"push"](n,r,{shallow:s,locale:u,scroll:e}):t[o?"replace":"push"](r||n,{forceOptimisticNavigation:!d,scroll:e})};c?i.default.startTransition(p):p()}(e,N,F,z,j,E,k,S,R,D)},onMouseEnter(e){M||"function"!=typeof C||C(e),M&&r.props&&"function"==typeof r.props.onMouseEnter&&r.props.onMouseEnter(e),N&&(D||!R)&&g(N,F,z,{locale:S,priority:!0,bypassPrefetchedCheck:!0},{kind:L},R)},onTouchStart(e){M||"function"!=typeof O||O(e),M&&r.props&&"function"==typeof r.props.onTouchStart&&r.props.onTouchStart(e),N&&(D||!R)&&g(N,F,z,{locale:S,priority:!0,bypassPrefetchedCheck:!0},{kind:L},R)}};if((0,l.isAbsoluteUrl)(z))q.href=z;else if(!M||w||"a"===r.type&&!("href"in r.props)){let e=void 0!==S?S:null==A?void 0:A.locale,t=(null==A?void 0:A.isLocaleDomain)&&(0,h.getDomainLocale)(z,e,null==A?void 0:A.locales,null==A?void 0:A.domainLocales);q.href=t||(0,p.addBasePath)((0,u.addLocale)(z,e,null==A?void 0:A.defaultLocale))}return M?i.default.cloneElement(r,q):i.default.createElement("a",{...T,...q},n)}),x=b;("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},93629:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return l}});let r=n(2784),i=n(30857),o="function"==typeof IntersectionObserver,a=new Map,s=[];function l(e){let{rootRef:t,rootMargin:n,disabled:l}=e,u=l||!o,[c,d]=(0,r.useState)(!1),f=(0,r.useRef)(null),h=(0,r.useCallback)(e=>{f.current=e},[]);(0,r.useEffect)(()=>{if(o){if(u||c)return;let e=f.current;if(e&&e.tagName){let r=function(e,t,n){let{id:r,observer:i,elements:o}=function(e){let t;let n={root:e.root||null,margin:e.rootMargin||""},r=s.find(e=>e.root===n.root&&e.margin===n.margin);if(r&&(t=a.get(r)))return t;let i=new Map,o=new IntersectionObserver(e=>{e.forEach(e=>{let t=i.get(e.target),n=e.isIntersecting||e.intersectionRatio>0;t&&n&&t(n)})},e);return t={id:n,observer:o,elements:i},s.push(n),a.set(n,t),t}(n);return o.set(e,t),i.observe(e),function(){if(o.delete(e),i.unobserve(e),0===o.size){i.disconnect(),a.delete(r);let e=s.findIndex(e=>e.root===r.root&&e.margin===r.margin);e>-1&&s.splice(e,1)}}}(e,e=>e&&d(e),{root:null==t?void 0:t.current,rootMargin:n});return r}}else if(!c){let e=(0,i.requestIdleCallback)(()=>d(!0));return()=>(0,i.cancelIdleCallback)(e)}},[u,n,t,c,f.current]);let p=(0,r.useCallback)(()=>{d(!1)},[]);return[h,c,p]}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},31256:function(e,t,n){"use strict";var r=n(48834).lW;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{Head:function(){return y},NextScript:function(){return b},Html:function(){return x},Main:function(){return w},default:function(){return j}});let i=c(n(2784)),o=n(13150),a=n(95383),s=n(82809),l=c(n(10274)),u=n(15333);function c(e){return e&&e.__esModule?e:{default:e}}let d=new Set;function f(e,t,n){let r=(0,a.getPageFiles)(e,"/_app"),i=n?[]:(0,a.getPageFiles)(e,t);return{sharedFiles:r,pageFiles:i,allFiles:[...new Set([...r,...i])]}}function h(e,t){let{assetPrefix:n,buildManifest:r,assetQueryString:o,disableOptimizedLoading:a,crossOrigin:s}=e;return r.polyfillFiles.filter(e=>e.endsWith(".js")&&!e.endsWith(".module.js")).map(e=>i.default.createElement("script",{key:e,defer:!a,nonce:t.nonce,crossOrigin:t.crossOrigin||s,noModule:!0,src:"".concat(n,"/_next/").concat(e).concat(o)}))}function p(e){let{styles:t}=e;if(!t)return null;let n=Array.isArray(t)?t:[];if(t.props&&Array.isArray(t.props.children)){let e=e=>{var t,n;return null==e?void 0:null==(n=e.props)?void 0:null==(t=n.dangerouslySetInnerHTML)?void 0:t.__html};t.props.children.forEach(t=>{Array.isArray(t)?t.forEach(t=>e(t)&&n.push(t)):e(t)&&n.push(t)})}return i.default.createElement("style",{"amp-custom":"",dangerouslySetInnerHTML:{__html:n.map(e=>e.props.dangerouslySetInnerHTML.__html).join("").replace(/\/\*# sourceMappingURL=.*\*\//g,"").replace(/\/\*@ sourceURL=.*?\*\//g,"")}})}function m(e,t,n){let{dynamicImports:r,assetPrefix:o,isDevelopment:a,assetQueryString:s,disableOptimizedLoading:l,crossOrigin:u}=e;return r.map(e=>!e.endsWith(".js")||n.allFiles.includes(e)?null:i.default.createElement("script",{async:!a&&l,defer:!l,key:e,src:"".concat(o,"/_next/").concat(encodeURI(e)).concat(s),nonce:t.nonce,crossOrigin:t.crossOrigin||u}))}function v(e,t,n){var r;let{assetPrefix:o,buildManifest:a,isDevelopment:s,assetQueryString:l,disableOptimizedLoading:u,crossOrigin:c}=e,d=n.allFiles.filter(e=>e.endsWith(".js")),f=null==(r=a.lowPriorityFiles)?void 0:r.filter(e=>e.endsWith(".js"));return[...d,...f].map(e=>i.default.createElement("script",{key:e,src:"".concat(o,"/_next/").concat(encodeURI(e)).concat(l),nonce:t.nonce,async:!s&&u,defer:!u,crossOrigin:t.crossOrigin||c}))}function g(e,t){let{scriptLoader:n,disableOptimizedLoading:r,crossOrigin:o}=e,a=function(e,t){let{assetPrefix:n,scriptLoader:r,crossOrigin:o,nextScriptWorkers:a}=e;if(!a)return null;try{let{partytownSnippet:e}=require("@builder.io/partytown/integration"),a=Array.isArray(t.children)?t.children:[t.children],s=a.find(e=>{var t,n;return!!e&&!!e.props&&(null==e?void 0:null==(n=e.props)?void 0:null==(t=n.dangerouslySetInnerHTML)?void 0:t.__html.length)&&"data-partytown-config"in e.props});return i.default.createElement(i.default.Fragment,null,!s&&i.default.createElement("script",{"data-partytown-config":"",dangerouslySetInnerHTML:{__html:'\n partytown = {\n lib: "'.concat(n,'/_next/static/~partytown/"\n };\n ')}}),i.default.createElement("script",{"data-partytown":"",dangerouslySetInnerHTML:{__html:e()}}),(r.worker||[]).map((e,n)=>{let{strategy:r,src:a,children:s,dangerouslySetInnerHTML:l,...u}=e,c={};if(a)c.src=a;else if(l&&l.__html)c.dangerouslySetInnerHTML={__html:l.__html};else if(s)c.dangerouslySetInnerHTML={__html:"string"==typeof s?s:Array.isArray(s)?s.join(""):""};else throw Error("Invalid usage of next/script. Did you forget to include a src attribute or an inline script? https://nextjs.org/docs/messages/invalid-script");return i.default.createElement("script",{...c,...u,type:"text/partytown",key:a||n,nonce:t.nonce,"data-nscript":"worker",crossOrigin:t.crossOrigin||o})}))}catch(e){return(0,l.default)(e)&&"MODULE_NOT_FOUND"!==e.code&&console.warn("Warning: ".concat(e.message)),null}}(e,t),s=(n.beforeInteractive||[]).filter(e=>e.src).map((e,n)=>{var a;let{strategy:s,...l}=e;return i.default.createElement("script",{...l,key:l.src||n,defer:null!==(a=l.defer)&&void 0!==a?a:!r,nonce:t.nonce,"data-nscript":"beforeInteractive",crossOrigin:t.crossOrigin||o})});return i.default.createElement(i.default.Fragment,null,a,s)}class y extends i.default.Component{getCssLinks(e){let{assetPrefix:t,assetQueryString:n,dynamicImports:r,crossOrigin:o,optimizeCss:a,optimizeFonts:s}=this.context,l=e.allFiles.filter(e=>e.endsWith(".css")),u=new Set(e.sharedFiles),c=new Set([]),d=Array.from(new Set(r.filter(e=>e.endsWith(".css"))));if(d.length){let e=new Set(l);d=d.filter(t=>!(e.has(t)||u.has(t))),c=new Set(d),l.push(...d)}let f=[];return l.forEach(e=>{let r=u.has(e);a||f.push(i.default.createElement("link",{key:"".concat(e,"-preload"),nonce:this.props.nonce,rel:"preload",href:"".concat(t,"/_next/").concat(encodeURI(e)).concat(n),as:"style",crossOrigin:this.props.crossOrigin||o}));let s=c.has(e);f.push(i.default.createElement("link",{key:e,nonce:this.props.nonce,rel:"stylesheet",href:"".concat(t,"/_next/").concat(encodeURI(e)).concat(n),crossOrigin:this.props.crossOrigin||o,"data-n-g":s?void 0:r?"":void 0,"data-n-p":s?void 0:r?void 0:""}))}),s&&(f=this.makeStylesheetInert(f)),0===f.length?null:f}getPreloadDynamicChunks(){let{dynamicImports:e,assetPrefix:t,assetQueryString:n,crossOrigin:r}=this.context;return e.map(e=>e.endsWith(".js")?i.default.createElement("link",{rel:"preload",key:e,href:"".concat(t,"/_next/").concat(encodeURI(e)).concat(n),as:"script",nonce:this.props.nonce,crossOrigin:this.props.crossOrigin||r}):null).filter(Boolean)}getPreloadMainLinks(e){let{assetPrefix:t,assetQueryString:n,scriptLoader:r,crossOrigin:o}=this.context,a=e.allFiles.filter(e=>e.endsWith(".js"));return[...(r.beforeInteractive||[]).map(e=>i.default.createElement("link",{key:e.src,nonce:this.props.nonce,rel:"preload",href:e.src,as:"script",crossOrigin:this.props.crossOrigin||o})),...a.map(e=>i.default.createElement("link",{key:e,nonce:this.props.nonce,rel:"preload",href:"".concat(t,"/_next/").concat(encodeURI(e)).concat(n),as:"script",crossOrigin:this.props.crossOrigin||o}))]}getBeforeInteractiveInlineScripts(){let{scriptLoader:e}=this.context,{nonce:t,crossOrigin:n}=this.props;return(e.beforeInteractive||[]).filter(e=>!e.src&&(e.dangerouslySetInnerHTML||e.children)).map((e,r)=>{let{strategy:o,children:a,dangerouslySetInnerHTML:s,src:l,...u}=e,c="";return s&&s.__html?c=s.__html:a&&(c="string"==typeof a?a:Array.isArray(a)?a.join(""):""),i.default.createElement("script",{...u,dangerouslySetInnerHTML:{__html:c},key:u.id||r,nonce:t,"data-nscript":"beforeInteractive",crossOrigin:n||void 0})})}getDynamicChunks(e){return m(this.context,this.props,e)}getPreNextScripts(){return g(this.context,this.props)}getScripts(e){return v(this.context,this.props,e)}getPolyfillScripts(){return h(this.context,this.props)}makeStylesheetInert(e){return i.default.Children.map(e,e=>{var t,n;if((null==e?void 0:e.type)==="link"&&(null==e?void 0:null==(t=e.props)?void 0:t.href)&&o.OPTIMIZED_FONT_PROVIDERS.some(t=>{var n,r;let{url:i}=t;return null==e?void 0:null==(r=e.props)?void 0:null==(n=r.href)?void 0:n.startsWith(i)})){let t={...e.props||{},"data-href":e.props.href,href:void 0};return i.default.cloneElement(e,t)}if(null==e?void 0:null==(n=e.props)?void 0:n.children){let t={...e.props||{},children:this.makeStylesheetInert(e.props.children)};return i.default.cloneElement(e,t)}return e}).filter(Boolean)}render(){var e,t;let{styles:r,ampPath:o,inAmpMode:a,hybridAmp:s,canonicalBase:l,__NEXT_DATA__:u,dangerousAsPath:c,headTags:d,unstable_runtimeJS:h,unstable_JsPreload:m,disableOptimizedLoading:v,optimizeCss:g,optimizeFonts:y,assetPrefix:b,nextFontManifest:x}=this.context,w=!1===h,j=!1===m||!v;this.context.docComponentsRendered.Head=!0;let{head:E}=this.context,k=[],S=[];E&&(E.forEach(e=>{let t;this.context.strictNextHead&&(t=i.default.createElement("meta",{name:"next-head",content:"1"})),e&&"link"===e.type&&"preload"===e.props.rel&&"style"===e.props.as?(t&&k.push(t),k.push(e)):e&&(t&&("meta"!==e.type||!e.props.charSet)&&S.push(t),S.push(e))}),E=k.concat(S));let _=i.default.Children.toArray(this.props.children).filter(Boolean);y&&!a&&(_=this.makeStylesheetInert(_));let C=!1,O=!1;E=i.default.Children.map(E||[],e=>{if(!e)return e;let{type:t,props:n}=e;if(a){let r="";if("meta"===t&&"viewport"===n.name?r='name="viewport"':"link"===t&&"canonical"===n.rel?O=!0:"script"===t&&(n.src&&-1>n.src.indexOf("ampproject")||n.dangerouslySetInnerHTML&&(!n.type||"text/javascript"===n.type))&&(r="{r+=" ".concat(e,'="').concat(n[e],'"')}),r+="/>"),r)return console.warn('Found conflicting amp tag "'.concat(e.type,'" with conflicting prop ').concat(r," in ").concat(u.page,". https://nextjs.org/docs/messages/conflicting-amp-tag")),null}else"link"===t&&"amphtml"===n.rel&&(C=!0);return e});let M=f(this.context.buildManifest,this.context.__NEXT_DATA__.page,a),T=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(!e)return{preconnect:null,preload:null};let r=e.pages["/_app"],o=e.pages[t],a=[...null!=r?r:[],...null!=o?o:[]],s=!!(0===a.length&&(r||o));return{preconnect:s?i.default.createElement("link",{"data-next-font":e.pagesUsingSizeAdjust?"size-adjust":"",rel:"preconnect",href:"/",crossOrigin:"anonymous"}):null,preload:a?a.map(e=>{let t=/\.(woff|woff2|eot|ttf|otf)$/.exec(e)[1];return i.default.createElement("link",{key:e,rel:"preload",href:"".concat(n,"/_next/").concat(encodeURI(e)),as:"font",type:"font/".concat(t),crossOrigin:"anonymous","data-next-font":e.includes("-s")?"size-adjust":""})}):null}}(x,c,b);return i.default.createElement("head",function(e){let{crossOrigin:t,nonce:n,...r}=e;return r}(this.props),this.context.isDevelopment&&i.default.createElement(i.default.Fragment,null,i.default.createElement("style",{"data-next-hide-fouc":!0,"data-ampdevmode":a?"true":void 0,dangerouslySetInnerHTML:{__html:"body{display:none}"}}),i.default.createElement("noscript",{"data-next-hide-fouc":!0,"data-ampdevmode":a?"true":void 0},i.default.createElement("style",{dangerouslySetInnerHTML:{__html:"body{display:block}"}}))),E,this.context.strictNextHead?null:i.default.createElement("meta",{name:"next-head-count",content:i.default.Children.count(E||[]).toString()}),_,y&&i.default.createElement("meta",{name:"next-font-preconnect"}),T.preconnect,T.preload,a&&i.default.createElement(i.default.Fragment,null,i.default.createElement("meta",{name:"viewport",content:"width=device-width,minimum-scale=1,initial-scale=1"}),!O&&i.default.createElement("link",{rel:"canonical",href:l+n(79505).cleanAmpPath(c)}),i.default.createElement("link",{rel:"preload",as:"script",href:"https://cdn.ampproject.org/v0.js"}),i.default.createElement(p,{styles:r}),i.default.createElement("style",{"amp-boilerplate":"",dangerouslySetInnerHTML:{__html:"body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}"}}),i.default.createElement("noscript",null,i.default.createElement("style",{"amp-boilerplate":"",dangerouslySetInnerHTML:{__html:"body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}"}})),i.default.createElement("script",{async:!0,src:"https://cdn.ampproject.org/v0.js"})),!a&&i.default.createElement(i.default.Fragment,null,!C&&s&&i.default.createElement("link",{rel:"amphtml",href:l+(o||"".concat(c).concat(c.includes("?")?"&":"?","amp=1"))}),this.getBeforeInteractiveInlineScripts(),!g&&this.getCssLinks(M),!g&&i.default.createElement("noscript",{"data-n-css":null!==(e=this.props.nonce)&&void 0!==e?e:""}),!w&&!j&&this.getPreloadDynamicChunks(),!w&&!j&&this.getPreloadMainLinks(M),!v&&!w&&this.getPolyfillScripts(),!v&&!w&&this.getPreNextScripts(),!v&&!w&&this.getDynamicChunks(M),!v&&!w&&this.getScripts(M),g&&this.getCssLinks(M),g&&i.default.createElement("noscript",{"data-n-css":null!==(t=this.props.nonce)&&void 0!==t?t:""}),this.context.isDevelopment&&i.default.createElement("noscript",{id:"__next_css__DO_NOT_USE__"}),r||null),i.default.createElement(i.default.Fragment,{},...d||[]))}}y.contextType=u.HtmlContext;class b extends i.default.Component{getDynamicChunks(e){return m(this.context,this.props,e)}getPreNextScripts(){return g(this.context,this.props)}getScripts(e){return v(this.context,this.props,e)}getPolyfillScripts(){return h(this.context,this.props)}static getInlineScriptSource(e){let{__NEXT_DATA__:t,largePageDataBytes:i}=e;try{let o=JSON.stringify(t);if(d.has(t.page))return(0,s.htmlEscapeJsonString)(o);let a=r.from(o).byteLength,l=n(16549).Z;return i&&a>i&&(d.add(t.page),console.warn('Warning: data for page "'.concat(t.page,'"').concat(t.page===e.dangerousAsPath?"":' (path "'.concat(e.dangerousAsPath,'")')," is ").concat(l(a)," which exceeds the threshold of ").concat(l(i),", this amount of data can reduce performance.\nSee more info here: https://nextjs.org/docs/messages/large-page-data"))),(0,s.htmlEscapeJsonString)(o)}catch(e){if((0,l.default)(e)&&-1!==e.message.indexOf("circular structure"))throw Error('Circular structure in "getInitialProps" result of page "'.concat(t.page,'". https://nextjs.org/docs/messages/circular-structure'));throw e}}render(){let{assetPrefix:e,inAmpMode:t,buildManifest:n,unstable_runtimeJS:r,docComponentsRendered:o,assetQueryString:a,disableOptimizedLoading:s,crossOrigin:l}=this.context,u=!1===r;if(o.NextScript=!0,t)return null;let c=f(this.context.buildManifest,this.context.__NEXT_DATA__.page,t);return i.default.createElement(i.default.Fragment,null,!u&&n.devFiles?n.devFiles.map(t=>i.default.createElement("script",{key:t,src:"".concat(e,"/_next/").concat(encodeURI(t)).concat(a),nonce:this.props.nonce,crossOrigin:this.props.crossOrigin||l})):null,u?null:i.default.createElement("script",{id:"__NEXT_DATA__",type:"application/json",nonce:this.props.nonce,crossOrigin:this.props.crossOrigin||l,dangerouslySetInnerHTML:{__html:b.getInlineScriptSource(this.context)}}),s&&!u&&this.getPolyfillScripts(),s&&!u&&this.getPreNextScripts(),s&&!u&&this.getDynamicChunks(c),s&&!u&&this.getScripts(c))}}function x(e){let{inAmpMode:t,docComponentsRendered:n,locale:r,scriptLoader:o,__NEXT_DATA__:a}=(0,u.useHtmlContext)();return n.Html=!0,!function(e,t,n){var r,o,a,s;if(!n.children)return;let l=[],u=Array.isArray(n.children)?n.children:[n.children],c=null==(o=u.find(e=>e.type===y))?void 0:null==(r=o.props)?void 0:r.children,d=null==(s=u.find(e=>"body"===e.type))?void 0:null==(a=s.props)?void 0:a.children,f=[...Array.isArray(c)?c:[c],...Array.isArray(d)?d:[d]];i.default.Children.forEach(f,t=>{var n;if(t&&(null==(n=t.type)?void 0:n.__nextScript)){if("beforeInteractive"===t.props.strategy){e.beforeInteractive=(e.beforeInteractive||[]).concat([{...t.props}]);return}if(["lazyOnload","afterInteractive","worker"].includes(t.props.strategy)){l.push(t.props);return}}}),t.scriptLoader=l}(o,a,e),i.default.createElement("html",{...e,lang:e.lang||r||void 0,amp:t?"":void 0,"data-ampdevmode":void 0})}function w(){let{docComponentsRendered:e}=(0,u.useHtmlContext)();return e.Main=!0,i.default.createElement("next-js-internal-body-render-target",null)}b.contextType=u.HtmlContext;class j extends i.default.Component{static getInitialProps(e){return e.defaultGetInitialProps(e)}render(){return i.default.createElement(x,null,i.default.createElement(y,null),i.default.createElement("body",null,i.default.createElement(w,null),i.default.createElement(b,null)))}}j[o.NEXT_BUILTIN_DOCUMENT]=function(){return i.default.createElement(x,null,i.default.createElement(y,null),i.default.createElement("body",null,i.default.createElement(w,null),i.default.createElement(b,null)))}},22698:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{noSSR:function(){return a},default:function(){return s}});let r=n(43219),i=(n(2784),r._(n(94780)));function o(e){return{default:(null==e?void 0:e.default)||e}}function a(e,t){return delete t.webpack,delete t.modules,e(t)}function s(e,t){let n=i.default,r={loading:e=>{let{error:t,isLoading:n,pastDelay:r}=e;return null}};e instanceof Promise?r.loader=()=>e:"function"==typeof e?r.loader=e:"object"==typeof e&&(r={...r,...e}),r={...r,...t};let s=r.loader;return(r.loadableGenerated&&(r={...r,...r.loadableGenerated},delete r.loadableGenerated),"boolean"!=typeof r.ssr||r.ssr)?n({...r,loader:()=>null!=s?s().then(o):Promise.resolve(o(()=>null))}):(delete r.webpack,delete r.modules,a(n,r))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},31918:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getImgProps",{enumerable:!0,get:function(){return s}}),n(84759);let r=n(69933),i=n(97686);function o(e){return void 0!==e.default}function a(e){return void 0===e?e:"number"==typeof e?Number.isFinite(e)?e:NaN:"string"==typeof e&&/^[0-9]+$/.test(e)?parseInt(e,10):NaN}function s(e,t){var n;let s,l,u,{src:c,sizes:d,unoptimized:f=!1,priority:h=!1,loading:p,className:m,quality:v,width:g,height:y,fill:b=!1,style:x,onLoad:w,onLoadingComplete:j,placeholder:E="empty",blurDataURL:k,fetchPriority:S,layout:_,objectFit:C,objectPosition:O,lazyBoundary:M,lazyRoot:T,...A}=e,{imgConf:P,showAltText:N,blurComplete:R,defaultLoader:D}=t,L=P||i.imageConfigDefault;if("allSizes"in L)s=L;else{let e=[...L.deviceSizes,...L.imageSizes].sort((e,t)=>e-t),t=L.deviceSizes.sort((e,t)=>e-t);s={...L,allSizes:e,deviceSizes:t}}let F=A.loader||D;delete A.loader,delete A.srcSet;let z="__next_img_default"in F;if(z){if("custom"===s.loader)throw Error('Image with src "'+c+'" is missing "loader" prop.\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader')}else{let e=F;F=t=>{let{config:n,...r}=t;return e(r)}}if(_){"fill"===_&&(b=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[_];e&&(x={...x,...e});let t={responsive:"100vw",fill:"100vw"}[_];t&&!d&&(d=t)}let V="",I=a(g),Z=a(y);if("object"==typeof(n=c)&&(o(n)||void 0!==n.src)){let e=o(c)?c.default:c;if(!e.src)throw Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received "+JSON.stringify(e));if(!e.height||!e.width)throw Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received "+JSON.stringify(e));if(l=e.blurWidth,u=e.blurHeight,k=k||e.blurDataURL,V=e.src,!b){if(I||Z){if(I&&!Z){let t=I/e.width;Z=Math.round(e.height*t)}else if(!I&&Z){let t=Z/e.height;I=Math.round(e.width*t)}}else I=e.width,Z=e.height}}let B=!h&&("lazy"===p||void 0===p);(!(c="string"==typeof c?c:V)||c.startsWith("data:")||c.startsWith("blob:"))&&(f=!0,B=!1),s.unoptimized&&(f=!0),z&&c.endsWith(".svg")&&!s.dangerouslyAllowSVG&&(f=!0),h&&(S="high");let H=a(v),U=Object.assign(b?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:C,objectPosition:O}:{},N?{}:{color:"transparent"},x),W=R||"empty"===E?null:"blur"===E?'url("data:image/svg+xml;charset=utf-8,'+(0,r.getImageBlurSvg)({widthInt:I,heightInt:Z,blurWidth:l,blurHeight:u,blurDataURL:k||"",objectFit:U.objectFit})+'")':'url("'+E+'")',q=W?{backgroundSize:U.objectFit||"cover",backgroundPosition:U.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:W}:{},$=function(e){let{config:t,src:n,unoptimized:r,width:i,quality:o,sizes:a,loader:s}=e;if(r)return{src:n,srcSet:void 0,sizes:void 0};let{widths:l,kind:u}=function(e,t,n){let{deviceSizes:r,allSizes:i}=e;if(n){let e=/(^|\s)(1?\d?\d)vw/g,t=[];for(let r;r=e.exec(n);r)t.push(parseInt(r[2]));if(t.length){let e=.01*Math.min(...t);return{widths:i.filter(t=>t>=r[0]*e),kind:"w"}}return{widths:i,kind:"w"}}if("number"!=typeof t)return{widths:r,kind:"w"};let o=[...new Set([t,2*t].map(e=>i.find(t=>t>=e)||i[i.length-1]))];return{widths:o,kind:"x"}}(t,i,a),c=l.length-1;return{sizes:a||"w"!==u?a:"100vw",srcSet:l.map((e,r)=>s({config:t,src:n,quality:o,width:e})+" "+("w"===u?e:r+1)+u).join(", "),src:s({config:t,src:n,quality:o,width:l[c]})}}({config:s,src:c,unoptimized:f,width:I,quality:H,sizes:d,loader:F}),K={...A,loading:B?"lazy":p,fetchPriority:S,width:I,height:Z,decoding:"async",className:m,style:{...U,...q},sizes:$.sizes,srcSet:$.srcSet,src:$.src},Y={unoptimized:f,priority:h,placeholder:E,fill:b};return{props:K,meta:Y}}},15333:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{HtmlContext:function(){return i},useHtmlContext:function(){return o}});let r=n(2784),i=(0,r.createContext)(void 0);function o(){let e=(0,r.useContext)(i);if(!e)throw Error(" should not be imported outside of pages/_document.\nRead more: https://nextjs.org/docs/messages/no-document-import-in-page");return e}},69933:function(e,t){"use strict";function n(e){let{widthInt:t,heightInt:n,blurWidth:r,blurHeight:i,blurDataURL:o,objectFit:a}=e,s=r?40*r:t,l=i?40*i:n,u=s&&l?"viewBox='0 0 "+s+" "+l+"'":"";return"%3Csvg xmlns='http://www.w3.org/2000/svg' "+u+"%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='"+(u?"none":"contain"===a?"xMidYMid":"cover"===a?"xMidYMid slice":"none")+"' style='filter: url(%23b);' href='"+o+"'/%3E%3C/svg%3E"}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getImageBlurSvg",{enumerable:!0,get:function(){return n}})},81963:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{default:function(){return u},unstable_getImgProps:function(){return l}});let r=n(43219),i=n(31918),o=n(84759),a=n(80920),s=r._(n(2088)),l=e=>{(0,o.warnOnce)("Warning: unstable_getImgProps() is experimental and may change or be removed at any time. Use at your own risk.");let{props:t}=(0,i.getImgProps)(e,{defaultLoader:s.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0}});for(let[e,n]of Object.entries(t))void 0===n&&delete t[e];return{props:t}},u=a.Image},2088:function(e,t){"use strict";function n(e){let{config:t,src:n,width:r,quality:i}=e;return t.path+"?url="+encodeURIComponent(n)+"&w="+r+"&q="+(i||75)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r}}),n.__next_img_default=!0;let r=n},49306:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"LoadableContext",{enumerable:!0,get:function(){return o}});let r=n(43219),i=r._(n(2784)),o=i.default.createContext(null)},94780:function(e,t,n){"use strict";/** +***************************************************************************** */function Ef(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((r=r.apply(e,t||[])).next())})}function Eh(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]-1?(Ep('UA "Edge" => assuming success'),[2,!0]):Ez(document.body,e)?(Ep("copyUsingTempSelection worked"),[2,!0]):((i=document.createElement("div")).setAttribute("style","-webkit-user-select: text !important"),i.textContent="temporary element",document.body.appendChild(i),o=Ez(i,e),document.body.removeChild(i),o)?(Ep("copyUsingTempElem worked"),[2,!0]):(a=e["text/plain"],Ep("copyTextUsingDOM"),(s=document.createElement("div")).setAttribute("style","-webkit-user-select: text !important"),l=s,s.attachShadow&&(Ep("Using shadow DOM."),l=s.attachShadow({mode:"open"})),(u=document.createElement("span")).innerText=a,l.appendChild(u),document.body.appendChild(s),EV(u),c=document.execCommand("copy"),EI(),document.body.removeChild(s),c)?(Ep("copyTextUsingDOM worked"),[2,!0]):[2,!1]})})}(((n={})["text/plain"]=e,n)))throw Error("writeText() failed");return[2]})})}let EB={data:""},EH=e=>"object"==typeof window?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||EB,EU=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,EW=/\/\*[^]*?\*\/|\s\s+|\n/g,Eq=(e,t)=>{let n="",r="",i="";for(let o in e){let a=e[o];"@"==o[0]?"i"==o[1]?n=o+" "+a+";":r+="f"==o[1]?Eq(a,o):o+"{"+Eq(a,"k"==o[1]?"":t)+"}":"object"==typeof a?r+=Eq(a,t?t.replace(/([^,])+/g,e=>o.replace(/(^:.*)|([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)):o):null!=a&&(o=o.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=Eq.p?Eq.p(o,a):o+":"+a+";")}return n+(t&&i?t+"{"+i+"}":i)+r},E$={},EK=e=>{if("object"==typeof e){let t="";for(let n in e)t+=n+EK(e[n]);return t}return e},EY=(e,t,n,r,i)=>{var o;let a=EK(e),s=E$[a]||(E$[a]=(e=>{let t=0,n=11;for(;t>>0;return"go"+n})(a));if(!E$[s]){let t=a!==e?e:(e=>{let t,n=[{}];for(;t=EU.exec(e.replace(EW,""));)t[4]?n.shift():t[3]?n.unshift(n[0][t[3]]=n[0][t[3]]||{}):n[0][t[1]]=t[2];return n[0]})(e);E$[s]=Eq(i?{["@keyframes "+s]:t}:t,n?"":"."+s)}return o=E$[s],-1==t.data.indexOf(o)&&(t.data=r?o+t.data:t.data+o),s},EG=(e,t,n)=>e.reduce((e,r,i)=>{let o=t[i];if(o&&o.call){let e=o(n),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;o=t?"."+t:e&&"object"==typeof e?e.props?"":Eq(e,""):!1===e?"":e}return e+r+(null==o?"":o)},"");function EX(e){let t=this||{},n=e.call?e(t.p):e;return EY(n.unshift?n.raw?EG(n,[].slice.call(arguments,1),t.p):n.reduce((e,n)=>Object.assign(e,n&&n.call?n(t.p):n),{}):n,EH(t.target),t.g,t.o,t.k)}EX.bind({g:1});let EJ,EQ,E0,E1=EX.bind({k:1});function E2(e,t){let n=this||{};return function(){let r=arguments;function i(o,a){let s=Object.assign({},o),l=s.className||i.className;n.p=Object.assign({theme:EQ&&EQ()},s),n.o=/ *go\d+/.test(l),s.className=EX.apply(n,r)+(l?" "+l:""),t&&(s.ref=a);let u=e;return e[0]&&(u=s.as||e,delete s.as),E0&&u[0]&&E0(s),EJ(u,s)}return t?t(i):i}}function E4(){return(E4=Object.assign||function(e){for(var t=1;t-1&&kn.splice(e,1)}},[n]);var i=n.toasts.map(function(t){var n,r,i;return E4({},e,e[t.type],t,{duration:t.duration||(null==(n=e[t.type])?void 0:n.duration)||(null==(r=e)?void 0:r.duration)||ko[t.type],style:E4({},e.style,null==(i=e[t.type])?void 0:i.style,t.style)})});return E4({},n,{toasts:i})},ks=function(e){return function(t,n){var r,i=(void 0===(r=e)&&(r="blank"),E4({createdAt:Date.now(),visible:!0,type:r,ariaProps:{role:"status","aria-live":"polite"},message:t,pauseDuration:0},n,{id:(null==n?void 0:n.id)||E6()}));return ki({type:g.UPSERT_TOAST,toast:i}),i.id}},kl=function(e,t){return ks("blank")(e,t)};kl.error=ks("error"),kl.success=ks("success"),kl.loading=ks("loading"),kl.custom=ks("custom"),kl.dismiss=function(e){ki({type:g.DISMISS_TOAST,toastId:e})},kl.remove=function(e){return ki({type:g.REMOVE_TOAST,toastId:e})},kl.promise=function(e,t,n){var r=kl.loading(t.loading,E4({},n,null==n?void 0:n.loading));return e.then(function(e){return kl.success(E5(t.success,e),E4({id:r},n,null==n?void 0:n.success)),e}).catch(function(e){kl.error(E5(t.error,e),E4({id:r},n,null==n?void 0:n.error))}),e};var ku=function(e){var t=ka(e),n=t.toasts,r=t.pausedAt;(0,b.useEffect)(function(){if(!r){var e=Date.now(),t=n.map(function(t){if(t.duration!==1/0){var n=(t.duration||0)+t.pauseDuration-(e-t.createdAt);if(n<0){t.visible&&kl.dismiss(t.id);return}return setTimeout(function(){return kl.dismiss(t.id)},n)}});return function(){t.forEach(function(e){return e&&clearTimeout(e)})}}},[n,r]);var i=(0,b.useMemo)(function(){return{startPause:function(){ki({type:g.START_PAUSE,time:Date.now()})},endPause:function(){r&&ki({type:g.END_PAUSE,time:Date.now()})},updateHeight:function(e,t){return ki({type:g.UPDATE_TOAST,toast:{id:e,height:t}})},calculateOffset:function(e,t){var r,i=t||{},o=i.reverseOrder,a=void 0!==o&&o,s=i.gutter,l=void 0===s?8:s,u=i.defaultPosition,c=n.filter(function(t){return(t.position||u)===(e.position||u)&&t.height}),d=c.findIndex(function(t){return t.id===e.id}),f=c.filter(function(e,t){return t * {\n pointer-events: auto;\n }\n"]);return kH=function(){return e},e}c=b.createElement,Eq.p=void 0,EJ=c,EQ=void 0,E0=void 0;var kU=function(e,t){var n=e.includes("top"),r=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return E4({left:0,right:0,display:"flex",position:"absolute",transition:E8()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:"translateY("+t*(n?1:-1)+"px)"},n?{top:0}:{bottom:0},r)},kW=EX(kH()),kq=function(e){var t=e.reverseOrder,n=e.position,r=void 0===n?"top-center":n,i=e.toastOptions,o=e.gutter,a=e.children,s=e.containerStyle,l=e.containerClassName,u=ku(i),c=u.toasts,d=u.handlers;return(0,b.createElement)("div",{style:E4({position:"fixed",zIndex:9999,top:16,left:16,right:16,bottom:16,pointerEvents:"none"},s),className:l,onMouseEnter:d.startPause,onMouseLeave:d.endPause},c.map(function(e){var n,i=e.position||r,s=kU(i,d.calculateOffset(e,{reverseOrder:t,gutter:o,defaultPosition:r})),l=e.height?void 0:(n=function(t){d.updateHeight(e.id,t.height)},function(e){e&&setTimeout(function(){n(e.getBoundingClientRect())})});return(0,b.createElement)("div",{ref:l,className:e.visible?kW:"",key:e.id,style:s},"custom"===e.type?E5(e.message,e):a?a(e):(0,b.createElement)(kB,{toast:e,position:i}))}))};let k$=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};kl((0,y.jsx)(t1,{wrapEllipsis:!0,children:"string"==typeof e&&e.length>200?"".concat(e.slice(0,200)):e}),kX(t))},kK=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};kl(e,kX(t))},kY=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};kl.success((0,y.jsx)(t1,{wrapEllipsis:!0,children:"string"==typeof e&&e.length>200?"".concat(e.slice(0,200),"..."):e}),kX(t))},kG=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};kl.error((0,y.jsx)(t1,{wrapEllipsis:!0,children:"string"==typeof e&&e.length>200?"".concat(e.slice(0,200),"..."):e}),kX(t))};function kX(){let{className:e,...t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{position:"top-center",duration:6e3,className:(0,em.cx)(lo,t4(),"font-sans font-normal","text-gray-1100 dark:text-white","max-w-[800px] overflow-hidden text-ellipsis","[&>div]:overflow-hidden","[&>div]:flex-1",e),success:{icon:(0,y.jsx)("div",{className:"!flex-none w-5",children:(0,y.jsx)(lc.tEK,{className:"w-5 text-green-600"})})},error:{icon:(0,y.jsx)("div",{className:"!flex-none w-5",children:(0,y.jsx)(lc.Jsc,{className:"w-5 text-red-600"})})},...t}}function kJ(){return(0,y.jsx)(kq,{toastOptions:kX()})}let kQ=(e,t)=>{let n=t?"Copied ".concat(t," to clipboard"):"Copied to clipboard";k$(n),EZ(e)},k0=(e,t,n)=>{kK(t,n),EZ(e)};function k1(e,t){return e?t&&e.length>t?"".concat(e.slice(0,t),"..."):"".concat(e.slice(0,t)):""}function k2(e){return(e||"").replace(/^addr:/,"").replace(/^txid:/,"").replace(/^fcid:/,"").replace(/^h:/,"").replace(/^scoid:/,"").replace(/^key:/,"")}function k4(e,t,n){return t?"".concat(e," ").concat(k1(t,n)):"".concat(e)}function k3(e,t){return"miner"===t?"minerPayout":"siafundClaim"===t?"siafundClaim":"contract"===t?"contractPayout":"foundation"===t?"foundationSubsidy":e.storageProofs&&e.storageProofs.length>0?"storageProof":e.fileContracts&&e.fileContracts.length>0&&e.fileContractRevisions&&e.fileContractRevisions.length>0?"contractRenewal":e.fileContractRevisions&&e.fileContractRevisions.length>0?"contractRevision":e.fileContracts&&e.fileContracts.length>0?"contractFormation":e.arbitraryData&&e.arbitraryData.length>0&&0===atob(e.arbitraryData[0]).indexOf("HostAnnouncement")?"hostAnnouncement":e.siafundOutputs&&e.siafundOutputs.length>0?"siafund":e.siacoinOutputs&&e.siacoinOutputs.length>0?"siacoin":void 0}let k5={transaction:"transaction",contract:"contract",block:"block",output:"output",address:"address",ip:"IP"},k6={siacoin:"siacoin transfer",siafund:"siafund transfer",contractFormation:"contract formation",contractRenewal:"contract renewal",contractRevision:"contract revision",contractPayout:"contract payout",storageProof:"storage proof",minerPayout:"miner payout",siafundClaim:"siafund claim",foundationSubsidy:"foundation subsidy",hostAnnouncement:"host announcement"};function k8(e){return e?k5[e]:void 0}function k7(e){return e?k6[e]:void 0}function k9(e){let{value:t,displayValue:n,type:r,label:i,href:o,maxLength:a,size:s,scaleSize:l,weight:u,color:c="contrast",className:d}=e,f=i||k8(r),h=a||("ip"===r?20:12),p=k2(t),m=n||p,v="".concat(null==m?void 0:m.slice(0,h)).concat(((null==m?void 0:m.length)||0)>h?"...":"");return(0,y.jsxs)("div",{className:(0,em.cx)("flex items-center",d),children:[o?(0,y.jsx)(di,{href:o,underline:"hover",size:s,scaleSize:l,color:c,weight:u,ellipsis:!0,children:v}):(0,y.jsx)(t1,{size:s,scaleSize:l,color:c,weight:u,ellipsis:!0,children:v}),(0,y.jsx)("div",{className:"ml-1 flex items-center",children:(0,y.jsx)(lu,{variant:"ghost",size:"none",onClick:e=>{e.stopPropagation(),kQ(p,f)},children:(0,y.jsx)(t1,{color:c,children:(0,y.jsx)(lc.olJ,{className:"10"===s?"scale-75":"scale-90"})})})})]})}function Se(e){let{value:t,displayValue:n,type:r,href:i,maxLength:o,size:a,scaleSize:s,color:l="contrast",menu:u,className:c}=e,d=o||("ip"===r?20:12),f=k2(t),h=n||f,p="".concat(null==h?void 0:h.slice(0,d)).concat(((null==h?void 0:h.length)||0)>d?"...":"");return(0,y.jsxs)("div",{className:(0,em.cx)("flex items-center",c),children:[i?(0,y.jsx)(di,{href:i,underline:"hover",size:a,scaleSize:s,color:l,ellipsis:!0,children:p}):(0,y.jsx)(t1,{size:a,scaleSize:s,color:l,ellipsis:!0,children:p}),(0,y.jsx)("div",{className:"ml-1 flex items-center",children:u})]})}function St(e){let{value:t,size:n,scaleSize:r,tooltip:i="",variant:o="change"}=e,a=(0,vS.yF)(String(t),{units:"SF"});return(0,y.jsx)(ls,{content:(i?"".concat(i," "):"")+a,children:(0,y.jsxs)(t1,{size:n,scaleSize:r,weight:"medium",font:"mono",color:"change"===o?t>0?"green":t<0?"red":"subtle":"contrast",children:["change"===o&&t>0?"+":"",a]})})}function Sn(e){let{value:t,size:n,scaleSize:r,tooltip:i="",variant:o="change",fixed:a=3,dynamicUnits:s=!0,extendedSuffix:l,showTooltip:u=!0}=e,c=t.isGreaterThan(0)?"+":t.isLessThan(0)?"-":"",d="change"===o?t.isGreaterThan(0)?"green":t.isLessThan(0)?"red":"subtle":"contrast",f=(0,y.jsxs)(t1,{size:n,scaleSize:r,weight:"medium",font:"mono",ellipsis:!0,color:d,children:["change"===o?"".concat(c).concat((0,vS.Vz)(t.absoluteValue(),{fixed:a,dynamicUnits:s})):(0,vS.Vz)(t,{fixed:a,dynamicUnits:s}),(0,y.jsx)(t1,{size:"20",weight:"medium",font:"mono",ellipsis:!0,color:"subtle",children:l?"".concat(l):""})]});return u?(0,y.jsx)(ls,{content:(i?"".concat(i," "):"")+(0,vS.Vz)(t,{fixed:16,dynamicUnits:!1}),children:f}):f}function Sr(e){let{value:t,size:n="14",weight:r="semibold",tooltip:i="",variant:o="change",color:a,format:s}=e,l=t.isGreaterThan(0)?"+":t.isLessThan(0)?"-":"",u="change"===o?t.isGreaterThan(0)?"green":t.isLessThan(0)?"red":"subtle":"contrast";return(0,y.jsx)(ls,{content:(i?"".concat(i," "):"")+s(t),children:(0,y.jsx)(t1,{size:n,weight:r,font:"mono",ellipsis:!0,color:a||u,children:"change"===o?"".concat(l).concat(s(t.absoluteValue())):s(t)})})}var Si=n(61258),So=n.n(Si);function Sa(e){let{skeletonCount:t=10}=e;return(0,y.jsx)(y.Fragment,{children:So()(t,e=>(0,y.jsxs)("div",{className:(0,em.cx)("relative flex gap-4 p-3.5",(0,em.cx)("border-t border-gray-200 dark:border-graydark-300","first:border-none")),children:[(0,y.jsx)(f8,{className:"w-[60px] h-[50px]"}),(0,y.jsxs)("div",{className:"flex flex-col gap-2 w-full",children:[(0,y.jsx)(f8,{className:"w-[90%] h-[20px]"}),(0,y.jsx)(f8,{className:"w-[140px] h-[14px]"})]})]},e))})}var Ss=n(29193),Sl=n(23779),Su=n.n(Sl);function Sc(e){let{type:t,label:n,initials:r,href:i,src:o,shape:a}=e,s=(0,y.jsx)(lM,{interactive:!!i,fallback:r||t&&(t||n||"").split(" ").map(e=>e.charAt(0).toUpperCase).join(""),src:o,shape:a||(t&&"address"!==t&&"block"!==t?"circle":"square")}),l=i&&(0,y.jsx)(di,{href:i,underline:"none",children:s}),u=l||s;return t?(0,y.jsx)(ls,{content:n||k8(t),children:(0,y.jsx)("div",{className:"",children:u})}):u}function Sd(e){let{label:t,type:n,avatar:r,avatarShape:i,initials:o,href:a,onClick:s,children:l}=e;return(0,y.jsxs)("div",{className:(0,em.cx)("flex gap-4 p-4",(0,em.cx)("border-t border-gray-200 dark:border-graydark-300","first:border-none")),onClick:s,children:[(0,y.jsx)(Sc,{label:t,type:n,shape:i,src:r,initials:o||(n||t||"").split(" ").map(e=>e.charAt(0).toUpperCase()).join(""),href:a}),l]})}function Sf(e){let t=e.sc,n=e.sf,r=e.hash&&(0,y.jsx)(k9,{value:e.hash,type:e.type,label:e.label,href:e.href,color:"subtle"}),i=e.label||"transaction"===e.type&&e.txType&&k7(e.txType)||k8(e.type),o=!function(e){if(!e)return!1;try{return new URL(e),!0}catch(e){return!1}}(i)?Su()(i):i;return(0,y.jsx)(Sd,{...e,children:(0,y.jsxs)("div",{className:"flex flex-col items-center gap-1 w-full",children:[(0,y.jsxs)("div",{className:"flex gap-2 items-center w-full",children:[(0,y.jsxs)("div",{className:"flex gap-2 items-center",children:[e.height&&e.blockHref&&(0,y.jsx)(t1,{color:"subtle",weight:"semibold",children:(0,y.jsx)(di,{href:e.blockHref,underline:"none",children:(0,vS.yF)(e.height)})}),(0,y.jsx)(t1,{weight:"medium",children:o||r})]}),(0,y.jsx)("div",{className:"flex-1"}),!!t&&(0,y.jsx)(Sn,{variant:e.scVariant,value:t}),!!n&&(0,y.jsx)(St,{variant:e.sfVariant,value:n})]}),(0,y.jsxs)("div",{className:"flex justify-between w-full",children:[(0,y.jsx)("div",{className:"flex gap-1",children:!!o&&r}),(0,y.jsxs)("div",{className:"flex gap-1 items-center",children:[e.unconfirmed?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(t1,{color:"verySubtle",children:"unconfirmed"}),e.timestamp?(0,y.jsx)(t1,{color:"verySubtle",children:(0,y.jsx)(lc.Bpb,{className:"scale-50"})}):null]}):null,e.timestamp&&(0,y.jsx)(t1,{color:"subtle",children:(0,Ss.Z)(new Date(e.timestamp),new Date,{addSuffix:!0})})]})]})]})})}function Sh(e){let{title:t,actions:n,entities:r,emptyMessage:i,skeletonCount:o=10,children:a}=e;return(0,y.jsx)(t3,{children:(0,y.jsxs)("div",{className:"flex flex-col rounded overflow-hidden",children:[(t||n)&&(0,y.jsxs)("div",{className:"flex items-center p-4 border-b border-gray-200 dark:border-graydark-300",children:[t&&(0,y.jsx)(c2,{size:"20",font:"mono",ellipsis:!0,children:t}),(0,y.jsx)("div",{className:"flex-1"}),n]}),(0,y.jsxs)("div",{className:"flex flex-col rounded overflow-hidden",children:[(null==r?void 0:r.length)===0&&(0,y.jsx)("div",{className:(0,em.cx)("flex items-center justify-center h-[84px]",(0,em.cx)("border-t border-gray-200 dark:border-graydark-300","first:border-none")),children:(0,y.jsx)(t1,{size:"18",color:"subtle",children:i||"No results"})}),a||(null==r?void 0:r.map((e,t)=>(0,y.jsx)(Sf,{...e},e.hash||e.label||t)))||(0,y.jsx)(Sa,{skeletonCount:o})]})]})})}function Sp(e){let{label:t,entityType:n,entityValue:r,actions:i,href:o,value:a,extendedSuffix:s,hash:l,sc:u,sf:c,comment:d,commentTip:f,scaleSize:h="40",isLoading:p,onClick:m}=e,v=(0,y.jsx)(t1,{color:"subtle",size:"12",className:"h-6",children:d});return(0,y.jsx)(t3,{children:(0,y.jsx)("div",{className:(0,em.cx)("flex items-center py-2 px-4 h-full min-w-[250px]",m?"cursor-pointer":""),onClick:m,children:(0,y.jsxs)("div",{className:"flex flex-col gap-4 flex-wrap items-start w-full",children:[(0,y.jsxs)("div",{className:"flex relative top-px flex-1 w-full gap-6 items-center justify-between",children:[(0,y.jsx)(t1,{color:"subtle",ellipsis:!0,scaleSize:"14",children:"string"==typeof t?Su()(t):t}),i]}),(0,y.jsxs)("div",{className:"flex flex-col items-end md:items-start gap-2 md:flex-2",children:[p?(0,y.jsx)(f8,{className:"h-12 w-[150px]"}):(0,y.jsxs)(y.Fragment,{children:[void 0!==u&&(0,y.jsx)(Sn,{extendedSuffix:s,scaleSize:h,variant:"value",value:u,fixed:0}),void 0!==c&&(0,y.jsx)(St,{scaleSize:h,variant:"value",value:c}),n&&(r?(0,y.jsx)(k9,{scaleSize:h,label:k8(n),href:o,value:r,displayValue:"block"===n&&r?Number(r).toLocaleString():r,className:"relative top-0.5"}):(0,y.jsx)(t1,{font:"mono",weight:"medium",scaleSize:h,children:"-"})),l&&(0,y.jsx)(k9,{scaleSize:h,label:"hash",value:l}),void 0!==a&&(0,y.jsx)(t1,{font:"mono",weight:"medium",scaleSize:h,ellipsis:!0,children:a})]}),v?(0,y.jsx)("div",{className:"mt-1",children:p?(0,y.jsx)("div",{className:"mt-1 h-6 justify-center",children:(0,y.jsx)(f8,{className:"h-4 w-[100px]"})}):f?(0,y.jsx)(ls,{content:f,children:v}):v}):null]})]})})})}function Sm(e){let{title:t,actions:n,name:r}=e;return(0,y.jsxs)("div",{className:"flex gap-0.5 items-center",children:[t?(0,y.jsx)(dt,{htmlFor:r,noWrap:!0,children:t}):null,n]})}function Sv(e){var t;let{form:n,name:r}=e,i=n.formState.errors[r],o=null===(t=n.formState.errors[r])||void 0===t?void 0:t.message;return i?(0,y.jsx)(t1,{size:"14",color:"red",children:o}):null}function Sg(e){let{form:t,title:n,actions:r,name:i,className:o,wrap:a}=e,s=t.formState.errors[i];return n||s?(0,y.jsxs)("div",{className:(0,em.cx)("flex justify-between items-center gap-x-4 overflow-hidden",a?"flex-wrap":"",o),children:[(0,y.jsx)(Sm,{name:i,title:n,actions:r}),(0,y.jsx)(Sv,{form:t,name:i})]}):null}function Sy(e){let{children:t,...n}=e;return(0,y.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,y.jsx)(Sg,{...n}),t]})}function Sb(e){let{form:t,size:n="medium",variant:r="accent",children:i}=e;return(0,y.jsx)(y.Fragment,{children:(0,y.jsx)(lu,{size:n,variant:r,state:t.formState.isSubmitting?"waiting":void 0,type:"submit",children:t.formState.isSubmitting?(0,y.jsx)(Eu,{}):i})})}function Sx(e){let{formik:t,title:n,name:r,placeholder:i,disabled:o,readOnly:a,autoComplete:s="off",spellCheck:l=!1,tabIndex:u,allowDecimals:c=!1,decimalsLimitFiat:d=3,decimalsLimitSc:f=3,decimalsLimit:h=2,disableGroupSeparators:p=!1,showFiat:m=!0,units:v,type:g,variants:b}=e;return(0,y.jsx)(SS,{formik:t,title:n,name:r,children:"number"===g?(0,y.jsx)(Sj,{formik:t,name:r,units:v,disabled:o,readOnly:a,tabIndex:u,decimalsLimit:h,allowDecimals:c,disableGroupSeparators:p,placeholder:i,variants:b}):"siacoin"===g?(0,y.jsx)(SE,{formik:t,name:r,disabled:o,readOnly:a,placeholder:i,tabIndex:u,showFiat:m,decimalsLimitFiat:d,decimalsLimitSc:f,variants:b}):(0,y.jsx)(Sw,{formik:t,name:r,autoComplete:s,disabled:o,readOnly:a,placeholder:i,tabIndex:u,spellCheck:l,type:g,variants:b})})}function Sw(e){let{formik:t,name:n,placeholder:r,autoComplete:i="off",disabled:o,readOnly:a,tabIndex:s,spellCheck:l=!1,type:u,variants:c}=e;return(0,y.jsx)(fE,{id:n,name:n,autoComplete:i,disabled:o,spellCheck:l,placeholder:r,tabIndex:s,readOnly:a||t.isSubmitting,type:u,onBlur:t.handleBlur,onChange:t.handleChange,value:t.values[n]||"",...c})}function Sj(e){let{formik:t,name:n,units:r,disabled:i,readOnly:o,tabIndex:a,placeholder:s,decimalsLimit:l,allowDecimals:u=!1,disableGroupSeparators:c=!1,variants:d}=e;return(0,y.jsx)(f$,{id:n,units:r,name:n,placeholder:new(fW())(s),disabled:i,allowDecimals:u,decimalsLimit:l,disableGroupSeparators:c,readOnly:o||t.isSubmitting,tabIndex:a,onBlur:t.handleBlur,onChange:e=>t.setFieldValue(n,e),value:t.values[n],...d})}function SE(e){let{formik:t,name:n,disabled:r,readOnly:i,tabIndex:o,placeholder:a,showFiat:s,decimalsLimitFiat:l=3,decimalsLimitSc:u=3,variants:c}=e;return(0,y.jsx)(fJ,{id:n,name:n,disabled:r,showFiat:s,decimalsLimitFiat:l,decimalsLimitSc:u,readOnly:i||t.isSubmitting,tabIndex:o,onFocus:()=>t.setFieldTouched(n),sc:new(fW())(t.values[n]),placeholder:new(fW())(a),onChange:e=>t.setFieldValue(n,null==e?void 0:e.toString()),...c})}function Sk(e){var t,n;let{formik:r,title:i,name:o,withStatusError:a=!1,className:s}=e,l=r.errors[o]&&r.touched[o]||a&&(null===(t=r.status)||void 0===t?void 0:t.error),u=r.errors[o]||a&&(null===(n=r.status)||void 0===n?void 0:n.error);return(i||l)&&(0,y.jsxs)("div",{className:(0,em.cx)("flex justify-between items-center gap-4",s),children:[i?(0,y.jsx)(dt,{htmlFor:o,children:i}):(0,y.jsx)("div",{}),l&&(0,y.jsx)(t1,{size:"14",color:"red",children:u})]})}function SS(e){let{children:t,...n}=e;return(0,y.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,y.jsx)(Sk,{...n}),t]})}function S_(e){var t;let{formik:n,size:r="medium",variant:i="accent",withStatusError:o=!0,children:a}=e;return(0,y.jsxs)(y.Fragment,{children:[o&&(null===(t=n.status)||void 0===t?void 0:t.error)&&(0,y.jsx)(t1,{color:"red",children:n.status.error}),(0,y.jsx)(lu,{size:r,variant:i,state:n.isSubmitting?"waiting":void 0,type:"submit",children:n.isSubmitting?(0,y.jsx)(Eu,{}):a})]})}function SC(e){let{columns:t,data:n,context:r,sortField:i,sortDirection:o,sortableColumns:a,toggleSort:s,summary:l,rowSize:u="default",pageSize:c,isLoading:d,emptyState:f,focusId:h,focusColor:p="default"}=e,m="emptyState";!d||(null==n?void 0:n.length)||(m="skeleton"),(null==n?void 0:n.length)&&(m="currentData");let v=(0,b.useCallback)((e,n,r)=>(0,em.cx)(0===e?"pl-6":"pl-4",e===t.length-1?"pr-6":"pr-4",r?[0===e?"rounded-tl-lg":"",e===t.length-1?"rounded-tr-lg":""]:"",n),[t]),g=(0,b.useCallback)((e,t)=>(0,em.cx)("flex items-center",t),[]);return(0,y.jsxs)(t3,{children:[(0,y.jsxs)("table",{className:"relative z-10 table-auto border-collapse w-full",children:[(0,y.jsx)("thead",{className:(0,em.cx)("sticky top-0 z-20 bg-white dark:bg-graydark-100","shadow-border-b shadow-gray-400 dark:shadow-graydark-300"),children:(0,y.jsx)("tr",{children:t.map((e,t)=>{let{id:n,icon:r,label:l,tip:u,cellClassName:c,contentClassName:d}=e,f=(null==a?void 0:a.includes(n))&&!!s,h=i===n;return(0,y.jsx)("th",{className:(0,em.cx)(v(t,c,!1),"border-b border-gray-400 dark:border-graydark-400"),children:(0,y.jsx)("div",{className:(0,em.cx)("overflow-hidden","py-3"),children:(0,y.jsxs)("div",{onClick:()=>{f&&s(n)},className:(0,em.cx)(g(t,d),f?"cursor-pointer":""),children:[(0,y.jsx)(ls,{content:u,children:(0,y.jsxs)(t1,{color:"subtle",className:"relative flex gap-1",ellipsis:!0,children:[r?(0,y.jsx)("div",{children:r}):null,(0,y.jsx)(t1,{ellipsis:!0,size:"12",weight:"medium",children:l})]})}),h&&(0,y.jsx)(t1,{color:"contrast",children:"asc"===o?(0,y.jsx)(lc.kqg,{className:"scale-75"}):(0,y.jsx)(lc.EMN,{className:"scale-75"})}),f&&!h&&(0,y.jsx)(t1,{color:"verySubtle",children:(0,y.jsx)(lc.kqg,{className:"scale-75"})})]})})},n)})})}),(0,y.jsxs)("tbody",{className:"bg-gray-50 dark:bg-graydark-50",children:[l&&(0,y.jsx)("tr",{className:"bg-gray-50 dark:bg-graydark-50 border-l border-r border-b border-gray-200 dark:border-graydark-200",children:t.map((e,t)=>{let{id:n,summary:r,contentClassName:i,cellClassName:o}=e;return(0,y.jsx)("td",{className:v(t,o,!1),children:(0,y.jsx)("div",{className:g(t,i),children:r&&r()})},n)})}),"currentData"===m&&(null==n?void 0:n.map(e=>(0,y.jsx)("tr",{id:e.id,onClick:e.onClick,className:(0,em.cx)("border-b border-gray-200/50 dark:border-graydark-100",e.onClick?"cursor-pointer":""),children:t.map((t,n)=>{let{id:i,render:o,contentClassName:a,cellClassName:s}=t;return(0,y.jsx)("td",{className:(0,em.cx)(v(n,s,!1),h===e.id?["shadow-border-y","first:shadow-border-tlb","last:shadow-border-trb"]:"","default"===p?"!shadow-blue-900 dark:!shadow-blue-200":"","blue"===p?"!shadow-blue-500 dark:!shadow-blue-400":"","red"===p?"!shadow-red-500 dark:!shadow-red-400":"","amber"===p?"!shadow-amber-500 dark:!shadow-amber-500":"","green"===p?"!shadow-green-500 dark:!shadow-green-400":""),children:(0,y.jsx)("div",{className:(0,em.cx)(g(n,a),"dense"===u?"h-[50px]":"h-[100px]"),children:(0,y.jsx)(o,{data:e,context:r})})},"".concat(i,"/").concat(e.id))})},e.id))),"skeleton"===m&&So()(c).map(e=>(0,y.jsx)("tr",{className:"border-b border-gray-200/50 dark:border-graydark-100",children:t.map((e,t)=>{let{id:n,contentClassName:r,cellClassName:i}=e;return(0,y.jsx)("td",{className:v(t,i,!1),children:(0,y.jsx)("div",{className:(0,em.cx)(g(t,r),"dense"===u?"h-[50px]":"h-[100px]")})},"".concat(t,"/").concat(n))})},e))]})]}),"emptyState"===m&&f]})}var SO=n(5632);function SM(e){let{offset:t,limit:n,datasetTotal:r,isLoading:i}=e,o=(0,SO.useRouter)();return(0,y.jsxs)(lR,{children:[(0,y.jsx)(lu,{icon:"contrast",disabled:t<=0,size:"small",variant:"gray",className:"rounded-r-none",onClick:()=>o.push({query:{...o.query,offset:0}}),children:(0,y.jsx)("div",{className:"flex scale-[0.65]",children:(0,y.jsx)(lc.XJM,{})})}),(0,y.jsx)(lu,{icon:"contrast",disabled:t<=0,size:"small",variant:"gray",className:"rounded-none",onClick:()=>o.push({query:{...o.query,offset:Math.max(t-n,0)}}),children:(0,y.jsx)(lc.bdU,{})}),(0,y.jsx)(lu,{state:"waiting",className:"rounded-none px-3",children:r>0?"".concat(t+1," - ").concat(Math.min(t+n,r)," of ").concat(r?r.toLocaleString():""):i?(0,y.jsx)(Eu,{className:"px-2"}):"No results"}),(0,y.jsx)(lu,{icon:"contrast",disabled:t+n>=r,size:"small",variant:"gray",className:"rounded-none",onClick:()=>o.push({query:{...o.query,offset:Math.min(t+n,r)}}),children:(0,y.jsx)(lc.VUy,{})}),(0,y.jsx)(lu,{icon:"contrast",disabled:t+n>=r,size:"small",variant:"gray",className:"rounded-l-none",onClick:()=>o.push({query:{...o.query,offset:Math.floor(r/n)*n}}),children:(0,y.jsx)("div",{className:"flex",style:{transform:"scale(0.65)"},children:(0,y.jsx)(lc.RRj,{})})})]})}function ST(e){let{offset:t,limit:n,pageTotal:r,isLoading:i}=e,o=(0,SO.useRouter)(),a=Math.min(t+n,t+r);return(0,y.jsxs)(lR,{children:[(0,y.jsx)(lu,{icon:"contrast",disabled:t<=0,size:"small",variant:"gray",className:"rounded-r-none",onClick:()=>o.push({query:{...o.query,offset:0}}),children:(0,y.jsx)("div",{className:"flex scale-[0.65]",children:(0,y.jsx)(lc.XJM,{})})}),(0,y.jsx)(lu,{icon:"contrast",disabled:t<=0,size:"small",variant:"gray",className:"rounded-none",onClick:()=>o.push({query:{...o.query,offset:Math.max(t-n,0)}}),children:(0,y.jsx)(lc.bdU,{})}),i?(0,y.jsx)(lu,{className:"rounded-none px-3",state:"waiting",color:"subtle",children:(0,y.jsx)(Eu,{className:"px-2"})}):r?(0,y.jsxs)(lu,{className:"rounded-none px-3",state:"waiting",children:[t+1," - ",a]}):(0,y.jsx)(lu,{className:"rounded-none px-3",state:"waiting",color:"subtle",children:"none"}),(0,y.jsx)(lu,{icon:"contrast",disabled:r!==n,size:"small",variant:"gray",className:"rounded-none",onClick:()=>o.push({query:{...o.query,offset:t+n}}),children:(0,y.jsx)(lc.VUy,{})})]})}function SA(e){let{title:t,nav:n,stats:r,actions:i}=e;return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)("div",{className:"flex items-center gap-2 px-6 h-14 z-10 bg-white dark:bg-graydark-50 border-b border-gray-500 dark:border-graydark-500",children:[t?"string"==typeof t?(0,y.jsx)(t1,{font:"mono",size:"18",weight:"bold",className:"hidden lg:block relative -top-px",children:t}):t:null,(0,y.jsxs)("div",{className:"flex-1 flex gap-4 items-center justify-between h-full px-1 -mx-1 overflow-x-hidden",children:[(0,y.jsx)("div",{className:"flex gap-2 items-center h-full flex-1 overflow-x-hidden",children:n}),(0,y.jsx)("div",{className:"flex gap-2 items-center h-full",children:i})]})]}),r&&(0,y.jsx)("div",{className:"flex items-center gap-2 px-6 py-3 h-10 z-10 bg-gray-50 dark:bg-graydark-50 border-b border-gray-300 dark:border-graydark-300",children:r})]})}let SP=("string"==typeof(d={src:"/_next/static/media/background-pattern.b997b25c.jpg",height:104,width:34,blurDataURL:"data:image/jpeg;base64,/9j/2wBDAAoHBwgHBgoICAgLCgoLDhgQDg0NDh0VFhEYIx8lJCIfIiEmKzcvJik0KSEiMEExNDk7Pj4+JS5ESUM8SDc9Pjv/2wBDAQoLCw4NDhwQEBw7KCIoOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozv/wAARCAAIAAMDASIAAhEBAxEB/8QAFQABAQAAAAAAAAAAAAAAAAAAAAX/xAAZEAADAAMAAAAAAAAAAAAAAAAAAQISIpH/xAAUAQEAAAAAAAAAAAAAAAAAAAAA/8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMRAD8ArRbxWi6AAP/Z",blurWidth:3,blurHeight:8})?{src:d}:d).src;function SN(e){let{children:t}=e;return(0,y.jsxs)("div",{className:"relative -z-10 opacity-100 pointer-events-none",children:[(0,y.jsx)("div",{className:"fixed top-0 left-0 right-0 bottom-0 z-10 bg-white dark:bg-graydark-50"}),(0,y.jsx)("div",{className:"fixed top-0 left-0 right-0 w-[200vw] h-[200vh] opacity-30 z-30 translate-x[-50vw] translate-y[-100vh]",style:{backgroundImage:"url(".concat(SP,")"),backgroundPositionY:"bottom",backgroundSize:"auto"}}),(0,y.jsx)("div",{className:"fixed top-0 left-0 right-0 bottom-0 opacity-95 z-40 bg-white dark:bg-graydark-50"}),t]})}var SR=n(97729),SD=n.n(SR);function SL(e){let{appName:t,title:n,children:r}=e,i=n?"".concat(t," - ").concat(n):t;return(0,y.jsxs)(SD(),{children:[(0,y.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1.0"}),(0,y.jsx)("link",{rel:"apple-touch-icon",sizes:"180x180",href:"/apple-touch-icon.png"}),(0,y.jsx)("link",{rel:"icon",type:"image/png",sizes:"32x32",href:"/favicon-32x32.png"}),(0,y.jsx)("link",{rel:"icon",type:"image/png",sizes:"16x16",href:"/favicon-16x16.png"}),(0,y.jsx)("link",{rel:"manifest",href:"/site.webmanifest"}),(0,y.jsx)("link",{rel:"mask-icon",href:"/safari-pinned-tab.svg",color:"#1ed660"}),(0,y.jsx)("meta",{name:"msapplication-TileColor",content:"#2b5797"}),(0,y.jsx)("meta",{name:"theme-color",content:"#ffffff"}),r,(0,y.jsx)("title",{children:i})]})}function SF(e){let{appName:t,title:n,children:r}=e;return(0,y.jsxs)("div",{className:"h-screen",children:[(0,y.jsx)(SL,{appName:t,title:n}),r]})}function Sz(e){let{appName:t,title:n,children:r,filters:i,actions:o}=e;return(0,y.jsxs)(SF,{appName:t,title:n,children:[(0,y.jsx)(SN,{}),(0,y.jsx)("div",{className:"flex h-full",children:(0,y.jsxs)("div",{className:"flex flex-col flex-1",children:[(0,y.jsx)(SA,{nav:i,actions:o}),(0,y.jsx)("div",{className:"flex-1",children:(0,y.jsx)(lL,{className:"h-full",children:r})})]})})]})}function SV(e){let{size:t="12",wallet:{sc:n,sf:r}}=e;return(0,y.jsx)(t1,{size:t,weight:"medium",children:"".concat((0,vS.Vz)(n,{fixed:0})," ").concat(r&&r>0?" | ".concat((0,vS.ES)(r)):"")})}var SI=n(82876);function SZ(e){let{title:t,children:n,route:r,onClick:i}=e,o=(0,SI.usePathname)(),a=r&&("/"===r?o===r:null==o?void 0:o.startsWith(r));return r?(0,y.jsx)(di,{href:r,className:"no-underline",children:(0,y.jsx)(ls,{side:"right",align:"center",delayDuration:0,sideOffset:5,content:t,children:(0,y.jsx)(lu,{icon:"contrast",size:"none",variant:"state","data-state":a?"open":"closed",onClick:i,children:n})})}):(0,y.jsx)(ls,{side:"right",align:"center",delayDuration:0,sideOffset:5,content:t,children:(0,y.jsx)(lu,{icon:"contrast",size:"none",variant:"state","data-state":a?"open":"closed",onClick:i,children:n})})}function SB(e){let{walletBalance:t,isSynced:n,routes:r}=e;return(0,y.jsx)(SZ,{title:"Wallet",route:r.wallet.view,children:(0,y.jsxs)("div",{className:"flex flex-col gap-3 items-center",children:[(0,y.jsx)(lc.oaN,{}),n&&t&&(0,y.jsx)(SV,{wallet:{sc:t}})]})})}function SH(e){let{routes:t,profile:n,isSynced:r,showWallet:i=!0,walletBalance:o,lock:a,openSettings:s,children:l}=e;return(0,y.jsx)(t3,{className:"relative overflow-hidden z-10 h-full w-[75px] rounded-none border-y-0",children:(0,y.jsxs)("div",{className:"flex flex-col items-center h-full",children:[(0,y.jsx)("div",{className:"flex items-center justify-center",style:{height:"".concat(60,"px")},children:n||(0,y.jsx)(dl,{size:30})}),(0,y.jsxs)("div",{className:"flex flex-col gap-6 items-center pt-4 pb-6 h-full",children:[(0,y.jsx)("div",{className:"flex flex-col gap-6 items-center",children:l}),(0,y.jsx)("div",{className:"flex-1"}),(0,y.jsx)(cF,{className:"w-full"}),i&&(0,y.jsx)(SB,{routes:t,isSynced:r,walletBalance:o}),(0,y.jsx)(SZ,{title:"Blockchain node",route:t.node.index,children:(0,y.jsx)(lc.kBK,{})}),(0,y.jsx)(SZ,{title:"App preferences",onClick:()=>s(),children:(0,y.jsx)(lc.UG6,{})}),(0,y.jsx)(SZ,{title:"Lock app",onClick:a,children:(0,y.jsx)(lc.mBM,{})})]})]})})}var SU=Object.create,SW=Object.defineProperty,Sq=Object.getOwnPropertyDescriptor,S$=Object.getOwnPropertyNames,SK=Object.getPrototypeOf,SY=Object.prototype.hasOwnProperty,SG=(m=null!=(p=(f=(e,t)=>{var r,i;r=e,i=function(e){var t,n=void 0===Number.MAX_SAFE_INTEGER?9007199254740991:Number.MAX_SAFE_INTEGER,r=2*536870912,i=new WeakMap,o=(t=function(e,t){return i.set(e,t),t},function(e){var o=i.get(e),a=void 0===o?e.size:on)throw Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;e.has(a);)a=Math.floor(Math.random()*n);return t(e,a)});e.addUniqueNumber=function(e){var t=o(e);return e.add(t),t},e.generateUniqueNumber=o},"object"==typeof e&&"u">typeof t?i(e):"function"==typeof define&&n.amdO?define(["exports"],i):i((r="u">typeof globalThis?globalThis:r||self).fastUniqueNumbers={})},()=>(h||f((h={exports:{}}).exports,h),h.exports))())?SU(SK(p)):{},((e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let n of S$(t))SY.call(e,n)||void 0===n||SW(e,n,{get:()=>t[n],enumerable:!(r=Sq(t,n))||r.enumerable});return e})(p&&p.__esModule?m:SW(m,"default",{value:p,enumerable:!0}),p)),SX=e=>void 0!==e.method&&"call"===e.method,SJ=e=>null===e.error&&"number"==typeof e.id;v=e=>{let t=new Map([[0,()=>{}]]),n=new Map([[0,()=>{}]]),r=new Map,i=new Worker(e);return i.addEventListener("message",({data:e})=>{if(SX(e)){let{params:{timerId:i,timerType:o}}=e;if("interval"===o){let e=t.get(i);if("number"==typeof e){let t=r.get(e);if(void 0===t||t.timerId!==i||t.timerType!==o)throw Error("The timer is in an undefined state.")}else if("u">typeof e)e();else throw Error("The timer is in an undefined state.")}else if("timeout"===o){let e=n.get(i);if("number"==typeof e){let t=r.get(e);if(void 0===t||t.timerId!==i||t.timerType!==o)throw Error("The timer is in an undefined state.")}else if("u">typeof e)e(),n.delete(i);else throw Error("The timer is in an undefined state.")}}else if(SJ(e)){let{id:i}=e,o=r.get(i);if(void 0===o)throw Error("The timer is in an undefined state.");let{timerId:a,timerType:s}=o;r.delete(i),"interval"===s?t.delete(a):n.delete(a)}else{let{error:{message:t}}=e;throw Error(t)}}),{clearInterval:e=>{let n=(0,SG.generateUniqueNumber)(r);r.set(n,{timerId:e,timerType:"interval"}),t.set(e,n),i.postMessage({id:n,method:"clear",params:{timerId:e,timerType:"interval"}})},clearTimeout:e=>{let t=(0,SG.generateUniqueNumber)(r);r.set(t,{timerId:e,timerType:"timeout"}),n.set(e,t),i.postMessage({id:t,method:"clear",params:{timerId:e,timerType:"timeout"}})},setInterval:(e,n)=>{let r=(0,SG.generateUniqueNumber)(t);return t.set(r,()=>{e(),"function"==typeof t.get(r)&&i.postMessage({id:null,method:"set",params:{delay:n,now:performance.now(),timerId:r,timerType:"interval"}})}),i.postMessage({id:null,method:"set",params:{delay:n,now:performance.now(),timerId:r,timerType:"interval"}}),r},setTimeout:(e,t)=>{let r=(0,SG.generateUniqueNumber)(n);return n.set(r,e),i.postMessage({id:null,method:"set",params:{delay:t,now:performance.now(),timerId:r,timerType:"timeout"}}),r}}},a=null,()=>{if(null!==a)return a;let e=new Blob(['(()=>{"use strict";const e=new Map,t=new Map,r=(e,t)=>{let r,o;const i=performance.now();r=i,o=e-Math.max(0,i-t);return{expected:r+o,remainingDelay:o}},o=(e,t,r,i)=>{const s=performance.now();s>r?postMessage({id:null,method:"call",params:{timerId:t,timerType:i}}):e.set(t,setTimeout(o,r-s,e,t,r,i))};addEventListener("message",(i=>{let{data:s}=i;try{if("clear"===s.method){const{id:r,params:{timerId:o,timerType:i}}=s;if("interval"===i)(t=>{const r=e.get(t);if(void 0===r)throw new Error(\'There is no interval scheduled with the given id "\'.concat(t,\'".\'));clearTimeout(r),e.delete(t)})(o),postMessage({error:null,id:r});else{if("timeout"!==i)throw new Error(\'The given type "\'.concat(i,\'" is not supported\'));(e=>{const r=t.get(e);if(void 0===r)throw new Error(\'There is no timeout scheduled with the given id "\'.concat(e,\'".\'));clearTimeout(r),t.delete(e)})(o),postMessage({error:null,id:r})}}else{if("set"!==s.method)throw new Error(\'The given method "\'.concat(s.method,\'" is not supported\'));{const{params:{delay:i,now:n,timerId:a,timerType:d}}=s;if("interval"===d)((t,i,s)=>{const{expected:n,remainingDelay:a}=r(t,s);e.set(i,setTimeout(o,a,e,i,n,"interval"))})(i,a,n);else{if("timeout"!==d)throw new Error(\'The given type "\'.concat(d,\'" is not supported\'));((e,i,s)=>{const{expected:n,remainingDelay:a}=r(e,s);t.set(i,setTimeout(o,a,t,i,n,"timeout"))})(i,a,n)}}}}catch(e){postMessage({error:{message:e.message},id:s.id,result:null})}}))})();'],{type:"application/javascript; charset=utf-8"}),t=URL.createObjectURL(e);return a=v(t),setTimeout(()=>URL.revokeObjectURL(t)),a};var SQ=(typeof window>"u"?"undefined":typeof window)=="object",S0={setTimeout:SQ?setTimeout.bind(window):setTimeout,clearTimeout:SQ?clearTimeout.bind(window):clearTimeout,setInterval:SQ?setInterval.bind(window):setInterval,clearInterval:SQ?clearInterval.bind(window):clearInterval},S1={},S2=class{name;closed=!1;mc=new MessageChannel;constructor(e){this.name=e,S1[e]=S1[e]||[],S1[e].push(this),this.mc.port1.start(),this.mc.port2.start(),this.onStorage=this.onStorage.bind(this),window.addEventListener("storage",this.onStorage)}onStorage(e){if(e.storageArea!==window.localStorage||e.key.substring(0,this.name.length)!==this.name||null===e.newValue)return;let t=JSON.parse(e.newValue);this.mc.port2.postMessage(t)}postMessage(e){if(this.closed)throw Error("InvalidStateError");let t=JSON.stringify(e),n=`${this.name}:${String(Date.now())}${String(Math.random())}`;window.localStorage.setItem(n,t),S0.setTimeout(()=>{window.localStorage.removeItem(n)},500),S1[this.name].forEach(e=>{e!==this&&e.mc.port2.postMessage(JSON.parse(t))})}close(){if(this.closed)return;this.closed=!0,this.mc.port1.close(),this.mc.port2.close(),window.removeEventListener("storage",this.onStorage);let e=S1[this.name].indexOf(this);S1[this.name].splice(e,1)}get onmessage(){return this.mc.port1.onmessage}set onmessage(e){this.mc.port1.onmessage=e}get onmessageerror(){return this.mc.port1.onmessageerror}set onmessageerror(e){this.mc.port1.onmessageerror=e}addEventListener(e,t){return this.mc.port1.addEventListener(e,t)}removeEventListener(e,t){return this.mc.port1.removeEventListener(e,t)}dispatchEvent(e){return this.mc.port1.dispatchEvent(e)}},S4=typeof window>"u"?void 0:"function"==typeof window.BroadcastChannel?window.BroadcastChannel:S2;function S3(){return Math.random().toString(36).substring(2)}var S5=class{options;channel;token=S3();isLeader=!1;isDead=!1;isApplying=!1;reApply=!1;intervals=[];listeners=[];deferred;constructor(e,t){this.channel=e,this.options=t,this.apply=this.apply.bind(this),this.awaitLeadership=this.awaitLeadership.bind(this),this.sendAction=this.sendAction.bind(this)}async apply(){if(this.isLeader||this.isDead)return!1;if(this.isApplying)return this.reApply=!0,!1;this.isApplying=!0;let e=!1,t=t=>{let{token:n,action:r}=t.data;n!==this.token&&(0===r&&n>this.token&&(e=!0),1===r&&(e=!0))};this.channel.addEventListener("message",t);try{return this.sendAction(0),await function(e=0){return new Promise(t=>S0.setTimeout(t,e))}(this.options.responseTime),this.channel.removeEventListener("message",t),this.isApplying=!1,e?!!this.reApply&&this.apply():(this.assumeLead(),!0)}catch{return!1}}awaitLeadership(){if(this.isLeader)return Promise.resolve();let e=!1,t=null;return new Promise(n=>{let r=()=>{if(e)return;e=!0;try{S0.clearInterval(t)}catch{}let r=this.intervals.indexOf(t);r>=0&&this.intervals.splice(r,1),this.channel.removeEventListener("message",i),n()};t=S0.setInterval(()=>{this.apply().then(()=>{this.isLeader&&r()})},this.options.fallbackInterval),this.intervals.push(t);let i=e=>{let{action:t}=e.data;2===t&&this.apply().then(()=>{this.isLeader&&r()})};this.channel.addEventListener("message",i)})}sendAction(e){this.channel.postMessage({action:e,token:this.token})}assumeLead(){this.isLeader=!0;let e=e=>{let{action:t}=e.data;0===t&&this.sendAction(1)};return this.channel.addEventListener("message",e),this.listeners.push(e),this.sendAction(1)}waitForLeadership(){return this.deferred||(this.deferred=this.awaitLeadership()),this.deferred}close(){if(!this.isDead){this.isDead=!0,this.isLeader=!1,this.sendAction(2);try{this.listeners.forEach(e=>this.channel.removeEventListener("message",e)),this.intervals.forEach(e=>S0.clearInterval(e))}catch{}}}},S6=class{channel;options;elector;token=S3();registry=new Map;allIdle=!1;isLastActive=!1;constructor(e){let{channelName:t}=e;this.options=e,this.channel=new S4(t),this.registry.set(this.token,1),e.leaderElection&&(this.elector=new S5(this.channel,{fallbackInterval:2e3,responseTime:100}),this.elector.waitForLeadership()),this.channel.addEventListener("message",e=>{let{action:t,token:n,data:r}=e.data;switch(t){case 3:this.registry.set(n,2);break;case 4:this.registry.delete(n);break;case 5:this.idle(n);break;case 6:this.active(n);break;case 7:this.prompt(n);break;case 8:this.start(n);break;case 9:this.reset(n);break;case 10:this.activate(n);break;case 11:this.pause(n);break;case 12:this.resume(n);break;case 13:this.options.onMessage(r)}}),this.send(3)}get isLeader(){if(!this.elector)throw Error('❌ Leader election is not enabled. To Enable it set the "leaderElection" property to true.');return this.elector.isLeader}prompt(e=this.token){this.registry.set(e,0);let t=[...this.registry.values()].every(e=>0===e);e===this.token&&this.send(7),t&&this.options.onPrompt()}idle(e=this.token){this.registry.set(e,2);let t=[...this.registry.values()].every(e=>2===e);e===this.token&&this.send(5),!this.allIdle&&t&&(this.allIdle=!0,this.options.onIdle())}active(e=this.token){this.allIdle=!1,this.registry.set(e,1);let t=[...this.registry.values()].some(e=>1===e);e===this.token&&this.send(6),t&&this.options.onActive(),this.isLastActive=e===this.token}start(e=this.token){this.allIdle=!1,this.registry.set(e,1),e===this.token?this.send(8):this.options.start(!0),this.isLastActive=e===this.token}reset(e=this.token){this.allIdle=!1,this.registry.set(e,1),e===this.token?this.send(9):this.options.reset(!0),this.isLastActive=e===this.token}activate(e=this.token){this.allIdle=!1,this.registry.set(e,1),e===this.token?this.send(10):this.options.activate(!0),this.isLastActive=e===this.token}pause(e=this.token){e===this.token?this.send(11):this.options.pause(!0)}resume(e=this.token){e===this.token?this.send(12):this.options.resume(!0)}message(e){try{this.channel.postMessage({action:13,token:this.token,data:e})}catch{}}send(e){try{this.channel.postMessage({action:e,token:this.token})}catch{}}close(){this.options.leaderElection&&this.elector.close(),this.send(4),this.channel.close()}},S8=SQ?document:null,S7=["mousemove","keydown","wheel","DOMMouseScroll","mousewheel","mousedown","touchstart","touchmove","MSPointerDown","MSPointerMove","visibilitychange","focus"];function S9(e,t){let n=0;return function(...r){let i=new Date().getTime();if(!(i-nDate.now();function _t(e){let{route:t}=e,n=(0,fY.Nf)({route:t,config:{swr:{refreshInterval:3e4}}});return{isConnected:!n.error,isValidating:n.isValidating}}function _n(e){let{appName:t,title:n,navTitle:r,profile:i,size:o="4",banner:a,nav:s,actions:l,stats:u,children:c,sidenav:d,connectivityRoute:f,isSynced:h,showWallet:p,walletBalance:m,routes:v,scroll:g=!0,openSettings:x}=e,{lock:w,settings:j}=(0,fY.Hv)();return!function(e){let{lock:t,route:n,routes:r}=e,{isConnected:i,isValidating:o}=_t({route:n}),{settings:a}=(0,fY.Hv)(),s=(0,SO.useRouter)();(0,b.useEffect)(()=>{if(o)return;let e=!s.asPath.startsWith(r.login),n=!a.password||!i;if(e&&n){t();return}},[s,a.password,i,o])}({lock:w,route:f,routes:v}),!function(e){let{enabled:t,lock:n,lockTimeout:r}=e,i=(0,b.useCallback)(()=>{n()},[n]);!function({timeout:e=12e5,promptTimeout:t=0,promptBeforeIdle:n=0,element:r=S8,events:i=S7,timers:o,immediateEvents:a=[],onPresenceChange:s=()=>{},onPrompt:l=()=>{},onIdle:u=()=>{},onActive:c=()=>{},onAction:d=()=>{},onMessage:f=()=>{},debounce:h=0,throttle:p=0,eventsThrottle:m=200,startOnMount:v=!0,startManually:g=!1,stopOnIdle:y=!1,crossTab:x=!1,name:w="idle-timer",syncTimers:j=0,leaderElection:E=!1,disabled:k=!1}={}){let S=(0,b.useRef)(_e()),_=(0,b.useRef)(_e()),C=(0,b.useRef)(null),O=(0,b.useRef)(null),M=(0,b.useRef)(0),T=(0,b.useRef)(0),A=(0,b.useRef)(0),P=(0,b.useRef)(0),N=(0,b.useRef)(!1),R=(0,b.useRef)(!1),D=(0,b.useRef)(!1),L=(0,b.useRef)(!0),F=(0,b.useRef)(!1),z=(0,b.useRef)(null),V=(0,b.useRef)(null),I=(0,b.useRef)(e),Z=(0,b.useRef)(0);(0,b.useEffect)(()=>{if(t&&console.warn("⚠️ IdleTimer -- The `promptTimeout` property has been deprecated in favor of `promptBeforeIdle`. It will be removed in the next major release."),n&&t)throw Error("❌ Both promptTimeout and promptBeforeIdle can not be set. The promptTimeout property will be deprecated in a future version.");if(e>=2147483647)throw Error(`\u274C The value for the timeout property must fit in a 32 bit signed integer, 2147483647.`);if(t>=2147483647)throw Error(`\u274C The value for the promptTimeout property must fit in a 32 bit signed integer, 2147483647.`);if(n>=2147483647)throw Error(`\u274C The value for the promptBeforeIdle property must fit in a 32 bit signed integer, 2147483647.`);if(n>=e)throw Error(`\u274C The value for the promptBeforeIdle property must be less than the timeout property, ${e}.`);if(n?(I.current=e-n,Z.current=n):(I.current=e,Z.current=t),!L.current){if(g||k)return;N.current&&(G.current(null,eA),V.current&&V.current.active()),ed()}},[e,t,n,g,k]);let B=(0,b.useRef)(y);(0,b.useEffect)(()=>{B.current=y},[y]);let H=(0,b.useRef)(a),U=(0,b.useRef)(r),W=(0,b.useRef)([...new Set([...i,...a]).values()]),q=(0,b.useRef)(k);(0,b.useEffect)(()=>{q.current=k,!L.current&&(k?ep():g||ed())},[k]);let $=(0,b.useRef)(s);(0,b.useEffect)(()=>{$.current=s},[s]);let K=(0,b.useRef)(l);(0,b.useEffect)(()=>{K.current=l},[l]);let Y=(0,b.useRef)(u);(0,b.useEffect)(()=>{Y.current=u},[u]);let G=(0,b.useRef)(c);(0,b.useEffect)(()=>{G.current=c},[c]);let X=(0,b.useRef)(d);(0,b.useEffect)(()=>{X.current=d},[d]);let J=(0,b.useRef)(f);(0,b.useEffect)(()=>{J.current=f},[f]);let Q=(0,b.useMemo)(()=>{let e=(e,t)=>X.current(e,t);return h>0?function(e,t){let n;function r(...i){n&&clearTimeout(n),n=setTimeout(()=>{e(...i),n=null},t)}return r.cancel=function(){clearTimeout(n)},r}(e,h):p>0?S9(e,p):e},[p,h]),ee=(0,b.useRef)();(0,b.useEffect)(()=>{x&&j&&(ee.current=S9(()=>{V.current.active()},j))},[x,j]);let et=()=>{null!==z.current&&(S0.clearTimeout(z.current),z.current=null)},en=(e,t=!0)=>{et(),z.current=S0.setTimeout(ea,e||I.current),t&&(O.current=_e())},er=e=>{R.current||N.current||(K.current(e,eA),$.current({type:"active",prompted:!0},eA)),P.current=0,A.current=_e(),R.current=!0,en(Z.current,!1)},ei=()=>{et(),N.current||(Y.current(null,eA),$.current({type:"idle"},eA)),N.current=!0,C.current=_e(),B.current?ec():R.current&&(A.current=0,R.current=!1)},eo=e=>{et(),(N.current||R.current)&&(G.current(e,eA),$.current({type:"active",prompted:!1},eA)),R.current=!1,A.current=0,N.current=!1,M.current+=_e()-C.current,T.current+=_e()-C.current,eu(),en()},ea=e=>{if(!N.current){Q.cancel&&Q.cancel();let t=_e()-O.current;if(!(I.current+Z.current0&&!R.current){V.current?V.current.prompt():er(e);return}V.current?V.current.idle():ei();return}V.current?V.current.active():eo(e)},es=e=>{if(v||O.current||(O.current=_e(),G.current(null,eA)),Q(e,eA),R.current)return;if(et(),!N.current&&H.current.includes(e.type)){ea(e);return}let t=_e()-O.current;if(N.current&&!y||!N.current&&t>=I.current){ea(e);return}D.current=!1,P.current=0,A.current=0,en(),x&&j&&ee.current()},el=(0,b.useRef)(es);(0,b.useEffect)(()=>{let e=F.current;e&&ec(),m>0?el.current=S9(es,m):el.current=es,e&&eu()},[m,p,h,X,x,j]);let eu=()=>{SQ&&U.current&&(F.current||(W.current.forEach(e=>{U.current.addEventListener(e,el.current,{capture:!0,passive:!0})}),F.current=!0))},ec=(e=!1)=>{SQ&&U.current&&(F.current||e)&&(W.current.forEach(e=>{U.current.removeEventListener(e,el.current,{capture:!0})}),F.current=!1)},ed=(0,b.useCallback)(e=>!q.current&&(et(),eu(),N.current=!1,R.current=!1,D.current=!1,P.current=0,A.current=0,V.current&&!e&&V.current.start(),en(),!0),[z,N,q,I,V]),ef=(0,b.useCallback)(e=>!q.current&&(et(),eu(),_.current=_e(),M.current+=_e()-C.current,T.current+=_e()-C.current,M.current=0,N.current=!1,R.current=!1,D.current=!1,P.current=0,A.current=0,V.current&&!e&&V.current.reset(),g||en(),!0),[z,N,I,g,q,V]),eh=(0,b.useCallback)(e=>!q.current&&(et(),eu(),(N.current||R.current)&&eo(),N.current=!1,R.current=!1,D.current=!1,P.current=0,A.current=0,_.current=_e(),V.current&&!e&&V.current.activate(),en(),!0),[z,N,R,q,I,V]),ep=(0,b.useCallback)((e=!1)=>!q.current&&!D.current&&(P.current=ej(),D.current=!0,ec(),et(),V.current&&!e&&V.current.pause(),!0),[z,q,V]),em=(0,b.useCallback)((e=!1)=>!q.current&&!!D.current&&(D.current=!1,R.current||eu(),N.current||en(P.current),A.current&&(A.current=_e()),V.current&&!e&&V.current.resume(),!0),[z,I,q,P,V]),ev=(0,b.useCallback)((e,t)=>(V.current?(t&&J.current(e,eA),V.current.message(e)):t&&J.current(e,eA),!0),[f]),eg=(0,b.useCallback)(()=>N.current,[N]),ey=(0,b.useCallback)(()=>R.current,[R]),eb=(0,b.useCallback)(()=>V.current?V.current.isLeader:null,[V]),ex=(0,b.useCallback)(()=>V.current?V.current.isLastActive:null,[V]),ew=(0,b.useCallback)(()=>V.current?V.current.token:null,[V]),ej=(0,b.useCallback)(()=>{if(D.current)return P.current;let e=Math.floor((P.current?P.current:Z.current+I.current)-(O.current?_e()-O.current:0));return e<0?0:Math.abs(e)},[I,Z,R,P,O]),eE=(0,b.useCallback)(()=>Math.round(_e()-_.current),[_]),ek=(0,b.useCallback)(()=>Math.round(_e()-S.current),[S]),eS=(0,b.useCallback)(()=>C.current?new Date(C.current):null,[C]),e_=(0,b.useCallback)(()=>O.current?new Date(O.current):null,[O]),eC=(0,b.useCallback)(()=>N.current?Math.round(_e()-C.current+M.current):Math.round(M.current),[C,M]),eO=(0,b.useCallback)(()=>N.current?Math.round(_e()-C.current+T.current):Math.round(T.current),[C,T]),eM=(0,b.useCallback)(()=>{let e=Math.round(eE()-eC());return e>=0?e:0},[C,M]),eT=(0,b.useCallback)(()=>{let e=Math.round(ek()-eO());return e>=0?e:0},[C,M]);(0,b.useEffect)(()=>{if(h>0&&p>0)throw Error("❌ onAction can either be throttled or debounced, not both.");o&&(S0.setTimeout=o.setTimeout,S0.clearTimeout=o.clearTimeout,S0.setInterval=o.setInterval,S0.clearInterval=o.clearInterval);let e=()=>{V.current&&V.current.close(),Q.cancel&&Q.cancel(),et(),ec(!0)};return SQ&&window.addEventListener("beforeunload",e),()=>{SQ&&window.removeEventListener("beforeunload",e),V.current&&V.current.close(),Q.cancel&&Q.cancel(),et(),ec(!0)}},[]),(0,b.useEffect)(()=>{V.current&&V.current.close(),x?V.current=new S6({channelName:w,leaderElection:E,onPrompt:()=>{er()},onIdle:()=>{ei()},onActive:()=>{eo()},onMessage:e=>{J.current(e,eA)},start:ed,reset:ef,activate:eh,pause:ep,resume:em}):V.current=null},[x,w,E,K,Y,G,J,ed,ef,ep,em]),(0,b.useEffect)(()=>{L.current||(et(),ec(!0)),g||k||(v?ed():eu())},[g,v,k,L]),(0,b.useEffect)(()=>{if(!L.current){let e=[...new Set([...i,...a]).values()];ec(),W.current=e,U.current=r,H.current=a,g||k||(v?ed():eu())}},[r,JSON.stringify(i),JSON.stringify(a),L,k,g,v]),(0,b.useEffect)(()=>{L.current&&(L.current=!1)},[L]);let eA={message:ev,start:ed,reset:ef,activate:eh,pause:ep,resume:em,isIdle:eg,isPrompted:ey,isLeader:eb,isLastActiveTab:ex,getTabId:ew,getRemainingTime:ej,getElapsedTime:eE,getTotalElapsedTime:ek,getLastIdleTime:eS,getLastActiveTime:e_,getIdleTime:eC,getTotalIdleTime:eO,getActiveTime:eM,getTotalActiveTime:eT,setOnPresenceChange:e=>{s=e,$.current=e},setOnPrompt:e=>{l=e,K.current=e},setOnIdle:e=>{u=e,Y.current=e},setOnActive:e=>{c=e,G.current=e},setOnAction:e=>{d=e,X.current=e},setOnMessage:e=>{f=e,J.current=e}}}({disabled:!t,onIdle:i,timeout:r,throttle:5e3,eventsThrottle:5e3})}({enabled:!!j.autoLock,lockTimeout:j.autoLockTimeout,lock:w}),(0,y.jsxs)(SF,{appName:t,title:n,children:[(0,y.jsx)(SN,{}),(0,y.jsxs)("div",{className:"flex flex-col h-full w-full",children:[a,(0,y.jsxs)("div",{className:"flex flex-1 w-full overflow-hidden",children:[(0,y.jsx)(SH,{routes:v,profile:i,openSettings:x,lock:w,showWallet:p,walletBalance:m,isSynced:h,children:d}),(0,y.jsxs)("div",{className:"flex flex-col flex-1 overflow-hidden",children:[(0,y.jsx)(SA,{title:void 0===r?n:r,nav:s,actions:l,stats:u}),g?(0,y.jsx)(ul,{className:"z-0",children:(0,y.jsx)(lL,{size:o,pad:!1,children:(0,y.jsx)("div",{className:"flex flex-col gap-5",children:c})})}):(0,y.jsx)(lL,{size:o,pad:!1,className:"flex-1 flex flex-col gap-5 overflow-hidden",children:c})]})]})]})]})}function _r(e,t,n,r){let[i,o]=(0,b.useState)();return(0,b.useEffect)(()=>{!t&&e&&o(e.length)},[t,e,o]),(0,b.useMemo)(()=>n?"error":void 0===i||i>0&&!e?"loading":0===i?0===r.length?"noneYet":"noneMatchingFilters":void 0,[e,i,n,r])}function _i(e){let{filtered:t}=e;return(0,y.jsxs)("div",{className:"flex flex-col gap-8 justify-center items-center h-[300px]",children:[(0,y.jsx)(t1,{children:(0,y.jsx)(lc.Hb6,{className:"scale-[200%]"})}),(0,y.jsx)(t1,{color:"subtle",className:"text-center max-w-[500px]",children:t?"No matching alerts.":"There are currently no alerts."})]})}(0,b.createContext)(null).Consumer;let _o=[];function _a(e){let{open:t,onOpenChange:n,dismissOne:r,dismissMany:i,alerts:o,dataFieldOrder:a,dataFields:s}=e,l=_r(o.data,o.isValidating,o.error,_o),[u,c]=(0,b.useState)(),d=(0,b.useMemo)(()=>{var e;return(null===(e=o.data)||void 0===e?void 0:e.filter(e=>!u||e.severity===u))||[]},[o.data,u]),f=(0,b.useCallback)(e=>{let t=Object.keys(e).sort((e,t)=>{let n=a.indexOf(e),r=a.indexOf(t);return -1===n&&-1===r?0:-1===n?1:-1===r?-1:n-r});return t},[a]);return(0,y.jsx)(ud,{open:t,onOpenChange:e=>{n(e)},contentVariants:{className:"w-[500px] h-[80vh]"},title:(0,y.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,y.jsxs)(c2,{size:"20",children:["Alerts ",o.data?"(".concat(o.data.length,")"):""]}),(0,y.jsxs)("div",{className:"flex gap-1",children:[(0,y.jsx)(lu,{variant:"info"===u?"accent":"gray",onClick:()=>"info"===u?c(void 0):c("info"),children:"info"}),(0,y.jsx)(lu,{variant:"warning"===u?"accent":"gray",onClick:()=>"warning"===u?c(void 0):c("warning"),children:"warning"}),(0,y.jsx)(lu,{variant:"error"===u?"accent":"gray",onClick:()=>"error"===u?c(void 0):c("error"),children:"error"}),(0,y.jsx)(lu,{variant:"critical"===u?"accent":"gray",onClick:()=>"critical"===u?c(void 0):c("critical"),children:"critical"}),(0,y.jsx)("div",{className:"flex-1"}),!l&&!!d.length&&(0,y.jsxs)(lu,{tip:u?"dismiss ".concat(d.length):"dismiss all",onClick:()=>i(d.map(e=>e.id),u),children:[(0,y.jsx)(lc.NlZ,{}),d.length>0?" ".concat(d.length):""]})]})]}),children:(0,y.jsxs)("div",{className:(0,em.cx)("flex flex-col overflow-hidden -m-4","border-t border-gray-200 dark:border-graydark-300"),children:["noneYet"===l&&(0,y.jsx)(_i,{filtered:!1}),"error"===l&&(0,y.jsx)("div",{className:(0,em.cx)("flex items-center justify-center h-[100px]",_u()),children:(0,y.jsx)(t1,{size:"18",color:"subtle",children:o.error.message})}),"loading"===l&&(0,y.jsx)(_l,{}),!l&&(0,y.jsx)("div",{className:"flex flex-col",children:d.length?d.map(e=>(0,y.jsxs)("div",{className:(0,em.cx)("flex flex-col gap-1 w-full p-4","border-t border-gray-200 dark:border-graydark-300","first:border-none"),children:[(0,y.jsxs)("div",{className:"flex justify-between gap-1 w-full",children:[(0,y.jsx)("div",{className:"flex-1 overflow-hidden",children:(0,y.jsxs)(t1,{weight:"medium",className:"w-full",children:[e.severity,": ",e.message]})}),(0,y.jsx)(lu,{tip:"Dismiss alert",onClick:()=>r(e.id),children:(0,y.jsx)(lc.NlZ,{})})]}),(0,y.jsxs)("div",{className:"flex justify-between w-full",children:[(0,y.jsx)(t1,{color:"subtle",ellipsis:!0,children:"timestamp"}),(0,y.jsx)(t1,{color:"contrast",ellipsis:!0,children:(0,vS.rN)(e.timestamp,{timeStyle:"medium"})})]}),f(e.data).map(t=>{var n;let r=e.data[t];if(null==r||"object"==typeof r&&!Object.keys(r).length)return null;let i=(null==s?void 0:null===(n=s[t])||void 0===n?void 0:n.render)||_s;return(0,y.jsx)(i,{label:t,value:r},t)})]},e.id)):(0,y.jsx)(_i,{filtered:!!u})})]})})}function _s(e){let{label:t,value:n}=e;return(0,y.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,y.jsx)(t1,{color:"subtle",children:t}),(0,y.jsx)(t1,{color:"contrast",ellipsis:!0,children:String(n)})]})}function _l(){return(0,y.jsx)(y.Fragment,{children:So()(10,e=>(0,y.jsx)("div",{className:(0,em.cx)("relative flex gap-4 p-3.5",_u()),children:(0,y.jsxs)("div",{className:"flex flex-col gap-2 w-full",children:[(0,y.jsxs)("div",{className:"flex justify-between gap-2 w-full",children:[(0,y.jsx)(f8,{className:"w-[160px] h-[20px]"}),(0,y.jsx)(f8,{className:"w-[160px] h-[20px]"})]}),(0,y.jsx)(f8,{className:"w-[100px] h-[20px]"}),(0,y.jsx)(f8,{className:"w-full h-[120px]"})]})},e))})}function _u(){return(0,em.cx)("border-t border-gray-200 dark:border-graydark-300","first:border-none")}var _c=n(89644),_d=n.n(_c),_f=n(63955),_h=n(45861),_p=n.n(_h);function _m(e){let{form:t,field:n,name:r}=e,i=t.watch(r),o=t.formState.touchedFields[r]&&!!t.formState.errors[r],{ref:a,onChange:s,onBlur:l}=t.register(r,n.validation),u=(0,b.useCallback)(e=>{var r;s(e),null===(r=n.trigger)||void 0===r||r.forEach(e=>t.trigger(e))},[s,t,n]),c=(0,b.useCallback)((e,i)=>{var o;t.setValue(r,e,"boolean"==typeof i?i?{shouldValidate:!0,shouldDirty:!0,shouldTouch:!0}:void 0:i),null===(o=n.trigger)||void 0===o||o.forEach(e=>t.trigger(e))},[r,t,n]);return{ref:a,name:r,value:i,error:o,onBlur:l,onChange:u,setValue:c}}function _v(e){return(0,b.useCallback)(t=>{kG(_p()(t).map(t=>{let[n,r]=t;return"".concat(e[n].title||n,": ").concat(null==r?void 0:r.message)}).join(", "))},[e])}function _g(e){let{name:t,form:n,fields:r,size:i="small",autoComplete:o,spellCheck:a,state:s=!0,group:l=!0}=e,u=r[t],{ref:c,onChange:d,onBlur:f,error:h}=_m({name:t,form:n,field:u}),p=(0,y.jsx)(fE,{ref:c,name:t,placeholder:u.placeholder,size:i,autoComplete:o,type:u.type,readOnly:u.readOnly,spellCheck:a,onClick:u.onClick,state:s?h?"invalid":n.formState.dirtyFields[t]?"valid":"default":"default",onChange:d,onBlur:f});return l?(0,y.jsx)(Sy,{title:u.title,actions:u.actions,name:t,form:n,children:p}):p}var _y=n(829),_b=n.n(_y);async function _x(e){let{api:t,route:n,password:r}=e;try{return await _d().get("".concat(t,"/api").concat(n),{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Basic "+btoa(":".concat(r))},timeout:1e4}),{}}catch(n){let e=n.code,t=n.response;if((null==t?void 0:t.status)===504)return{error:"Error, check that daemon is running"};if((null==t?void 0:t.status)===401)return{error:"Error, wrong password"};if("ECONNABORTED"===e)return{error:"Error, daemon did not respond"};return{error:"Error, something went wrong"}}}function _w(e){let{appName:t,route:n,routes:r}=e,i=(0,SO.useRouter)(),{settings:o,setSettings:a}=(0,fY.Hv)(),{allowCustomApi:s}=o,l=(0,b.useMemo)(()=>({api:o.api,password:""}),[o.api]),u=(0,_f.cI)({mode:"onBlur",defaultValues:l});(0,b.useEffect)(()=>{u.clearErrors()},[s]);let c=(0,b.useCallback)(async e=>{let t="";if(s){let n=new URL(e.api);t="".concat(n.protocol,"//").concat(n.host)}let{error:c}=await _x({api:t,route:n,password:e.password});c?u.setError("password",{message:c}):(a({api:t,password:e.password,recentApis:{...o.recentApis,[t]:{lastUsed:new Date().getTime()}}}),i.push(i.query.prev?decodeURIComponent(i.query.prev):r.home),u.reset(l))},[s,u,i,r,o,a,l,n]),d=function(e){let{allowCustomApi:t}=e;return{api:{type:"text",title:"API",placeholder:"http://127.0.0.1:9980",validation:{validate:{required:e=>!t||!!e||"API is required",url:e=>{try{let t=new URL(e);return!!t.protocol&&!!t.host||"invalid API URL"}catch(e){return"invalid API URL"}},https:e=>{let t="https:"===window.location.protocol;return!t||t&&e.startsWith("https")||"API must use HTTPS"}}}},password:{type:"password",title:"Password",placeholder:"Enter password",validation:{required:"password is required"}}}}({allowCustomApi:s}),f=_v(d),h=u.formState.errors.api||u.formState.errors.password,p=_b()(Object.entries(o.recentApis),e=>{let[t,{lastUsed:n}]=e;return-n}).map(e=>{let[t]=e;return t});return(0,y.jsx)("div",{className:"flex flex-col items-center justify-center gap-6 h-full",children:(0,y.jsx)(t3,{className:"relative top-[-50px] w-[300px] p-2.5",children:(0,y.jsxs)("div",{className:"flex flex-col justify-between h-full",children:[(0,y.jsxs)("div",{className:"flex justify-between items-center",children:[(0,y.jsx)(t1,{font:"mono",weight:"bold",size:"20",children:t}),(0,y.jsx)(cK,{trigger:(0,y.jsx)(lu,{icon:"hover",variant:"ghost",children:(0,y.jsx)(lc.shL,{})}),children:(0,y.jsx)(cY,{onSelect:()=>a({allowCustomApi:!s}),children:s?"Hide custom API":"Show custom API"})})]}),(0,y.jsx)(cF,{className:"w-full mt-2 mb-3"}),(0,y.jsx)("form",{onSubmit:u.handleSubmit(c,f),children:(0,y.jsxs)("div",{className:"flex flex-col gap-1.5",children:[s?(0,y.jsxs)(lR,{children:[(0,y.jsx)(_g,{name:"api",form:u,fields:d,group:!1}),p.length>1&&(0,y.jsx)(cK,{trigger:(0,y.jsx)(lu,{type:"button",children:(0,y.jsx)(lc.wGX,{})}),children:p.map(e=>(0,y.jsx)(cY,{onSelect:()=>u.setValue("api",e),children:e},e))})]}):null,(0,y.jsx)(_g,{name:"password",form:u,fields:d,group:!1}),h&&(0,y.jsx)(t1,{size:"14",color:"red",children:h.message}),(0,y.jsx)(Sb,{size:"small",form:u,children:"Unlock"})]})})]})})})}var _j=n(9156),_E=n(24511);let _k={address:"",siacoin:void 0,includeFee:!1},_S=_E.Ry().shape({address:_E.Z_().required("Required"),siacoin:_E.Z_().required("Required").test("greater than zero","Must be greater than zero",e=>!new(fW())(e||0).isZero())});function __(e){let{address:t,siacoin:n,fee:r,transactionId:i}=e,o=n.plus(r);return(0,y.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,y.jsxs)("div",{className:"flex gap-6 justify-between items-center",children:[(0,y.jsx)(t1,{color:"verySubtle",noWrap:!0,children:"Address"}),(0,y.jsx)(k9,{value:t,type:"address"})]}),(0,y.jsxs)("div",{className:"flex gap-2 justify-between items-center",children:[(0,y.jsx)(t1,{color:"verySubtle",noWrap:!0,children:"Amount"}),(0,y.jsx)("div",{className:"flex relative top-[-0.5px]",children:(0,y.jsx)(Sn,{size:"14",value:n,variant:"value",dynamicUnits:!1})})]}),(0,y.jsxs)("div",{className:"flex gap-2 justify-between items-center",children:[(0,y.jsx)(t1,{color:"verySubtle",noWrap:!0,children:"Network fee"}),(0,y.jsx)("div",{className:"flex relative top-[-0.5px]",children:(0,y.jsx)(Sn,{size:"14",value:r,variant:"value",dynamicUnits:!1})})]}),(0,y.jsxs)("div",{className:"flex items-center gap-2 justify-between",children:[(0,y.jsx)(t1,{color:"verySubtle",noWrap:!0,children:"Total"}),(0,y.jsx)("div",{className:"flex relative top-[-0.5px]",children:(0,y.jsx)(Sn,{size:"14",value:o,variant:"value",dynamicUnits:!1})})]}),i&&(0,y.jsxs)("div",{className:"flex gap-6 items-center justify-between",children:[(0,y.jsx)(t1,{color:"verySubtle",noWrap:!0,children:"Transaction ID"}),(0,y.jsx)(k9,{value:i,type:"transaction"})]})]})}function _C(e){let{activeStep:t,steps:n,onChange:r}=e,i=n.findIndex(e=>e.id===t),o=n.length-1;return(0,y.jsxs)("div",{className:"relative w-full mt-8 mb-3",children:[(0,y.jsx)("div",{className:"absolute w-full h-1 bg-gray-500 dark:bg-graydark-500 rounded-lg"}),(0,y.jsx)("div",{className:"absolute h-1 bg-accent-800 dark:bg-accentdark-800 rounded-lg",style:{width:"".concat(i/o*100,"%")}}),n.map((e,n)=>{let{id:a,label:s}=e,l=t===a,u=i>=n,c=n===o,d=0===n,f=u&&i!==o;return(0,y.jsxs)("div",{className:(0,em.cx)("absolute h-2 w-2 -top-0.5",f?"cursor-pointer":"cursor-default"),style:{left:"calc(".concat(n/o*100,"% - ").concat(c?8:d?0:4,"px)")},onClick:()=>{f&&r(a)},children:[(0,y.jsx)(t1,{color:l?"contrast":"verySubtle",className:(0,em.cx)("absolute top-[-30px]",d?"left-0":"",c?"right-0":"",d||c?"":"-translate-x-1/2"),noWrap:!0,children:s}),(0,y.jsx)("div",{className:(0,em.cx)("absolute left-0 top-0 h-full w-full rounded-lg border",u?"bg-accent-800 dark-accentdark-800":"bg-gray-500 dark:bg-graydark-500",u?"border-accent-900 dark:border-accentdark-900":"border-gray-600 dark:border-graydark-600")}),l&&(0,y.jsx)("div",{className:"absolute left-0 top-0 h-full w-full rounded-lg bg-accent-800 dark:bg-accentdark-800 animate-pingslow"})]},a)})]})}function _O(e){let{data:{address:t,siacoin:n},fee:r,transactionId:i}=e;return(0,y.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,y.jsx)(__,{address:t,siacoin:n,fee:r,transactionId:i}),(0,y.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 my-4",children:[(0,y.jsx)(t1,{children:(0,y.jsx)(lc.Z$8,{})}),(0,y.jsx)(t1,{children:"Transaction successfully broadcasted."})]})]})}let _M=(0,vS.qN)(.00393),_T={address:"",siacoin:new(fW())(0),includeFee:!1};function _A(e){let{trigger:t,open:n,onOpenChange:r,balance:i,send:o}=e,[a,s]=(0,b.useState)("setup"),[l,u]=(0,b.useState)(),[c,d]=(0,b.useState)(_T),f=function(e){let{balance:t,fee:n,onComplete:r}=e,i=(0,_j.TA)({initialValues:_k,validationSchema:_S,onSubmit:async e=>{if(!e.siacoin)return;let o=e.includeFee?(0,vS.qN)(e.siacoin).minus(n):(0,vS.qN)(e.siacoin);if(t){if(t.isLessThan((0,vS.qN)(e.siacoin).plus(n))){i.setStatus({error:"Not enough funds in wallet."});return}i.setStatus({}),r({includeFee:e.includeFee,address:e.address,siacoin:o})}}}),o=(0,vS.qN)(i.values.siacoin||0),a=(0,y.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,y.jsx)(Sx,{formik:i,variants:{size:"medium"},title:"Address",name:"address",placeholder:"e3b1050aef388438668b52983cf78f40925af8f0aa8b9de80c18eadcefce8388d168a313e3f2",autoComplete:"off",type:"text"}),(0,y.jsx)(Sx,{formik:i,title:"Siacoin",name:"siacoin",placeholder:"100",type:"siacoin"}),(0,y.jsxs)("div",{className:"flex items-center",children:[(0,y.jsx)(hd,{name:"includeFee",onCheckedChange:e=>i.setFieldValue("includeFee",e),children:"Include fee"}),(0,y.jsx)(f0,{children:"Include or exclude the network fee from the above transaction value."}),(0,y.jsx)("div",{className:"flex flex-1"})]}),(0,y.jsxs)("div",{className:"flex flex-col gap-2 my-1",children:[(0,y.jsxs)("div",{className:"flex gap-2 justify-between items-center",children:[(0,y.jsx)(t1,{color:"verySubtle",children:"Network fee"}),(0,y.jsx)("div",{className:"flex relative top-[-0.5px]",children:(0,y.jsx)(Sn,{size:"14",value:n,variant:"value",dynamicUnits:!1})})]}),(0,y.jsxs)("div",{className:"flex justify-between gap-2 items-center",children:[(0,y.jsx)(t1,{color:"verySubtle",children:"Total"}),(0,y.jsx)("div",{className:"flex relative top-[-0.5px]",children:(0,y.jsx)(Sn,{size:"14",value:i.values.includeFee?o:o.plus(n),variant:"value",dynamicUnits:!1})})]})]})]});return{formik:i,form:a}}({balance:i,fee:_M,onComplete:e=>{d(e),s("confirm")}}),h=function(e){let{send:t,formData:n,fee:r,onConfirm:i}=e,{address:o,siacoin:a}=n||{},s=(0,_j.TA)({initialValues:{},onSubmit:async()=>{let{transactionId:e,error:n}=await t({address:o,sc:a});if(n){s.setStatus({error:n});return}i({transactionId:e})}}),l=(0,y.jsx)("div",{className:"flex flex-col gap-4",children:(0,y.jsx)(__,{address:o,siacoin:a,fee:r})});return{form:l,formik:s}}({fee:_M,formData:c,send:o,onConfirm:e=>{let{transactionId:t}=e;u(t),s("done")}}),p=(0,b.useMemo)(()=>"setup"===a?{submitLabel:"Generate transaction",formik:f.formik}:"confirm"===a?{submitLabel:"Broadcast transaction",formik:h.formik}:void 0,[a,f,h]);return(0,y.jsx)(ud,{trigger:t,open:n,onOpenChange:e=>{e||(f.formik.resetForm(),h.formik.resetForm(),s("setup")),r(e)},title:"Send siacoin",onSubmit:p?p.formik.handleSubmit:void 0,controls:p&&(0,y.jsx)("div",{className:"flex flex-col gap-1",children:(0,y.jsx)(S_,{formik:p.formik,children:p.submitLabel})}),contentVariants:{className:"w-[400px]"},children:(0,y.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,y.jsx)(_C,{onChange:e=>s(e),activeStep:a,steps:[{id:"setup",label:"Setup"},{id:"confirm",label:"Confirm"},{id:"done",label:"Complete"}]}),(0,y.jsx)(cF,{className:"w-full mt-4"}),"setup"===a&&f.form,"confirm"===a&&h.form,"done"===a&&(0,y.jsx)(_O,{data:c,fee:_M,transactionId:l})]})})}let _P="[a-fA-F\\d:]",_N=e=>e&&e.includeBoundaries?"(?:(?<=\\s|^)(?=".concat(_P,")|(?<=").concat(_P,")(?=\\s|$))"):"",_R="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",_D="[a-fA-F\\d]{1,4}",_L="\n(?:\n(?:".concat(_D,":){7}(?:").concat(_D,"|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8\n(?:").concat(_D,":){6}(?:").concat(_R,"|:").concat(_D,"|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4\n(?:").concat(_D,":){5}(?::").concat(_R,"|(?::").concat(_D,"){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4\n(?:").concat(_D,":){4}(?:(?::").concat(_D,"){0,1}:").concat(_R,"|(?::").concat(_D,"){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4\n(?:").concat(_D,":){3}(?:(?::").concat(_D,"){0,2}:").concat(_R,"|(?::").concat(_D,"){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4\n(?:").concat(_D,":){2}(?:(?::").concat(_D,"){0,3}:").concat(_R,"|(?::").concat(_D,"){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4\n(?:").concat(_D,":){1}(?:(?::").concat(_D,"){0,4}:").concat(_R,"|(?::").concat(_D,"){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4\n(?::(?:(?::").concat(_D,"){0,5}:").concat(_R,"|(?::").concat(_D,"){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4\n)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1\n").replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),_F=new RegExp("(?:^".concat(_R,"$)|(?:^").concat(_L,"$)")),_z=new RegExp("^".concat(_R,"$")),_V=new RegExp("^".concat(_L,"$")),_I=e=>e&&e.exact?_F:RegExp("(?:".concat(_N(e)).concat(_R).concat(_N(e),")|(?:").concat(_N(e)).concat(_L).concat(_N(e),")"),"g");_I.v4=e=>e&&e.exact?_z:RegExp("".concat(_N(e)).concat(_R).concat(_N(e)),"g"),_I.v6=e=>e&&e.exact?_V:RegExp("".concat(_N(e)).concat(_L).concat(_N(e)),"g");let _Z=()=>RegExp("^(((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]).){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))|((([a-zA-Z]|[a-zA-Z][a-zA-Z0-9-]*[a-zA-Z0-9]).)+([A-Za-z|[A-Za-z][A-Za-z0-9‌​-]*[A-Za-z0-9])))$","g"),_B={port:9981,ip:""},_H=_E.Ry().shape({port:_E.Rx().required("Required").min(0,"Out of valid range").max(65535,"Out of valid range"),ip:_E.Z_().required("Required").test("ip","Invalid hostname or IP address",e=>_Z().test(e||""))});function _U(e){let{trigger:t,open:n,connect:r,onOpenChange:i}=e,o=(0,_j.TA)({initialValues:_B,validationSchema:_H,onSubmit:async(e,t)=>{let n="".concat(e.ip,":").concat(e.port),o=await r(n);if(o.error){let e=o.error.replace("invalid peer address: address ".concat(n,":"),"");t.setStatus({error:e})}else k$("Connected to peer"),t.resetForm(),i(!1)}});return(0,y.jsx)(ud,{trigger:t,title:"Connect peer",open:n,onOpenChange:e=>{e||o.resetForm(),i(e)},contentVariants:{className:"w-[400px]"},children:(0,y.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,y.jsx)(t2,{size:"14",children:"Connect to a peer by IP address."}),(0,y.jsx)("form",{onSubmit:o.handleSubmit,children:(0,y.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,y.jsx)(Sx,{formik:o,title:"Address",name:"ip",placeholder:"host.acme.com or 127.0.0.1",autoComplete:"off",type:"text",variants:{size:"medium"}}),(0,y.jsx)(Sx,{formik:o,title:"Port",name:"port",disableGroupSeparators:!0,placeholder:"9981",autoComplete:"off",type:"number",variants:{size:"medium"}}),(0,y.jsx)(S_,{formik:o,size:"medium",children:"Connect"})]})})]})})}function _W(e){var t;let{id:n,transaction:r,trigger:i,open:o,onOpenChange:a}=e;return(0,y.jsx)(ud,{title:k4((null==r?void 0:r.txType)?Su()(k7(r.txType)):"Transaction",n,16),trigger:i,open:o,onOpenChange:a,contentVariants:{className:"w-[800px]"},children:r?(0,y.jsxs)("div",{className:"flex flex-col gap-4 pb-10 w-full overflow-hidden",children:[(0,y.jsxs)("div",{className:"flex flex-wrap gap-4",children:[(0,y.jsxs)("div",{className:"flex items-baseline gap-2",children:[(0,y.jsx)(t1,{children:"Inflow"}),(0,y.jsx)(Sn,{value:new(fW())((null==r?void 0:r.inflow)||0)})]}),(0,y.jsxs)("div",{className:"flex items-baseline gap-2",children:[(0,y.jsx)(t1,{children:"Outflow"}),(0,y.jsx)(Sn,{value:new(fW())((null==r?void 0:r.outflow)||0).negated()})]}),(0,y.jsxs)("div",{className:"flex items-baseline gap-2",children:[(0,y.jsx)(t1,{children:"Miner fee"}),(0,y.jsx)(Sn,{value:new(fW())((null==r?void 0:null===(t=r.raw.minerFees)||void 0===t?void 0:t.reduce((e,t)=>e.plus(t),new(fW())(0)))||0)})]}),(0,y.jsx)("div",{className:"flex-1"}),(0,y.jsxs)("div",{className:"flex items-baseline gap-2",children:[(0,y.jsx)(t1,{children:"Timestamp"}),(0,y.jsx)(t1,{children:(0,vS.rN)((null==r?void 0:r.timestamp)||0,{timeStyle:"short"})})]})]}),(0,y.jsx)(lT,{children:JSON.stringify(null==r?void 0:r.raw,null,2)})]}):(0,y.jsx)(t1,{children:"Could not find transaction in wallet"})})}_E.Ry().shape({address:_E.Z_().required("Required"),description:_E.Z_().required("Required"),index:_E.Rx().integer().required("Required")});var _q=n(38001);function _$(e){let{title:t,description:n,address:r}=e;return(0,y.jsxs)("div",{className:"flex flex-col gap-4 items-center justify-center",children:[t&&(0,y.jsx)(c2,{size:"20",font:"mono",children:t}),n&&(0,y.jsx)(t1,{children:n}),(0,y.jsx)("div",{className:"relative p-[5px] bg-white h-[210px] w-[210px]",children:(0,y.jsx)("div",{className:"absolute",children:(0,y.jsx)(_q.Z,{size:200,value:r})})}),(0,y.jsx)(k9,{type:"address",value:r})]})}function _K(e){let{address:t,isValidating:n,trigger:r,open:i,onOpenChange:o}=e;return(0,y.jsx)(ud,{title:k4("Address",k2(t)||"",16),trigger:r,open:i,onOpenChange:o,contentVariants:{className:"w-[400px]"},children:(0,y.jsx)("div",{className:"flex flex-col gap-4",children:t||n?(0,y.jsx)(_$,{address:t||""}):(0,y.jsx)(t1,{children:"Could not retreive wallet address"})})})}function _Y(e){let{isSynced:t,isWalletSynced:n,syncPercent:r,walletScanPercent:i}=e;return t?n?null:(0,y.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,y.jsx)(t1,{color:"amber",children:(0,y.jsx)(lc.qdM,{})}),(0,y.jsxs)(t1,{size:"14",children:["Wallet is scanning (",i,"%), transaction data may be incomplete."]})]}):(0,y.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,y.jsx)(t1,{color:"amber",children:(0,y.jsx)(lc.qdM,{})}),(0,y.jsxs)(t1,{size:"14",children:["Blockchain is syncing (",r,"%), transaction data may be incomplete."]})]})}let _G={docs:{index:"https://docs.sia.tech",sia101:"https://docs.sia.tech/get-started-with-sia/sia101",renting:"https://docs.sia.tech/renting/about-renting",wallet:"https://docs.sia.tech/your-sia-wallet/wallet-overview",hosting:"https://docs.sia.tech/hosting/about-hosting-on-sia",mining:"https://docs.sia.tech/mining/about-mining-on-sia",embarcadero:"https://github.com/SiaFoundation/embarcadero",siad:"https://api.sia.tech",siaui:"https://docs.sia.tech/your-sia-wallet/sia-ui-faqs",brand:"https://docs.sia.tech/sia-integrations/sia-brand-guidelines"},website:{index:"https://sia.tech",tos:"https://sia.tech/terms-of-service",privacy:"https://sia.tech/privacy-policy"},github:{index:"https://github.com/SiaFoundation",embarcadero:"https://github.com/SiaFoundation/embarcadero",siad:"https://github.com/SiaFoundation/siad",renterd:"https://github.com/SiaFoundation/renterd",walletd:"https://github.com/SiaFoundation/walletd",hostd:"https://github.com/SiaFoundation/hostd",siaui:"https://gitlab.com/NebulousLabs/Sia-UI"},discord:"https://sia.tech/discord"};function _X(){let{settings:e,setCurrency:t,currencyOptions:n}=(0,fY.Hv)();return(0,y.jsx)(f3,{disabled:!e.siaCentral,value:e.currency.id,onChange:e=>t(e.currentTarget.value),children:n.map(e=>{let{id:t,label:n}=e;return(0,y.jsx)(f5,{value:t,children:n},t)})})}function _J(e){let{open:t,onOpenChange:n,securityEl:r}=e,{settings:i,setSettings:o,gpu:a}=(0,fY.Hv)();return(0,y.jsx)(ud,{open:t,title:"App preferences",onOpenChange:n,contentVariants:{className:"w-[450px]"},children:(0,y.jsxs)("div",{className:"flex flex-col gap-6 mb-2",children:[(0,y.jsx)("div",{className:"flex flex-col gap-4",children:(0,y.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,y.jsx)(t1,{size:"16",weight:"bold",children:"Display"}),(0,y.jsx)(t2,{size:"14",children:"Configure visual and locale display preferences."}),(0,y.jsx)(lg,{children:(0,y.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,y.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,y.jsx)(t1,{children:(0,y.jsx)(lc.RdX,{})}),(0,y.jsx)(c2,{size:"20",className:"flex-1",children:"Currency"}),(0,y.jsx)(_X,{})]}),(0,y.jsx)(t2,{size:"14",children:"Select a currency for price conversions from Siacoin. Requires Sia Central third-party data enabled under Privacy."})]})}),(0,y.jsx)(lg,{children:(0,y.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,y.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,y.jsx)(t1,{children:(0,y.jsx)(lc.RdX,{})}),(0,y.jsx)(c2,{size:"20",className:"flex-1",children:"Theme"}),(0,y.jsx)(pU,{})]}),(0,y.jsx)(t2,{size:"14",children:"Switch between a dark or light mode, or follow your system's settings."})]})}),(0,y.jsx)(lg,{children:(0,y.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,y.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,y.jsx)(t1,{children:(0,y.jsx)(lc.RdX,{})}),(0,y.jsx)(c2,{size:"20",className:"flex-1",children:"GPU"}),(0,y.jsx)(hd,{disabled:!a.canGpuRender,checked:a.canGpuRender&&a.isGpuEnabled,onCheckedChange:a.setIsGpuEnabled,size:"medium"})]}),(0,y.jsxs)(t2,{size:"14",children:["Enable features that require a GPU."," ",a.canGpuRender?"":"This device does not support GPU rendering."]})]})})]})}),(0,y.jsx)(cF,{className:"w-full"}),(0,y.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,y.jsx)(t1,{size:"16",weight:"bold",children:"Security"}),(0,y.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,y.jsx)(t2,{size:"14",children:"Configure security preferences."}),(0,y.jsx)(lg,{children:(0,y.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,y.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,y.jsx)(t1,{children:(0,y.jsx)(lc.RdX,{})}),(0,y.jsx)(c2,{size:"20",className:"flex-1",children:"Lock app"}),(0,y.jsx)(hd,{size:"medium",checked:i.autoLock,onCheckedChange:e=>o({autoLock:e})}),(0,y.jsxs)(f3,{disabled:!i.autoLock,value:String(i.autoLockTimeout),onChange:e=>{o({autoLockTimeout:Number(e.currentTarget.value)})},children:[(0,y.jsx)(f5,{value:j6(5),children:"5 minutes"}),(0,y.jsx)(f5,{value:j6(10),children:"10 minutes"}),(0,y.jsx)(f5,{value:j6(20),children:"20 minutes"}),(0,y.jsx)(f5,{value:j6(30),children:"30 minutes"}),(0,y.jsx)(f5,{value:j6(60),children:"1 hour"})]})]}),(0,y.jsx)(t2,{size:"14",children:"Automatically lock the app after a certain period of inactivity."})]})}),r]})]}),(0,y.jsx)(cF,{className:"w-full"}),(0,y.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,y.jsx)(t1,{size:"16",weight:"bold",children:"Privacy"}),(0,y.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,y.jsx)(t2,{size:"14",children:"Configure privacy preferences. The app uses the third-party APIs listed below to improve the user experience. All third-party APIs are optional and can be toggled on or off."}),(0,y.jsx)(lg,{children:(0,y.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,y.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,y.jsx)(t1,{children:(0,y.jsx)(lc.RdX,{})}),(0,y.jsx)(c2,{size:"20",className:"flex-1",children:"Sia Central"}),(0,y.jsx)(hd,{size:"medium",checked:i.siaCentral,onCheckedChange:e=>o({siaCentral:e})})]}),(0,y.jsx)(t2,{size:"14",children:"The app fetches Siacoin exchange rates from the Sia Central API."})]})})]})]}),(0,y.jsx)(cF,{className:"w-full"}),(0,y.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,y.jsx)(t1,{size:"16",weight:"bold",children:"Help"}),(0,y.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,y.jsx)(t2,{size:"14",children:"Find information about the Sia software at our website, documentation site, and on Github. Join our active Discord community for discussion and help troubleshooting issues."}),(0,y.jsxs)("div",{className:"flex gap-4",children:[(0,y.jsxs)(di,{href:_G.website.index,target:"_blank",className:"flex items-center gap-1",children:[(0,y.jsx)(lc.lq1,{}),"Website"]}),(0,y.jsxs)(di,{href:_G.docs.index,target:"_blank",className:"flex items-center gap-1",children:[(0,y.jsx)(lc.RdX,{}),"Docs"]}),(0,y.jsxs)(di,{href:_G.github.index,target:"_blank",className:"flex items-center gap-1",children:[(0,y.jsx)(lc.Sfn,{}),"About"]}),(0,y.jsxs)(di,{href:_G.discord,target:"_blank",className:"flex items-center gap-1",children:[(0,y.jsx)(lc.b47,{}),"Discord"]})]})]})]})]})})}function _Q(e){let{sc:t,isSynced:n,syncingMessage:r}=e;return t?n?(0,y.jsx)(t3,{className:"hidden sm:flex h-7 px-3 items-center",children:(0,y.jsx)(t1,{size:"12",weight:"semibold",children:(0,vS.Vz)(t)})}):(0,y.jsx)(ls,{content:r||"Blockchain is syncing, balance may be incorrect.",children:(0,y.jsxs)(t3,{className:"hidden sm:flex h-7 pl-2 pr-3 gap-1.5 items-center",children:[(0,y.jsx)(t1,{color:"amber",children:(0,y.jsx)(lc.qdM,{className:""})}),(0,y.jsx)(t1,{size:"12",weight:"semibold",children:(0,vS.Vz)(t)})]})}):null}function _0(e){let{isSynced:t,isWalletSynced:n,syncPercent:r,walletScanPercent:i,sc:o,sendSiacoin:a,receiveSiacoin:s}=e;return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(_Q,{isSynced:t&&n,syncingMessage:t?"Wallet is scanning (".concat(i,"%), balance may be incorrect."):"Blockchain is syncing (".concat(r,"%), balance may be incorrect."),sc:o}),s&&(0,y.jsxs)(lu,{size:"small",onClick:s,children:[(0,y.jsx)(lc.xHM,{}),"Receive"]}),(0,y.jsxs)(lu,{size:"small",variant:"accent",onClick:a,children:[(0,y.jsx)(lc.rW0,{}),"Send"]})]})}let _1={default:e=>"".concat((0,vS.rN)(e))};function _2(e){let{total:t,start:n,end:r,count:i}=e,o=r-n;return{total:t,diff:o,change:0===n?void 0:o/n*100,latest:r,average:t/i}}function _4(e,t){return e.reduce((e,n)=>e+((null==t?void 0:t[n])||0),0)}function _3(e){let{balances:t,isLoading:n,chartType:r="area"}=e,{resolvedTheme:i}=(0,pB.F)(),o=(0,b.useMemo)(()=>"light"===i?{sc:{label:"siacoin",color:vk.accent[800]}}:{sc:{label:"siacoin",color:vk.accentdark[800]}},[i]),a=(0,b.useMemo)(()=>{let e=function(e,t){if(!e||!e.length)return[];let n=Object.keys(j5()(e[0],"timestamp"));e.sort((e,t)=>e.timestamp>t.timestamp?1:-1);let r=[];return"delta"===t?e.forEach((t,i)=>{let o={...t};0!==i&&(n.forEach(n=>{let r=t[n],a=e[i-1][n];o[n]=r-a}),r.push(o))}):r=e.slice(1),r}(t,"none"),i=function(e){if(!e||!e.length)return{};let t=Object.keys(j5()(e[0],"timestamp"));e.sort((e,t)=>e.timestamp>t.timestamp?1:-1);let n=t.reduce((t,n)=>({...t,[n]:function(e,t){var n,r;let i=(null===(n=t[0])||void 0===n?void 0:n[e])||0,o=(null===(r=t[t.length-1])||void 0===r?void 0:r[e])||0,a=t.reduce((t,n)=>t+(n[e]||0),0);return _2({total:a,start:i,end:o,count:t.length})}(n,e)}),{});return{...n,total:function(e,t){let n=_4(e,t[0]),r=_4(e,t[t.length-1]),i=t.reduce((t,n)=>t+_4(e,n),0);return _2({total:i,start:n,end:r,count:t.length})}(t,e)}}(t);return{data:e,stats:i,config:{enabledGraph:["sc"],enabledTip:["sc"],data:{sc:o.sc},format:e=>(0,vS.Vz)(e),formatTimestamp:_1.default||_1.default,disableAnimations:!0},chartType:r,isLoading:n}},[t,n,o,r]);return(0,y.jsx)("div",{className:"relative",children:(0,y.jsx)(Ed,{id:"balance",height:200,allowConfiguration:!1,data:a.data,config:a.config,chartType:a.chartType})})}function _5(e){let{peers:t,connectPeer:n}=e;return(0,y.jsx)(Sh,{title:"Peers",actions:(0,y.jsx)(lu,{onClick:n,children:"Connect"}),entities:(null==t?void 0:t.map(e=>({type:"ip",hash:e})))||[]})}function _6(e){let{size:t,label:n,enabled:r=!0,onChange:i,color:o}=e;return(0,y.jsxs)("div",{className:(0,em.cx)("flex gap-1.5 items-center",r?"opacity-100":"opacity-50",i?"cursor-pointer":"cursor-auto",i&&(r?"hover:opacity-90":"hover:opacity-60")),onClick:()=>i&&i(!r),children:[o&&(0,y.jsx)("div",{className:"relative top-px",children:(0,y.jsx)(f9,{style:{backgroundColor:o}})}),(0,y.jsx)(t1,{size:t,children:n})]})}function _8(e){return 1008*e}function _7(e){return 4320*e}function _9(e){return e/16666666666666669e-22}function Ce(e){return e/1008}function Ct(e,t){return new Date().getTime()+_9(t-e)}function Cn(e){let{children:t,variant:n,align:r}=e;return(0,y.jsx)("div",{className:"relative",style:{top:"primary"===n?"6px":void 0,left:"start"===r?"0px":void 0,right:"end"===r?"0px":void 0},children:(0,y.jsx)(t1,{size:"10",color:"primary"===n?"contrast":"verySubtle",dir:"start"===r?"rtl":"ltr",weight:"primary"===n?"semibold":"regular",ellipsis:!0,children:t})})}function Cr(e){let{date:t,align:n,variant:r}=e;return t?(0,y.jsx)(Cn,{variant:r,align:n,children:(0,vS.rN)(t)}):null}function Ci(e){let{blockHeight:t,align:n,variant:r}=e;return t?(0,y.jsx)(Cn,{variant:r,align:n,children:t.toLocaleString()}):null}function Co(e){let{label:t,currentHeight:n,range:r,startHeight:i,endHeight:o,color:a,align:s,rounded:l,className:u,showDates:c}=e;if(!i||!o)return null;let d=r.endHeight-r.startHeight,f=_9(d),h=Ct(n,r.startHeight),p=Ct(n,i),m=Ct(n,o),v=(p-h)/f,g=(m-h)/f;return(0,y.jsxs)("div",{className:(0,em.cx)("group flex items-center justify-center","absolute -top-[5px] h-4","cursor-pointer","transition-colors"),style:{left:Ca(v),width:Ca(g-v)},children:[(0,y.jsx)("div",{className:(0,em.cx)("z-0 absolute w-full h-full","rounded-md","group-hover:bg-blue-500/10 dark:group-hover:bg-blue-200/10"),style:{width:"calc(100% + 8px)",left:"-4px"}}),(0,y.jsx)("div",{className:(0,em.cx)("z-10 absolute w-full h-1.5",u,"start"===l?"rounded-l-lg":"end"===l?"rounded-r-lg":"rounded-lg","border-y","start"===l?"border-l":"end"===l?"border-r":"border","blue"===a?["bg-blue-300 dark:bg-blue-300","group-hover:bg-blue-400 dark:group-hover:bg-blue-400","border-blue-500/50 dark:border-blue-500/50"]:[],"green"===a?["bg-green-300 dark:bg-green-300","group-hover:bg-green-400 dark:group-hover:bg-green-400","border-green-500/50 dark:border-green-500/50"]:[],"amber"===a?["bg-amber-300 dark:bg-amber-300","group-hover:bg-amber-400 dark:group-hover:bg-amber-400","border-amber-500/50 dark:border-amber-500/50"]:[])}),(0,y.jsxs)("div",{className:"hidden group-hover:flex absolute justify-between gap-2 bottom-[100%]",style:"center"===s?{width:"100%"}:"end"===s?{right:Ca(1-g)}:{left:Ca(v)},children:[(0,y.jsx)(Ci,{blockHeight:i,align:"start",variant:"primary"}),(0,y.jsx)(Cn,{variant:"primary",children:t}),(0,y.jsx)(Ci,{blockHeight:o,align:"end",variant:"primary"})]}),c&&(0,y.jsxs)("div",{className:"flex group-hover/segments:hidden absolute justify-between gap-2 top-[100%]",style:"center"===s?{width:"100%"}:"end"===s?{right:Ca(1-g)}:{left:Ca(v)},children:[(0,y.jsx)(Cr,{date:p,align:"start",variant:"secondary"}),(0,y.jsx)(Cr,{date:m,align:"start",variant:"secondary"})]}),(0,y.jsxs)("div",{className:"hidden group-hover:flex absolute justify-between gap-2 top-[100%]",style:"center"===s?{width:"100%"}:"end"===s?{right:Ca(1-g)}:{left:Ca(v)},children:[(0,y.jsx)(Cr,{date:p,align:"start",variant:"secondary"}),(0,y.jsx)(Cr,{date:m,align:"start",variant:"secondary"})]})]})}function Ca(e){return"".concat(100*e,"%")}function Cs(e){let{currentHeight:t,eventHeight:n,range:r,label:i,bottomLabel:o,color:a,className:s,unconfirmedPing:l=!0}=e,u=!!n&&n>t,c=n&&!u&&t-n<6,d=r.endHeight-r.startHeight,f=_9(d),h=Ct(t,r.startHeight),p=n?Ct(t,n):0;return n?(0,y.jsx)("div",{className:(0,em.cx)("group","absolute -top-[5px] w-4 h-4","flex items-center justify-center","rounded-full cursor-pointer","-translate-x-1/2",s),style:{left:"".concat(100*(p?(p-h)/f:0),"%")},children:(0,y.jsxs)("div",{className:(0,em.cx)("relative w-full h-full","flex items-center justify-center","rounded-full cursor-pointer"),children:[l&&c&&(0,y.jsx)("div",{className:(0,em.cx)("z-0 absolute w-1.5 h-1.5","rounded-full","bg-amber-500 dark:bg-amber-200","animate-pingslow")}),(0,y.jsx)("div",{className:(0,em.cx)("z-0 absolute w-4 h-4","rounded-full","group-hover:bg-blue-500/10 dark:group-hover:bg-blue-200/10")}),(0,y.jsx)("div",{className:(0,em.cx)("absolute w-1.5 h-1.5","rounded-full","border","green"===a?["bg-green-500 dark:bg-green-500","group-hover:bg-green-600 dark:group-hover:bg-green-600","border-white dark:border-white"]:[],"amber"===a?["bg-amber-500 dark:bg-amber-500","group-hover:bg-amber-600 dark:group-hover:bg-amber-600","border-white dark:border-white"]:[],"gray"===a?["bg-gray-700 dark:bg-graydark-900","group-hover:bg-gray-800 dark:group-hover:bg-graydark-800","border-white dark:border-white"]:[],"blue"===a?["bg-blue-300 dark:bg-blue-300","group-hover:bg-blue-400 dark:group-hover:bg-blue-400","border-white dark:border-white"]:[])}),(0,y.jsxs)("div",{className:"hidden group-hover:flex absolute justify-between gap-1 bottom-[100%] left-1.5",children:[(0,y.jsx)(Ci,{blockHeight:n,align:"start",variant:"primary"}),(0,y.jsx)(Cn,{variant:"primary",children:i})]}),(0,y.jsxs)("div",{className:"hidden group-hover:flex absolute justify-between gap-1 top-[100%] left-1.5",children:[(0,y.jsx)(Cr,{date:p,align:"start",variant:"secondary"}),o&&(0,y.jsx)(Cn,{variant:"secondary",children:o})]})]})}):null}function Cl(e){let{currentHeight:t,contractHeightStart:n,contractHeightEnd:r,proofWindowHeightStart:i,proofWindowHeightEnd:o,revisionHeight:a,proofHeight:s,range:l}=e,u=t-n<6;return(0,y.jsx)("div",{className:"group/main relative w-full",children:(0,y.jsx)("div",{className:"relative py-6",children:(0,y.jsxs)("div",{className:"relative z-10 h-1.5",children:[(0,y.jsx)("div",{className:"absolute h-full w-full bg-gray-300 dark:bg-graydark-400 rounded-lg"}),(0,y.jsxs)("div",{className:"group/segments",children:[(0,y.jsx)(Co,{label:"contract duration",currentHeight:t,startHeight:n,endHeight:r,range:l,color:"blue",align:"center",rounded:"start",className:u?"border-dotted opacity-50":"",showDates:!0}),(0,y.jsx)(Co,{label:"proof window",currentHeight:t,startHeight:i,endHeight:o,range:l,color:"green",align:"end",rounded:"end",className:u?"border-dotted opacity-50":""}),(0,y.jsx)(Cs,{label:"contract formation",bottomLabel:u?"unconfirmed":"",currentHeight:t,eventHeight:n,range:l,color:u?"amber":"blue",className:"z-20"}),(0,y.jsx)(Cs,{label:"last revision",currentHeight:t,eventHeight:a,range:l,color:"green",className:"z-20"}),(0,y.jsx)(Cs,{label:"storage proof",currentHeight:t,eventHeight:s,range:l,color:"green",className:"z-20"}),(0,y.jsx)(Cs,{label:"current block",currentHeight:t,eventHeight:t,range:l,color:"gray",className:"z-10",unconfirmedPing:!1})]})]})})})}var Cu=n(17335),Cc=n.n(Cu);function Cd(e){let{label:t,columns:n,enabled:r,setColumnsVisible:i,setColumnsHidden:o}=e,a=0===Cc()(n,r).length,s=Cc()(n,r).length===n.length;return(0,y.jsxs)(cH,{children:[(0,y.jsx)(dt,{children:t}),(0,y.jsxs)(cU,{children:[(0,y.jsx)(lu,{tip:"".concat(t,": show all"),icon:a?"contrast":"hover",variant:"ghost",onClick:e=>{e.stopPropagation(),i(n)},children:(0,y.jsx)(lc.xVB,{})}),(0,y.jsx)(lu,{icon:s?"contrast":"hover",tip:"".concat(t,": hide all"),variant:"ghost",onClick:e=>{e.stopPropagation(),o(n)},children:(0,y.jsx)(lc.pHg,{})})]})]})}function Cf(e){let{title:t,children:n}=e;return(0,y.jsxs)("div",{className:"flex flex-col gap-6",children:[t&&(0,y.jsx)(c2,{anchorLink:!0,size:"24",children:t}),(0,y.jsx)(t3,{className:"p-6",children:(0,y.jsx)("div",{className:"flex flex-col gap-6",children:n})})]})}function Ch(e){let{title:t,description:n,control:r}=e;return(0,y.jsxs)("div",{className:"flex gap-10 justify-between",children:[(0,y.jsxs)("div",{className:"flex flex-col gap-2 max-w-[600px]",children:[(0,y.jsx)(c2,{size:"20",children:t}),(0,y.jsx)(t2,{size:"14",children:n})]}),(0,y.jsx)("div",{className:"",children:r})]})}function Cp(e){let{open:t,params:n,trigger:r,onOpenChange:i}=e,{body:o,title:a,variant:s,action:l,onConfirm:u}=n||{},c=(0,_f.cI)(),d=(0,b.useCallback)(()=>{u&&u(),i(!1)},[u,i]);return(0,y.jsx)(ud,{title:a,trigger:r,open:t,onOpenChange:i,contentVariants:{className:"w-[400px]"},children:(0,y.jsx)("form",{onSubmit:c.handleSubmit(d),children:(0,y.jsxs)("div",{className:"flex flex-col gap-4",children:[o,(0,y.jsx)("div",{className:"flex gap-1 justify-end",children:(0,y.jsx)(Sb,{variant:s,form:c,size:"small",children:l})})]})})})}function Cm(e){let{name:t,peerCount:n,isSynced:r,nodeBlockHeight:i,connectPeer:o}=e;return(0,y.jsxs)("div",{className:"flex justify-between items-center",children:[(0,y.jsx)(t1,{font:"mono",weight:"bold",size:"20",children:t}),(0,y.jsxs)("div",{className:"flex items-center",children:[n?(0,y.jsxs)(lu,{className:"relative left-2 only:left-0",variant:"ghost",onClick:o,tip:"".concat(n," connected peers"),children:[(0,y.jsx)(t1,{color:"subtle",children:n.toLocaleString()}),(0,y.jsx)(lc.RK4,{})]}):null,i&&r?(0,y.jsx)(ls,{content:"Blockchain is synced",children:(0,y.jsx)("div",{className:"relative left-2",children:(0,y.jsxs)(lu,{variant:"ghost",state:"waiting",children:[(0,y.jsx)(t1,{color:"subtle",children:i.toLocaleString()}),(0,y.jsx)(t1,{color:"green",children:(0,y.jsx)(lc.Y3p,{})})]})})}):null]})]})}function Cv(e){let{nodeBlockHeight:t,networkBlockHeight:n,moreThan100BlocksToSync:r,percent:i}=e;return(0,y.jsxs)("div",{className:"flex flex-col justify-between h-full mb-1",children:[(0,y.jsx)(dU,{variant:"accent",value:t&&n?t:0,max:n||1,className:""}),(0,y.jsxs)("div",{className:"flex justify-between mt-1.5",children:[(0,y.jsx)(t1,{color:"subtle",size:"10",children:"Syncing..."}),t&&n?r?(0,y.jsx)(t1,{color:"subtle",size:"10",children:"".concat(t.toLocaleString()," / ").concat(n.toLocaleString()," (").concat(i,"%)")}):(0,y.jsx)(t1,{color:"subtle",size:"10",children:"(".concat(i,"%)")}):null]})]})}function Cg(e){let{name:t,peerCount:n,connectPeer:r,isSynced:i,syncPercent:o,nodeBlockHeight:a,estimatedBlockHeight:s,firstTimeSyncing:l,moreThan100BlocksToSync:u,children:c}=e;return(0,y.jsx)(h7,{rootProps:{openDelay:100},contentProps:{side:"right",align:"start",sideOffset:5,className:"!max-w-none"},trigger:(0,y.jsxs)("div",{className:"relative hover:scale-105 transition-transform",children:[i||100===o||0===o?null:(0,y.jsx)("div",{className:"absolute -bottom-2.5 w-full flex justify-center",children:(0,y.jsxs)(t1,{className:"bg-amber-500 py-px px-1 rounded-sm scale-75",size:"10",children:[o,"%"]})}),(0,y.jsx)(dl,{size:30})]}),children:(0,y.jsxs)("div",{className:"flex flex-col gap-2 px-1 pt-1 pb-2 w-[300px]",children:[(0,y.jsx)(Cm,{nodeBlockHeight:a,isSynced:i,name:t,peerCount:n,connectPeer:r}),i?(0,y.jsx)(cF,{className:"w-full mb-0.5"}):(0,y.jsx)(Cv,{percent:o,nodeBlockHeight:a,networkBlockHeight:s,moreThan100BlocksToSync:u}),l&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(t1,{color:"contrast",size:"14",children:"Welcome to Sia! The blockchain is syncing to the current network height. Depending on your system this process may take a while."}),(0,y.jsx)(cF,{className:"w-full mb-1"})]}),c]})})}function Cy(e){let{testnetName:t}=e;return(0,y.jsxs)("div",{className:"flex gap-2 items-center justify-center py-2 px-3 bg-amber-600 dark:bg-amber-500",children:[(0,y.jsx)(t1,{color:"lo",children:(0,y.jsx)(lc.RdX,{})}),(0,y.jsxs)(t1,{size:"14",color:"lo",children:["You are on the ",t,"."]})]})}function Cb(e){let{type:t,label:n,link:r,tip:i,icon:o,value:a,onClick:s,decimalsLimit:l,units:u}=e;return(0,y.jsxs)("div",{className:"flex justify-between items-center",children:[(0,y.jsx)(ls,{align:"start",side:"bottom",content:i,children:(0,y.jsxs)("div",{className:"flex gap-1 items-center relative overflow-hidden",children:[(0,y.jsx)(t1,{className:"flex relative",children:o||(0,y.jsx)(lc.RdX,{})}),(0,y.jsx)(t1,{size:"12",ellipsis:!0,children:r?(0,y.jsx)(di,{href:r,target:"_blank",children:n}):n})]})}),(0,y.jsx)("div",{className:(0,em.cx)("flex items-center",s?"cursor-pointer":""),onClick:()=>{s&&s(a)},children:"siacoin"===t?(0,y.jsx)(Sn,{value:a,variant:"value",size:"12",fixed:l,dynamicUnits:!1,showTooltip:!1}):(0,y.jsx)(Sr,{value:a,variant:"value",size:"12",format:e=>"".concat(fq(e,l)," ").concat(u)})})]})}function Cx(e){let{name:t,form:n,fields:r}=e,i=r[t],{average:o,suggestion:a,units:s,suggestionTip:l,averageTip:u,after:c,decimalsLimitSc:d=6,decimalsLimitFiat:f=6,tipsDecimalsLimitSc:h=0}=i,{setValue:p,value:m,error:v}=_m({name:t,field:i,form:n}),g=c||(()=>null);return(0,y.jsxs)("div",{className:"flex flex-col gap-3 items-end",children:[(0,y.jsxs)("div",{className:"flex flex-col gap-3 w-[220px]",children:[(0,y.jsx)(fJ,{name:t,size:"small",sc:m,units:s,decimalsLimitSc:d,decimalsLimitFiat:f,error:v,changed:n.formState.dirtyFields[t],placeholder:a||o,onChange:e=>{p(e,!0)},onBlur:()=>{p(m,!0)}}),(0,y.jsx)(g,{name:t,form:n,fields:r}),o&&(0,y.jsx)(Cb,{type:"siacoin",label:"Network average",tip:u||"Averages provided by Sia Central.",decimalsLimit:h,value:(0,vS.qN)(o),onClick:()=>{p(o,!0)}}),a&&l&&(0,y.jsx)(Cb,{type:"siacoin",label:"Suggestion",tip:l,decimalsLimit:h,value:(0,vS.qN)(a),onClick:()=>{p(a,!0)}})]}),(0,y.jsx)("div",{className:"h-[20px]",children:(0,y.jsx)(Sg,{form:n,name:t})})]})}function Cw(e){let{name:t,form:n,fields:r}=e,i=r[t],{average:o,averageTip:a,suggestion:s,suggestionTip:l,decimalsLimit:u=2,placeholder:c,units:d}=i,{setValue:f,value:h,error:p}=_m({form:n,field:i,name:t});return(0,y.jsxs)("div",{className:"flex flex-col gap-3 items-end",children:[(0,y.jsxs)("div",{className:"flex flex-col gap-3 w-[220px]",children:[(0,y.jsx)(f$,{name:t,value:h,units:d,decimalsLimit:u,placeholder:c?new(fW())(c):void 0,state:p?"invalid":n.formState.dirtyFields[t]?"valid":"default",onChange:e=>{let t=void 0!==e?new(fW())(e):void 0;f(t,!0)},onBlur:()=>{f(h,!0)}}),(0,y.jsxs)("div",{className:"flex flex-col gap-2",children:[o&&(0,y.jsx)(Cb,{type:"number",label:"Network average",tip:a||"Averages provided by Sia Central.",decimalsLimit:u,value:o,units:d,onClick:()=>{f(o,!0)}}),s&&l&&(0,y.jsx)(Cb,{type:"number",label:"Suggestion",tip:l,decimalsLimit:u,value:s,units:d,onClick:()=>{f(s,!0)}})]})]}),(0,y.jsx)("div",{className:"h-[20px]",children:(0,y.jsx)(Sg,{form:n,name:t})})]})}function Cj(e){let{label:t,link:n,tip:r,value:i,onClick:o}=e;return(0,y.jsxs)("div",{className:"flex justify-between items-center",children:[(0,y.jsx)(ls,{align:"start",side:"bottom",content:r,children:(0,y.jsxs)("div",{className:"flex gap-1 items-center relative overflow-hidden",children:[(0,y.jsx)(t1,{className:"flex relative",children:(0,y.jsx)(lc.RdX,{})}),(0,y.jsx)(t1,{size:"12",children:n?(0,y.jsx)(di,{href:n,target:"_blank",children:t}):t})]})}),(0,y.jsx)("div",{className:"flex cursor-pointer items-center",onClick:o,children:(0,y.jsx)(t1,{size:"12",children:(0,y.jsx)(lP,{children:i})})})]})}function CE(e){let{name:t,form:n,fields:r,type:i}=e,o=r[t],{placeholder:a,suggestion:s,suggestionTip:l}=o,{ref:u,onChange:c,setValue:d,onBlur:f,error:h}=_m({name:t,form:n,field:o});return(0,y.jsxs)("div",{className:"flex flex-col gap-3 items-end",children:[(0,y.jsxs)("div",{className:"flex flex-col gap-3 w-[220px]",children:[(0,y.jsx)(fE,{ref:u,name:t,placeholder:a,type:i,state:h?"invalid":n.formState.dirtyFields[t]?"valid":"default",onChange:c,onBlur:f}),(0,y.jsx)("div",{className:"flex flex-col gap-2",children:s&&l&&(0,y.jsx)(Cj,{label:"Suggestion",tip:l,value:s,onClick:()=>{d(s,!0)}})})]}),(0,y.jsx)("div",{className:"h-[20px]",children:(0,y.jsx)(Sg,{form:n,name:t})})]})}function Ck(e){let{name:t,form:n,fields:r}=e,i=r[t],{suggestion:o,suggestionTip:a}=i,{setValue:s,value:l,error:u}=_m({name:t,field:i,form:n});return(0,y.jsxs)("div",{className:"flex flex-col gap-3 items-end",children:[(0,y.jsxs)("div",{className:"flex flex-col gap-3 w-[220px]",children:[(0,y.jsx)("div",{className:"flex justify-end w-full",children:(0,y.jsx)(hd,{name:t,size:"medium",checked:l,state:u?"invalid":n.formState.dirtyFields[t]?"valid":"default",onCheckedChange:e=>{s(e,!0)},onBlur:()=>{s(l,!0)}})}),(0,y.jsx)("div",{className:"flex flex-col gap-2",children:void 0!==o&&a&&(0,y.jsx)(Cj,{label:"Suggestion",tip:a,value:o?"on":"off",onClick:()=>{s(o,!0)}})})]}),(0,y.jsx)("div",{className:"h-[20px]",children:(0,y.jsx)(Sg,{form:n,name:t})})]})}function CS(e){let{name:t,form:n,fields:r}=e,i=r[t],{options:o,suggestion:a,suggestionTip:s}=i,{ref:l,onChange:u,setValue:c,onBlur:d,value:f,error:h}=_m({name:t,form:n,field:i});return(0,y.jsxs)("div",{className:"flex flex-col gap-3 items-end",children:[(0,y.jsxs)("div",{className:"flex flex-col gap-3 w-[220px]",children:[(0,y.jsx)("div",{className:"flex justify-end w-full",children:(0,y.jsx)(f3,{ref:l,name:t,size:"small",value:f,state:h?"invalid":n.formState.dirtyFields[t]?"valid":"default",onChange:u,onBlur:d,children:null==o?void 0:o.map(e=>(0,y.jsx)(f5,{value:e.value,children:e.label},e.value))})}),(0,y.jsx)("div",{className:"flex flex-col gap-2",children:void 0!==a&&s&&(0,y.jsx)(Cj,{label:"Suggestion",tip:s,value:a?"on":"off",onClick:()=>{c(a,!0)}})})]}),(0,y.jsx)("div",{className:"h-[20px]",children:(0,y.jsx)(Sg,{form:n,name:t})})]})}function C_(e){let{title:t,category:n,form:r,fields:i}=e,o=Object.entries(i).filter(e=>{let[t,i]=e;return i.category===n&&!i.hidden&&(!i.show||i.show(r.getValues()))});return 0===o.length?null:(0,y.jsx)(Cf,{title:t,children:o.map((e,t)=>{let[n,a]=e;return(0,y.jsxs)(b.Fragment,{children:[(0,y.jsx)(Ch,{title:a.title,description:a.description,control:"number"===a.type?(0,y.jsx)(Cw,{form:r,name:n,fields:i}):"siacoin"===a.type?(0,y.jsx)(Cx,{form:r,name:n,fields:i}):"text"===a.type?(0,y.jsx)(CE,{form:r,name:n,fields:i}):"password"===a.type?(0,y.jsx)(CE,{form:r,type:"password",fields:i,name:n}):"boolean"===a.type?(0,y.jsx)(Ck,{form:r,name:n,fields:i}):"select"===a.type?(0,y.jsx)(CS,{form:r,name:n,fields:i}):null}),t{l(e,!0)},onBlur:()=>{l(u,!0)}}),a]});return o?(0,y.jsx)(Sy,{title:s.title,name:t,form:n,children:d}):d}var CO=n(75652),CM=n.n(CO);lc.lg1,lc.eHR,lc.I$H,lc.KiD,lc.P5r,lc.CCF,lc.w9S,lc.EL$,lc.aPl,lc.wEY,lc.EOT,lc.kSc,lc.W$S,lc.lJ7,lc.ORH,lc.ka0,lc.BdP,lc.d19,lc.Mes,lc.VUg,lc.U_S,lc.T85;let CT=e=>{let{__scopeTooltip:t,delayDuration:n=700,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:o}=e,[a,s]=(0,b.useState)(!0),l=(0,b.useRef)(!1),u=(0,b.useRef)(0);return(0,b.useEffect)(()=>{let e=u.current;return()=>window.clearTimeout(e)},[]),(0,b.createElement)(tL,{scope:t,isOpenDelayed:a,delayDuration:n,onOpen:(0,b.useCallback)(()=>{window.clearTimeout(u.current),s(!1)},[]),onClose:(0,b.useCallback)(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>s(!0),r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:(0,b.useCallback)(e=>{l.current=e},[]),disableHoverableContent:i},o)};function CA(e){let{children:t}=e,[n,r]=(0,b.useState)(!1);return(0,b.useEffect)(()=>{r(!0)},[]),(0,y.jsx)("div",{children:n?t:null})}function CP(e){let{passwordProtectRequestHooks:t,fallback:n,children:r,lockRoutes:i}=e;return(0,y.jsx)(CA,{children:(0,y.jsx)(fY.kl,{fallback:n,children:(0,y.jsx)(pB.f,{attribute:"class",children:(0,y.jsx)(CT,{children:(0,y.jsx)(fY.bW,{lockRoutes:i,passwordProtectRequestHooks:t,children:(0,y.jsxs)("div",{id:"root",className:lo,children:[(0,y.jsx)(kJ,{}),r]})})})})})})}n(331);var CN=n(30898),CR=n.n(CN),CD=n(92762);let CL=[];function CF(e,t){let{columns:n,columnsDefaultVisible:r,defaultSortField:i,sortOptions:o,disabledCategories:a}={disabledCategories:CL,...t},[s,l]=(0,CD.Z)("".concat(e,"/enabledColumns"),{defaultValue:r}),[u,c]=(0,CD.Z)("".concat(e,"/sortField"),{defaultValue:i}),[d,f]=(0,CD.Z)("".concat(e,"/sortDirection"),{defaultValue:"desc"}),h=(0,b.useCallback)(e=>{l(t=>t.includes(e)?t.filter(t=>t!==e):t.concat(e))},[l]),p=(0,b.useCallback)(e=>{l(t=>CM()([...t,...e]))},[l]),m=(0,b.useCallback)(e=>{l(t=>Cc()(t,e))},[l]),v=(0,b.useCallback)(()=>{l(r)},[l,r]),g=(0,b.useCallback)(e=>{if(u!==e){c(e),f("asc");return}f(e=>"desc"===e?"asc":"desc")},[u,c,f]),y=(0,b.useMemo)(()=>n.filter(e=>{let t=null==a?void 0:a.includes(e.category||"");return!e.fixed&&!t}),[n,a]),x=(0,b.useMemo)(()=>n.filter(e=>{let t=e.fixed||s.includes(e.id),n=null==a?void 0:a.includes(e.category||"");return t&&!n}).map(e=>e.id),[n,s,a]),w=(0,b.useMemo)(()=>{if(!o)return[];let e=o.map(e=>e.id);return CR()(e,x)},[o,x]);return{configurableColumns:y,enabledColumns:x,toggleColumnVisibility:h,toggleSort:g,setSortDirection:f,setSortField:c,sortableColumns:w,sortField:u,setColumnsVisible:p,setColumnsHidden:m,sortDirection:d,resetDefaultColumnVisibility:v}}function Cz(){let e=(0,SO.useRouter)(),[t,n]=(0,b.useState)([]),r=(0,b.useCallback)(t=>{n(e=>{let n=e.filter(e=>e.id!==t.id);return n.concat(t)}),e.replace({query:{}})},[e,n]),i=(0,b.useCallback)(()=>{n([]),e.replace({query:{}})},[e,n]),o=(0,b.useCallback)(t=>{n(e=>e.filter(e=>e.id!==t)),e.replace({query:{}})},[e,n]),a=(0,b.useCallback)(()=>{t.length&&(n(e=>e.slice(0,-1)),e.replace({query:{}}))},[e,n,t]);return{filters:t,setFilter:r,removeFilter:o,removeLastFilter:a,resetFilters:i}}function CV(e){let{dataset:t,filters:n,sortField:r,sortDirection:i}=e;return(0,b.useMemo)(()=>{if(!t)return null;let e=Object.entries(n).map(e=>{let[t,n]=e;return n}),o=e.length?t.filter(t=>{for(let n of e)if(!n.fn(t))return!1;return!0}):t;return[...o=o.sort((e,t)=>{let n=e[r],o=t[r];return"desc"===i?n instanceof fW()&&o instanceof fW()?n.lte(o)?1:-1:n<=o?1:-1:n instanceof fW()&&o instanceof fW()?n.gte(o)?1:-1:n>=o?1:-1})]},[t,n,r,i])}function CI(){let e=(0,SO.useRouter)(),[t,n]=(0,b.useState)([]),r=(0,b.useCallback)(t=>{n(e=>{let n=e.filter(e=>e.id!==t.id);return n.concat(t)}),e.replace({query:{}})},[e,n]),i=(0,b.useCallback)(()=>{n([]),e.replace({query:{}})},[e,n]),o=(0,b.useCallback)(t=>{n(e=>e.filter(e=>e.id!==t)),e.replace({query:{}})},[e,n]),a=(0,b.useCallback)(()=>{t.length&&(n(e=>e.slice(0,-1)),e.replace({query:{}}))},[e,n,t]);return{filters:t,setFilter:r,removeFilter:o,removeLastFilter:a,resetFilters:i}}let CZ=new(fW())(0);function CB(e){let{sc:t}=e,{settings:n}=(0,fY.Hv)(),r=(0,fG.BW)({config:{swr:{revalidateOnFocus:!1}}}),i=(0,b.useMemo)(()=>{var e;return n.siaCentral&&r.data?new(fW())((null===(e=r.data)||void 0===e?void 0:e.rates.sc[n.currency.id])||CZ):CZ},[r.data,n]),o=(0,b.useMemo)(()=>new(fW())(t).times(i),[t,i]);return i.isZero()?{}:{fiat:o,currency:n.currency}}function CH(e){return new(fW())(e).div(1e3).div(1e3).div(1e3).div(1e3)}function CU(e){return new(fW())(e).times(1e3).times(1e3).times(1e3).times(1e3)}function CW(e,t){let n=t.reduce((e,t)=>{let n=e.startHeight,r=e.endHeight;return t.contractHeightStartr&&(r=t.contractHeightEnd),{startHeight:n,endHeight:r}},{startHeight:e,endHeight:0});n.endHeight=Math.max(n.endHeight,e)+720,n.startHeight=n.startHeight-720;let r=[],i=n.startHeight;for(;i<=n.endHeight;)r.push(i),i+=j8(1);let o=r.reduce((e,t)=>({...e,[t]:{total:null,timestamp:t}}),{});return{allDatesMap:o,range:n}}let Cq=/^[a-z]{2}$/i;function C$(e){if(!Cq.test(e)){let t=typeof e;throw TypeError("cc argument must be an ISO 3166-1 alpha-2 string, but got '".concat("string"===t?e:t,"' instead."))}let t=[...e.toUpperCase()].map(e=>e.codePointAt()+127397);return String.fromCodePoint(...t)}},2850:function(e,t,n){"use strict";n.d(t,{bW:function(){return L},kl:function(){return $},gw:function(){return i},Tc:function(){return U},du:function(){return W},Hv:function(){return D},iv:function(){return Z},rB:function(){return B},Nf:function(){return I},Tu:function(){return q},mw:function(){return z},q0:function(){return F},Tb:function(){return O},V1:function(){return V},Q5:function(){return H},D:function(){return T}});var r=n(79381);function i(e){return new Promise(t=>setTimeout(t,e))}var o=n(89644),a=n.n(o),s=n(2784);function l(e){return{...e,config:{...null==e?void 0:e.config}}}function u(e){return{...e,config:{...null==e?void 0:e.config}}}function c(e){return{...e,config:{...null==e?void 0:e.config}}}function d(e,t,n){return(null==n?void 0:n.api)||(null==t?void 0:t.api)||e.api}function f(e,t,n){var r,i;let o=function(e,t,n){var r,i,o,a;let s={"Content-Type":"application/json",...null===(i=t.config)||void 0===i?void 0:null===(r=i.axios)||void 0===r?void 0:r.headers,...null==n?void 0:null===(a=n.config)||void 0===a?void 0:null===(o=a.axios)||void 0===o?void 0:o.headers},l=d(e,t,n);return e.api===l&&e.password&&(s.Authorization="Basic "+btoa(":".concat(e.password))),s}(e,t,n);return{responseType:"json",...null===(r=t.config)||void 0===r?void 0:r.axios,...null==n?void 0:null===(i=n.config)||void 0===i?void 0:i.axios,headers:o}}function h(e,t,n,r){if(!t)return null;let i=(null==n?void 0:n.params)||{};if(r&&r.params&&(i={...i,...r.params}),!(t=function(e,t){if(e&&t){let n=Object.keys(t);for(let r of n){let n=String(t[r]);e.includes(":".concat(r))?e=e.replace(":".concat(r),n):e.includes("?")?e+="&".concat(r,"=").concat(encodeURIComponent(n)):e+="?".concat(r,"=").concat(encodeURIComponent(n))}}return e}(t,i)))return null;let o=d(e,n,r);return o===e.api?"".concat(o,"/api").concat(t):"".concat(o).concat(t)}function p(e,t,n,r){let i=d(e,n,r);return i===e.api?t.replace("".concat(i,"/api"),""):t.replace(i,"")}var m=n(52322),v=n(82876),g=n(92762);function y(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((r=r.apply(e,t||[])).next())})}let b=["geforce 320m","geforce 8600","geforce 8600m gt","geforce 8800 gs","geforce 8800 gt","geforce 9400","geforce 9400m g","geforce 9400m","geforce 9600m gt","geforce 9600m","geforce fx go5200","geforce gt 120","geforce gt 130","geforce gt 330m","geforce gtx 285","google swiftshader","intel g41","intel g45","intel gma 4500mhd","intel gma x3100","intel hd 3000","intel q45","legacy","mali-2","mali-3","mali-4","quadro fx 1500","quadro fx 4","quadro fx 5","radeon hd 2400","radeon hd 2600","radeon hd 4670","radeon hd 4850","radeon hd 4870","radeon hd 5670","radeon hd 5750","radeon hd 6290","radeon hd 6300","radeon hd 6310","radeon hd 6320","radeon hd 6490m","radeon hd 6630m","radeon hd 6750m","radeon hd 6770m","radeon hd 6970m","sgx 543","sgx543"];function x(e){return e=e.toLowerCase().replace(/.*angle ?\((.+)\)(?: on vulkan [0-9.]+)?$/i,"$1").replace(/\s(\d{1,2}gb|direct3d.+$)|\(r\)| \([^)]+\)$/g,"").replace(/(?:vulkan|opengl) \d+\.\d+(?:\.\d+)?(?: \((.*)\))?/,"$1")}let w="undefined"==typeof window,j=(()=>{if(w)return;let{userAgent:e,platform:t,maxTouchPoints:n}=window.navigator,r=/(iphone|ipod|ipad)/i.test(e),i="iPad"===t||"MacIntel"===t&&n>0&&!window.MSStream;return{isIpad:i,isMobile:/android/i.test(e)||r||i,isSafari12:/Version\/12.+Safari/.test(e)}})();class E extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}}let k=[],S=[];function _(e){return null!=e}let C=({mobileTiers:e=[0,15,30,60],desktopTiers:t=[0,15,30,60],override:n={},glContext:r,failIfMajorPerformanceCaveat:i=!1,benchmarksURL:o="https://unpkg.com/detect-gpu@5.0.34/dist/benchmarks"}={})=>y(void 0,void 0,void 0,function*(){let a={};if(w)return{tier:0,type:"SSR"};let{isIpad:s=!!(null==j?void 0:j.isIpad),isMobile:l=!!(null==j?void 0:j.isMobile),screenSize:u=window.screen,loadBenchmarks:c=e=>y(void 0,void 0,void 0,function*(){let t=yield fetch(`${o}/${e}`).then(e=>e.json());if(4>parseInt(t.shift().split(".")[0],10))throw new E("Detect GPU benchmark data is out of date. Please update to version 4x");return t})}=n,{renderer:d}=n,f=(e,t,n,r,i)=>({device:i,fps:r,gpu:n,isMobile:l,tier:e,type:t}),h,p="";if(d)h=[d=x(d)];else{var m;let e=r||function(e,t=!1){let n={alpha:!1,antialias:!1,depth:!1,failIfMajorPerformanceCaveat:t,powerPreference:"high-performance",stencil:!1};e&&delete n.powerPreference;let r=window.document.createElement("canvas"),i=r.getContext("webgl",n)||r.getContext("experimental-webgl",n);return null!=i?i:void 0}(null==j?void 0:j.isSafari12,i);if(!e)return f(0,"WEBGL_UNSUPPORTED");let t=e.getExtension("WEBGL_debug_renderer_info");if(t&&(d=e.getParameter(t.UNMASKED_RENDERER_WEBGL)),!d)return f(1,"FALLBACK");p=d,h="apple gpu"===(m=d=x(d))?function(e,t,n){let r;if(!n)return[t];let i=function(e){let t=e.createShader(35633),n=e.createShader(35632),r=e.createProgram();if(!(n&&t&&r))return;e.shaderSource(t,"\n precision highp float;\n attribute vec3 aPosition;\n varying float vvv;\n void main() {\n vvv = 0.31622776601683794;\n gl_Position = vec4(aPosition, 1.0);\n }\n "),e.shaderSource(n,"\n precision highp float;\n varying float vvv;\n void main() {\n vec4 enc = vec4(1.0, 255.0, 65025.0, 16581375.0) * vvv;\n enc = fract(enc);\n enc -= enc.yzww * vec4(1.0 / 255.0, 1.0 / 255.0, 1.0 / 255.0, 0.0);\n gl_FragColor = enc;\n }\n "),e.compileShader(t),e.compileShader(n),e.attachShader(r,t),e.attachShader(r,n),e.linkProgram(r),e.detachShader(r,t),e.detachShader(r,n),e.deleteShader(t),e.deleteShader(n),e.useProgram(r);let i=e.createBuffer();e.bindBuffer(34962,i),e.bufferData(34962,new Float32Array([-1,-1,0,3,-1,0,-1,3,0]),35044);let o=e.getAttribLocation(r,"aPosition");e.vertexAttribPointer(o,3,5126,!1,0,0),e.enableVertexAttribArray(o),e.clearColor(1,1,1,1),e.clear(16384),e.viewport(0,0,1,1),e.drawArrays(4,0,3);let a=new Uint8Array(4);return e.readPixels(0,0,1,1,6408,5121,a),e.deleteProgram(r),e.deleteBuffer(i),a.join("")}(e),o="801621810",a="8016218135",s="80162181161",l=(null==j?void 0:j.isIpad)?[["a7",s,12],["a8",a,15],["a8x",a,15],["a9",a,15],["a9x",a,15],["a10",a,15],["a10x",a,15],["a12",o,15],["a12x",o,15],["a12z",o,15],["a14",o,15],["m1",o,15]]:[["a7",s,12],["a8",a,12],["a9",a,15],["a10",a,15],["a11",o,15],["a12",o,15],["a13",o,15],["a14",o,15]];return"80162181255"===i?r=l.filter(([,,e])=>e>=14):(r=l.filter(([,e])=>e===i)).length||(r=l),r.map(([e])=>`apple ${e} gpu`)}(e,m,l):[m]}let v=(yield Promise.all(h.map(function(e){var t;return y(this,void 0,void 0,function*(){let n;let r=(e=>{let t=l?["adreno","apple","mali-t","mali","nvidia","powervr","samsung"]:["intel","apple","amd","radeon","nvidia","geforce"];for(let n of t)if(e.includes(n))return n})(e);if(!r)return;let i=`${l?"m":"d"}-${r}${s?"-ipad":""}.json`,o=a[i]=null!==(t=a[i])&&void 0!==t?t:c(i);try{n=yield o}catch(e){if(e instanceof E)throw e;return}let d=function(e){var t;let n=(e=e.replace(/\([^)]+\)/,"")).match(/\d+/)||e.match(/(\W|^)([A-Za-z]{1,3})(\W|$)/g);return null!==(t=null==n?void 0:n.join("").replace(/\W|amd/g,""))&&void 0!==t?t:""}(e),f=n.filter(([,e])=>e===d);f.length||(f=n.filter(([t])=>t.includes(e)));let h=f.length;if(0===h)return;let p=e.split(/[.,()\[\]/\s]/g).sort().filter((e,t,n)=>0===t||e!==n[t-1]).join(" "),m,[v,,,,g]=h>1?f.map(e=>[e,function(e,t){if(e===t)return 0;let n=e;e.length>t.length&&(e=t,t=n);let r=e.length,i=t.length;for(;r>0&&e.charCodeAt(~-r)===t.charCodeAt(~-i);)r--,i--;let o,a=0;for(;au?l>u?u+1:l:l>s?s+1:l;return u}(p,e[2])]).sort(([,e],[,t])=>e-t)[0][0]:f[0],y=Number.MAX_VALUE,{devicePixelRatio:b}=window,x=u.width*b*u.height*b;for(let e of g){let[t,n]=e,r=t*n,i=Math.abs(x-r);ie===n?t-r:e-n);if(!v.length){let e=b.find(e=>d.includes(e));return e?f(0,"BLOCKLISTED",e):f(1,"FALLBACK",`${d} (${p})`)}let[,g,C,O]=v[0];if(-1===g)return f(0,"BLOCKLISTED",C,g,O);let M=l?e:t,T=0;for(let e=0;e=M[e]&&(T=e);return f(T,"BENCHMARK",C,g,O)});function O(){var e,t;let n=null===(e=(t=window).matchMedia)||void 0===e?void 0:e.call(t,"(prefers-reduced-motion: reduce)");return!n||!!n.matches}let M=(0,s.createContext)({}),T=()=>(0,s.useContext)(M);function A(e){let{children:t}=e,n=function(){let[e,t]=(0,s.useState)({}),n=(0,s.useCallback)((e,n)=>{t(t=>({...t,[e]:{key:e,...n}}))},[t]),r=(0,s.useCallback)(e=>{t(t=>(delete t[e],{...t}))},[t]),i=(0,s.useCallback)(()=>{t({})},[t]),o=(0,s.useMemo)(()=>Object.entries(e).map(e=>e[1]),[e]);return{setWorkflow:n,removeWorkflow:r,resetWorkflows:i,workflows:o}}();return(0,m.jsx)(M.Provider,{value:n,children:t})}let P=[{id:"usd",label:"USD",prefix:"$",fixed:2},{id:"cad",label:"CAD",prefix:"$",fixed:2},{id:"eur",label:"EUR",prefix:"€",fixed:2},{id:"gbp",label:"GBP",prefix:"\xa3",fixed:2},{id:"jpy",label:"JPY",prefix:"\xa5",fixed:2},{id:"aud",label:"AUD",prefix:"$",fixed:2},{id:"rub",label:"RUB",prefix:"₽",fixed:2},{id:"cny",label:"CNY",prefix:"\xa5",fixed:2},{id:"btc",label:"BTC",prefix:"₿",fixed:6},{id:"eth",label:"ETH",prefix:"Ξ",fixed:6}],N={api:"",allowCustomApi:!1,siaCentral:!0,password:void 0,currency:P[0],recentApis:{},autoLock:!1,autoLockTimeout:6e5},R=(0,s.createContext)({}),D=()=>(0,s.useContext)(R);function L(e){let{children:t,...n}=e,i=function(e){let{passwordProtectRequestHooks:t,lockRoutes:n,defaultSettings:i}=e,o=(0,s.useMemo)(()=>({...N,...i}),[i]),[a,l]=(0,g.Z)("v0/settings",{defaultValue:o});(0,s.useEffect)(()=>{l(e=>({...o,...e}))},[]);let u=(0,s.useMemo)(()=>({...o,...a}),[a,o]),{resetWorkflows:c}=T(),d=(0,s.useCallback)(e=>{l(t=>({...t,...e}))},[l]),f=(0,s.useCallback)(e=>{let t=P.find(t=>t.id===e);t&&d({currency:t})},[d]),h=(0,v.useRouter)(),p=(0,v.usePathname)(),[m,y]=(0,s.useState)({}),b=(0,s.useCallback)((e,t)=>{y(n=>({...n,[e]:t}))},[y]),x=(0,s.useCallback)(()=>{for(let[e,t]of(n&&h.push("".concat(n.login,"?prev=").concat([n.login].includes(p)?n.home:p)),d({password:""}),c(),(0,r.JG)(()=>!0,void 0,{revalidate:!1}),Object.entries(m)))t&&t()},[h,n,d,c,m,p]),w=(0,s.useMemo)(()=>!!u.password,[u]),j=function(){let e=O(),[t,n]=(0,s.useState)(!1),[r,i]=(0,s.useState)(!1),[{isGpuEnabled:o,hasUserSet:a},l]=(0,g.Z)("v1/gpuFeatures",{defaultValue:{isGpuEnabled:!e,hasUserSet:!1}}),u=(0,s.useCallback)(function(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];l(n=>({...n,isGpuEnabled:e,hasUserSet:t}))},[l]),c=(0,s.useCallback)(async()=>{let e=!1;{let t=await C();console.log("GPU",t),e=t.tier>0,!a&&t.tier<2&&u(!1,!1)}i(e),n(!0)},[i,u,a]);return(0,s.useEffect)(()=>{c()},[]),{hasCheckedGpu:t,canGpuRender:r,isGpuEnabled:o,shouldRender:r&&o,setCanGpuRender:i,setIsGpuEnabled:u}}();return{settings:u,setSettings:d,setCurrency:f,currencyOptions:P,gpu:j,lock:x,isUnlocked:w,passwordProtectRequestHooks:t,setOnLockCallback:b}}(n);return(0,m.jsx)(R.Provider,{value:i,children:t})}function F(e){var t;let n=(0,s.useMemo)(()=>u(e),[e]),{settings:i,passwordProtectRequestHooks:o}=D(),l=h(i,n.route,n,void 0),c=(0,s.useMemo)(()=>{var t,r;return t=l?"".concat(l).concat(JSON.stringify(void 0!==e.payload?e.payload:"")):null,r=n.disabled||o&&!i.password,!t||r?null:t},[l,e,n,o,i]);return(0,r.ZP)(c,async()=>{if(!n.route)throw Error("No route");let t=f(i,n,void 0);if(!l)throw Error("No route");try{let n=await a().post(l,e.payload,t);return n.data}catch(t){let e=Error(t.response.data);throw e.status=t.response.status||500,e}},null===(t=n.config)||void 0===t?void 0:t.swr)}function z(e,t){let{setWorkflow:n,removeWorkflow:i}=T(),{mutate:o}=(0,r.kY)(),{settings:s}=D(),u=l(e);return{post:async e=>{let r=c(e);try{let l;let c=f(s,u,r),d=h(s,u.route,u,r);if(!d)throw Error("No route");"payload"in r&&(l=r.payload);let m="".concat(d).concat(JSON.stringify(void 0!==e.payload?e.payload:"")),v=p(s,d,e,r);n(m,{path:v,payload:l});let g=await a().post(d,l,c);return t&&await t(function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e=>e,i=arguments.length>2?arguments[2]:void 0;return o(n=>{if("string"!=typeof n)return!1;let i=p(s,n,e,r);return t(i)},n,i)},r,g),i(m),{status:g.status,data:g.data}}catch(e){var l,d;return{status:null===(l=e.response)||void 0===l?void 0:l.status,error:(null===(d=e.response)||void 0===d?void 0:d.data)||e.message}}}}}function V(e,t){let{mutate:n}=(0,r.kY)(),{settings:i}=D(),{setWorkflow:o,removeWorkflow:s}=T(),u=l(e);return{put:async e=>{let r=c(e);try{let l;let c=f(i,u,r),d=h(i,u.route,u,r);if(!d)throw Error("No route");"payload"in r&&(l=r.payload);let m="".concat(d).concat(JSON.stringify(void 0!==e.payload?e.payload:"")),v=p(i,d,e,r);o(m,{path:v,payload:l});let g=await a().put(d,l,c);return t&&await t(function(t){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e=>e,a=arguments.length>2?arguments[2]:void 0;return n(n=>{if("string"!=typeof n)return!1;let o=p(i,n,e,r);return t(o)},o,a)},r,g),s(m),{status:g.status,data:g.data}}catch(e){var l,d;return{status:null===(l=e.response)||void 0===l?void 0:l.status,error:(null===(d=e.response)||void 0===d?void 0:d.data)||e.message}}}}}function I(e){var t,n,i;let o=(0,s.useMemo)(()=>u(e),[e]),{settings:l,passwordProtectRequestHooks:c}=D(),d=h(l,o.route,o,void 0);return(0,r.ZP)((n=e.standalone?"".concat(e.standalone,"/").concat(d):d,i=o.disabled||c&&!l.password,!n||i?null:n),async()=>{if(!o.route)throw Error("No route");let e=f(l,o,void 0);if(!d)throw Error("No route");try{let t=await a().get(d,e);return t.data}catch(t){let e=Error(t.response.data);throw e.status=t.response.status||500,e}},null===(t=o.config)||void 0===t?void 0:t.swr)}function Z(e,t){let{mutate:n}=(0,r.kY)(),{settings:i}=D(),{setWorkflow:o,removeWorkflow:s}=T(),u=l(e);return{delete:async e=>{let r=c(e);try{let l=f(i,u,r),c=h(i,u.route,u,r);if(!c)throw Error("No route");let d=p(i,c,e,r);o(c,{path:d});let m=await a().delete(c,l);return t&&await t(function(t){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e=>e,a=arguments.length>2?arguments[2]:void 0;return n(n=>{if("string"!=typeof n)return!1;let o=p(i,n,e,r);return t(o)},o,a)},r,m),s(c),{status:m.status,data:m.data}}catch(e){var l,d;return{status:null===(l=e.response)||void 0===l?void 0:l.status,error:(null===(d=e.response)||void 0===d?void 0:d.data)||e.message}}}}}function B(e){var t;let{get:n}=function(e){let{settings:t}=D(),n=l(e);return{get:async e=>{let r=c(e);try{let e=f(t,n,r),i=h(t,n.route,n,r);if(!i)throw Error("No route");let o=await a().get(i,e);return{status:o.status,data:o.data}}catch(t){var i,o,s,l;let e=(null===(i=t.response)||void 0===i?void 0:i.data)instanceof Blob?await (null===(o=t.response)||void 0===o?void 0:o.data.text()):(null===(s=t.response)||void 0===s?void 0:s.data)||t.message;return{status:null===(l=t.response)||void 0===l?void 0:l.status,error:e}}}}}({...e,config:{...e.config,axios:{...null===(t=e.config)||void 0===t?void 0:t.axios,responseType:"blob"}}});return{get:async(e,t)=>{let r=await n(t);return r.data&&function(e,t){let n=URL.createObjectURL(t),r=document.createElement("a");r.href=n,r.download=e,document.body.appendChild(r),r.click(),setTimeout(()=>{document.body.removeChild(r),URL.revokeObjectURL(n)},100)}(e,r.data),r}}}function H(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3,[n,r]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{if(n)return;let i=setInterval(()=>{e()&&(r(!0),clearInterval(i))},t);return()=>clearInterval(i)},[e,n,t]),n}function U(){return Math.round((new Date().getTime()-14336e8)/6e5)}function W(){return Math.round((new Date().getTime()-16736e8)/6e5)}function q(e){let{settings:t}=D();return(0,s.useMemo)(()=>function(n,i,o){return(0,r.JG)(r=>{if("string"!=typeof r)return!1;let i=p(t,r,e,void 0);return n(i)},i,o)},[t,e])}function $(e){let{fallback:t,cacheProvider:n,children:i}=e;return(0,m.jsx)(A,{children:(0,m.jsx)(r.J$,{value:{fallback:t||{},provider:n},children:i})})}},88242:function(e,t,n){"use strict";function r(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 i(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}n.d(t,{aXP:function(){return tQ},eHR:function(){return t6},xHM:function(){return t8},L6f:function(){return t7},rW0:function(){return t9},osk:function(){return ne},JaG:function(){return nt},wWN:function(){return iq},Dkj:function(){return i2},fi8:function(){return iW},EMN:function(){return nl},bdU:function(){return nu},VUy:function(){return nc},Cp0:function(){return nd},kqg:function(){return nf},Mes:function(){return nh},DI$:function(){return nm},NlZ:function(){return nC},Y3p:function(){return nM},Z$8:function(){return nO},tEK:function(){return nT},cRw:function(){return nA},F3j:function(){return nP},PcV:function(){return nR},QN4:function(){return nN},Jsc:function(){return nD},bQp:function(){return nF},Y9T:function(){return nL},wEY:function(){return nI},olJ:function(){return nZ},KiD:function(){return nU},B4q:function(){return nY},_Eq:function(){return nW},VHe:function(){return iQ},Jrl:function(){return nG},aPl:function(){return nX},kBK:function(){return iX},c_L:function(){return n1},Bpb:function(){return n2},vzB:function(){return n4},iG7:function(){return n7},nDH:function(){return n9},d19:function(){return re},w9S:function(){return rt},VBo:function(){return i$},q0D:function(){return ra},Hb6:function(){return ro},CCF:function(){return rs},L37:function(){return rc},ROc:function(){return i0},UG6:function(){return iJ},lq1:function(){return rd},zvn:function(){return iK},EL$:function(){return rh},BdP:function(){return rb},e1T:function(){return rx},P5r:function(){return rw},RdX:function(){return rj},U_S:function(){return rE},V8Q:function(){return rM},POp:function(){return rT},nCM:function(){return rN},kSc:function(){return rP},TtX:function(){return rA},mBM:function(){return iG},b47:function(){return rL},Sfn:function(){return rF},W$S:function(){return rH},T85:function(){return rU},c6N:function(){return rW},Ckx:function(){return rq},EOT:function(){return r$},RK4:function(){return rY},XJM:function(){return rQ},RRj:function(){return r0},ka0:function(){return r1},hzZ:function(){return r3},n6M:function(){return r5},VUg:function(){return ie},owP:function(){return it},Fs9:function(){return ir},wGX:function(){return ii},Wet:function(){return is},ZEk:function(){return il},$Iz:function(){return ip},UBs:function(){return im},shL:function(){return iv},hiv:function(){return ig},mli:function(){return ib},lJ7:function(){return i1},ORH:function(){return iE},I98:function(){return ik},R$6:function(){return iS},JCW:function(){return iP},xVB:function(){return iN},pHg:function(){return iR},I$H:function(){return iD},oaN:function(){return iY},qdM:function(){return iL},Gu6:function(){return iF},SmH:function(){return iZ},RFr:function(){return iB},lg1:function(){return iH}});var a,s,l,u,c,d,f,h,p,m,v,g,y,b,x,w,j,E,k,S,_,C,O,M,T,A,P,N,R,D,L,F,z,V,I,Z,B,H,U,W,q,$,K,Y,G,X,J,Q,ee,et,en,er,ei,eo,ea,es,el,eu,ec,ed,ef,eh,ep,em,ev,eg,ey,eb,ex,ew,ej,eE,ek,eS,e_,eC,eO,eM,eT,eA,eP,eN,eR,eD,eL,eF,ez,eV,eI,eZ,eB,eH,eU,eW,eq,e$,eK,eY,eG,eX,eJ,eQ,e0,e1,e2,e4,e3,e5,e6,e8,e7,e9,te,tt,tn,tr,ti,to,ta,ts,tl,tu,tc,td,tf,th,tp,tm,tv,tg,ty,tb,tx,tw,tj,tE,tk,tS,t_,tC,tO,tM,tT,tA,tP,tN,tR,tD,tL,tF,tz,tV=["width","height","viewBox"],tI=["tabindex"],tZ={focusable:"false",preserveAspectRatio:"xMidYMid meet"},tB=n(13980),tH=n.n(tB),tU=n(2784);function tW(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 tq(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var tY=["className","children","tabIndex"],tG=["tabindex"],tX=tU.forwardRef(function(e,t){var n=e.className,r=e.children,a=e.tabIndex,s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.width,n=e.height,r=e.viewBox,a=void 0===r?"0 0 ".concat(t," ").concat(n):r,s=o(e,tV),l=s.tabindex,u=o(s,tI),c=i(i(i({},tZ),u),{},{width:t,height:n,viewBox:a});return c["aria-label"]||c["aria-labelledby"]||c.title?(c.role="img",null!=l&&(c.focusable="true",c.tabindex=l)):c["aria-hidden"]=!0,c}(tq(tq({},tK(e,tY)),{},{tabindex:a})),l=s.tabindex,u=tK(s,tG);return n&&(u.className=n),null!=l&&(u.tabIndex=l),t&&(u.ref=t),tU.createElement("svg",u,r)});tX.displayName="Icon",tX.propTypes={"aria-hidden":tH().string,"aria-label":tH().string,"aria-labelledby":tH().string,children:tH().node,className:tH().string,height:tH().oneOfType([tH().number,tH().string]),preserveAspectRatio:tH().string,tabIndex:tH().string,viewBox:tH().string,width:tH().oneOfType([tH().number,tH().string]),xmlns:tH().string},tX.defaultProps={xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid meet"};var tJ=["children"],tQ=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,tJ);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),a||(a=tU.createElement("path",{d:"M17 15L17 8 15 8 15 15 8 15 8 17 15 17 15 24 17 24 17 17 24 17 24 15z"})),n)}),t0=["children"],t1=["children"],t2=["children"],t4=["children"],t3=["children"],t5=["children"],t6=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,t0);return tU.createElement(tX,t$({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),s||(s=tU.createElement("path",{d:"M14 19H18V21H14z"})),l||(l=tU.createElement("path",{d:"M6,2V28a2,2,0,0,0,2,2H24a2,2,0,0,0,2-2V2ZM24,28H8V16H24Zm0-14H8V10H24ZM8,8V4H24V8Z"})),n)}),t8=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,t1);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),u||(u=tU.createElement("path",{d:"M22 26L22 24 9.41 24 26 7.41 24.59 6 8 22.59 8 10 6 10 6 26 22 26z"})),n)}),t7=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,t2);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),c||(c=tU.createElement("path",{d:"M22 6L22 8 9.41 8 26 24.59 24.59 26 8 9.41 8 22 6 22 6 6 22 6z"})),n)}),t9=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,t4);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),d||(d=tU.createElement("path",{d:"M10 6L10 8 22.59 8 6 24.59 7.41 26 24 9.41 24 22 26 22 26 6 10 6z"})),n)}),ne=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,t3);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),f||(f=tU.createElement("path",{d:"M7.2,2.3c-1,4.4,1.7,8.7,6.1,9.8c0.1,0,0.1,0,0.2,0c-1.1,1.2-2.7,1.8-4.3,1.8c-0.1,0-0.2,0-0.2,0C5.6,13.8,3,11,3.2,7.7 C3.2,5.3,4.8,3.1,7.2,2.3 M8,1L8,1C4.1,1.6,1.5,5.3,2.1,9.1c0.6,3.3,3.4,5.8,6.8,5.9c0.1,0,0.2,0,0.3,0c2.3,0,4.4-1.1,5.8-3 c0.2-0.2,0.1-0.6-0.1-0.7c-0.1-0.1-0.2-0.1-0.3-0.1c-3.9-0.3-6.7-3.8-6.4-7.6C8.3,3,8.4,2.4,8.6,1.8c0.1-0.3,0-0.6-0.3-0.7 C8.1,1,8.1,1,8,1z"})),n)}),nt=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,t5);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),h||(h=tU.createElement("path",{d:"M7.5 1H8.5V3.5H7.5z"})),p||(p=tU.createElement("path",{d:"M10.8 3.4H13.3V4.4H10.8z",transform:"rotate(-45.001 12.074 3.922)"})),m||(m=tU.createElement("path",{d:"M12.5 7.5H15V8.5H12.5z"})),v||(v=tU.createElement("path",{d:"M11.6 10.8H12.6V13.3H11.6z",transform:"rotate(-45.001 12.077 12.075)"})),g||(g=tU.createElement("path",{d:"M7.5 12.5H8.5V15H7.5z"})),y||(y=tU.createElement("path",{d:"M2.7 11.6H5.2V12.6H2.7z",transform:"rotate(-45.001 3.929 12.078)"})),b||(b=tU.createElement("path",{d:"M1 7.5H3.5V8.5H1z"})),x||(x=tU.createElement("path",{d:"M3.4 2.7H4.4V5.2H3.4z",transform:"rotate(-45.001 3.926 3.925)"})),w||(w=tU.createElement("path",{d:"M8,6c1.1,0,2,0.9,2,2s-0.9,2-2,2S6,9.1,6,8S6.9,6,8,6 M8,5C6.3,5,5,6.3,5,8s1.3,3,3,3s3-1.3,3-3S9.7,5,8,5z"})),n)}),nn=["children"],nr=["children"],ni=["children"],no=["children"],na=["children"],ns=["children"],nl=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,nn);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),j||(j=tU.createElement("path",{d:"M24 12L16 22 8 12z"})),n)}),nu=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,nr);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),E||(E=tU.createElement("path",{d:"M20 24L10 16 20 8z"})),n)}),nc=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,ni);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),k||(k=tU.createElement("path",{d:"M12 8L22 16 12 24z"})),n)}),nd=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,no);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),S||(S=tU.createElement("path",{d:"M24 24L16 32 8 24zM8 8L16 0 24 8z"})),n)}),nf=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,na);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),_||(_=tU.createElement("path",{d:"M8 20L16 10 24 20z"})),n)}),nh=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,ns);return tU.createElement(tX,t$({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),C||(C=tU.createElement("path",{d:"M30,15H27.9492A12.0071,12.0071,0,0,0,17,4.0508V2H15V4.0508A12.0071,12.0071,0,0,0,4.0508,15H2v2H4.0508A12.0071,12.0071,0,0,0,15,27.9492V30h2V27.9492A12.0071,12.0071,0,0,0,27.9492,17H30ZM17,25.9492V22H15v3.9492A10.0166,10.0166,0,0,1,6.0508,17H10V15H6.0508A10.0166,10.0166,0,0,1,15,6.0508V10h2V6.0508A10.0166,10.0166,0,0,1,25.9492,15H22v2h3.9492A10.0166,10.0166,0,0,1,17,25.9492Z"})),n)}),np=["children"],nm=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,np);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),O||(O=tU.createElement("path",{d:"M26,4H6A2,2,0,0,0,4,6V26a2,2,0,0,0,2,2H26a2,2,0,0,0,2-2V6A2,2,0,0,0,26,4ZM14,21.5,9,16.5427,10.5908,15,14,18.3456,21.4087,11l1.5918,1.5772Z"})),M||(M=tU.createElement("path",{fill:"none",d:"M14,21.5,9,16.5427,10.5908,15,14,18.3456,21.4087,11l1.5918,1.5772Z","data-icon-path":"inner-path"})),n)}),nv=["children"],ng=["children"],ny=["children"],nb=["children"],nx=["children"],nw=["children"],nj=["children"],nE=["children"],nk=["children"],nS=["children"],n_=["children"],nC=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,nv);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),T||(T=tU.createElement("path",{d:"M13 24L4 15 5.414 13.586 13 21.171 26.586 7.586 28 9 13 24z"})),n)}),nO=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,ng);return tU.createElement(tX,t$({width:32,height:32,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),A||(A=tU.createElement("path",{d:"M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2ZM14,21.5908l-5-5L10.5906,15,14,18.4092,21.41,11l1.5957,1.5859Z"})),P||(P=tU.createElement("path",{fill:"none",d:"M14 21.591L9 16.591 10.591 15 14 18.409 21.41 11 23.005 12.585 14 21.591z","data-icon-path":"inner-path"})),n)}),nM=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,ny);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),N||(N=tU.createElement("path",{d:"M8,1C4.1,1,1,4.1,1,8c0,3.9,3.1,7,7,7s7-3.1,7-7C15,4.1,11.9,1,8,1z M7,11L4.3,8.3l0.9-0.8L7,9.3l4-3.9l0.9,0.8L7,11z"})),R||(R=tU.createElement("path",{d:"M7,11L4.3,8.3l0.9-0.8L7,9.3l4-3.9l0.9,0.8L7,11z","data-icon-path":"inner-path",opacity:"0"})),n)}),nT=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,nb);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),D||(D=tU.createElement("path",{d:"M14 21.414L9 16.413 10.413 15 14 18.586 21.585 11 23 12.415 14 21.414z"})),L||(L=tU.createElement("path",{d:"M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2Zm0,26A12,12,0,1,1,28,16,12,12,0,0,1,16,28Z"})),n)}),nA=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,nx);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),F||(F=tU.createElement("path",{d:"M8 11L3 6 3.7 5.3 8 9.6 12.3 5.3 13 6z"})),n)}),nP=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,nw);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),z||(z=tU.createElement("path",{d:"M11 8L6 13 5.3 12.3 9.6 8 5.3 3.7 6 3z"})),n)}),nN=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,nj);return tU.createElement(tX,t$({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),V||(V=tU.createElement("path",{d:"M24 9.4L22.6 8 16 14.6 9.4 8 8 9.4 14.6 16 8 22.6 9.4 24 16 17.4 22.6 24 24 22.6 17.4 16 24 9.4z"})),n)}),nR=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,nE);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),I||(I=tU.createElement("path",{d:"M24 9.4L22.6 8 16 14.6 9.4 8 8 9.4 14.6 16 8 22.6 9.4 24 16 17.4 22.6 24 24 22.6 17.4 16 24 9.4z"})),n)}),nD=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,nk);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),Z||(Z=tU.createElement("path",{d:"M16,2C8.2,2,2,8.2,2,16s6.2,14,14,14s14-6.2,14-14S23.8,2,16,2z M16,28C9.4,28,4,22.6,4,16S9.4,4,16,4s12,5.4,12,12 S22.6,28,16,28z"})),B||(B=tU.createElement("path",{d:"M21.4 23L16 17.6 10.6 23 9 21.4 14.4 16 9 10.6 10.6 9 16 14.4 21.4 9 23 10.6 17.6 16 23 21.4z"})),n)}),nL=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,nS);return tU.createElement(tX,t$({width:32,height:32,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),H||(H=tU.createElement("path",{d:"M11 18L12.41 19.41 15 16.83 15 29 17 29 17 16.83 19.59 19.41 21 18 16 13 11 18z"})),U||(U=tU.createElement("path",{d:"M23.5,22H23V20h.5a4.5,4.5,0,0,0,.36-9L23,11l-.1-.82a7,7,0,0,0-13.88,0L9,11,8.14,11a4.5,4.5,0,0,0,.36,9H9v2H8.5A6.5,6.5,0,0,1,7.2,9.14a9,9,0,0,1,17.6,0A6.5,6.5,0,0,1,23.5,22Z"})),n)}),nF=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,n_);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),W||(W=tU.createElement("path",{d:"M11 18L12.41 19.41 15 16.83 15 29 17 29 17 16.83 19.59 19.41 21 18 16 13 11 18z"})),q||(q=tU.createElement("path",{d:"M23.5,22H23V20h.5a4.5,4.5,0,0,0,.36-9L23,11l-.1-.82a7,7,0,0,0-13.88,0L9,11,8.14,11a4.5,4.5,0,0,0,.36,9H9v2H8.5A6.5,6.5,0,0,1,7.2,9.14a9,9,0,0,1,17.6,0A6.5,6.5,0,0,1,23.5,22Z"})),n)}),nz=["children"],nV=["children"],nI=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,nz);return tU.createElement(tX,t$({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),$||($=tU.createElement("path",{d:"M31 16L24 23 22.59 21.59 28.17 16 22.59 10.41 24 9 31 16zM1 16L8 9 9.41 10.41 3.83 16 9.41 21.59 8 23 1 16z"})),K||(K=tU.createElement("path",{d:"M5.91 15H26.080000000000002V17H5.91z",transform:"rotate(-75 15.996 16)"})),n)}),nZ=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,nV);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),Y||(Y=tU.createElement("path",{d:"M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z"})),G||(G=tU.createElement("path",{d:"M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z"})),n)}),nB=["children"],nH=["children"],nU=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,nB);return tU.createElement(tX,t$({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),X||(X=tU.createElement("path",{d:"M21,12V10H17V7H15v3H13a2.002,2.002,0,0,0-2,2v3a2.002,2.002,0,0,0,2,2h6v3H11v2h4v3h2V22h2a2.0023,2.0023,0,0,0,2-2V17a2.002,2.002,0,0,0-2-2H13V12Z"})),J||(J=tU.createElement("path",{d:"M16,4A12,12,0,1,1,4,16,12.0353,12.0353,0,0,1,16,4m0-2A14,14,0,1,0,30,16,14.0412,14.0412,0,0,0,16,2Z"})),n)}),nW=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,nH);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),Q||(Q=tU.createElement("circle",{cx:"22",cy:"24",r:"2"})),ee||(ee=tU.createElement("path",{d:"M29.7769,23.4785A8.64,8.64,0,0,0,22,18a8.64,8.64,0,0,0-7.7769,5.4785L14,24l.2231.5215A8.64,8.64,0,0,0,22,30a8.64,8.64,0,0,0,7.7769-5.4785L30,24ZM22,28a4,4,0,1,1,4-4A4.0045,4.0045,0,0,1,22,28Z"})),et||(et=tU.createElement("circle",{cx:"8",cy:"8",r:"1"})),en||(en=tU.createElement("circle",{cx:"8",cy:"16",r:"1"})),er||(er=tU.createElement("circle",{cx:"8",cy:"24",r:"1"})),ei||(ei=tU.createElement("path",{d:"M5,21h7V19H5V13H21v3h2V5a2,2,0,0,0-2-2H5A2,2,0,0,0,3,5V27a2,2,0,0,0,2,2h7V27H5ZM5,5H21v6H5Z"})),n)}),nq=["children"],n$=["children"],nK=["children"],nY=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,nq);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eo||(eo=tU.createElement("path",{d:"M8 18H12V20H8zM14 18H18V20H14zM8 14H12V16H8zM14 22H18V24H14zM20 14H24V16H20zM20 22H24V24H20z"})),ea||(ea=tU.createElement("path",{d:"M27,3H5A2.0025,2.0025,0,0,0,3,5V27a2.0025,2.0025,0,0,0,2,2H27a2.0025,2.0025,0,0,0,2-2V5A2.0025,2.0025,0,0,0,27,3Zm0,2,0,4H5V5ZM5,27V11H27l0,16Z"})),n)}),nG=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,n$);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),es||(es=tU.createElement("path",{d:"M12 12H14V24H12zM18 12H20V24H18z"})),el||(el=tU.createElement("path",{d:"M4 6V8H6V28a2 2 0 002 2H24a2 2 0 002-2V8h2V6zM8 28V8H24V28zM12 2H20V4H12z"})),n)}),nX=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,nK);return tU.createElement(tX,t$({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eu||(eu=tU.createElement("path",{d:"M8 4V8H4V4H8M2 2v8h8V2zM18 7v4H14V7h4M12 5v8h8V5zM8 16v4H4V16H8M2 14v8h8V14z"})),ec||(ec=tU.createElement("path",{d:"M22,10v6H16v6H10v8H30V10Zm-4,8h4v4H18ZM16,28H12V24h4Zm6,0H18V24h4Zm6,0H24V24h4Zm0-6H24V18h4Zm-4-6V12h4v4Z"})),n)}),nJ=["children"],nQ=["children"],n0=["children"],n1=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,nJ);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),ed||(ed=tU.createElement("path",{d:"M25.7,9.3l-7-7C18.5,2.1,18.3,2,18,2H8C6.9,2,6,2.9,6,4v24c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V10C26,9.7,25.9,9.5,25.7,9.3 z M18,4.4l5.6,5.6H18V4.4z M24,28H8V4h8v6c0,1.1,0.9,2,2,2h6V28z"})),ef||(ef=tU.createElement("path",{d:"M10 22H22V24H10zM10 16H22V18H10z"})),n)}),n2=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,nQ);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eh||(eh=tU.createElement("circle",{cx:"16",cy:"16",r:"8"})),n)}),n4=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,n0);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),ep||(ep=tU.createElement("path",{d:"M13 7L12.3 6.3 8.5 10.1 8.5 1 7.5 1 7.5 10.1 3.7 6.3 3 7 8 12zM13 12v2H3v-2H2v2l0 0c0 .6.4 1 1 1h10c.6 0 1-.4 1-1l0 0v-2H13z"})),n)}),n3=["children"],n5=["children"],n6=["children"],n8=["children"],n7=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,n3);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),em||(em=tU.createElement("path",{d:"M10 6H14V10H10zM18 6H22V10H18zM10 14H14V18H10zM18 14H22V18H18zM10 22H14V26H10zM18 22H22V26H18z"})),n)}),n9=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,n5);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),ev||(ev=tU.createElement("path",{d:"M16,2A14,14,0,1,0,30,16,14.0158,14.0158,0,0,0,16,2Zm5,3.1055a12.0136,12.0136,0,0,1,2.9158,1.8994L23.5034,8H21ZM13.3784,27.7026A11.9761,11.9761,0,0,1,8.1157,6.9761L9.4648,9h3.3423l-1.5,4H7.2793L5.8967,17.1475,8.4648,21h5l1.4319,2.1475ZM16,28c-.2034,0-.4016-.02-.6025-.03l1.3967-4.19a1.9876,1.9876,0,0,0-.2334-1.7412l-1.4319-2.1475A1.9962,1.9962,0,0,0,13.4648,19h-3.93L8.1033,16.8525,8.7207,15H11v2h2V14.1812l2.9363-7.83-1.8726-.7022L13.5571,7H10.5352L9.728,5.7891A11.7941,11.7941,0,0,1,19,4.395V8a2.0025,2.0025,0,0,0,2,2h2.5857A1.9865,1.9865,0,0,0,25,9.4141l.1406-.1407.2818-.68A11.9813,11.9813,0,0,1,27.3,12H22.5986a1.9927,1.9927,0,0,0-1.9719,1.665L20.03,17.1064a1.99,1.99,0,0,0,.991,2.086l2.1647,1.4638,1.4585,3.646A11.9577,11.9577,0,0,1,16,28Zm8.8145-8.6563L22.1,17.5088l-.1-.06L22.5986,14h5.2207a11.743,11.743,0,0,1-1.7441,8.4951Z"})),n)}),re=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,n6);return tU.createElement(tX,t$({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eg||(eg=tU.createElement("path",{d:"M21,30a8,8,0,1,1,8-8A8,8,0,0,1,21,30Zm0-14a6,6,0,1,0,6,6A6,6,0,0,0,21,16Z"})),ey||(ey=tU.createElement("path",{d:"M22.59 25L20 22.41 20 18 22 18 22 21.59 24 23.59 22.59 25z"})),eb||(eb=tU.createElement("path",{d:"M28,6a2,2,0,0,0-2-2H22V2H20V4H12V2H10V4H6A2,2,0,0,0,4,6V26a2,2,0,0,0,2,2h4V26H6V6h4V8h2V6h8V8h2V6h4v6h2Z"})),n)}),rt=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,n8);return tU.createElement(tX,t$({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),ex||(ex=tU.createElement("path",{d:"M18 31h2V29a1.0006 1.0006 0 011-1h6a1.0006 1.0006 0 011 1v2h2V29a3.0033 3.0033 0 00-3-3H21a3.0033 3.0033 0 00-3 3zM24 25a4 4 0 114-4A4.0039 4.0039 0 0124 25zm0-6a2 2 0 102 2A2.0027 2.0027 0 0024 19zM2 31H4V29a1.0009 1.0009 0 011-1h6a1.0009 1.0009 0 011 1v2h2V29a3.0033 3.0033 0 00-3-3H5a3.0033 3.0033 0 00-3 3zM8 25a4 4 0 114-4A4.0042 4.0042 0 018 25zm0-6a2 2 0 102 2A2.0023 2.0023 0 008 19zM18 16h2V14a1.0009 1.0009 0 011-1h6a1.0009 1.0009 0 011 1v2h2V14a3.0033 3.0033 0 00-3-3H21a3.0033 3.0033 0 00-3 3zM24 10a4 4 0 114-4A4.0042 4.0042 0 0124 10zm0-6a2 2 0 102 2A2.0023 2.0023 0 0024 4zM2 16H4V14a1.0013 1.0013 0 011-1h6a1.0013 1.0013 0 011 1v2h2V14a3.0033 3.0033 0 00-3-3H5a3.0033 3.0033 0 00-3 3zM8 10a4 4 0 114-4A4.0045 4.0045 0 018 10zM8 4a2 2 0 102 2A2.002 2.002 0 008 4z"})),n)}),rn=["children"],rr=["children"],ri=["children"],ro=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,rn);return tU.createElement(tX,t$({width:32,height:32,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),ew||(ew=tU.createElement("path",{d:"M18,28H14a2,2,0,0,1-2-2V18.41L4.59,11A2,2,0,0,1,4,9.59V6A2,2,0,0,1,6,4H26a2,2,0,0,1,2,2V9.59A2,2,0,0,1,27.41,11L20,18.41V26A2,2,0,0,1,18,28ZM6,6V9.59l8,8V26h4V17.59l8-8V6Z"})),n)}),ra=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,rr);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),ej||(ej=tU.createElement("path",{d:"M18,28H14a2,2,0,0,1-2-2V18.41L4.59,11A2,2,0,0,1,4,9.59V6A2,2,0,0,1,6,4H26a2,2,0,0,1,2,2V9.59A2,2,0,0,1,27.41,11L20,18.41V26A2,2,0,0,1,18,28ZM6,6V9.59l8,8V26h4V17.59l8-8V6Z"})),n)}),rs=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,ri);return tU.createElement(tX,t$({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eE||(eE=tU.createElement("path",{d:"M2 28H30V30H2zM27 11a1 1 0 001-1V7a1 1 0 00-.66-.94l-11-4a1 1 0 00-.68 0l-11 4A1 1 0 004 7v3a1 1 0 001 1H6V24H4v2H28V24H26V11zM6 7.7L16 4.06 26 7.7V9H6zM18 24H14V11h4zM8 11h4V24H8zM24 24H20V11h4z"})),n)}),rl=["children"],ru=["children"],rc=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,rl);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),ek||(ek=tU.createElement("path",{d:"M26 20L24 20 24 24 20 24 20 26 24 26 24 30 26 30 26 26 30 26 30 24 26 24z"})),eS||(eS=tU.createElement("path",{d:"M28,8H16l-3.4-3.4C12.2,4.2,11.7,4,11.2,4H4C2.9,4,2,4.9,2,6v20c0,1.1,0.9,2,2,2h14v-2H4V6h7.2l3.4,3.4l0.6,0.6H28v8h2v-8 C30,8.9,29.1,8,28,8z"})),n)}),rd=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,ru);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),e_||(e_=tU.createElement("path",{d:"M14,4a7,7,0,1,1-7,7,7,7,0,0,1,7-7m0-2a9,9,0,1,0,9,9A9,9,0,0,0,14,2Z"})),eC||(eC=tU.createElement("path",{d:"M28,11a13.9563,13.9563,0,0,0-4.1051-9.8949L22.4813,2.5187A11.9944,11.9944,0,0,1,5.5568,19.5194l-.0381-.0381L4.1051,20.8949A13.9563,13.9563,0,0,0,14,25v3H10v2H20V28H16V24.84A14.0094,14.0094,0,0,0,28,11Z"})),n)}),rf=["children"],rh=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,rf);return tU.createElement(tX,t$({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eO||(eO=tU.createElement("path",{d:"M16,.0005,4,5.9784V20.0443a12,12,0,0,0,24,0V5.9784Zm6.83,27.3138L16,23.9119V26.14l5.0361,2.5088A10.0025,10.0025,0,0,1,6,20.0443V7.21L16,2.2284,26,7.21v3.75L16,5.9783V8.2062l10,4.9816v3.75L16,11.9562v2.2279l10,4.9815v.8787a9.9045,9.9045,0,0,1-.37,2.6871L16,17.934v2.2279l8.8952,4.4313A10.0252,10.0252,0,0,1,22.83,27.3143Z"})),n)}),rp=["children"],rm=["children"],rv=["children"],rg=["children"],ry=["children"],rb=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,rp);return tU.createElement(tX,t$({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eM||(eM=tU.createElement("path",{d:"M11 24H21V26H11zM13 28H19V30H13zM16 2A10 10 0 006 12a9.19 9.19 0 003.46 7.62c1 .93 1.54 1.46 1.54 2.38h2c0-1.84-1.11-2.87-2.19-3.86A7.2 7.2 0 018 12a8 8 0 0116 0 7.2 7.2 0 01-2.82 6.14c-1.07 1-2.18 2-2.18 3.86h2c0-.92.53-1.45 1.54-2.39A9.18 9.18 0 0026 12 10 10 0 0016 2z"})),n)}),rx=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,rm);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eT||(eT=tU.createElement("path",{d:"M19,14a3,3,0,1,0-3-3A3,3,0,0,0,19,14Zm0-4a1,1,0,1,1-1,1A1,1,0,0,1,19,10Z"})),eA||(eA=tU.createElement("path",{d:"M26,4H6A2,2,0,0,0,4,6V26a2,2,0,0,0,2,2H26a2,2,0,0,0,2-2V6A2,2,0,0,0,26,4Zm0,22H6V20l5-5,5.59,5.59a2,2,0,0,0,2.82,0L21,19l5,5Zm0-4.83-3.59-3.59a2,2,0,0,0-2.82,0L18,19.17l-5.59-5.59a2,2,0,0,0-2.82,0L6,17.17V6H26Z"})),n)}),rw=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,rv);return tU.createElement(tX,t$({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eP||(eP=tU.createElement("path",{d:"M29.53,6.15a1,1,0,0,0-1,0L20,10.38V7a1,1,0,0,0-1.45-.89L10,10.38V3A1,1,0,0,0,9,2H3A1,1,0,0,0,2,3V28H30V7A1,1,0,0,0,29.53,6.15ZM22,26H18V19h4Zm6,0H24V18a1,1,0,0,0-1-1H17a1,1,0,0,0-1,1v8H4V4H8v9.62l10-5v5l10-5Z"})),n)}),rj=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,rg);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eN||(eN=tU.createElement("path",{d:"M8.5 11L8.5 6.5 6.5 6.5 6.5 7.5 7.5 7.5 7.5 11 6 11 6 12 10 12 10 11zM8 3.5c-.4 0-.8.3-.8.8S7.6 5 8 5c.4 0 .8-.3.8-.8S8.4 3.5 8 3.5z"})),eR||(eR=tU.createElement("path",{d:"M8,15c-3.9,0-7-3.1-7-7s3.1-7,7-7s7,3.1,7,7S11.9,15,8,15z M8,2C4.7,2,2,4.7,2,8s2.7,6,6,6s6-2.7,6-6S11.3,2,8,2z"})),n)}),rE=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,ry);return tU.createElement(tX,t$({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eD||(eD=tU.createElement("path",{d:"M29.88,15.52l-6-11A1,1,0,0,0,23,4H9a1,1,0,0,0-.88.52l-6,11a1,1,0,0,0,0,1l6,11A1,1,0,0,0,9,28H23a1,1,0,0,0,.88-.52l6-11A1,1,0,0,0,29.88,15.52ZM22.93,7l4.39,8h-9.5ZM16,14.14,10.82,6H21.18ZM9.07,7l5.11,8H4.68ZM4.68,17h9.5L9.07,25ZM16,17.86,21.18,26H10.82ZM22.93,25l-5.11-8h9.5Z"})),n)}),rk=["children"],rS=["children"],r_=["children"],rC=["children"],rO=["children"],rM=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,rk);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eL||(eL=tU.createElement("path",{d:"M13,14H3c-0.6,0-1-0.4-1-1V3c0-0.6,0.4-1,1-1h5v1H3v10h10V8h1v5C14,13.6,13.6,14,13,14z"})),eF||(eF=tU.createElement("path",{d:"M10 1L10 2 13.3 2 9 6.3 9.7 7 14 2.7 14 6 15 6 15 1z"})),n)}),rT=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,rS);return tU.createElement(tX,t$({width:20,height:20,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),ez||(ez=tU.createElement("path",{d:"M29.25,6.76a6,6,0,0,0-8.5,0l1.42,1.42a4,4,0,1,1,5.67,5.67l-8,8a4,4,0,1,1-5.67-5.66l1.41-1.42-1.41-1.42-1.42,1.42a6,6,0,0,0,0,8.5A6,6,0,0,0,17,25a6,6,0,0,0,4.27-1.76l8-8A6,6,0,0,0,29.25,6.76Z"})),eV||(eV=tU.createElement("path",{d:"M4.19,24.82a4,4,0,0,1,0-5.67l8-8a4,4,0,0,1,5.67,0A3.94,3.94,0,0,1,19,14a4,4,0,0,1-1.17,2.85L15.71,19l1.42,1.42,2.12-2.12a6,6,0,0,0-8.51-8.51l-8,8a6,6,0,0,0,0,8.51A6,6,0,0,0,7,28a6.07,6.07,0,0,0,4.28-1.76L9.86,24.82A4,4,0,0,1,4.19,24.82Z"})),n)}),rA=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,r_);return tU.createElement(tX,t$({width:32,height:32,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eI||(eI=tU.createElement("path",{d:"M16 8H30V10H16zM6 10.59L3.41 8 2 9.41 6 13.41 14 5.41 12.59 4 6 10.59zM16 22H30V24H16zM6 24.59L3.41 22 2 23.41 6 27.41 14 19.41 12.59 18 6 24.59z"})),n)}),rP=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,rC);return tU.createElement(tX,t$({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eZ||(eZ=tU.createElement("path",{d:"M16 8H30V10H16zM6 10.59L3.41 8 2 9.41 6 13.41 14 5.41 12.59 4 6 10.59zM16 22H30V24H16zM6 24.59L3.41 22 2 23.41 6 27.41 14 19.41 12.59 18 6 24.59z"})),n)}),rN=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,rO);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eB||(eB=tU.createElement("path",{d:"M16 8H30V10H16zM6 10.59L3.41 8 2 9.41 6 13.41 14 5.41 12.59 4 6 10.59zM16 22H30V24H16zM6 24.59L3.41 22 2 23.41 6 27.41 14 19.41 12.59 18 6 24.59z"})),n)}),rR=["children"],rD=["children"],rL=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,rR);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eH||(eH=tU.createElement("path",{d:"M13.647,14.907a1.4482,1.4482,0,1,0,1.326,1.443A1.385,1.385,0,0,0,13.647,14.907Zm4.745,0a1.4482,1.4482,0,1,0,1.326,1.443A1.385,1.385,0,0,0,18.392,14.907Z"})),eU||(eU=tU.createElement("path",{d:"M24.71,4H7.29A2.6714,2.6714,0,0,0,4.625,6.678V24.254A2.6714,2.6714,0,0,0,7.29,26.932H22.032l-.689-2.405,1.664,1.547L24.58,27.53,27.375,30V6.678A2.6714,2.6714,0,0,0,24.71,4ZM19.692,20.978s-.468-.559-.858-1.053a4.1021,4.1021,0,0,0,2.353-1.547,7.4391,7.4391,0,0,1-1.495.767,8.5564,8.5564,0,0,1-1.885.559,9.1068,9.1068,0,0,1-3.367-.013,10.9127,10.9127,0,0,1-1.911-.559,7.6184,7.6184,0,0,1-.949-.442c-.039-.026-.078-.039-.117-.065a.18.18,0,0,1-.052-.039c-.234-.13-.364-.221-.364-.221a4.0432,4.0432,0,0,0,2.275,1.534c-.39.494-.871,1.079-.871,1.079a4.7134,4.7134,0,0,1-3.965-1.976,17.409,17.409,0,0,1,1.872-7.579,6.4285,6.4285,0,0,1,3.653-1.365l.13.156a8.77,8.77,0,0,0-3.419,1.703s.286-.156.767-.377a9.7625,9.7625,0,0,1,2.951-.819,1.2808,1.2808,0,0,1,.221-.026,11,11,0,0,1,2.626-.026A10.5971,10.5971,0,0,1,21.2,11.917a8.6518,8.6518,0,0,0-3.237-1.651l.182-.208a6.4285,6.4285,0,0,1,3.653,1.365,17.409,17.409,0,0,1,1.872,7.579A4.752,4.752,0,0,1,19.692,20.978Z"})),n)}),rF=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,rD);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eW||(eW=tU.createElement("path",{fillRule:"evenodd",d:"M16,2a14,14,0,0,0-4.43,27.28c.7.13,1-.3,1-.67s0-1.21,0-2.38c-3.89.84-4.71-1.88-4.71-1.88A3.71,3.71,0,0,0,6.24,22.3c-1.27-.86.1-.85.1-.85A2.94,2.94,0,0,1,8.48,22.9a3,3,0,0,0,4.08,1.16,2.93,2.93,0,0,1,.88-1.87c-3.1-.36-6.37-1.56-6.37-6.92a5.4,5.4,0,0,1,1.44-3.76,5,5,0,0,1,.14-3.7s1.17-.38,3.85,1.43a13.3,13.3,0,0,1,7,0c2.67-1.81,3.84-1.43,3.84-1.43a5,5,0,0,1,.14,3.7,5.4,5.4,0,0,1,1.44,3.76c0,5.38-3.27,6.56-6.39,6.91a3.33,3.33,0,0,1,.95,2.59c0,1.87,0,3.38,0,3.84s.25.81,1,.67A14,14,0,0,0,16,2Z"})),n)}),rz=["children"],rV=["children"],rI=["children"],rZ=["children"],rB=["children"],rH=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,rz);return tU.createElement(tX,t$({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eq||(eq=tU.createElement("path",{d:"M16.59 20.41L20.17 24 20.17 24 16.58 27.59 18 29 23 24 18 19 16.59 20.41zM23.59 20.41L27.17 24 27.17 24 23.58 27.59 25 29 30 24 25 19 23.59 20.41z"})),e$||(e$=tU.createElement("path",{d:"M14,23H4V7.91l11.43,7.91a1,1,0,0,0,1.14,0L28,7.91V17h2V7a2,2,0,0,0-2-2H4A2,2,0,0,0,2,7V23a2,2,0,0,0,2,2H14ZM25.8,7,16,13.78,6.2,7Z"})),n)}),rU=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,rV);return tU.createElement(tX,t$({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eK||(eK=tU.createElement("path",{d:"M25.3943,24a7.8772,7.8772,0,0,0-1.6707-8.5684,3.918,3.918,0,0,0-1.0844-4.414l2.7759-2.7759a2.0025,2.0025,0,0,0,0-2.8286L22.5869,2.5849a2.0021,2.0021,0,0,0-2.8286,0L6.5859,15.7573a2.0027,2.0027,0,0,0,0,2.8286l2.8282,2.8282a2.0024,2.0024,0,0,0,2.8286,0l4.7749-4.7754a3.9329,3.9329,0,0,0,5.5139.4326A5.9442,5.9442,0,0,1,23.1775,24H16v4H4v2H28V24ZM10.8281,20,8,17.1714,9.8787,15.293l2.8283,2.8281ZM16,14a3.9811,3.9811,0,0,0,.0762.7524L14.1211,16.707l-2.8284-2.8281,9.88-9.88L24.001,6.8271l-3.2488,3.2491A3.9771,3.9771,0,0,0,16,14Zm4,2a2,2,0,1,1,2-2A2.0023,2.0023,0,0,1,20,16Zm6,12H18V26h8Z"})),n)}),rW=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,rI);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eY||(eY=tU.createElement("path",{d:"M8,1C4.1,1,1,4.1,1,8s3.1,7,7,7s7-3.1,7-7S11.9,1,8,1z M10.7,11.5L8,8.8l-2.7,2.7l-0.8-0.8L7.2,8L4.5,5.3l0.8-0.8L8,7.2 l2.7-2.7l0.8,0.8L8.8,8l2.7,2.7L10.7,11.5z"})),eG||(eG=tU.createElement("path",{d:"M10.7,11.5L8,8.8l-2.7,2.7l-0.8-0.8L7.2,8L4.5,5.3l0.8-0.8L8,7.2l2.7-2.7l0.8,0.8L8.8,8 l2.7,2.7L10.7,11.5z","data-icon-path":"inner-path",opacity:"0"})),n)}),rq=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,rZ);return tU.createElement(tX,t$({width:32,height:32,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eX||(eX=tU.createElement("path",{d:"M16,2C8.2,2,2,8.2,2,16s6.2,14,14,14s14-6.2,14-14S23.8,2,16,2z M16,28C9.4,28,4,22.6,4,16S9.4,4,16,4s12,5.4,12,12 S22.6,28,16,28z"})),eJ||(eJ=tU.createElement("path",{d:"M21.4 23L16 17.6 10.6 23 9 21.4 14.4 16 9 10.6 10.6 9 16 14.4 21.4 9 23 10.6 17.6 16 23 21.4z"})),n)}),r$=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,rB);return tU.createElement(tX,t$({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eQ||(eQ=tU.createElement("path",{d:"M2 22H30V24H2zM2 26H30V28H2zM24 10a2 2 0 102 2 2 2 0 00-2-2zM16 16a4 4 0 114-4A4.0045 4.0045 0 0116 16zm0-6a2 2 0 102 2A2.002 2.002 0 0016 10zM8 10a2 2 0 102 2 2 2 0 00-2-2z"})),e0||(e0=tU.createElement("path",{d:"M28,20H4a2.0051,2.0051,0,0,1-2-2V6A2.0051,2.0051,0,0,1,4,4H28a2.0051,2.0051,0,0,1,2,2V18A2.0027,2.0027,0,0,1,28,20ZM28,6H4V18H28Z"})),n)}),rK=["children"],rY=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,rK);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),e1||(e1=tU.createElement("circle",{cx:"21",cy:"26",r:"2"})),e2||(e2=tU.createElement("circle",{cx:"21",cy:"6",r:"2"})),e4||(e4=tU.createElement("circle",{cx:"4",cy:"16",r:"2"})),e3||(e3=tU.createElement("path",{d:"M28,12a3.9962,3.9962,0,0,0-3.8579,3H19.8579a3.9655,3.9655,0,0,0-5.4914-2.6426L11.19,8.3872A3.9626,3.9626,0,0,0,12,6a4,4,0,1,0-4,4,3.96,3.96,0,0,0,1.6338-.3574l3.176,3.97a3.9239,3.9239,0,0,0,0,4.7744l-3.1758,3.97A3.96,3.96,0,0,0,8,22a4,4,0,1,0,4,4,3.9624,3.9624,0,0,0-.81-2.3872l3.1758-3.97A3.9658,3.9658,0,0,0,19.8579,17h4.2842A3.9934,3.9934,0,1,0,28,12ZM6,6A2,2,0,1,1,8,8,2.0023,2.0023,0,0,1,6,6ZM8,28a2,2,0,1,1,2-2A2.0023,2.0023,0,0,1,8,28Zm8-10a2,2,0,1,1,2-2A2.0023,2.0023,0,0,1,16,18Zm12,0a2,2,0,1,1,2-2A2.0023,2.0023,0,0,1,28,18Z"})),n)}),rG=["children"],rX=["children"],rJ=["children"],rQ=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,rG);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),e5||(e5=tU.createElement("path",{d:"M14 16L24 6 25.4 7.4 16.8 16 25.4 24.6 24 26zM8 4H10V28H8z"})),n)}),r0=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,rX);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),e6||(e6=tU.createElement("path",{d:"M18 16L8 26 6.6 24.6 15.2 16 6.6 7.4 8 6zM22 4H24V28H22z"})),n)}),r1=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,rJ);return tU.createElement(tX,t$({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),e8||(e8=tU.createElement("path",{d:"M21,2a8.9977,8.9977,0,0,0-8.6119,11.6118L2,24v6H8L18.3881,19.6118A9,9,0,1,0,21,2Zm0,16a7.0125,7.0125,0,0,1-2.0322-.3022L17.821,17.35l-.8472.8472-3.1811,3.1812L12.4141,20,11,21.4141l1.3787,1.3786-1.5859,1.586L9.4141,23,8,24.4141l1.3787,1.3786L7.1716,28H4V24.8284l9.8023-9.8023.8472-.8474-.3473-1.1467A7,7,0,1,1,21,18Z"})),e7||(e7=tU.createElement("circle",{cx:"22",cy:"10",r:"2"})),n)}),r2=["children"],r4=["children"],r3=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,r2);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),e9||(e9=tU.createElement("path",{d:"M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2ZM8,18a2,2,0,1,1,2-2A2,2,0,0,1,8,18Zm8,0a2,2,0,1,1,2-2A2,2,0,0,1,16,18Zm8,0a2,2,0,1,1,2-2A2,2,0,0,1,24,18Z"})),te||(te=tU.createElement("path",{fill:"none",d:"M10,16a2,2,0,1,1-2-2A2,2,0,0,1,10,16Zm6-2a2,2,0,1,0,2,2A2,2,0,0,0,16,14Zm8,0a2,2,0,1,0,2,2A2,2,0,0,0,24,14Z","data-icon-path":"inner-path"})),n)}),r5=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,r4);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),tt||(tt=tU.createElement("path",{d:"M29.37,14.75,20,10V6a4,4,0,0,0-8,0v4L2.63,14.75a1,1,0,0,0-.63.93v5a1,1,0,0,0,1,1,1,1,0,0,0,.29-.05L12,18v5L8.55,24.72a1,1,0,0,0-.55.9V29a1,1,0,0,0,1,1,.9.9,0,0,0,.28,0L16,28l6.72,2A.9.9,0,0,0,23,30a1,1,0,0,0,1-1V25.62a1,1,0,0,0-.55-.9L20,23V18l8.71,3.61a1,1,0,0,0,.29.05,1,1,0,0,0,1-1v-5A1,1,0,0,0,29.37,14.75ZM28,19.15,18,15v9.24l4,2v1.43l-6-1.75-6,1.75V26.24l4-2V15L4,19.15V16.3l10-5.07V6a2,2,0,0,1,4,0v5.23L28,16.3Z"})),n)}),r6=["children"],r8=["children"],r7=["children"],r9=["children"],ie=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,r6);return tU.createElement(tX,t$({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),tn||(tn=tU.createElement("path",{d:"M30 18A6 6 0 1020 22.46v7.54l4-1.8926 4 1.8926V22.46A5.98 5.98 0 0030 18zm-4 8.84l-2-.9467L22 26.84V23.65a5.8877 5.8877 0 004 0zM24 22a4 4 0 114-4A4.0045 4.0045 0 0124 22zM9 14H16V16H9zM9 8H19V10H9z"})),tr||(tr=tU.createElement("path",{d:"M6,30a2.0021,2.0021,0,0,1-2-2V4A2.0021,2.0021,0,0,1,6,2H22a2.0021,2.0021,0,0,1,2,2V8H22V4H6V28H16v2Z"})),n)}),it=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,r8);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),ti||(ti=tU.createElement("circle",{cx:"11",cy:"15.5",r:"1.5"})),to||(to=tU.createElement("path",{d:"M12,12H10V8h2a2,2,0,0,0,0-4H10A2.0023,2.0023,0,0,0,8,6v.5H6V6a4.0045,4.0045,0,0,1,4-4h2a4,4,0,0,1,0,8Z"})),ta||(ta=tU.createElement("path",{d:"M22.4479,21.0337A10.971,10.971,0,0,0,19.9211,4.7446l-.999,1.73A8.9967,8.9967,0,1,1,5,14H3a10.9916,10.9916,0,0,0,18.0338,8.4478L28.5859,30,30,28.5859Z"})),n)}),ir=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,r7);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),ts||(ts=tU.createElement("path",{d:"M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2Zm0,26A12,12,0,1,1,28,16,12,12,0,0,1,16,28Z"})),n)}),ii=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,r9);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),tl||(tl=tU.createElement("path",{d:"M20.59 22L15 16.41 15 7 17 7 17 15.58 22 20.59 20.59 22z"})),tu||(tu=tU.createElement("path",{d:"M16,2A13.94,13.94,0,0,0,6,6.23V2H4v8h8V8H7.08A12,12,0,1,1,4,16H2A14,14,0,1,0,16,2Z"})),n)}),io=["children"],ia=["children"],is=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,io);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),tc||(tc=tU.createElement("path",{d:"M18,28A12,12,0,1,0,6,16v6.2L2.4,18.6,1,20l6,6,6-6-1.4-1.4L8,22.2V16H8A10,10,0,1,1,18,26Z"})),n)}),il=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,ia);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),td||(td=tU.createElement("path",{d:"M13.9,4.6l-2.5-2.5C11.3,2.1,11.1,2,11,2H3C2.4,2,2,2.4,2,3v10c0,0.6,0.4,1,1,1h10c0.6,0,1-0.4,1-1V5 C14,4.9,13.9,4.7,13.9,4.6z M6,3h4v2H6V3z M10,13H6V9h4V13z M11,13V9c0-0.6-0.4-1-1-1H6C5.4,8,5,8.4,5,9v4H3V3h2v2c0,0.6,0.4,1,1,1 h4c0.6,0,1-0.4,1-1V3.2l2,2V13H11z"})),n)}),iu=["children"],ic=["children"],id=["children"],ih=["children"],ip=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,iu);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),tf||(tf=tU.createElement("path",{d:"M28,4H4A2,2,0,0,0,2,6V22a2,2,0,0,0,2,2h8v4H8v2H24V28H20V24h8a2,2,0,0,0,2-2V6A2,2,0,0,0,28,4ZM18,28H14V24h4Zm10-6H4V6H28Z"})),n)}),im=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,ic);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),th||(th=tU.createElement("path",{d:"M15,14.3L10.7,10c1.9-2.3,1.6-5.8-0.7-7.7S4.2,0.7,2.3,3S0.7,8.8,3,10.7c2,1.7,5,1.7,7,0l4.3,4.3L15,14.3z M2,6.5 C2,4,4,2,6.5,2S11,4,11,6.5S9,11,6.5,11S2,9,2,6.5z"})),n)}),iv=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,id);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),tp||(tp=tU.createElement("path",{d:"M13.5,8.4c0-0.1,0-0.3,0-0.4c0-0.1,0-0.3,0-0.4l1-0.8c0.4-0.3,0.4-0.9,0.2-1.3l-1.2-2C13.3,3.2,13,3,12.6,3 c-0.1,0-0.2,0-0.3,0.1l-1.2,0.4c-0.2-0.1-0.4-0.3-0.7-0.4l-0.3-1.3C10.1,1.3,9.7,1,9.2,1H6.8c-0.5,0-0.9,0.3-1,0.8L5.6,3.1 C5.3,3.2,5.1,3.3,4.9,3.4L3.7,3C3.6,3,3.5,3,3.4,3C3,3,2.7,3.2,2.5,3.5l-1.2,2C1.1,5.9,1.2,6.4,1.6,6.8l0.9,0.9c0,0.1,0,0.3,0,0.4 c0,0.1,0,0.3,0,0.4L1.6,9.2c-0.4,0.3-0.5,0.9-0.2,1.3l1.2,2C2.7,12.8,3,13,3.4,13c0.1,0,0.2,0,0.3-0.1l1.2-0.4 c0.2,0.1,0.4,0.3,0.7,0.4l0.3,1.3c0.1,0.5,0.5,0.8,1,0.8h2.4c0.5,0,0.9-0.3,1-0.8l0.3-1.3c0.2-0.1,0.4-0.2,0.7-0.4l1.2,0.4 c0.1,0,0.2,0.1,0.3,0.1c0.4,0,0.7-0.2,0.9-0.5l1.1-2c0.2-0.4,0.2-0.9-0.2-1.3L13.5,8.4z M12.6,12l-1.7-0.6c-0.4,0.3-0.9,0.6-1.4,0.8 L9.2,14H6.8l-0.4-1.8c-0.5-0.2-0.9-0.5-1.4-0.8L3.4,12l-1.2-2l1.4-1.2c-0.1-0.5-0.1-1.1,0-1.6L2.2,6l1.2-2l1.7,0.6 C5.5,4.2,6,4,6.5,3.8L6.8,2h2.4l0.4,1.8c0.5,0.2,0.9,0.5,1.4,0.8L12.6,4l1.2,2l-1.4,1.2c0.1,0.5,0.1,1.1,0,1.6l1.4,1.2L12.6,12z"})),tm||(tm=tU.createElement("path",{d:"M8,11c-1.7,0-3-1.3-3-3s1.3-3,3-3s3,1.3,3,3C11,9.6,9.7,11,8,11C8,11,8,11,8,11z M8,6C6.9,6,6,6.8,6,7.9C6,7.9,6,8,6,8 c0,1.1,0.8,2,1.9,2c0,0,0.1,0,0.1,0c1.1,0,2-0.8,2-1.9c0,0,0-0.1,0-0.1C10,6.9,9.2,6,8,6C8.1,6,8,6,8,6z"})),n)}),ig=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,ih);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),tv||(tv=tU.createElement("path",{d:"M30 8h-4.1c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2v2h14.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30V8zM21 12c-1.7 0-3-1.3-3-3s1.3-3 3-3 3 1.3 3 3S22.7 12 21 12zM2 24h4.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30v-2H15.9c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2V24zM11 20c1.7 0 3 1.3 3 3s-1.3 3-3 3-3-1.3-3-3S9.3 20 11 20z"})),n)}),iy=["children"],ib=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,iy);return tU.createElement(tX,t$({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),tg||(tg=tU.createElement("path",{d:"M8 15H24V17H8z"})),n)}),ix=["children"],iw=["children"],ij=["children"],iE=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,ix);return tU.createElement(tX,t$({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),ty||(ty=tU.createElement("path",{d:"M23,9h6a2,2,0,0,0,2-2V3a2,2,0,0,0-2-2H23a2,2,0,0,0-2,2V4H11V3A2,2,0,0,0,9,1H3A2,2,0,0,0,1,3V7A2,2,0,0,0,3,9H9a2,2,0,0,0,2-2V6h4V26a2.0023,2.0023,0,0,0,2,2h4v1a2,2,0,0,0,2,2h6a2,2,0,0,0,2-2V25a2,2,0,0,0-2-2H23a2,2,0,0,0-2,2v1H17V17h4v1a2,2,0,0,0,2,2h6a2,2,0,0,0,2-2V14a2,2,0,0,0-2-2H23a2,2,0,0,0-2,2v1H17V6h4V7A2,2,0,0,0,23,9Zm0-6h6V7H23ZM9,7H3V3H9ZM23,25h6v4H23Zm0-11h6v4H23Z",transform:"translate(0 .005)"})),n)}),ik=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,iw);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),tb||(tb=tU.createElement("path",{d:"M29.391,14.527L17.473,2.609C17.067,2.203,16.533,2,16,2s-1.067,0.203-1.473,0.609L2.609,14.527C2.203,14.933,2,15.466,2,16 s0.203,1.067,0.609,1.473l11.917,11.917C14.933,29.797,15.467,30,16,30s1.067-0.203,1.473-0.609l11.917-11.917 C29.797,17.067,30,16.534,30,16S29.797,14.933,29.391,14.527z M21,18H11v-4h10V18z"})),tx||(tx=tU.createElement("path",{fill:"none",d:"M11 14H21V18H11z","data-icon-path":"inner-path"})),n)}),iS=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,ij);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),tw||(tw=tU.createElement("path",{d:"M3 9L3.7 9.7 7.5 5.9 7.5 15 8.5 15 8.5 5.9 12.3 9.7 13 9 8 4zM3 4V2h10v2h1V2c0-.6-.4-1-1-1H3C2.4 1 2 1.4 2 2v2H3z"})),n)}),i_=["children"],iC=["children"],iO=["children"],iM=["children"],iT=["children"],iA=["children"],iP=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,i_);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),tj||(tj=tU.createElement("path",{d:"M21,26H4a2,2,0,0,1-2-2V8A2,2,0,0,1,4,6H21a2,2,0,0,1,2,2v4.06l5.42-3.87A1,1,0,0,1,30,9V23a1,1,0,0,1-1.58.81L23,19.94V24A2,2,0,0,1,21,26ZM4,8V24H21V18a1,1,0,0,1,1.58-.81L28,21.06V10.94l-5.42,3.87A1,1,0,0,1,21,14V8Z"})),n)}),iN=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,iC);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),tE||(tE=tU.createElement("path",{d:"M15.5,7.8C14.3,4.7,11.3,2.6,8,2.5C4.7,2.6,1.7,4.7,0.5,7.8c0,0.1,0,0.2,0,0.3c1.2,3.1,4.1,5.2,7.5,5.3 c3.3-0.1,6.3-2.2,7.5-5.3C15.5,8.1,15.5,7.9,15.5,7.8z M8,12.5c-2.7,0-5.4-2-6.5-4.5c1-2.5,3.8-4.5,6.5-4.5s5.4,2,6.5,4.5 C13.4,10.5,10.6,12.5,8,12.5z"})),tk||(tk=tU.createElement("path",{d:"M8,5C6.3,5,5,6.3,5,8s1.3,3,3,3s3-1.3,3-3S9.7,5,8,5z M8,10c-1.1,0-2-0.9-2-2s0.9-2,2-2s2,0.9,2,2S9.1,10,8,10z"})),n)}),iR=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,iO);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),tS||(tS=tU.createElement("path",{d:"M2.6,11.3l0.7-0.7C2.6,9.8,1.9,9,1.5,8c1-2.5,3.8-4.5,6.5-4.5c0.7,0,1.4,0.1,2,0.4l0.8-0.8C9.9,2.7,9,2.5,8,2.5 C4.7,2.6,1.7,4.7,0.5,7.8c0,0.1,0,0.2,0,0.3C1,9.3,1.7,10.4,2.6,11.3z"})),t_||(t_=tU.createElement("path",{d:"M6 7.9c.1-1 .9-1.8 1.8-1.8l.9-.9C7.2 4.7 5.5 5.6 5.1 7.2 5 7.7 5 8.3 5.1 8.8L6 7.9zM15.5 7.8c-.6-1.5-1.6-2.8-2.9-3.7L15 1.7 14.3 1 1 14.3 1.7 15l2.6-2.6c1.1.7 2.4 1 3.7 1.1 3.3-.1 6.3-2.2 7.5-5.3C15.5 8.1 15.5 7.9 15.5 7.8zM10 8c0 1.1-.9 2-2 2-.3 0-.7-.1-1-.3L9.7 7C9.9 7.3 10 7.6 10 8zM8 12.5c-1 0-2.1-.3-3-.8l1.3-1.3c1.4.9 3.2.6 4.2-.8.7-1 .7-2.4 0-3.4l1.4-1.4c1.1.8 2 1.9 2.6 3.2C13.4 10.5 10.6 12.5 8 12.5z"})),n)}),iD=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,iM);return tU.createElement(tX,t$({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),tC||(tC=tU.createElement("path",{d:"M22 17H24V19H22z"})),tO||(tO=tU.createElement("path",{d:"M28,8H4V5H26V3H4A2,2,0,0,0,2,5V26a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10A2,2,0,0,0,28,8ZM4,26V10H28v3H20a2,2,0,0,0-2,2v6a2,2,0,0,0,2,2h8v3ZM28,15v6H20V15Z"})),n)}),iL=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,iT);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),tM||(tM=tU.createElement("path",{d:"M8,1C4.1,1,1,4.1,1,8s3.1,7,7,7s7-3.1,7-7S11.9,1,8,1z M8,14c-3.3,0-6-2.7-6-6s2.7-6,6-6s6,2.7,6,6S11.3,14,8,14z"})),tT||(tT=tU.createElement("path",{d:"M7.5 4H8.5V9H7.5zM8 10.2c-.4 0-.8.3-.8.8s.3.8.8.8c.4 0 .8-.3.8-.8S8.4 10.2 8 10.2z"})),n)}),iF=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,iA);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),tA||(tA=tU.createElement("path",{d:"M8,1C4.2,1,1,4.2,1,8s3.2,7,7,7s7-3.1,7-7S11.9,1,8,1z M7.5,4h1v5h-1C7.5,9,7.5,4,7.5,4z M8,12.2 c-0.4,0-0.8-0.4-0.8-0.8s0.3-0.8,0.8-0.8c0.4,0,0.8,0.4,0.8,0.8S8.4,12.2,8,12.2z"})),tP||(tP=tU.createElement("path",{d:"M7.5,4h1v5h-1C7.5,9,7.5,4,7.5,4z M8,12.2c-0.4,0-0.8-0.4-0.8-0.8s0.3-0.8,0.8-0.8 c0.4,0,0.8,0.4,0.8,0.8S8.4,12.2,8,12.2z","data-icon-path":"inner-path",opacity:"0"})),n)}),iz=["children"],iV=["children"],iI=["children"],iZ=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,iz);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),tN||(tN=tU.createElement("path",{d:"M26.0022,4H5.998A1.998,1.998,0,0,0,4,5.998V26.002A1.998,1.998,0,0,0,5.998,28H26.0022A1.9979,1.9979,0,0,0,28,26.002V5.998A1.9979,1.9979,0,0,0,26.0022,4ZM14.8752,8h2.25V18h-2.25ZM16,24a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,16,24Z"})),tR||(tR=tU.createElement("path",{fill:"none",d:"M14.8751,8h2.25V18h-2.25ZM16,24a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,16,24Z","data-icon-path":"inner-path"})),n)}),iB=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,iV);return tU.createElement(tX,t$({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),tD||(tD=tU.createElement("path",{d:"M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2ZM28,15H22A24.26,24.26,0,0,0,19.21,4.45,12,12,0,0,1,28,15ZM16,28a5,5,0,0,1-.67,0A21.85,21.85,0,0,1,12,17H20a21.85,21.85,0,0,1-3.3,11A5,5,0,0,1,16,28ZM12,15a21.85,21.85,0,0,1,3.3-11,6,6,0,0,1,1.34,0A21.85,21.85,0,0,1,20,15Zm.76-10.55A24.26,24.26,0,0,0,10,15h-6A12,12,0,0,1,12.79,4.45ZM4.05,17h6a24.26,24.26,0,0,0,2.75,10.55A12,12,0,0,1,4.05,17ZM19.21,27.55A24.26,24.26,0,0,0,22,17h6A12,12,0,0,1,19.21,27.55Z"})),n)}),iH=tU.forwardRef(function(e,t){var n=e.children,r=tK(e,iI);return tU.createElement(tX,t$({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),tL||(tL=tU.createElement("path",{d:"M29.3164,8.0513l-18-6A1,1,0,0,0,10.4,2.2L4,7V2H2V30H4V11l6.4,4.8a1,1,0,0,0,.9165.1489l18-6a1,1,0,0,0,0-1.8974ZM10,13,4.6665,9,10,5Zm4-.0542-2,.667V4.3872l2,.667Zm4-1.333-2,.6665V5.7207l2,.6665Zm2-.667V7.0542L25.8379,9Z"})),tF||(tF=tU.createElement("path",{d:"M20,22a4,4,0,0,0-8,0h2a2,2,0,1,1,2,2H8v2h8A4.0045,4.0045,0,0,0,20,22Z"})),tz||(tz=tU.createElement("path",{d:"M26,22a4.0045,4.0045,0,0,0-4,4h2a2,2,0,1,1,2,2H12v2H26a4,4,0,0,0,0-8Z"})),n)}),iU=n(52322);function iW(e){let{size:t=24}=e;return(0,iU.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:t,width:t,fill:"currentColor",viewBox:"0 0 448 512",children:(0,iU.jsx)("path",{d:"M96 152v8H48v-8C48 68.1 116.1 0 200 0h48c83.9 0 152 68.1 152 152v8H352v-8c0-57.4-46.6-104-104-104H200C142.6 48 96 94.6 96 152zM0 224c0-17.7 14.3-32 32-32H416c17.7 0 32 14.3 32 32s-14.3 32-32 32h-5.1L388.5 469c-2.6 24.4-23.2 43-47.7 43H107.2c-24.6 0-45.2-18.5-47.7-43L37.1 256H32c-17.7 0-32-14.3-32-32z"})})}function iq(e){let{size:t=24}=e;return(0,iU.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:"currentColor",viewBox:"0 0 512 512",children:(0,iU.jsx)("path",{d:"M464 64C490.5 64 512 85.49 512 112V176C512 202.5 490.5 224 464 224H48C21.49 224 0 202.5 0 176V112C0 85.49 21.49 64 48 64H464zM448 128H320V160H448V128zM464 288C490.5 288 512 309.5 512 336V400C512 426.5 490.5 448 464 448H48C21.49 448 0 426.5 0 400V336C0 309.5 21.49 288 48 288H464zM192 352V384H448V352H192z"})})}function i$(e){let{size:t=24,className:n}=e;return(0,iU.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,className:n,fill:"currentColor",viewBox:"0 0 384 512",children:(0,iU.jsx)("path",{d:"M256 0v128h128L256 0zM224 128L224 0H48C21.49 0 0 21.49 0 48v416C0 490.5 21.49 512 48 512h288c26.51 0 48-21.49 48-48V160h-127.1C238.3 160 224 145.7 224 128zM64 72C64 67.63 67.63 64 72 64h80C156.4 64 160 67.63 160 72v16C160 92.38 156.4 96 152 96h-80C67.63 96 64 92.38 64 88V72zM64 136C64 131.6 67.63 128 72 128h80C156.4 128 160 131.6 160 136v16C160 156.4 156.4 160 152 160h-80C67.63 160 64 156.4 64 152V136zM304 384c8.875 0 16 7.125 16 16S312.9 416 304 416h-47.25c-16.38 0-31.25-9.125-38.63-23.88c-2.875-5.875-8-6.5-10.12-6.5s-7.25 .625-10 6.125l-7.75 15.38C187.6 412.6 181.1 416 176 416H174.9c-6.5-.5-12-4.75-14-11L144 354.6L133.4 386.5C127.5 404.1 111 416 92.38 416H80C71.13 416 64 408.9 64 400S71.13 384 80 384h12.38c4.875 0 9.125-3.125 10.62-7.625l18.25-54.63C124.5 311.9 133.6 305.3 144 305.3s19.5 6.625 22.75 16.5l13.88 41.63c19.75-16.25 54.13-9.75 66 14.12c2 4 6 6.5 10.12 6.5H304z"})})}function iK(e){let{size:t=24,className:n}=e;return(0,iU.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:"currentColor",viewBox:"0 0 512 512",className:n,children:(0,iU.jsx)("path",{d:"M464 288h-416C21.5 288 0 309.5 0 336v96C0 458.5 21.5 480 48 480h416c26.5 0 48-21.5 48-48v-96C512 309.5 490.5 288 464 288zM320 416c-17.62 0-32-14.38-32-32s14.38-32 32-32s32 14.38 32 32S337.6 416 320 416zM416 416c-17.62 0-32-14.38-32-32s14.38-32 32-32s32 14.38 32 32S433.6 416 416 416zM464 32h-416C21.5 32 0 53.5 0 80v192.4C13.41 262.3 29.92 256 48 256h416c18.08 0 34.59 6.254 48 16.41V80C512 53.5 490.5 32 464 32z"})})}function iY(e){let{size:t=24,className:n}=e;return(0,iU.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:t,width:t,className:n,fill:"currentColor",viewBox:"0 0 512 512",children:(0,iU.jsx)("path",{d:"M448 32C465.7 32 480 46.33 480 64C480 81.67 465.7 96 448 96H80C71.16 96 64 103.2 64 112C64 120.8 71.16 128 80 128H448C483.3 128 512 156.7 512 192V416C512 451.3 483.3 480 448 480H64C28.65 480 0 451.3 0 416V96C0 60.65 28.65 32 64 32H448zM416 336C433.7 336 448 321.7 448 304C448 286.3 433.7 272 416 272C398.3 272 384 286.3 384 304C384 321.7 398.3 336 416 336z"})})}function iG(e){let{size:t=24}=e;return(0,iU.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:"currentColor",viewBox:"0 0 448 512",children:(0,iU.jsx)("path",{d:"M80 192V144C80 64.47 144.5 0 224 0C303.5 0 368 64.47 368 144V192H384C419.3 192 448 220.7 448 256V448C448 483.3 419.3 512 384 512H64C28.65 512 0 483.3 0 448V256C0 220.7 28.65 192 64 192H80zM144 192H304V144C304 99.82 268.2 64 224 64C179.8 64 144 99.82 144 144V192z"})})}function iX(e){let{size:t=24}=e;return(0,iU.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:"currentColor",viewBox:"0 0 448 512",children:(0,iU.jsx)("path",{d:"M7.994 153.5c1.326 0 2.687 .3508 3.975 1.119L208 271.5v223.8c0 9.741-7.656 16.71-16.01 16.71c-2.688 0-5.449-.7212-8.05-2.303l-152.2-92.47C12.13 405.3 0 383.3 0 359.5v-197.7C0 156.1 3.817 153.5 7.994 153.5zM426.2 117.2c0 2.825-1.352 5.647-4.051 7.248L224 242.6L25.88 124.4C23.19 122.8 21.85 119.1 21.85 117.2c0-2.8 1.32-5.603 3.965-7.221l165.1-100.9C201.7 3.023 212.9 0 224 0s22.27 3.023 32.22 9.07l165.1 100.9C424.8 111.6 426.2 114.4 426.2 117.2zM440 153.5C444.2 153.5 448 156.1 448 161.8v197.7c0 23.75-12.12 45.75-31.78 57.69l-152.2 92.5C261.5 511.3 258.7 512 256 512C247.7 512 240 505 240 495.3V271.5l196-116.9C437.3 153.8 438.7 153.5 440 153.5z"})})}function iJ(e){let{size:t=24}=e;return(0,iU.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",width:t,height:t,fill:"currentColor",children:(0,iU.jsx)("path",{d:"M495.9 166.6C499.2 175.2 496.4 184.9 489.6 191.2L446.3 230.6C447.4 238.9 448 247.4 448 256C448 264.6 447.4 273.1 446.3 281.4L489.6 320.8C496.4 327.1 499.2 336.8 495.9 345.4C491.5 357.3 486.2 368.8 480.2 379.7L475.5 387.8C468.9 398.8 461.5 409.2 453.4 419.1C447.4 426.2 437.7 428.7 428.9 425.9L373.2 408.1C359.8 418.4 344.1 427 329.2 433.6L316.7 490.7C314.7 499.7 307.7 506.1 298.5 508.5C284.7 510.8 270.5 512 255.1 512C241.5 512 227.3 510.8 213.5 508.5C204.3 506.1 197.3 499.7 195.3 490.7L182.8 433.6C167 427 152.2 418.4 138.8 408.1L83.14 425.9C74.3 428.7 64.55 426.2 58.63 419.1C50.52 409.2 43.12 398.8 36.52 387.8L31.84 379.7C25.77 368.8 20.49 357.3 16.06 345.4C12.82 336.8 15.55 327.1 22.41 320.8L65.67 281.4C64.57 273.1 64 264.6 64 256C64 247.4 64.57 238.9 65.67 230.6L22.41 191.2C15.55 184.9 12.82 175.3 16.06 166.6C20.49 154.7 25.78 143.2 31.84 132.3L36.51 124.2C43.12 113.2 50.52 102.8 58.63 92.95C64.55 85.8 74.3 83.32 83.14 86.14L138.8 103.9C152.2 93.56 167 84.96 182.8 78.43L195.3 21.33C197.3 12.25 204.3 5.04 213.5 3.51C227.3 1.201 241.5 0 256 0C270.5 0 284.7 1.201 298.5 3.51C307.7 5.04 314.7 12.25 316.7 21.33L329.2 78.43C344.1 84.96 359.8 93.56 373.2 103.9L428.9 86.14C437.7 83.32 447.4 85.8 453.4 92.95C461.5 102.8 468.9 113.2 475.5 124.2L480.2 132.3C486.2 143.2 491.5 154.7 495.9 166.6V166.6zM256 336C300.2 336 336 300.2 336 255.1C336 211.8 300.2 175.1 256 175.1C211.8 175.1 176 211.8 176 255.1C176 300.2 211.8 336 256 336z"})})}function iQ(e){let{size:t=24}=e;return(0,iU.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",height:t,width:t,fill:"currentColor",children:(0,iU.jsx)("path",{d:"M448 80v48c0 44.2-100.3 80-224 80S0 172.2 0 128V80C0 35.8 100.3 0 224 0S448 35.8 448 80zM393.2 214.7c20.8-7.4 39.9-16.9 54.8-28.6V288c0 44.2-100.3 80-224 80S0 332.2 0 288V186.1c14.9 11.8 34 21.2 54.8 28.6C99.7 230.7 159.5 240 224 240s124.3-9.3 169.2-25.3zM0 346.1c14.9 11.8 34 21.2 54.8 28.6C99.7 390.7 159.5 400 224 400s124.3-9.3 169.2-25.3c20.8-7.4 39.9-16.9 54.8-28.6V432c0 44.2-100.3 80-224 80S0 476.2 0 432V346.1z"})})}function i0(e){let{size:t=24}=e;return(0,iU.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",height:t,width:t,fill:"currentColor",children:(0,iU.jsx)("path",{d:"M64 480H448c35.3 0 64-28.7 64-64V160c0-35.3-28.7-64-64-64H298.5c-17 0-33.3-6.7-45.3-18.7L226.7 50.7c-12-12-28.3-18.7-45.3-18.7H64C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64z"})})}function i1(e){let{size:t=24}=e;return(0,iU.jsxs)("svg",{version:"1.1",id:"icon",xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",width:t,height:t,fill:"currentColor",viewBox:"0 0 32 32",children:[(0,iU.jsx)("polygon",{points:"23,9.2 20.4,6.6 19,8 23,12 30,5 28.6,3.6 "}),(0,iU.jsx)("polygon",{points:"12,5.4 10.6,4 8,6.6 5.4,4 4,5.4 6.6,8 4,10.6 5.4,12 8,9.4 10.6,12 12,10.6 9.4,8 "}),(0,iU.jsx)("polygon",{points:"12,21.4 10.6,20 8,22.6 5.4,20 4,21.4 6.6,24 4,26.6 5.4,28 8,25.4 10.6,28 12,26.6 9.4,24 "}),(0,iU.jsx)("polygon",{points:"17,15 17,2 15,2 15,15 2,15 2,17 15,17 15,30 17,30 17,17 30,17 30,15 "}),(0,iU.jsx)("rect",{fill:"none",width:"32",height:"32"})]})}function i2(e){let{size:t=24}=e;return(0,iU.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:t,width:t,fill:"currentColor",viewBox:"0 0 448 512",children:(0,iU.jsx)("path",{d:"M224 0c-17.7 0-32 14.3-32 32V51.2C119 66 64 130.6 64 208v18.8c0 47-17.3 92.4-48.5 127.6l-7.4 8.3c-8.4 9.4-10.4 22.9-5.3 34.4S19.4 416 32 416H416c12.6 0 24-7.4 29.2-18.9s3.1-25-5.3-34.4l-7.4-8.3C401.3 319.2 384 273.9 384 226.8V208c0-77.4-55-142-128-156.8V32c0-17.7-14.3-32-32-32zm45.3 493.3c12-12 18.7-28.3 18.7-45.3H224 160c0 17 6.7 33.3 18.7 45.3s28.3 18.7 45.3 18.7s33.3-6.7 45.3-18.7z"})})}},9969:function(e,t,n){"use strict";n.d(t,{pz:function(){return ee},HI:function(){return o},Z7:function(){return q},Uy:function(){return $},e$:function(){return J},oe:function(){return Q},S0:function(){return et},YX:function(){return G},oV:function(){return L},sg:function(){return F},B$:function(){return D},d_:function(){return a},DQ:function(){return s},cq:function(){return N},IK:function(){return R},GP:function(){return P},nH:function(){return l},$:function(){return k},s2:function(){return O},ni:function(){return M},uf:function(){return _},Os:function(){return T},FV:function(){return E},wy:function(){return V},xw:function(){return Z},Jv:function(){return z},p$:function(){return ei},Iy:function(){return I},Q5:function(){return B},ZM:function(){return eo},f$:function(){return el},yu:function(){return H},KJ:function(){return U},og:function(){return K},Wl:function(){return d},cQ:function(){return c},ys:function(){return p},QL:function(){return h},Tu:function(){return m},aO:function(){return b},gU:function(){return g},a0:function(){return w},cg:function(){return y},Qq:function(){return v},RF:function(){return es}});var r=n(79381),i=n(2850);let o="/bus/state";function a(e){return(0,i.Nf)({...e,route:o})}function s(e){return(0,i.Nf)({...e,route:"/bus/consensus/state"})}function l(){let e=a({config:{swr:{revalidateOnFocus:!1}}}),t=(0,r.ZP)(e,()=>{var t;return(null===(t=e.data)||void 0===t?void 0:t.network)==="Zen Testnet"?(0,i.du)():(0,i.Tc)()},{refreshInterval:6e4,keepPreviousData:!0});return t.data||0}let u="/bus/syncer/peers";function c(e){return(0,i.Nf)({...e,route:u})}function d(e){return(0,i.mw)({...e,route:"/bus/syncer/connect"},async e=>{e(e=>e===u)})}let f="/bus/txpool/transactions";function h(e){return(0,i.Nf)({...e,route:f})}function p(e){return(0,i.mw)({...e,route:"/bus/txpool/broadcast"},async e=>{await (0,i.gw)(2e3),e(e=>e.startsWith(f)||e.startsWith(x))})}function m(e){return(0,i.Nf)({...e,route:"/bus/wallet"})}function v(e){return(0,i.Nf)({...e,route:"/bus/wallet/transactions"})}function g(e){return(0,i.mw)({...e,route:"/bus/wallet/fund"})}function y(e){return(0,i.mw)({...e,route:"/bus/wallet/sign"})}function b(e){return(0,i.mw)({...e,route:"/bus/wallet/discard"})}let x="/bus/wallet/pending";function w(e){return(0,i.Nf)({...e,route:x})}let j="/bus/search/hosts";function E(e){return(0,i.q0)({...e,route:j})}function k(e){return(0,i.Nf)({...e,route:"/bus/host/:hostKey"})}let S="/bus/hosts/blocklist";function _(e){return(0,i.Nf)({...e,route:S})}let C="/bus/hosts/allowlist";function O(e){return(0,i.Nf)({...e,route:C})}function M(e){return(0,i.V1)({...e,route:"/bus/hosts/allowlist"},async e=>{e(e=>!![j,C,A].find(t=>e.startsWith(t)))})}function T(e){return(0,i.V1)({...e,route:"/bus/hosts/blocklist"},async e=>{e(e=>!![j,S,A].find(t=>e.startsWith(t)))})}let A="/bus/contracts";function P(e){return(0,i.Nf)({...e,route:A})}function N(e){return(0,i.Nf)({...e,route:"/bus/contract/:id"})}function R(e){return(0,i.iv)({...e,route:"/bus/contracts/:id/delete"})}function D(e){return(0,i.Nf)({...e,route:"/bus/buckets"})}function L(e){return(0,i.mw)({...e,route:"/bus/buckets"},async e=>{e(e=>e.startsWith("/bus/buckets"))})}function F(e){return(0,i.iv)({...e,route:"/bus/buckets/:name"},async e=>{e(e=>e.startsWith("/bus/buckets"))})}function z(e){return(0,i.Nf)({...e,route:"/bus/objects/:key"})}function V(e){return(0,i.Nf)({...e,route:"/bus/objects/:key"})}function I(e){return(0,i.Nf)({...e,route:"/bus/search/objects"})}function Z(e){return(0,i.iv)({...e,route:"/bus/objects/:key"},async e=>{e(e=>e.startsWith("/bus/objects/"))})}function B(e){return(0,i.Nf)({...e,route:"/bus/stats/objects"})}function H(e){return(0,i.Nf)({...e,route:"/bus/setting/:key"})}function U(e){return(0,i.V1)({...e,route:"/bus/setting/:key"},async(e,t)=>{e(e=>e.startsWith("/bus/setting/".concat(t.params.key)))})}let W="/bus/alerts";function q(e){return(0,i.Nf)({...e,route:W})}function $(e){return(0,i.mw)({...e,route:"/bus/alerts/dismiss"},async e=>{e(e=>e.startsWith(W))})}function K(e){return(0,i.Nf)({...e,route:"/bus/slab/:key/objects"})}let Y="/autopilot/state";function G(e){return(0,i.Nf)({...e,route:Y})}let X="/autopilot/config";function J(e){return(0,i.Nf)({...e,route:X})}function Q(e){return(0,i.V1)({...e,route:X},async e=>{e(e=>e===X);let t=async()=>{await (0,i.gw)(1e3),e(e=>e===Y)};t()})}let ee="/autopilot/hosts";function et(e){return(0,i.q0)({...e,route:ee})}var en=n(54073),er=n.n(en);function ei(e){return(0,i.rB)({...e,route:"/worker/objects/:key"})}function eo(e){var t;return(0,i.V1)({...e,config:{...null==e?void 0:e.config,axios:{...null==e?void 0:null===(t=e.config)||void 0===t?void 0:t.axios,headers:{"Content-Type":"multipart/form-data"}}},route:"/worker/objects/:key"},async e=>{e(e=>e.startsWith("/bus/objects"))})}let ea=er()(e=>e(),5e3),es="/worker/rhp/scan";function el(e){return(0,i.mw)({...e,route:es},async(e,t,n)=>{let{payload:{hostKey:r}}=t;e(e=>e.startsWith("/autopilot/hosts"),e=>null==e?void 0:e.map(e=>e.host.publicKey===r?{...e,host:{...e.host,interactions:{...e.host.interactions,LastScan:new Date().toISOString(),LastScanSuccess:!n.data.scanError},settings:n.data.settings}}:e),!1),e(e=>e.startsWith("/bus/search/hosts"),e=>null==e?void 0:e.map(e=>e.publicKey===r?{...e,interactions:{...e.interactions,LastScan:new Date().toISOString(),LastScanSuccess:!n.data.scanError},settings:n.data.settings}:e),!1),ea(()=>{e(e=>e.startsWith("/autopilot/hosts")||e.startsWith("/bus/search/hosts"),e=>e,!0)})})}},47025:function(e,t,n){"use strict";n.d(t,{BW:function(){return s},JL:function(){return o},BF:function(){return a}});var r=n(2850);let i="https://api.siacentral.com/v2";function o(e){let{settings:t}=(0,r.Hv)();return(0,r.Nf)({api:i,...e,route:"/hosts/list?showinactive=false&sort=download_speed&dir=desc&protocol=rhp3&page=0&limit=1000",disabled:(null==e?void 0:e.disabled)||!t.siaCentral})}function a(e){let{settings:t}=(0,r.Hv)();return(0,r.Nf)({api:i,...e,route:"/hosts/network/averages",disabled:(null==e?void 0:e.disabled)||!t.siaCentral})}function s(e){let{settings:t}=(0,r.Hv)();return(0,r.Nf)({api:i,...e,route:"/market/exchange-rate?currencies=sc",disabled:(null==e?void 0:e.disabled)||!t.siaCentral})}n(98537)},96206:function(e,t,n){"use strict";n.d(t,{vW:function(){return o},rN:function(){return s},yF:function(){return a},Vz:function(){return f},ES:function(){return h},qN:function(){return c},ll:function(){return u}}),n(81395),n(18149);var r=n(6391),i=n.n(r);function o(e,t){let n="number"==typeof e?e:e instanceof i()?e.toNumber():Number(e),{fixed:r=2}=t||{};if(!n)return"0 B";if(n<1e3)return"".concat(n," B");let o=Math.floor(Math.log10(n)/Math.log10(1e3)),a=n/Math.pow(1e3,o);return a.toFixed(r)+" "+["B","KB","MB","GB","TB","PB","EB"][o]}function a(e,t){let{fixed:n=0,units:r="",abbreviated:o=!1}=t||{},a=new(i())(e||0);if(o){let e=a.toNumber();if(e<1e3)return a.toString();let t=["","K","M","B","t","q","Q","s","S","o","n","d","U","D"],i=Math.floor(Math.log10(e)/Math.log10(1e3)),o=e/Math.pow(1e3,i);return"".concat(o.toFixed(n)).concat(t[i]?" ".concat(t[i]):"").concat(r?" ".concat(r):"")}return"".concat(a.toFormat(n)).concat(r?" ".concat(r):"")}function s(e,t){let n;return n=navigator.language,new Intl.DateTimeFormat(n,{dateStyle:"short",...t}).format(new Date(e))}r.BigNumber.config({EXPONENTIAL_AT:1e9}),r.BigNumber.config({DECIMAL_PLACES:30});let l=new r.BigNumber("10").exponentiatedBy(24);function u(e,t){return void 0!==t?new r.BigNumber(new r.BigNumber(e).dividedBy(l).toFixed(t)):new r.BigNumber(e).dividedBy(l)}function c(e){return new r.BigNumber(new r.BigNumber(e).times(l).toFixed(0))}let d={fixed:3,dynamicUnits:!0,hastingUnits:!1};function f(e,t){let{fixed:n,dynamicUnits:i,hastingUnits:o}={...d,...t},a=new r.BigNumber(1e12),s=new r.BigNumber(1e3),l=new r.BigNumber(e),c=new r.BigNumber(e).abs(),f=l.isNegative()?"-":"";if(!i)return"".concat(f).concat(u(c).toFormat(n)," SC");if(c.dividedBy(a).isLessThan(1))return o?"".concat(f).concat(c," H"):"".concat(f,"0 SC");let h=["pS","nS","uS","mS","SC","KS","MS","GS","TS"];for(let e=0;ee.multipliedBy(s),new r.BigNumber(1)),i=c.dividedBy(a.multipliedBy(t));if(i.isLessThan(s)||e===h.length-1)return"".concat(f).concat(i.toFormat(n)," ").concat(h[e])}return""}function h(e){return e.toLocaleString()+" SF"}},2271:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createAsyncLocalStorage",{enumerable:!0,get:function(){return o}});let n=Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available");class r{disable(){throw n}getStore(){}run(){throw n}exit(){throw n}enterWith(){throw n}}let i=globalThis.AsyncLocalStorage;function o(){return i?new i:new r}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},26252:function(e,t,n){"use strict";function r(e){}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"clientHookInServerComponentError",{enumerable:!0,get:function(){return r}}),n(43219),n(2784),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},55046:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ReadonlyURLSearchParams:function(){return h},useSearchParams:function(){return p},usePathname:function(){return m},ServerInsertedHTMLContext:function(){return l.ServerInsertedHTMLContext},useServerInsertedHTML:function(){return l.useServerInsertedHTML},useRouter:function(){return v},useParams:function(){return g},useSelectedLayoutSegments:function(){return y},useSelectedLayoutSegment:function(){return b},redirect:function(){return u.redirect},permanentRedirect:function(){return u.permanentRedirect},RedirectType:function(){return u.RedirectType},notFound:function(){return c.notFound}});let r=n(2784),i=n(60587),o=n(58839),a=n(26252),s=n(4424),l=n(44673),u=n(75903),c=n(47067),d=Symbol("internal for urlsearchparams readonly");function f(){return Error("ReadonlyURLSearchParams cannot be modified")}class h{[Symbol.iterator](){return this[d][Symbol.iterator]()}append(){throw f()}delete(){throw f()}set(){throw f()}sort(){throw f()}constructor(e){this[d]=e,this.entries=e.entries.bind(e),this.forEach=e.forEach.bind(e),this.get=e.get.bind(e),this.getAll=e.getAll.bind(e),this.has=e.has.bind(e),this.keys=e.keys.bind(e),this.values=e.values.bind(e),this.toString=e.toString.bind(e),this.size=e.size}}function p(){(0,a.clientHookInServerComponentError)("useSearchParams");let e=(0,r.useContext)(o.SearchParamsContext),t=(0,r.useMemo)(()=>e?new h(e):null,[e]);return t}function m(){return(0,a.clientHookInServerComponentError)("usePathname"),(0,r.useContext)(o.PathnameContext)}function v(){(0,a.clientHookInServerComponentError)("useRouter");let e=(0,r.useContext)(i.AppRouterContext);if(null===e)throw Error("invariant expected app router to be mounted");return e}function g(){(0,a.clientHookInServerComponentError)("useParams");let e=(0,r.useContext)(i.GlobalLayoutRouterContext),t=(0,r.useContext)(o.PathParamsContext);return e?function e(t,n){void 0===n&&(n={});let r=t[1];for(let t of Object.values(r)){let r=t[0],i=Array.isArray(r),o=i?r[1]:r;if(!o||o.startsWith("__PAGE__"))continue;let a=i&&("c"===r[2]||"oc"===r[2]);a?n[r[0]]=r[1].split("/"):i&&(n[r[0]]=r[1]),n=e(t,n)}return n}(e.tree):t}function y(e){void 0===e&&(e="children"),(0,a.clientHookInServerComponentError)("useSelectedLayoutSegments");let{tree:t}=(0,r.useContext)(i.LayoutRouterContext);return function e(t,n,r,i){let o;if(void 0===r&&(r=!0),void 0===i&&(i=[]),r)o=t[1][n];else{var a;let e=t[1];o=null!=(a=e.children)?a:Object.values(e)[0]}if(!o)return i;let l=o[0],u=(0,s.getSegmentValue)(l);return!u||u.startsWith("__PAGE__")?i:(i.push(u),e(o,n,!1,i))}(t,e)}function b(e){void 0===e&&(e="children"),(0,a.clientHookInServerComponentError)("useSelectedLayoutSegment");let t=y(e);return 0===t.length?null:t[0]}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},47067:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{notFound:function(){return r},isNotFoundError:function(){return i}});let n="NEXT_NOT_FOUND";function r(){let e=Error(n);throw e.digest=n,e}function i(e){return(null==e?void 0:e.digest)===n}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},75903:function(e,t,n){"use strict";var r,i;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{RedirectType:function(){return r},getRedirectError:function(){return s},redirect:function(){return l},permanentRedirect:function(){return u},isRedirectError:function(){return c},getURLFromRedirectError:function(){return d},getRedirectTypeFromError:function(){return f}});let o=n(7552),a="NEXT_REDIRECT";function s(e,t,n){void 0===n&&(n=!1);let r=Error(a);r.digest=a+";"+t+";"+e+";"+n;let i=o.requestAsyncStorage.getStore();return i&&(r.mutableCookies=i.mutableCookies),r}function l(e,t){throw void 0===t&&(t="replace"),s(e,t,!1)}function u(e,t){throw void 0===t&&(t="replace"),s(e,t,!0)}function c(e){if("string"!=typeof(null==e?void 0:e.digest))return!1;let[t,n,r,i]=e.digest.split(";",4);return t===a&&("replace"===n||"push"===n)&&"string"==typeof r&&("true"===i||"false"===i)}function d(e){return c(e)?e.digest.split(";",3)[2]:null}function f(e){if(!c(e))throw Error("Not a redirect error");return e.digest.split(";",3)[1]}(i=r||(r={})).push="push",i.replace="replace",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7552:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"requestAsyncStorage",{enumerable:!0,get:function(){return i}});let r=n(2271),i=(0,r.createAsyncLocalStorage)();("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4424:function(e,t){"use strict";function n(e){return Array.isArray(e)?e[1]:e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSegmentValue",{enumerable:!0,get:function(){return n}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},23116:function(e,t){"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{PrefetchKind:function(){return n},ACTION_REFRESH:function(){return i},ACTION_NAVIGATE:function(){return o},ACTION_RESTORE:function(){return a},ACTION_SERVER_PATCH:function(){return s},ACTION_PREFETCH:function(){return l},ACTION_FAST_REFRESH:function(){return u},ACTION_SERVER_ACTION:function(){return c}});let i="refresh",o="navigate",a="restore",s="server-patch",l="prefetch",u="fast-refresh",c="server-action";(r=n||(n={})).AUTO="auto",r.FULL="full",r.TEMPORARY="temporary",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},25146:function(e,t,n){"use strict";function r(e,t,n,r){return!1}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDomainLocale",{enumerable:!0,get:function(){return r}}),n(67858),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},80920:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Image",{enumerable:!0,get:function(){return y}});let r=n(43219),i=n(16794),o=i._(n(2784)),a=r._(n(28316)),s=r._(n(37412)),l=n(31918),u=n(97686),c=n(45802);n(84759);let d=n(54365),f=r._(n(2088)),h={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0};function p(e,t,n,r,i,o){let a=null==e?void 0:e.src;if(!e||e["data-loaded-src"]===a)return;e["data-loaded-src"]=a;let s="decode"in e?e.decode():Promise.resolve();s.catch(()=>{}).then(()=>{if(e.parentElement&&e.isConnected){if("empty"!==t&&i(!0),null==n?void 0:n.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let r=!1,i=!1;n.current({...t,nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>r,isPropagationStopped:()=>i,persist:()=>{},preventDefault:()=>{r=!0,t.preventDefault()},stopPropagation:()=>{i=!0,t.stopPropagation()}})}(null==r?void 0:r.current)&&r.current(e)}})}function m(e){let[t,n]=o.version.split("."),r=parseInt(t,10),i=parseInt(n,10);return r>18||18===r&&i>=3?{fetchPriority:e}:{fetchpriority:e}}let v=(0,o.forwardRef)((e,t)=>{let{src:n,srcSet:r,sizes:i,height:a,width:s,decoding:l,className:u,style:c,fetchPriority:d,placeholder:f,loading:h,unoptimized:v,fill:g,onLoadRef:y,onLoadingCompleteRef:b,setBlurComplete:x,setShowAltText:w,onLoad:j,onError:E,...k}=e;return o.default.createElement("img",{...k,...m(d),loading:h,width:s,height:a,decoding:l,"data-nimg":g?"fill":"1",className:u,style:c,sizes:i,srcSet:r,src:n,ref:(0,o.useCallback)(e=>{t&&("function"==typeof t?t(e):"object"==typeof t&&(t.current=e)),e&&(E&&(e.src=e.src),e.complete&&p(e,f,y,b,x,v))},[n,f,y,b,x,E,v,t]),onLoad:e=>{let t=e.currentTarget;p(t,f,y,b,x,v)},onError:e=>{w(!0),"empty"!==f&&x(!0),E&&E(e)}})});function g(e){let{isAppRouter:t,imgAttributes:n}=e,r={as:"image",imageSrcSet:n.srcSet,imageSizes:n.sizes,crossOrigin:n.crossOrigin,referrerPolicy:n.referrerPolicy,...m(n.fetchPriority)};return t&&a.default.preload?(a.default.preload(n.src,r),null):o.default.createElement(s.default,null,o.default.createElement("link",{key:"__nimg-"+n.src+n.srcSet+n.sizes,rel:"preload",href:n.srcSet?void 0:n.src,...r}))}let y=(0,o.forwardRef)((e,t)=>{let n=(0,o.useContext)(d.RouterContext),r=(0,o.useContext)(c.ImageConfigContext),i=(0,o.useMemo)(()=>{let e=h||r||u.imageConfigDefault,t=[...e.deviceSizes,...e.imageSizes].sort((e,t)=>e-t),n=e.deviceSizes.sort((e,t)=>e-t);return{...e,allSizes:t,deviceSizes:n}},[r]),{onLoad:a,onLoadingComplete:s}=e,p=(0,o.useRef)(a);(0,o.useEffect)(()=>{p.current=a},[a]);let m=(0,o.useRef)(s);(0,o.useEffect)(()=>{m.current=s},[s]);let[y,b]=(0,o.useState)(!1),[x,w]=(0,o.useState)(!1),{props:j,meta:E}=(0,l.getImgProps)(e,{defaultLoader:f.default,imgConf:i,blurComplete:y,showAltText:x});return o.default.createElement(o.default.Fragment,null,o.default.createElement(v,{...j,unoptimized:E.unoptimized,placeholder:E.placeholder,fill:E.fill,onLoadRef:p,onLoadingCompleteRef:m,setBlurComplete:b,setShowAltText:w,ref:t}),E.priority?o.default.createElement(g,{isAppRouter:!n,imgAttributes:j}):null)});("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},13814:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return x}});let r=n(43219),i=r._(n(2784)),o=n(31068),a=n(33134),s=n(39585),l=n(51570),u=n(19868),c=n(54365),d=n(60587),f=n(93629),h=n(25146),p=n(10694),m=n(23116),v=new Set;function g(e,t,n,r,i,o){if(!o&&!(0,a.isLocalURL)(t))return;if(!r.bypassPrefetchedCheck){let i=void 0!==r.locale?r.locale:"locale"in e?e.locale:void 0,o=t+"%"+n+"%"+i;if(v.has(o))return;v.add(o)}let s=o?e.prefetch(t,i):e.prefetch(t,n,r);Promise.resolve(s).catch(e=>{})}function y(e){return"string"==typeof e?e:(0,s.formatUrl)(e)}let b=i.default.forwardRef(function(e,t){let n,r;let{href:s,as:v,children:b,prefetch:x=null,passHref:w,replace:j,shallow:E,scroll:k,locale:S,onClick:_,onMouseEnter:C,onTouchStart:O,legacyBehavior:M=!1,...T}=e;n=b,M&&("string"==typeof n||"number"==typeof n)&&(n=i.default.createElement("a",null,n));let A=i.default.useContext(c.RouterContext),P=i.default.useContext(d.AppRouterContext),N=null!=A?A:P,R=!A,D=!1!==x,L=null===x?m.PrefetchKind.AUTO:m.PrefetchKind.FULL,{href:F,as:z}=i.default.useMemo(()=>{if(!A){let e=y(s);return{href:e,as:v?y(v):e}}let[e,t]=(0,o.resolveHref)(A,s,!0);return{href:e,as:v?(0,o.resolveHref)(A,v):t||e}},[A,s,v]),V=i.default.useRef(F),I=i.default.useRef(z);M&&(r=i.default.Children.only(n));let Z=M?r&&"object"==typeof r&&r.ref:t,[B,H,U]=(0,f.useIntersection)({rootMargin:"200px"}),W=i.default.useCallback(e=>{(I.current!==z||V.current!==F)&&(U(),I.current=z,V.current=F),B(e),Z&&("function"==typeof Z?Z(e):"object"==typeof Z&&(Z.current=e))},[z,Z,F,U,B]);i.default.useEffect(()=>{N&&H&&D&&g(N,F,z,{locale:S},{kind:L},R)},[z,F,H,S,D,null==A?void 0:A.locale,N,R,L]);let q={ref:W,onClick(e){M||"function"!=typeof _||_(e),M&&r.props&&"function"==typeof r.props.onClick&&r.props.onClick(e),N&&!e.defaultPrevented&&function(e,t,n,r,o,s,l,u,c,d){let{nodeName:f}=e.currentTarget,h="A"===f.toUpperCase();if(h&&(function(e){let t=e.currentTarget,n=t.getAttribute("target");return n&&"_self"!==n||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which}(e)||!c&&!(0,a.isLocalURL)(n)))return;e.preventDefault();let p=()=>{let e=null==l||l;"beforePopState"in t?t[o?"replace":"push"](n,r,{shallow:s,locale:u,scroll:e}):t[o?"replace":"push"](r||n,{forceOptimisticNavigation:!d,scroll:e})};c?i.default.startTransition(p):p()}(e,N,F,z,j,E,k,S,R,D)},onMouseEnter(e){M||"function"!=typeof C||C(e),M&&r.props&&"function"==typeof r.props.onMouseEnter&&r.props.onMouseEnter(e),N&&(D||!R)&&g(N,F,z,{locale:S,priority:!0,bypassPrefetchedCheck:!0},{kind:L},R)},onTouchStart(e){M||"function"!=typeof O||O(e),M&&r.props&&"function"==typeof r.props.onTouchStart&&r.props.onTouchStart(e),N&&(D||!R)&&g(N,F,z,{locale:S,priority:!0,bypassPrefetchedCheck:!0},{kind:L},R)}};if((0,l.isAbsoluteUrl)(z))q.href=z;else if(!M||w||"a"===r.type&&!("href"in r.props)){let e=void 0!==S?S:null==A?void 0:A.locale,t=(null==A?void 0:A.isLocaleDomain)&&(0,h.getDomainLocale)(z,e,null==A?void 0:A.locales,null==A?void 0:A.domainLocales);q.href=t||(0,p.addBasePath)((0,u.addLocale)(z,e,null==A?void 0:A.defaultLocale))}return M?i.default.cloneElement(r,q):i.default.createElement("a",{...T,...q},n)}),x=b;("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},93629:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return l}});let r=n(2784),i=n(30857),o="function"==typeof IntersectionObserver,a=new Map,s=[];function l(e){let{rootRef:t,rootMargin:n,disabled:l}=e,u=l||!o,[c,d]=(0,r.useState)(!1),f=(0,r.useRef)(null),h=(0,r.useCallback)(e=>{f.current=e},[]);(0,r.useEffect)(()=>{if(o){if(u||c)return;let e=f.current;if(e&&e.tagName){let r=function(e,t,n){let{id:r,observer:i,elements:o}=function(e){let t;let n={root:e.root||null,margin:e.rootMargin||""},r=s.find(e=>e.root===n.root&&e.margin===n.margin);if(r&&(t=a.get(r)))return t;let i=new Map,o=new IntersectionObserver(e=>{e.forEach(e=>{let t=i.get(e.target),n=e.isIntersecting||e.intersectionRatio>0;t&&n&&t(n)})},e);return t={id:n,observer:o,elements:i},s.push(n),a.set(n,t),t}(n);return o.set(e,t),i.observe(e),function(){if(o.delete(e),i.unobserve(e),0===o.size){i.disconnect(),a.delete(r);let e=s.findIndex(e=>e.root===r.root&&e.margin===r.margin);e>-1&&s.splice(e,1)}}}(e,e=>e&&d(e),{root:null==t?void 0:t.current,rootMargin:n});return r}}else if(!c){let e=(0,i.requestIdleCallback)(()=>d(!0));return()=>(0,i.cancelIdleCallback)(e)}},[u,n,t,c,f.current]);let p=(0,r.useCallback)(()=>{d(!1)},[]);return[h,c,p]}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},31256:function(e,t,n){"use strict";var r=n(48834).lW;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{Head:function(){return y},NextScript:function(){return b},Html:function(){return x},Main:function(){return w},default:function(){return j}});let i=c(n(2784)),o=n(13150),a=n(95383),s=n(82809),l=c(n(10274)),u=n(15333);function c(e){return e&&e.__esModule?e:{default:e}}let d=new Set;function f(e,t,n){let r=(0,a.getPageFiles)(e,"/_app"),i=n?[]:(0,a.getPageFiles)(e,t);return{sharedFiles:r,pageFiles:i,allFiles:[...new Set([...r,...i])]}}function h(e,t){let{assetPrefix:n,buildManifest:r,assetQueryString:o,disableOptimizedLoading:a,crossOrigin:s}=e;return r.polyfillFiles.filter(e=>e.endsWith(".js")&&!e.endsWith(".module.js")).map(e=>i.default.createElement("script",{key:e,defer:!a,nonce:t.nonce,crossOrigin:t.crossOrigin||s,noModule:!0,src:"".concat(n,"/_next/").concat(e).concat(o)}))}function p(e){let{styles:t}=e;if(!t)return null;let n=Array.isArray(t)?t:[];if(t.props&&Array.isArray(t.props.children)){let e=e=>{var t,n;return null==e?void 0:null==(n=e.props)?void 0:null==(t=n.dangerouslySetInnerHTML)?void 0:t.__html};t.props.children.forEach(t=>{Array.isArray(t)?t.forEach(t=>e(t)&&n.push(t)):e(t)&&n.push(t)})}return i.default.createElement("style",{"amp-custom":"",dangerouslySetInnerHTML:{__html:n.map(e=>e.props.dangerouslySetInnerHTML.__html).join("").replace(/\/\*# sourceMappingURL=.*\*\//g,"").replace(/\/\*@ sourceURL=.*?\*\//g,"")}})}function m(e,t,n){let{dynamicImports:r,assetPrefix:o,isDevelopment:a,assetQueryString:s,disableOptimizedLoading:l,crossOrigin:u}=e;return r.map(e=>!e.endsWith(".js")||n.allFiles.includes(e)?null:i.default.createElement("script",{async:!a&&l,defer:!l,key:e,src:"".concat(o,"/_next/").concat(encodeURI(e)).concat(s),nonce:t.nonce,crossOrigin:t.crossOrigin||u}))}function v(e,t,n){var r;let{assetPrefix:o,buildManifest:a,isDevelopment:s,assetQueryString:l,disableOptimizedLoading:u,crossOrigin:c}=e,d=n.allFiles.filter(e=>e.endsWith(".js")),f=null==(r=a.lowPriorityFiles)?void 0:r.filter(e=>e.endsWith(".js"));return[...d,...f].map(e=>i.default.createElement("script",{key:e,src:"".concat(o,"/_next/").concat(encodeURI(e)).concat(l),nonce:t.nonce,async:!s&&u,defer:!u,crossOrigin:t.crossOrigin||c}))}function g(e,t){let{scriptLoader:n,disableOptimizedLoading:r,crossOrigin:o}=e,a=function(e,t){let{assetPrefix:n,scriptLoader:r,crossOrigin:o,nextScriptWorkers:a}=e;if(!a)return null;try{let{partytownSnippet:e}=require("@builder.io/partytown/integration"),a=Array.isArray(t.children)?t.children:[t.children],s=a.find(e=>{var t,n;return!!e&&!!e.props&&(null==e?void 0:null==(n=e.props)?void 0:null==(t=n.dangerouslySetInnerHTML)?void 0:t.__html.length)&&"data-partytown-config"in e.props});return i.default.createElement(i.default.Fragment,null,!s&&i.default.createElement("script",{"data-partytown-config":"",dangerouslySetInnerHTML:{__html:'\n partytown = {\n lib: "'.concat(n,'/_next/static/~partytown/"\n };\n ')}}),i.default.createElement("script",{"data-partytown":"",dangerouslySetInnerHTML:{__html:e()}}),(r.worker||[]).map((e,n)=>{let{strategy:r,src:a,children:s,dangerouslySetInnerHTML:l,...u}=e,c={};if(a)c.src=a;else if(l&&l.__html)c.dangerouslySetInnerHTML={__html:l.__html};else if(s)c.dangerouslySetInnerHTML={__html:"string"==typeof s?s:Array.isArray(s)?s.join(""):""};else throw Error("Invalid usage of next/script. Did you forget to include a src attribute or an inline script? https://nextjs.org/docs/messages/invalid-script");return i.default.createElement("script",{...c,...u,type:"text/partytown",key:a||n,nonce:t.nonce,"data-nscript":"worker",crossOrigin:t.crossOrigin||o})}))}catch(e){return(0,l.default)(e)&&"MODULE_NOT_FOUND"!==e.code&&console.warn("Warning: ".concat(e.message)),null}}(e,t),s=(n.beforeInteractive||[]).filter(e=>e.src).map((e,n)=>{var a;let{strategy:s,...l}=e;return i.default.createElement("script",{...l,key:l.src||n,defer:null!==(a=l.defer)&&void 0!==a?a:!r,nonce:t.nonce,"data-nscript":"beforeInteractive",crossOrigin:t.crossOrigin||o})});return i.default.createElement(i.default.Fragment,null,a,s)}class y extends i.default.Component{getCssLinks(e){let{assetPrefix:t,assetQueryString:n,dynamicImports:r,crossOrigin:o,optimizeCss:a,optimizeFonts:s}=this.context,l=e.allFiles.filter(e=>e.endsWith(".css")),u=new Set(e.sharedFiles),c=new Set([]),d=Array.from(new Set(r.filter(e=>e.endsWith(".css"))));if(d.length){let e=new Set(l);d=d.filter(t=>!(e.has(t)||u.has(t))),c=new Set(d),l.push(...d)}let f=[];return l.forEach(e=>{let r=u.has(e);a||f.push(i.default.createElement("link",{key:"".concat(e,"-preload"),nonce:this.props.nonce,rel:"preload",href:"".concat(t,"/_next/").concat(encodeURI(e)).concat(n),as:"style",crossOrigin:this.props.crossOrigin||o}));let s=c.has(e);f.push(i.default.createElement("link",{key:e,nonce:this.props.nonce,rel:"stylesheet",href:"".concat(t,"/_next/").concat(encodeURI(e)).concat(n),crossOrigin:this.props.crossOrigin||o,"data-n-g":s?void 0:r?"":void 0,"data-n-p":s?void 0:r?void 0:""}))}),s&&(f=this.makeStylesheetInert(f)),0===f.length?null:f}getPreloadDynamicChunks(){let{dynamicImports:e,assetPrefix:t,assetQueryString:n,crossOrigin:r}=this.context;return e.map(e=>e.endsWith(".js")?i.default.createElement("link",{rel:"preload",key:e,href:"".concat(t,"/_next/").concat(encodeURI(e)).concat(n),as:"script",nonce:this.props.nonce,crossOrigin:this.props.crossOrigin||r}):null).filter(Boolean)}getPreloadMainLinks(e){let{assetPrefix:t,assetQueryString:n,scriptLoader:r,crossOrigin:o}=this.context,a=e.allFiles.filter(e=>e.endsWith(".js"));return[...(r.beforeInteractive||[]).map(e=>i.default.createElement("link",{key:e.src,nonce:this.props.nonce,rel:"preload",href:e.src,as:"script",crossOrigin:this.props.crossOrigin||o})),...a.map(e=>i.default.createElement("link",{key:e,nonce:this.props.nonce,rel:"preload",href:"".concat(t,"/_next/").concat(encodeURI(e)).concat(n),as:"script",crossOrigin:this.props.crossOrigin||o}))]}getBeforeInteractiveInlineScripts(){let{scriptLoader:e}=this.context,{nonce:t,crossOrigin:n}=this.props;return(e.beforeInteractive||[]).filter(e=>!e.src&&(e.dangerouslySetInnerHTML||e.children)).map((e,r)=>{let{strategy:o,children:a,dangerouslySetInnerHTML:s,src:l,...u}=e,c="";return s&&s.__html?c=s.__html:a&&(c="string"==typeof a?a:Array.isArray(a)?a.join(""):""),i.default.createElement("script",{...u,dangerouslySetInnerHTML:{__html:c},key:u.id||r,nonce:t,"data-nscript":"beforeInteractive",crossOrigin:n||void 0})})}getDynamicChunks(e){return m(this.context,this.props,e)}getPreNextScripts(){return g(this.context,this.props)}getScripts(e){return v(this.context,this.props,e)}getPolyfillScripts(){return h(this.context,this.props)}makeStylesheetInert(e){return i.default.Children.map(e,e=>{var t,n;if((null==e?void 0:e.type)==="link"&&(null==e?void 0:null==(t=e.props)?void 0:t.href)&&o.OPTIMIZED_FONT_PROVIDERS.some(t=>{var n,r;let{url:i}=t;return null==e?void 0:null==(r=e.props)?void 0:null==(n=r.href)?void 0:n.startsWith(i)})){let t={...e.props||{},"data-href":e.props.href,href:void 0};return i.default.cloneElement(e,t)}if(null==e?void 0:null==(n=e.props)?void 0:n.children){let t={...e.props||{},children:this.makeStylesheetInert(e.props.children)};return i.default.cloneElement(e,t)}return e}).filter(Boolean)}render(){var e,t;let{styles:r,ampPath:o,inAmpMode:a,hybridAmp:s,canonicalBase:l,__NEXT_DATA__:u,dangerousAsPath:c,headTags:d,unstable_runtimeJS:h,unstable_JsPreload:m,disableOptimizedLoading:v,optimizeCss:g,optimizeFonts:y,assetPrefix:b,nextFontManifest:x}=this.context,w=!1===h,j=!1===m||!v;this.context.docComponentsRendered.Head=!0;let{head:E}=this.context,k=[],S=[];E&&(E.forEach(e=>{let t;this.context.strictNextHead&&(t=i.default.createElement("meta",{name:"next-head",content:"1"})),e&&"link"===e.type&&"preload"===e.props.rel&&"style"===e.props.as?(t&&k.push(t),k.push(e)):e&&(t&&("meta"!==e.type||!e.props.charSet)&&S.push(t),S.push(e))}),E=k.concat(S));let _=i.default.Children.toArray(this.props.children).filter(Boolean);y&&!a&&(_=this.makeStylesheetInert(_));let C=!1,O=!1;E=i.default.Children.map(E||[],e=>{if(!e)return e;let{type:t,props:n}=e;if(a){let r="";if("meta"===t&&"viewport"===n.name?r='name="viewport"':"link"===t&&"canonical"===n.rel?O=!0:"script"===t&&(n.src&&-1>n.src.indexOf("ampproject")||n.dangerouslySetInnerHTML&&(!n.type||"text/javascript"===n.type))&&(r="{r+=" ".concat(e,'="').concat(n[e],'"')}),r+="/>"),r)return console.warn('Found conflicting amp tag "'.concat(e.type,'" with conflicting prop ').concat(r," in ").concat(u.page,". https://nextjs.org/docs/messages/conflicting-amp-tag")),null}else"link"===t&&"amphtml"===n.rel&&(C=!0);return e});let M=f(this.context.buildManifest,this.context.__NEXT_DATA__.page,a),T=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(!e)return{preconnect:null,preload:null};let r=e.pages["/_app"],o=e.pages[t],a=[...null!=r?r:[],...null!=o?o:[]],s=!!(0===a.length&&(r||o));return{preconnect:s?i.default.createElement("link",{"data-next-font":e.pagesUsingSizeAdjust?"size-adjust":"",rel:"preconnect",href:"/",crossOrigin:"anonymous"}):null,preload:a?a.map(e=>{let t=/\.(woff|woff2|eot|ttf|otf)$/.exec(e)[1];return i.default.createElement("link",{key:e,rel:"preload",href:"".concat(n,"/_next/").concat(encodeURI(e)),as:"font",type:"font/".concat(t),crossOrigin:"anonymous","data-next-font":e.includes("-s")?"size-adjust":""})}):null}}(x,c,b);return i.default.createElement("head",function(e){let{crossOrigin:t,nonce:n,...r}=e;return r}(this.props),this.context.isDevelopment&&i.default.createElement(i.default.Fragment,null,i.default.createElement("style",{"data-next-hide-fouc":!0,"data-ampdevmode":a?"true":void 0,dangerouslySetInnerHTML:{__html:"body{display:none}"}}),i.default.createElement("noscript",{"data-next-hide-fouc":!0,"data-ampdevmode":a?"true":void 0},i.default.createElement("style",{dangerouslySetInnerHTML:{__html:"body{display:block}"}}))),E,this.context.strictNextHead?null:i.default.createElement("meta",{name:"next-head-count",content:i.default.Children.count(E||[]).toString()}),_,y&&i.default.createElement("meta",{name:"next-font-preconnect"}),T.preconnect,T.preload,a&&i.default.createElement(i.default.Fragment,null,i.default.createElement("meta",{name:"viewport",content:"width=device-width,minimum-scale=1,initial-scale=1"}),!O&&i.default.createElement("link",{rel:"canonical",href:l+n(79505).cleanAmpPath(c)}),i.default.createElement("link",{rel:"preload",as:"script",href:"https://cdn.ampproject.org/v0.js"}),i.default.createElement(p,{styles:r}),i.default.createElement("style",{"amp-boilerplate":"",dangerouslySetInnerHTML:{__html:"body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}"}}),i.default.createElement("noscript",null,i.default.createElement("style",{"amp-boilerplate":"",dangerouslySetInnerHTML:{__html:"body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}"}})),i.default.createElement("script",{async:!0,src:"https://cdn.ampproject.org/v0.js"})),!a&&i.default.createElement(i.default.Fragment,null,!C&&s&&i.default.createElement("link",{rel:"amphtml",href:l+(o||"".concat(c).concat(c.includes("?")?"&":"?","amp=1"))}),this.getBeforeInteractiveInlineScripts(),!g&&this.getCssLinks(M),!g&&i.default.createElement("noscript",{"data-n-css":null!==(e=this.props.nonce)&&void 0!==e?e:""}),!w&&!j&&this.getPreloadDynamicChunks(),!w&&!j&&this.getPreloadMainLinks(M),!v&&!w&&this.getPolyfillScripts(),!v&&!w&&this.getPreNextScripts(),!v&&!w&&this.getDynamicChunks(M),!v&&!w&&this.getScripts(M),g&&this.getCssLinks(M),g&&i.default.createElement("noscript",{"data-n-css":null!==(t=this.props.nonce)&&void 0!==t?t:""}),this.context.isDevelopment&&i.default.createElement("noscript",{id:"__next_css__DO_NOT_USE__"}),r||null),i.default.createElement(i.default.Fragment,{},...d||[]))}}y.contextType=u.HtmlContext;class b extends i.default.Component{getDynamicChunks(e){return m(this.context,this.props,e)}getPreNextScripts(){return g(this.context,this.props)}getScripts(e){return v(this.context,this.props,e)}getPolyfillScripts(){return h(this.context,this.props)}static getInlineScriptSource(e){let{__NEXT_DATA__:t,largePageDataBytes:i}=e;try{let o=JSON.stringify(t);if(d.has(t.page))return(0,s.htmlEscapeJsonString)(o);let a=r.from(o).byteLength,l=n(16549).Z;return i&&a>i&&(d.add(t.page),console.warn('Warning: data for page "'.concat(t.page,'"').concat(t.page===e.dangerousAsPath?"":' (path "'.concat(e.dangerousAsPath,'")')," is ").concat(l(a)," which exceeds the threshold of ").concat(l(i),", this amount of data can reduce performance.\nSee more info here: https://nextjs.org/docs/messages/large-page-data"))),(0,s.htmlEscapeJsonString)(o)}catch(e){if((0,l.default)(e)&&-1!==e.message.indexOf("circular structure"))throw Error('Circular structure in "getInitialProps" result of page "'.concat(t.page,'". https://nextjs.org/docs/messages/circular-structure'));throw e}}render(){let{assetPrefix:e,inAmpMode:t,buildManifest:n,unstable_runtimeJS:r,docComponentsRendered:o,assetQueryString:a,disableOptimizedLoading:s,crossOrigin:l}=this.context,u=!1===r;if(o.NextScript=!0,t)return null;let c=f(this.context.buildManifest,this.context.__NEXT_DATA__.page,t);return i.default.createElement(i.default.Fragment,null,!u&&n.devFiles?n.devFiles.map(t=>i.default.createElement("script",{key:t,src:"".concat(e,"/_next/").concat(encodeURI(t)).concat(a),nonce:this.props.nonce,crossOrigin:this.props.crossOrigin||l})):null,u?null:i.default.createElement("script",{id:"__NEXT_DATA__",type:"application/json",nonce:this.props.nonce,crossOrigin:this.props.crossOrigin||l,dangerouslySetInnerHTML:{__html:b.getInlineScriptSource(this.context)}}),s&&!u&&this.getPolyfillScripts(),s&&!u&&this.getPreNextScripts(),s&&!u&&this.getDynamicChunks(c),s&&!u&&this.getScripts(c))}}function x(e){let{inAmpMode:t,docComponentsRendered:n,locale:r,scriptLoader:o,__NEXT_DATA__:a}=(0,u.useHtmlContext)();return n.Html=!0,!function(e,t,n){var r,o,a,s;if(!n.children)return;let l=[],u=Array.isArray(n.children)?n.children:[n.children],c=null==(o=u.find(e=>e.type===y))?void 0:null==(r=o.props)?void 0:r.children,d=null==(s=u.find(e=>"body"===e.type))?void 0:null==(a=s.props)?void 0:a.children,f=[...Array.isArray(c)?c:[c],...Array.isArray(d)?d:[d]];i.default.Children.forEach(f,t=>{var n;if(t&&(null==(n=t.type)?void 0:n.__nextScript)){if("beforeInteractive"===t.props.strategy){e.beforeInteractive=(e.beforeInteractive||[]).concat([{...t.props}]);return}if(["lazyOnload","afterInteractive","worker"].includes(t.props.strategy)){l.push(t.props);return}}}),t.scriptLoader=l}(o,a,e),i.default.createElement("html",{...e,lang:e.lang||r||void 0,amp:t?"":void 0,"data-ampdevmode":void 0})}function w(){let{docComponentsRendered:e}=(0,u.useHtmlContext)();return e.Main=!0,i.default.createElement("next-js-internal-body-render-target",null)}b.contextType=u.HtmlContext;class j extends i.default.Component{static getInitialProps(e){return e.defaultGetInitialProps(e)}render(){return i.default.createElement(x,null,i.default.createElement(y,null),i.default.createElement("body",null,i.default.createElement(w,null),i.default.createElement(b,null)))}}j[o.NEXT_BUILTIN_DOCUMENT]=function(){return i.default.createElement(x,null,i.default.createElement(y,null),i.default.createElement("body",null,i.default.createElement(w,null),i.default.createElement(b,null)))}},22698:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{noSSR:function(){return a},default:function(){return s}});let r=n(43219),i=(n(2784),r._(n(94780)));function o(e){return{default:(null==e?void 0:e.default)||e}}function a(e,t){return delete t.webpack,delete t.modules,e(t)}function s(e,t){let n=i.default,r={loading:e=>{let{error:t,isLoading:n,pastDelay:r}=e;return null}};e instanceof Promise?r.loader=()=>e:"function"==typeof e?r.loader=e:"object"==typeof e&&(r={...r,...e}),r={...r,...t};let s=r.loader;return(r.loadableGenerated&&(r={...r,...r.loadableGenerated},delete r.loadableGenerated),"boolean"!=typeof r.ssr||r.ssr)?n({...r,loader:()=>null!=s?s().then(o):Promise.resolve(o(()=>null))}):(delete r.webpack,delete r.modules,a(n,r))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},31918:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getImgProps",{enumerable:!0,get:function(){return s}}),n(84759);let r=n(69933),i=n(97686);function o(e){return void 0!==e.default}function a(e){return void 0===e?e:"number"==typeof e?Number.isFinite(e)?e:NaN:"string"==typeof e&&/^[0-9]+$/.test(e)?parseInt(e,10):NaN}function s(e,t){var n;let s,l,u,{src:c,sizes:d,unoptimized:f=!1,priority:h=!1,loading:p,className:m,quality:v,width:g,height:y,fill:b=!1,style:x,onLoad:w,onLoadingComplete:j,placeholder:E="empty",blurDataURL:k,fetchPriority:S,layout:_,objectFit:C,objectPosition:O,lazyBoundary:M,lazyRoot:T,...A}=e,{imgConf:P,showAltText:N,blurComplete:R,defaultLoader:D}=t,L=P||i.imageConfigDefault;if("allSizes"in L)s=L;else{let e=[...L.deviceSizes,...L.imageSizes].sort((e,t)=>e-t),t=L.deviceSizes.sort((e,t)=>e-t);s={...L,allSizes:e,deviceSizes:t}}let F=A.loader||D;delete A.loader,delete A.srcSet;let z="__next_img_default"in F;if(z){if("custom"===s.loader)throw Error('Image with src "'+c+'" is missing "loader" prop.\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader')}else{let e=F;F=t=>{let{config:n,...r}=t;return e(r)}}if(_){"fill"===_&&(b=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[_];e&&(x={...x,...e});let t={responsive:"100vw",fill:"100vw"}[_];t&&!d&&(d=t)}let V="",I=a(g),Z=a(y);if("object"==typeof(n=c)&&(o(n)||void 0!==n.src)){let e=o(c)?c.default:c;if(!e.src)throw Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received "+JSON.stringify(e));if(!e.height||!e.width)throw Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received "+JSON.stringify(e));if(l=e.blurWidth,u=e.blurHeight,k=k||e.blurDataURL,V=e.src,!b){if(I||Z){if(I&&!Z){let t=I/e.width;Z=Math.round(e.height*t)}else if(!I&&Z){let t=Z/e.height;I=Math.round(e.width*t)}}else I=e.width,Z=e.height}}let B=!h&&("lazy"===p||void 0===p);(!(c="string"==typeof c?c:V)||c.startsWith("data:")||c.startsWith("blob:"))&&(f=!0,B=!1),s.unoptimized&&(f=!0),z&&c.endsWith(".svg")&&!s.dangerouslyAllowSVG&&(f=!0),h&&(S="high");let H=a(v),U=Object.assign(b?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:C,objectPosition:O}:{},N?{}:{color:"transparent"},x),W=R||"empty"===E?null:"blur"===E?'url("data:image/svg+xml;charset=utf-8,'+(0,r.getImageBlurSvg)({widthInt:I,heightInt:Z,blurWidth:l,blurHeight:u,blurDataURL:k||"",objectFit:U.objectFit})+'")':'url("'+E+'")',q=W?{backgroundSize:U.objectFit||"cover",backgroundPosition:U.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:W}:{},$=function(e){let{config:t,src:n,unoptimized:r,width:i,quality:o,sizes:a,loader:s}=e;if(r)return{src:n,srcSet:void 0,sizes:void 0};let{widths:l,kind:u}=function(e,t,n){let{deviceSizes:r,allSizes:i}=e;if(n){let e=/(^|\s)(1?\d?\d)vw/g,t=[];for(let r;r=e.exec(n);r)t.push(parseInt(r[2]));if(t.length){let e=.01*Math.min(...t);return{widths:i.filter(t=>t>=r[0]*e),kind:"w"}}return{widths:i,kind:"w"}}if("number"!=typeof t)return{widths:r,kind:"w"};let o=[...new Set([t,2*t].map(e=>i.find(t=>t>=e)||i[i.length-1]))];return{widths:o,kind:"x"}}(t,i,a),c=l.length-1;return{sizes:a||"w"!==u?a:"100vw",srcSet:l.map((e,r)=>s({config:t,src:n,quality:o,width:e})+" "+("w"===u?e:r+1)+u).join(", "),src:s({config:t,src:n,quality:o,width:l[c]})}}({config:s,src:c,unoptimized:f,width:I,quality:H,sizes:d,loader:F}),K={...A,loading:B?"lazy":p,fetchPriority:S,width:I,height:Z,decoding:"async",className:m,style:{...U,...q},sizes:$.sizes,srcSet:$.srcSet,src:$.src},Y={unoptimized:f,priority:h,placeholder:E,fill:b};return{props:K,meta:Y}}},15333:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{HtmlContext:function(){return i},useHtmlContext:function(){return o}});let r=n(2784),i=(0,r.createContext)(void 0);function o(){let e=(0,r.useContext)(i);if(!e)throw Error(" should not be imported outside of pages/_document.\nRead more: https://nextjs.org/docs/messages/no-document-import-in-page");return e}},69933:function(e,t){"use strict";function n(e){let{widthInt:t,heightInt:n,blurWidth:r,blurHeight:i,blurDataURL:o,objectFit:a}=e,s=r?40*r:t,l=i?40*i:n,u=s&&l?"viewBox='0 0 "+s+" "+l+"'":"";return"%3Csvg xmlns='http://www.w3.org/2000/svg' "+u+"%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='"+(u?"none":"contain"===a?"xMidYMid":"cover"===a?"xMidYMid slice":"none")+"' style='filter: url(%23b);' href='"+o+"'/%3E%3C/svg%3E"}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getImageBlurSvg",{enumerable:!0,get:function(){return n}})},81963:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{default:function(){return u},unstable_getImgProps:function(){return l}});let r=n(43219),i=n(31918),o=n(84759),a=n(80920),s=r._(n(2088)),l=e=>{(0,o.warnOnce)("Warning: unstable_getImgProps() is experimental and may change or be removed at any time. Use at your own risk.");let{props:t}=(0,i.getImgProps)(e,{defaultLoader:s.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0}});for(let[e,n]of Object.entries(t))void 0===n&&delete t[e];return{props:t}},u=a.Image},2088:function(e,t){"use strict";function n(e){let{config:t,src:n,width:r,quality:i}=e;return t.path+"?url="+encodeURIComponent(n)+"&w="+r+"&q="+(i||75)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r}}),n.__next_img_default=!0;let r=n},49306:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"LoadableContext",{enumerable:!0,get:function(){return o}});let r=n(43219),i=r._(n(2784)),o=i.default.createContext(null)},94780:function(e,t,n){"use strict";/** @copyright (c) 2017-present James Kyle MIT License Permission is hereby granted, free of charge, to any person obtaining diff --git a/renterd/assets/config.html b/renterd/assets/config.html index f33909b28..49958d7a8 100644 --- a/renterd/assets/config.html +++ b/renterd/assets/config.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/renterd/assets/contracts.html b/renterd/assets/contracts.html index b5f56be9a..ec5c2654d 100644 --- a/renterd/assets/contracts.html +++ b/renterd/assets/contracts.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/renterd/assets/files/[[...path]].html b/renterd/assets/files/[[...path]].html index 37688d975..14dbc38af 100644 --- a/renterd/assets/files/[[...path]].html +++ b/renterd/assets/files/[[...path]].html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/renterd/assets/hosts.html b/renterd/assets/hosts.html index b2afabc20..03486b338 100644 --- a/renterd/assets/hosts.html +++ b/renterd/assets/hosts.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/renterd/assets/index.html b/renterd/assets/index.html index 9c668126e..0b8683851 100644 --- a/renterd/assets/index.html +++ b/renterd/assets/index.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/renterd/assets/login.html b/renterd/assets/login.html index 8a95040a4..ecba21bd3 100644 --- a/renterd/assets/login.html +++ b/renterd/assets/login.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/renterd/assets/node.html b/renterd/assets/node.html index a3940c1a0..37ee26fbc 100644 --- a/renterd/assets/node.html +++ b/renterd/assets/node.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/renterd/assets/wallet.html b/renterd/assets/wallet.html index 4dce367be..22cc384b1 100644 --- a/renterd/assets/wallet.html +++ b/renterd/assets/wallet.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file