@perses-dev/logs-table-plugin 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/__mf/js/LogsTable.c4412590.js +6 -0
  2. package/__mf/js/async/1616.832c6e3d.js +1 -0
  3. package/__mf/js/async/{2641.888f4d12.js → 1939.46722505.js} +1 -1
  4. package/__mf/js/async/2043.3343388c.js +2 -0
  5. package/__mf/js/async/392.ffb0729b.js +2 -0
  6. package/__mf/js/async/{1553.9685a45a.js → 4077.4c4e9533.js} +1 -1
  7. package/__mf/js/async/{1964.ad38a6aa.js → 4121.6fa52018.js} +2 -2
  8. package/__mf/js/async/{2651.c6ed9c77.js → 5002.c1c54a52.js} +1 -1
  9. package/__mf/js/async/{1640.45bfe57d.js → 5019.84406c37.js} +1 -1
  10. package/__mf/js/async/5071.a0b2c6c3.js +1 -0
  11. package/__mf/js/async/{5214.4ce95313.js → 5587.180213b1.js} +1 -1
  12. package/__mf/js/async/580.9e16464c.js +110 -0
  13. package/__mf/js/async/5997.f6b3408c.js +2 -0
  14. package/__mf/js/async/6274.145959f1.js +2 -0
  15. package/__mf/js/async/{7623.43e701ce.js → 6458.4d73f1df.js} +1 -1
  16. package/__mf/js/async/6600.aebd51ab.js +22 -0
  17. package/__mf/js/async/{4062.75b22d96.js → 7177.848ebbb2.js} +1 -1
  18. package/__mf/js/async/7192.269aa1db.js +1 -0
  19. package/__mf/js/async/7417.39d13c6a.js +1 -0
  20. package/__mf/js/async/7452.60dd8e7a.js +2 -0
  21. package/__mf/js/async/7968.2c2a16b3.js +1 -0
  22. package/__mf/js/async/7978.8fed4f5a.js +1 -0
  23. package/__mf/js/async/8252.957087a6.js +1 -0
  24. package/__mf/js/async/8294.dac3426d.js +37 -0
  25. package/__mf/js/async/8356.9ea56838.js +1 -0
  26. package/__mf/js/async/8470.6f543f7d.js +2 -0
  27. package/__mf/js/async/8535.20f8a453.js +1 -0
  28. package/__mf/js/async/873.6dbef0bc.js +1 -0
  29. package/__mf/js/async/9235.3d5006e1.js +1 -0
  30. package/__mf/js/async/9355.e4855f05.js +2 -0
  31. package/__mf/js/async/941.66a54646.js +2 -0
  32. package/__mf/js/async/{8488.c1d50599.js → 9558.692edca6.js} +1 -1
  33. package/__mf/js/async/9588.1ab96620.js +1 -0
  34. package/__mf/js/async/9732.b7b47c32.js +7 -0
  35. package/__mf/js/async/9890.b97f395d.js +1 -0
  36. package/__mf/js/async/__federation_expose_LogsTable.bed2792d.js +1 -0
  37. package/__mf/js/async/lib-router.318cb64e.js +2 -0
  38. package/__mf/js/main.a9012790.js +6 -0
  39. package/lib/LogsTablePanel.js +1 -1
  40. package/lib/LogsTablePanel.js.map +1 -1
  41. package/lib/LogsTableSettingsEditor.js +1 -1
  42. package/lib/LogsTableSettingsEditor.js.map +1 -1
  43. package/lib/bootstrap.js +1 -1
  44. package/lib/bootstrap.js.map +1 -1
  45. package/lib/cjs/components/LogRow/LogsStyles.js +5 -5
  46. package/lib/cjs/index-federation.js +12 -12
  47. package/lib/cjs/test/mock-query-results.js +3 -3
  48. package/lib/components/EmptyLogsState.js +1 -1
  49. package/lib/components/EmptyLogsState.js.map +1 -1
  50. package/lib/components/LogRow/LogDetailsTable.js +1 -1
  51. package/lib/components/LogRow/LogDetailsTable.js.map +1 -1
  52. package/lib/components/LogRow/LogRow.js +1 -1
  53. package/lib/components/LogRow/LogRow.js.map +1 -1
  54. package/lib/components/LogRow/LogTimestamp.js +1 -1
  55. package/lib/components/LogRow/LogTimestamp.js.map +1 -1
  56. package/lib/components/LogsList.js +1 -1
  57. package/lib/components/LogsList.js.map +1 -1
  58. package/lib/components/VirtualizedLogsList.js +1 -1
  59. package/lib/components/VirtualizedLogsList.js.map +1 -1
  60. package/mf-manifest.json +45 -45
  61. package/mf-stats.json +45 -45
  62. package/package.json +5 -5
  63. package/__mf/js/LogsTable.a40d0de0.js +0 -5
  64. package/__mf/js/async/1143.f9fce74a.js +0 -1
  65. package/__mf/js/async/2292.0c8c55a4.js +0 -2
  66. package/__mf/js/async/2836.59bc5080.js +0 -22
  67. package/__mf/js/async/2849.eafadb0f.js +0 -2
  68. package/__mf/js/async/3224.dc93eeb9.js +0 -1
  69. package/__mf/js/async/3474.cee21897.js +0 -1
  70. package/__mf/js/async/3863.98efb1d2.js +0 -2
  71. package/__mf/js/async/3960.a5f4b6df.js +0 -2
  72. package/__mf/js/async/4075.3f3a9fce.js +0 -1
  73. package/__mf/js/async/4168.4ce3a017.js +0 -2
  74. package/__mf/js/async/4238.3f9124d4.js +0 -1
  75. package/__mf/js/async/5409.360142aa.js +0 -1
  76. package/__mf/js/async/5981.ef618ada.js +0 -2
  77. package/__mf/js/async/6292.7a6b1e5f.js +0 -1
  78. package/__mf/js/async/6569.74fed404.js +0 -1
  79. package/__mf/js/async/6770.344b116a.js +0 -1
  80. package/__mf/js/async/694.f6a520bb.js +0 -1
  81. package/__mf/js/async/6981.aaaaabbb.js +0 -110
  82. package/__mf/js/async/711.d4a39c83.js +0 -1
  83. package/__mf/js/async/738.1432e533.js +0 -1
  84. package/__mf/js/async/7482.e107e534.js +0 -2
  85. package/__mf/js/async/7740.213e06a7.js +0 -1
  86. package/__mf/js/async/9173.947266e0.js +0 -2
  87. package/__mf/js/async/9370.e9cdeb7d.js +0 -7
  88. package/__mf/js/async/9815.6b212862.js +0 -37
  89. package/__mf/js/async/__federation_expose_LogsTable.86c05a98.js +0 -1
  90. package/__mf/js/async/lib-router.c75d9d73.js +0 -2
  91. package/__mf/js/main.3283cbfb.js +0 -5
  92. /package/__mf/css/async/{2341.d3010b86.css → 3061.d3010b86.css} +0 -0
  93. /package/__mf/css/async/{5263.d3010b86.css → 5442.d3010b86.css} +0 -0
  94. /package/__mf/css/async/{6759.d3010b86.css → 7823.d3010b86.css} +0 -0
  95. /package/__mf/js/async/{2292.0c8c55a4.js.LICENSE.txt → 2043.3343388c.js.LICENSE.txt} +0 -0
  96. /package/__mf/js/async/{5981.ef618ada.js.LICENSE.txt → 392.ffb0729b.js.LICENSE.txt} +0 -0
  97. /package/__mf/js/async/{1964.ad38a6aa.js.LICENSE.txt → 4121.6fa52018.js.LICENSE.txt} +0 -0
  98. /package/__mf/js/async/{6981.aaaaabbb.js.LICENSE.txt → 580.9e16464c.js.LICENSE.txt} +0 -0
  99. /package/__mf/js/async/{3960.a5f4b6df.js.LICENSE.txt → 6274.145959f1.js.LICENSE.txt} +0 -0
  100. /package/__mf/js/async/{2836.59bc5080.js.LICENSE.txt → 6600.aebd51ab.js.LICENSE.txt} +0 -0
  101. /package/__mf/js/async/{7482.e107e534.js.LICENSE.txt → 7452.60dd8e7a.js.LICENSE.txt} +0 -0
  102. /package/__mf/js/async/{9173.947266e0.js.LICENSE.txt → 8470.6f543f7d.js.LICENSE.txt} +0 -0
  103. /package/__mf/js/async/{2849.eafadb0f.js.LICENSE.txt → 9355.e4855f05.js.LICENSE.txt} +0 -0
  104. /package/__mf/js/async/{3863.98efb1d2.js.LICENSE.txt → 941.66a54646.js.LICENSE.txt} +0 -0
  105. /package/__mf/js/async/{9370.e9cdeb7d.js.LICENSE.txt → 9732.b7b47c32.js.LICENSE.txt} +0 -0
  106. /package/__mf/js/async/{lib-router.c75d9d73.js.LICENSE.txt → lib-router.318cb64e.js.LICENSE.txt} +0 -0
@@ -0,0 +1 @@
1
+ "use strict";(self.chunk_LogsTable=self.chunk_LogsTable||[]).push([["9890"],{74649:function(e,t,o){let n;o.d(t,{Sd:()=>tQ,aY:()=>tW});var r=o(62540),i=o(70451),l=o(20231);function s(e){e()}function a(e,t){return o=>e(t(o))}function u(e){return void 0!==e}function c(){}function d(e,t){return t(e)}function h(...e){return e}function m(e,t){e(0,t)}function f(e){e(2)}function p(e){return e(4)}function g(e,t){return e(1,e=>t(0,e))}function x(e,t){let o=e(1,e=>{o(),t(e)});return o}function v(e){let t,o;return n=>r=>{t=r,o&&clearTimeout(o),o=setTimeout(()=>{n(t)},e)}}function I(e,t){return e===t}function T(e=I){let t;return o=>n=>{e(t,n)||(t=n,o(n))}}function w(e){return t=>o=>{e(o)&&t(o)}}function S(e){return t=>a(t,e)}function C(e){return t=>()=>{t(e)}}function H(e,...t){let o=function(...e){return t=>e.reduceRight(d,t)}(...t);return(t,n)=>{switch(t){case 2:f(e);return;case 1:return e(1,o(n))}}}function y(e,t){return o=>n=>{o(t=e(t,n))}}function b(e){return t=>o=>{e>0?e--:t(o)}}function R(e){let t=null,o;return n=>r=>{t=r,o||(o=setTimeout(()=>{o=void 0,n(t)},e))}}function z(...e){let t=Array(e.length),o=0,n=null,r=Math.pow(2,e.length)-1;return e.forEach((e,i)=>{let l=Math.pow(2,i);e(1,e=>{let s=o;o|=l,t[i]=e,s!==r&&o===r&&n&&(n(),n=null)})}),e=>i=>{let l=()=>{e([i].concat(t))};o===r?l():n=l}}function E(e){let t=e,o=k();return(e,n)=>{switch(e){case 0:t=n;break;case 1:n(t);break;case 4:return t}return o(e,n)}}function B(e,t){var o;return o=E(t),g(e,o),o}function k(){let e=[];return(t,o)=>{switch(t){case 0:e.slice().forEach(e=>{e(o)});return;case 2:e.splice(0,e.length);return;case 1:return e.push(o),()=>{let t=e.indexOf(o);t>-1&&e.splice(t,1)}}}}function L(e){var t;return t=k(),g(e,t),t}function F(e,t=[],{singleton:o}={singleton:!0}){return{constructor:e,dependencies:t,id:O(),singleton:o}}let O=()=>Symbol();function M(...e){let t=k(),o=Array(e.length),n=0,r=Math.pow(2,e.length)-1;return e.forEach((e,i)=>{let l=Math.pow(2,i);e(1,e=>{o[i]=e,(n|=l)===r&&t(0,o)})}),function(e,i){switch(e){case 2:return void f(t);case 1:return n===r&&i(o),t(1,i)}}}function j(e,t=I){return H(e,T(t))}function W(...e){return function(t,o){switch(t){case 2:return;case 1:return function(...e){return()=>{e.map(s)}}(...e.map(e=>e(1,o)))}}}var P=((n=P||{})[n.DEBUG=0]="DEBUG",n[n.INFO=1]="INFO",n[n.WARN=2]="WARN",n[n.ERROR=3]="ERROR",n);let A={0:"debug",3:"error",1:"log",2:"warn"},V=F(()=>{let e=E(3);return{log:E((t,o,n=1)=>{var r;n>=(null!=(r=(typeof globalThis>"u"?window:globalThis).VIRTUOSO_LOG_LEVEL)?r:p(e))&&console[A[n]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,o)}),logLevel:e}},[],{singleton:!0});function D(e,t,o){return N(e,t,o).callbackRef}function N(e,t,o){let n=i.useRef(null),r=e=>{};if("u">typeof ResizeObserver){let l=i.useMemo(()=>new ResizeObserver(t=>{let n=()=>{let o=t[0].target;null!==o.offsetParent&&e(o)};o?n():requestAnimationFrame(n)}),[e]);r=e=>{e&&t?(l.observe(e),n.current=e):(n.current&&l.unobserve(n.current),n.current=null)}}return{callbackRef:r,ref:n}}function G(e,t,o,n,r,l,s,a,u){return N(i.useCallback(o=>{let i=function(e,t,o,n){let r=e.length;if(0===r)return null;let i=[];for(let l=0;l<r;l++){let r=e.item(l);if(void 0===r.dataset.index)continue;let s=parseInt(r.dataset.index),a=parseFloat(r.dataset.knownSize),u=t(r,o);if(0===u&&n("Zero-sized element, this should not happen",{child:r},P.ERROR),u===a)continue;let c=i[i.length-1];0===i.length||c.size!==u||c.endIndex!==s-1?i.push({endIndex:s,size:u,startIndex:s}):i[i.length-1].endIndex++}return i}(o.children,t,a?"offsetWidth":"offsetHeight",r),u=o.parentElement;for(;!u.dataset.virtuosoScroller;)u=u.parentElement;let c="window"===u.lastElementChild.dataset.viewportType,d=s?a?s.scrollLeft:s.scrollTop:c?a?window.pageXOffset||document.documentElement.scrollLeft:window.pageYOffset||document.documentElement.scrollTop:a?u.scrollLeft:u.scrollTop;n({scrollHeight:s?a?s.scrollWidth:s.scrollHeight:c?a?document.documentElement.scrollWidth:document.documentElement.scrollHeight:a?u.scrollWidth:u.scrollHeight,scrollTop:Math.max(d,0),viewportHeight:s?a?s.offsetWidth:s.offsetHeight:c?a?window.innerWidth:window.innerHeight:a?u.offsetWidth:u.offsetHeight}),null==l||l(a?_("column-gap",getComputedStyle(o).columnGap,r):_("row-gap",getComputedStyle(o).rowGap,r)),null!==i&&e(i)},[e,t,r,l,s,n]),o,u)}function _(e,t,o){return"normal"===t||null!=t&&t.endsWith("px")||o(`${e} was not resolved to pixel value correctly`,t,P.WARN),"normal"===t?0:parseInt(null!=t?t:"0",10)}function U(e,t,o){let n=i.useRef(null),r=i.useCallback(o=>{let r,i;if(!(null!=o&&o.offsetParent))return;let l=o.getBoundingClientRect(),s=l.width;if(t){let e=t.getBoundingClientRect(),o=l.top-e.top;i=e.height-Math.max(0,o),r=o+t.scrollTop}else i=window.innerHeight-Math.max(0,l.top),r=l.top+window.pageYOffset;n.current={offsetTop:r,visibleHeight:i,visibleWidth:s},e(n.current)},[e,t]),{callbackRef:l,ref:s}=N(r,!0,o),a=i.useCallback(()=>{r(s.current)},[r,s]);return i.useEffect(()=>{if(!t)return window.addEventListener("scroll",a),window.addEventListener("resize",a),()=>{window.removeEventListener("scroll",a),window.removeEventListener("resize",a)};{t.addEventListener("scroll",a);let e=new ResizeObserver(()=>{requestAnimationFrame(a)});return e.observe(t),()=>{t.removeEventListener("scroll",a),e.unobserve(t)}}},[a,t]),l}let K=F(()=>{let e=k(),t=k(),o=E(0),n=k(),r=E(0),i=k(),l=k(),s=E(0),a=E(0),u=E(0),c=E(0),d=k(),h=k(),m=E(!1),f=E(!1),p=E(!1);return g(H(e,S(({scrollTop:e})=>e)),t),g(H(e,S(({scrollHeight:e})=>e)),l),g(t,r),{deviation:o,fixedFooterHeight:u,fixedHeaderHeight:a,footerHeight:c,headerHeight:s,horizontalDirection:f,scrollBy:h,scrollContainerState:e,scrollHeight:l,scrollingInProgress:m,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:p,smoothScrollTargetReached:n,statefulScrollTop:r,viewportHeight:i}},[],{singleton:!0}),q={lvl:0};function $(e,t){let o=e.length;if(0===o)return[];let{index:n,value:r}=t(e[0]),i=[];for(let l=1;l<o;l++){let{index:o,value:s}=t(e[l]);i.push({end:o-1,start:n,value:r}),n=o,r=s}return i.push({end:1/0,start:n,value:r}),i}function Y(e){return e===q}function Z(e,t){if(!Y(e))return t===e.k?e.v:t<e.k?Z(e.l,t):Z(e.r,t)}function X(e,t,o="k"){if(Y(e))return[-1/0,void 0];if(Number(e[o])===t)return[e.k,e.v];if(Number(e[o])<t){let n=X(e.r,t,o);return n[0]===-1/0?[e.k,e.v]:n}return X(e.l,t,o)}function J(e,t,o){return Y(e)?er(t,o,1):t===e.k?eo(e,{k:t,v:o}):t<e.k?el(ei(eo(e,{l:J(e.l,t,o)}))):el(ei(eo(e,{r:J(e.r,t,o)})))}function Q(e,t,o){if(Y(e))return[];let n=X(e,t)[0];return $(function e(t,o,n){if(Y(t))return[];let{k:r,l:i,r:l,v:s}=t,a=[];return r>o&&(a=a.concat(e(i,o,n))),r>=o&&r<=n&&a.push({k:r,v:s}),r<=n&&(a=a.concat(e(l,o,n))),a}(e,n,o),({k:e,v:t})=>({index:e,value:t}))}function ee(e){return Y(e)?[]:[...ee(e.l),{k:e.k,v:e.v},...ee(e.r)]}function et(e){let{l:t,lvl:o,r:n}=e;if(n.lvl>=o-1&&t.lvl>=o-1)return e;if(o>n.lvl+1){if(en(t))return ei(eo(e,{lvl:o-1}));if(!Y(t)&&!Y(t.r))return eo(t.r,{l:eo(t,{r:t.r.l}),lvl:o,r:eo(e,{l:t.r.r,lvl:o-1})});throw Error("Unexpected empty nodes")}if(en(e))return el(eo(e,{lvl:o-1}));if(Y(n)||Y(n.l))throw Error("Unexpected empty nodes");{let t=n.l,r=en(t)?n.lvl-1:n.lvl;return eo(t,{l:eo(e,{lvl:o-1,r:t.l}),lvl:t.lvl+1,r:el(eo(n,{l:t.r,lvl:r}))})}}function eo(e,t){return er(void 0!==t.k?t.k:e.k,void 0!==t.v?t.v:e.v,void 0!==t.lvl?t.lvl:e.lvl,void 0!==t.l?t.l:e.l,void 0!==t.r?t.r:e.r)}function en(e){return Y(e)||e.lvl>e.r.lvl}function er(e,t,o,n=q,r=q){return{k:e,l:n,lvl:o,r,v:t}}function ei(e){let{l:t}=e;return Y(t)||t.lvl!==e.lvl?e:eo(t,{r:eo(e,{l:t.r})})}function el(e){let{lvl:t,r:o}=e;return Y(o)||Y(o.r)||o.lvl!==t||o.r.lvl!==t?e:eo(o,{l:eo(e,{r:o.l}),lvl:t+1})}function es(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function ea(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}let eu=F(()=>({recalcInProgress:E(!1)}),[],{singleton:!0});function ec(e,t,o,n=0){let r=e.length-1;for(;n<=r;){let i=Math.floor((n+r)/2),l=o(e[i],t);if(0===l)return i;if(-1===l){if(r-n<2)return i-1;r=i-1}else{if(r===n)return i;n=i+1}}throw Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function ed(e,t){return Math.round(e.getBoundingClientRect()[t])}function eh(e){return!Y(e.groupOffsetTree)}function em({index:e},t){return t===e?0:t<e?-1:1}function ef({offset:e},t){return t===e?0:t<e?-1:1}function ep(e,t,o){if(0===t.length)return 0;let{index:n,offset:r,size:i}=t[ec(t,e,em)],l=e-n,s=i*l+(l-1)*o+r;return s>0?s+o:s}function eg(e,t){if(!eh(t))return e;let o=0;for(;t.groupIndices[o]<=e+o;)o++;return e+o}function ex(e,t,o){if("u">typeof e.groupIndex)return t.groupIndices[e.groupIndex]+1;{let n=eg("LAST"===e.index?o:e.index,t);return Math.max(0,n,Math.min(o,n))}}function ev(e,[t,o,n,r]){t.length>0&&n("received item sizes",t,P.DEBUG);let i=e.sizeTree,l=i,s=0;if(o.length>0&&Y(i)&&2===t.length){let e=t[0].size,n=t[1].size;l=o.reduce((t,o)=>J(J(t,o,e),o+1,n),l)}else[l,s]=function(e,t){let o=Y(e)?0:1/0;for(let n of t){let{endIndex:t,size:r,startIndex:i}=n;if(o=Math.min(o,i),Y(e)){e=J(e,0,r);continue}let l=Q(e,i-1,t+1);if(l.some(function(e){let{endIndex:t,size:o,startIndex:n}=e;return e=>e.start===n&&(e.end===t||e.end===1/0)&&e.value===o}(n)))continue;let s=!1,a=!1;for(let{end:o,start:n,value:i}of l)s?(t>=n||r===i)&&(e=function e(t,o){if(Y(t))return q;let{k:n,l:r,r:i}=t;if(o!==n)return o<n?et(eo(t,{l:e(r,o)})):et(eo(t,{r:e(i,o)}));if(Y(r))return i;if(Y(i))return r;{let[e,o]=function e(t){return Y(t.r)?[t.k,t.v]:e(t.r)}(r);return et(eo(t,{k:e,l:function e(t){return Y(t.r)?t.l:et(eo(t,{r:e(t.r)}))}(r),v:o}))}}(e,n)):(a=i!==r,s=!0),o>t&&t>=n&&i!==r&&(e=J(e,t+1,i));a&&(e=J(e,i,r))}return[e,o]}(l,t);if(l===i)return e;let{lastIndex:a,lastOffset:u,lastSize:c,offsetTree:d}=eT(e.offsetTree,s,l,r);return{groupIndices:o,groupOffsetTree:o.reduce((e,t)=>J(e,t,ep(t,d,r)),q),lastIndex:a,lastOffset:u,lastSize:c,offsetTree:d,sizeTree:l}}function eI(e,t){let o=0,n=0;for(;o<e;)o+=t[n+1]-t[n]-1,n++;return n-(o!==e)}function eT(e,t,o,n){let r=e,i=0,l=0,s=0,a=0;if(0!==t){a=ec(r,t-1,em),s=r[a].offset;let e=X(o,t-1);i=e[0],l=e[1],r.length&&r[a].size===X(o,t)[1]&&(a-=1),r=r.slice(0,a+1)}else r=[];for(let{start:e,value:a}of Q(o,t,1/0)){let t=e-i,o=t*l+s+t*n;r.push({index:e,offset:o,size:a}),i=e,s=o,l=a}return{lastIndex:i,lastOffset:s,lastSize:l,offsetTree:r}}function ew(e){return{index:e.index,value:e}}let eS={offsetHeight:"height",offsetWidth:"width"},eC=F(([{log:e},{recalcInProgress:t}])=>{let o=k(),n=k(),r=B(n,0),i=k(),l=k(),s=E(0),a=E([]),u=E(void 0),c=E(void 0),d=E((e,t)=>ed(e,eS[t])),h=E(void 0),m=E(0),f={groupIndices:[],groupOffsetTree:q,lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:q},x=B(H(o,z(a,e,m),y(ev,f),T()),f),v=B(H(a,T(),y((e,t)=>({current:t,prev:e.current}),{current:[],prev:[]}),S(({prev:e})=>e)),[]);g(H(a,w(e=>e.length>0),z(x,m),S(([e,t,o])=>{let n=e.reduce((e,n,r)=>J(e,n,ep(n,t.offsetTree,o)||r),q);return{...t,groupIndices:e,groupOffsetTree:n}})),x),g(H(n,z(x),w(([e,{lastIndex:t}])=>e<t),S(([e,{lastIndex:t,lastSize:o}])=>[{endIndex:t,size:o,startIndex:e}])),o),g(u,c);let I=B(H(u,S(e=>void 0===e)),!0);g(H(c,w(e=>void 0!==e&&Y(p(x).sizeTree)),S(e=>[{endIndex:0,size:e,startIndex:0}])),o);let C=L(H(o,z(x),y(({sizes:e},[t,o])=>({changed:o!==e,sizes:o}),{changed:!1,sizes:f}),S(e=>e.changed)));H(s,y((e,t)=>({diff:e.prev-t,prev:t}),{diff:0,prev:0}),S(e=>e.diff))(1,e=>{let{groupIndices:o}=p(x);if(e>0)t(0,!0),i(0,e+eI(e,o));else if(e<0){let t=p(v);t.length>0&&(e-=eI(-e,t)),l(0,e)}}),H(s,z(e))(1,([e,t])=>{e<0&&t("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:s},P.ERROR)});let b=L(i);g(H(i,z(x),S(([e,t])=>{let o=t.groupIndices.length>0,n=[],r=t.lastSize;if(o){let o=Z(t.sizeTree,0),i=0,l=0;for(;i<e;){let e=t.groupIndices[l],s=t.groupIndices.length===l+1?1/0:t.groupIndices[l+1]-e-1;n.push({endIndex:e,size:o,startIndex:e}),n.push({endIndex:e+1+s-1,size:r,startIndex:e+1}),l++,i+=s+1}let s=ee(t.sizeTree);return i!==e&&s.shift(),s.reduce((t,{k:o,v:n})=>{let r=t.ranges;return 0!==t.prevSize&&(r=[...t.ranges,{endIndex:o+e-1,size:t.prevSize,startIndex:t.prevIndex}]),{prevIndex:o+e,prevSize:n,ranges:r}},{prevIndex:e,prevSize:0,ranges:n}).ranges}return ee(t.sizeTree).reduce((t,{k:o,v:n})=>({prevIndex:o+e,prevSize:n,ranges:[...t.ranges,{endIndex:o+e-1,size:t.prevSize,startIndex:t.prevIndex}]}),{prevIndex:0,prevSize:r,ranges:[]}).ranges})),o);let R=L(H(l,z(x,m),S(([e,{offsetTree:t},o])=>ep(-e,t,o))));return g(H(l,z(x,m),S(([e,t,o])=>{if(t.groupIndices.length>0){if(Y(t.sizeTree))return t;let n=q,r=p(v),i=0,l=0,s=0;for(;i<-e;){s=r[l];let e=r[l+1]-s-1;l++,i+=e+1}return n=ee(t.sizeTree).reduce((t,{k:o,v:n})=>J(t,Math.max(0,o+e),n),n),i!==-e&&(n=J(n,0,Z(t.sizeTree,s)),n=J(n,1,X(t.sizeTree,-e+1)[1])),{...t,sizeTree:n,...eT(t.offsetTree,0,n,o)}}{let n=ee(t.sizeTree).reduce((t,{k:o,v:n})=>J(t,Math.max(0,o+e),n),q);return{...t,sizeTree:n,...eT(t.offsetTree,0,n,o)}}})),x),{beforeUnshiftWith:b,data:h,defaultItemSize:c,firstItemIndex:s,fixedItemSize:u,gap:m,groupIndices:a,itemSize:d,listRefresh:C,shiftWith:l,shiftWithOffset:R,sizeRanges:o,sizes:x,statefulTotalCount:r,totalCount:n,trackItemSizes:I,unshiftWith:i}},h(V,eu),{singleton:!0});function eH(e){return e.reduce((e,t)=>(e.groupIndices.push(e.totalCount),e.totalCount+=t+1,e),{groupIndices:[],totalCount:0})}let ey=F(([{groupIndices:e,sizes:t,totalCount:o},{headerHeight:n,scrollTop:r}])=>{let i=k(),l=k(),s=L(H(i,S(eH)));return g(H(s,S(e=>e.totalCount)),o),g(H(s,S(e=>e.groupIndices)),e),g(H(M(r,t,n),w(([e,t])=>eh(t)),S(([e,t,o])=>X(t.groupOffsetTree,Math.max(e-o,0),"v")[0]),T(),S(e=>[e])),l),{groupCounts:i,topItemsIndexes:l}},h(eC,K)),eb=F(([{log:e}])=>{let t=E(!1),o=L(H(t,w(e=>e),T()));return t(1,t=>{t&&p(e)("props updated",{},P.DEBUG)}),{didMount:o,propsReady:t}},h(V),{singleton:!0}),eR="u">typeof document&&"scrollBehavior"in document.documentElement.style;function ez(e){let t="number"==typeof e?{index:e}:e;return t.align||(t.align="start"),t.behavior&&eR||(t.behavior="auto"),t.offset||(t.offset=0),t}let eE=F(([{gap:e,listRefresh:t,sizes:o,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:i,footerHeight:l,headerHeight:s,scrollingInProgress:a,scrollTo:u,smoothScrollTargetReached:c,viewportHeight:d},{log:h}])=>{let m=k(),f=k(),p=E(0),v=null,I=null,T=null;function w(){v&&(v(),v=null),T&&(T(),T=null),I&&(clearTimeout(I),I=null),a(0,!1)}return g(H(m,z(o,d,n,p,s,l,h),z(e,i,r),S(([[e,o,n,r,i,l,s,u],d,h,p])=>{let g=ez(e),{align:S,behavior:C,offset:y}=g,b=r-1,R=ex(g,o,b),z=ep(R,o.offsetTree,d)+l;"end"===S?(z+=h+X(o.sizeTree,R)[1]-n+p,R===b&&(z+=s)):"center"===S?z+=(h+X(o.sizeTree,R)[1]-n+p)/2:z-=i,y&&(z+=y);let E=t=>{w(),t?(u("retrying to scroll to",{location:e},P.DEBUG),m(0,e)):(f(0,!0),u("list did not change, scroll successful",{},P.DEBUG))};if(w(),"smooth"===C){let e=!1;T=t(1,t=>{e=e||t}),v=x(c,()=>{E(e)})}else v=x(H(t,e=>{let t=setTimeout(()=>{e(!1)},150);return o=>{o&&(e(!0),clearTimeout(t))}}),E);return I=setTimeout(()=>{w()},1200),a(0,!0),u("scrolling from index to",{behavior:C,index:R,top:z},P.DEBUG),{behavior:C,top:z}})),u),{scrollTargetReached:f,scrollToIndex:m,topListHeight:p}},h(eC,K,V),{singleton:!0});function eB(e,t){0==e?t():requestAnimationFrame(()=>{eB(e-1,t)})}function ek(e,t){return"number"==typeof e?e:"LAST"===e.index?t-1:e.index}let eL=F(([{defaultItemSize:e,listRefresh:t,sizes:o},{scrollTop:n},{scrollTargetReached:r,scrollToIndex:i},{didMount:l}])=>{let s=E(!0),a=E(0),c=E(!0);return g(H(l,z(a),w(([e,t])=>!!t),C(!1)),s),g(H(l,z(a),w(([e,t])=>!!t),C(!1)),c),H(M(t,l),z(s,o,e,c),w(([[,e],t,{sizeTree:o},n,r])=>e&&(!Y(o)||u(n))&&!t&&!r),z(a))(1,([,e])=>{x(r,()=>{c(0,!0)}),eB(4,()=>{x(n,()=>{s(0,!0)}),i(0,e)})}),{initialItemFinalLocationReached:c,initialTopMostItemIndex:a,scrolledToInitialItem:s}},h(eC,K,eE,eb),{singleton:!0});function eF(e,t){return 1.01>Math.abs(e-t)}let eO="down",eM={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},ej=F(([{footerHeight:e,headerHeight:t,scrollBy:o,scrollContainerState:n,scrollTop:r,viewportHeight:i}])=>{let l=E(!1),s=E(!0),a=k(),u=k(),c=E(4),d=E(0),h=B(H(W(H(j(r),b(1),C(!0)),H(j(r),b(1),C(!1),v(100))),T()),!1),m=B(H(W(H(o,C(!0)),H(o,C(!1),v(200))),T()),!1);g(H(M(j(r),j(d)),S(([e,t])=>e<=t),T()),s),g(H(s,R(50)),u);let f=L(H(M(n,j(i),j(t),j(e),j(c)),y((e,[{scrollHeight:t,scrollTop:o},n,r,i,l])=>{let s={scrollHeight:t,scrollTop:o,viewportHeight:n};if(o+n-t>-l){let t,n;return o>e.state.scrollTop?(t="SCROLLED_DOWN",n=e.state.scrollTop-o):(t="SIZE_DECREASED",n=e.state.scrollTop-o||e.scrollTopDelta),{atBottom:!0,atBottomBecause:t,scrollTopDelta:n,state:s}}return{atBottom:!1,notAtBottomBecause:s.scrollHeight>e.state.scrollHeight?"SIZE_INCREASED":n<e.state.viewportHeight?"VIEWPORT_HEIGHT_DECREASING":o<e.state.scrollTop?"SCROLLING_UPWARDS":"NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",state:s}},eM),T((e,t)=>e&&e.atBottom===t.atBottom))),x=B(H(n,y((e,{scrollHeight:t,scrollTop:o,viewportHeight:n})=>{if(eF(e.scrollHeight,t))return{changed:!1,jump:0,scrollHeight:t,scrollTop:o};{let r=t-(o+n)<1;return e.scrollTop!==o&&r?{changed:!0,jump:e.scrollTop-o,scrollHeight:t,scrollTop:o}:{changed:!0,jump:0,scrollHeight:t,scrollTop:o}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),w(e=>e.changed),S(e=>e.jump)),0);g(H(f,S(e=>e.atBottom)),l),g(H(l,R(50)),a);let I=E(eO);g(H(n,S(({scrollTop:e})=>e),T(),y((e,t)=>p(m)?{direction:e.direction,prevScrollTop:t}:{direction:t<e.prevScrollTop?"up":eO,prevScrollTop:t},{direction:eO,prevScrollTop:0}),S(e=>e.direction)),I),g(H(n,R(50),C("none")),I);let F=E(0);return g(H(h,w(e=>!e),C(0)),F),g(H(r,R(100),z(h),w(([e,t])=>!!t),y(([e,t],[o])=>[t,o],[0,0]),S(([e,t])=>t-e)),F),{atBottomState:f,atBottomStateChange:a,atBottomThreshold:c,atTopStateChange:u,atTopThreshold:d,isAtBottom:l,isAtTop:s,isScrolling:h,lastJumpDueToItemResize:x,scrollDirection:I,scrollVelocity:F}},h(K)),eW="bottom",eP="none";function eA(e,t,o){return"number"==typeof e?"up"===o&&"top"===t||o===eO&&t===eW?e:0:"up"===o?"top"===t?e.main:e.reverse:t===eW?e.main:e.reverse}function eV(e,t){var o;return"number"==typeof e?e:null!=(o=e[t])?o:0}let eD=F(([{deviation:e,fixedHeaderHeight:t,headerHeight:o,scrollTop:n,viewportHeight:r}])=>{let i=k(),l=E(0),s=E(0),a=E(0),u=B(H(M(j(n),j(r),j(o),j(i,ea),j(a),j(l),j(t),j(e),j(s)),S(([e,t,o,[n,r],i,l,s,a,u])=>{let c=e-a,d=Math.max(o-c,0),h=eP,m=eV(u,"top"),f=eV(u,eW);return n-=a,n+=o+s,r+=o+s,n>e+(l+s)-m&&(h="up"),(r-=a)<e-d+t+f&&(h=eO),h!==eP?[Math.max(c-o-eA(i,"top",h)-m,0),c-d-s+t+eA(i,eW,h)+f]:null}),w(e=>null!=e),T(ea)),[0,0]);return{increaseViewportBy:s,listBoundary:i,overscan:a,topListHeight:l,visibleRange:u}},h(K),{singleton:!0}),eN={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function eG(e,t,o,n,r,i){let{lastIndex:l,lastOffset:s,lastSize:a}=r,u=0,c=0;if(e.length>0){u=e[0].offset;let t=e[e.length-1];c=t.offset+t.size}let d=o-l,h=u,m=s+d*a+(d-1)*n-c;return{bottom:c,firstItemIndex:i,items:eU(e,r,i),offsetBottom:m,offsetTop:u,top:h,topItems:eU(t,r,i),topListHeight:t.reduce((e,t)=>t.size+e,0),totalCount:o}}function e_(e,t,o,n,r,i){let l=0;if(o.groupIndices.length>0)for(let t of o.groupIndices){if(t-l>=e)break;l++}let s=e+l,a=ek(t,s);return eG(Array.from({length:s}).map((e,t)=>({data:i[t+a],index:t+a,offset:0,size:0})),[],s,r,o,n)}function eU(e,t,o){if(0===e.length)return[];if(!eh(t))return e.map(e=>({...e,index:e.index+o,originalIndex:e.index}));let n=e[0].index,r=e[e.length-1].index,i=[],l=Q(t.groupOffsetTree,n,r),s,a=0;for(let n of e){let e;(!s||s.end<n.index)&&(s=l.shift(),a=t.groupIndices.indexOf(s.start)),e=n.index===s.start?{index:a,type:"group"}:{groupIndex:a,index:n.index-(a+1)+o},i.push({...e,data:n.data,offset:n.offset,originalIndex:n.index,size:n.size})}return i}let eK=F(([{data:e,firstItemIndex:t,gap:o,sizes:n,totalCount:r},i,{listBoundary:l,topListHeight:s,visibleRange:a},{initialTopMostItemIndex:c,scrolledToInitialItem:d},{topListHeight:h},m,{didMount:f},{recalcInProgress:x}])=>{let v=E([]),I=E(0),C=k();g(i.topItemsIndexes,v);let y=B(H(M(f,x,j(a,ea),j(r),j(n),j(c),d,j(v),j(t),j(o),e),w(([e,t,,o,,,,,,,n])=>{let r=n&&n.length!==o;return e&&!t&&!r}),S(([,,[e,t],o,n,r,i,l,s,a,u])=>{var c;let{offsetTree:d,sizeTree:h}=n,m=p(I);if(0===o)return{...eN,totalCount:o};if(0===e&&0===t)return 0===m?{...eN,totalCount:o}:e_(m,r,n,s,a,u||[]);if(Y(h))return m>0?null:eG(function(e,t,o){if(eh(t)){let n=eg(e,t);return[{index:X(t.groupOffsetTree,n)[0],offset:0,size:0},{data:null==o?void 0:o[0],index:n,offset:0,size:0}]}return[{data:null==o?void 0:o[0],index:e,offset:0,size:0}]}(ek(r,o),n,u),[],o,a,n,s);let f=[];if(l.length>0){let e=l[0],t=l[l.length-1],o=0;for(let n of Q(h,e,t)){let r=n.value,i=Math.max(n.start,e),l=Math.min(n.end,t);for(let e=i;e<=l;e++)f.push({data:null==u?void 0:u[e],index:e,offset:o,size:r}),o+=r}}if(!i)return eG([],f,o,a,n,s);let g=l.length>0?l[l.length-1]+1:0,x=function(e,t,o,n=0){let r,i;return n>0&&(t=Math.max(t,e[ec(e,n,em)].offset)),$((r=ec(e,t,ef),i=ec(e,o,ef,r),e.slice(r,i+1)),ew)}(d,e,t,g);if(0===x.length)return null;let v=o-1;return eG(((o=>{for(let n of x){let r=n.value,i=r.offset,l=n.start,s=r.size;if(r.offset<e){let t=(l+=Math.floor((e-r.offset+a)/(s+a)))-n.start;i+=t*s+t*a}l<g&&(i+=(g-l)*s,l=g);let c=Math.min(n.end,v);for(let e=l;e<=c&&!(i>=t);e++)o.push({data:null==u?void 0:u[e],index:e,offset:i,size:s}),i+=s+a}})(c=[]),c),f,o,a,n,s)}),w(e=>null!==e),T()),eN);g(H(e,w(u),S(e=>null==e?void 0:e.length)),r),g(H(y,S(e=>e.topListHeight)),h),g(h,s),g(H(y,S(e=>[e.top,e.bottom])),l),g(H(y,S(e=>e.items)),C);let b=L(H(y,w(({items:e})=>e.length>0),z(r,e),w(([{items:e},t])=>e[e.length-1].originalIndex===t-1),S(([,e,t])=>[e-1,t]),T(ea),S(([e])=>e))),F=L(H(y,R(200),w(({items:e,topItems:t})=>e.length>0&&e[0].originalIndex===t.length),S(({items:e})=>e[0].index),T())),O=L(H(y,w(({items:e})=>e.length>0),S(({items:e})=>{let t=0,o=e.length-1;for(;"group"===e[t].type&&t<o;)t++;for(;"group"===e[o].type&&o>t;)o--;return{endIndex:e[o].index,startIndex:e[t].index}}),T(es)));return{endReached:b,initialItemCount:I,itemsRendered:C,listState:y,rangeChanged:O,startReached:F,topItemsIndexes:v,...m}},h(eC,ey,eD,eL,eE,ej,eb,eu),{singleton:!0}),eq=F(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:o,headerHeight:n},{listState:r}])=>{let i=k(),l=B(H(M(o,e,n,t,r),S(([e,t,o,n,r])=>e+t+o+n+r.offsetBottom+r.bottom)),0);return g(j(l),i),{totalListHeight:l,totalListHeightChanged:i}},h(K,eK),{singleton:!0}),e$=F(([{viewportHeight:e},{totalListHeight:t}])=>{let o=E(!1),n=B(H(M(o,e,t),w(([e])=>e),S(([,e,t])=>Math.max(0,e-t)),R(0),T()),0);return{alignToBottom:o,paddingTopAddition:n}},h(K,eq),{singleton:!0});function eY(e){return!!e&&("smooth"===e?"smooth":"auto")}let eZ=F(([{listRefresh:e,totalCount:t},{atBottomState:o,isAtBottom:n},{scrollToIndex:r},{scrolledToInitialItem:i},{didMount:l,propsReady:s},{log:a},{scrollingInProgress:u}])=>{let c=E(!1),d=k(),h=null;function m(e){r(0,{align:"end",behavior:e,index:"LAST"})}function f(e){setTimeout(x(o,t=>{!e||t.atBottom||"SIZE_INCREASED"!==t.notAtBottomBecause||h||(p(a)("scrolling to bottom due to increased size",{},P.DEBUG),m("auto"))}),100)}return H(M(H(j(t),b(1)),l),z(j(c),n,i,u),S(([[e,t],o,n,r,i])=>{let l,s=t&&r,a="auto";return s&&(l=n||i,a="function"==typeof o?eY(o(l)):l&&eY(o),s=s&&!!a),{followOutputBehavior:a,shouldFollow:s,totalCount:e}}),w(({shouldFollow:e})=>e))(1,({followOutputBehavior:t,totalCount:o})=>{h&&(h(),h=null),h=x(e,()=>{p(a)("following output to ",{totalCount:o},P.DEBUG),m(t),h=null})}),H(M(j(c),t,s),w(([e,,t])=>e&&t),y(({value:e},[,t])=>({refreshed:e===t,value:t}),{refreshed:!1,value:0}),w(({refreshed:e})=>e),z(c,t))(1,([,e])=>{p(i)&&f(!1!==e)}),d(1,()=>{f(!1!==p(c))}),M(j(c),o)(1,([e,t])=>{e&&!t.atBottom&&"VIEWPORT_HEIGHT_DECREASING"===t.notAtBottomBecause&&m("auto")}),{autoscrollToBottom:d,followOutput:c}},h(eC,ej,eE,eL,eb,V,K)),eX=F(([{data:e,firstItemIndex:t,gap:o,sizes:n},{initialTopMostItemIndex:r},{initialItemCount:i,listState:l},{didMount:s}])=>(g(H(s,z(i),w(([,e])=>0!==e),z(r,n,t,o,e),S(([[,e],t,o,n,r,i=[]])=>e_(e,t,o,n,r,i))),l),{}),h(eC,eL,eK,eb),{singleton:!0}),eJ=F(([{didMount:e},{scrollTo:t},{listState:o}])=>{let n=E(0);return H(e,z(n),w(([,e])=>0!==e),S(([,e])=>({top:e})))(1,e=>{x(H(o,b(1),w(e=>e.items.length>1)),()=>{requestAnimationFrame(()=>{t(0,e)})})}),{initialScrollTop:n}},h(eb,K,eK),{singleton:!0}),eQ=({itemBottom:e,itemTop:t,locationParams:{align:o,behavior:n,...r},viewportBottom:i,viewportTop:l})=>t<l?{...r,align:null!=o?o:"start",behavior:n}:e>i?{...r,align:null!=o?o:"end",behavior:n}:null,e0=F(([{gap:e,sizes:t,totalCount:o},{fixedFooterHeight:n,fixedHeaderHeight:r,headerHeight:i,scrollingInProgress:l,scrollTop:s,viewportHeight:a},{scrollToIndex:u}])=>{let c=k();return g(H(c,z(t,a,o,i,r,n,s),z(e),S(([[e,t,o,n,r,i,s,a],u])=>{let{align:c,behavior:d,calculateViewLocation:h=eQ,done:m,...f}=e,g=ex(e,t,n-1),v=ep(g,t.offsetTree,u)+r+i,I=h({itemBottom:v+X(t.sizeTree,g)[1],itemTop:v,locationParams:{align:c,behavior:d,...f},viewportBottom:a+o-s,viewportTop:a+i});return I?m&&x(H(l,w(e=>!e),b(p(l)?1:2)),m):m&&m(),I}),w(e=>null!==e)),u),{scrollIntoView:c}},h(eC,K,eE,eK,V),{singleton:!0}),e1=F(([{scrollVelocity:e}])=>{let t=E(!1),o=k(),n=E(!1);return g(H(e,z(n,t,o),w(([e,t])=>!!t),S(([e,t,o,n])=>{let{enter:r,exit:i}=t;if(o){if(i(e,n))return!1}else if(r(e,n))return!0;return o}),T()),t),H(M(t,e,o),z(n))(1,([[e,t,o],n])=>{e&&n&&n.change&&n.change(t,o)}),{isSeeking:t,scrollSeekConfiguration:n,scrollSeekRangeChanged:o,scrollVelocity:e}},h(ej),{singleton:!0}),e2=F(([{scrollContainerState:e,scrollTo:t}])=>{let o=k(),n=k(),r=k(),i=E(!1),l=E(void 0);return g(H(M(o,n),S(([{scrollHeight:e,scrollTop:t,viewportHeight:o},{offsetTop:n}])=>({scrollHeight:e,scrollTop:Math.max(0,t-n),viewportHeight:o}))),e),g(H(t,z(n),S(([e,{offsetTop:t}])=>({...e,top:e.top+t}))),r),{customScrollParent:l,useWindowScroll:i,windowScrollContainerState:o,windowScrollTo:r,windowViewportRect:n}},h(K)),e4=F(([{sizeRanges:e,sizes:t},{headerHeight:o,scrollTop:n},{initialTopMostItemIndex:r},{didMount:i},{useWindowScroll:l,windowScrollContainerState:s,windowViewportRect:a}])=>{let c=k(),d=E(void 0),h=E(null),m=E(null);return g(s,h),g(a,m),H(c,z(t,n,l,h,m,o))(1,([e,t,o,n,r,i,l])=>{let s=ee(t.sizeTree).map(({k:e,v:t},o,n)=>{let r=n[o+1];return{endIndex:r?r.k-1:1/0,size:t,startIndex:e}});n&&null!==r&&null!==i&&(o=r.scrollTop-i.offsetTop),e({ranges:s,scrollTop:o-=l})}),g(H(d,w(u),S(e3)),r),g(H(i,z(d),w(([,e])=>void 0!==e),T(),S(([,e])=>e.ranges)),e),{getState:c,restoreStateFrom:d}},h(eC,K,eL,eb,e2));function e3(e){return{align:"start",index:0,offset:e.scrollTop}}let e5=F(([{topItemsIndexes:e}])=>{let t=E(0);return g(H(t,w(e=>e>=0),S(e=>Array.from({length:e}).map((e,t)=>t))),e),{topItemCount:t}},h(eK));function e9(e){let t=!1,o;return()=>(t||(t=!0,o=e()),o)}let e6=e9(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),e7=F(([{deviation:e,scrollBy:t,scrollingInProgress:o,scrollTop:n},{isAtBottom:r,isScrolling:i,lastJumpDueToItemResize:l,scrollDirection:s},{listState:a},{beforeUnshiftWith:u,gap:c,shiftWithOffset:d,sizes:h},{log:m},{recalcInProgress:f}])=>{let p=L(H(a,z(l),y(([,e,t,o],[{bottom:n,items:r,offsetBottom:i,totalCount:l},s])=>{let a=n+i,u=0;return t===l&&e.length>0&&r.length>0&&(0===r[0].originalIndex&&0===e[0].originalIndex||0!=(u=a-o)&&(u+=s)),[u,r,l,a]},[0,[],0,0]),w(([e])=>0!==e),z(n,s,o,r,m,f),w(([,e,t,o,,,n])=>!n&&!o&&0!==e&&"up"===t),S(([[e],,,,,t])=>(t("Upward scrolling compensation",{amount:e},P.DEBUG),e))));function x(o){o>0?(t(0,{behavior:"auto",top:-o}),e(0,0)):(e(0,0),t(0,{behavior:"auto",top:-o}))}return H(p,z(e,i))(1,([t,o,n])=>{n&&e6()?e(0,o-t):x(-t)}),H(M(B(i,!1),e,f),w(([e,t,o])=>!e&&!o&&0!==t),S(([e,t])=>t),R(1))(1,x),g(H(d,S(e=>({top:-e}))),t),H(u,z(h,c),S(([e,{groupIndices:t,lastSize:o,sizeTree:n},r])=>{if(0===t.length)return e*(o+r);{let i=0,l=Z(n,0),s=0,a=0;for(;s<e;){s++,i+=l;let n=t.length===a+1?1/0:t[a+1]-t[a]-1;s+n>e&&(i-=l,n=e-s+1),s+=n,i+=n*(o+r),a++}return i}}))(1,o=>{e(0,o),requestAnimationFrame(()=>{t(0,{top:o}),requestAnimationFrame(()=>{var t;t=0,e(0,0),f(0,!1)})})}),{deviation:e}},h(K,ej,eK,eC,V,eu)),e8=F(([e,t,o,n,r,i,l,s,a,u])=>({...e,...t,...o,...n,...r,...i,...l,...s,...a,...u}),h(eD,eX,eb,e1,eq,eJ,e$,e2,e0,V)),te=F(([{data:e,defaultItemSize:t,firstItemIndex:o,fixedItemSize:n,gap:r,groupIndices:i,itemSize:l,sizeRanges:s,sizes:a,statefulTotalCount:u,totalCount:c,trackItemSizes:d},{initialItemFinalLocationReached:h,initialTopMostItemIndex:m,scrolledToInitialItem:f},p,x,v,{listState:I,topItemsIndexes:T,...w},{scrollToIndex:C},y,{topItemCount:b},{groupCounts:R},z])=>(g(w.rangeChanged,z.scrollSeekRangeChanged),g(H(z.windowViewportRect,S(e=>e.visibleHeight)),p.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:o,fixedItemHeight:n,gap:r,groupCounts:R,initialItemFinalLocationReached:h,initialTopMostItemIndex:m,scrolledToInitialItem:f,sizeRanges:s,topItemCount:b,topItemsIndexes:T,totalCount:c,...v,groupIndices:i,itemSize:l,listState:I,scrollToIndex:C,statefulTotalCount:u,trackItemSizes:d,...w,...z,...p,sizes:a,...x}),h(eC,eL,K,e4,eZ,eK,eE,e7,e5,ey,e8)),tt="u">typeof document?i.useLayoutEffect:i.useEffect;function to(e,t,o){let n=Object.keys(t.required||{}),l=Object.keys(t.optional||{}),s=Object.keys(t.methods||{}),a=Object.keys(t.events||{}),u=i.createContext({});function d(e,o){var r,i,s,a;for(let l of(e.propsReady&&(r=e.propsReady,r(0,!1)),n)){i=e[t.required[l]],i(0,o[l])}for(let n of l){n in o&&(s=e[t.optional[n]],s(0,o[n]))}e.propsReady&&(a=e.propsReady,a(0,!0))}function h(e){return a.reduce((o,n)=>{var r;let i,l,s;return o[n]=(r=e[t.events[n]],s=()=>null==i?void 0:i(),function(e,t){switch(e){case 1:return t?l===t?void 0:(s(),l=t,i=r(1,t)):(s(),c);case 2:s(),l=null;return}}),o},{})}return{Component:i.forwardRef((c,m)=>{var p;let{children:g,...x}=c,[v]=i.useState(()=>{var t;let o,n;return o=new Map,d(t=(n=({constructor:e,dependencies:t,id:r,singleton:i})=>{if(i&&o.has(r))return o.get(r);let l=e(t.map(e=>n(e)));return i&&o.set(r,l),l})(e),x),t}),[I]=i.useState(()=>h(v));return tt(()=>{for(let e of a)e in x&&(0,I[e])(1,x[e]);return()=>{Object.values(I).map(f)}},[x,I,v]),tt(()=>{d(v,x)}),i.useImperativeHandle(m,(p=s.reduce((e,o)=>(e[o]=e=>{var n;n=v[t.methods[o]],n(0,e)},e),{}),()=>p)),(0,r.jsx)(u.Provider,{value:v,children:o?(0,r.jsx)(o,{...function(e,t){let o={},n={},r=0,i=e.length;for(;r<i;)n[e[r]]=1,r+=1;for(let e in t)Object.hasOwn(n,e)||(o[e]=t[e]);return o}([...n,...l,...a],x),children:g}):g})}),useEmitter:(e,t)=>{let o=i.useContext(u)[e];tt(()=>o(1,t),[t,o])},useEmitterValue:i.version.startsWith("18")?e=>{let t=i.useContext(u)[e],o=i.useCallback(e=>t(1,e),[t]);return i.useSyncExternalStore(o,()=>p(t),()=>p(t))}:e=>{let t=i.useContext(u)[e],[o,n]=i.useState(()=>p(t));return tt(()=>t(1,e=>{e!==o&&n(()=>e)}),[t,o]),o},usePublisher:e=>{var t;return i.useCallback((t=i.useContext(u)[e],e=>(function(e,t){e(0,t)})(t,e)),[e])}}}let tn=i.createContext(void 0),tr=i.createContext(void 0),ti="u">typeof document?i.useLayoutEffect:i.useEffect;function tl(e,t,o,n=c,r,s){let a=i.useRef(null),u=i.useRef(null),d=i.useRef(null),h=i.useCallback(o=>{let n=o.target,r=n===window||n===document,i=s?r?window.pageXOffset||document.documentElement.scrollLeft:n.scrollLeft:r?window.pageYOffset||document.documentElement.scrollTop:n.scrollTop,a=s?r?document.documentElement.scrollWidth:n.scrollWidth:r?document.documentElement.scrollHeight:n.scrollHeight,c=s?r?window.innerWidth:n.offsetWidth:r?window.innerHeight:n.offsetHeight,h=()=>{e({scrollHeight:a,scrollTop:Math.max(i,0),viewportHeight:c})};o.suppressFlushSync?h():l.flushSync(h),null!==u.current&&(i===u.current||i<=0||i===a-c)&&(u.current=null,t(!0),d.current&&(clearTimeout(d.current),d.current=null))},[e,t]);return i.useEffect(()=>{let e=r||a.current;return n(r||a.current),h({suppressFlushSync:!0,target:e}),e.addEventListener("scroll",h,{passive:!0}),()=>{n(null),e.removeEventListener("scroll",h)}},[a,h,o,n,r]),{scrollByCallback:function(e){s&&(e={behavior:e.behavior,left:e.top}),a.current.scrollBy(e)},scrollerRef:a,scrollToCallback:function(o){let n,r,i,l=a.current;if(!l||(s?"offsetWidth"in l&&0===l.offsetWidth:"offsetHeight"in l&&0===l.offsetHeight))return;let c="smooth"===o.behavior;l===window?(r=Math.max(ed(document.documentElement,s?"width":"height"),s?document.documentElement.scrollWidth:document.documentElement.scrollHeight),n=s?window.innerWidth:window.innerHeight,i=s?document.documentElement.scrollLeft:document.documentElement.scrollTop):(r=l[s?"scrollWidth":"scrollHeight"],n=ed(l,s?"width":"height"),i=l[s?"scrollLeft":"scrollTop"]);let h=r-n;if(o.top=Math.ceil(Math.max(Math.min(h,o.top),0)),eF(n,r)||o.top===i){e({scrollHeight:r,scrollTop:i,viewportHeight:n}),c&&t(!0);return}c?(u.current=o.top,d.current&&clearTimeout(d.current),d.current=setTimeout(()=>{d.current=null,u.current=null,t(!0)},1e3)):u.current=null,s&&(o={behavior:o.behavior,left:o.top}),l.scrollTo(o)}}}let ts="-webkit-sticky",ta="sticky",tu=e9(()=>{if(typeof document>"u")return ta;let e=document.createElement("div");return e.style.position=ts,e.style.position===ts?ts:ta});function tc(e){return e}let td=F(()=>{let e=E(e=>`Item ${e}`),t=E(null),o=E(e=>`Group ${e}`),n=E({}),r=E(tc),i=E("div"),l=E(c),s=(e,t=null)=>B(H(n,S(t=>t[e]),T()),t);return{components:n,computeItemKey:r,context:t,EmptyPlaceholder:s("EmptyPlaceholder"),FooterComponent:s("Footer"),GroupComponent:s("Group","div"),groupContent:o,HeaderComponent:s("Header"),HeaderFooterTag:i,ItemComponent:s("Item","div"),itemContent:e,ListComponent:s("List","div"),ScrollerComponent:s("Scroller","div"),scrollerRef:l,ScrollSeekPlaceholder:s("ScrollSeekPlaceholder"),TopItemListComponent:s("TopItemList")}}),th=F(([e,t])=>({...e,...t}),h(te,td)),tm=({height:e})=>(0,r.jsx)("div",{style:{height:e}}),tf={overflowAnchor:"none",position:tu(),zIndex:1},tp={overflowAnchor:"none"},tg={...tp,display:"inline-block",height:"100%"},tx=i.memo(function({showTopList:e=!1}){let t=tF("listState"),o=tO("sizeRanges"),n=tF("useWindowScroll"),l=tF("customScrollParent"),s=tO("windowScrollContainerState"),a=tO("scrollContainerState"),u=tF("itemContent"),d=tF("context"),h=tF("groupContent"),m=tF("trackItemSizes"),f=tF("itemSize"),p=tF("log"),g=tO("gap"),x=tF("horizontalDirection"),{callbackRef:v}=G(o,f,m,e?c:l||n?s:a,p,g,l,x,tF("skipAnimationFrameInResizeObserver")),[I,T]=i.useState(0);tL("deviation",e=>{I!==e&&T(e)});let w=tF("EmptyPlaceholder"),S=tF("ScrollSeekPlaceholder")||tm,C=tF("ListComponent"),H=tF("ItemComponent"),y=tF("GroupComponent"),b=tF("computeItemKey"),R=tF("isSeeking"),z=tF("groupIndices").length>0,E=tF("alignToBottom"),B=tF("initialItemFinalLocationReached"),k=e?{}:{boxSizing:"border-box",...x?{display:"inline-block",height:"100%",marginLeft:0!==I?I:E?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:0!==I?I:E?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...B?{}:{visibility:"hidden"}};return!e&&0===t.totalCount&&w?(0,r.jsx)(w,{...tS(w,d)}):(0,r.jsx)(C,{...tS(C,d),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:v,style:k,children:(e?t.topItems:t.items).map(e=>{let o=e.originalIndex,n=b(o+t.firstItemIndex,e.data,d);return R?(0,i.createElement)(S,{...tS(S,d),height:e.size,index:e.index,key:n,type:e.type||"item",..."group"===e.type?{}:{groupIndex:e.groupIndex}}):"group"===e.type?(0,i.createElement)(y,{...tS(y,d),"data-index":o,"data-item-index":e.index,"data-known-size":e.size,key:n,style:tf},h(e.index,d)):(0,i.createElement)(H,{...tS(H,d),...tC(H,e.data),"data-index":o,"data-item-group-index":e.groupIndex,"data-item-index":e.index,"data-known-size":e.size,key:n,style:x?tg:tp},z?u(e.index,e.groupIndex,e.data,d):u(e.index,e.data,d))})})}),tv={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},tI={outline:"none",overflowX:"auto",position:"relative"},tT=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),tw={position:tu(),top:0,width:"100%",zIndex:1};function tS(e,t){if("string"!=typeof e)return{context:t}}function tC(e,t){return{item:"string"==typeof e?void 0:t}}let tH=i.memo(function(){let e=tF("HeaderComponent"),t=tO("headerHeight"),o=tF("HeaderFooterTag"),n=D(i.useMemo(()=>e=>{t(ed(e,"height"))},[t]),!0,tF("skipAnimationFrameInResizeObserver")),l=tF("context");return e?(0,r.jsx)(o,{ref:n,children:(0,r.jsx)(e,{...tS(e,l)})}):null}),ty=i.memo(function(){let e=tF("FooterComponent"),t=tO("footerHeight"),o=tF("HeaderFooterTag"),n=D(i.useMemo(()=>e=>{t(ed(e,"height"))},[t]),!0,tF("skipAnimationFrameInResizeObserver")),l=tF("context");return e?(0,r.jsx)(o,{ref:n,children:(0,r.jsx)(e,{...tS(e,l)})}):null});function tb({useEmitter:e,useEmitterValue:t,usePublisher:o}){return i.memo(function({children:n,style:i,...l}){let s=o("scrollContainerState"),a=t("ScrollerComponent"),u=o("smoothScrollTargetReached"),c=t("scrollerRef"),d=t("context"),h=t("horizontalDirection")||!1,{scrollByCallback:m,scrollerRef:f,scrollToCallback:p}=tl(s,u,a,c,void 0,h);return e("scrollTo",p),e("scrollBy",m),(0,r.jsx)(a,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:f,style:{...h?tI:tv,...i},tabIndex:0,...l,...tS(a,d),children:n})})}function tR({useEmitter:e,useEmitterValue:t,usePublisher:o}){return i.memo(function({children:n,style:i,...l}){let s=o("windowScrollContainerState"),a=t("ScrollerComponent"),u=o("smoothScrollTargetReached"),d=t("totalListHeight"),h=t("deviation"),m=t("customScrollParent"),f=t("context"),{scrollByCallback:p,scrollerRef:g,scrollToCallback:x}=tl(s,u,a,c,m);return ti(()=>(g.current=m||window,()=>{g.current=null}),[g,m]),e("windowScrollTo",x),e("scrollBy",p),(0,r.jsx)(a,{"data-virtuoso-scroller":!0,style:{position:"relative",...i,...0!==d?{height:d+h}:{}},...l,...tS(a,f),children:n})})}let tz=({children:e})=>{let t=i.useContext(tn),o=tO("viewportHeight"),n=tO("fixedItemHeight"),l=tF("alignToBottom"),s=tF("horizontalDirection"),u=D(i.useMemo(()=>a(o,e=>ed(e,s?"width":"height")),[o,s]),!0,tF("skipAnimationFrameInResizeObserver"));return i.useEffect(()=>{t&&(o(t.viewportHeight),n(t.itemHeight))},[t,o,n]),(0,r.jsx)("div",{"data-viewport-type":"element",ref:u,style:tT(l),children:e})},tE=({children:e})=>{let t=i.useContext(tn),o=tO("windowViewportRect"),n=tO("fixedItemHeight"),l=U(o,tF("customScrollParent"),tF("skipAnimationFrameInResizeObserver")),s=tF("alignToBottom");return i.useEffect(()=>{t&&(n(t.itemHeight),o({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,o,n]),(0,r.jsx)("div",{"data-viewport-type":"window",ref:l,style:tT(s),children:e})},tB=({children:e})=>{let t=tF("TopItemListComponent")||"div",o=tF("headerHeight"),n={...tw,marginTop:`${o}px`},i=tF("context");return(0,r.jsx)(t,{style:n,...tS(t,i),children:e})},{Component:tk,useEmitter:tL,useEmitterValue:tF,usePublisher:tO}=to(th,{events:{atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",endReached:"endReached",groupIndices:"groupIndices",isScrolling:"isScrolling",itemsRendered:"itemsRendered",rangeChanged:"rangeChanged",startReached:"startReached",totalListHeightChanged:"totalListHeightChanged"},methods:{autoscrollToBottom:"autoscrollToBottom",getState:"getState",scrollBy:"scrollBy",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollToIndex:"scrollToIndex"},optional:{alignToBottom:"alignToBottom",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",components:"components",computeItemKey:"computeItemKey",context:"context",customScrollParent:"customScrollParent",data:"data",defaultItemHeight:"defaultItemHeight",firstItemIndex:"firstItemIndex",fixedItemHeight:"fixedItemHeight",followOutput:"followOutput",groupContent:"groupContent",groupCounts:"groupCounts",headerFooterTag:"HeaderFooterTag",horizontalDirection:"horizontalDirection",increaseViewportBy:"increaseViewportBy",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",initialTopMostItemIndex:"initialTopMostItemIndex",itemContent:"itemContent",itemSize:"itemSize",logLevel:"logLevel",overscan:"overscan",restoreStateFrom:"restoreStateFrom",scrollerRef:"scrollerRef",scrollSeekConfiguration:"scrollSeekConfiguration",skipAnimationFrameInResizeObserver:"skipAnimationFrameInResizeObserver",topItemCount:"topItemCount",totalCount:"totalCount",useWindowScroll:"useWindowScroll"},required:{}},i.memo(function(e){let t=tF("useWindowScroll"),o=tF("topItemsIndexes").length>0,n=tF("customScrollParent"),i=tF("context"),l=n||t?tj:tM,s=n||t?tE:tz;return(0,r.jsxs)(l,{...e,...tS(l,i),children:[o&&(0,r.jsx)(tB,{children:(0,r.jsx)(tx,{showTopList:!0})}),(0,r.jsxs)(s,{children:[(0,r.jsx)(tH,{}),(0,r.jsx)(tx,{}),(0,r.jsx)(ty,{})]})]})})),tM=tb({useEmitter:tL,useEmitterValue:tF,usePublisher:tO}),tj=tR({useEmitter:tL,useEmitterValue:tF,usePublisher:tO}),tW=tk,tP=F(()=>{let e=E(e=>(0,r.jsxs)("td",{children:["Item $",e]})),t=E(null),o=E(null),n=E(null),i=E({}),l=E(tc),s=E(c),a=(e,t=null)=>B(H(i,S(t=>t[e]),T()),t);return{components:i,computeItemKey:l,context:t,EmptyPlaceholder:a("EmptyPlaceholder"),FillerRow:a("FillerRow"),fixedFooterContent:n,fixedHeaderContent:o,itemContent:e,ScrollerComponent:a("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:a("ScrollSeekPlaceholder"),TableBodyComponent:a("TableBody","tbody"),TableComponent:a("Table","table"),TableFooterComponent:a("TableFoot","tfoot"),TableHeadComponent:a("TableHead","thead"),TableRowComponent:a("TableRow","tr")}}),tA=F(([e,t])=>({...e,...t}),h(te,tP)),tV=({height:e})=>(0,r.jsx)("tr",{children:(0,r.jsx)("td",{style:{height:e}})}),tD=({height:e})=>(0,r.jsx)("tr",{children:(0,r.jsx)("td",{style:{border:0,height:e,padding:0}})}),tN={overflowAnchor:"none"},tG=i.memo(function({showTopList:e=!1}){let t=tY("listState"),o=tY("computeItemKey"),n=tY("firstItemIndex"),l=tY("isSeeking"),s=tY("ScrollSeekPlaceholder")||tV,a=tY("context"),u=tY("TableRowComponent"),c=tY("fixedHeaderHeight"),d=tY("itemContent"),h=(e?t.topItems:[]).reduce((e,t,o)=>(0===o?e.push(t.size):e.push(e[o-1]+t.size),e),[]),m=(e?t.topItems:t.items).map(t=>{let r=t.originalIndex,m=o(r+n,t.data,a),f=e?0===r?0:h[r-1]:0;return l?(0,i.createElement)(s,{...tS(s,a),height:t.size,index:t.index,key:m,type:t.type||"item"}):(0,i.createElement)(u,{...tS(u,a),...tC(u,t.data),"data-index":r,"data-item-index":t.index,"data-known-size":t.size,key:m,style:e?{overflowAnchor:"none",position:"sticky",top:c+f,zIndex:2}:tN},d(t.index,t.data,a))});return(0,r.jsx)(r.Fragment,{children:m})}),t_=i.memo(function(){let e=tY("listState"),t=tY("topItemsIndexes").length>0,o=tZ("sizeRanges"),n=tY("useWindowScroll"),l=tY("customScrollParent"),s=tZ("windowScrollContainerState"),a=tZ("scrollContainerState"),u=tY("trackItemSizes"),{callbackRef:c,ref:d}=G(o,tY("itemSize"),u,l||n?s:a,tY("log"),void 0,l,!1,tY("skipAnimationFrameInResizeObserver")),[h,m]=i.useState(0);t$("deviation",e=>{h!==e&&(d.current.style.marginTop=`${e}px`,m(e))});let f=tY("EmptyPlaceholder"),p=tY("FillerRow")||tD,g=tY("TableBodyComponent"),x=tY("paddingTopAddition"),v=tY("statefulTotalCount"),I=tY("context");if(0===v&&f)return(0,r.jsx)(f,{...tS(f,I)});let T=(t?e.topItems:[]).reduce((e,t)=>e+t.size,0),w=e.offsetTop+x+h-T,S=e.offsetBottom,C=w>0?(0,r.jsx)(p,{context:I,height:w},"padding-top"):null,H=S>0?(0,r.jsx)(p,{context:I,height:S},"padding-bottom"):null;return(0,r.jsxs)(g,{"data-testid":"virtuoso-item-list",ref:c,...tS(g,I),children:[C,t&&(0,r.jsx)(tG,{showTopList:!0}),(0,r.jsx)(tG,{}),H]})}),tU=({children:e})=>{let t=i.useContext(tn),o=tZ("viewportHeight"),n=tZ("fixedItemHeight"),l=D(i.useMemo(()=>a(o,e=>ed(e,"height")),[o]),!0,tY("skipAnimationFrameInResizeObserver"));return i.useEffect(()=>{t&&(o(t.viewportHeight),n(t.itemHeight))},[t,o,n]),(0,r.jsx)("div",{"data-viewport-type":"element",ref:l,style:tT(!1),children:e})},tK=({children:e})=>{let t=i.useContext(tn),o=tZ("windowViewportRect"),n=tZ("fixedItemHeight"),l=U(o,tY("customScrollParent"),tY("skipAnimationFrameInResizeObserver"));return i.useEffect(()=>{t&&(n(t.itemHeight),o({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,o,n]),(0,r.jsx)("div",{"data-viewport-type":"window",ref:l,style:tT(!1),children:e})},{Component:tq,useEmitter:t$,useEmitterValue:tY,usePublisher:tZ}=to(tA,{events:{atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",endReached:"endReached",groupIndices:"groupIndices",isScrolling:"isScrolling",itemsRendered:"itemsRendered",rangeChanged:"rangeChanged",startReached:"startReached",totalListHeightChanged:"totalListHeightChanged"},methods:{getState:"getState",scrollBy:"scrollBy",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollToIndex:"scrollToIndex"},optional:{alignToBottom:"alignToBottom",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",components:"components",computeItemKey:"computeItemKey",context:"context",customScrollParent:"customScrollParent",data:"data",defaultItemHeight:"defaultItemHeight",firstItemIndex:"firstItemIndex",fixedFooterContent:"fixedFooterContent",fixedHeaderContent:"fixedHeaderContent",fixedItemHeight:"fixedItemHeight",followOutput:"followOutput",groupCounts:"groupCounts",increaseViewportBy:"increaseViewportBy",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",initialTopMostItemIndex:"initialTopMostItemIndex",itemContent:"itemContent",itemSize:"itemSize",logLevel:"logLevel",overscan:"overscan",restoreStateFrom:"restoreStateFrom",scrollerRef:"scrollerRef",scrollSeekConfiguration:"scrollSeekConfiguration",topItemCount:"topItemCount",totalCount:"totalCount",useWindowScroll:"useWindowScroll"},required:{}},i.memo(function(e){let t=tY("useWindowScroll"),o=tY("customScrollParent"),n=tZ("fixedHeaderHeight"),l=tZ("fixedFooterHeight"),s=tY("fixedHeaderContent"),u=tY("fixedFooterContent"),c=tY("context"),d=D(i.useMemo(()=>a(n,e=>ed(e,"height")),[n]),!0,tY("skipAnimationFrameInResizeObserver")),h=D(i.useMemo(()=>a(l,e=>ed(e,"height")),[l]),!0,tY("skipAnimationFrameInResizeObserver")),m=o||t?tJ:tX,f=o||t?tK:tU,p=tY("TableComponent"),g=tY("TableHeadComponent"),x=tY("TableFooterComponent"),v=s?(0,r.jsx)(g,{ref:d,style:{position:"sticky",top:0,zIndex:2},...tS(g,c),children:s()},"TableHead"):null,I=u?(0,r.jsx)(x,{ref:h,style:{bottom:0,position:"sticky",zIndex:1},...tS(x,c),children:u()},"TableFoot"):null;return(0,r.jsx)(m,{...e,...tS(m,c),children:(0,r.jsx)(f,{children:(0,r.jsxs)(p,{style:{borderSpacing:0,overflowAnchor:"none"},...tS(p,c),children:[v,(0,r.jsx)(t_,{},"TableBody"),I]})})})})),tX=tb({useEmitter:t$,useEmitterValue:tY,usePublisher:tZ}),tJ=tR({useEmitter:t$,useEmitterValue:tY,usePublisher:tZ}),tQ=tq,t0={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},t1={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:t2,floor:t4,max:t3,min:t5,round:t9}=Math;function t6(e,t,o){return Array.from({length:t-e+1}).map((t,n)=>({data:null===o?null:o[n+e],index:n+e}))}function t7(e,t){return e&&e.width===t.width&&e.height===t.height}function t8(e,t){return e&&e.column===t.column&&e.row===t.row}let oe=F(([{increaseViewportBy:e,listBoundary:t,overscan:o,visibleRange:n},{footerHeight:r,headerHeight:i,scrollBy:l,scrollContainerState:s,scrollTo:a,scrollTop:u,smoothScrollTargetReached:c,viewportHeight:d},h,m,{didMount:f,propsReady:p},{customScrollParent:v,useWindowScroll:I,windowScrollContainerState:y,windowScrollTo:F,windowViewportRect:O},W])=>{let P=E(0),A=E(0),V=E(t0),D=E({height:0,width:0}),N=E({height:0,width:0}),G=k(),_=k(),U=E(0),K=E(null),q=E({column:0,row:0}),$=k(),Y=k(),Z=E(!1),X=E(0),J=E(!0),Q=E(!1),ee=E(!1);H(f,z(X),w(([e,t])=>!!t))(1,()=>{J(0,!1)}),H(M(f,J,N,D,X,Q),w(([e,t,o,n,,r])=>e&&!t&&0!==o.height&&0!==n.height&&!r))(1,([,,,,e])=>{Q(0,!0),eB(1,()=>{G(0,e)}),x(H(u),()=>{t(0,[0,0]),J(0,!0)})}),g(H(Y,w(e=>null!=e&&e.scrollTop>0),C(0)),A),H(f,z(Y),w(([,e])=>null!=e))(1,([,e])=>{e&&(D(0,e.viewport),N(0,e.item),q(0,e.gap),e.scrollTop>0&&(Z(0,!0),x(H(u,b(1)),e=>{Z(0,!1)}),a(0,{top:e.scrollTop})))}),g(H(D,S(({height:e})=>e)),d),g(H(M(j(D,t7),j(N,t7),j(q,(e,t)=>e&&e.column===t.column&&e.row===t.row),j(u)),S(([e,t,o,n])=>({gap:o,item:t,scrollTop:n,viewport:e}))),$),g(H(M(j(P),n,j(q,t8),j(N,t7),j(D,t7),j(K),j(A),j(Z),j(J),j(X)),w(([,,,,,,,e])=>!e),S(([e,[t,o],n,r,i,l,s,,a,u])=>{let c,d,{column:h,row:m}=n,{height:f,width:p}=r,{width:g}=i;if(0===s&&(0===e||0===g))return t0;if(0===p){var x;let t=ek(u,e),o=t+Math.max(s-1,0);return x=t6(t,o,l),{...t1,items:x}}let v=ot(g,p,h);a?0===t&&0===o&&s>0?(c=0,d=s-1):(c=v*t4((t+m)/(f+m)),d=t5(e-1,t3(d=v*t2((o+m)/(f+m))-1,v-1)),c=t5(d,t3(0,c))):(c=0,d=-1);let I=t6(c,d,l),{bottom:T,top:w}=oo(i,n,r,I),S=t2(e/v);return{bottom:T,itemHeight:f,items:I,itemWidth:p,offsetBottom:S*f+(S-1)*m-T,offsetTop:w,top:w}})),V),g(H(K,w(e=>null!==e),S(e=>e.length)),P),g(H(M(D,N,V,q),w(([e,t,{items:o}])=>o.length>0&&0!==t.height&&0!==e.height),S(([e,t,{items:o},n])=>{let{bottom:r,top:i}=oo(e,n,t,o);return[i,r]}),T(ea)),t);let et=E(!1);g(H(u,z(et),S(([e,t])=>t||0!==e)),et);let eo=L(H(M(V,P),w(([{items:e}])=>e.length>0),z(et),w(([[e,t],o])=>{let n=e.items[e.items.length-1].index===t-1;return(o||e.bottom>0&&e.itemHeight>0&&0===e.offsetBottom&&e.items.length===t)&&n}),S(([[,e]])=>e-1),T())),en=L(H(j(V),w(({items:e})=>e.length>0&&0===e[0].index),C(0),T())),er=L(H(j(V),z(Z),w(([{items:e},t])=>e.length>0&&!t),S(([{items:e}])=>({endIndex:e[e.length-1].index,startIndex:e[0].index})),T(es),R(0)));g(er,m.scrollSeekRangeChanged),g(H(G,z(D,N,P,q),S(([e,t,o,n,r])=>{let i=ez(e),{align:l,behavior:s,offset:a}=i,u=i.index;"LAST"===u&&(u=n-1);let c=on(t,r,o,u=t3(0,u,t5(n-1,u)));return"end"===l?c=t9(c-t.height+o.height):"center"===l&&(c=t9(c-t.height/2+o.height/2)),a&&(c+=a),{behavior:s,top:c}})),a);let ei=B(H(V,S(e=>e.offsetBottom+e.bottom)),0);return g(H(O,S(e=>({height:e.visibleHeight,width:e.visibleWidth}))),D),{customScrollParent:v,data:K,deviation:U,footerHeight:r,gap:q,headerHeight:i,increaseViewportBy:e,initialItemCount:A,itemDimensions:N,overscan:o,restoreStateFrom:Y,scrollBy:l,scrollContainerState:s,scrollHeight:_,scrollTo:a,scrollToIndex:G,scrollTop:u,smoothScrollTargetReached:c,totalCount:P,useWindowScroll:I,viewportDimensions:D,windowScrollContainerState:y,windowScrollTo:F,windowViewportRect:O,...m,gridState:V,horizontalDirection:ee,initialTopMostItemIndex:X,totalListHeight:ei,...h,endReached:eo,propsReady:p,rangeChanged:er,startReached:en,stateChanged:$,stateRestoreInProgress:Z,...W}},h(eD,K,ej,e1,eb,e2,V));function ot(e,t,o){return t3(1,t4((e+o)/(t4(t)+o)))}function oo(e,t,o,n){let{height:r}=o;if(void 0===r||0===n.length)return{bottom:0,top:0};let i=on(e,t,o,n[0].index);return{bottom:on(e,t,o,n[n.length-1].index)+r,top:i}}function on(e,t,o,n){let r=t4(n/ot(e.width,o.width,t.column)),i=r*o.height+t3(0,r-1)*t.row;return i>0?i+t.row:i}let or=F(()=>{let e=E(e=>`Item ${e}`),t=E({}),o=E(null),n=E("virtuoso-grid-item"),r=E("virtuoso-grid-list"),i=E(tc),l=E("div"),s=E(c),a=(e,o=null)=>B(H(t,S(t=>t[e]),T()),o),u=E(!1),d=E(!1);return g(j(d),u),{components:t,computeItemKey:i,context:o,FooterComponent:a("Footer"),HeaderComponent:a("Header"),headerFooterTag:l,itemClassName:n,ItemComponent:a("Item","div"),itemContent:e,listClassName:r,ListComponent:a("List","div"),readyStateChanged:u,reportReadyState:d,ScrollerComponent:a("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:a("ScrollSeekPlaceholder","div")}}),oi=F(([e,t])=>({...e,...t}),h(oe,or)),ol=i.memo(function(){let e=oh("gridState"),t=oh("listClassName"),o=oh("itemClassName"),n=oh("itemContent"),l=oh("computeItemKey"),s=oh("isSeeking"),a=om("scrollHeight"),u=oh("ItemComponent"),c=oh("ListComponent"),d=oh("ScrollSeekPlaceholder"),h=oh("context"),m=om("itemDimensions"),f=om("gap"),p=oh("log"),g=oh("stateRestoreInProgress"),x=om("reportReadyState"),v=D(i.useMemo(()=>e=>{a(e.parentElement.parentElement.scrollHeight);let t=e.firstChild;if(t){let{height:e,width:o}=t.getBoundingClientRect();m({height:e,width:o})}f({column:og("column-gap",getComputedStyle(e).columnGap,p),row:og("row-gap",getComputedStyle(e).rowGap,p)})},[a,m,f,p]),!0,!1);return ti(()=>{e.itemHeight>0&&e.itemWidth>0&&x(!0)},[e]),g?null:(0,r.jsx)(c,{className:t,ref:v,...tS(c,h),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(t=>{let a=l(t.index,t.data,h);return s?(0,r.jsx)(d,{...tS(d,h),height:e.itemHeight,index:t.index,width:e.itemWidth},a):(0,i.createElement)(u,{...tS(u,h),className:o,"data-index":t.index,key:a},n(t.index,t.data,h))})})}),os=i.memo(function(){let e=oh("HeaderComponent"),t=om("headerHeight"),o=oh("headerFooterTag"),n=D(i.useMemo(()=>e=>{t(ed(e,"height"))},[t]),!0,!1),l=oh("context");return e?(0,r.jsx)(o,{ref:n,children:(0,r.jsx)(e,{...tS(e,l)})}):null}),oa=i.memo(function(){let e=oh("FooterComponent"),t=om("footerHeight"),o=oh("headerFooterTag"),n=D(i.useMemo(()=>e=>{t(ed(e,"height"))},[t]),!0,!1),l=oh("context");return e?(0,r.jsx)(o,{ref:n,children:(0,r.jsx)(e,{...tS(e,l)})}):null}),ou=({children:e})=>{let t=i.useContext(tr),o=om("itemDimensions"),n=om("viewportDimensions"),l=D(i.useMemo(()=>e=>{n(e.getBoundingClientRect())},[n]),!0,!1);return i.useEffect(()=>{t&&(n({height:t.viewportHeight,width:t.viewportWidth}),o({height:t.itemHeight,width:t.itemWidth}))},[t,n,o]),(0,r.jsx)("div",{ref:l,style:tT(!1),children:e})},oc=({children:e})=>{let t=i.useContext(tr),o=om("windowViewportRect"),n=om("itemDimensions"),l=U(o,oh("customScrollParent"),!1);return i.useEffect(()=>{t&&(n({height:t.itemHeight,width:t.itemWidth}),o({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,o,n]),(0,r.jsx)("div",{ref:l,style:tT(!1),children:e})},{useEmitter:od,useEmitterValue:oh,usePublisher:om}=to(oi,{events:{atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",endReached:"endReached",isScrolling:"isScrolling",rangeChanged:"rangeChanged",readyStateChanged:"readyStateChanged",startReached:"startReached",stateChanged:"stateChanged"},methods:{scrollBy:"scrollBy",scrollTo:"scrollTo",scrollToIndex:"scrollToIndex"},optional:{components:"components",computeItemKey:"computeItemKey",context:"context",customScrollParent:"customScrollParent",data:"data",headerFooterTag:"headerFooterTag",increaseViewportBy:"increaseViewportBy",initialItemCount:"initialItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",itemClassName:"itemClassName",itemContent:"itemContent",listClassName:"listClassName",logLevel:"logLevel",overscan:"overscan",restoreStateFrom:"restoreStateFrom",scrollerRef:"scrollerRef",scrollSeekConfiguration:"scrollSeekConfiguration",totalCount:"totalCount",useWindowScroll:"useWindowScroll"}},i.memo(function({...e}){let t=oh("useWindowScroll"),o=oh("customScrollParent"),n=o||t?op:of,i=o||t?oc:ou,l=oh("context");return(0,r.jsx)(n,{...e,...tS(n,l),children:(0,r.jsxs)(i,{children:[(0,r.jsx)(os,{}),(0,r.jsx)(ol,{}),(0,r.jsx)(oa,{})]})})})),of=tb({useEmitter:od,useEmitterValue:oh,usePublisher:om}),op=tR({useEmitter:od,useEmitterValue:oh,usePublisher:om});function og(e,t,o){return"normal"===t||null!=t&&t.endsWith("px")||o(`${e} was not resolved to pixel value correctly`,t,P.WARN),"normal"===t?0:parseInt(null!=t?t:"0",10)}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.chunk_LogsTable=self.chunk_LogsTable||[]).push([["7764"],{39098:function(e,t,r){r.d(t,{A:()=>b});var n=r(70451),o=r(11750),i=r(46477),l=r(3725),a=r(81023),s=r(77308),d=r(56599),p=r(23434),x=r(72052),u=r(48927),h=r(32494),c=r(29424),g=r(29009),m=r(46733);function w(e){return(0,m.Ay)("MuiCollapse",e)}(0,g.A)("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);var f=r(62540);let y=(0,s.A)("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,t[r.orientation],"entered"===r.state&&t.entered,"exited"===r.state&&!r.in&&"0px"===r.collapsedSize&&t.hidden]}})((0,p.A)(({theme:e})=>({height:0,overflow:"hidden",transition:e.transitions.create("height"),variants:[{props:{orientation:"horizontal"},style:{height:"auto",width:0,transition:e.transitions.create("width")}},{props:{state:"entered"},style:{height:"auto",overflow:"visible"}},{props:{state:"entered",orientation:"horizontal"},style:{width:"auto"}},{props:({ownerState:e})=>"exited"===e.state&&!e.in&&"0px"===e.collapsedSize,style:{visibility:"hidden"}}]}))),A=(0,s.A)("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})({display:"flex",width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),v=(0,s.A)("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(e,t)=>t.wrapperInner})({width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),j=n.forwardRef(function(e,t){let r=(0,x.b)({props:e,name:"MuiCollapse"}),{addEndListener:s,children:p,className:g,collapsedSize:m="0px",component:j,easing:b,in:C,onEnter:S,onEntered:E,onEntering:z,onExit:T,onExited:k,onExiting:I,orientation:D="vertical",style:$,timeout:R=u.p0.standard,TransitionComponent:W=i.Ay,...O}=r,L={...r,orientation:D,collapsedSize:m},F=(e=>{let{orientation:t,classes:r}=e,n={root:["root",`${t}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${t}`],wrapperInner:["wrapperInner",`${t}`]};return(0,a.A)(n,w,r)})(L),M=(0,d.A)(),N=(0,l.A)(),H=n.useRef(null),P=n.useRef(),B="number"==typeof m?`${m}px`:m,Q="horizontal"===D,_=Q?"width":"height",G=n.useRef(null),V=(0,c.A)(t,G),X=e=>t=>{if(e){let r=G.current;void 0===t?e(r):e(r,t)}},Y=()=>H.current?H.current[Q?"clientWidth":"clientHeight"]:0,q=X((e,t)=>{H.current&&Q&&(H.current.style.position="absolute"),e.style[_]=B,S&&S(e,t)}),J=X((e,t)=>{let r=Y();H.current&&Q&&(H.current.style.position="");let{duration:n,easing:o}=(0,h.c)({style:$,timeout:R,easing:b},{mode:"enter"});if("auto"===R){let t=M.transitions.getAutoHeightDuration(r);e.style.transitionDuration=`${t}ms`,P.current=t}else e.style.transitionDuration="string"==typeof n?n:`${n}ms`;e.style[_]=`${r}px`,e.style.transitionTimingFunction=o,z&&z(e,t)}),K=X((e,t)=>{e.style[_]="auto",E&&E(e,t)}),U=X(e=>{e.style[_]=`${Y()}px`,T&&T(e)}),Z=X(k),ee=X(e=>{let t=Y(),{duration:r,easing:n}=(0,h.c)({style:$,timeout:R,easing:b},{mode:"exit"});if("auto"===R){let r=M.transitions.getAutoHeightDuration(t);e.style.transitionDuration=`${r}ms`,P.current=r}else e.style.transitionDuration="string"==typeof r?r:`${r}ms`;e.style[_]=B,e.style.transitionTimingFunction=n,I&&I(e)});return(0,f.jsx)(W,{in:C,onEnter:q,onEntered:K,onEntering:J,onExit:U,onExited:Z,onExiting:ee,addEndListener:e=>{"auto"===R&&N.start(P.current||0,e),s&&s(G.current,e)},nodeRef:G,timeout:"auto"===R?null:R,...O,children:(e,{ownerState:t,...r})=>(0,f.jsx)(y,{as:j,className:(0,o.A)(F.root,g,{entered:F.entered,exited:!C&&"0px"===B&&F.hidden}[e]),style:{[Q?"minWidth":"minHeight"]:B,...$},ref:V,ownerState:{...L,state:e},...r,children:(0,f.jsx)(A,{ownerState:{...L,state:e},className:F.wrapper,ref:H,children:(0,f.jsx)(v,{ownerState:{...L,state:e},className:F.wrapperInner,children:p})})})})});j&&(j.muiSupportAuto=!0);let b=j},36562:function(e,t,r){r.r(t),r.d(t,{LogsTable:()=>I});var n=r(62540),o=r(88091),i=r(70451),l=r(56599),a=r(74628);let s=e=>{let{message:t="No logs to display"}=e,r=(0,l.A)();return(0,n.jsx)(a.A,{sx:{display:"flex",alignItems:"center",justifyContent:"center",height:"200px"},children:(0,n.jsx)(o.A,{variant:"body2",sx:{color:r.palette.text.secondary,fontSize:"14px"},children:t})})};var d=r(74649),p=r(39098),x=r(11061);let u=e=>{let{timestamp:t}=e,r="number"==typeof t?new Date(1e3*t):new Date(/^\d+$/.test(t)?1e3*parseInt(t):Date.parse(t));return(0,n.jsx)("time",{style:{fontSize:"12px",whiteSpace:"nowrap",minWidth:"max-content"},dateTime:r.toISOString(),children:r.toISOString()})};var h=r(77308),c=r(47095);let g=(0,h.A)(a.A,{shouldForwardProp:e=>"severityColor"!==e})(e=>{let{severityColor:t}=e;return{borderLeft:`4px solid ${t}`,transition:"all 0.2s ease",marginBottom:"4px",fontFamily:'"DejaVu Sans Mono", monospace'}}),m=(0,h.A)(a.A,{shouldForwardProp:e=>"isExpandable"!==e})(e=>{let{theme:t,isExpandable:r}=e;return{display:"grid",gridTemplateColumns:r?"16px minmax(160px, max-content) 1fr":"minmax(160px, max-content) 1fr",alignItems:"flex-start",padding:"4px 8px",cursor:r?"pointer":"default",gap:"12px","&:hover":{backgroundColor:t.palette.action.hover}}}),w=(0,h.A)(c.A,{shouldForwardProp:e=>"isExpanded"!==e})(e=>{let{theme:t,isExpanded:r}=e;return{padding:0,width:"16px",height:"16px",color:t.palette.text.secondary,transform:r?"rotate(90deg)":"rotate(0deg)",transition:"transform 0.2s ease"}}),f=(0,h.A)(o.A,{shouldForwardProp:e=>"allowWrap"!==e})(e=>{let{allowWrap:t}=e;return{fontSize:"12px",flex:1,lineHeight:1.4,textAlign:"left",...t?{wordBreak:"break-word",whiteSpace:"pre-wrap",overflow:"visible",textOverflow:"unset"}:{wordBreak:"normal",whiteSpace:"nowrap"}}});var y=r(91394),A=r(5139),v=r(3399),j=r(59238),b=r(45271);let C=e=>{let{log:t}=e,r=(0,l.A)();return(0,n.jsx)(y.A,{size:"small",sx:{border:`1px solid ${r.palette.divider}`,"& .MuiTableCell-root":{border:"none",padding:"6px 8px",fontSize:"12px"}},children:(0,n.jsx)(A.A,{children:Object.entries(t).map(e=>{let[t,o]=e;return(0,n.jsxs)(v.A,{sx:{"&:hover":{backgroundColor:(0,j.X4)(r.palette.action.hover,.04)}},children:[(0,n.jsx)(b.A,{sx:{color:r.palette.text.secondary,fontWeight:500,width:"33%"},children:t}),(0,n.jsx)(b.A,{sx:{color:r.palette.text.primary,wordBreak:"break-word",width:"67%"},children:null!=o&&""!==o?o:"--"})]},t)})})})},S=(0,i.memo)(e=>{let{log:t,isExpanded:r,index:o,onToggle:s,isExpandable:d=!0,showTime:h=!1,allowWrap:c=!1}=e,y=(0,l.A)().palette.text.secondary,A=(0,i.useCallback)(()=>{d&&s(o)},[d,s,o]);return t?(0,n.jsxs)(g,{severityColor:y,children:[(0,n.jsxs)(m,{onClick:A,isExpandable:d,children:[d&&(0,n.jsx)(a.A,{sx:{display:"flex",alignItems:"center",width:"16px",justifyContent:"center"},children:(0,n.jsx)(w,{size:"small",isExpanded:r,children:(0,n.jsx)(x.default,{sx:{fontSize:"12px"}})})}),(0,n.jsx)(u,{timestamp:t.timestamp}),(0,n.jsx)(a.A,{sx:{display:"flex",gap:"10px",marginLeft:"36px"},children:(0,n.jsx)(f,{variant:"body2",allowWrap:c,children:t.line})})]}),(0,n.jsx)(p.A,{in:r,timeout:200,children:(0,n.jsx)(a.A,{sx:{padding:"8px"},children:(0,n.jsxs)(a.A,{sx:{display:"grid",gridTemplateColumns:h?"8px minmax(160px, max-content) 1fr":"1fr",gap:"12px"},children:[h&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(a.A,{}),(0,n.jsx)(a.A,{})]}),(0,n.jsx)(a.A,{children:(0,n.jsx)(C,{log:t.labels})})]})})})]}):null});S.displayName="LogRow";let E=e=>{let{logs:t,spec:r,expandedRows:o,onToggleExpand:i}=e,s=(0,l.A)();return(0,n.jsx)(a.A,{sx:{height:"100%",backgroundColor:s.palette.background.default,overflow:"hidden",boxShadow:s.shadows[1]},children:(0,n.jsx)(d.aY,{style:{height:"100%"},initialItemCount:r.showAll?t.length:void 0,totalCount:t.length,itemContent:e=>{let l=t[e];return l?(0,n.jsx)(S,{isExpandable:r.enableDetails,log:l,index:e,isExpanded:o.has(e),onToggle:i,allowWrap:r.allowWrap,showTime:r.showTime}):null}})})},z=e=>{let{logs:t,spec:r}=e,{expandedRows:o,toggleExpand:l}=(()=>{let[e,t]=(0,i.useState)(new Set);return{expandedRows:e,toggleExpand:(0,i.useCallback)(e=>{t(t=>{let r=new Set(t);return r.has(e)?r.delete(e):r.add(e),r})},[]),clearExpanded:(0,i.useCallback)(()=>{t(new Set)},[])}})();return t.length?(0,n.jsx)(E,{logs:t,spec:r,expandedRows:o,onToggleExpand:l}):(0,n.jsx)(s,{})};var T=r(91374),k=r(95196);let I={PanelComponent:function(e){var t,r;let{queryResults:i,spec:l}=e;if((null==(t=i[0])?void 0:t.data.logs)===void 0)return(0,n.jsx)(o.A,{variant:"h3",sx:{textAlign:"center",marginTop:4},children:"No logs to display"});let a=null==(r=i[0])?void 0:r.data.logs.entries;return(0,n.jsx)(z,{logs:a,spec:l})},panelOptionsEditorComponents:[{label:"Settings",content:function(e){let{onChange:t,value:r}=e;return(0,n.jsxs)(T.OptionsEditorGrid,{children:[(0,n.jsx)(T.OptionsEditorColumn,{children:(0,n.jsx)(k.LegendOptionsEditor,{value:r.legend,onChange:e=>{t({...r,legend:e})}})}),(0,n.jsx)(T.OptionsEditorColumn,{children:(0,n.jsx)(T.ThresholdsEditor,{hideDefault:!0,thresholds:r.thresholds,onChange:e=>{t({...r,thresholds:e})}})})]})}}],supportedQueryTypes:["LogQuery"],createInitialOptions:()=>({showTime:!0,allowWrap:!0,enableDetails:!0})}}}]);
@@ -0,0 +1,2 @@
1
+ /*! For license information please see lib-router.318cb64e.js.LICENSE.txt */
2
+ "use strict";(self.chunk_LogsTable=self.chunk_LogsTable||[]).push([["9535"],{70744:function(e,t,r){var n,a,o,i;function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}r.d(t,{AO:()=>v,B6:()=>D,G3:()=>et,Gh:()=>U,HC:()=>W,HS:()=>j,HW:()=>ee,Oi:()=>h,Pq:()=>B,RO:()=>L,Rr:()=>y,Sk:()=>$,TM:()=>d,V2:()=>V,VV:()=>K,aE:()=>eo,o1:()=>_,pX:()=>q,pb:()=>k,rc:()=>n,ro:()=>S,sC:()=>u,tH:()=>z,tW:()=>P,ue:()=>E,v6:()=>I,yD:()=>T,zR:()=>c}),(o=n||(n={})).Pop="POP",o.Push="PUSH",o.Replace="REPLACE";let s="popstate";function u(e){let t;void 0===e&&(e={});let{initialEntries:r=["/"],initialIndex:a,v5Compat:o=!1}=e;t=r.map((e,t)=>c(e,"string"==typeof e?null:e.state,0===t?"default":void 0));let i=u(null==a?t.length-1:a),l=n.Pop,s=null;function u(e){return Math.min(Math.max(e,0),t.length-1)}function c(e,r,n){void 0===r&&(r=null);let a=m(t?t[i].pathname:"/",e,r,n);return f("/"===a.pathname.charAt(0),"relative pathnames are not supported in memory history: "+JSON.stringify(e)),a}function d(e){return"string"==typeof e?e:v(e)}return{get index(){return i},get action(){return l},get location(){return t[i]},createHref:d,createURL:e=>new URL(d(e),"http://localhost"),encodeLocation(e){let t="string"==typeof e?y(e):e;return{pathname:t.pathname||"",search:t.search||"",hash:t.hash||""}},push(e,r){l=n.Push;let a=c(e,r);i+=1,t.splice(i,t.length,a),o&&s&&s({action:l,location:a,delta:1})},replace(e,r){l=n.Replace;let a=c(e,r);t[i]=a,o&&s&&s({action:l,location:a,delta:0})},go(e){l=n.Pop;let r=u(i+e),a=t[r];i=r,s&&s({action:l,location:a,delta:e})},listen:e=>(s=e,()=>{s=null})}}function c(e){return void 0===e&&(e={}),g(function(e,t){let{pathname:r,search:n,hash:a}=e.location;return m("",{pathname:r,search:n,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){return"string"==typeof t?t:v(t)},null,e)}function d(e){return void 0===e&&(e={}),g(function(e,t){let{pathname:r="/",search:n="",hash:a=""}=y(e.location.hash.substr(1));return r.startsWith("/")||r.startsWith(".")||(r="/"+r),m("",{pathname:r,search:n,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){let r=e.document.querySelector("base"),n="";if(r&&r.getAttribute("href")){let t=e.location.href,r=t.indexOf("#");n=-1===r?t:t.slice(0,r)}return n+"#"+("string"==typeof t?t:v(t))},function(e,t){f("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")},e)}function h(e,t){if(!1===e||null==e)throw Error(t)}function f(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw Error(t)}catch(e){}}}function p(e,t){return{usr:e.state,key:e.key,idx:t}}function m(e,t,r,n){return void 0===r&&(r=null),l({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?y(t):t,{state:r,key:t&&t.key||n||Math.random().toString(36).substr(2,8)})}function v(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&"?"!==r&&(t+="?"===r.charAt(0)?r:"?"+r),n&&"#"!==n&&(t+="#"===n.charAt(0)?n:"#"+n),t}function y(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function g(e,t,r,a){void 0===a&&(a={});let{window:o=document.defaultView,v5Compat:i=!1}=a,u=o.history,c=n.Pop,d=null,f=y();function y(){return(u.state||{idx:null}).idx}function g(){c=n.Pop;let e=y(),t=null==e?null:e-f;f=e,d&&d({action:c,location:w.location,delta:t})}function b(e){let t="null"!==o.location.origin?o.location.origin:o.location.href,r="string"==typeof e?e:v(e);return h(t,"No window.location.(origin|href) available to create URL for href: "+(r=r.replace(/ $/,"%20"))),new URL(r,t)}null==f&&(f=0,u.replaceState(l({},u.state,{idx:f}),""));let w={get action(){return c},get location(){return e(o,u)},listen(e){if(d)throw Error("A history only accepts one active listener");return o.addEventListener(s,g),d=e,()=>{o.removeEventListener(s,g),d=null}},createHref:e=>t(o,e),createURL:b,encodeLocation(e){let t=b(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){c=n.Push;let a=m(w.location,e,t);r&&r(a,e);let l=p(a,f=y()+1),s=w.createHref(a);try{u.pushState(l,"",s)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;o.location.assign(s)}i&&d&&d({action:c,location:w.location,delta:1})},replace:function(e,t){c=n.Replace;let a=m(w.location,e,t);r&&r(a,e);let o=p(a,f=y()),l=w.createHref(a);u.replaceState(o,"",l),i&&d&&d({action:c,location:w.location,delta:0})},go:e=>u.go(e)};return w}(i=a||(a={})).data="data",i.deferred="deferred",i.redirect="redirect",i.error="error";let b=new Set(["lazy","caseSensitive","path","id","index","children"]);function w(e,t,r,n){return void 0===r&&(r=[]),void 0===n&&(n={}),e.map((e,a)=>{let o=[...r,String(a)],i="string"==typeof e.id?e.id:o.join("-");if(h(!0!==e.index||!e.children,"Cannot specify children on an index route"),h(!n[i],'Found a route id collision on id "'+i+"\". Route id's must be globally unique within Data Router usages"),!0===e.index){let r=l({},e,t(e),{id:i});return n[i]=r,r}{let r=l({},e,t(e),{id:i,children:void 0});return n[i]=r,e.children&&(r.children=w(e.children,t,o,n)),r}})}function E(e,t,r){return void 0===r&&(r="/"),R(e,t,r,!1)}function R(e,t,r,n){let a=k(("string"==typeof t?y(t):t).pathname||"/",r);if(null==a)return null;let o=function e(t,r,n,a){void 0===r&&(r=[]),void 0===n&&(n=[]),void 0===a&&(a="");let o=(t,o,i)=>{var l,s;let u,c,d={relativePath:void 0===i?t.path||"":i,caseSensitive:!0===t.caseSensitive,childrenIndex:o,route:t};d.relativePath.startsWith("/")&&(h(d.relativePath.startsWith(a),'Absolute route path "'+d.relativePath+'" nested under path "'+a+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),d.relativePath=d.relativePath.slice(a.length));let f=j([a,d.relativePath]),p=n.concat(d);t.children&&t.children.length>0&&(h(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+f+'".'),e(t.children,r,p,f)),(null!=t.path||t.index)&&r.push({path:f,score:(l=f,s=t.index,c=(u=l.split("/")).length,u.some(C)&&(c+=-2),s&&(c+=2),u.filter(e=>!C(e)).reduce((e,t)=>e+(x.test(t)?3:""===t?1:10),c)),routesMeta:p})};return t.forEach((e,t)=>{var r;if(""!==e.path&&null!=(r=e.path)&&r.includes("?"))for(let r of function e(t){let r=t.split("/");if(0===r.length)return[];let[n,...a]=r,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(0===a.length)return o?[i,""]:[i];let l=e(a.join("/")),s=[];return s.push(...l.map(e=>""===e?i:[i,e].join("/"))),o&&s.push(...l),s.map(e=>t.startsWith("/")&&""===e?"/":e)}(e.path))o(e,t,r);else o(e,t)}),r}(e);o.sort((e,t)=>{var r,n;return e.score!==t.score?t.score-e.score:(r=e.routesMeta.map(e=>e.childrenIndex),n=t.routesMeta.map(e=>e.childrenIndex),r.length===n.length&&r.slice(0,-1).every((e,t)=>e===n[t])?r[r.length-1]-n[n.length-1]:0)});let i=null;for(let e=0;null==i&&e<o.length;++e){let t=L(a);i=function(e,t,r){void 0===r&&(r=!1);let{routesMeta:n}=e,a={},o="/",i=[];for(let e=0;e<n.length;++e){let l=n[e],s=e===n.length-1,u="/"===o?t:t.slice(o.length)||"/",c=D({path:l.relativePath,caseSensitive:l.caseSensitive,end:s},u),d=l.route;if(!c&&s&&r&&!n[n.length-1].route.index&&(c=D({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},u)),!c)return null;Object.assign(a,c.params),i.push({params:a,pathname:j([o,c.pathname]),pathnameBase:M(j([o,c.pathnameBase])),route:d}),"/"!==c.pathnameBase&&(o=j([o,c.pathnameBase]))}return i}(o[e],t,n)}return i}function S(e,t){let{route:r,pathname:n,params:a}=e;return{id:r.id,pathname:n,params:a,data:t[r.id],handle:r.handle}}let x=/^:[\w-]+$/,C=e=>"*"===e;function P(e,t){void 0===t&&(t={});let r=e;r.endsWith("*")&&"*"!==r&&!r.endsWith("/*")&&(f(!1,'Route path "'+r+'" will be treated as if it were "'+r.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+r.replace(/\*$/,"/*")+'".'),r=r.replace(/\*$/,"/*"));let n=r.startsWith("/")?"/":"",a=e=>null==e?"":"string"==typeof e?e:String(e);return n+r.split(/\/+/).map((e,r,n)=>{if(r===n.length-1&&"*"===e)return a(t["*"]);let o=e.match(/^:([\w-]+)(\??)$/);if(o){let[,e,r]=o,n=t[e];return h("?"===r||null!=n,'Missing ":'+e+'" param'),a(n)}return e.replace(/\?$/g,"")}).filter(e=>!!e).join("/")}function D(e,t){var r,n,a;let o,i;"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[l,s]=(r=e.path,n=e.caseSensitive,a=e.end,void 0===n&&(n=!1),void 0===a&&(a=!0),f("*"===r||!r.endsWith("*")||r.endsWith("/*"),'Route path "'+r+'" will be treated as if it were "'+r.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+r.replace(/\*$/,"/*")+'".'),o=[],i="^"+r.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,r)=>(o.push({paramName:t,isOptional:null!=r}),r?"/?([^\\/]+)?":"/([^\\/]+)")),r.endsWith("*")?(o.push({paramName:"*"}),i+="*"===r||"/*"===r?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?i+="\\/*$":""!==r&&"/"!==r&&(i+="(?:(?=\\/|$))"),[new RegExp(i,n?void 0:"i"),o]),u=t.match(l);if(!u)return null;let c=u[0],d=c.replace(/(.)\/+$/,"$1"),h=u.slice(1);return{params:s.reduce((e,t,r)=>{let{paramName:n,isOptional:a}=t;if("*"===n){let e=h[r]||"";d=c.slice(0,c.length-e.length).replace(/(.)\/+$/,"$1")}let o=h[r];return a&&!o?e[n]=void 0:e[n]=(o||"").replace(/%2F/g,"/"),e},{}),pathname:c,pathnameBase:d,pattern:e}}function L(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return f(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function k(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&"/"!==n?null:e.slice(r)||"/"}function _(e,t){var r;let n;void 0===t&&(t="/");let{pathname:a,search:o="",hash:i=""}="string"==typeof e?y(e):e;return{pathname:a?a.startsWith("/")?a:(r=a,n=t.replace(/\/+$/,"").split("/"),r.split("/").forEach(e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)}),n.length>1?n.join("/"):"/"):t,search:F(o),hash:N(i)}}function O(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field [")+JSON.stringify(n)+"]. Please separate it out to the `to."+r+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function A(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}function T(e,t){let r=A(e);return t?r.map((e,t)=>t===r.length-1?e.pathname:e.pathnameBase):r.map(e=>e.pathnameBase)}function U(e,t,r,n){let a,o;void 0===n&&(n=!1),"string"==typeof e?a=y(e):(h(!(a=l({},e)).pathname||!a.pathname.includes("?"),O("?","pathname","search",a)),h(!a.pathname||!a.pathname.includes("#"),O("#","pathname","hash",a)),h(!a.search||!a.search.includes("#"),O("#","search","hash",a)));let i=""===e||""===a.pathname,s=i?"/":a.pathname;if(null==s)o=r;else{let e=t.length-1;if(!n&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;a.pathname=t.join("/")}o=e>=0?t[e]:"/"}let u=_(a,o),c=s&&"/"!==s&&s.endsWith("/"),d=(i||"."===s)&&r.endsWith("/");return!u.pathname.endsWith("/")&&(c||d)&&(u.pathname+="/"),u}let j=e=>e.join("/").replace(/\/\/+/g,"/"),M=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),F=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",N=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"",B=function(e,t){void 0===t&&(t={});let r="number"==typeof t?{status:t}:t,n=new Headers(r.headers);return n.has("Content-Type")||n.set("Content-Type","application/json; charset=utf-8"),new Response(JSON.stringify(e),l({},r,{headers:n}))};class z extends Error{}class H{constructor(e,t){let r;this.pendingKeysSet=new Set,this.subscribers=new Set,this.deferredKeys=[],h(e&&"object"==typeof e&&!Array.isArray(e),"defer() only accepts plain objects"),this.abortPromise=new Promise((e,t)=>r=t),this.controller=new AbortController;let n=()=>r(new z("Deferred data aborted"));this.unlistenAbortSignal=()=>this.controller.signal.removeEventListener("abort",n),this.controller.signal.addEventListener("abort",n),this.data=Object.entries(e).reduce((e,t)=>{let[r,n]=t;return Object.assign(e,{[r]:this.trackPromise(r,n)})},{}),this.done&&this.unlistenAbortSignal(),this.init=t}trackPromise(e,t){if(!(t instanceof Promise))return t;this.deferredKeys.push(e),this.pendingKeysSet.add(e);let r=Promise.race([t,this.abortPromise]).then(t=>this.onSettle(r,e,void 0,t),t=>this.onSettle(r,e,t));return r.catch(()=>{}),Object.defineProperty(r,"_tracked",{get:()=>!0}),r}onSettle(e,t,r,n){if(this.controller.signal.aborted&&r instanceof z)return this.unlistenAbortSignal(),Object.defineProperty(e,"_error",{get:()=>r}),Promise.reject(r);if(this.pendingKeysSet.delete(t),this.done&&this.unlistenAbortSignal(),void 0===r&&void 0===n){let r=Error('Deferred data for key "'+t+'" resolved/rejected with `undefined`, you must resolve/reject with a value or `null`.');return Object.defineProperty(e,"_error",{get:()=>r}),this.emit(!1,t),Promise.reject(r)}return void 0===n?(Object.defineProperty(e,"_error",{get:()=>r}),this.emit(!1,t),Promise.reject(r)):(Object.defineProperty(e,"_data",{get:()=>n}),this.emit(!1,t),n)}emit(e,t){this.subscribers.forEach(r=>r(e,t))}subscribe(e){return this.subscribers.add(e),()=>this.subscribers.delete(e)}cancel(){this.controller.abort(),this.pendingKeysSet.forEach((e,t)=>this.pendingKeysSet.delete(t)),this.emit(!0)}async resolveData(e){let t=!1;if(!this.done){let r=()=>this.cancel();e.addEventListener("abort",r),t=await new Promise(t=>{this.subscribe(n=>{e.removeEventListener("abort",r),(n||this.done)&&t(n)})})}return t}get done(){return 0===this.pendingKeysSet.size}get unwrappedData(){return h(null!==this.data&&this.done,"Can only unwrap data on initialized and settled deferreds"),Object.entries(this.data).reduce((e,t)=>{let[r,n]=t;return Object.assign(e,{[r]:function(e){if(!(e instanceof Promise&&!0===e._tracked))return e;if(e._error)throw e._error;return e._data}(n)})},{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}}let I=function(e,t){return void 0===t&&(t={}),new H(e,"number"==typeof t?{status:t}:t)},V=function(e,t){void 0===t&&(t=302);let r=t;"number"==typeof r?r={status:r}:void 0===r.status&&(r.status=302);let n=new Headers(r.headers);return n.set("Location",e),new Response(null,l({},r,{headers:n}))},$=(e,t)=>{let r=V(e,t);return r.headers.set("X-Remix-Reload-Document","true"),r},W=(e,t)=>{let r=V(e,t);return r.headers.set("X-Remix-Replace","true"),r};class K{constructor(e,t,r,n){void 0===n&&(n=!1),this.status=e,this.statusText=t||"",this.internal=n,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function q(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}let J=["post","put","patch","delete"],Y=new Set(J),X=new Set(["get",...J]),G=new Set([301,302,303,307,308]),Q=new Set([307,308]),Z={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ee={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},et={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},er=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,en=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),ea="remix-router-transitions";function eo(e){let t,r,o,i,s,u,c=e.window?e.window:"undefined"!=typeof window?window:void 0,d=void 0!==c&&void 0!==c.document&&void 0!==c.document.createElement,p=!d;if(h(e.routes.length>0,"You must provide a non-empty routes array to createRouter"),e.mapRouteProperties)t=e.mapRouteProperties;else if(e.detectErrorBoundary){let r=e.detectErrorBoundary;t=e=>({hasErrorBoundary:r(e)})}else t=en;let v={},y=w(e.routes,t,void 0,v),g=e.basename||"/",b=e.dataStrategy||em,x=e.patchRoutesOnNavigation,C=l({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),P=null,D=new Set,L=null,_=null,O=null,A=null!=e.hydrationData,T=E(y,e.history.location,g),U=!1,j=null;if(null==T&&!x){let t=eL(404,{pathname:e.history.location.pathname}),{matches:r,route:n}=eD(y);T=r,j={[n.id]:t}}if(T&&!e.hydrationData&&to(T,y,e.history.location.pathname).active&&(T=null),T)if(T.some(e=>e.route.lazy))o=!1;else if(T.some(e=>e.route.loader))if(C.v7_partialHydration){let t=e.hydrationData?e.hydrationData.loaderData:null,r=e.hydrationData?e.hydrationData.errors:null;if(r){let e=T.findIndex(e=>void 0!==r[e.route.id]);o=T.slice(0,e+1).every(e=>!ec(e.route,t,r))}else o=T.every(e=>!ec(e.route,t,r))}else o=null!=e.hydrationData;else o=!0;else if(o=!1,T=[],C.v7_partialHydration){let t=to(null,y,e.history.location.pathname);t.active&&t.matches&&(U=!0,T=t.matches)}let M={historyAction:e.history.action,location:e.history.location,matches:T,initialized:o,navigation:Z,restoreScrollPosition:null==e.hydrationData&&null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||j,fetchers:new Map,blockers:new Map},F=n.Pop,N=!1,B=!1,z=new Map,H=null,I=!1,V=!1,$=[],W=new Set,K=new Map,J=0,Y=-1,X=new Map,eo=new Set,es=new Map,ed=new Map,eh=new Set,ep=new Map,ey=new Map;function eE(e,t){void 0===t&&(t={}),M=l({},M,e);let r=[],n=[];C.v7_fetcherPersist&&M.fetchers.forEach((e,t)=>{"idle"===e.state&&(eh.has(t)?n.push(t):r.push(t))}),eh.forEach(e=>{M.fetchers.has(e)||K.has(e)||n.push(e)}),[...D].forEach(e=>e(M,{deletedFetchers:n,viewTransitionOpts:t.viewTransitionOpts,flushSync:!0===t.flushSync})),C.v7_fetcherPersist?(r.forEach(e=>M.fetchers.delete(e)),n.forEach(e=>e4(e))):n.forEach(e=>eh.delete(e))}function eR(t,a,o){var i,s;let u,c,{flushSync:d}=void 0===o?{}:o,h=null!=M.actionData&&null!=M.navigation.formMethod&&eM(M.navigation.formMethod)&&"loading"===M.navigation.state&&(null==(i=t.state)?void 0:i._isRedirect)!==!0;u=a.actionData?Object.keys(a.actionData).length>0?a.actionData:null:h?M.actionData:null;let f=a.loaderData?ex(M.loaderData,a.loaderData,a.matches||[],a.errors):M.loaderData,p=M.blockers;p.size>0&&(p=new Map(p)).forEach((e,t)=>p.set(t,et));let m=!0===N||null!=M.navigation.formMethod&&eM(M.navigation.formMethod)&&(null==(s=t.state)?void 0:s._isRedirect)!==!0;if(r&&(y=r,r=void 0),I||F===n.Pop||(F===n.Push?e.history.push(t,t.state):F===n.Replace&&e.history.replace(t,t.state)),F===n.Pop){let e=z.get(M.location.pathname);e&&e.has(t.pathname)?c={currentLocation:M.location,nextLocation:t}:z.has(t.pathname)&&(c={currentLocation:t,nextLocation:M.location})}else if(B){let e=z.get(M.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),z.set(M.location.pathname,e)),c={currentLocation:M.location,nextLocation:t}}eE(l({},a,{actionData:u,loaderData:f,historyAction:F,location:t,initialized:!0,navigation:Z,revalidation:"idle",restoreScrollPosition:ta(t,a.matches||M.matches),preventScrollReset:m,blockers:p}),{viewTransitionOpts:c,flushSync:!0===d}),F=n.Pop,N=!1,B=!1,I=!1,V=!1,$=[]}async function e_(t,r){if("number"==typeof t)return void e.history.go(t);let a=ei(M.location,M.matches,g,C.v7_prependBasename,t,C.v7_relativeSplatPath,null==r?void 0:r.fromRouteId,null==r?void 0:r.relative),{path:o,submission:i,error:s}=el(C.v7_normalizeFormMethod,!1,a,r),u=M.location,c=m(M.location,o,r&&r.state);c=l({},c,e.history.encodeLocation(c));let d=r&&null!=r.replace?r.replace:void 0,h=n.Push;!0===d?h=n.Replace:!1===d||null!=i&&eM(i.formMethod)&&i.formAction===M.location.pathname+M.location.search&&(h=n.Replace);let f=r&&"preventScrollReset"in r?!0===r.preventScrollReset:void 0,p=!0===(r&&r.flushSync),v=te({currentLocation:u,nextLocation:c,historyAction:h});return v?void e9(v,{state:"blocked",location:c,proceed(){e9(v,{state:"proceeding",proceed:void 0,reset:void 0,location:c}),e_(t,r)},reset(){let e=new Map(M.blockers);e.set(v,et),eE({blockers:e})}}):await eU(h,c,{submission:i,pendingError:s,preventScrollReset:f,replace:r&&r.replace,enableViewTransition:r&&r.viewTransition,flushSync:p})}async function eU(t,n,o){var i,u,c,d;let h;s&&s.abort(),s=null,F=t,I=!0===(o&&o.startUninterruptedRevalidation),i=M.location,u=M.matches,L&&O&&(L[tn(i,u)]=O()),N=!0===(o&&o.preventScrollReset),B=!0===(o&&o.enableViewTransition);let f=r||y,p=o&&o.overrideNavigation,m=null!=o&&o.initialHydration&&M.matches&&M.matches.length>0&&!U?M.matches:E(f,n,g),v=!0===(o&&o.flushSync);if(m&&M.initialized&&!V&&(c=M.location,d=n,c.pathname===d.pathname&&c.search===d.search&&(""===c.hash?""!==d.hash:c.hash===d.hash||""!==d.hash||!1))&&!(o&&o.submission&&eM(o.submission.formMethod)))return void eR(n,{matches:m},{flushSync:v});let b=to(m,f,n.pathname);if(b.active&&b.matches&&(m=b.matches),!m){let{error:e,notFoundMatches:t,route:r}=tt(n.pathname);eR(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:v});return}s=new AbortController;let w=ew(e.history,n,s.signal,o&&o.submission);if(o&&o.pendingError)h=[eP(m).route.id,{type:a.error,error:o.pendingError}];else if(o&&o.submission&&eM(o.submission.formMethod)){let t=await ez(w,n,o.submission,m,b.active,{replace:o.replace,flushSync:v});if(t.shortCircuited)return;if(t.pendingActionResult){let[e,r]=t.pendingActionResult;if(eA(r)&&q(r.error)&&404===r.error.status){s=null,eR(n,{matches:t.matches,loaderData:{},errors:{[e]:r.error}});return}}m=t.matches||m,h=t.pendingActionResult,p=eV(n,o.submission),v=!1,b.active=!1,w=ew(e.history,w.url,w.signal)}let{shortCircuited:R,matches:S,loaderData:x,errors:C}=await eK(w,n,m,b.active,p,o&&o.submission,o&&o.fetcherSubmission,o&&o.replace,o&&!0===o.initialHydration,v,h);R||(s=null,eR(n,l({matches:S||m},eC(h),{loaderData:x,errors:C})))}async function ez(e,t,r,o,i,l){var s;let u;if(void 0===l&&(l={}),eZ(),eE({navigation:{state:"submitting",location:t,formMethod:(s=r).formMethod,formAction:s.formAction,formEncType:s.formEncType,formData:s.formData,json:s.json,text:s.text}},{flushSync:!0===l.flushSync}),i){let r=await ti(o,t.pathname,e.signal);if("aborted"===r.type)return{shortCircuited:!0};if("error"===r.type){let e=eP(r.partialMatches).route.id;return{matches:r.partialMatches,pendingActionResult:[e,{type:a.error,error:r.error}]}}if(r.matches)o=r.matches;else{let{notFoundMatches:e,error:r,route:n}=tt(t.pathname);return{matches:e,pendingActionResult:[n.id,{type:a.error,error:r}]}}}let c=eH(o,t);if(c.route.action||c.route.lazy){if(u=(await eG("action",M,e,[c],o,null))[c.route.id],e.signal.aborted)return{shortCircuited:!0}}else u={type:a.error,error:eL(405,{method:e.method,pathname:t.pathname,routeId:c.route.id})};if(eT(u)){let t;return t=l&&null!=l.replace?l.replace:eb(u.response.headers.get("Location"),new URL(e.url),g)===M.location.pathname+M.location.search,await eX(e,u,!0,{submission:r,replace:t}),{shortCircuited:!0}}if(eO(u))throw eL(400,{type:"defer-action"});if(eA(u)){let e=eP(o,c.route.id);return!0!==(l&&l.replace)&&(F=n.Push),{matches:o,pendingActionResult:[e.route.id,u]}}return{matches:o,pendingActionResult:[c.route.id,u]}}async function eK(t,n,a,o,i,u,c,d,h,f,p){let m=i||eV(n,u),v=u||c||eI(m),b=!I&&(!C.v7_partialHydration||!h);if(o){if(b){let e=eq(p);eE(l({navigation:m},void 0!==e?{actionData:e}:{}),{flushSync:f})}let e=await ti(a,n.pathname,t.signal);if("aborted"===e.type)return{shortCircuited:!0};if("error"===e.type){let t=eP(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}if(e.matches)a=e.matches;else{let{error:e,notFoundMatches:t,route:r}=tt(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}}let w=r||y,[E,R]=eu(e.history,M,a,v,n,C.v7_partialHydration&&!0===h,C.v7_skipActionErrorRevalidation,V,$,W,eh,es,eo,w,g,p);if(tr(e=>!(a&&a.some(t=>t.route.id===e))||E&&E.some(t=>t.route.id===e)),Y=++J,0===E.length&&0===R.length){let e=e2();return eR(n,l({matches:a,loaderData:{},errors:p&&eA(p[1])?{[p[0]]:p[1].error}:null},eC(p),e?{fetchers:new Map(M.fetchers)}:{}),{flushSync:f}),{shortCircuited:!0}}if(b){let e={};if(!o){e.navigation=m;let t=eq(p);void 0!==t&&(e.actionData=t)}R.length>0&&(R.forEach(e=>{let t=M.fetchers.get(e.key),r=e$(void 0,t?t.data:void 0);M.fetchers.set(e.key,r)}),e.fetchers=new Map(M.fetchers)),eE(e,{flushSync:f})}R.forEach(e=>{e3(e.key),e.controller&&K.set(e.key,e.controller)});let S=()=>R.forEach(e=>e3(e.key));s&&s.signal.addEventListener("abort",S);let{loaderResults:x,fetcherResults:P}=await eQ(M,a,E,R,t);if(t.signal.aborted)return{shortCircuited:!0};s&&s.signal.removeEventListener("abort",S),R.forEach(e=>K.delete(e.key));let D=ek(x);if(D)return await eX(t,D.result,!0,{replace:d}),{shortCircuited:!0};if(D=ek(P))return eo.add(D.key),await eX(t,D.result,!0,{replace:d}),{shortCircuited:!0};let{loaderData:L,errors:k}=eS(M,a,x,p,R,P,ep);ep.forEach((e,t)=>{e.subscribe(r=>{(r||e.done)&&ep.delete(t)})}),C.v7_partialHydration&&h&&M.errors&&(k=l({},M.errors,k));let _=e2(),O=e6(Y),A=_||O||R.length>0;return l({matches:a,loaderData:L,errors:k},A?{fetchers:new Map(M.fetchers)}:{})}function eq(e){if(e&&!eA(e[1]))return{[e[0]]:e[1].data};if(M.actionData)if(0===Object.keys(M.actionData).length)return null;else return M.actionData}async function eJ(t,n,a,o,i,l,u,c,d){var f,p;function m(e){if(!e.route.action&&!e.route.lazy){let e=eL(405,{method:d.formMethod,pathname:a,routeId:n});return e1(t,n,e,{flushSync:u}),!0}return!1}if(eZ(),es.delete(t),!l&&m(o))return;let v=M.fetchers.get(t);e0(t,(f=d,p=v,{state:"submitting",formMethod:f.formMethod,formAction:f.formAction,formEncType:f.formEncType,formData:f.formData,json:f.json,text:f.text,data:p?p.data:void 0}),{flushSync:u});let b=new AbortController,w=ew(e.history,a,b.signal,d);if(l){let e=await ti(i,new URL(w.url).pathname,w.signal,t);if("aborted"===e.type)return;if("error"===e.type)return void e1(t,n,e.error,{flushSync:u});if(!e.matches)return void e1(t,n,eL(404,{pathname:a}),{flushSync:u});if(m(o=eH(i=e.matches,a)))return}K.set(t,b);let R=J,S=(await eG("action",M,w,[o],i,t))[o.route.id];if(w.signal.aborted){K.get(t)===b&&K.delete(t);return}if(C.v7_fetcherPersist&&eh.has(t)){if(eT(S)||eA(S))return void e0(t,eW(void 0))}else{if(eT(S))return(K.delete(t),Y>R)?void e0(t,eW(void 0)):(eo.add(t),e0(t,e$(d)),eX(w,S,!1,{fetcherSubmission:d,preventScrollReset:c}));if(eA(S))return void e1(t,n,S.error)}if(eO(S))throw eL(400,{type:"defer-action"});let x=M.navigation.location||M.location,P=ew(e.history,x,b.signal),D=r||y,L="idle"!==M.navigation.state?E(D,M.navigation.location,g):M.matches;h(L,"Didn't find any matches after fetcher action");let k=++J;X.set(t,k);let _=e$(d,S.data);M.fetchers.set(t,_);let[O,A]=eu(e.history,M,L,d,x,!1,C.v7_skipActionErrorRevalidation,V,$,W,eh,es,eo,D,g,[o.route.id,S]);A.filter(e=>e.key!==t).forEach(e=>{let t=e.key,r=M.fetchers.get(t),n=e$(void 0,r?r.data:void 0);M.fetchers.set(t,n),e3(t),e.controller&&K.set(t,e.controller)}),eE({fetchers:new Map(M.fetchers)});let T=()=>A.forEach(e=>e3(e.key));b.signal.addEventListener("abort",T);let{loaderResults:U,fetcherResults:j}=await eQ(M,L,O,A,P);if(b.signal.aborted)return;b.signal.removeEventListener("abort",T),X.delete(t),K.delete(t),A.forEach(e=>K.delete(e.key));let N=ek(U);if(N)return eX(P,N.result,!1,{preventScrollReset:c});if(N=ek(j))return eo.add(N.key),eX(P,N.result,!1,{preventScrollReset:c});let{loaderData:B,errors:z}=eS(M,L,U,void 0,A,j,ep);if(M.fetchers.has(t)){let e=eW(S.data);M.fetchers.set(t,e)}e6(k),"loading"===M.navigation.state&&k>Y?(h(F,"Expected pending action"),s&&s.abort(),eR(M.navigation.location,{matches:L,loaderData:B,errors:z,fetchers:new Map(M.fetchers)})):(eE({errors:z,loaderData:ex(M.loaderData,B,L,z),fetchers:new Map(M.fetchers)}),V=!1)}async function eY(t,r,n,a,o,i,l,s,u){let c=M.fetchers.get(t);e0(t,e$(u,c?c.data:void 0),{flushSync:l});let d=new AbortController,f=ew(e.history,n,d.signal);if(i){let e=await ti(o,new URL(f.url).pathname,f.signal,t);if("aborted"===e.type)return;if("error"===e.type)return void e1(t,r,e.error,{flushSync:l});if(!e.matches)return void e1(t,r,eL(404,{pathname:n}),{flushSync:l});a=eH(o=e.matches,n)}K.set(t,d);let p=J,m=(await eG("loader",M,f,[a],o,t))[a.route.id];if(eO(m)&&(m=await eB(m,f.signal,!0)||m),K.get(t)===d&&K.delete(t),!f.signal.aborted){if(eh.has(t))return void e0(t,eW(void 0));if(eT(m))if(Y>p)return void e0(t,eW(void 0));else{eo.add(t),await eX(f,m,!1,{preventScrollReset:s});return}if(eA(m))return void e1(t,r,m.error);h(!eO(m),"Unhandled fetcher deferred data"),e0(t,eW(m.data))}}async function eX(t,r,a,o){let{submission:i,fetcherSubmission:u,preventScrollReset:f,replace:p}=void 0===o?{}:o;r.response.headers.has("X-Remix-Revalidate")&&(V=!0);let v=r.response.headers.get("Location");h(v,"Expected a Location header on the redirect Response"),v=eb(v,new URL(t.url),g);let y=m(M.location,v,{_isRedirect:!0});if(d){let t=!1;if(r.response.headers.has("X-Remix-Reload-Document"))t=!0;else if(er.test(v)){let r=e.history.createURL(v);t=r.origin!==c.location.origin||null==k(r.pathname,g)}if(t)return void(p?c.location.replace(v):c.location.assign(v))}s=null;let b=!0===p||r.response.headers.has("X-Remix-Replace")?n.Replace:n.Push,{formMethod:w,formAction:E,formEncType:R}=M.navigation;!i&&!u&&w&&E&&R&&(i=eI(M.navigation));let S=i||u;if(Q.has(r.response.status)&&S&&eM(S.formMethod))await eU(b,y,{submission:l({},S,{formAction:v}),preventScrollReset:f||N,enableViewTransition:a?B:void 0});else{let e=eV(y,i);await eU(b,y,{overrideNavigation:e,fetcherSubmission:u,preventScrollReset:f||N,enableViewTransition:a?B:void 0})}}async function eG(e,r,n,o,i,l){let s,u={};try{s=await ev(b,e,r,n,o,i,l,v,t)}catch(e){return o.forEach(t=>{u[t.route.id]={type:a.error,error:e}}),u}for(let[e,t]of Object.entries(s)){var c;if(ej((c=t).result)&&G.has(c.result.status)){let r=t.result;u[e]={type:a.redirect,response:function(e,t,r,n,a,o){let i=e.headers.get("Location");if(h(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!er.test(i)){let l=n.slice(0,n.findIndex(e=>e.route.id===r)+1);i=ei(new URL(t.url),l,a,!0,i,o),e.headers.set("Location",i)}return e}(r,n,e,i,g,C.v7_relativeSplatPath)}}else u[e]=await eg(t)}return u}async function eQ(t,r,n,o,i){let l=t.matches,s=eG("loader",t,i,n,r,null),u=Promise.all(o.map(async r=>{if(!r.matches||!r.match||!r.controller)return Promise.resolve({[r.key]:{type:a.error,error:eL(404,{pathname:r.path})}});{let n=(await eG("loader",t,ew(e.history,r.path,r.controller.signal),[r.match],r.matches,r.key))[r.match.route.id];return{[r.key]:n}}})),c=await s,d=(await u).reduce((e,t)=>Object.assign(e,t),{});return await Promise.all([eF(r,c,i.signal,l,t.loaderData),eN(r,d,o)]),{loaderResults:c,fetcherResults:d}}function eZ(){V=!0,$.push(...tr()),es.forEach((e,t)=>{K.has(t)&&W.add(t),e3(t)})}function e0(e,t,r){void 0===r&&(r={}),M.fetchers.set(e,t),eE({fetchers:new Map(M.fetchers)},{flushSync:!0===(r&&r.flushSync)})}function e1(e,t,r,n){void 0===n&&(n={});let a=eP(M.matches,t);e4(e),eE({errors:{[a.route.id]:r},fetchers:new Map(M.fetchers)},{flushSync:!0===(n&&n.flushSync)})}function e7(e){return ed.set(e,(ed.get(e)||0)+1),eh.has(e)&&eh.delete(e),M.fetchers.get(e)||ee}function e4(e){let t=M.fetchers.get(e);K.has(e)&&!(t&&"loading"===t.state&&X.has(e))&&e3(e),es.delete(e),X.delete(e),eo.delete(e),C.v7_fetcherPersist&&eh.delete(e),W.delete(e),M.fetchers.delete(e)}function e3(e){let t=K.get(e);t&&(t.abort(),K.delete(e))}function e5(e){for(let t of e){let e=eW(e7(t).data);M.fetchers.set(t,e)}}function e2(){let e=[],t=!1;for(let r of eo){let n=M.fetchers.get(r);h(n,"Expected fetcher: "+r),"loading"===n.state&&(eo.delete(r),e.push(r),t=!0)}return e5(e),t}function e6(e){let t=[];for(let[r,n]of X)if(n<e){let e=M.fetchers.get(r);h(e,"Expected fetcher: "+r),"loading"===e.state&&(e3(r),X.delete(r),t.push(r))}return e5(t),t.length>0}function e8(e){M.blockers.delete(e),ey.delete(e)}function e9(e,t){let r=M.blockers.get(e)||et;h("unblocked"===r.state&&"blocked"===t.state||"blocked"===r.state&&"blocked"===t.state||"blocked"===r.state&&"proceeding"===t.state||"blocked"===r.state&&"unblocked"===t.state||"proceeding"===r.state&&"unblocked"===t.state,"Invalid blocker state transition: "+r.state+" -> "+t.state);let n=new Map(M.blockers);n.set(e,t),eE({blockers:n})}function te(e){let{currentLocation:t,nextLocation:r,historyAction:n}=e;if(0===ey.size)return;ey.size>1&&f(!1,"A router only supports one blocker at a time");let a=Array.from(ey.entries()),[o,i]=a[a.length-1],l=M.blockers.get(o);if((!l||"proceeding"!==l.state)&&i({currentLocation:t,nextLocation:r,historyAction:n}))return o}function tt(e){let t=eL(404,{pathname:e}),{matches:n,route:a}=eD(r||y);return tr(),{notFoundMatches:n,route:a,error:t}}function tr(e){let t=[];return ep.forEach((r,n)=>{(!e||e(n))&&(r.cancel(),t.push(n),ep.delete(n))}),t}function tn(e,t){return _&&_(e,t.map(e=>S(e,M.loaderData)))||e.key}function ta(e,t){if(L){let r=L[tn(e,t)];if("number"==typeof r)return r}return null}function to(e,t,r){if(x){if(!e)return{active:!0,matches:R(t,r,g,!0)||[]};else if(Object.keys(e[0].params).length>0)return{active:!0,matches:R(t,r,g,!0)}}return{active:!1,matches:null}}async function ti(e,n,a,o){if(!x)return{type:"success",matches:e};let i=e;for(;;){let e=null==r,l=r||y,s=v;try{await x({signal:a,path:n,matches:i,fetcherKey:o,patch:(e,r)=>{a.aborted||ef(e,r,l,s,t)}})}catch(e){return{type:"error",error:e,partialMatches:i}}finally{e&&!a.aborted&&(y=[...y])}if(a.aborted)return{type:"aborted"};let u=E(l,n,g);if(u)return{type:"success",matches:u};let c=R(l,n,g,!0);if(!c||i.length===c.length&&i.every((e,t)=>e.route.id===c[t].route.id))return{type:"success",matches:null};i=c}}return i={get basename(){return g},get future(){return C},get state(){return M},get routes(){return y},get window(){return c},initialize:function(){if(P=e.history.listen(t=>{let{action:r,location:n,delta:a}=t;if(u){u(),u=void 0;return}f(0===ey.size||null!=a,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let o=te({currentLocation:M.location,nextLocation:n,historyAction:r});if(o&&null!=a){let t=new Promise(e=>{u=e});e.history.go(-1*a),e9(o,{state:"blocked",location:n,proceed(){e9(o,{state:"proceeding",proceed:void 0,reset:void 0,location:n}),t.then(()=>e.history.go(a))},reset(){let e=new Map(M.blockers);e.set(o,et),eE({blockers:e})}});return}return eU(r,n)}),d){var t=c,r=z;try{let e=t.sessionStorage.getItem(ea);if(e){let t=JSON.parse(e);for(let[e,n]of Object.entries(t||{}))n&&Array.isArray(n)&&r.set(e,new Set(n||[]))}}catch(e){}let e=()=>(function(e,t){if(t.size>0){let r={};for(let[e,n]of t)r[e]=[...n];try{e.sessionStorage.setItem(ea,JSON.stringify(r))}catch(e){f(!1,"Failed to save applied view transitions in sessionStorage ("+e+").")}}})(c,z);c.addEventListener("pagehide",e),H=()=>c.removeEventListener("pagehide",e)}return M.initialized||eU(n.Pop,M.location,{initialHydration:!0}),i},subscribe:function(e){return D.add(e),()=>D.delete(e)},enableScrollRestoration:function(e,t,r){if(L=e,O=t,_=r||null,!A&&M.navigation===Z){A=!0;let e=ta(M.location,M.matches);null!=e&&eE({restoreScrollPosition:e})}return()=>{L=null,O=null,_=null}},navigate:e_,fetch:function(e,t,n,a){if(p)throw Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");e3(e);let o=!0===(a&&a.flushSync),i=r||y,l=ei(M.location,M.matches,g,C.v7_prependBasename,n,C.v7_relativeSplatPath,t,null==a?void 0:a.relative),s=E(i,l,g),u=to(s,i,l);if(u.active&&u.matches&&(s=u.matches),!s)return void e1(e,t,eL(404,{pathname:l}),{flushSync:o});let{path:c,submission:d,error:h}=el(C.v7_normalizeFormMethod,!0,l,a);if(h)return void e1(e,t,h,{flushSync:o});let f=eH(s,c),m=!0===(a&&a.preventScrollReset);d&&eM(d.formMethod)?eJ(e,t,c,f,s,u.active,o,m,d):(es.set(e,{routeId:t,path:c}),eY(e,t,c,f,s,u.active,o,m,d))},revalidate:function(){if(eZ(),eE({revalidation:"loading"}),"submitting"!==M.navigation.state){if("idle"===M.navigation.state)return void eU(M.historyAction,M.location,{startUninterruptedRevalidation:!0});eU(F||M.historyAction,M.navigation.location,{overrideNavigation:M.navigation,enableViewTransition:!0===B})}},createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:e7,deleteFetcher:function(e){let t=(ed.get(e)||0)-1;t<=0?(ed.delete(e),eh.add(e),C.v7_fetcherPersist||e4(e)):ed.set(e,t),eE({fetchers:new Map(M.fetchers)})},dispose:function(){P&&P(),H&&H(),D.clear(),s&&s.abort(),M.fetchers.forEach((e,t)=>e4(t)),M.blockers.forEach((e,t)=>e8(t))},getBlocker:function(e,t){let r=M.blockers.get(e)||et;return ey.get(e)!==t&&ey.set(e,t),r},deleteBlocker:e8,patchRoutes:function(e,n){let a=null==r;ef(e,n,r||y,v,t),a&&(y=[...y],eE({}))},_internalFetchControllers:K,_internalActiveDeferreds:ep,_internalSetRoutes:function(e){r=w(e,t,void 0,v={})}}}function ei(e,t,r,n,a,o,i,l){let s,u;if(i){for(let e of(s=[],t))if(s.push(e),e.route.id===i){u=e;break}}else s=t,u=t[t.length-1];let c=U(a||".",T(s,o),k(e.pathname,r)||e.pathname,"path"===l);if(null==a&&(c.search=e.search,c.hash=e.hash),(null==a||""===a||"."===a)&&u){let e=ez(c.search);if(u.route.index&&!e)c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index";else if(!u.route.index&&e){let e=new URLSearchParams(c.search),t=e.getAll("index");e.delete("index"),t.filter(e=>e).forEach(t=>e.append("index",t));let r=e.toString();c.search=r?"?"+r:""}}return n&&"/"!==r&&(c.pathname="/"===c.pathname?r:j([r,c.pathname])),v(c)}function el(e,t,r,n){var a;let o,i;if(!n||!(null!=n&&("formData"in n&&null!=n.formData||"body"in n&&void 0!==n.body)))return{path:r};if(n.formMethod&&(a=n.formMethod,!X.has(a.toLowerCase())))return{path:r,error:eL(405,{method:n.formMethod})};let l=()=>({path:r,error:eL(400,{type:"invalid-body"})}),s=n.formMethod||"get",u=e?s.toUpperCase():s.toLowerCase(),c=e_(r);if(void 0!==n.body){if("text/plain"===n.formEncType){if(!eM(u))return l();let e="string"==typeof n.body?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((e,t)=>{let[r,n]=t;return""+e+r+"="+n+"\n"},""):String(n.body);return{path:r,submission:{formMethod:u,formAction:c,formEncType:n.formEncType,formData:void 0,json:void 0,text:e}}}else if("application/json"===n.formEncType){if(!eM(u))return l();try{let e="string"==typeof n.body?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:u,formAction:c,formEncType:n.formEncType,formData:void 0,json:e,text:void 0}}}catch(e){return l()}}}if(h("function"==typeof FormData,"FormData is not available in this environment"),n.formData)o=eE(n.formData),i=n.formData;else if(n.body instanceof FormData)o=eE(n.body),i=n.body;else if(n.body instanceof URLSearchParams)i=eR(o=n.body);else if(null==n.body)o=new URLSearchParams,i=new FormData;else try{o=new URLSearchParams(n.body),i=eR(o)}catch(e){return l()}let d={formMethod:u,formAction:c,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:i,json:void 0,text:void 0};if(eM(d.formMethod))return{path:r,submission:d};let f=y(r);return t&&f.search&&ez(f.search)&&o.append("index",""),f.search="?"+o,{path:v(f),submission:d}}function es(e,t,r){void 0===r&&(r=!1);let n=e.findIndex(e=>e.route.id===t);return n>=0?e.slice(0,r?n+1:n):e}function eu(e,t,r,n,a,o,i,s,u,c,d,h,f,p,m,v){let y=v?eA(v[1])?v[1].error:v[1].data:void 0,g=e.createURL(t.location),b=e.createURL(a),w=r;o&&t.errors?w=es(r,Object.keys(t.errors)[0],!0):v&&eA(v[1])&&(w=es(r,v[0]));let R=v?v[1].statusCode:void 0,S=i&&R&&R>=400,x=w.filter((e,r)=>{var a,i,c;let d,h,{route:f}=e;if(f.lazy)return!0;if(null==f.loader)return!1;if(o)return ec(f,t.loaderData,t.errors);if(a=t.loaderData,i=t.matches[r],c=e,d=!i||c.route.id!==i.route.id,h=void 0===a[c.route.id],d||h||u.some(t=>t===e.route.id))return!0;let p=t.matches[r];return eh(e,l({currentUrl:g,currentParams:p.params,nextUrl:b,nextParams:e.params},n,{actionResult:y,actionStatus:R,defaultShouldRevalidate:!S&&(s||g.pathname+g.search===b.pathname+b.search||g.search!==b.search||ed(p,e))}))}),C=[];return h.forEach((e,a)=>{if(o||!r.some(t=>t.route.id===e.routeId)||d.has(a))return;let i=E(p,e.path,m);if(!i)return void C.push({key:a,routeId:e.routeId,path:e.path,matches:null,match:null,controller:null});let u=t.fetchers.get(a),h=eH(i,e.path),v=!1;f.has(a)?v=!1:c.has(a)?(c.delete(a),v=!0):v=u&&"idle"!==u.state&&void 0===u.data?s:eh(h,l({currentUrl:g,currentParams:t.matches[t.matches.length-1].params,nextUrl:b,nextParams:r[r.length-1].params},n,{actionResult:y,actionStatus:R,defaultShouldRevalidate:!S&&s})),v&&C.push({key:a,routeId:e.routeId,path:e.path,matches:i,match:h,controller:new AbortController})}),[x,C]}function ec(e,t,r){if(e.lazy)return!0;if(!e.loader)return!1;let n=null!=t&&void 0!==t[e.id],a=null!=r&&void 0!==r[e.id];return(!!n||!a)&&("function"==typeof e.loader&&!0===e.loader.hydrate||!n&&!a)}function ed(e,t){let r=e.route.path;return e.pathname!==t.pathname||null!=r&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function eh(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if("boolean"==typeof r)return r}return t.defaultShouldRevalidate}function ef(e,t,r,n,a){var o;let i;if(e){let t=n[e];h(t,"No route found to patch children into: routeId = "+e),t.children||(t.children=[]),i=t.children}else i=r;let l=w(t.filter(e=>!i.some(t=>(function e(t,r){return"id"in t&&"id"in r&&t.id===r.id||t.index===r.index&&t.path===r.path&&t.caseSensitive===r.caseSensitive&&((!t.children||0===t.children.length)&&(!r.children||0===r.children.length)||t.children.every((t,n)=>{var a;return null==(a=r.children)?void 0:a.some(r=>e(t,r))}))})(e,t))),a,[e||"_","patch",String((null==(o=i)?void 0:o.length)||"0")],n);i.push(...l)}async function ep(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let a=r[e.id];h(a,"No route found in manifest");let o={};for(let e in n){let t=void 0!==a[e]&&"hasErrorBoundary"!==e;f(!t,'Route "'+a.id+'" has a static property "'+e+'" defined but its lazy function is also returning a value for this property. The lazy route property "'+e+'" will be ignored.'),t||b.has(e)||(o[e]=n[e])}Object.assign(a,o),Object.assign(a,l({},t(a),{lazy:void 0}))}async function em(e){let{matches:t}=e,r=t.filter(e=>e.shouldLoad);return(await Promise.all(r.map(e=>e.resolve()))).reduce((e,t,n)=>Object.assign(e,{[r[n].route.id]:t}),{})}async function ev(e,t,r,n,o,i,s,u,c,d){let h=i.map(e=>e.route.lazy?ep(e.route,c,u):void 0),f=i.map((e,r)=>{let i=h[r],s=o.some(t=>t.route.id===e.route.id),u=async r=>(r&&"GET"===n.method&&(e.route.lazy||e.route.loader)&&(s=!0),s?ey(t,n,e,i,r,d):Promise.resolve({type:a.data,result:void 0}));return l({},e,{shouldLoad:s,resolve:u})}),p=await e({matches:f,request:n,params:i[0].params,fetcherKey:s,context:d});try{await Promise.all(h)}catch(e){}return p}async function ey(e,t,r,n,o,i){let l,s,u=n=>{let a,l=new Promise((e,t)=>a=t);s=()=>a(),t.signal.addEventListener("abort",s);let u=a=>"function"!=typeof n?Promise.reject(Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: ')+r.route.id+"]")):n({request:t,params:r.params,context:i},...void 0!==a?[a]:[]);return Promise.race([(async()=>{try{let e=await (o?o(e=>u(e)):u());return{type:"data",result:e}}catch(e){return{type:"error",result:e}}})(),l])};try{let o=r.route[e];if(n)if(o){let e,[t]=await Promise.all([u(o).catch(t=>{e=t}),n]);if(void 0!==e)throw e;l=t}else if(await n,o=r.route[e])l=await u(o);else{if("action"!==e)return{type:a.data,result:void 0};let n=new URL(t.url),o=n.pathname+n.search;throw eL(405,{method:t.method,pathname:o,routeId:r.route.id})}else if(o)l=await u(o);else{let e=new URL(t.url),r=e.pathname+e.search;throw eL(404,{pathname:r})}h(void 0!==l.result,"You defined "+("action"===e?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `")+e+"` function. Please return a value or `null`.")}catch(e){return{type:a.error,result:e}}finally{s&&t.signal.removeEventListener("abort",s)}return l}async function eg(e){var t,r,n,o,i,l,s,u,c;let{result:d,type:h}=e;if(ej(d)){let e;try{let t=d.headers.get("Content-Type");e=t&&/\bapplication\/json\b/.test(t)?null==d.body?null:await d.json():await d.text()}catch(e){return{type:a.error,error:e}}return h===a.error?{type:a.error,error:new K(d.status,d.statusText,e),statusCode:d.status,headers:d.headers}:{type:a.data,data:e,statusCode:d.status,headers:d.headers}}if(h===a.error)return eU(d)?d.data instanceof Error?{type:a.error,error:d.data,statusCode:null==(n=d.init)?void 0:n.status,headers:null!=(o=d.init)&&o.headers?new Headers(d.init.headers):void 0}:{type:a.error,error:new K((null==(t=d.init)?void 0:t.status)||500,void 0,d.data),statusCode:q(d)?d.status:void 0,headers:null!=(r=d.init)&&r.headers?new Headers(d.init.headers):void 0}:{type:a.error,error:d,statusCode:q(d)?d.status:void 0};return(c=d)&&"object"==typeof c&&"object"==typeof c.data&&"function"==typeof c.subscribe&&"function"==typeof c.cancel&&"function"==typeof c.resolveData?{type:a.deferred,deferredData:d,statusCode:null==(i=d.init)?void 0:i.status,headers:(null==(l=d.init)?void 0:l.headers)&&new Headers(d.init.headers)}:eU(d)?{type:a.data,data:d.data,statusCode:null==(s=d.init)?void 0:s.status,headers:null!=(u=d.init)&&u.headers?new Headers(d.init.headers):void 0}:{type:a.data,data:d}}function eb(e,t,r){if(er.test(e)){let n=new URL(e.startsWith("//")?t.protocol+e:e),a=null!=k(n.pathname,r);if(n.origin===t.origin&&a)return n.pathname+n.search+n.hash}return e}function ew(e,t,r,n){let a=e.createURL(e_(t)).toString(),o={signal:r};if(n&&eM(n.formMethod)){let{formMethod:e,formEncType:t}=n;o.method=e.toUpperCase(),"application/json"===t?(o.headers=new Headers({"Content-Type":t}),o.body=JSON.stringify(n.json)):"text/plain"===t?o.body=n.text:"application/x-www-form-urlencoded"===t&&n.formData?o.body=eE(n.formData):o.body=n.formData}return new Request(a,o)}function eE(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,"string"==typeof n?n:n.name);return t}function eR(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function eS(e,t,r,n,a,o,i){let s,u,c,d,f,p,{loaderData:m,errors:v}=(u={},c=null,d=!1,f={},p=n&&eA(n[1])?n[1].error:void 0,t.forEach(e=>{if(!(e.route.id in r))return;let n=e.route.id,a=r[n];if(h(!eT(a),"Cannot handle redirect results in processLoaderData"),eA(a)){let e=a.error;void 0!==p&&(e=p,p=void 0),c=c||{},1;{let r=eP(t,n);null==c[r.route.id]&&(c[r.route.id]=e)}u[n]=void 0,d||(d=!0,s=q(a.error)?a.error.status:500),a.headers&&(f[n]=a.headers)}else eO(a)?(i.set(n,a.deferredData),u[n]=a.deferredData.data,null==a.statusCode||200===a.statusCode||d||(s=a.statusCode)):(u[n]=a.data,a.statusCode&&200!==a.statusCode&&!d&&(s=a.statusCode)),a.headers&&(f[n]=a.headers)}),void 0!==p&&n&&(c={[n[0]]:p},u[n[0]]=void 0),{loaderData:u,errors:c,statusCode:s||200,loaderHeaders:f});return a.forEach(t=>{let{key:r,match:n,controller:a}=t,i=o[r];if(h(i,"Did not find corresponding fetcher result"),!a||!a.signal.aborted)if(eA(i)){let t=eP(e.matches,null==n?void 0:n.route.id);v&&v[t.route.id]||(v=l({},v,{[t.route.id]:i.error})),e.fetchers.delete(r)}else if(eT(i))h(!1,"Unhandled fetcher revalidation redirect");else if(eO(i))h(!1,"Unhandled fetcher deferred data");else{let t=eW(i.data);e.fetchers.set(r,t)}}),{loaderData:m,errors:v}}function ex(e,t,r,n){let a=l({},t);for(let o of r){let r=o.route.id;if(t.hasOwnProperty(r)?void 0!==t[r]&&(a[r]=t[r]):void 0!==e[r]&&o.route.loader&&(a[r]=e[r]),n&&n.hasOwnProperty(r))break}return a}function eC(e){return e?eA(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function eP(e,t){return(t?e.slice(0,e.findIndex(e=>e.route.id===t)+1):[...e]).reverse().find(e=>!0===e.route.hasErrorBoundary)||e[0]}function eD(e){let t=1===e.length?e[0]:e.find(e=>e.index||!e.path||"/"===e.path)||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function eL(e,t){let{pathname:r,routeId:n,method:a,type:o,message:i}=void 0===t?{}:t,l="Unknown Server Error",s="Unknown @remix-run/router error";return 400===e?(l="Bad Request",a&&r&&n?s="You made a "+a+' request to "'+r+'" but did not provide a `loader` for route "'+n+'", so there is no way to handle the request.':"defer-action"===o?s="defer() is not supported in actions":"invalid-body"===o&&(s="Unable to encode submission body")):403===e?(l="Forbidden",s='Route "'+n+'" does not match URL "'+r+'"'):404===e?(l="Not Found",s='No route matches URL "'+r+'"'):405===e&&(l="Method Not Allowed",a&&r&&n?s="You made a "+a.toUpperCase()+' request to "'+r+'" but did not provide an `action` for route "'+n+'", so there is no way to handle the request.':a&&(s='Invalid request method "'+a.toUpperCase()+'"')),new K(e||500,l,Error(s),!0)}function ek(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[r,n]=t[e];if(eT(n))return{key:r,result:n}}}function e_(e){let t="string"==typeof e?y(e):e;return v(l({},t,{hash:""}))}function eO(e){return e.type===a.deferred}function eA(e){return e.type===a.error}function eT(e){return(e&&e.type)===a.redirect}function eU(e){return"object"==typeof e&&null!=e&&"type"in e&&"data"in e&&"init"in e&&"DataWithResponseInit"===e.type}function ej(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"object"==typeof e.headers&&void 0!==e.body}function eM(e){return Y.has(e.toLowerCase())}async function eF(e,t,r,n,a){let o=Object.entries(t);for(let i=0;i<o.length;i++){let[l,s]=o[i],u=e.find(e=>(null==e?void 0:e.route.id)===l);if(!u)continue;let c=n.find(e=>e.route.id===u.route.id),d=null!=c&&!ed(c,u)&&(a&&a[u.route.id])!==void 0;eO(s)&&d&&await eB(s,r,!1).then(e=>{e&&(t[l]=e)})}}async function eN(e,t,r){for(let n=0;n<r.length;n++){let{key:a,routeId:o,controller:i}=r[n],l=t[a];e.find(e=>(null==e?void 0:e.route.id)===o)&&eO(l)&&(h(i,"Expected an AbortController for revalidating fetcher deferred result"),await eB(l,i.signal,!0).then(e=>{e&&(t[a]=e)}))}}async function eB(e,t,r){if(void 0===r&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:a.data,data:e.deferredData.unwrappedData}}catch(e){return{type:a.error,error:e}}return{type:a.data,data:e.deferredData.data}}}function ez(e){return new URLSearchParams(e).getAll("index").some(e=>""===e)}function eH(e,t){let r="string"==typeof t?y(t).search:t.search;if(e[e.length-1].route.index&&ez(r||""))return e[e.length-1];let n=A(e);return n[n.length-1]}function eI(e){let{formMethod:t,formAction:r,formEncType:n,text:a,formData:o,json:i}=e;if(t&&r&&n){if(null!=a)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:a};else if(null!=o)return{formMethod:t,formAction:r,formEncType:n,formData:o,json:void 0,text:void 0};else if(void 0!==i)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:i,text:void 0}}}function eV(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function e$(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function eW(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}Symbol("deferred")},49348:function(e,t,r){r.r(t),r.d(t,{AbortedDeferredError:()=>c.tH,Await:()=>u.jD,BrowserRouter:()=>U,Form:()=>H,HashRouter:()=>j,Link:()=>B,MemoryRouter:()=>u.fS,NavLink:()=>z,Navigate:()=>u.C5,NavigationType:()=>c.rc,Outlet:()=>u.sv,Route:()=>u.qh,Router:()=>u.Ix,RouterProvider:()=>A,Routes:()=>u.BV,ScrollRestoration:()=>I,UNSAFE_DataRouterContext:()=>u.sp,UNSAFE_DataRouterStateContext:()=>u.Rq,UNSAFE_ErrorResponseImpl:()=>c.VV,UNSAFE_FetchersContext:()=>P,UNSAFE_LocationContext:()=>u.yN,UNSAFE_NavigationContext:()=>u.jb,UNSAFE_RouteContext:()=>u.UX,UNSAFE_ViewTransitionContext:()=>C,UNSAFE_useRouteId:()=>u.$3,UNSAFE_useScrollRestoration:()=>et,createBrowserRouter:()=>R,createHashRouter:()=>S,createMemoryRouter:()=>u.bg,createPath:()=>c.AO,createRoutesFromChildren:()=>u.AV,createRoutesFromElements:()=>u.Eu,createSearchParams:()=>m,defer:()=>c.v6,generatePath:()=>c.tW,isRouteErrorResponse:()=>c.pX,json:()=>c.Pq,matchPath:()=>c.B6,matchRoutes:()=>c.ue,parsePath:()=>c.Rr,redirect:()=>c.V2,redirectDocument:()=>c.Sk,renderMatches:()=>u.KT,replace:()=>c.HC,resolvePath:()=>c.o1,unstable_HistoryRouter:()=>M,unstable_usePrompt:()=>en,useActionData:()=>u.mP,useAsyncError:()=>u.oI,useAsyncValue:()=>u.J8,useBeforeUnload:()=>er,useBlocker:()=>u.KP,useFetcher:()=>G,useFetchers:()=>Q,useFormAction:()=>X,useHref:()=>u.$P,useInRouterContext:()=>u.Ri,useLinkClickHandler:()=>W,useLoaderData:()=>u.LG,useLocation:()=>u.zy,useMatch:()=>u.RQ,useMatches:()=>u.FE,useNavigate:()=>u.Zp,useNavigation:()=>u.cq,useNavigationType:()=>u.wQ,useOutlet:()=>u.P1,useOutletContext:()=>u.KC,useParams:()=>u.g,useResolvedPath:()=>u.x$,useRevalidator:()=>u.vL,useRouteError:()=>u.r5,useRouteLoaderData:()=>u.Ew,useRoutes:()=>u.Ye,useSearchParams:()=>K,useSubmit:()=>Y,useViewTransitionState:()=>ea});var n,a,o,i,l=r(70451),s=r(20231),u=r(67435),c=r(70744);function d(){return(d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function h(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}let f="application/x-www-form-urlencoded";function p(e){return null!=e&&"string"==typeof e.tagName}function m(e){return void 0===e&&(e=""),new URLSearchParams("string"==typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(e=>[r,e]):[[r,n]])},[]))}let v=null,y=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function g(e){return null==e||y.has(e)?e:null}let b=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],w=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],E=["fetcherKey","navigate","reloadDocument","replace","state","method","action","onSubmit","relative","preventScrollReset","viewTransition"];try{window.__reactRouterVersion="6"}catch(e){}function R(e,t){return(0,c.aE)({basename:null==t?void 0:t.basename,future:d({},null==t?void 0:t.future,{v7_prependBasename:!0}),history:(0,c.zR)({window:null==t?void 0:t.window}),hydrationData:(null==t?void 0:t.hydrationData)||x(),routes:e,mapRouteProperties:u.wE,dataStrategy:null==t?void 0:t.dataStrategy,patchRoutesOnNavigation:null==t?void 0:t.patchRoutesOnNavigation,window:null==t?void 0:t.window}).initialize()}function S(e,t){return(0,c.aE)({basename:null==t?void 0:t.basename,future:d({},null==t?void 0:t.future,{v7_prependBasename:!0}),history:(0,c.TM)({window:null==t?void 0:t.window}),hydrationData:(null==t?void 0:t.hydrationData)||x(),routes:e,mapRouteProperties:u.wE,dataStrategy:null==t?void 0:t.dataStrategy,patchRoutesOnNavigation:null==t?void 0:t.patchRoutesOnNavigation,window:null==t?void 0:t.window}).initialize()}function x(){var e;let t=null==(e=window)?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=d({},t,{errors:function(e){if(!e)return null;let t=Object.entries(e),r={};for(let[e,n]of t)if(n&&"RouteErrorResponse"===n.__type)r[e]=new c.VV(n.status,n.statusText,n.data,!0===n.internal);else if(n&&"Error"===n.__type){if(n.__subType){let t=window[n.__subType];if("function"==typeof t)try{let a=new t(n.message);a.stack="",r[e]=a}catch(e){}}if(null==r[e]){let t=Error(n.message);t.stack="",r[e]=t}}else r[e]=n;return r}(t.errors)})),t}let C=l.createContext({isTransitioning:!1}),P=l.createContext(new Map),D=l.startTransition,L=s.flushSync,k=l.useId;function _(e){L?L(e):e()}class O{constructor(){this.status="pending",this.promise=new Promise((e,t)=>{this.resolve=t=>{"pending"===this.status&&(this.status="resolved",e(t))},this.reject=e=>{"pending"===this.status&&(this.status="rejected",t(e))}})}}function A(e){let{fallbackElement:t,router:r,future:n}=e,[a,o]=l.useState(r.state),[i,s]=l.useState(),[c,d]=l.useState({isTransitioning:!1}),[h,f]=l.useState(),[p,m]=l.useState(),[v,y]=l.useState(),g=l.useRef(new Map),{v7_startTransition:b}=n||{},w=l.useCallback(e=>{if(b)D?D(e):e();else e()},[b]),E=l.useCallback((e,t)=>{let{deletedFetchers:n,flushSync:a,viewTransitionOpts:i}=t;e.fetchers.forEach((e,t)=>{void 0!==e.data&&g.current.set(t,e.data)}),n.forEach(e=>g.current.delete(e));let l=null==r.window||null==r.window.document||"function"!=typeof r.window.document.startViewTransition;if(!i||l)return void(a?_(()=>o(e)):w(()=>o(e)));if(a){_(()=>{p&&(h&&h.resolve(),p.skipTransition()),d({isTransitioning:!0,flushSync:!0,currentLocation:i.currentLocation,nextLocation:i.nextLocation})});let t=r.window.document.startViewTransition(()=>{_(()=>o(e))});t.finished.finally(()=>{_(()=>{f(void 0),m(void 0),s(void 0),d({isTransitioning:!1})})}),_(()=>m(t));return}p?(h&&h.resolve(),p.skipTransition(),y({state:e,currentLocation:i.currentLocation,nextLocation:i.nextLocation})):(s(e),d({isTransitioning:!0,flushSync:!1,currentLocation:i.currentLocation,nextLocation:i.nextLocation}))},[r.window,p,h,g,w]);l.useLayoutEffect(()=>r.subscribe(E),[r,E]),l.useEffect(()=>{c.isTransitioning&&!c.flushSync&&f(new O)},[c]),l.useEffect(()=>{if(h&&i&&r.window){let e=h.promise,t=r.window.document.startViewTransition(async()=>{w(()=>o(i)),await e});t.finished.finally(()=>{f(void 0),m(void 0),s(void 0),d({isTransitioning:!1})}),m(t)}},[w,i,h,r.window]),l.useEffect(()=>{h&&i&&a.location.key===i.location.key&&h.resolve()},[h,p,a.location,i]),l.useEffect(()=>{!c.isTransitioning&&v&&(s(v.state),d({isTransitioning:!0,flushSync:!1,currentLocation:v.currentLocation,nextLocation:v.nextLocation}),y(void 0))},[c.isTransitioning,v]),l.useEffect(()=>{},[]);let R=l.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:e=>r.navigate(e),push:(e,t,n)=>r.navigate(e,{state:t,preventScrollReset:null==n?void 0:n.preventScrollReset}),replace:(e,t,n)=>r.navigate(e,{replace:!0,state:t,preventScrollReset:null==n?void 0:n.preventScrollReset})}),[r]),S=r.basename||"/",x=l.useMemo(()=>({router:r,navigator:R,static:!1,basename:S}),[r,R,S]),L=l.useMemo(()=>({v7_relativeSplatPath:r.future.v7_relativeSplatPath}),[r.future.v7_relativeSplatPath]);return l.useEffect(()=>(0,u.V8)(n,r.future),[n,r.future]),l.createElement(l.Fragment,null,l.createElement(u.sp.Provider,{value:x},l.createElement(u.Rq.Provider,{value:a},l.createElement(P.Provider,{value:g.current},l.createElement(C.Provider,{value:c},l.createElement(u.Ix,{basename:S,location:a.location,navigationType:a.historyAction,navigator:R,future:L},a.initialized||r.future.v7_partialHydration?l.createElement(T,{routes:r.routes,future:r.future,state:a}):t))))),null)}let T=l.memo(function(e){let{routes:t,future:r,state:n}=e;return(0,u.ph)(t,void 0,n,r)});function U(e){let{basename:t,children:r,future:n,window:a}=e,o=l.useRef();null==o.current&&(o.current=(0,c.zR)({window:a,v5Compat:!0}));let i=o.current,[s,d]=l.useState({action:i.action,location:i.location}),{v7_startTransition:h}=n||{},f=l.useCallback(e=>{h&&D?D(()=>d(e)):d(e)},[d,h]);return l.useLayoutEffect(()=>i.listen(f),[i,f]),l.useEffect(()=>(0,u.V8)(n),[n]),l.createElement(u.Ix,{basename:t,children:r,location:s.location,navigationType:s.action,navigator:i,future:n})}function j(e){let{basename:t,children:r,future:n,window:a}=e,o=l.useRef();null==o.current&&(o.current=(0,c.TM)({window:a,v5Compat:!0}));let i=o.current,[s,d]=l.useState({action:i.action,location:i.location}),{v7_startTransition:h}=n||{},f=l.useCallback(e=>{h&&D?D(()=>d(e)):d(e)},[d,h]);return l.useLayoutEffect(()=>i.listen(f),[i,f]),l.useEffect(()=>(0,u.V8)(n),[n]),l.createElement(u.Ix,{basename:t,children:r,location:s.location,navigationType:s.action,navigator:i,future:n})}function M(e){let{basename:t,children:r,future:n,history:a}=e,[o,i]=l.useState({action:a.action,location:a.location}),{v7_startTransition:s}=n||{},c=l.useCallback(e=>{s&&D?D(()=>i(e)):i(e)},[i,s]);return l.useLayoutEffect(()=>a.listen(c),[a,c]),l.useEffect(()=>(0,u.V8)(n),[n]),l.createElement(u.Ix,{basename:t,children:r,location:o.location,navigationType:o.action,navigator:a,future:n})}let F="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,N=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,B=l.forwardRef(function(e,t){let r,{onClick:n,relative:a,reloadDocument:o,replace:i,state:s,target:f,to:p,preventScrollReset:m,viewTransition:v}=e,y=h(e,b),{basename:g}=l.useContext(u.jb),w=!1;if("string"==typeof p&&N.test(p)&&(r=p,F))try{let e=new URL(window.location.href),t=new URL(p.startsWith("//")?e.protocol+p:p),r=(0,c.pb)(t.pathname,g);t.origin===e.origin&&null!=r?p=r+t.search+t.hash:w=!0}catch(e){}let E=(0,u.$P)(p,{relative:a}),R=W(p,{replace:i,state:s,target:f,preventScrollReset:m,relative:a,viewTransition:v});return l.createElement("a",d({},y,{href:r||E,onClick:w||o?n:function(e){n&&n(e),e.defaultPrevented||R(e)},ref:t,target:f}))}),z=l.forwardRef(function(e,t){let r,{"aria-current":n="page",caseSensitive:a=!1,className:o="",end:i=!1,style:s,to:f,viewTransition:p,children:m}=e,v=h(e,w),y=(0,u.x$)(f,{relative:v.relative}),g=(0,u.zy)(),b=l.useContext(u.Rq),{navigator:E,basename:R}=l.useContext(u.jb),S=null!=b&&ea(y)&&!0===p,x=E.encodeLocation?E.encodeLocation(y).pathname:y.pathname,C=g.pathname,P=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;a||(C=C.toLowerCase(),P=P?P.toLowerCase():null,x=x.toLowerCase()),P&&R&&(P=(0,c.pb)(P,R)||P);let D="/"!==x&&x.endsWith("/")?x.length-1:x.length,L=C===x||!i&&C.startsWith(x)&&"/"===C.charAt(D),k=null!=P&&(P===x||!i&&P.startsWith(x)&&"/"===P.charAt(x.length)),_={isActive:L,isPending:k,isTransitioning:S},O=L?n:void 0;r="function"==typeof o?o(_):[o,L?"active":null,k?"pending":null,S?"transitioning":null].filter(Boolean).join(" ");let A="function"==typeof s?s(_):s;return l.createElement(B,d({},v,{"aria-current":O,className:r,ref:t,style:A,to:f,viewTransition:p}),"function"==typeof m?m(_):m)}),H=l.forwardRef((e,t)=>{let{fetcherKey:r,navigate:n,reloadDocument:a,replace:o,state:i,method:s="get",action:u,onSubmit:c,relative:f,preventScrollReset:p,viewTransition:m}=e,v=h(e,E),y=Y(),g=X(u,{relative:f}),b="get"===s.toLowerCase()?"get":"post";return l.createElement("form",d({ref:t,method:b,action:g,onSubmit:a?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let t=e.nativeEvent.submitter,a=(null==t?void 0:t.getAttribute("formmethod"))||s;y(t||e.currentTarget,{fetcherKey:r,method:a,navigate:n,replace:o,state:i,relative:f,preventScrollReset:p,viewTransition:m})}},v))});function I(e){let{getKey:t,storageKey:r}=e;return et({getKey:t,storageKey:r}),null}function V(e){let t=l.useContext(u.sp);return t||(0,c.Oi)(!1),t}function $(e){let t=l.useContext(u.Rq);return t||(0,c.Oi)(!1),t}function W(e,t){let{target:r,replace:n,state:a,preventScrollReset:o,relative:i,viewTransition:s}=void 0===t?{}:t,d=(0,u.Zp)(),h=(0,u.zy)(),f=(0,u.x$)(e,{relative:i});return l.useCallback(t=>{0!==t.button||r&&"_self"!==r||t.metaKey||t.altKey||t.ctrlKey||t.shiftKey||(t.preventDefault(),d(e,{replace:void 0!==n?n:(0,c.AO)(h)===(0,c.AO)(f),state:a,preventScrollReset:o,relative:i,viewTransition:s}))},[h,d,f,n,a,r,e,o,i,s])}function K(e){let t=l.useRef(m(e)),r=l.useRef(!1),n=(0,u.zy)(),a=l.useMemo(()=>{var e,a;let o;return e=n.search,a=r.current?null:t.current,o=m(e),a&&a.forEach((e,t)=>{o.has(t)||a.getAll(t).forEach(e=>{o.append(t,e)})}),o},[n.search]),o=(0,u.Zp)(),i=l.useCallback((e,t)=>{let n=m("function"==typeof e?e(a):e);r.current=!0,o("?"+n,t)},[o,a]);return[a,i]}(n=o||(o={})).UseScrollRestoration="useScrollRestoration",n.UseSubmit="useSubmit",n.UseSubmitFetcher="useSubmitFetcher",n.UseFetcher="useFetcher",n.useViewTransitionState="useViewTransitionState",(a=i||(i={})).UseFetcher="useFetcher",a.UseFetchers="useFetchers",a.UseScrollRestoration="useScrollRestoration";let q=0,J=()=>"__"+String(++q)+"__";function Y(){let{router:e}=V(o.UseSubmit),{basename:t}=l.useContext(u.jb),r=(0,u.$3)();return l.useCallback(function(n,a){if(void 0===a&&(a={}),"undefined"==typeof document)throw Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.");let{action:o,method:i,encType:l,formData:s,body:u}=function(e,t){let r,n,a,o,i;if(p(e)&&"form"===e.tagName.toLowerCase()){let i=e.getAttribute("action");n=i?(0,c.pb)(i,t):null,r=e.getAttribute("method")||"get",a=g(e.getAttribute("enctype"))||f,o=new FormData(e)}else if(p(e)&&"button"===e.tagName.toLowerCase()||p(e)&&"input"===e.tagName.toLowerCase()&&("submit"===e.type||"image"===e.type)){let i=e.form;if(null==i)throw Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||i.getAttribute("action");if(n=l?(0,c.pb)(l,t):null,r=e.getAttribute("formmethod")||i.getAttribute("method")||"get",a=g(e.getAttribute("formenctype"))||g(i.getAttribute("enctype"))||f,o=new FormData(i,e),!function(){if(null===v)try{new FormData(document.createElement("form"),0),v=!1}catch(e){v=!0}return v}()){let{name:t,type:r,value:n}=e;if("image"===r){let e=t?t+".":"";o.append(e+"x","0"),o.append(e+"y","0")}else t&&o.append(t,n)}}else if(p(e))throw Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');else r="get",n=null,a=f,i=e;return o&&"text/plain"===a&&(i=o,o=void 0),{action:n,method:r.toLowerCase(),encType:a,formData:o,body:i}}(n,t);if(!1===a.navigate){let t=a.fetcherKey||J();e.fetch(t,r,a.action||o,{preventScrollReset:a.preventScrollReset,formData:s,body:u,formMethod:a.method||i,formEncType:a.encType||l,flushSync:a.flushSync})}else e.navigate(a.action||o,{preventScrollReset:a.preventScrollReset,formData:s,body:u,formMethod:a.method||i,formEncType:a.encType||l,replace:a.replace,state:a.state,fromRouteId:r,flushSync:a.flushSync,viewTransition:a.viewTransition})},[e,t,r])}function X(e,t){let{relative:r}=void 0===t?{}:t,{basename:n}=l.useContext(u.jb),a=l.useContext(u.UX);a||(0,c.Oi)(!1);let[o]=a.matches.slice(-1),i=d({},(0,u.x$)(e||".",{relative:r})),s=(0,u.zy)();if(null==e){i.search=s.search;let e=new URLSearchParams(i.search),t=e.getAll("index");if(t.some(e=>""===e)){e.delete("index"),t.filter(e=>e).forEach(t=>e.append("index",t));let r=e.toString();i.search=r?"?"+r:""}}return(!e||"."===e)&&o.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),"/"!==n&&(i.pathname="/"===i.pathname?n:(0,c.HS)([n,i.pathname])),(0,c.AO)(i)}function G(e){var t;let{key:r}=void 0===e?{}:e,{router:n}=V(o.UseFetcher),a=$(i.UseFetcher),s=l.useContext(P),h=l.useContext(u.UX),f=null==(t=h.matches[h.matches.length-1])?void 0:t.route.id;s||(0,c.Oi)(!1),h||(0,c.Oi)(!1),null==f&&(0,c.Oi)(!1);let p=k?k():"",[m,v]=l.useState(r||p);r&&r!==m?v(r):m||v(J()),l.useEffect(()=>(n.getFetcher(m),()=>{n.deleteFetcher(m)}),[n,m]);let y=l.useCallback((e,t)=>{f||(0,c.Oi)(!1),n.fetch(m,f,e,t)},[m,f,n]),g=Y(),b=l.useCallback((e,t)=>{g(e,d({},t,{navigate:!1,fetcherKey:m}))},[m,g]),w=l.useMemo(()=>l.forwardRef((e,t)=>l.createElement(H,d({},e,{navigate:!1,fetcherKey:m,ref:t}))),[m]),E=a.fetchers.get(m)||c.HW,R=s.get(m);return l.useMemo(()=>d({Form:w,submit:b,load:y},E,{data:R}),[w,b,y,E,R])}function Q(){return Array.from($(i.UseFetchers).fetchers.entries()).map(e=>{let[t,r]=e;return d({},r,{key:t})})}let Z="react-router-scroll-positions",ee={};function et(e){let{getKey:t,storageKey:r}=void 0===e?{}:e,{router:n}=V(o.UseScrollRestoration),{restoreScrollPosition:a,preventScrollReset:s}=$(i.UseScrollRestoration),{basename:h}=l.useContext(u.jb),f=(0,u.zy)(),p=(0,u.FE)(),m=(0,u.cq)();l.useEffect(()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"}),[]),function(e,t){let{capture:r}={};l.useEffect(()=>{let t=null!=r?{capture:r}:void 0;return window.addEventListener("pagehide",e,t),()=>{window.removeEventListener("pagehide",e,t)}},[e,r])}(l.useCallback(()=>{"idle"===m.state&&(ee[(t?t(f,p):null)||f.key]=window.scrollY);try{sessionStorage.setItem(r||Z,JSON.stringify(ee))}catch(e){}window.history.scrollRestoration="auto"},[r,t,m.state,f,p])),"undefined"!=typeof document&&(l.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(r||Z);e&&(ee=JSON.parse(e))}catch(e){}},[r]),l.useLayoutEffect(()=>{let e=t&&"/"!==h?(e,r)=>t(d({},e,{pathname:(0,c.pb)(e.pathname,h)||e.pathname}),r):t,r=null==n?void 0:n.enableScrollRestoration(ee,()=>window.scrollY,e);return()=>r&&r()},[n,h,t]),l.useLayoutEffect(()=>{if(!1!==a){if("number"==typeof a)return void window.scrollTo(0,a);if(f.hash){let e=document.getElementById(decodeURIComponent(f.hash.slice(1)));if(e)return void e.scrollIntoView()}!0!==s&&window.scrollTo(0,0)}},[f,a,s]))}function er(e,t){let{capture:r}=t||{};l.useEffect(()=>{let t=null!=r?{capture:r}:void 0;return window.addEventListener("beforeunload",e,t),()=>{window.removeEventListener("beforeunload",e,t)}},[e,r])}function en(e){let{when:t,message:r}=e,n=(0,u.KP)(t);l.useEffect(()=>{"blocked"===n.state&&(window.confirm(r)?setTimeout(n.proceed,0):n.reset())},[n,r]),l.useEffect(()=>{"blocked"!==n.state||t||n.reset()},[n,t])}function ea(e,t){void 0===t&&(t={});let r=l.useContext(C);null==r&&(0,c.Oi)(!1);let{basename:n}=V(o.useViewTransitionState),a=(0,u.x$)(e,{relative:t.relative});if(!r.isTransitioning)return!1;let i=(0,c.pb)(r.currentLocation.pathname,n)||r.currentLocation.pathname,s=(0,c.pb)(r.nextLocation.pathname,n)||r.nextLocation.pathname;return null!=(0,c.B6)(a.pathname,s)||null!=(0,c.B6)(a.pathname,i)}},67435:function(e,t,r){r.d(t,{$3:()=>B,$P:()=>v,AV:()=>eh,BV:()=>ei,C5:()=>er,Eu:()=>eh,Ew:()=>$,FE:()=>I,Ix:()=>eo,J8:()=>q,KC:()=>x,KP:()=>X,KT:()=>ef,LG:()=>V,P1:()=>C,RQ:()=>w,Ri:()=>y,Rq:()=>c,UX:()=>p,V8:()=>Z,Ye:()=>L,Zp:()=>R,bg:()=>em,cq:()=>z,fS:()=>et,g:()=>P,jD:()=>el,jb:()=>h,mP:()=>W,oI:()=>J,ph:()=>k,qh:()=>ea,r5:()=>K,sp:()=>u,sv:()=>en,vL:()=>H,wE:()=>ep,wQ:()=>b,x$:()=>D,yN:()=>f,zy:()=>g});var n,a,o,i=r(70451),l=r(70744);function s(){return(s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}let u=i.createContext(null),c=i.createContext(null),d=i.createContext(null),h=i.createContext(null),f=i.createContext(null),p=i.createContext({outlet:null,matches:[],isDataRoute:!1}),m=i.createContext(null);function v(e,t){let{relative:r}=void 0===t?{}:t;y()||(0,l.Oi)(!1);let{basename:n,navigator:a}=i.useContext(h),{hash:o,pathname:s,search:u}=D(e,{relative:r}),c=s;return"/"!==n&&(c="/"===s?n:(0,l.HS)([n,s])),a.createHref({pathname:c,search:u,hash:o})}function y(){return null!=i.useContext(f)}function g(){return y()||(0,l.Oi)(!1),i.useContext(f).location}function b(){return i.useContext(f).navigationType}function w(e){y()||(0,l.Oi)(!1);let{pathname:t}=g();return i.useMemo(()=>(0,l.B6)(e,(0,l.RO)(t)),[t,e])}function E(e){i.useContext(h).static||i.useLayoutEffect(e)}function R(){let{isDataRoute:e}=i.useContext(p);return e?function(){let{router:e}=M(U.UseNavigateStable),t=N(j.UseNavigateStable),r=i.useRef(!1);return E(()=>{r.current=!0}),i.useCallback(function(n,a){void 0===a&&(a={}),r.current&&("number"==typeof n?e.navigate(n):e.navigate(n,s({fromRouteId:t},a)))},[e,t])}():function(){y()||(0,l.Oi)(!1);let e=i.useContext(u),{basename:t,future:r,navigator:n}=i.useContext(h),{matches:a}=i.useContext(p),{pathname:o}=g(),s=JSON.stringify((0,l.yD)(a,r.v7_relativeSplatPath)),c=i.useRef(!1);return E(()=>{c.current=!0}),i.useCallback(function(r,a){if(void 0===a&&(a={}),!c.current)return;if("number"==typeof r)return void n.go(r);let i=(0,l.Gh)(r,JSON.parse(s),o,"path"===a.relative);null==e&&"/"!==t&&(i.pathname="/"===i.pathname?t:(0,l.HS)([t,i.pathname])),(a.replace?n.replace:n.push)(i,a.state,a)},[t,n,s,o,e])}()}let S=i.createContext(null);function x(){return i.useContext(S)}function C(e){let t=i.useContext(p).outlet;return t?i.createElement(S.Provider,{value:e},t):t}function P(){let{matches:e}=i.useContext(p),t=e[e.length-1];return t?t.params:{}}function D(e,t){let{relative:r}=void 0===t?{}:t,{future:n}=i.useContext(h),{matches:a}=i.useContext(p),{pathname:o}=g(),s=JSON.stringify((0,l.yD)(a,n.v7_relativeSplatPath));return i.useMemo(()=>(0,l.Gh)(e,JSON.parse(s),o,"path"===r),[e,s,o,r])}function L(e,t){return k(e,t)}function k(e,t,r,n){let a;y()||(0,l.Oi)(!1);let{navigator:o,static:u}=i.useContext(h),{matches:c}=i.useContext(p),d=c[c.length-1],m=d?d.params:{};d&&d.pathname;let v=d?d.pathnameBase:"/";d&&d.route;let b=g();if(t){var w;let e="string"==typeof t?(0,l.Rr)(t):t;"/"===v||(null==(w=e.pathname)?void 0:w.startsWith(v))||(0,l.Oi)(!1),a=e}else a=b;let E=a.pathname||"/",R=E;if("/"!==v){let e=v.replace(/^\//,"").split("/");R="/"+E.replace(/^\//,"").split("/").slice(e.length).join("/")}let S=!u&&r&&r.matches&&r.matches.length>0?r.matches:(0,l.ue)(e,{pathname:R}),x=T(S&&S.map(e=>Object.assign({},e,{params:Object.assign({},m,e.params),pathname:(0,l.HS)([v,o.encodeLocation?o.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?v:(0,l.HS)([v,o.encodeLocation?o.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])})),c,r,n);return t&&x?i.createElement(f.Provider,{value:{location:s({pathname:"/",search:"",hash:"",state:null,key:"default"},a),navigationType:l.rc.Pop}},x):x}let _=i.createElement(function(){let e=K(),t=(0,l.pX)(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null;return i.createElement(i.Fragment,null,i.createElement("h2",null,"Unexpected Application Error!"),i.createElement("h3",{style:{fontStyle:"italic"}},t),r?i.createElement("pre",{style:{padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"}},r):null,null)},null);class O extends i.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?i.createElement(p.Provider,{value:this.props.routeContext},i.createElement(m.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function A(e){let{routeContext:t,match:r,children:n}=e,a=i.useContext(u);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),i.createElement(p.Provider,{value:t},n)}function T(e,t,r,n){var a,o;if(void 0===t&&(t=[]),void 0===r&&(r=null),void 0===n&&(n=null),null==e){if(!r)return null;if(r.errors)e=r.matches;else{if(null==(o=n)||!o.v7_partialHydration||0!==t.length||r.initialized||!(r.matches.length>0))return null;e=r.matches}}let s=e,u=null==(a=r)?void 0:a.errors;if(null!=u){let e=s.findIndex(e=>e.route.id&&(null==u?void 0:u[e.route.id])!==void 0);e>=0||(0,l.Oi)(!1),s=s.slice(0,Math.min(s.length,e+1))}let c=!1,d=-1;if(r&&n&&n.v7_partialHydration)for(let e=0;e<s.length;e++){let t=s[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(d=e),t.route.id){let{loaderData:e,errors:n}=r,a=t.route.loader&&void 0===e[t.route.id]&&(!n||void 0===n[t.route.id]);if(t.route.lazy||a){c=!0,s=d>=0?s.slice(0,d+1):[s[0]];break}}}return s.reduceRight((e,n,a)=>{var o;let l,h=!1,f=null,p=null;r&&(l=u&&n.route.id?u[n.route.id]:void 0,f=n.route.errorElement||_,c&&(d<0&&0===a?(o="route-fallback",G[o]||(G[o]=!0),h=!0,p=null):d===a&&(h=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(s.slice(0,a+1)),v=()=>{let t;return t=l?f:h?p:n.route.Component?i.createElement(n.route.Component,null):n.route.element?n.route.element:e,i.createElement(A,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:null!=r},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||0===a)?i.createElement(O,{location:r.location,revalidation:r.revalidation,component:f,error:l,children:v(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):v()},null)}var U=((n=U||{}).UseBlocker="useBlocker",n.UseRevalidator="useRevalidator",n.UseNavigateStable="useNavigate",n),j=((a=j||{}).UseBlocker="useBlocker",a.UseLoaderData="useLoaderData",a.UseActionData="useActionData",a.UseRouteError="useRouteError",a.UseNavigation="useNavigation",a.UseRouteLoaderData="useRouteLoaderData",a.UseMatches="useMatches",a.UseRevalidator="useRevalidator",a.UseNavigateStable="useNavigate",a.UseRouteId="useRouteId",a);function M(e){let t=i.useContext(u);return t||(0,l.Oi)(!1),t}function F(e){let t=i.useContext(c);return t||(0,l.Oi)(!1),t}function N(e){let t,r=((t=i.useContext(p))||(0,l.Oi)(!1),t),n=r.matches[r.matches.length-1];return n.route.id||(0,l.Oi)(!1),n.route.id}function B(){return N(j.UseRouteId)}function z(){return F(j.UseNavigation).navigation}function H(){let e=M(U.UseRevalidator),t=F(j.UseRevalidator);return i.useMemo(()=>({revalidate:e.router.revalidate,state:t.revalidation}),[e.router.revalidate,t.revalidation])}function I(){let{matches:e,loaderData:t}=F(j.UseMatches);return i.useMemo(()=>e.map(e=>(0,l.ro)(e,t)),[e,t])}function V(){let e=F(j.UseLoaderData),t=N(j.UseLoaderData);return e.errors&&null!=e.errors[t]?void console.error("You cannot `useLoaderData` in an errorElement (routeId: "+t+")"):e.loaderData[t]}function $(e){return F(j.UseRouteLoaderData).loaderData[e]}function W(){let e=F(j.UseActionData),t=N(j.UseLoaderData);return e.actionData?e.actionData[t]:void 0}function K(){var e;let t=i.useContext(m),r=F(j.UseRouteError),n=N(j.UseRouteError);return void 0!==t?t:null==(e=r.errors)?void 0:e[n]}function q(){let e=i.useContext(d);return null==e?void 0:e._data}function J(){let e=i.useContext(d);return null==e?void 0:e._error}let Y=0;function X(e){let{router:t,basename:r}=M(U.UseBlocker),n=F(j.UseBlocker),[a,o]=i.useState(""),u=i.useCallback(t=>{if("function"!=typeof e)return!!e;if("/"===r)return e(t);let{currentLocation:n,nextLocation:a,historyAction:o}=t;return e({currentLocation:s({},n,{pathname:(0,l.pb)(n.pathname,r)||n.pathname}),nextLocation:s({},a,{pathname:(0,l.pb)(a.pathname,r)||a.pathname}),historyAction:o})},[r,e]);return i.useEffect(()=>{let e=String(++Y);return o(e),()=>t.deleteBlocker(e)},[t]),i.useEffect(()=>{""!==a&&t.getBlocker(a,u)},[t,a,u]),a&&n.blockers.has(a)?n.blockers.get(a):l.G3}let G={},Q=(e,t,r)=>{};function Z(e,t){(null==e?void 0:e.v7_startTransition)===void 0&&Q("v7_startTransition","React Router will begin wrapping state updates in `React.startTransition` in v7","https://reactrouter.com/v6/upgrading/future#v7_starttransition"),(null==e?void 0:e.v7_relativeSplatPath)!==void 0||t&&t.v7_relativeSplatPath||Q("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath"),t&&(void 0===t.v7_fetcherPersist&&Q("v7_fetcherPersist","The persistence behavior of fetchers is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_fetcherpersist"),void 0===t.v7_normalizeFormMethod&&Q("v7_normalizeFormMethod","Casing of `formMethod` fields is being normalized to uppercase in v7","https://reactrouter.com/v6/upgrading/future#v7_normalizeformmethod"),void 0===t.v7_partialHydration&&Q("v7_partialHydration","`RouterProvider` hydration behavior is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_partialhydration"),void 0===t.v7_skipActionErrorRevalidation&&Q("v7_skipActionErrorRevalidation","The revalidation behavior after 4xx/5xx `action` responses is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_skipactionerrorrevalidation"))}let ee=i.startTransition;function et(e){let{basename:t,children:r,initialEntries:n,initialIndex:a,future:o}=e,s=i.useRef();null==s.current&&(s.current=(0,l.sC)({initialEntries:n,initialIndex:a,v5Compat:!0}));let u=s.current,[c,d]=i.useState({action:u.action,location:u.location}),{v7_startTransition:h}=o||{},f=i.useCallback(e=>{h&&ee?ee(()=>d(e)):d(e)},[d,h]);return i.useLayoutEffect(()=>u.listen(f),[u,f]),i.useEffect(()=>Z(o),[o]),i.createElement(eo,{basename:t,children:r,location:c.location,navigationType:c.action,navigator:u,future:o})}function er(e){let{to:t,replace:r,state:n,relative:a}=e;y()||(0,l.Oi)(!1);let{future:o,static:s}=i.useContext(h),{matches:u}=i.useContext(p),{pathname:c}=g(),d=R(),f=JSON.stringify((0,l.Gh)(t,(0,l.yD)(u,o.v7_relativeSplatPath),c,"path"===a));return i.useEffect(()=>d(JSON.parse(f),{replace:r,state:n,relative:a}),[d,f,a,r,n]),null}function en(e){return C(e.context)}function ea(e){(0,l.Oi)(!1)}function eo(e){let{basename:t="/",children:r=null,location:n,navigationType:a=l.rc.Pop,navigator:o,static:u=!1,future:c}=e;y()&&(0,l.Oi)(!1);let d=t.replace(/^\/*/,"/"),p=i.useMemo(()=>({basename:d,navigator:o,static:u,future:s({v7_relativeSplatPath:!1},c)}),[d,c,o,u]);"string"==typeof n&&(n=(0,l.Rr)(n));let{pathname:m="/",search:v="",hash:g="",state:b=null,key:w="default"}=n,E=i.useMemo(()=>{let e=(0,l.pb)(m,d);return null==e?null:{location:{pathname:e,search:v,hash:g,state:b,key:w},navigationType:a}},[d,m,v,g,b,w,a]);return null==E?null:i.createElement(h.Provider,{value:p},i.createElement(f.Provider,{children:r,value:E}))}function ei(e){let{children:t,location:r}=e;return k(eh(t),r)}function el(e){let{children:t,errorElement:r,resolve:n}=e;return i.createElement(ec,{resolve:n,errorElement:r},i.createElement(ed,null,t))}var es=((o=es||{})[o.pending=0]="pending",o[o.success=1]="success",o[o.error=2]="error",o);let eu=new Promise(()=>{});class ec extends i.Component{constructor(e){super(e),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){console.error("<Await> caught the following error during render",e,t)}render(){let{children:e,errorElement:t,resolve:r}=this.props,n=null,a=es.pending;if(r instanceof Promise)if(this.state.error){a=es.error;let e=this.state.error;Object.defineProperty(n=Promise.reject().catch(()=>{}),"_tracked",{get:()=>!0}),Object.defineProperty(n,"_error",{get:()=>e})}else r._tracked?a="_error"in(n=r)?es.error:"_data"in n?es.success:es.pending:(a=es.pending,Object.defineProperty(r,"_tracked",{get:()=>!0}),n=r.then(e=>Object.defineProperty(r,"_data",{get:()=>e}),e=>Object.defineProperty(r,"_error",{get:()=>e})));else a=es.success,Object.defineProperty(n=Promise.resolve(),"_tracked",{get:()=>!0}),Object.defineProperty(n,"_data",{get:()=>r});if(a===es.error&&n._error instanceof l.tH)throw eu;if(a===es.error&&!t)throw n._error;if(a===es.error)return i.createElement(d.Provider,{value:n,children:t});if(a===es.success)return i.createElement(d.Provider,{value:n,children:e});throw n}}function ed(e){let{children:t}=e,r=q(),n="function"==typeof t?t(r):t;return i.createElement(i.Fragment,null,n)}function eh(e,t){void 0===t&&(t=[]);let r=[];return i.Children.forEach(e,(e,n)=>{if(!i.isValidElement(e))return;let a=[...t,n];if(e.type===i.Fragment)return void r.push.apply(r,eh(e.props.children,a));e.type!==ea&&(0,l.Oi)(!1),e.props.index&&e.props.children&&(0,l.Oi)(!1);let o={id:e.props.id||a.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(o.children=eh(e.props.children,a)),r.push(o)}),r}function ef(e){return T(e)}function ep(e){let t={hasErrorBoundary:null!=e.ErrorBoundary||null!=e.errorElement};return e.Component&&Object.assign(t,{element:i.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:i.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:i.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}function em(e,t){return(0,l.aE)({basename:null==t?void 0:t.basename,future:s({},null==t?void 0:t.future,{v7_prependBasename:!0}),history:(0,l.sC)({initialEntries:null==t?void 0:t.initialEntries,initialIndex:null==t?void 0:t.initialIndex}),hydrationData:null==t?void 0:t.hydrationData,routes:e,mapRouteProperties:ep,dataStrategy:null==t?void 0:t.dataStrategy,patchRoutesOnNavigation:null==t?void 0:t.patchRoutesOnNavigation}).initialize()}}}]);