From 8669c7bad9369188e5e18d45e6e6f0346460849a Mon Sep 17 00:00:00 2001 From: Cyril Tovena Date: Thu, 23 Jan 2025 17:35:43 +0100 Subject: [PATCH] Correct bytes unit --- .../dist/assets/{index-DFUF28zy.js => index-CRVeM2vt.js} | 2 +- pkg/dataobj/explorer/dist/index.html | 2 +- pkg/dataobj/explorer/ui/src/utils/format.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename pkg/dataobj/explorer/dist/assets/{index-DFUF28zy.js => index-CRVeM2vt.js} (81%) diff --git a/pkg/dataobj/explorer/dist/assets/index-DFUF28zy.js b/pkg/dataobj/explorer/dist/assets/index-CRVeM2vt.js similarity index 81% rename from pkg/dataobj/explorer/dist/assets/index-DFUF28zy.js rename to pkg/dataobj/explorer/dist/assets/index-CRVeM2vt.js index 6b235b1903d6a..82b713225846e 100644 --- a/pkg/dataobj/explorer/dist/assets/index-DFUF28zy.js +++ b/pkg/dataobj/explorer/dist/assets/index-CRVeM2vt.js @@ -65,4 +65,4 @@ Error generating stack: `+a.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Sl(){return Sl=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[l]=e[l]);return n}function Yy(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Qy(e,t){return e.button===0&&(!t||t==="_self")&&!Yy(e)}function Ko(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(l=>[n,l]):[[n,r]])},[]))}function by(e,t){let n=Ko(e);return t&&t.forEach((r,l)=>{n.has(l)||t.getAll(l).forEach(a=>{n.append(l,a)})}),n}const Xy=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Ky="6";try{window.__reactRouterVersion=Ky}catch{}function Gy(e,t){return ly({basename:t==null?void 0:t.basename,future:Sl({},t==null?void 0:t.future,{v7_prependBasename:!0}),history:Mg({window:t==null?void 0:t.window}),hydrationData:(t==null?void 0:t.hydrationData)||Jy(),routes:e,mapRouteProperties:Hy,dataStrategy:t==null?void 0:t.dataStrategy,patchRoutesOnNavigation:t==null?void 0:t.patchRoutesOnNavigation,window:t==null?void 0:t.window}).initialize()}function Jy(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=Sl({},t,{errors:Zy(t.errors)})),t}function Zy(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,l]of t)if(l&&l.__type==="RouteErrorResponse")n[r]=new Ha(l.status,l.statusText,l.data,l.internal===!0);else if(l&&l.__type==="Error"){if(l.__subType){let a=window[l.__subType];if(typeof a=="function")try{let i=new a(l.message);i.stack="",n[r]=i}catch{}}if(n[r]==null){let a=new Error(l.message);a.stack="",n[r]=a}}else n[r]=l;return n}const qy=N.createContext({isTransitioning:!1}),ev=N.createContext(new Map),tv="startTransition",zc=gp[tv],nv="flushSync",Fc=_g[nv];function rv(e){zc?zc(e):e()}function Wr(e){Fc?Fc(e):e()}class lv{constructor(){this.status="pending",this.promise=new Promise((t,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function av(e){let{fallbackElement:t,router:n,future:r}=e,[l,a]=N.useState(n.state),[i,o]=N.useState(),[u,s]=N.useState({isTransitioning:!1}),[c,f]=N.useState(),[h,k]=N.useState(),[S,v]=N.useState(),P=N.useRef(new Map),{v7_startTransition:p}=r||{},d=N.useCallback(j=>{p?rv(j):j()},[p]),y=N.useCallback((j,B)=>{let{deletedFetchers:U,flushSync:te,viewTransitionOpts:ce}=B;j.fetchers.forEach((ke,Ht)=>{ke.data!==void 0&&P.current.set(Ht,ke.data)}),U.forEach(ke=>P.current.delete(ke));let xe=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!ce||xe){te?Wr(()=>a(j)):d(()=>a(j));return}if(te){Wr(()=>{h&&(c&&c.resolve(),h.skipTransition()),s({isTransitioning:!0,flushSync:!0,currentLocation:ce.currentLocation,nextLocation:ce.nextLocation})});let ke=n.window.document.startViewTransition(()=>{Wr(()=>a(j))});ke.finished.finally(()=>{Wr(()=>{f(void 0),k(void 0),o(void 0),s({isTransitioning:!1})})}),Wr(()=>k(ke));return}h?(c&&c.resolve(),h.skipTransition(),v({state:j,currentLocation:ce.currentLocation,nextLocation:ce.nextLocation})):(o(j),s({isTransitioning:!0,flushSync:!1,currentLocation:ce.currentLocation,nextLocation:ce.nextLocation}))},[n.window,h,c,P,d]);N.useLayoutEffect(()=>n.subscribe(y),[n,y]),N.useEffect(()=>{u.isTransitioning&&!u.flushSync&&f(new lv)},[u]),N.useEffect(()=>{if(c&&i&&n.window){let j=i,B=c.promise,U=n.window.document.startViewTransition(async()=>{d(()=>a(j)),await B});U.finished.finally(()=>{f(void 0),k(void 0),o(void 0),s({isTransitioning:!1})}),k(U)}},[d,i,c,n.window]),N.useEffect(()=>{c&&i&&l.location.key===i.location.key&&c.resolve()},[c,h,l.location,i]),N.useEffect(()=>{!u.isTransitioning&&S&&(o(S.state),s({isTransitioning:!0,flushSync:!1,currentLocation:S.currentLocation,nextLocation:S.nextLocation}),v(void 0))},[u.isTransitioning,S]),N.useEffect(()=>{},[]);let C=N.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:j=>n.navigate(j),push:(j,B,U)=>n.navigate(j,{state:B,preventScrollReset:U==null?void 0:U.preventScrollReset}),replace:(j,B,U)=>n.navigate(j,{replace:!0,state:B,preventScrollReset:U==null?void 0:U.preventScrollReset})}),[n]),R=n.basename||"/",w=N.useMemo(()=>({router:n,navigator:C,static:!1,basename:R}),[n,C,R]),T=N.useMemo(()=>({v7_relativeSplatPath:n.future.v7_relativeSplatPath}),[n.future.v7_relativeSplatPath]);return N.useEffect(()=>Wy(r,n.future),[r,n.future]),N.createElement(N.Fragment,null,N.createElement(di.Provider,{value:w},N.createElement(yh.Provider,{value:l},N.createElement(ev.Provider,{value:P.current},N.createElement(qy.Provider,{value:u},N.createElement($y,{basename:R,location:l.location,navigationType:l.historyAction,navigator:C,future:T},l.initialized||n.future.v7_partialHydration?N.createElement(iv,{routes:n.routes,future:n.future,state:l}):t))))),null)}const iv=N.memo(ov);function ov(e){let{routes:t,future:n,state:r}=e;return Sh(t,void 0,r,n)}const uv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",sv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,rn=N.forwardRef(function(t,n){let{onClick:r,relative:l,reloadDocument:a,replace:i,state:o,target:u,to:s,preventScrollReset:c,viewTransition:f}=t,h=Vy(t,Xy),{basename:k}=N.useContext($n),S,v=!1;if(typeof s=="string"&&sv.test(s)&&(S=s,uv))try{let y=new URL(window.location.href),C=s.startsWith("//")?new URL(y.protocol+s):new URL(s),R=Pr(C.pathname,k);C.origin===y.origin&&R!=null?s=R+C.search+C.hash:v=!0}catch{}let P=Cy(s,{relative:l}),p=cv(s,{replace:i,state:o,target:u,preventScrollReset:c,relative:l,viewTransition:f});function d(y){r&&r(y),y.defaultPrevented||p(y)}return N.createElement("a",Sl({},h,{href:S||P,onClick:v||a?r:d,ref:n,target:u}))});var Ic;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Ic||(Ic={}));var Uc;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Uc||(Uc={}));function cv(e,t){let{target:n,replace:r,state:l,preventScrollReset:a,relative:i,viewTransition:o}=t===void 0?{}:t,u=xh(),s=Rl(),c=kh(e,{relative:i});return N.useCallback(f=>{if(Qy(f,n)){f.preventDefault();let h=r!==void 0?r:Un(s)===Un(c);u(e,{replace:h,state:l,preventScrollReset:a,relative:i,viewTransition:o})}},[s,u,c,r,l,n,e,a,i,o])}function dv(e){let t=N.useRef(Ko(e)),n=N.useRef(!1),r=Rl(),l=N.useMemo(()=>by(r.search,n.current?null:t.current),[r.search]),a=xh(),i=N.useCallback((o,u)=>{const s=Ko(typeof o=="function"?o(l):o);n.current=!0,a("?"+s,u)},[a,l]);return[l,i]}function jt(e){if(e===0)return"0 B";const t=1024,n=["B","KB","MB","GB","TB"],r=Math.floor(Math.log(e)/Math.log(t));return`${(e/Math.pow(t,r)).toFixed(2)} ${n[r]}`}const Ph=6048e5,fv=864e5,na=43200,Bc=1440,Wc=Symbol.for("constructDateFrom");function Wt(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Wc in e?e[Wc](t):e instanceof Date?new e.constructor(t):new Date(t)}function Re(e,t){return Wt(t||e,e)}let hv={};function Tl(){return hv}function El(e,t){var o,u,s,c;const n=Tl(),r=(t==null?void 0:t.weekStartsOn)??((u=(o=t==null?void 0:t.locale)==null?void 0:o.options)==null?void 0:u.weekStartsOn)??n.weekStartsOn??((c=(s=n.locale)==null?void 0:s.options)==null?void 0:c.weekStartsOn)??0,l=Re(e,t==null?void 0:t.in),a=l.getDay(),i=(a=a.getTime()?r+1:n.getTime()>=o.getTime()?r:r-1}function Qa(e){const t=Re(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function hi(e,...t){const n=Wt.bind(null,e||t.find(r=>typeof r=="object"));return t.map(n)}function $c(e,t){const n=Re(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function pv(e,t,n){const[r,l]=hi(n==null?void 0:n.in,e,t),a=$c(r),i=$c(l),o=+a-Qa(a),u=+i-Qa(i);return Math.round((o-u)/fv)}function mv(e,t){const n=Nh(e,t),r=Wt(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Ya(r)}function ya(e,t){const n=+Re(e)-+Re(t);return n<0?-1:n>0?1:n}function gv(e){return Wt(e,Date.now())}function yv(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function vv(e){return!(!yv(e)&&typeof e!="number"||isNaN(+Re(e)))}function wv(e,t,n){const[r,l]=hi(n==null?void 0:n.in,e,t),a=r.getFullYear()-l.getFullYear(),i=r.getMonth()-l.getMonth();return a*12+i}function xv(e){return t=>{const r=(e?Math[e]:Math.trunc)(t);return r===0?0:r}}function kv(e,t){return+Re(e)-+Re(t)}function Sv(e,t){const n=Re(e,t==null?void 0:t.in);return n.setHours(23,59,59,999),n}function Ev(e,t){const n=Re(e,t==null?void 0:t.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function Cv(e,t){const n=Re(e,t==null?void 0:t.in);return+Sv(n,t)==+Ev(n,t)}function Pv(e,t,n){const[r,l,a]=hi(n==null?void 0:n.in,e,e,t),i=ya(l,a),o=Math.abs(wv(l,a));if(o<1)return 0;l.getMonth()===1&&l.getDate()>27&&l.setDate(30),l.setMonth(l.getMonth()-i*o);let u=ya(l,a)===-i;Cv(r)&&o===1&&ya(r,a)===1&&(u=!1);const s=i*(o-+u);return s===0?0:s}function Nv(e,t,n){const r=kv(e,t)/1e3;return xv(n==null?void 0:n.roundingMethod)(r)}function _v(e,t){const n=Re(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const Mv={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},jv=(e,t,n)=>{let r;const l=Mv[e];return typeof l=="string"?r=l:t===1?r=l.one:r=l.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Xi(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Rv={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Tv={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Lv={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Dv={date:Xi({formats:Rv,defaultWidth:"full"}),time:Xi({formats:Tv,defaultWidth:"full"}),dateTime:Xi({formats:Lv,defaultWidth:"full"})},Ov={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},zv=(e,t,n,r)=>Ov[e];function $r(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let l;if(r==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,o=n!=null&&n.width?String(n.width):i;l=e.formattingValues[o]||e.formattingValues[i]}else{const i=e.defaultWidth,o=n!=null&&n.width?String(n.width):e.defaultWidth;l=e.values[o]||e.values[i]}const a=e.argumentCallback?e.argumentCallback(t):t;return l[a]}}const Fv={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Iv={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Uv={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Bv={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Wv={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},$v={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Av=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Hv={ordinalNumber:Av,era:$r({values:Fv,defaultWidth:"wide"}),quarter:$r({values:Iv,defaultWidth:"wide",argumentCallback:e=>e-1}),month:$r({values:Uv,defaultWidth:"wide"}),day:$r({values:Bv,defaultWidth:"wide"}),dayPeriod:$r({values:Wv,defaultWidth:"wide",formattingValues:$v,defaultFormattingWidth:"wide"})};function Ar(e){return(t,n={})=>{const r=n.width,l=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(l);if(!a)return null;const i=a[0],o=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(o)?Yv(o,f=>f.test(i)):Vv(o,f=>f.test(i));let s;s=e.valueCallback?e.valueCallback(u):u,s=n.valueCallback?n.valueCallback(s):s;const c=t.slice(i.length);return{value:s,rest:c}}}function Vv(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Yv(e,t){for(let n=0;n{const r=t.match(e.matchPattern);if(!r)return null;const l=r[0],a=t.match(e.parsePattern);if(!a)return null;let i=e.valueCallback?e.valueCallback(a[0]):a[0];i=n.valueCallback?n.valueCallback(i):i;const o=t.slice(l.length);return{value:i,rest:o}}}const bv=/^(\d+)(th|st|nd|rd)?/i,Xv=/\d+/i,Kv={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Gv={any:[/^b/i,/^(a|c)/i]},Jv={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Zv={any:[/1/i,/2/i,/3/i,/4/i]},qv={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},e0={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},t0={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},n0={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},r0={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},l0={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},a0={ordinalNumber:Qv({matchPattern:bv,parsePattern:Xv,valueCallback:e=>parseInt(e,10)}),era:Ar({matchPatterns:Kv,defaultMatchWidth:"wide",parsePatterns:Gv,defaultParseWidth:"any"}),quarter:Ar({matchPatterns:Jv,defaultMatchWidth:"wide",parsePatterns:Zv,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ar({matchPatterns:qv,defaultMatchWidth:"wide",parsePatterns:e0,defaultParseWidth:"any"}),day:Ar({matchPatterns:t0,defaultMatchWidth:"wide",parsePatterns:n0,defaultParseWidth:"any"}),dayPeriod:Ar({matchPatterns:r0,defaultMatchWidth:"any",parsePatterns:l0,defaultParseWidth:"any"})},_h={code:"en-US",formatDistance:jv,formatLong:Dv,formatRelative:zv,localize:Hv,match:a0,options:{weekStartsOn:0,firstWeekContainsDate:1}};function i0(e,t){const n=Re(e,t==null?void 0:t.in);return pv(n,_v(n))+1}function o0(e,t){const n=Re(e,t==null?void 0:t.in),r=+Ya(n)-+mv(n);return Math.round(r/Ph)+1}function Mh(e,t){var c,f,h,k;const n=Re(e,t==null?void 0:t.in),r=n.getFullYear(),l=Tl(),a=(t==null?void 0:t.firstWeekContainsDate)??((f=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:f.firstWeekContainsDate)??l.firstWeekContainsDate??((k=(h=l.locale)==null?void 0:h.options)==null?void 0:k.firstWeekContainsDate)??1,i=Wt((t==null?void 0:t.in)||e,0);i.setFullYear(r+1,0,a),i.setHours(0,0,0,0);const o=El(i,t),u=Wt((t==null?void 0:t.in)||e,0);u.setFullYear(r,0,a),u.setHours(0,0,0,0);const s=El(u,t);return+n>=+o?r+1:+n>=+s?r:r-1}function u0(e,t){var o,u,s,c;const n=Tl(),r=(t==null?void 0:t.firstWeekContainsDate)??((u=(o=t==null?void 0:t.locale)==null?void 0:o.options)==null?void 0:u.firstWeekContainsDate)??n.firstWeekContainsDate??((c=(s=n.locale)==null?void 0:s.options)==null?void 0:c.firstWeekContainsDate)??1,l=Mh(e,t),a=Wt((t==null?void 0:t.in)||e,0);return a.setFullYear(l,0,r),a.setHours(0,0,0,0),El(a,t)}function s0(e,t){const n=Re(e,t==null?void 0:t.in),r=+El(n,t)-+u0(n,t);return Math.round(r/Ph)+1}function q(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Xt={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return q(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):q(n+1,2)},d(e,t){return q(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return q(e.getHours()%12||12,t.length)},H(e,t){return q(e.getHours(),t.length)},m(e,t){return q(e.getMinutes(),t.length)},s(e,t){return q(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),l=Math.trunc(r*Math.pow(10,n-3));return q(l,t.length)}},Kn={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Ac={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),l=r>0?r:1-r;return n.ordinalNumber(l,{unit:"year"})}return Xt.y(e,t)},Y:function(e,t,n,r){const l=Mh(e,r),a=l>0?l:1-l;if(t==="YY"){const i=a%100;return q(i,2)}return t==="Yo"?n.ordinalNumber(a,{unit:"year"}):q(a,t.length)},R:function(e,t){const n=Nh(e);return q(n,t.length)},u:function(e,t){const n=e.getFullYear();return q(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return q(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return q(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Xt.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return q(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const l=s0(e,r);return t==="wo"?n.ordinalNumber(l,{unit:"week"}):q(l,t.length)},I:function(e,t,n){const r=o0(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):q(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Xt.d(e,t)},D:function(e,t,n){const r=i0(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):q(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const l=e.getDay(),a=(l-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return q(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(l,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(l,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(l,{width:"short",context:"formatting"});case"eeee":default:return n.day(l,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const l=e.getDay(),a=(l-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return q(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(l,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(l,{width:"narrow",context:"standalone"});case"cccccc":return n.day(l,{width:"short",context:"standalone"});case"cccc":default:return n.day(l,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),l=r===0?7:r;switch(t){case"i":return String(l);case"ii":return q(l,t.length);case"io":return n.ordinalNumber(l,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const l=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(l,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(l,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let l;switch(r===12?l=Kn.noon:r===0?l=Kn.midnight:l=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(l,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(l,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let l;switch(r>=17?l=Kn.evening:r>=12?l=Kn.afternoon:r>=4?l=Kn.morning:l=Kn.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(l,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(l,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Xt.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Xt.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):q(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):q(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Xt.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Xt.s(e,t)},S:function(e,t){return Xt.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Vc(r);case"XXXX":case"XX":return Cn(r);case"XXXXX":case"XXX":default:return Cn(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Vc(r);case"xxxx":case"xx":return Cn(r);case"xxxxx":case"xxx":default:return Cn(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Hc(r,":");case"OOOO":default:return"GMT"+Cn(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Hc(r,":");case"zzzz":default:return"GMT"+Cn(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return q(r,t.length)},T:function(e,t,n){return q(+e,t.length)}};function Hc(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),l=Math.trunc(r/60),a=r%60;return a===0?n+String(l):n+String(l)+t+q(a,2)}function Vc(e,t){return e%60===0?(e>0?"-":"+")+q(Math.abs(e)/60,2):Cn(e,t)}function Cn(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),l=q(Math.trunc(r/60),2),a=q(r%60,2);return n+l+t+a}const Yc=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},jh=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},c0=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],l=n[2];if(!l)return Yc(e,t);let a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",Yc(r,t)).replace("{{time}}",jh(l,t))},d0={p:jh,P:c0},f0=/^D+$/,h0=/^Y+$/,p0=["D","DD","YY","YYYY"];function m0(e){return f0.test(e)}function g0(e){return h0.test(e)}function y0(e,t,n){const r=v0(e,t,n);if(console.warn(r),p0.includes(e))throw new RangeError(r)}function v0(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const w0=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,x0=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,k0=/^'([^]*?)'?$/,S0=/''/g,E0=/[a-zA-Z]/;function Qc(e,t,n){var c,f,h,k;const r=Tl(),l=r.locale??_h,a=r.firstWeekContainsDate??((f=(c=r.locale)==null?void 0:c.options)==null?void 0:f.firstWeekContainsDate)??1,i=r.weekStartsOn??((k=(h=r.locale)==null?void 0:h.options)==null?void 0:k.weekStartsOn)??0,o=Re(e,n==null?void 0:n.in);if(!vv(o))throw new RangeError("Invalid time value");let u=t.match(x0).map(S=>{const v=S[0];if(v==="p"||v==="P"){const P=d0[v];return P(S,l.formatLong)}return S}).join("").match(w0).map(S=>{if(S==="''")return{isToken:!1,value:"'"};const v=S[0];if(v==="'")return{isToken:!1,value:C0(S)};if(Ac[v])return{isToken:!0,value:S};if(v.match(E0))throw new RangeError("Format string contains an unescaped latin alphabet character `"+v+"`");return{isToken:!1,value:S}});l.localize.preprocessor&&(u=l.localize.preprocessor(o,u));const s={firstWeekContainsDate:a,weekStartsOn:i,locale:l};return u.map(S=>{if(!S.isToken)return S.value;const v=S.value;(g0(v)||m0(v))&&y0(v,t,String(e));const P=Ac[v[0]];return P(o,v,l.localize,s)}).join("")}function C0(e){const t=e.match(k0);return t?t[1].replace(S0,"'"):e}function P0(e,t,n){const r=Tl(),l=(n==null?void 0:n.locale)??r.locale??_h,a=2520,i=ya(e,t);if(isNaN(i))throw new RangeError("Invalid time value");const o=Object.assign({},n,{addSuffix:n==null?void 0:n.addSuffix,comparison:i}),[u,s]=hi(n==null?void 0:n.in,...i>0?[t,e]:[e,t]),c=Nv(s,u),f=(Qa(s)-Qa(u))/1e3,h=Math.round((c-f)/60);let k;if(h<2)return n!=null&&n.includeSeconds?c<5?l.formatDistance("lessThanXSeconds",5,o):c<10?l.formatDistance("lessThanXSeconds",10,o):c<20?l.formatDistance("lessThanXSeconds",20,o):c<40?l.formatDistance("halfAMinute",0,o):c<60?l.formatDistance("lessThanXMinutes",1,o):l.formatDistance("xMinutes",1,o):h===0?l.formatDistance("lessThanXMinutes",1,o):l.formatDistance("xMinutes",h,o);if(h<45)return l.formatDistance("xMinutes",h,o);if(h<90)return l.formatDistance("aboutXHours",1,o);if(h{const[n,r]=Ne.useState(!1),l=N0(e,{addSuffix:!0}),a=Qc(e,"yyyy-MM-dd HH:mm:ss"),i=Qc(new Date(e.getTime()+e.getTimezoneOffset()*6e4),"yyyy-MM-dd HH:mm:ss"),[o,u]=Ne.useState({top:0,left:0}),s=Ne.useRef(null),c=Ne.useCallback(()=>{if(s.current){const f=s.current.getBoundingClientRect();u({top:f.top+window.scrollY-70,left:f.left+window.scrollX})}},[]);return Ne.useEffect(()=>(n&&(c(),window.addEventListener("scroll",c),window.addEventListener("resize",c)),()=>{window.removeEventListener("scroll",c),window.removeEventListener("resize",c)}),[n,c]),g.jsxs(g.Fragment,{children:[g.jsx("div",{ref:s,className:`inline-block ${t}`,onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),children:l}),n&&si.createPortal(g.jsx("div",{style:{position:"absolute",top:`${o.top}px`,left:`${o.left}px`},className:"z-[9999] min-w-[280px] text-sm text-gray-500 bg-white border border-gray-200 rounded-lg shadow-sm dark:text-gray-400 dark:border-gray-600 dark:bg-gray-800",children:g.jsxs("div",{className:"px-3 py-2 space-y-2",children:[g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx("span",{className:"px-2 py-0.5 text-xs font-medium bg-gray-100 rounded dark:bg-gray-700 w-14 text-center",children:"UTC"}),g.jsx("span",{className:"font-mono",children:i})]}),g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx("span",{className:"px-2 py-0.5 text-xs font-medium bg-gray-100 rounded dark:bg-gray-700 w-14 text-center",children:"Local"}),g.jsx("span",{className:"font-mono",children:a})]})]})}),document.body)]})},Th=N.createContext(void 0);function pi(){const e=N.useContext(Th);if(e===void 0)throw new Error("useBasename must be used within a BasenameProvider");return e.basename}function _0({basename:e,children:t}){return g.jsx(Th.Provider,{value:{basename:e},children:t})}const ra=({compressed:e,uncompressed:t,showVisualization:n=!1})=>{if(e===0||t===0)return g.jsx("span",{className:"dark:text-gray-200",children:"-"});const r=t/e,l=r>1;return g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsxs("div",{className:"font-medium whitespace-nowrap dark:text-gray-200",children:[r.toFixed(1),"x"]}),n&&l&&g.jsx("div",{className:"flex-1 h-2.5 bg-gray-100 dark:bg-gray-600 border border-gray-200 dark:border-gray-500 rounded relative",children:g.jsx("div",{className:"absolute inset-y-0 left-0 bg-blue-600 dark:bg-blue-500 rounded",style:{width:`${e/t*100}%`}})})]})},M0=({metadata:e,filename:t,className:n=""})=>{const[r,l]=N.useState(null),[a,i]=N.useState({});if(e.error)return g.jsxs("div",{className:"p-4 bg-red-100 border border-red-400 text-red-700 rounded",children:["Error: ",e.error]});const o=v=>{l(r===v?null:v)},u=(v,P)=>{const p=`${v}-${P}`;i(d=>({...d,[p]:!d[p]}))},s=e.sections.reduce((v,P)=>v+P.totalCompressedSize,0),c=e.sections.reduce((v,P)=>v+P.totalUncompressedSize,0),f=e.sections.find(v=>v.type==="SECTION_TYPE_STREAMS"),h=e.sections.find(v=>v.type==="SECTION_TYPE_LOGS"),k=f==null?void 0:f.columns.reduce((v,P)=>v+(P.rows_count||0),0),S=h==null?void 0:h.columns.reduce((v,P)=>v+(P.rows_count||0),0);return pi(),g.jsx("div",{className:`space-y-6 p-4 ${n}`,children:g.jsxs("div",{className:"bg-white dark:bg-gray-700 shadow rounded-lg",children:[g.jsxs("div",{className:"p-4 border-b dark:border-gray-700",children:[g.jsxs("div",{className:"flex justify-between items-start mb-4",children:[g.jsxs("div",{children:[g.jsx("h2",{className:"text-lg font-semibold mb-2 dark:text-gray-200",children:"Thor Dataobj File"}),g.jsxs("div",{className:"flex flex-col gap-1",children:[g.jsx("p",{className:"text-sm font-mono dark:text-gray-300",children:t}),e.lastModified&&g.jsxs("div",{className:"text-sm text-gray-500 dark:text-gray-400 flex items-center gap-2",children:[g.jsx("span",{children:"Last modified:"}),g.jsx(Rh,{date:new Date(e.lastModified)})]})]})]}),g.jsx(rn,{to:`/api/download?file=${encodeURIComponent(t)}`,target:"_blank",rel:"noopener noreferrer",className:"px-3 py-1 bg-blue-500 text-white rounded hover:bg-blue-600 text-sm",children:"Download"})]}),g.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[g.jsxs("div",{className:"bg-gray-50 dark:bg-gray-800 p-3 rounded",children:[g.jsx("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Compression"}),g.jsx(ra,{compressed:s,uncompressed:c,showVisualization:!0}),g.jsxs("div",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:[jt(s)," →"," ",jt(c)]})]}),g.jsxs("div",{className:"bg-gray-50 dark:bg-gray-800 p-3 rounded",children:[g.jsx("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Sections"}),g.jsx("div",{className:"font-medium",children:e.sections.length}),g.jsx("div",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:e.sections.map(v=>v.type).join(", ")})]}),k&&g.jsxs("div",{className:"bg-gray-50 dark:bg-gray-800 p-3 rounded",children:[g.jsx("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Stream Count"}),g.jsx("div",{className:"font-medium",children:k.toLocaleString()})]}),S&&g.jsxs("div",{className:"bg-gray-50 dark:bg-gray-800 p-3 rounded",children:[g.jsx("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Log Count"}),g.jsx("div",{className:"font-medium",children:S.toLocaleString()})]})]})]}),g.jsx("div",{className:"divide-y dark:divide-gray-900",children:e.sections.map((v,P)=>g.jsxs("div",{className:"dark:bg-gray-700",children:[g.jsxs("div",{className:"p-4 cursor-pointer flex justify-between items-center hover:bg-gray-50 dark:hover:bg-gray-700",onClick:()=>o(P),children:[g.jsxs("h3",{className:"text-lg font-semibold dark:text-gray-200",children:["Section #",P+1,": ",v.type]}),g.jsx("svg",{className:`w-5 h-5 transform transition-transform duration-700 ${r===P?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M19 9l-7 7-7-7"})})]}),g.jsx("div",{className:`transition-all duration-700 ease-in-out ${r===P?"opacity-100":"opacity-0 hidden"}`,children:g.jsxs("div",{className:"p-4 bg-gray-50 dark:bg-gray-800",children:[g.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4 mb-6",children:[g.jsxs("div",{className:"bg-white dark:bg-gray-700 p-3 rounded",children:[g.jsx("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Compression"}),g.jsx(ra,{compressed:v.totalCompressedSize,uncompressed:v.totalUncompressedSize,showVisualization:!0}),g.jsxs("div",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:[jt(v.totalCompressedSize)," →"," ",jt(v.totalUncompressedSize)]})]}),g.jsxs("div",{className:"bg-white dark:bg-gray-700 p-3 rounded",children:[g.jsx("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Column Count"}),g.jsx("div",{className:"font-medium",children:v.columnCount})]}),g.jsxs("div",{className:"bg-white dark:bg-gray-700 p-3 rounded",children:[g.jsx("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Type"}),g.jsx("div",{className:"font-medium",children:v.type})]})]}),g.jsxs("div",{className:"space-y-4",children:[g.jsxs("h4",{className:"font-medium text-lg mb-4 dark:text-gray-200",children:["Columns (",v.columnCount,")"]}),v.columns.map((p,d)=>g.jsxs("div",{className:"bg-white dark:bg-gray-700 shadow rounded-lg overflow-hidden",children:[g.jsxs("div",{className:"flex justify-between items-center cursor-pointer p-4 border-b dark:border-gray-600 hover:bg-gray-50 dark:hover:bg-gray-600",onClick:()=>u(P,d),children:[g.jsxs("div",{children:[g.jsx("h5",{className:"font-medium text-gray-900 dark:text-gray-200",children:p.name?`${p.name} (${p.type})`:p.type}),g.jsxs("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:["Type: ",p.value_type]})]}),g.jsxs("div",{className:"flex items-center",children:[g.jsxs("div",{className:"text-sm font-medium text-gray-600 dark:text-gray-300 mr-4",children:["Compression: ",p.compression]}),g.jsx("svg",{className:`w-4 h-4 transform transition-transform text-gray-400 ${a[`${P}-${d}`]?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M19 9l-7 7-7-7"})})]})]}),a[`${P}-${d}`]&&g.jsxs("div",{className:"p-4 bg-white dark:bg-gray-700",children:[g.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-6",children:[g.jsxs("div",{className:"bg-gray-50 dark:bg-gray-600 p-3 rounded-lg",children:[g.jsxs("div",{className:"text-gray-500 dark:text-gray-400 mb-1",children:["Compression (",p.compression,")"]}),g.jsx("div",{className:"font-medium whitespace-nowrap",children:g.jsx(ra,{compressed:p.compressed_size,uncompressed:p.uncompressed_size})}),g.jsxs("div",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:[jt(p.compressed_size)," →"," ",jt(p.uncompressed_size)]})]}),g.jsxs("div",{className:"bg-gray-50 dark:bg-gray-600 p-3 rounded-lg",children:[g.jsx("div",{className:"text-gray-500 dark:text-gray-400 mb-1",children:"Rows"}),g.jsx("div",{className:"font-medium",children:p.rows_count.toLocaleString()})]}),g.jsxs("div",{className:"bg-gray-50 dark:bg-gray-600 p-3 rounded-lg",children:[g.jsx("div",{className:"text-gray-500 dark:text-gray-400 mb-1",children:"Values Count"}),g.jsx("div",{className:"font-medium",children:p.values_count.toLocaleString()})]}),g.jsxs("div",{className:"bg-gray-50 dark:bg-gray-600 p-3 rounded-lg",children:[g.jsx("div",{className:"text-gray-500 dark:text-gray-400 mb-1",children:"Offset"}),g.jsx("div",{className:"font-medium",children:jt(p.metadata_offset)})]})]}),p.pages.length>0&&g.jsxs("div",{className:"mt-6",children:[g.jsxs("h6",{className:"font-medium text-sm mb-3 dark:text-gray-200",children:["Pages (",p.pages.length,")"]}),g.jsx("div",{className:"overflow-x-auto rounded-lg border border-gray-200 dark:border-gray-600",children:g.jsxs("table",{className:"min-w-full text-sm",children:[g.jsx("thead",{children:g.jsxs("tr",{className:"bg-gray-50 dark:bg-gray-600 border-b border-gray-200 dark:border-gray-500",children:[g.jsx("th",{className:"text-left p-3 font-medium text-gray-600 dark:text-gray-200",children:"#"}),g.jsx("th",{className:"text-left p-3 font-medium text-gray-600 dark:text-gray-200",children:"Rows"}),g.jsx("th",{className:"text-left p-3 font-medium text-gray-600 dark:text-gray-200",children:"Values"}),g.jsx("th",{className:"text-left p-3 font-medium text-gray-600 dark:text-gray-200",children:"Encoding"}),g.jsx("th",{className:"text-left p-3 font-medium text-gray-600 dark:text-gray-200",children:"Compression"})]})}),g.jsx("tbody",{className:"bg-white dark:bg-gray-700",children:p.pages.map((y,C)=>g.jsxs("tr",{className:"border-t border-gray-100 dark:border-gray-600 hover:bg-gray-50 dark:hover:bg-gray-600",children:[g.jsx("td",{className:"p-3 dark:text-gray-200",children:C+1}),g.jsx("td",{className:"p-3 dark:text-gray-200",children:y.rows_count.toLocaleString()}),g.jsx("td",{className:"p-3 dark:text-gray-200",children:y.values_count.toLocaleString()}),g.jsx("td",{className:"p-3 dark:text-gray-200",children:y.encoding}),g.jsx("td",{className:"p-3",children:g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(ra,{compressed:y.compressed_size,uncompressed:y.uncompressed_size}),g.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:["(",jt(y.compressed_size)," ","→"," ",jt(y.uncompressed_size),")"]})]})})]},C))})]})})]})]})]},d))]})]})})]},P))})]})})},j0=({isDarkMode:e,onToggle:t})=>g.jsx("button",{onClick:t,className:"p-2 rounded-lg bg-gray-200 dark:bg-gray-700 hover:bg-gray-300 dark:hover:bg-gray-600 transition-colors","aria-label":e?"Switch to light mode":"Switch to dark mode",children:e?g.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z"})}):g.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z"})})}),R0=e=>{switch(e){case"S3":return{bg:"bg-orange-100",text:"text-orange-800",darkBg:"dark:bg-orange-900",darkText:"dark:text-orange-300"};case"GCS":return{bg:"bg-blue-100",text:"text-blue-800",darkBg:"dark:bg-blue-900",darkText:"dark:text-blue-300"};case"AZURE":return{bg:"bg-sky-100",text:"text-sky-800",darkBg:"dark:bg-sky-900",darkText:"dark:text-sky-300"};case"SWIFT":return{bg:"bg-red-100",text:"text-red-800",darkBg:"dark:bg-red-900",darkText:"dark:text-red-300"};case"COS":return{bg:"bg-purple-100",text:"text-purple-800",darkBg:"dark:bg-purple-900",darkText:"dark:text-purple-300"};case"ALIYUNOSS":return{bg:"bg-rose-100",text:"text-rose-800",darkBg:"dark:bg-rose-900",darkText:"dark:text-rose-300"};case"OCI":return{bg:"bg-red-100",text:"text-red-800",darkBg:"dark:bg-red-900",darkText:"dark:text-red-300"};case"OBS":return{bg:"bg-cyan-100",text:"text-cyan-800",darkBg:"dark:bg-cyan-900",darkText:"dark:text-cyan-300"};case"FILESYSTEM":return{bg:"bg-green-100",text:"text-green-800",darkBg:"dark:bg-green-900",darkText:"dark:text-green-300"};case"MEMORY":return{bg:"bg-yellow-100",text:"text-yellow-800",darkBg:"dark:bg-yellow-900",darkText:"dark:text-yellow-300"};default:return{bg:"bg-gray-100",text:"text-gray-800",darkBg:"dark:bg-gray-700",darkText:"dark:text-gray-300"}}},T0=({parts:e,isLastPartClickable:t=!1})=>{const[n,r]=Ne.useState(""),l=pi();Ne.useEffect(()=>{fetch(`${l}api/provider`).then(i=>i.json()).then(i=>r(i.provider)).catch(console.error)},[l]);const a=R0(n);return g.jsx("nav",{className:"flex mb-4","aria-label":"Breadcrumb",children:g.jsxs("ol",{className:"inline-flex items-center space-x-1 md:space-x-3",children:[g.jsx("li",{className:"inline-flex items-center",children:n&&g.jsxs(rn,{to:"/",className:`inline-flex items-center h-7 gap-2 px-3 py-1 text-xs font-medium ${a.bg} ${a.text} ${a.darkBg} ${a.darkText} rounded-full hover:ring-2 hover:ring-gray-300 dark:hover:ring-gray-600 transition-all duration-200`,children:[g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",className:"w-4 h-4",fill:"currentColor",children:g.jsx("path",{d:"M575.8 255.5c0 18-15 32.1-32 32.1h-32l.7 160.2c0 2.7-.2 5.4-.5 8.1V472c0 22.1-17.9 40-40 40H456c-1.1 0-2.2 0-3.3-.1c-1.4 .1-2.8 .1-4.2 .1H416 392c-22.1 0-40-17.9-40-40V448 384c0-17.7-14.3-32-32-32H256c-17.7 0-32 14.3-32 32v64 24c0 22.1-17.9 40-40 40H160 128.1c-1.5 0-3-.1-4.5-.2c-1.2 .1-2.4 .2-3.6 .2H104c-22.1 0-40-17.9-40-40V360c0-.9 0-1.9 .1-2.8V287.6H32c-18 0-32-14-32-32.1c0-9 3-17 10-24L266.4 8c7-7 15-8 22-8s15 2 21 7L564.8 231.5c8 7 12 15 11 24z"})}),n]})}),e.map((i,o,u)=>g.jsx("li",{children:g.jsxs("div",{className:"flex items-center",children:[g.jsx("svg",{className:"w-3 h-3 text-gray-400 mx-1","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 6 10",children:g.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"m1 9 4-4-4-4"})}),!t&&o===u.length-1?g.jsx("span",{className:"ml-1 text-sm font-medium text-gray-500 md:ml-2",children:i}):g.jsx(rn,{to:`/?path=${encodeURIComponent(u.slice(0,o+1).join("/"))}`,className:"ml-1 text-sm font-medium text-gray-500 hover:text-blue-600 dark:text-gray-400 dark:hover:text-blue-400 md:ml-2",children:i})]})},o))]})})},L0=()=>{const[e,t]=N.useState(!1);N.useEffect(()=>{const r=()=>{t(window.scrollY>300)};return window.addEventListener("scroll",r),()=>window.removeEventListener("scroll",r)},[]);const n=()=>{window.scrollTo({top:0,behavior:"smooth"})};return e?g.jsx("button",{onClick:n,className:"fixed bottom-8 right-8 bg-blue-500 dark:bg-blue-600 hover:bg-blue-600 dark:hover:bg-blue-700 text-white rounded-full p-3 shadow-lg transition-all duration-300","aria-label":"Back to top",children:g.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M5 10l7-7m0 0l7 7m-7-7v18"})})}):null},Lh=({children:e,breadcrumbParts:t=[],isLastBreadcrumbClickable:n=!0})=>{const[r,l]=N.useState(()=>{const a=localStorage.getItem("theme"),i=window.matchMedia("(prefers-color-scheme: dark)").matches;return a?a==="dark":i});return N.useEffect(()=>{document.documentElement.classList.toggle("dark",r),localStorage.setItem("theme",r?"dark":"light")},[r]),g.jsx("div",{className:`min-h-screen ${r?"dark:bg-gray-900 dark:text-gray-200":"bg-white text-black"}`,children:g.jsxs("div",{className:"container mx-auto px-4 py-8",children:[g.jsxs("div",{className:"flex justify-between items-center mb-6",children:[g.jsx(T0,{parts:t,isLastPartClickable:n}),g.jsx(j0,{isDarkMode:r,onToggle:()=>l(!r)})]}),e,g.jsx(L0,{})]})})},D0=({filePath:e})=>g.jsxs(rn,{to:`/?path=${encodeURIComponent(e?e.split("/").slice(0,-1).join("/"):"")}`,className:"mb-4 p-4 inline-flex items-center text-sm font-medium text-blue-600 dark:text-blue-400 hover:text-blue-800 dark:hover:text-blue-300",children:[g.jsx("svg",{className:"w-4 h-4 mr-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M15 19l-7-7 7-7"})}),"Back to file list"]}),Dh=({fullScreen:e=!1})=>g.jsx("div",{className:`flex items-center justify-center ${e?"min-h-screen":"min-h-[200px]"} dark:bg-gray-900`,children:g.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-t-2 border-b-2 border-blue-500 dark:border-blue-400"})}),Oh=({message:e,fullScreen:t=!1})=>g.jsx("div",{className:`flex items-center justify-center ${t?"min-h-screen":""}`,children:g.jsxs("div",{className:"text-red-500 p-4",children:["Error: ",e]})}),O0=e=>{const[t,n]=Ne.useState(null),[r,l]=Ne.useState(!0),[a,i]=Ne.useState(null),o=pi();return Ne.useEffect(()=>{(async()=>{if(e)try{l(!0);const s=await fetch(`${o}api/inspect?file=${encodeURIComponent(e)}`);if(!s.ok)throw new Error(`Failed to fetch metadata: ${s.statusText}`);const c=await s.json();n(c),i(null)}catch(s){i(s instanceof Error?s.message:"An error occurred")}finally{l(!1)}})()},[e,o]),{metadata:t,loading:r,error:a}},zh=()=>{const{filePath:e}=Ny(),{metadata:t,loading:n,error:r}=O0(e),l=Ne.useMemo(()=>(e||"").split("/").filter(Boolean),[e]);return g.jsx(Lh,{breadcrumbParts:l,isLastBreadcrumbClickable:!1,children:g.jsx("div",{className:"bg-gray-50 dark:bg-gray-800 shadow-md rounded-lg overflow-hidden dark:text-gray-200",children:n?g.jsx(Dh,{}):r?g.jsx(Oh,{message:r}):g.jsxs(g.Fragment,{children:[g.jsx(D0,{filePath:e||""}),t&&e&&g.jsx(M0,{metadata:t,filename:e,className:"dark:bg-gray-800 dark:text-gray-200"})]})})})};function z0(e){if(e===0)return"0 Bytes";const t=1024,n=["Bytes","KB","MB","GB","TB"],r=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/Math.pow(t,r)).toFixed(2))+" "+n[r]}const F0=({current:e,parent:t,files:n,folders:r})=>g.jsxs("div",{className:"bg-white dark:bg-gray-800 shadow-md rounded-lg overflow-hidden",children:[g.jsxs("div",{className:"grid grid-cols-12 bg-gray-50 dark:bg-gray-700 border-b dark:border-gray-600",children:[g.jsx("div",{className:"col-span-5 p-4 font-semibold text-gray-600 dark:text-gray-200",children:"Name"}),g.jsx("div",{className:"col-span-3 p-4 font-semibold text-gray-600 dark:text-gray-200",children:"Last Modified"}),g.jsx("div",{className:"col-span-3 p-4 font-semibold text-gray-600 dark:text-gray-200",children:"Size"}),g.jsx("div",{className:"col-span-1 p-4"})]}),t!==e&&g.jsxs(rn,{to:`/?path=${encodeURIComponent(t)}`,className:"grid grid-cols-12 border-b dark:border-gray-600 cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-700 dark:text-gray-200",children:[g.jsxs("div",{className:"col-span-5 p-4 flex items-center",children:[g.jsx("svg",{className:"w-5 h-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M15 19l-7-7 7-7"})}),".."]}),g.jsx("div",{className:"col-span-3 p-4",children:"-"}),g.jsx("div",{className:"col-span-3 p-4",children:"-"}),g.jsx("div",{className:"col-span-1 p-4"})]}),r.map(l=>g.jsxs(rn,{to:`/?path=${encodeURIComponent(e?`${e}/${l}`:l)}`,className:"grid grid-cols-12 border-b dark:border-gray-600 cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-700 dark:text-gray-200",children:[g.jsxs("div",{className:"col-span-5 p-4 flex items-center",children:[g.jsx("svg",{className:"w-5 h-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"})}),l]}),g.jsx("div",{className:"col-span-3 p-4",children:"-"}),g.jsx("div",{className:"col-span-3 p-4",children:"-"}),g.jsx("div",{className:"col-span-1 p-4"})]},l)),g.jsx("div",{className:"space-y-2",children:n.map(l=>{const a=e?`${e}/${l.name}`:l.name;return g.jsxs("div",{className:"grid grid-cols-12 border-b dark:border-gray-600 hover:bg-gray-50 dark:hover:bg-gray-700 dark:text-gray-200",children:[g.jsxs(rn,{to:`file/${encodeURIComponent(a)}`,className:"col-span-5 p-4 flex items-center",children:[g.jsx("svg",{className:"w-5 h-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"})}),l.name]}),g.jsx("div",{className:"col-span-3 p-4",children:g.jsx(Rh,{date:new Date(l.lastModified)})}),g.jsx("div",{className:"col-span-3 p-4",children:z0(l.size)}),g.jsx("div",{className:"col-span-1 p-4 flex justify-center",children:g.jsx(rn,{to:`/api/download?file=${encodeURIComponent(a)}`,target:"_blank",rel:"noopener noreferrer",className:"text-gray-600 hover:text-blue-600 dark:text-gray-400 dark:hover:text-blue-400",title:"Download file",children:g.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})})})})]},l.name)})})]}),I0=e=>{const[t,n]=Ne.useState(null),[r,l]=Ne.useState(!0),[a,i]=Ne.useState(null),o=pi();return Ne.useEffect(()=>{(async()=>{try{l(!0);const s=await fetch(`${o}api/list?path=${encodeURIComponent(e)}`);if(!s.ok)throw new Error("Failed to fetch data");const c=await s.json();n(c),i(null)}catch(s){i(s instanceof Error?s.message:"An error occurred")}finally{l(!1)}})()},[e,o]),{data:t,loading:r,error:a}},Fh=()=>{const[e]=dv(),t=e.get("path")||"",{data:n,loading:r,error:l}=I0(t),a=Ne.useMemo(()=>((n==null?void 0:n.current)||"").split("/").filter(Boolean),[n==null?void 0:n.current]);return g.jsx(Lh,{breadcrumbParts:a,isLastBreadcrumbClickable:!0,children:g.jsx("div",{className:"relative",style:{overflow:"visible"},children:r?g.jsx(Dh,{fullScreen:!0}):l?g.jsx(Oh,{message:l,fullScreen:!0}):n?g.jsx("div",{className:"relative",style:{overflow:"visible"},children:g.jsx(F0,{current:n.current,parent:n.parent,files:n.files,folders:n.folders})}):null})})};function U0(){return g.jsxs(Ay,{children:[g.jsx(bo,{path:"file/:filePath",element:g.jsx(zh,{})}),g.jsx(bo,{path:"*",element:g.jsx(Fh,{})})]})}const B0=window.location.pathname,Ki=B0.match(/(.*\/dataobj\/explorer\/)/),Ih=(Ki==null?void 0:Ki[1])||"/dataobj/explorer/",W0=Gy([{path:"*",element:g.jsx(U0,{}),children:[{index:!0,element:g.jsx(Fh,{})},{path:"file/:filePath",element:g.jsx(zh,{})}]}],{basename:Ih,future:{v7_relativeSplatPath:!0}});Gi.createRoot(document.getElementById("root")).render(g.jsx(Ne.StrictMode,{children:g.jsx(_0,{basename:Ih,children:g.jsx(av,{router:W0,future:{v7_startTransition:!0}})})})); + */function Sl(){return Sl=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[l]=e[l]);return n}function Yy(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Qy(e,t){return e.button===0&&(!t||t==="_self")&&!Yy(e)}function Ko(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(l=>[n,l]):[[n,r]])},[]))}function by(e,t){let n=Ko(e);return t&&t.forEach((r,l)=>{n.has(l)||t.getAll(l).forEach(a=>{n.append(l,a)})}),n}const Xy=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Ky="6";try{window.__reactRouterVersion=Ky}catch{}function Gy(e,t){return ly({basename:t==null?void 0:t.basename,future:Sl({},t==null?void 0:t.future,{v7_prependBasename:!0}),history:Mg({window:t==null?void 0:t.window}),hydrationData:(t==null?void 0:t.hydrationData)||Jy(),routes:e,mapRouteProperties:Hy,dataStrategy:t==null?void 0:t.dataStrategy,patchRoutesOnNavigation:t==null?void 0:t.patchRoutesOnNavigation,window:t==null?void 0:t.window}).initialize()}function Jy(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=Sl({},t,{errors:Zy(t.errors)})),t}function Zy(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,l]of t)if(l&&l.__type==="RouteErrorResponse")n[r]=new Ha(l.status,l.statusText,l.data,l.internal===!0);else if(l&&l.__type==="Error"){if(l.__subType){let a=window[l.__subType];if(typeof a=="function")try{let i=new a(l.message);i.stack="",n[r]=i}catch{}}if(n[r]==null){let a=new Error(l.message);a.stack="",n[r]=a}}else n[r]=l;return n}const qy=N.createContext({isTransitioning:!1}),ev=N.createContext(new Map),tv="startTransition",zc=gp[tv],nv="flushSync",Fc=_g[nv];function rv(e){zc?zc(e):e()}function Wr(e){Fc?Fc(e):e()}class lv{constructor(){this.status="pending",this.promise=new Promise((t,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function av(e){let{fallbackElement:t,router:n,future:r}=e,[l,a]=N.useState(n.state),[i,o]=N.useState(),[u,s]=N.useState({isTransitioning:!1}),[c,f]=N.useState(),[h,k]=N.useState(),[S,v]=N.useState(),P=N.useRef(new Map),{v7_startTransition:p}=r||{},d=N.useCallback(j=>{p?rv(j):j()},[p]),y=N.useCallback((j,B)=>{let{deletedFetchers:U,flushSync:te,viewTransitionOpts:ce}=B;j.fetchers.forEach((ke,Ht)=>{ke.data!==void 0&&P.current.set(Ht,ke.data)}),U.forEach(ke=>P.current.delete(ke));let xe=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!ce||xe){te?Wr(()=>a(j)):d(()=>a(j));return}if(te){Wr(()=>{h&&(c&&c.resolve(),h.skipTransition()),s({isTransitioning:!0,flushSync:!0,currentLocation:ce.currentLocation,nextLocation:ce.nextLocation})});let ke=n.window.document.startViewTransition(()=>{Wr(()=>a(j))});ke.finished.finally(()=>{Wr(()=>{f(void 0),k(void 0),o(void 0),s({isTransitioning:!1})})}),Wr(()=>k(ke));return}h?(c&&c.resolve(),h.skipTransition(),v({state:j,currentLocation:ce.currentLocation,nextLocation:ce.nextLocation})):(o(j),s({isTransitioning:!0,flushSync:!1,currentLocation:ce.currentLocation,nextLocation:ce.nextLocation}))},[n.window,h,c,P,d]);N.useLayoutEffect(()=>n.subscribe(y),[n,y]),N.useEffect(()=>{u.isTransitioning&&!u.flushSync&&f(new lv)},[u]),N.useEffect(()=>{if(c&&i&&n.window){let j=i,B=c.promise,U=n.window.document.startViewTransition(async()=>{d(()=>a(j)),await B});U.finished.finally(()=>{f(void 0),k(void 0),o(void 0),s({isTransitioning:!1})}),k(U)}},[d,i,c,n.window]),N.useEffect(()=>{c&&i&&l.location.key===i.location.key&&c.resolve()},[c,h,l.location,i]),N.useEffect(()=>{!u.isTransitioning&&S&&(o(S.state),s({isTransitioning:!0,flushSync:!1,currentLocation:S.currentLocation,nextLocation:S.nextLocation}),v(void 0))},[u.isTransitioning,S]),N.useEffect(()=>{},[]);let C=N.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:j=>n.navigate(j),push:(j,B,U)=>n.navigate(j,{state:B,preventScrollReset:U==null?void 0:U.preventScrollReset}),replace:(j,B,U)=>n.navigate(j,{replace:!0,state:B,preventScrollReset:U==null?void 0:U.preventScrollReset})}),[n]),R=n.basename||"/",w=N.useMemo(()=>({router:n,navigator:C,static:!1,basename:R}),[n,C,R]),T=N.useMemo(()=>({v7_relativeSplatPath:n.future.v7_relativeSplatPath}),[n.future.v7_relativeSplatPath]);return N.useEffect(()=>Wy(r,n.future),[r,n.future]),N.createElement(N.Fragment,null,N.createElement(di.Provider,{value:w},N.createElement(yh.Provider,{value:l},N.createElement(ev.Provider,{value:P.current},N.createElement(qy.Provider,{value:u},N.createElement($y,{basename:R,location:l.location,navigationType:l.historyAction,navigator:C,future:T},l.initialized||n.future.v7_partialHydration?N.createElement(iv,{routes:n.routes,future:n.future,state:l}):t))))),null)}const iv=N.memo(ov);function ov(e){let{routes:t,future:n,state:r}=e;return Sh(t,void 0,r,n)}const uv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",sv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,rn=N.forwardRef(function(t,n){let{onClick:r,relative:l,reloadDocument:a,replace:i,state:o,target:u,to:s,preventScrollReset:c,viewTransition:f}=t,h=Vy(t,Xy),{basename:k}=N.useContext($n),S,v=!1;if(typeof s=="string"&&sv.test(s)&&(S=s,uv))try{let y=new URL(window.location.href),C=s.startsWith("//")?new URL(y.protocol+s):new URL(s),R=Pr(C.pathname,k);C.origin===y.origin&&R!=null?s=R+C.search+C.hash:v=!0}catch{}let P=Cy(s,{relative:l}),p=cv(s,{replace:i,state:o,target:u,preventScrollReset:c,relative:l,viewTransition:f});function d(y){r&&r(y),y.defaultPrevented||p(y)}return N.createElement("a",Sl({},h,{href:S||P,onClick:v||a?r:d,ref:n,target:u}))});var Ic;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Ic||(Ic={}));var Uc;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Uc||(Uc={}));function cv(e,t){let{target:n,replace:r,state:l,preventScrollReset:a,relative:i,viewTransition:o}=t===void 0?{}:t,u=xh(),s=Rl(),c=kh(e,{relative:i});return N.useCallback(f=>{if(Qy(f,n)){f.preventDefault();let h=r!==void 0?r:Un(s)===Un(c);u(e,{replace:h,state:l,preventScrollReset:a,relative:i,viewTransition:o})}},[s,u,c,r,l,n,e,a,i,o])}function dv(e){let t=N.useRef(Ko(e)),n=N.useRef(!1),r=Rl(),l=N.useMemo(()=>by(r.search,n.current?null:t.current),[r.search]),a=xh(),i=N.useCallback((o,u)=>{const s=Ko(typeof o=="function"?o(l):o);n.current=!0,a("?"+s,u)},[a,l]);return[l,i]}function jt(e){if(e===0)return"0 B";const t=1024,n=["B","KiB","MiB","GiB","TiB"],r=Math.floor(Math.log(e)/Math.log(t));return`${(e/Math.pow(t,r)).toFixed(2)} ${n[r]}`}const Ph=6048e5,fv=864e5,na=43200,Bc=1440,Wc=Symbol.for("constructDateFrom");function Wt(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Wc in e?e[Wc](t):e instanceof Date?new e.constructor(t):new Date(t)}function Re(e,t){return Wt(t||e,e)}let hv={};function Tl(){return hv}function El(e,t){var o,u,s,c;const n=Tl(),r=(t==null?void 0:t.weekStartsOn)??((u=(o=t==null?void 0:t.locale)==null?void 0:o.options)==null?void 0:u.weekStartsOn)??n.weekStartsOn??((c=(s=n.locale)==null?void 0:s.options)==null?void 0:c.weekStartsOn)??0,l=Re(e,t==null?void 0:t.in),a=l.getDay(),i=(a=a.getTime()?r+1:n.getTime()>=o.getTime()?r:r-1}function Qa(e){const t=Re(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function hi(e,...t){const n=Wt.bind(null,e||t.find(r=>typeof r=="object"));return t.map(n)}function $c(e,t){const n=Re(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function pv(e,t,n){const[r,l]=hi(n==null?void 0:n.in,e,t),a=$c(r),i=$c(l),o=+a-Qa(a),u=+i-Qa(i);return Math.round((o-u)/fv)}function mv(e,t){const n=Nh(e,t),r=Wt(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Ya(r)}function ya(e,t){const n=+Re(e)-+Re(t);return n<0?-1:n>0?1:n}function gv(e){return Wt(e,Date.now())}function yv(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function vv(e){return!(!yv(e)&&typeof e!="number"||isNaN(+Re(e)))}function wv(e,t,n){const[r,l]=hi(n==null?void 0:n.in,e,t),a=r.getFullYear()-l.getFullYear(),i=r.getMonth()-l.getMonth();return a*12+i}function xv(e){return t=>{const r=(e?Math[e]:Math.trunc)(t);return r===0?0:r}}function kv(e,t){return+Re(e)-+Re(t)}function Sv(e,t){const n=Re(e,t==null?void 0:t.in);return n.setHours(23,59,59,999),n}function Ev(e,t){const n=Re(e,t==null?void 0:t.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function Cv(e,t){const n=Re(e,t==null?void 0:t.in);return+Sv(n,t)==+Ev(n,t)}function Pv(e,t,n){const[r,l,a]=hi(n==null?void 0:n.in,e,e,t),i=ya(l,a),o=Math.abs(wv(l,a));if(o<1)return 0;l.getMonth()===1&&l.getDate()>27&&l.setDate(30),l.setMonth(l.getMonth()-i*o);let u=ya(l,a)===-i;Cv(r)&&o===1&&ya(r,a)===1&&(u=!1);const s=i*(o-+u);return s===0?0:s}function Nv(e,t,n){const r=kv(e,t)/1e3;return xv(n==null?void 0:n.roundingMethod)(r)}function _v(e,t){const n=Re(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const Mv={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},jv=(e,t,n)=>{let r;const l=Mv[e];return typeof l=="string"?r=l:t===1?r=l.one:r=l.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Xi(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Rv={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Tv={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Lv={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Dv={date:Xi({formats:Rv,defaultWidth:"full"}),time:Xi({formats:Tv,defaultWidth:"full"}),dateTime:Xi({formats:Lv,defaultWidth:"full"})},Ov={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},zv=(e,t,n,r)=>Ov[e];function $r(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let l;if(r==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,o=n!=null&&n.width?String(n.width):i;l=e.formattingValues[o]||e.formattingValues[i]}else{const i=e.defaultWidth,o=n!=null&&n.width?String(n.width):e.defaultWidth;l=e.values[o]||e.values[i]}const a=e.argumentCallback?e.argumentCallback(t):t;return l[a]}}const Fv={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Iv={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Uv={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Bv={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Wv={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},$v={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Av=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Hv={ordinalNumber:Av,era:$r({values:Fv,defaultWidth:"wide"}),quarter:$r({values:Iv,defaultWidth:"wide",argumentCallback:e=>e-1}),month:$r({values:Uv,defaultWidth:"wide"}),day:$r({values:Bv,defaultWidth:"wide"}),dayPeriod:$r({values:Wv,defaultWidth:"wide",formattingValues:$v,defaultFormattingWidth:"wide"})};function Ar(e){return(t,n={})=>{const r=n.width,l=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(l);if(!a)return null;const i=a[0],o=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(o)?Yv(o,f=>f.test(i)):Vv(o,f=>f.test(i));let s;s=e.valueCallback?e.valueCallback(u):u,s=n.valueCallback?n.valueCallback(s):s;const c=t.slice(i.length);return{value:s,rest:c}}}function Vv(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Yv(e,t){for(let n=0;n{const r=t.match(e.matchPattern);if(!r)return null;const l=r[0],a=t.match(e.parsePattern);if(!a)return null;let i=e.valueCallback?e.valueCallback(a[0]):a[0];i=n.valueCallback?n.valueCallback(i):i;const o=t.slice(l.length);return{value:i,rest:o}}}const bv=/^(\d+)(th|st|nd|rd)?/i,Xv=/\d+/i,Kv={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Gv={any:[/^b/i,/^(a|c)/i]},Jv={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Zv={any:[/1/i,/2/i,/3/i,/4/i]},qv={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},e0={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},t0={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},n0={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},r0={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},l0={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},a0={ordinalNumber:Qv({matchPattern:bv,parsePattern:Xv,valueCallback:e=>parseInt(e,10)}),era:Ar({matchPatterns:Kv,defaultMatchWidth:"wide",parsePatterns:Gv,defaultParseWidth:"any"}),quarter:Ar({matchPatterns:Jv,defaultMatchWidth:"wide",parsePatterns:Zv,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ar({matchPatterns:qv,defaultMatchWidth:"wide",parsePatterns:e0,defaultParseWidth:"any"}),day:Ar({matchPatterns:t0,defaultMatchWidth:"wide",parsePatterns:n0,defaultParseWidth:"any"}),dayPeriod:Ar({matchPatterns:r0,defaultMatchWidth:"any",parsePatterns:l0,defaultParseWidth:"any"})},_h={code:"en-US",formatDistance:jv,formatLong:Dv,formatRelative:zv,localize:Hv,match:a0,options:{weekStartsOn:0,firstWeekContainsDate:1}};function i0(e,t){const n=Re(e,t==null?void 0:t.in);return pv(n,_v(n))+1}function o0(e,t){const n=Re(e,t==null?void 0:t.in),r=+Ya(n)-+mv(n);return Math.round(r/Ph)+1}function Mh(e,t){var c,f,h,k;const n=Re(e,t==null?void 0:t.in),r=n.getFullYear(),l=Tl(),a=(t==null?void 0:t.firstWeekContainsDate)??((f=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:f.firstWeekContainsDate)??l.firstWeekContainsDate??((k=(h=l.locale)==null?void 0:h.options)==null?void 0:k.firstWeekContainsDate)??1,i=Wt((t==null?void 0:t.in)||e,0);i.setFullYear(r+1,0,a),i.setHours(0,0,0,0);const o=El(i,t),u=Wt((t==null?void 0:t.in)||e,0);u.setFullYear(r,0,a),u.setHours(0,0,0,0);const s=El(u,t);return+n>=+o?r+1:+n>=+s?r:r-1}function u0(e,t){var o,u,s,c;const n=Tl(),r=(t==null?void 0:t.firstWeekContainsDate)??((u=(o=t==null?void 0:t.locale)==null?void 0:o.options)==null?void 0:u.firstWeekContainsDate)??n.firstWeekContainsDate??((c=(s=n.locale)==null?void 0:s.options)==null?void 0:c.firstWeekContainsDate)??1,l=Mh(e,t),a=Wt((t==null?void 0:t.in)||e,0);return a.setFullYear(l,0,r),a.setHours(0,0,0,0),El(a,t)}function s0(e,t){const n=Re(e,t==null?void 0:t.in),r=+El(n,t)-+u0(n,t);return Math.round(r/Ph)+1}function q(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Xt={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return q(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):q(n+1,2)},d(e,t){return q(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return q(e.getHours()%12||12,t.length)},H(e,t){return q(e.getHours(),t.length)},m(e,t){return q(e.getMinutes(),t.length)},s(e,t){return q(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),l=Math.trunc(r*Math.pow(10,n-3));return q(l,t.length)}},Kn={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Ac={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),l=r>0?r:1-r;return n.ordinalNumber(l,{unit:"year"})}return Xt.y(e,t)},Y:function(e,t,n,r){const l=Mh(e,r),a=l>0?l:1-l;if(t==="YY"){const i=a%100;return q(i,2)}return t==="Yo"?n.ordinalNumber(a,{unit:"year"}):q(a,t.length)},R:function(e,t){const n=Nh(e);return q(n,t.length)},u:function(e,t){const n=e.getFullYear();return q(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return q(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return q(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Xt.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return q(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const l=s0(e,r);return t==="wo"?n.ordinalNumber(l,{unit:"week"}):q(l,t.length)},I:function(e,t,n){const r=o0(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):q(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Xt.d(e,t)},D:function(e,t,n){const r=i0(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):q(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const l=e.getDay(),a=(l-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return q(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(l,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(l,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(l,{width:"short",context:"formatting"});case"eeee":default:return n.day(l,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const l=e.getDay(),a=(l-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return q(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(l,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(l,{width:"narrow",context:"standalone"});case"cccccc":return n.day(l,{width:"short",context:"standalone"});case"cccc":default:return n.day(l,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),l=r===0?7:r;switch(t){case"i":return String(l);case"ii":return q(l,t.length);case"io":return n.ordinalNumber(l,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const l=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(l,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(l,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let l;switch(r===12?l=Kn.noon:r===0?l=Kn.midnight:l=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(l,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(l,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let l;switch(r>=17?l=Kn.evening:r>=12?l=Kn.afternoon:r>=4?l=Kn.morning:l=Kn.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(l,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(l,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Xt.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Xt.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):q(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):q(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Xt.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Xt.s(e,t)},S:function(e,t){return Xt.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Vc(r);case"XXXX":case"XX":return Cn(r);case"XXXXX":case"XXX":default:return Cn(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Vc(r);case"xxxx":case"xx":return Cn(r);case"xxxxx":case"xxx":default:return Cn(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Hc(r,":");case"OOOO":default:return"GMT"+Cn(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Hc(r,":");case"zzzz":default:return"GMT"+Cn(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return q(r,t.length)},T:function(e,t,n){return q(+e,t.length)}};function Hc(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),l=Math.trunc(r/60),a=r%60;return a===0?n+String(l):n+String(l)+t+q(a,2)}function Vc(e,t){return e%60===0?(e>0?"-":"+")+q(Math.abs(e)/60,2):Cn(e,t)}function Cn(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),l=q(Math.trunc(r/60),2),a=q(r%60,2);return n+l+t+a}const Yc=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},jh=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},c0=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],l=n[2];if(!l)return Yc(e,t);let a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",Yc(r,t)).replace("{{time}}",jh(l,t))},d0={p:jh,P:c0},f0=/^D+$/,h0=/^Y+$/,p0=["D","DD","YY","YYYY"];function m0(e){return f0.test(e)}function g0(e){return h0.test(e)}function y0(e,t,n){const r=v0(e,t,n);if(console.warn(r),p0.includes(e))throw new RangeError(r)}function v0(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const w0=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,x0=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,k0=/^'([^]*?)'?$/,S0=/''/g,E0=/[a-zA-Z]/;function Qc(e,t,n){var c,f,h,k;const r=Tl(),l=r.locale??_h,a=r.firstWeekContainsDate??((f=(c=r.locale)==null?void 0:c.options)==null?void 0:f.firstWeekContainsDate)??1,i=r.weekStartsOn??((k=(h=r.locale)==null?void 0:h.options)==null?void 0:k.weekStartsOn)??0,o=Re(e,n==null?void 0:n.in);if(!vv(o))throw new RangeError("Invalid time value");let u=t.match(x0).map(S=>{const v=S[0];if(v==="p"||v==="P"){const P=d0[v];return P(S,l.formatLong)}return S}).join("").match(w0).map(S=>{if(S==="''")return{isToken:!1,value:"'"};const v=S[0];if(v==="'")return{isToken:!1,value:C0(S)};if(Ac[v])return{isToken:!0,value:S};if(v.match(E0))throw new RangeError("Format string contains an unescaped latin alphabet character `"+v+"`");return{isToken:!1,value:S}});l.localize.preprocessor&&(u=l.localize.preprocessor(o,u));const s={firstWeekContainsDate:a,weekStartsOn:i,locale:l};return u.map(S=>{if(!S.isToken)return S.value;const v=S.value;(g0(v)||m0(v))&&y0(v,t,String(e));const P=Ac[v[0]];return P(o,v,l.localize,s)}).join("")}function C0(e){const t=e.match(k0);return t?t[1].replace(S0,"'"):e}function P0(e,t,n){const r=Tl(),l=(n==null?void 0:n.locale)??r.locale??_h,a=2520,i=ya(e,t);if(isNaN(i))throw new RangeError("Invalid time value");const o=Object.assign({},n,{addSuffix:n==null?void 0:n.addSuffix,comparison:i}),[u,s]=hi(n==null?void 0:n.in,...i>0?[t,e]:[e,t]),c=Nv(s,u),f=(Qa(s)-Qa(u))/1e3,h=Math.round((c-f)/60);let k;if(h<2)return n!=null&&n.includeSeconds?c<5?l.formatDistance("lessThanXSeconds",5,o):c<10?l.formatDistance("lessThanXSeconds",10,o):c<20?l.formatDistance("lessThanXSeconds",20,o):c<40?l.formatDistance("halfAMinute",0,o):c<60?l.formatDistance("lessThanXMinutes",1,o):l.formatDistance("xMinutes",1,o):h===0?l.formatDistance("lessThanXMinutes",1,o):l.formatDistance("xMinutes",h,o);if(h<45)return l.formatDistance("xMinutes",h,o);if(h<90)return l.formatDistance("aboutXHours",1,o);if(h{const[n,r]=Ne.useState(!1),l=N0(e,{addSuffix:!0}),a=Qc(e,"yyyy-MM-dd HH:mm:ss"),i=Qc(new Date(e.getTime()+e.getTimezoneOffset()*6e4),"yyyy-MM-dd HH:mm:ss"),[o,u]=Ne.useState({top:0,left:0}),s=Ne.useRef(null),c=Ne.useCallback(()=>{if(s.current){const f=s.current.getBoundingClientRect();u({top:f.top+window.scrollY-70,left:f.left+window.scrollX})}},[]);return Ne.useEffect(()=>(n&&(c(),window.addEventListener("scroll",c),window.addEventListener("resize",c)),()=>{window.removeEventListener("scroll",c),window.removeEventListener("resize",c)}),[n,c]),g.jsxs(g.Fragment,{children:[g.jsx("div",{ref:s,className:`inline-block ${t}`,onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),children:l}),n&&si.createPortal(g.jsx("div",{style:{position:"absolute",top:`${o.top}px`,left:`${o.left}px`},className:"z-[9999] min-w-[280px] text-sm text-gray-500 bg-white border border-gray-200 rounded-lg shadow-sm dark:text-gray-400 dark:border-gray-600 dark:bg-gray-800",children:g.jsxs("div",{className:"px-3 py-2 space-y-2",children:[g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx("span",{className:"px-2 py-0.5 text-xs font-medium bg-gray-100 rounded dark:bg-gray-700 w-14 text-center",children:"UTC"}),g.jsx("span",{className:"font-mono",children:i})]}),g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx("span",{className:"px-2 py-0.5 text-xs font-medium bg-gray-100 rounded dark:bg-gray-700 w-14 text-center",children:"Local"}),g.jsx("span",{className:"font-mono",children:a})]})]})}),document.body)]})},Th=N.createContext(void 0);function pi(){const e=N.useContext(Th);if(e===void 0)throw new Error("useBasename must be used within a BasenameProvider");return e.basename}function _0({basename:e,children:t}){return g.jsx(Th.Provider,{value:{basename:e},children:t})}const ra=({compressed:e,uncompressed:t,showVisualization:n=!1})=>{if(e===0||t===0)return g.jsx("span",{className:"dark:text-gray-200",children:"-"});const r=t/e,l=r>1;return g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsxs("div",{className:"font-medium whitespace-nowrap dark:text-gray-200",children:[r.toFixed(1),"x"]}),n&&l&&g.jsx("div",{className:"flex-1 h-2.5 bg-gray-100 dark:bg-gray-600 border border-gray-200 dark:border-gray-500 rounded relative",children:g.jsx("div",{className:"absolute inset-y-0 left-0 bg-blue-600 dark:bg-blue-500 rounded",style:{width:`${e/t*100}%`}})})]})},M0=({metadata:e,filename:t,className:n=""})=>{const[r,l]=N.useState(null),[a,i]=N.useState({});if(e.error)return g.jsxs("div",{className:"p-4 bg-red-100 border border-red-400 text-red-700 rounded",children:["Error: ",e.error]});const o=v=>{l(r===v?null:v)},u=(v,P)=>{const p=`${v}-${P}`;i(d=>({...d,[p]:!d[p]}))},s=e.sections.reduce((v,P)=>v+P.totalCompressedSize,0),c=e.sections.reduce((v,P)=>v+P.totalUncompressedSize,0),f=e.sections.find(v=>v.type==="SECTION_TYPE_STREAMS"),h=e.sections.find(v=>v.type==="SECTION_TYPE_LOGS"),k=f==null?void 0:f.columns.reduce((v,P)=>v+(P.rows_count||0),0),S=h==null?void 0:h.columns.reduce((v,P)=>v+(P.rows_count||0),0);return pi(),g.jsx("div",{className:`space-y-6 p-4 ${n}`,children:g.jsxs("div",{className:"bg-white dark:bg-gray-700 shadow rounded-lg",children:[g.jsxs("div",{className:"p-4 border-b dark:border-gray-700",children:[g.jsxs("div",{className:"flex justify-between items-start mb-4",children:[g.jsxs("div",{children:[g.jsx("h2",{className:"text-lg font-semibold mb-2 dark:text-gray-200",children:"Thor Dataobj File"}),g.jsxs("div",{className:"flex flex-col gap-1",children:[g.jsx("p",{className:"text-sm font-mono dark:text-gray-300",children:t}),e.lastModified&&g.jsxs("div",{className:"text-sm text-gray-500 dark:text-gray-400 flex items-center gap-2",children:[g.jsx("span",{children:"Last modified:"}),g.jsx(Rh,{date:new Date(e.lastModified)})]})]})]}),g.jsx(rn,{to:`/api/download?file=${encodeURIComponent(t)}`,target:"_blank",rel:"noopener noreferrer",className:"px-3 py-1 bg-blue-500 text-white rounded hover:bg-blue-600 text-sm",children:"Download"})]}),g.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[g.jsxs("div",{className:"bg-gray-50 dark:bg-gray-800 p-3 rounded",children:[g.jsx("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Compression"}),g.jsx(ra,{compressed:s,uncompressed:c,showVisualization:!0}),g.jsxs("div",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:[jt(s)," →"," ",jt(c)]})]}),g.jsxs("div",{className:"bg-gray-50 dark:bg-gray-800 p-3 rounded",children:[g.jsx("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Sections"}),g.jsx("div",{className:"font-medium",children:e.sections.length}),g.jsx("div",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:e.sections.map(v=>v.type).join(", ")})]}),k&&g.jsxs("div",{className:"bg-gray-50 dark:bg-gray-800 p-3 rounded",children:[g.jsx("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Stream Count"}),g.jsx("div",{className:"font-medium",children:k.toLocaleString()})]}),S&&g.jsxs("div",{className:"bg-gray-50 dark:bg-gray-800 p-3 rounded",children:[g.jsx("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Log Count"}),g.jsx("div",{className:"font-medium",children:S.toLocaleString()})]})]})]}),g.jsx("div",{className:"divide-y dark:divide-gray-900",children:e.sections.map((v,P)=>g.jsxs("div",{className:"dark:bg-gray-700",children:[g.jsxs("div",{className:"p-4 cursor-pointer flex justify-between items-center hover:bg-gray-50 dark:hover:bg-gray-700",onClick:()=>o(P),children:[g.jsxs("h3",{className:"text-lg font-semibold dark:text-gray-200",children:["Section #",P+1,": ",v.type]}),g.jsx("svg",{className:`w-5 h-5 transform transition-transform duration-700 ${r===P?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M19 9l-7 7-7-7"})})]}),g.jsx("div",{className:`transition-all duration-700 ease-in-out ${r===P?"opacity-100":"opacity-0 hidden"}`,children:g.jsxs("div",{className:"p-4 bg-gray-50 dark:bg-gray-800",children:[g.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4 mb-6",children:[g.jsxs("div",{className:"bg-white dark:bg-gray-700 p-3 rounded",children:[g.jsx("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Compression"}),g.jsx(ra,{compressed:v.totalCompressedSize,uncompressed:v.totalUncompressedSize,showVisualization:!0}),g.jsxs("div",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:[jt(v.totalCompressedSize)," →"," ",jt(v.totalUncompressedSize)]})]}),g.jsxs("div",{className:"bg-white dark:bg-gray-700 p-3 rounded",children:[g.jsx("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Column Count"}),g.jsx("div",{className:"font-medium",children:v.columnCount})]}),g.jsxs("div",{className:"bg-white dark:bg-gray-700 p-3 rounded",children:[g.jsx("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Type"}),g.jsx("div",{className:"font-medium",children:v.type})]})]}),g.jsxs("div",{className:"space-y-4",children:[g.jsxs("h4",{className:"font-medium text-lg mb-4 dark:text-gray-200",children:["Columns (",v.columnCount,")"]}),v.columns.map((p,d)=>g.jsxs("div",{className:"bg-white dark:bg-gray-700 shadow rounded-lg overflow-hidden",children:[g.jsxs("div",{className:"flex justify-between items-center cursor-pointer p-4 border-b dark:border-gray-600 hover:bg-gray-50 dark:hover:bg-gray-600",onClick:()=>u(P,d),children:[g.jsxs("div",{children:[g.jsx("h5",{className:"font-medium text-gray-900 dark:text-gray-200",children:p.name?`${p.name} (${p.type})`:p.type}),g.jsxs("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:["Type: ",p.value_type]})]}),g.jsxs("div",{className:"flex items-center",children:[g.jsxs("div",{className:"text-sm font-medium text-gray-600 dark:text-gray-300 mr-4",children:["Compression: ",p.compression]}),g.jsx("svg",{className:`w-4 h-4 transform transition-transform text-gray-400 ${a[`${P}-${d}`]?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M19 9l-7 7-7-7"})})]})]}),a[`${P}-${d}`]&&g.jsxs("div",{className:"p-4 bg-white dark:bg-gray-700",children:[g.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-6",children:[g.jsxs("div",{className:"bg-gray-50 dark:bg-gray-600 p-3 rounded-lg",children:[g.jsxs("div",{className:"text-gray-500 dark:text-gray-400 mb-1",children:["Compression (",p.compression,")"]}),g.jsx("div",{className:"font-medium whitespace-nowrap",children:g.jsx(ra,{compressed:p.compressed_size,uncompressed:p.uncompressed_size})}),g.jsxs("div",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:[jt(p.compressed_size)," →"," ",jt(p.uncompressed_size)]})]}),g.jsxs("div",{className:"bg-gray-50 dark:bg-gray-600 p-3 rounded-lg",children:[g.jsx("div",{className:"text-gray-500 dark:text-gray-400 mb-1",children:"Rows"}),g.jsx("div",{className:"font-medium",children:p.rows_count.toLocaleString()})]}),g.jsxs("div",{className:"bg-gray-50 dark:bg-gray-600 p-3 rounded-lg",children:[g.jsx("div",{className:"text-gray-500 dark:text-gray-400 mb-1",children:"Values Count"}),g.jsx("div",{className:"font-medium",children:p.values_count.toLocaleString()})]}),g.jsxs("div",{className:"bg-gray-50 dark:bg-gray-600 p-3 rounded-lg",children:[g.jsx("div",{className:"text-gray-500 dark:text-gray-400 mb-1",children:"Offset"}),g.jsx("div",{className:"font-medium",children:jt(p.metadata_offset)})]})]}),p.pages.length>0&&g.jsxs("div",{className:"mt-6",children:[g.jsxs("h6",{className:"font-medium text-sm mb-3 dark:text-gray-200",children:["Pages (",p.pages.length,")"]}),g.jsx("div",{className:"overflow-x-auto rounded-lg border border-gray-200 dark:border-gray-600",children:g.jsxs("table",{className:"min-w-full text-sm",children:[g.jsx("thead",{children:g.jsxs("tr",{className:"bg-gray-50 dark:bg-gray-600 border-b border-gray-200 dark:border-gray-500",children:[g.jsx("th",{className:"text-left p-3 font-medium text-gray-600 dark:text-gray-200",children:"#"}),g.jsx("th",{className:"text-left p-3 font-medium text-gray-600 dark:text-gray-200",children:"Rows"}),g.jsx("th",{className:"text-left p-3 font-medium text-gray-600 dark:text-gray-200",children:"Values"}),g.jsx("th",{className:"text-left p-3 font-medium text-gray-600 dark:text-gray-200",children:"Encoding"}),g.jsx("th",{className:"text-left p-3 font-medium text-gray-600 dark:text-gray-200",children:"Compression"})]})}),g.jsx("tbody",{className:"bg-white dark:bg-gray-700",children:p.pages.map((y,C)=>g.jsxs("tr",{className:"border-t border-gray-100 dark:border-gray-600 hover:bg-gray-50 dark:hover:bg-gray-600",children:[g.jsx("td",{className:"p-3 dark:text-gray-200",children:C+1}),g.jsx("td",{className:"p-3 dark:text-gray-200",children:y.rows_count.toLocaleString()}),g.jsx("td",{className:"p-3 dark:text-gray-200",children:y.values_count.toLocaleString()}),g.jsx("td",{className:"p-3 dark:text-gray-200",children:y.encoding}),g.jsx("td",{className:"p-3",children:g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(ra,{compressed:y.compressed_size,uncompressed:y.uncompressed_size}),g.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:["(",jt(y.compressed_size)," ","→"," ",jt(y.uncompressed_size),")"]})]})})]},C))})]})})]})]})]},d))]})]})})]},P))})]})})},j0=({isDarkMode:e,onToggle:t})=>g.jsx("button",{onClick:t,className:"p-2 rounded-lg bg-gray-200 dark:bg-gray-700 hover:bg-gray-300 dark:hover:bg-gray-600 transition-colors","aria-label":e?"Switch to light mode":"Switch to dark mode",children:e?g.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z"})}):g.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z"})})}),R0=e=>{switch(e){case"S3":return{bg:"bg-orange-100",text:"text-orange-800",darkBg:"dark:bg-orange-900",darkText:"dark:text-orange-300"};case"GCS":return{bg:"bg-blue-100",text:"text-blue-800",darkBg:"dark:bg-blue-900",darkText:"dark:text-blue-300"};case"AZURE":return{bg:"bg-sky-100",text:"text-sky-800",darkBg:"dark:bg-sky-900",darkText:"dark:text-sky-300"};case"SWIFT":return{bg:"bg-red-100",text:"text-red-800",darkBg:"dark:bg-red-900",darkText:"dark:text-red-300"};case"COS":return{bg:"bg-purple-100",text:"text-purple-800",darkBg:"dark:bg-purple-900",darkText:"dark:text-purple-300"};case"ALIYUNOSS":return{bg:"bg-rose-100",text:"text-rose-800",darkBg:"dark:bg-rose-900",darkText:"dark:text-rose-300"};case"OCI":return{bg:"bg-red-100",text:"text-red-800",darkBg:"dark:bg-red-900",darkText:"dark:text-red-300"};case"OBS":return{bg:"bg-cyan-100",text:"text-cyan-800",darkBg:"dark:bg-cyan-900",darkText:"dark:text-cyan-300"};case"FILESYSTEM":return{bg:"bg-green-100",text:"text-green-800",darkBg:"dark:bg-green-900",darkText:"dark:text-green-300"};case"MEMORY":return{bg:"bg-yellow-100",text:"text-yellow-800",darkBg:"dark:bg-yellow-900",darkText:"dark:text-yellow-300"};default:return{bg:"bg-gray-100",text:"text-gray-800",darkBg:"dark:bg-gray-700",darkText:"dark:text-gray-300"}}},T0=({parts:e,isLastPartClickable:t=!1})=>{const[n,r]=Ne.useState(""),l=pi();Ne.useEffect(()=>{fetch(`${l}api/provider`).then(i=>i.json()).then(i=>r(i.provider)).catch(console.error)},[l]);const a=R0(n);return g.jsx("nav",{className:"flex mb-4","aria-label":"Breadcrumb",children:g.jsxs("ol",{className:"inline-flex items-center space-x-1 md:space-x-3",children:[g.jsx("li",{className:"inline-flex items-center",children:n&&g.jsxs(rn,{to:"/",className:`inline-flex items-center h-7 gap-2 px-3 py-1 text-xs font-medium ${a.bg} ${a.text} ${a.darkBg} ${a.darkText} rounded-full hover:ring-2 hover:ring-gray-300 dark:hover:ring-gray-600 transition-all duration-200`,children:[g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",className:"w-4 h-4",fill:"currentColor",children:g.jsx("path",{d:"M575.8 255.5c0 18-15 32.1-32 32.1h-32l.7 160.2c0 2.7-.2 5.4-.5 8.1V472c0 22.1-17.9 40-40 40H456c-1.1 0-2.2 0-3.3-.1c-1.4 .1-2.8 .1-4.2 .1H416 392c-22.1 0-40-17.9-40-40V448 384c0-17.7-14.3-32-32-32H256c-17.7 0-32 14.3-32 32v64 24c0 22.1-17.9 40-40 40H160 128.1c-1.5 0-3-.1-4.5-.2c-1.2 .1-2.4 .2-3.6 .2H104c-22.1 0-40-17.9-40-40V360c0-.9 0-1.9 .1-2.8V287.6H32c-18 0-32-14-32-32.1c0-9 3-17 10-24L266.4 8c7-7 15-8 22-8s15 2 21 7L564.8 231.5c8 7 12 15 11 24z"})}),n]})}),e.map((i,o,u)=>g.jsx("li",{children:g.jsxs("div",{className:"flex items-center",children:[g.jsx("svg",{className:"w-3 h-3 text-gray-400 mx-1","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 6 10",children:g.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"m1 9 4-4-4-4"})}),!t&&o===u.length-1?g.jsx("span",{className:"ml-1 text-sm font-medium text-gray-500 md:ml-2",children:i}):g.jsx(rn,{to:`/?path=${encodeURIComponent(u.slice(0,o+1).join("/"))}`,className:"ml-1 text-sm font-medium text-gray-500 hover:text-blue-600 dark:text-gray-400 dark:hover:text-blue-400 md:ml-2",children:i})]})},o))]})})},L0=()=>{const[e,t]=N.useState(!1);N.useEffect(()=>{const r=()=>{t(window.scrollY>300)};return window.addEventListener("scroll",r),()=>window.removeEventListener("scroll",r)},[]);const n=()=>{window.scrollTo({top:0,behavior:"smooth"})};return e?g.jsx("button",{onClick:n,className:"fixed bottom-8 right-8 bg-blue-500 dark:bg-blue-600 hover:bg-blue-600 dark:hover:bg-blue-700 text-white rounded-full p-3 shadow-lg transition-all duration-300","aria-label":"Back to top",children:g.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M5 10l7-7m0 0l7 7m-7-7v18"})})}):null},Lh=({children:e,breadcrumbParts:t=[],isLastBreadcrumbClickable:n=!0})=>{const[r,l]=N.useState(()=>{const a=localStorage.getItem("theme"),i=window.matchMedia("(prefers-color-scheme: dark)").matches;return a?a==="dark":i});return N.useEffect(()=>{document.documentElement.classList.toggle("dark",r),localStorage.setItem("theme",r?"dark":"light")},[r]),g.jsx("div",{className:`min-h-screen ${r?"dark:bg-gray-900 dark:text-gray-200":"bg-white text-black"}`,children:g.jsxs("div",{className:"container mx-auto px-4 py-8",children:[g.jsxs("div",{className:"flex justify-between items-center mb-6",children:[g.jsx(T0,{parts:t,isLastPartClickable:n}),g.jsx(j0,{isDarkMode:r,onToggle:()=>l(!r)})]}),e,g.jsx(L0,{})]})})},D0=({filePath:e})=>g.jsxs(rn,{to:`/?path=${encodeURIComponent(e?e.split("/").slice(0,-1).join("/"):"")}`,className:"mb-4 p-4 inline-flex items-center text-sm font-medium text-blue-600 dark:text-blue-400 hover:text-blue-800 dark:hover:text-blue-300",children:[g.jsx("svg",{className:"w-4 h-4 mr-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M15 19l-7-7 7-7"})}),"Back to file list"]}),Dh=({fullScreen:e=!1})=>g.jsx("div",{className:`flex items-center justify-center ${e?"min-h-screen":"min-h-[200px]"} dark:bg-gray-900`,children:g.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-t-2 border-b-2 border-blue-500 dark:border-blue-400"})}),Oh=({message:e,fullScreen:t=!1})=>g.jsx("div",{className:`flex items-center justify-center ${t?"min-h-screen":""}`,children:g.jsxs("div",{className:"text-red-500 p-4",children:["Error: ",e]})}),O0=e=>{const[t,n]=Ne.useState(null),[r,l]=Ne.useState(!0),[a,i]=Ne.useState(null),o=pi();return Ne.useEffect(()=>{(async()=>{if(e)try{l(!0);const s=await fetch(`${o}api/inspect?file=${encodeURIComponent(e)}`);if(!s.ok)throw new Error(`Failed to fetch metadata: ${s.statusText}`);const c=await s.json();n(c),i(null)}catch(s){i(s instanceof Error?s.message:"An error occurred")}finally{l(!1)}})()},[e,o]),{metadata:t,loading:r,error:a}},zh=()=>{const{filePath:e}=Ny(),{metadata:t,loading:n,error:r}=O0(e),l=Ne.useMemo(()=>(e||"").split("/").filter(Boolean),[e]);return g.jsx(Lh,{breadcrumbParts:l,isLastBreadcrumbClickable:!1,children:g.jsx("div",{className:"bg-gray-50 dark:bg-gray-800 shadow-md rounded-lg overflow-hidden dark:text-gray-200",children:n?g.jsx(Dh,{}):r?g.jsx(Oh,{message:r}):g.jsxs(g.Fragment,{children:[g.jsx(D0,{filePath:e||""}),t&&e&&g.jsx(M0,{metadata:t,filename:e,className:"dark:bg-gray-800 dark:text-gray-200"})]})})})};function z0(e){if(e===0)return"0 Bytes";const t=1024,n=["Bytes","KB","MB","GB","TB"],r=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/Math.pow(t,r)).toFixed(2))+" "+n[r]}const F0=({current:e,parent:t,files:n,folders:r})=>g.jsxs("div",{className:"bg-white dark:bg-gray-800 shadow-md rounded-lg overflow-hidden",children:[g.jsxs("div",{className:"grid grid-cols-12 bg-gray-50 dark:bg-gray-700 border-b dark:border-gray-600",children:[g.jsx("div",{className:"col-span-5 p-4 font-semibold text-gray-600 dark:text-gray-200",children:"Name"}),g.jsx("div",{className:"col-span-3 p-4 font-semibold text-gray-600 dark:text-gray-200",children:"Last Modified"}),g.jsx("div",{className:"col-span-3 p-4 font-semibold text-gray-600 dark:text-gray-200",children:"Size"}),g.jsx("div",{className:"col-span-1 p-4"})]}),t!==e&&g.jsxs(rn,{to:`/?path=${encodeURIComponent(t)}`,className:"grid grid-cols-12 border-b dark:border-gray-600 cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-700 dark:text-gray-200",children:[g.jsxs("div",{className:"col-span-5 p-4 flex items-center",children:[g.jsx("svg",{className:"w-5 h-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M15 19l-7-7 7-7"})}),".."]}),g.jsx("div",{className:"col-span-3 p-4",children:"-"}),g.jsx("div",{className:"col-span-3 p-4",children:"-"}),g.jsx("div",{className:"col-span-1 p-4"})]}),r.map(l=>g.jsxs(rn,{to:`/?path=${encodeURIComponent(e?`${e}/${l}`:l)}`,className:"grid grid-cols-12 border-b dark:border-gray-600 cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-700 dark:text-gray-200",children:[g.jsxs("div",{className:"col-span-5 p-4 flex items-center",children:[g.jsx("svg",{className:"w-5 h-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"})}),l]}),g.jsx("div",{className:"col-span-3 p-4",children:"-"}),g.jsx("div",{className:"col-span-3 p-4",children:"-"}),g.jsx("div",{className:"col-span-1 p-4"})]},l)),g.jsx("div",{className:"space-y-2",children:n.map(l=>{const a=e?`${e}/${l.name}`:l.name;return g.jsxs("div",{className:"grid grid-cols-12 border-b dark:border-gray-600 hover:bg-gray-50 dark:hover:bg-gray-700 dark:text-gray-200",children:[g.jsxs(rn,{to:`file/${encodeURIComponent(a)}`,className:"col-span-5 p-4 flex items-center",children:[g.jsx("svg",{className:"w-5 h-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"})}),l.name]}),g.jsx("div",{className:"col-span-3 p-4",children:g.jsx(Rh,{date:new Date(l.lastModified)})}),g.jsx("div",{className:"col-span-3 p-4",children:z0(l.size)}),g.jsx("div",{className:"col-span-1 p-4 flex justify-center",children:g.jsx(rn,{to:`/api/download?file=${encodeURIComponent(a)}`,target:"_blank",rel:"noopener noreferrer",className:"text-gray-600 hover:text-blue-600 dark:text-gray-400 dark:hover:text-blue-400",title:"Download file",children:g.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})})})})]},l.name)})})]}),I0=e=>{const[t,n]=Ne.useState(null),[r,l]=Ne.useState(!0),[a,i]=Ne.useState(null),o=pi();return Ne.useEffect(()=>{(async()=>{try{l(!0);const s=await fetch(`${o}api/list?path=${encodeURIComponent(e)}`);if(!s.ok)throw new Error("Failed to fetch data");const c=await s.json();n(c),i(null)}catch(s){i(s instanceof Error?s.message:"An error occurred")}finally{l(!1)}})()},[e,o]),{data:t,loading:r,error:a}},Fh=()=>{const[e]=dv(),t=e.get("path")||"",{data:n,loading:r,error:l}=I0(t),a=Ne.useMemo(()=>((n==null?void 0:n.current)||"").split("/").filter(Boolean),[n==null?void 0:n.current]);return g.jsx(Lh,{breadcrumbParts:a,isLastBreadcrumbClickable:!0,children:g.jsx("div",{className:"relative",style:{overflow:"visible"},children:r?g.jsx(Dh,{fullScreen:!0}):l?g.jsx(Oh,{message:l,fullScreen:!0}):n?g.jsx("div",{className:"relative",style:{overflow:"visible"},children:g.jsx(F0,{current:n.current,parent:n.parent,files:n.files,folders:n.folders})}):null})})};function U0(){return g.jsxs(Ay,{children:[g.jsx(bo,{path:"file/:filePath",element:g.jsx(zh,{})}),g.jsx(bo,{path:"*",element:g.jsx(Fh,{})})]})}const B0=window.location.pathname,Ki=B0.match(/(.*\/dataobj\/explorer\/)/),Ih=(Ki==null?void 0:Ki[1])||"/dataobj/explorer/",W0=Gy([{path:"*",element:g.jsx(U0,{}),children:[{index:!0,element:g.jsx(Fh,{})},{path:"file/:filePath",element:g.jsx(zh,{})}]}],{basename:Ih,future:{v7_relativeSplatPath:!0}});Gi.createRoot(document.getElementById("root")).render(g.jsx(Ne.StrictMode,{children:g.jsx(_0,{basename:Ih,children:g.jsx(av,{router:W0,future:{v7_startTransition:!0}})})})); diff --git a/pkg/dataobj/explorer/dist/index.html b/pkg/dataobj/explorer/dist/index.html index a3fea63a0bb28..d645838aff8f1 100644 --- a/pkg/dataobj/explorer/dist/index.html +++ b/pkg/dataobj/explorer/dist/index.html @@ -5,7 +5,7 @@ DataObj Explorer - + diff --git a/pkg/dataobj/explorer/ui/src/utils/format.ts b/pkg/dataobj/explorer/ui/src/utils/format.ts index d7e3e208dd0f3..348dde3359588 100644 --- a/pkg/dataobj/explorer/ui/src/utils/format.ts +++ b/pkg/dataobj/explorer/ui/src/utils/format.ts @@ -2,7 +2,7 @@ export function formatBytes(bytes: number): string { if (bytes === 0) return "0 B"; const k = 1024; - const sizes = ["B", "KB", "MB", "GB", "TB"]; + const sizes = ["B", "KiB", "MiB", "GiB", "TiB"]; const i = Math.floor(Math.log(bytes) / Math.log(k)); return `${(bytes / Math.pow(k, i)).toFixed(2)} ${sizes[i]}`;