efficient-shell 13.6.0 → 13.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/{Browser-C35LEPPI.js → Browser-RDE3RBBK.js} +13 -13
- package/dist/{Files-LBIF3W3O.js → Files-SPICA5IO.js} +128 -128
- package/dist/{Notepad-XLG7G5IZ.js → Notepad-CFK5MJDE.js} +9 -9
- package/dist/{Preview-IYNPMZCR.js → Preview-CBYMPKY2.js} +10 -10
- package/dist/{Sidebar-YY5B36WZ.js → Sidebar-7SHI7P5Z.js} +1 -1
- package/dist/{TimelineTrack-DfU_9eo6.d.ts → TimelineTrack-DCTqfW6Z.d.ts} +13 -0
- package/dist/ai/index.js +32 -32
- package/dist/apps/index.js +1 -1
- package/dist/bin/browser-check.js +1 -1
- package/dist/bin/media-host-check.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/brand.css +1 -1
- package/dist/charts/PieChart.js +1 -1
- package/dist/charts/RadarChart.js +1 -1
- package/dist/charts/RadialBarChart.js +1 -1
- package/dist/charts/SpecChart.js +1 -1
- package/dist/charts/TimeSeriesChart.js +1 -1
- package/dist/chunk-4C7YUXDI.js +15 -0
- package/dist/{chunk-R3R6ZJNW.js → chunk-767USLF5.js} +6 -6
- package/dist/{chunk-4OKZXAQN.js → chunk-77HMTXDR.js} +2 -2
- package/dist/{chunk-IWNQPPJ7.js → chunk-AOZZ2LEL.js} +1 -1
- package/dist/{chunk-OZV5P5A7.js → chunk-DGFFDZCY.js} +5 -5
- package/dist/{chunk-CUJA3HBZ.js → chunk-DYOFTZOC.js} +2 -2
- package/dist/{chunk-O5UD3ZWM.js → chunk-E6PDAYBR.js} +4 -4
- package/dist/{chunk-UF76AFFY.js → chunk-EEFUXXYJ.js} +13 -13
- package/dist/chunk-I3MSKHJD.js +2 -0
- package/dist/{chunk-TZBNN6HD.js → chunk-KZQRUVII.js} +5 -5
- package/dist/{chunk-WAKWESOR.js → chunk-LPAOHDUE.js} +1 -1
- package/dist/{chunk-5RTQLC2I.js → chunk-UD2C3PJE.js} +1 -1
- package/dist/chunk-XNGQHEGB.js +1 -0
- package/dist/{chunk-BRZ55H2G.js → chunk-ZJZHUPUH.js} +48 -48
- package/dist/forms/BrandAssetEditor.js +1 -1
- package/dist/forms/MediaLibrary.js +1 -1
- package/dist/icons/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +331 -331
- package/dist/shell/LanguageSelect.js +1 -1
- package/dist/shell/MilestoneTimeline.d.ts +1 -1
- package/dist/shell/MilestoneTimeline.js +1 -1
- package/dist/shell/ProductionTimeline.d.ts +23 -9
- package/dist/shell/ProductionTimeline.js +1 -1
- package/dist/shell/SettingRow.js +1 -1
- package/dist/shell/TimelineTrack.d.ts +1 -1
- package/dist/shell/TimelineTrack.js +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/templates/DashboardTemplate.js +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.js +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-7K73G35Z.js +0 -2
- package/dist/chunk-NZYBHM7H.js +0 -1
- package/dist/chunk-R3BLTWKE.js +0 -15
|
@@ -1 +1 @@
|
|
|
1
|
-
import{setBoundaryErrorReporter as e}from"./chunk-KNUR2UEG.js";import{VERSION as t}from"./chunk-NZYBHM7H.js";var n=-1,i=()=>n,a=e=>{addEventListener("pageshow",t=>{t.persisted&&(n=t.timeStamp,e(t))},!0)},r=(e,t,n,i)=>{let a,r;return o=>{var s,c;t.value>=0&&(o||i)&&(r=t.value-(a??0),(r||void 0===a)&&(a=t.value,t.delta=r,t.rating=(s=t.value)>(c=n)[1]?"poor":s>c[0]?"needs-improvement":"good",e(t)))}},o=e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))},s=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},c=()=>s()?.activationStart??0,d=-1,l=/* @__PURE__ */new Set,u=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,f=e=>{if("hidden"===document.visibilityState){if("visibilitychange"===e.type)for(const e of l)e();isFinite(d)||(d="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("prerenderingchange",f,!0))}},h=(e=!1)=>{if(e&&(d=1/0),d<0){const e=c(),t=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").find(t=>"hidden"===t.name&&t.startTime>=e)?.startTime;d=t??u(),addEventListener("visibilitychange",f,!0),addEventListener("prerenderingchange",f,!0),a(()=>{setTimeout(()=>{d=u()})})}return{get firstHiddenTime(){return d},onHidden(e){l.add(e)}}},g=(e,t=-1,n,a=0,r,o,d)=>{const l=s(),u=l?.navigationId||0;let f="navigate";return n?f=n:i()>=0?f="back-forward-cache":l&&(document.prerendering||c()>0?f="prerender":document.wasDiscarded?f="restore":l.type&&(f=l.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v6-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:f,navigationId:a||u,navigationInteractionId:r,navigationURL:o||l?.name,navigationStartTime:d||0}},v=/* @__PURE__ */new WeakMap;function p(e,t){let n=v.get(t);return n||(n=/* @__PURE__ */new WeakMap,v.set(t,n)),n.get(e)||n.set(e,new t),n.get(e)}var m,y=class{t;i=0;o=[];h(e){if(e.hadRecentInput)return;const t=this.o[0],n=this.o.at(-1);this.i&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),this.t?.(e)}},T=(e,t,n={})=>{try{const i=e.filter(e=>PerformanceObserver.supportedEntryTypes.includes(e));if(i.length>0){const e=new PerformanceObserver(e=>{queueMicrotask(()=>{const n=e.getEntries();i.length>1&&n.sort((e,t)=>e.startTime+e.duration-(t.startTime+t.duration)),t(n)})});for(const t of i)e.observe({type:t,buffered:!0,...n});return e}}catch{}},w=e=>globalThis.PerformanceObserver?.supportedEntryTypes?.includes("soft-navigation")&&"function"==typeof globalThis.PerformanceSoftNavigation?.prototype?.getLargestInteractionContentfulPaint&&e&&e.reportSoftNavs,I=(e,t)=>{if(e.set(t.navigationId,t),e.size>2){const t=e.keys().next().value;void 0!==t&&e.delete(t)}},b=e=>{let t=!1;return()=>{t||(e(),t=!0)}},C=class{l},E=e=>{document.prerendering?addEventListener("prerenderingchange",e,!0):e()},L=[1800,3e3],P=(e,t={})=>{const n=w(t);E(()=>{const s=p(t,C),d=h();let l,u=g("FCP");const f=T(["paint"],e=>{for(const t of e)"first-contentful-paint"===t.name&&(f.disconnect(),t.startTime<d.firstHiddenTime&&(u.value=Math.max(t.startTime-c(),0),u.entries.push(t),u.navigationId=t.navigationId||u.navigationId,l(!0)))});f&&(l=r(e,u,L,t.reportAllChanges),a(n=>{u=g("FCP",-1,"back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),l=r(e,u,L,t.reportAllChanges),o(()=>{u.value=performance.now()-n.timeStamp,l(!0)})})),n&&T(["soft-navigation"],n=>{n.forEach(n=>{s.l&&n.navigationId&&I(s.l,n);const i=Math.max((n.presentationTime||n.paintTime||0)-n.startTime,0);u=g("FCP",i,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),l=r(e,u,L,t.reportAllChanges),l(!0)})},t)})},A=[.1,.25],k=0,S=1/0,z=0,M=e=>{for(const t of e)t.interactionId&&(S=Math.min(S,t.interactionId),z=Math.max(z,t.interactionId),k=z?(z-S)/7+1:0)},$=()=>m?k:performance.interactionCount??0,Z=class{u=0;v=[];m=/* @__PURE__ */new Map;p;T;_(){return $()-this.u}M(){this.u=$(),this.v.length=0,this.m.clear()}L(e){const t=this._(),n=Math.min(this.v.length-1,Math.floor(t/50));return!t||-1!==n||"soft-navigation"!==e&&"back-forward-cache"!==e?this.v[n]:{P:8,id:-1,entries:[]}}h(e){if(this.p?.(e),!e.interactionId)return;const t=this.v.at(-1);let n=this.m.get(e.interactionId);if(n||this.v.length<10||e.duration>t.P){if(n?e.duration>n.P?(n.entries=[e],n.P=e.duration):e.duration===n.P&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],P:e.duration},this.m.set(n.id,n),this.v.push(n)),this.v.sort((e,t)=>t.P-e.P),this.v.length>10){const e=this.v.splice(10);for(const t of e)this.m.delete(t.id)}this.T?.(n)}}},_=e=>{const t="requestIdleCallback"in globalThis?1e3:0,n=globalThis.requestIdleCallback||setTimeout,i=globalThis.cancelIdleCallback||clearTimeout;if("hidden"===document.visibilityState)e();else{const a=b(e);let r=-1;const o=()=>{i(r),a()};addEventListener("visibilitychange",o,{once:!0,capture:!0}),r=n(()=>{removeEventListener("visibilitychange",o,{capture:!0}),a()},{timeout:t})}},F=[200,500],R=(e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=h();E(()=>{"interactionCount"in performance||m||(m=T(["event"],M,{durationThreshold:0}));let o,s=g("INP");const c=p(t,Z),d=(n,i,a,d,l)=>{c.M(),s=g("INP",-1,n,i,a,d,l),o=r(e,s,F,t.reportAllChanges)},l=()=>{const e=c.L(s.navigationType);e&&e.P!==s.value&&(s.value=e.P,s.entries=e.entries,o())},u=e=>{l(),o(!0),d("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},f=(e,t=!1)=>{_(()=>{for(const t of e)"soft-navigation"!==t.entryType?c.h(t):u(t);l(),t&&o(!0)})},h=["event","first-input"];w(t)&&h.push("soft-navigation");const v=T(h,f,{...t,durationThreshold:t.durationThreshold??40});o=r(e,s,F,t.reportAllChanges),v&&(n.onHidden(()=>{f(v.takeRecords(),!0)}),a(()=>{d("back-forward-cache",s.navigationId,s.navigationInteractionId,s.navigationURL,i())}))})},j=class{p;l;h(e){this.p?.(e)}},x=[2500,4e3],B=[800,1800],N=e=>{document.prerendering?E(()=>N(e)):"complete"!==document.readyState?addEventListener("load",()=>N(e),!0):setTimeout(e)};var H=/^[A-Za-z0-9/_:.\-[\]{}*@~]+$/,U=/^[A-Za-z_$][A-Za-z0-9_$.]*$/,O=/^[A-Za-z0-9][A-Za-z0-9.+_-]*$/;var q=class{constructor(e){this.head=e}head;events=[];waiting=/* @__PURE__ */new Map;seen=/* @__PURE__ */new Set;get size(){return this.events.length}addVital(e){this.events.push(e)}addError(e){const t=function(e){return e.frames.length?`${e.name}|${e.frames.join("|")}`:`${e.name}|${e.message.replace(/\d/g,"0")}`}(e),n=this.waiting.get(t);return n?(n.count=Math.min(1e3,n.count+e.count),!0):!(this.seen.has(t)||this.seen.size>=20)&&(this.seen.add(t),this.waiting.set(t,e),this.events.push(e),!0)}drain(){const e=this.events;this.events=[],this.waiting.clear();const t=[],n=JSON.stringify({...this.head,events:[]}).length;let i=[],a=n;for(const r of e){const e=JSON.stringify(r).length+1;n+e>30720||((50===i.length||a+e>30720)&&(t.push({...this.head,events:i}),i=[],a=n),i.push(r),a+=e)}return i.length&&t.push({...this.head,events:i}),t}},J=/[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/g,K=/\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}(?:\.[A-Za-z0-9_-]*)?|\b[Bb]earer\s+[A-Za-z0-9._~+/=-]{8,}/g,V=/\b[a-z][a-z0-9+.-]*:\/\/\S+/gi,W=/\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi,D=/\d{4,}/g,G=/(^|[/:])(?:\d+|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|[0-9a-f]{16,})(?=$|[/:])/gi,Y=/^[a-z][a-z0-9+.-]*:\/\/[^/]*/i,Q=/(?:\(|@|\bat\s+)?((?:[a-z][a-z0-9+.-]*:\/\/|\/)[^\s()@]*?):(\d+):(\d+)\)?\s*$/i;function X(e,t,n){const i=e.replace(Y,"").split(/[?#]/,1)[0];return i?`${i}:${t}:${n}`.slice(0,256):null}function ee(e){if("string"!=typeof e)return[];const t=[];for(const n of e.split("\n")){const e=Q.exec(n.trim()),i=e&&X(e[1],e[2],e[3]);if(i&&t.push(i),5===t.length)break}return t}function te(e){const t=e instanceof Error?e.name:void 0;return"string"==typeof t&&t.length<=64&&U.test(t)?t:"Error"}function ne(e){if("string"!=typeof e)return"unknown";const t=e.trim().replace(Y,"").split(/[?#]/,1)[0].replace(G,(e,t)=>":"===t?":id":`${t}:id`);return t&&t.length<=128&&!t.includes("//")&&H.test(t)?t:"unknown"}var ie={flush(){},reportError(){},stop(){}},ae=null,re=/* @__PURE__ */new Set(["LCP","FCP","TTFB"]);function oe(e,t,n){const i=function(e){if(e.anonymous)return{credentials:"omit",headers:{"Content-Type":"application/json"}};const t=e.getAccessToken();return t?{credentials:"same-origin",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}}:null}(t);if(!i)return;const a=t.anonymous?"/api/storefront-analytics/web-vitals/":"/api/client-telemetry/web-batches/";n(t.endpoint??a,{...i,method:"POST",keepalive:!0,body:JSON.stringify(e)}).catch(e=>{console.debug("[efficient-shell] client telemetry batch dropped:",e)})}function se(e){((e,t={})=>{let n=!1;const s=w(t);E(()=>{let d,l=h(),u=g("LCP");const f=p(t,j),v=(i,a,o,s,c)=>{u=g("LCP",-1,i,a,o,s,c),d=r(e,u,x,t.reportAllChanges),n=!1,"soft-navigation"===i&&(l=h(!0))},m=e=>{f.l&&e.navigationId&&I(f.l,e),n||d(!0),v("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime);const t=e.getLargestInteractionContentfulPaint?.();t&&y([t])},y=e=>{t.reportAllChanges||s||(e=e.slice(-1));for(const t of e){if(!t)continue;if("soft-navigation"===t.entryType){m(t);continue}let e=0,n=[],i=t.startTime;if("largest-contentful-paint"===t.entryType)e=Math.max(t.startTime-c(),0),f.h(t),n=[t];else if("interaction-contentful-paint"===t.entryType){const a=t;if(!u.navigationId)continue;if("interactionId"in a&&a.interactionId!=u.navigationInteractionId)continue;i=a.largestContentfulPaint?.renderTime||0,e=Math.max(i-t.startTime,0),a.largestContentfulPaint&&(f.h(a.largestContentfulPaint),n=[a.largestContentfulPaint])}i<l.firstHiddenTime&&(u.value=e,u.entries=n,d())}},w=["largest-contentful-paint"];s&&w.push("interaction-contentful-paint","soft-navigation");const b=T(w,y);if(b){d=r(e,u,x,t.reportAllChanges);const c=["keydown","click","visibilitychange"],l=e=>{if(e.isTrusted&&!n){const e=u.id;_(()=>{if(!n){if(!s){b.disconnect();for(const e of c)removeEventListener(e,l,{capture:!0})}e===u.id&&(n=!0,d(!0))}})}};for(const e of c)addEventListener(e,l,{capture:!0});a(a=>{v("back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),d=r(e,u,x,t.reportAllChanges),o(()=>{u.value=performance.now()-a.timeStamp,n=!0,d(!0)})})}})})(e),R(e),((e,t={})=>{const n=h();P(b(()=>{let s,c=g("CLS",0);const d=p(t,y),l=(n,i,a,o,l)=>{c=g("CLS",0,n,i,a,o,l),d.i=0,s=r(e,c,A,t.reportAllChanges)},u=(e=!1)=>{d.i>c.value&&(c.value=d.i,c.entries=d.o),s(e)},f=e=>{u(!0),l("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},h=e=>{for(const t of e)"soft-navigation"!==t.entryType?d.h(t):f(t);u()},v=["layout-shift"];w(t)&&v.push("soft-navigation");const m=T(v,h);m&&(s=r(e,c,A,t.reportAllChanges),n.onHidden(()=>{h(m.takeRecords()),s(!0)}),a(()=>{l("back-forward-cache",c.navigationId,c.navigationInteractionId,c.navigationURL,i()),o(s)}),setTimeout(s))}))})(e),P(e),((e,t={})=>{const n=w(t);let o=g("TTFB"),d=r(e,o,B,t.reportAllChanges);N(()=>{const l=s();if(l){const s=l.responseStart;o.value=Math.max(s-c(),0),o.entries=[l],d(!0),a(()=>{o=g("TTFB",0,"back-forward-cache",o.navigationId,o.navigationInteractionId,o.navigationURL,i()),d=r(e,o,B,t.reportAllChanges),d(!0)}),n&&T(["soft-navigation"],n=>{n.forEach(n=>{n.navigationId&&(o=g("TTFB",0,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),o.entries=[n],d=r(e,o,B,t.reportAllChanges),d(!0))})},t)}})})(e)}function ce(n){if(ae?.stop(),ae=null,!1===n.enabled||"undefined"==typeof window||"undefined"==typeof document)return ie;if(!function(e){const t="string"==typeof e.app&&O.test(e.app),n="string"==typeof e.release&&O.test(e.release);return t&&n||console.warn("[efficient-shell] client telemetry not started: `app` and `release` must be version-like strings."),t&&n}(n))return ie;const i=function(e){const t=e.vitalsSampleRate??1;return t>0&&(t>=1||(e.random??Math.random)()<t)}(n);if(n.anonymous&&!i)return ie;const a=n.fetch??window.fetch.bind(window),r=new q({app:n.app,release:n.release,shell_version:O.test(t)?t:""}),o=ne(n.routeKey()),s=function(e=("undefined"==typeof window?void 0:window)){if(!e)return"desktop";const t="function"==typeof e.matchMedia&&e.matchMedia("(pointer: coarse)").matches,n=e.innerWidth;return n<600?"mobile":t&&n<1280?"tablet":"desktop"}(window);let c=!1;const d=()=>{for(const e of r.drain())oe(e,n,a)},l=e=>{c||n.anonymous||(r.addError(e),r.size>=50&&d())},u=(e,t)=>{return{type:"error",source:t,name:te(e),message:(a=e,i=a instanceof Error?a.message:"string"==typeof a?a:a&&"object"==typeof a&&"string"==typeof a.message?a.message:"",i.slice(0,640).replace(J,"[redacted]").replace(K,"[redacted]").replace(V,"[url]").replace(W,"[id]").replace(D,"[n]").replace(/\s+/g," ").trim().slice(0,160)),frames:ee(e instanceof Error?e.stack:void 0),route:ne(n.routeKey()),count:1};var i,a};i&&(n.observeVitals??se)(e=>{c||(r.addVital(function(e,t,n,i){return{type:"vital",name:e.name,value:e.value,route:re.has(e.name)?t:n(),navigation:e.navigationType??"navigate",device:i}}(e,o,()=>ne(n.routeKey()),s)),r.size>=50&&d())});const f=n.anonymous?()=>{}:function(t,n){const i=e=>{const{error:i,message:a,filename:r,lineno:o,colno:s}=e;if(null!=i)return void t(n(i,"onerror"));const c=r?ee(`at ${r}:${o??0}:${s??0}`):[];t({...n(a??"","onerror"),frames:c})},a=e=>t(n(e.reason,"unhandledrejection"));window.addEventListener("error",i),window.addEventListener("unhandledrejection",a);const r=e(e=>t(n(e,"boundary")));return()=>{window.removeEventListener("error",i),window.removeEventListener("unhandledrejection",a),r()}}(l,u),h=()=>{"hidden"===document.visibilityState&&d()};document.addEventListener("visibilitychange",h),window.addEventListener("pagehide",d);const g=window.setInterval(d,n.flushIntervalMs??6e4),v={flush:d,reportError:e=>l(u(e,"boundary")),stop(){c||(d(),c=!0,f(),document.removeEventListener("visibilitychange",h),window.removeEventListener("pagehide",d),window.clearInterval(g),ae===v&&(ae=null))}};return ae=v,v}export{ce as startClientTelemetry};
|
|
1
|
+
import{setBoundaryErrorReporter as e}from"./chunk-KNUR2UEG.js";import{VERSION as t}from"./chunk-XNGQHEGB.js";var n=-1,i=()=>n,a=e=>{addEventListener("pageshow",t=>{t.persisted&&(n=t.timeStamp,e(t))},!0)},r=(e,t,n,i)=>{let a,r;return o=>{var s,c;t.value>=0&&(o||i)&&(r=t.value-(a??0),(r||void 0===a)&&(a=t.value,t.delta=r,t.rating=(s=t.value)>(c=n)[1]?"poor":s>c[0]?"needs-improvement":"good",e(t)))}},o=e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))},s=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},c=()=>s()?.activationStart??0,d=-1,l=/* @__PURE__ */new Set,u=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,f=e=>{if("hidden"===document.visibilityState){if("visibilitychange"===e.type)for(const e of l)e();isFinite(d)||(d="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("prerenderingchange",f,!0))}},h=(e=!1)=>{if(e&&(d=1/0),d<0){const e=c(),t=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").find(t=>"hidden"===t.name&&t.startTime>=e)?.startTime;d=t??u(),addEventListener("visibilitychange",f,!0),addEventListener("prerenderingchange",f,!0),a(()=>{setTimeout(()=>{d=u()})})}return{get firstHiddenTime(){return d},onHidden(e){l.add(e)}}},g=(e,t=-1,n,a=0,r,o,d)=>{const l=s(),u=l?.navigationId||0;let f="navigate";return n?f=n:i()>=0?f="back-forward-cache":l&&(document.prerendering||c()>0?f="prerender":document.wasDiscarded?f="restore":l.type&&(f=l.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v6-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:f,navigationId:a||u,navigationInteractionId:r,navigationURL:o||l?.name,navigationStartTime:d||0}},v=/* @__PURE__ */new WeakMap;function p(e,t){let n=v.get(t);return n||(n=/* @__PURE__ */new WeakMap,v.set(t,n)),n.get(e)||n.set(e,new t),n.get(e)}var m,y=class{t;i=0;o=[];h(e){if(e.hadRecentInput)return;const t=this.o[0],n=this.o.at(-1);this.i&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),this.t?.(e)}},T=(e,t,n={})=>{try{const i=e.filter(e=>PerformanceObserver.supportedEntryTypes.includes(e));if(i.length>0){const e=new PerformanceObserver(e=>{queueMicrotask(()=>{const n=e.getEntries();i.length>1&&n.sort((e,t)=>e.startTime+e.duration-(t.startTime+t.duration)),t(n)})});for(const t of i)e.observe({type:t,buffered:!0,...n});return e}}catch{}},w=e=>globalThis.PerformanceObserver?.supportedEntryTypes?.includes("soft-navigation")&&"function"==typeof globalThis.PerformanceSoftNavigation?.prototype?.getLargestInteractionContentfulPaint&&e&&e.reportSoftNavs,I=(e,t)=>{if(e.set(t.navigationId,t),e.size>2){const t=e.keys().next().value;void 0!==t&&e.delete(t)}},b=e=>{let t=!1;return()=>{t||(e(),t=!0)}},E=class{l},C=e=>{document.prerendering?addEventListener("prerenderingchange",e,!0):e()},L=[1800,3e3],P=(e,t={})=>{const n=w(t);C(()=>{const s=p(t,E),d=h();let l,u=g("FCP");const f=T(["paint"],e=>{for(const t of e)"first-contentful-paint"===t.name&&(f.disconnect(),t.startTime<d.firstHiddenTime&&(u.value=Math.max(t.startTime-c(),0),u.entries.push(t),u.navigationId=t.navigationId||u.navigationId,l(!0)))});f&&(l=r(e,u,L,t.reportAllChanges),a(n=>{u=g("FCP",-1,"back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),l=r(e,u,L,t.reportAllChanges),o(()=>{u.value=performance.now()-n.timeStamp,l(!0)})})),n&&T(["soft-navigation"],n=>{n.forEach(n=>{s.l&&n.navigationId&&I(s.l,n);const i=Math.max((n.presentationTime||n.paintTime||0)-n.startTime,0);u=g("FCP",i,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),l=r(e,u,L,t.reportAllChanges),l(!0)})},t)})},A=[.1,.25],k=0,S=1/0,z=0,M=e=>{for(const t of e)t.interactionId&&(S=Math.min(S,t.interactionId),z=Math.max(z,t.interactionId),k=z?(z-S)/7+1:0)},$=()=>m?k:performance.interactionCount??0,_=class{u=0;v=[];m=/* @__PURE__ */new Map;p;T;_(){return $()-this.u}M(){this.u=$(),this.v.length=0,this.m.clear()}L(e){const t=this._(),n=Math.min(this.v.length-1,Math.floor(t/50));return!t||-1!==n||"soft-navigation"!==e&&"back-forward-cache"!==e?this.v[n]:{P:8,id:-1,entries:[]}}h(e){if(this.p?.(e),!e.interactionId)return;const t=this.v.at(-1);let n=this.m.get(e.interactionId);if(n||this.v.length<10||e.duration>t.P){if(n?e.duration>n.P?(n.entries=[e],n.P=e.duration):e.duration===n.P&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],P:e.duration},this.m.set(n.id,n),this.v.push(n)),this.v.sort((e,t)=>t.P-e.P),this.v.length>10){const e=this.v.splice(10);for(const t of e)this.m.delete(t.id)}this.T?.(n)}}},Z=e=>{const t="requestIdleCallback"in globalThis?1e3:0,n=globalThis.requestIdleCallback||setTimeout,i=globalThis.cancelIdleCallback||clearTimeout;if("hidden"===document.visibilityState)e();else{const a=b(e);let r=-1;const o=()=>{i(r),a()};addEventListener("visibilitychange",o,{once:!0,capture:!0}),r=n(()=>{removeEventListener("visibilitychange",o,{capture:!0}),a()},{timeout:t})}},F=[200,500],R=(e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=h();C(()=>{"interactionCount"in performance||m||(m=T(["event"],M,{durationThreshold:0}));let o,s=g("INP");const c=p(t,_),d=(n,i,a,d,l)=>{c.M(),s=g("INP",-1,n,i,a,d,l),o=r(e,s,F,t.reportAllChanges)},l=()=>{const e=c.L(s.navigationType);e&&e.P!==s.value&&(s.value=e.P,s.entries=e.entries,o())},u=e=>{l(),o(!0),d("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},f=(e,t=!1)=>{Z(()=>{for(const t of e)"soft-navigation"!==t.entryType?c.h(t):u(t);l(),t&&o(!0)})},h=["event","first-input"];w(t)&&h.push("soft-navigation");const v=T(h,f,{...t,durationThreshold:t.durationThreshold??40});o=r(e,s,F,t.reportAllChanges),v&&(n.onHidden(()=>{f(v.takeRecords(),!0)}),a(()=>{d("back-forward-cache",s.navigationId,s.navigationInteractionId,s.navigationURL,i())}))})},j=class{p;l;h(e){this.p?.(e)}},x=[2500,4e3],B=[800,1800],N=e=>{document.prerendering?C(()=>N(e)):"complete"!==document.readyState?addEventListener("load",()=>N(e),!0):setTimeout(e)};var U=/^[A-Za-z0-9/_:.\-[\]{}*@~]+$/,H=/^[A-Za-z_$][A-Za-z0-9_$.]*$/,O=/^[A-Za-z0-9][A-Za-z0-9.+_-]*$/;var q=class{constructor(e){this.head=e}head;events=[];waiting=/* @__PURE__ */new Map;seen=/* @__PURE__ */new Set;get size(){return this.events.length}addVital(e){this.events.push(e)}addError(e){const t=function(e){return e.frames.length?`${e.name}|${e.frames.join("|")}`:`${e.name}|${e.message.replace(/\d/g,"0")}`}(e),n=this.waiting.get(t);return n?(n.count=Math.min(1e3,n.count+e.count),!0):!(this.seen.has(t)||this.seen.size>=20)&&(this.seen.add(t),this.waiting.set(t,e),this.events.push(e),!0)}drain(){const e=this.events;this.events=[],this.waiting.clear();const t=[],n=JSON.stringify({...this.head,events:[]}).length;let i=[],a=n;for(const r of e){const e=JSON.stringify(r).length+1;n+e>30720||((50===i.length||a+e>30720)&&(t.push({...this.head,events:i}),i=[],a=n),i.push(r),a+=e)}return i.length&&t.push({...this.head,events:i}),t}},J=/[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/g,K=/\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}(?:\.[A-Za-z0-9_-]*)?|\b[Bb]earer\s+[A-Za-z0-9._~+/=-]{8,}/g,G=/\b[a-z][a-z0-9+.-]*:\/\/\S+/gi,V=/\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi,W=/\d{4,}/g,D=/(^|[/:])(?:\d+|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|[0-9a-f]{16,})(?=$|[/:])/gi,Q=/^[a-z][a-z0-9+.-]*:\/\/[^/]*/i,X=/(?:\(|@|\bat\s+)?((?:[a-z][a-z0-9+.-]*:\/\/|\/)[^\s()@]*?):(\d+):(\d+)\)?\s*$/i;function Y(e,t,n){const i=e.replace(Q,"").split(/[?#]/,1)[0];return i?`${i}:${t}:${n}`.slice(0,256):null}function ee(e){if("string"!=typeof e)return[];const t=[];for(const n of e.split("\n")){const e=X.exec(n.trim()),i=e&&Y(e[1],e[2],e[3]);if(i&&t.push(i),5===t.length)break}return t}function te(e){const t=e instanceof Error?e.name:void 0;return"string"==typeof t&&t.length<=64&&H.test(t)?t:"Error"}function ne(e){if("string"!=typeof e)return"unknown";const t=e.trim().replace(Q,"").split(/[?#]/,1)[0].replace(D,(e,t)=>":"===t?":id":`${t}:id`);return t&&t.length<=128&&!t.includes("//")&&U.test(t)?t:"unknown"}var ie={flush(){},reportError(){},stop(){}},ae=null,re=/* @__PURE__ */new Set(["LCP","FCP","TTFB"]);function oe(e,t,n){const i=function(e){if(e.anonymous)return{credentials:"omit",headers:{"Content-Type":"application/json"}};const t=e.getAccessToken();return t?{credentials:"same-origin",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}}:null}(t);if(!i)return;const a=t.anonymous?"/api/storefront-analytics/web-vitals/":"/api/client-telemetry/web-batches/";n(t.endpoint??a,{...i,method:"POST",keepalive:!0,body:JSON.stringify(e)}).catch(e=>{console.debug("[efficient-shell] client telemetry batch dropped:",e)})}function se(e){((e,t={})=>{let n=!1;const s=w(t);C(()=>{let d,l=h(),u=g("LCP");const f=p(t,j),v=(i,a,o,s,c)=>{u=g("LCP",-1,i,a,o,s,c),d=r(e,u,x,t.reportAllChanges),n=!1,"soft-navigation"===i&&(l=h(!0))},m=e=>{f.l&&e.navigationId&&I(f.l,e),n||d(!0),v("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime);const t=e.getLargestInteractionContentfulPaint?.();t&&y([t])},y=e=>{t.reportAllChanges||s||(e=e.slice(-1));for(const t of e){if(!t)continue;if("soft-navigation"===t.entryType){m(t);continue}let e=0,n=[],i=t.startTime;if("largest-contentful-paint"===t.entryType)e=Math.max(t.startTime-c(),0),f.h(t),n=[t];else if("interaction-contentful-paint"===t.entryType){const a=t;if(!u.navigationId)continue;if("interactionId"in a&&a.interactionId!=u.navigationInteractionId)continue;i=a.largestContentfulPaint?.renderTime||0,e=Math.max(i-t.startTime,0),a.largestContentfulPaint&&(f.h(a.largestContentfulPaint),n=[a.largestContentfulPaint])}i<l.firstHiddenTime&&(u.value=e,u.entries=n,d())}},w=["largest-contentful-paint"];s&&w.push("interaction-contentful-paint","soft-navigation");const b=T(w,y);if(b){d=r(e,u,x,t.reportAllChanges);const c=["keydown","click","visibilitychange"],l=e=>{if(e.isTrusted&&!n){const e=u.id;Z(()=>{if(!n){if(!s){b.disconnect();for(const e of c)removeEventListener(e,l,{capture:!0})}e===u.id&&(n=!0,d(!0))}})}};for(const e of c)addEventListener(e,l,{capture:!0});a(a=>{v("back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),d=r(e,u,x,t.reportAllChanges),o(()=>{u.value=performance.now()-a.timeStamp,n=!0,d(!0)})})}})})(e),R(e),((e,t={})=>{const n=h();P(b(()=>{let s,c=g("CLS",0);const d=p(t,y),l=(n,i,a,o,l)=>{c=g("CLS",0,n,i,a,o,l),d.i=0,s=r(e,c,A,t.reportAllChanges)},u=(e=!1)=>{d.i>c.value&&(c.value=d.i,c.entries=d.o),s(e)},f=e=>{u(!0),l("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},h=e=>{for(const t of e)"soft-navigation"!==t.entryType?d.h(t):f(t);u()},v=["layout-shift"];w(t)&&v.push("soft-navigation");const m=T(v,h);m&&(s=r(e,c,A,t.reportAllChanges),n.onHidden(()=>{h(m.takeRecords()),s(!0)}),a(()=>{l("back-forward-cache",c.navigationId,c.navigationInteractionId,c.navigationURL,i()),o(s)}),setTimeout(s))}))})(e),P(e),((e,t={})=>{const n=w(t);let o=g("TTFB"),d=r(e,o,B,t.reportAllChanges);N(()=>{const l=s();if(l){const s=l.responseStart;o.value=Math.max(s-c(),0),o.entries=[l],d(!0),a(()=>{o=g("TTFB",0,"back-forward-cache",o.navigationId,o.navigationInteractionId,o.navigationURL,i()),d=r(e,o,B,t.reportAllChanges),d(!0)}),n&&T(["soft-navigation"],n=>{n.forEach(n=>{n.navigationId&&(o=g("TTFB",0,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),o.entries=[n],d=r(e,o,B,t.reportAllChanges),d(!0))})},t)}})})(e)}function ce(n){if(ae?.stop(),ae=null,!1===n.enabled||"undefined"==typeof window||"undefined"==typeof document)return ie;if(!function(e){const t="string"==typeof e.app&&O.test(e.app),n="string"==typeof e.release&&O.test(e.release);return t&&n||console.warn("[efficient-shell] client telemetry not started: `app` and `release` must be version-like strings."),t&&n}(n))return ie;const i=function(e){const t=e.vitalsSampleRate??1;return t>0&&(t>=1||(e.random??Math.random)()<t)}(n);if(n.anonymous&&!i)return ie;const a=n.fetch??window.fetch.bind(window),r=new q({app:n.app,release:n.release,shell_version:O.test(t)?t:""}),o=ne(n.routeKey()),s=function(e=("undefined"==typeof window?void 0:window)){if(!e)return"desktop";const t="function"==typeof e.matchMedia&&e.matchMedia("(pointer: coarse)").matches,n=e.innerWidth;return n<600?"mobile":t&&n<1280?"tablet":"desktop"}(window);let c=!1;const d=()=>{for(const e of r.drain())oe(e,n,a)},l=e=>{c||n.anonymous||(r.addError(e),r.size>=50&&d())},u=(e,t)=>{return{type:"error",source:t,name:te(e),message:(a=e,i=a instanceof Error?a.message:"string"==typeof a?a:a&&"object"==typeof a&&"string"==typeof a.message?a.message:"",i.slice(0,640).replace(J,"[redacted]").replace(K,"[redacted]").replace(G,"[url]").replace(V,"[id]").replace(W,"[n]").replace(/\s+/g," ").trim().slice(0,160)),frames:ee(e instanceof Error?e.stack:void 0),route:ne(n.routeKey()),count:1};var i,a};i&&(n.observeVitals??se)(e=>{c||(r.addVital(function(e,t,n,i){return{type:"vital",name:e.name,value:e.value,route:re.has(e.name)?t:n(),navigation:e.navigationType??"navigate",device:i}}(e,o,()=>ne(n.routeKey()),s)),r.size>=50&&d())});const f=n.anonymous?()=>{}:function(t,n){const i=e=>{const{error:i,message:a,filename:r,lineno:o,colno:s}=e;if(null!=i)return void t(n(i,"onerror"));const c=r?ee(`at ${r}:${o??0}:${s??0}`):[];t({...n(a??"","onerror"),frames:c})},a=e=>t(n(e.reason,"unhandledrejection"));window.addEventListener("error",i),window.addEventListener("unhandledrejection",a);const r=e(e=>t(n(e,"boundary")));return()=>{window.removeEventListener("error",i),window.removeEventListener("unhandledrejection",a),r()}}(l,u),h=()=>{"hidden"===document.visibilityState&&d()};document.addEventListener("visibilitychange",h),window.addEventListener("pagehide",d);const g=window.setInterval(d,n.flushIntervalMs??6e4),v={flush:d,reportError:e=>l(u(e,"boundary")),stop(){c||(d(),c=!0,f(),document.removeEventListener("visibilitychange",h),window.removeEventListener("pagehide",d),window.clearInterval(g),ae===v&&(ae=null))}};return ae=v,v}export{ce as startClientTelemetry};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var r="13.7.0",a=r;export{a as APP_VERSION,r as VERSION};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{fmtSliderDate as e}from"./chunk-GXVWI3U5.js";import{calendarNames as t}from"./chunk-ZPJTLNKU.js";import{DAY_MS as
|
|
1
|
+
import{fmtSliderDate as e}from"./chunk-GXVWI3U5.js";import{calendarNames as t}from"./chunk-ZPJTLNKU.js";import{DAY_MS as r}from"./chunk-JRQMX4PK.js";import{stagger as n}from"./chunk-465RRWBY.js";import{popupBounds as l}from"./chunk-GLUJS42B.js";import{useBrowserValueOnce as a,useBrowserLayoutEffect as s}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as i}from"./chunk-TWVUQUUD.js";import{useShellStrings as o,useShellLocale as c}from"./chunk-DEJIH3ZQ.js";import{useRef as u,useState as m,useId as d,useEffect as h,useCallback as p}from"react";import{jsx as x,jsxs as f,Fragment as y}from"react/jsx-runtime";var k={receipt:/* @__PURE__ */f(y,{children:[
|
|
2
2
|
/* @__PURE__ */x("path",{d:"M3.4 1.9h5.2v7.2l-1.3-.9-1.3.9-1.3-.9-1.3.9z",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinejoin:"round"}),
|
|
3
3
|
/* @__PURE__ */x("path",{d:"M4.9 4.4h2.2M4.9 6.1h2.2",stroke:"currentColor",strokeWidth:"1.1",strokeLinecap:"round"})]}),check:/* @__PURE__ */x("path",{d:"M2.6 6.3 4.9 8.6 9.4 3.6",fill:"none",stroke:"currentColor",strokeWidth:"1.9",strokeLinecap:"round",strokeLinejoin:"round"}),doc:/* @__PURE__ */f(y,{children:[
|
|
4
4
|
/* @__PURE__ */x("path",{d:"M3.5 1.9h3.4l2 2v6.2H3.5z",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinejoin:"round"}),
|
|
@@ -13,87 +13,87 @@ return x("svg",{viewBox:"0 0 12 12","aria-hidden":"true",children:k[e]})}functio
|
|
|
13
13
|
return f("svg",{viewBox:"0 0 16 16","aria-hidden":"true",fill:"none",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round",children:[
|
|
14
14
|
/* @__PURE__ */x("path",{d:"M4.2 2.2v11.6"}),
|
|
15
15
|
/* @__PURE__ */x("path",{d:"M4.2 3.1h7.4l-1.6 2.5 1.6 2.6H4.2z"})]})}function v(){/* @__PURE__ */
|
|
16
|
-
return x("svg",{viewBox:"0 0 16 16","aria-hidden":"true",fill:"none",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",children:/* @__PURE__ */x("path",{d:"M2.8 11.6V8.2M6.6 11.6V5.4M10.4 11.6V7M14.2 11.6V3.6"})})}var b=1e-6;function $(e,t,
|
|
16
|
+
return x("svg",{viewBox:"0 0 16 16","aria-hidden":"true",fill:"none",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",children:/* @__PURE__ */x("path",{d:"M2.8 11.6V8.2M6.6 11.6V5.4M10.4 11.6V7M14.2 11.6V3.6"})})}var b=1e-6;function $(e,t,r={}){const n=Number.isFinite(t)&&t>0?t:0,l=Array.from(new Set(e.filter(e=>Number.isFinite(e)))).sort((e,t)=>e-t);if(n<=0||l.length<2){const e=l[0]??0;return{anchorsMs:l,xs:l.map(()=>0),gaps:[],xByMs:()=>0,msByPx:()=>e,inCut:()=>!1}}const a=l[l.length-1]-l[0],s=r.maxTimeShare??.3,i=Math.min(r.breakPx??48,n),o=r.minGapPx??48,c=[],u=[],m=[];for(let e=0;e+1<l.length;e++){const t=l[e+1]-l[e];c.push(t),u.push(a>0?t/a*n:0),m.push(a>0&&t/a>s)}const d=m.filter(Boolean).length,h=Math.max(0,n-d*i);let p=0,x=0;for(let e=0;e<c.length;e++)m[e]||(p+=c[e],x+=1);const f=c.map((e,t)=>m[t]?i:0===x?0:p>0?h*e/p:h/x),y=function(e,t,r){const n=e.slice();let l=0;for(let e=0;e<n.length;e++)t[e]||n[e]>=r-b||(l+=r-n[e],n[e]=r);if(l<=b)return n;let a=0;for(let e=0;e<n.length;e++)!t[e]&&n[e]>r+b&&(a+=n[e]-r);if(a<=b)return n;const s=Math.min(l,a);for(let e=0;e<n.length;e++)t[e]||n[e]<=r+b||(n[e]-=s*(n[e]-r)/a);return n}(f,m,o),k=y.reduce((e,t,r)=>m[r]?e:e+t,0),g=y.map((e,t)=>m[t]?e:k>0?e*h/k:e),M=[0];for(let e=0;e<g.length;e++)M.push(M[e]+g[e]);M[M.length-1]=n;const v=M.slice(0,-1).map((e,t)=>({fromMs:l[t],toMs:l[t+1],gapMs:c[t],fromPx:e,toPx:M[t+1],wantPx:u[t],clampedPx:f[t],px:M[t+1]-e,compressed:m[t]}));return{anchorsMs:l,xs:M,gaps:v,xByMs:e=>{if(!Number.isFinite(e)||e<=l[0])return 0;if(e>=l[l.length-1])return n;for(let t=0;t+1<l.length;t++){if(e>l[t+1])continue;const r=l[t+1]-l[t],n=r>0?(e-l[t])/r:0;return M[t]+n*(M[t+1]-M[t])}return n},msByPx:e=>{const t=Math.min(Math.max(Number.isFinite(e)?e:0,0),n);for(let e=0;e+1<l.length;e++){if(t>M[e+1]&&e+2<l.length)continue;const r=M[e+1]-M[e],n=r>0?(t-M[e])/r:0;return l[e]+n*(l[e+1]-l[e])}return l[l.length-1]},inCut:e=>v.some(t=>t.compressed&&e>t.fromMs&&e<t.toMs)}}function w(e,t,r){return Math.max(0,Math.min(e-t/2,Math.max(0,r-t)))}var P="mixed";function N(e,t){return 5.6*Math.max(e.length,t.length)+8}var C=(e,t,r)=>Math.min(Math.max(e,t),r),T=e=>-(Math.cos(Math.PI*e)-1)/2;function B(e,t){if(!(t>0))return{px:e.fromPx,ms:e.fromMs};if(t>=1||e.durationMs<=0)return{px:e.toPx,ms:e.toMs};const r=e.fromPx+(e.toPx-e.fromPx)*T(t);return{px:r,ms:e.msByPx(r)}}var L={lanes:{tag:0,laneA:17,laneH:30,rail:52,ruler:64,laneB:86,height:120},active:{tag:0,laneA:17,laneH:30,rail:38,ruler:50,laneB:74,height:108},none:{tag:0,laneA:16,laneH:14,rail:34,ruler:46,laneB:46,height:72}};function D(){try{return"undefined"!=typeof window&&"function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}catch{return!1}}var K=e=>5.6*e.length,A={default:{},dfm:{glyph:"doc",token:"var(--tl-dfm)"},shipment:{diamond:!0,glyph:"truck",token:"var(--tl-shipment)"},testing:{glyph:"flask",token:"var(--tl-testing)"},completion:{glyph:"check",token:"var(--tl-completion)"},inspection:{glyph:"flask",token:"var(--tl-inspection)"},invoice:{glyph:"receipt",token:"var(--tl-invoice)"},report:{}},j={doc:"dfm",flask:"testing",check:"completion",truck:"shipment",receipt:"invoice"};function F(e,t,r){if("none"!==e.glyph)return e.glyph?e.glyph:A[t].glyph??(r?"flag":void 0)}function R(e,t,r=!1){const n=A[e],l=["rosh-tl-node","rosh-tl-mark",`is-${t}`];n.diamond&&l.push("is-diamond"),r&&l.push("is-provisional");const a="current"===t?"var(--tl-accent)":n.token??"var(--tl-accent)",s="dot"===t||r?{borderColor:a,color:a}:{backgroundColor:a,color:"var(--tl-on-kind)"};return{className:l.join(" "),style:s}}function U(e){const t=(e=>"string"==typeof e?e:"")(e.detail);return`${e.label} · ${e.dateText}${t?` · ${t}`:""}`}function H(e,t){const[r,n]=m(0);return s(()=>{const r=t?e.current:null;if(!r)return;const l=()=>{const e=r.getBoundingClientRect().width;e>0&&n(e)};if(l(),"undefined"==typeof ResizeObserver)return;const a=new ResizeObserver(l);return a.observe(r),()=>{a.disconnect()}},[e,t]),r}function I(e,t,r){const n=/* @__PURE__ */new Map;for(const e of t)Number.isFinite(e.x)&&n.set(e.x,Math.max(n.get(e.x)??0,e.widthPx));const l=[...n.keys()].sort((e,t)=>e-t);if(r<=0||l.length<2)return e;const a=Math.max(0,l[0]),s=Math.min(r,l[l.length-1]),i=s-a,o=[];for(let e=0;e+1<l.length;e++){const t=(n.get(l[e])??0)/2+(n.get(l[e+1])??0)/2+8;o.push(Math.max(28,t,l[e+1]-l[e]))}const c=o.reduce((e,t)=>e+t,0),u=Math.min(Math.max(c,i),.8*r);if(u<=i+.5)return e;const m=a,d=r-s,h=m+d,p=Math.max(0,r-u),x=h>0?p*m/h:0,f=x,y=x+u,k=o.map(e=>c>0?e*u/c:0),g=e=>{if(e<=a)return m>0?e*x/m:f;if(e>=s)return d>0?y+(e-s)*(r-y)/d:y;let t=f;for(let r=0;r+1<l.length;r++){if(e>l[r+1]){t+=k[r];continue}const n=l[r+1]-l[r];return t+(n>0?(e-l[r])/n*k[r]:0)}return y};return{anchorsMs:e.anchorsMs,xs:e.xs.map(g),gaps:e.gaps.map(e=>({...e,fromPx:g(e.fromPx),toPx:g(e.toPx),px:g(e.toPx)-g(e.fromPx)})),xByMs:t=>g(e.xByMs(t)),msByPx:t=>e.msByPx((e=>{if(e<=f)return x>0?e*m/x:a;if(e>=y)return r-y>0?s+(e-y)*d/(r-y):s;let t=f;for(let r=0;r+1<l.length;r++){if(!(e>t+k[r]))return l[r]+(k[r]>0?(e-t)/k[r]*(l[r+1]-l[r]):0);t+=k[r]}return s})(t)),inCut:e.inCut}}function O(e){if(!e||0===e.length)return null;const t=e.filter(e=>Number.isFinite(e)).sort((e,t)=>e-t);return t.length>0?t:null}function W({marks:e,innerRef:t}){/* @__PURE__ */
|
|
17
17
|
return x("div",{ref:t,"aria-hidden":"true",className:"rosh-tl-measure",children:e.map(e=>/* @__PURE__ */f("div",{"data-lane-key":e.key,className:"rosh-tl-measure-box",children:[
|
|
18
18
|
/* @__PURE__ */x("span",{className:"rosh-tl-name",children:e.label}),
|
|
19
|
-
/* @__PURE__ */x("span",{className:"rosh-tl-date",children:e.dateText})]},e.key))})}function z({startMs:e,endMs:
|
|
20
|
-
/* @__PURE__ */x("i",{className:"rosh-tl-tick is-week",style:{left:`${t}px`,top:`${m}px`,height:"3px"}},`wk-${e}`))}const k=p.map(e=>{const t=(e.fromPx+e.toPx)/2,
|
|
21
|
-
/* @__PURE__ */x("i",{"data-timeline-part":"start-tick",className:"rosh-tl-tick",style:{left:"0px",top:`${m}px`,height:"6px"}},"start"));const M=new Date(e);M.setUTCDate(1);let v=-1/0,b=!0;for(;M.getTime()<
|
|
22
|
-
/* @__PURE__ */x("i",{className:"rosh-tl-tick",style:{left:`${e}px`,top:`${m}px`,height:"6px"}},`mo-${t}`)),e-v>=72||b){const
|
|
23
|
-
/* @__PURE__ */x("span",{className:"rosh-tl-month"+(s?" rosh-tl-fade":""),style:{left:`${e}px`,top:`${m+9}px`,...s?{animationDelay:"420ms"}:{}},children:
|
|
24
|
-
return f("div",{"aria-hidden":"true","data-timeline-part":"ruler",children:[d,h,p.map(e=>{const t=Math.max(1,Math.round(e.gapMs/
|
|
19
|
+
/* @__PURE__ */x("span",{className:"rosh-tl-date",children:e.dateText})]},e.key))})}function z({startMs:e,endMs:n,axis:l,geo:a,reveal:s}){const i=o().timeline,u=t(c()),m=a.ruler,d=[],h=[],p=l.gaps.filter(e=>e.compressed),y=new Date(e);y.setUTCDate(y.getUTCDate()+(8-y.getUTCDay())%7);for(let e=y.getTime();e<n;e+=7*r){if(l.inCut(e))continue;const t=l.xByMs(e);l.xByMs(e+7*r)-t<14||d.push(
|
|
20
|
+
/* @__PURE__ */x("i",{className:"rosh-tl-tick is-week",style:{left:`${t}px`,top:`${m}px`,height:"3px"}},`wk-${e}`))}const k=p.map(e=>{const t=(e.fromPx+e.toPx)/2,n=K(i.days(Math.round(e.gapMs/r)))/2+6;return[t-n,t+n]}),g=(e,t)=>k.some(([r,n])=>e<n&&t>r);d.push(
|
|
21
|
+
/* @__PURE__ */x("i",{"data-timeline-part":"start-tick",className:"rosh-tl-tick",style:{left:"0px",top:`${m}px`,height:"6px"}},"start"));const M=new Date(e);M.setUTCDate(1);let v=-1/0,b=!0;for(;M.getTime()<n;){const t=M.getTime();if(!(t<=e)&&!l.inCut(t)){const e=l.xByMs(t);if(d.push(
|
|
22
|
+
/* @__PURE__ */x("i",{className:"rosh-tl-tick",style:{left:`${e}px`,top:`${m}px`,height:"6px"}},`mo-${t}`)),e-v>=72||b){const r=b||0===M.getUTCMonth()?u.shortMonthYear(M.getUTCFullYear(),M.getUTCMonth()):u.monthsShort[M.getUTCMonth()];g(e,e+K(r))||(h.push(
|
|
23
|
+
/* @__PURE__ */x("span",{className:"rosh-tl-month"+(s?" rosh-tl-fade":""),style:{left:`${e}px`,top:`${m+9}px`,...s?{animationDelay:"420ms"}:{}},children:r},`mon-${t}`)),v=e,b=!1)}}M.setUTCMonth(M.getUTCMonth()+1)}/* @__PURE__ */
|
|
24
|
+
return f("div",{"aria-hidden":"true","data-timeline-part":"ruler",children:[d,h,p.map(e=>{const t=Math.max(1,Math.round(e.gapMs/r));/* @__PURE__ */
|
|
25
25
|
return f("span",{"data-timeline-part":"break",className:"rosh-tl-rulercut"+(s?" rosh-tl-fade":""),style:{left:(e.fromPx+e.toPx)/2+"px",top:`${m}px`,...s?{animationDelay:"420ms"}:{}},children:[
|
|
26
26
|
/* @__PURE__ */f("span",{className:"rosh-tl-cutglyph",children:[
|
|
27
27
|
/* @__PURE__ */x("i",{}),
|
|
28
28
|
/* @__PURE__ */x("i",{})]}),
|
|
29
|
-
/* @__PURE__ */x("span",{children:i.days(t)})]},`cut-${e.fromMs}`)})]})}function S({pending:e,reveal:t}){const
|
|
29
|
+
/* @__PURE__ */x("span",{children:i.days(t)})]},`cut-${e.fromMs}`)})]})}function S({pending:e,reveal:t}){const r=o().timeline,[n,l]=m(!1),a=n?e:e.slice(0,2),s=e.length-a.length;/* @__PURE__ */
|
|
30
30
|
return f("div",{className:"rosh-tl-pending","data-timeline-part":"pending",children:[
|
|
31
|
-
/* @__PURE__ */x("p",{className:"rosh-tl-pending-head",children:
|
|
32
|
-
/* @__PURE__ */x("ol",{className:"rosh-tl-ghosts","aria-label":
|
|
31
|
+
/* @__PURE__ */x("p",{className:"rosh-tl-pending-head",children:r.notReached}),
|
|
32
|
+
/* @__PURE__ */x("ol",{className:"rosh-tl-ghosts","aria-label":r.notReached,children:a.map((e,n)=>/* @__PURE__ */f("li",{className:t?"rosh-tl-fade":void 0,style:t?{animationDelay:440+60*n+"ms"}:void 0,children:[
|
|
33
33
|
/* @__PURE__ */x("span",{"aria-hidden":"true",className:"rosh-tl-node is-ghost"+(e.kind&&A[e.kind].diamond?" is-diamond":"")}),
|
|
34
|
-
/* @__PURE__ */f("span",{children:[0===
|
|
34
|
+
/* @__PURE__ */f("span",{children:[0===n&&/* @__PURE__ */x("b",{children:`${r.next} · `}),e.label]})]},e.key))}),s>0&&/* @__PURE__ */x("button",{type:"button",className:"rosh-tl-more text-gray-500",onClick:()=>l(!0),children:r.more(s)})]})}function E({marks:e,pending:t,currentKey:l,todayMs:a,reveal:s,ariaLabel:i,step:c,nodeProps:u,onKeyDown:m}){const d=o().timeline,h=e.findIndex(e=>e.key===l),p=e.length>0&&null!==a?Math.round((a-e[e.length-1].ms)/r):0;/* @__PURE__ */
|
|
35
35
|
return f("div",{"data-timeline-part":"vertical",children:[
|
|
36
|
-
/* @__PURE__ */x("ol",{className:"rosh-tl-v","aria-label":i,onKeyDown:m,children:e.map((e,t)=>{const
|
|
37
|
-
return f("li",{className:s?"rosh-tl-fade":void 0,style:s?
|
|
36
|
+
/* @__PURE__ */x("ol",{className:"rosh-tl-v","aria-label":i,onKeyDown:m,children:e.map((e,t)=>{const r=R(e.kind,e.role),a=h>=0&&t<h,{glyph:i}=e;/* @__PURE__ */
|
|
37
|
+
return f("li",{className:s?"rosh-tl-fade":void 0,style:s?n(t,c):void 0,...e.key===l?{"aria-current":"step"}:{},children:[
|
|
38
38
|
/* @__PURE__ */x("i",{"aria-hidden":"true",className:`rosh-tl-vline text-blue-600${a?" is-on":" is-dash"}${a&&s?" rosh-tl-drawy":""}`}),
|
|
39
|
-
/* @__PURE__ */f("button",{...u(e),className:`${
|
|
39
|
+
/* @__PURE__ */f("button",{...u(e),className:`${r.className}${s?" rosh-tl-pop":""}`,style:{...r.style,...s?n(t,c):{}},children:[i&&/* @__PURE__ */x(g,{name:i}),"current"===e.role&&/* @__PURE__ */x("span",{"aria-hidden":"true",className:"rosh-tl-pulse bg-blue-600"+(s?" is-on":"")})]}),
|
|
40
40
|
/* @__PURE__ */f("span",{className:"rosh-tl-vrow","aria-hidden":"true",children:[
|
|
41
41
|
/* @__PURE__ */x("span",{className:"rosh-tl-name",children:e.label}),
|
|
42
42
|
/* @__PURE__ */x("span",{className:"rosh-tl-date",children:e.dateText})]})]},e.key)})}),p>0&&/* @__PURE__ */f("p",{className:"rosh-tl-vgap","aria-hidden":"true",children:[
|
|
43
43
|
/* @__PURE__ */x("i",{className:"rosh-tl-vline is-dash"}),
|
|
44
|
-
/* @__PURE__ */x("span",{children:d.daysToToday(p)})]}),t.length>0&&/* @__PURE__ */x(S,{pending:t,reveal:s})]})}function X({axis:e,geo:t,fillTo:n,reveal:
|
|
44
|
+
/* @__PURE__ */x("span",{children:d.daysToToday(p)})]}),t.length>0&&/* @__PURE__ */x(S,{pending:t,reveal:s})]})}function X({axis:e,geo:t,fillTo:r,restTo:n=null,reveal:l,trackPx:a,tweened:s=!1}){/* @__PURE__ */
|
|
45
45
|
return f("div",{"aria-hidden":"true",children:[
|
|
46
|
-
/* @__PURE__ */x("div",{className:"rosh-tl-rail bg-gray-200",style:{top:`${t.rail}px`,height:"6px",width:`${
|
|
46
|
+
/* @__PURE__ */x("div",{className:"rosh-tl-rail bg-gray-200",style:{top:`${t.rail}px`,height:"6px",width:`${a}px`}}),null!==n&&/* @__PURE__ */x("div",{"data-timeline-part":"rest",className:"rosh-tl-fill bg-accent-fill opacity-30",style:{top:`${t.rail}px`,height:"6px",width:`${Math.max(0,Math.min(e.xByMs(n),a))}px`}}),null!==r&&/* @__PURE__ */x("div",{"data-timeline-part":"fill",className:`rosh-tl-fill bg-blue-600${s?" is-tweened":""}${l?" rosh-tl-draw":""}`,style:{top:`${t.rail}px`,height:"6px",width:`${Math.max(0,Math.min(e.xByMs(r),a))}px`}}),e.gaps.filter(e=>e.compressed).map(e=>/* @__PURE__ */f("div",{className:"rosh-tl-cut",style:{left:(e.fromPx+e.toPx)/2+"px",top:`${t.rail}px`,height:"6px"},children:[
|
|
47
47
|
/* @__PURE__ */x("i",{}),
|
|
48
|
-
/* @__PURE__ */x("i",{})]},`railcut-${e.fromMs}`))]})}function V({geo:e,caption:t,endCaption:
|
|
48
|
+
/* @__PURE__ */x("i",{})]},`railcut-${e.fromMs}`))]})}function V({geo:e,caption:t,endCaption:r,around:n,reveal:l,trackPx:a}){const s=e.rail-13-4,i=l?" rosh-tl-fade":"",o=l?{animationDelay:"420ms"}:{};/* @__PURE__ */
|
|
49
49
|
return f("div",{"aria-hidden":"true","data-timeline-part":"start",children:[
|
|
50
|
-
/* @__PURE__ */x("i",{className:`rosh-tl-start${
|
|
50
|
+
/* @__PURE__ */x("i",{className:`rosh-tl-start${n?" is-around":""}${i}`,style:{left:"0px",top:`${e.rail+3}px`,...o}}),null!=t&&!1!==t&&/* @__PURE__ */x("span",{className:`rosh-tl-edge${i}`,"data-timeline-part":"start-caption",style:{left:"0px",top:`${s}px`,...o},children:t}),null!=r&&!1!==r&&/* @__PURE__ */x("span",{className:`rosh-tl-edge is-end${i}`,"data-timeline-part":"end-caption",style:{left:`${a}px`,top:`${s}px`,...o},children:r})]})}function J({x:e,geo:t,trackPx:r,label:n,reveal:l}){const a=o().timeline;/* @__PURE__ */
|
|
51
51
|
return f("div",{"aria-hidden":"true","data-timeline-part":"today",children:[
|
|
52
52
|
/* @__PURE__ */x("div",{className:"rosh-tl-todayline"+(l?" rosh-tl-fade":""),style:{left:`${e}px`,top:`${t.laneA}px`,height:t.ruler+20-t.laneA+"px",...l?{animationDelay:"420ms"}:{}}}),
|
|
53
|
-
/* @__PURE__ */x("span",{className:"rosh-tl-todaytag"+(l?" rosh-tl-fade":""),title:a.todayTitle(
|
|
53
|
+
/* @__PURE__ */x("span",{className:"rosh-tl-todaytag"+(l?" rosh-tl-fade":""),title:a.todayTitle(n),style:{left:`${w(e,48,r)}px`,top:`${t.tag}px`,...l?{animationDelay:"420ms"}:{}},children:a.today})]})}function G({nodes:e,geo:t,reveal:r}){const n=e.map(e=>{const t=e.members.map(e=>e.caption).filter(e=>!!e);return 0===t.length?null:{x:e.x,first:t[0],last:t[t.length-1]}}).filter(e=>null!==e).sort((e,t)=>e.x-t.x),l=[];let a=null;const s=()=>{a&&(l.push({x:(a.from+a.to)/2,text:a.first===a.last?a.first:`${a.first}–${a.last}`}),a=null)};for(const e of n){const t=e.first===e.last?e.first:`${e.first}–${e.last}`,r=K(t)/2;a&&e.x-r<a.right+6?(a.to=e.x,a.last=e.last,a.right=e.x+r):(s(),a={from:e.x,to:e.x,first:e.first,last:e.last,right:e.x+r})}return s(),/* @__PURE__ */x("div",{"aria-hidden":"true","data-timeline-part":"captions",children:l.map(e=>/* @__PURE__ */x("span",{className:"rosh-tl-caption"+(r?" rosh-tl-fade":""),style:{left:`${e.x}px`,top:`${t.laneA}px`,...r?{animationDelay:"360ms"}:{}},children:e.text},`${e.x}-${e.text}`))})}function Z({phase:e,geo:t,xOf:r}){const n=r(e.minMs),l=Math.max(r(e.maxMs)-n,4);/* @__PURE__ */
|
|
54
54
|
return f("div",{"aria-hidden":"true","data-timeline-part":"phase",children:[
|
|
55
|
-
/* @__PURE__ */x("div",{className:"rosh-tl-phase border-gray-300",style:{left:`${
|
|
56
|
-
/* @__PURE__ */f("span",{className:"rosh-tl-phase-label text-gray-500",style:{left:`${
|
|
57
|
-
return f("div",{"data-timeline-part":"label",className:`rosh-tl-label${c.key===l?" is-hot":""}${i(c,a)?" is-current":""}`,style:{left:`${w(c.x,h,t)}px`,top:`${
|
|
58
|
-
/* @__PURE__ */x("span",{className:"rosh-tl-date","aria-hidden":"true",children:d})]})}function Q({groups:e,trackPx:t,geo:
|
|
59
|
-
return f(y,{children:[b.map(e=>{const t=Math.max(0,e.lane),
|
|
55
|
+
/* @__PURE__ */x("div",{className:"rosh-tl-phase border-gray-300",style:{left:`${n}px`,width:`${l}px`,top:t.laneB+t.laneH-4+"px"}}),
|
|
56
|
+
/* @__PURE__ */f("span",{className:"rosh-tl-phase-label text-gray-500",style:{left:`${n+l/2}px`,top:`${t.laneB+t.laneH+5}px`},children:[e.label," · parallel"]})]})}function _({nodes:e,trackPx:t,geo:r,activeKey:n,hoveredKey:l,currentKey:a}){const s=o().timeline,i=(e,t)=>null!==t&&(e.key===t||e.members.some(e=>e.key===t)),c=e.find(e=>e.key===l)??e.find(e=>i(e,n))??null;if(!c)return null;const u=c.mark,m=u?u.label:`×${c.members.length}`,d=u?u.dateText:function(e){const t=e[0].dateText,r=e[e.length-1].dateText;return t===r?t:`${t} – ${r}`}(c.members),h=u?u.widthPx:N(m,d),p=u?.onOpen;/* @__PURE__ */
|
|
57
|
+
return f("div",{"data-timeline-part":"label",className:`rosh-tl-label${c.key===l?" is-hot":""}${i(c,a)?" is-current":""}`,style:{left:`${w(c.x,h,t)}px`,top:`${r.laneB}px`,width:`${h}px`,height:`${r.laneH}px`},children:[p?/* @__PURE__ */x("button",{type:"button",className:"rosh-tl-name rosh-tl-open","data-timeline-part":"open","aria-label":s.open(m),onClick:p,children:m}):/* @__PURE__ */x("span",{className:"rosh-tl-name","aria-hidden":"true",children:m}),
|
|
58
|
+
/* @__PURE__ */x("span",{className:"rosh-tl-date","aria-hidden":"true",children:d})]})}function Q({groups:e,trackPx:t,geo:n,startMs:l,endMs:a,currentKey:s,hoveredKey:i,reveal:o,step:c,zoomedKey:u,popId:m,aimBubble:d,openCluster:h,setOpenCluster:p,previewCluster:k,setPreviewCluster:g,setZoomKey:M,startCaptionPx:v}){const b=[];e.forEach((e,t)=>{if("cluster"===e.type){const n=`cluster-${e.members[0].key}`,l=(r=e.members,`${(r[0]?.label??"").replace(/\s*v?\d+$/i,"").trim()||(r[0]?.label??"")} ×${r.length}`);if(b.push({key:n,group:e,text:l,x:e.members.reduce((e,t)=>e+t.baseX,0)/e.members.length,index:t,lane:-1,left:0,widthPx:Math.ceil(K(l))+28}),n===u)for(const r of e.members)b.push({key:r.key,group:{type:"item",mark:r},text:r.label,x:r.x,index:t,lane:-1,left:0,widthPx:r.widthPx});return}var r;b.push({key:e.mark.key,group:e,text:e.mark.label,x:e.mark.x,index:t,lane:-1,left:0,widthPx:e.mark.widthPx})}),b.sort((e,t)=>e.x-t.x);const $=function(e,t,r,n,l={}){const a=t>0?t:0,s=n>0?n:1,i=l.gapPx??6,o=Math.max(1,l.laneCount??4),c=e.map((e,t)=>({item:e,index:t})).sort((e,t)=>(e.item.priority??0)-(t.item.priority??0)||e.item.ms-t.item.ms||e.index-t.index),u=Array.from({length:o},()=>[]),m=/* @__PURE__ */new Map;for(const{item:e}of c){const t=Math.max(0,e.widthPx);if(a<=0||t>a){m.set(e.key,-1);continue}const n=e.xPx??(e.ms-r)/s*a,l=Math.min(Math.max(n-t/2,0),a-t),c=l+t;let d=-1;for(let e=0;e<o;e++)if(u[e].every(e=>l>e.right+i||c+i<e.left)){u[e].push({left:l,right:c}),d=e;break}m.set(e.key,d)}return e.map(e=>({key:e.key,lane:m.get(e.key)??-1}))}([...v>0?[{key:"__rosh-tl-start__",ms:l,xPx:0,widthPx:v,priority:-2}]:[],...b.map(e=>({key:e.key,ms:"cluster"===e.group.type?e.group.members[0].ms:e.group.mark.ms,xPx:e.x,widthPx:e.widthPx,priority:"cluster"===e.group.type?-1:0}))],t,l,Math.max(a-l,r),{laneCount:2}),P=new Map($.map(e=>[e.key,e.lane]));for(const e of b)e.lane=P.get(e.key)??-1,e.left=w(e.x,e.widthPx,t);const N=b.find(e=>e.key===(h??k)),C=e=>0===e?n.laneA:n.laneB,T=e=>0===e?n.rail-4:n.rail+6+3;/* @__PURE__ */
|
|
59
|
+
return f(y,{children:[b.map(e=>{const t=Math.max(0,e.lane),r=Math.round(e.index*c+60);if("cluster"===e.group.type){const l=h===e.key,a=e.group.members.map(e=>e.x),s=()=>{g(null),l||M(null)};/* @__PURE__ */
|
|
60
60
|
return f("div",{children:[
|
|
61
|
-
/* @__PURE__ */f("button",{type:"button","data-timeline-part":"cluster",className:`rosh-tl-pill${A[e.group.kind]?.token?"":" text-blue-600"}${o?" rosh-tl-fade":""}`,"aria-expanded":l,"aria-controls":m,style:{left:`${e.left}px`,top:`${0===t?
|
|
61
|
+
/* @__PURE__ */f("button",{type:"button","data-timeline-part":"cluster",className:`rosh-tl-pill${A[e.group.kind]?.token?"":" text-blue-600"}${o?" rosh-tl-fade":""}`,"aria-expanded":l,"aria-controls":m,style:{left:`${e.left}px`,top:`${0===t?n.laneA+n.laneH-19:n.laneB}px`,color:A[e.group.kind]?.token,...o?{animationDelay:`${r}ms`}:{}},onMouseEnter:()=>{g(e.key),M(e.key)},onMouseLeave:s,onFocus:()=>{g(e.key),M(e.key)},onBlur:s,onClick:()=>{p(l?null:e.key),M(l?null:e.key)},children:[
|
|
62
62
|
/* @__PURE__ */x("i",{"aria-hidden":"true"}),e.text]}),
|
|
63
|
-
/* @__PURE__ */x("i",{"aria-hidden":"true",className:"rosh-tl-cspan",style:{left:`${Math.min(...a)}px`,width:`${Math.max(1,Math.max(...a)-Math.min(...a))}px`,top:`${T(t)}px`}})]},e.key)}const l=e.group.mark;if(e.lane<0)return l.key===i?/* @__PURE__ */f("div",{"aria-hidden":"true","data-timeline-part":"reveal",className:"rosh-tl-label is-reveal is-hot",style:{left:`${e.left}px`,top:`${
|
|
63
|
+
/* @__PURE__ */x("i",{"aria-hidden":"true",className:"rosh-tl-cspan",style:{left:`${Math.min(...a)}px`,width:`${Math.max(1,Math.max(...a)-Math.min(...a))}px`,top:`${T(t)}px`}})]},e.key)}const l=e.group.mark;if(e.lane<0)return l.key===i?/* @__PURE__ */f("div",{"aria-hidden":"true","data-timeline-part":"reveal",className:"rosh-tl-label is-reveal is-hot",style:{left:`${e.left}px`,top:`${n.laneA}px`,width:`${e.widthPx}px`},children:[
|
|
64
64
|
/* @__PURE__ */x("span",{className:"rosh-tl-name",children:l.label}),
|
|
65
65
|
/* @__PURE__ */x("span",{className:"rosh-tl-date",children:l.dateText})]},e.key):null;const a=Math.abs(e.left+e.widthPx/2-l.x)<=8;/* @__PURE__ */
|
|
66
66
|
return f("div",{children:[
|
|
67
|
-
/* @__PURE__ */f("div",{"aria-hidden":"true","data-timeline-part":"label",className:`rosh-tl-label${0===t?" is-up":""}${l.key===s?" is-current":""}${l.key===i?" is-hot":""}${o?" rosh-tl-fade":""}`,style:{left:`${e.left}px`,top:`${C(t)}px`,width:`${e.widthPx}px`,height:`${
|
|
67
|
+
/* @__PURE__ */f("div",{"aria-hidden":"true","data-timeline-part":"label",className:`rosh-tl-label${0===t?" is-up":""}${l.key===s?" is-current":""}${l.key===i?" is-hot":""}${o?" rosh-tl-fade":""}`,style:{left:`${e.left}px`,top:`${C(t)}px`,width:`${e.widthPx}px`,height:`${n.laneH}px`,...o?{animationDelay:`${r}ms`}:{}},children:[
|
|
68
68
|
/* @__PURE__ */x("span",{className:"rosh-tl-name",children:l.label}),
|
|
69
|
-
/* @__PURE__ */x("span",{className:"rosh-tl-date",children:l.dateText})]}),!a&&/* @__PURE__ */x("i",{"aria-hidden":"true",className:"rosh-tl-lead"+(o?" rosh-tl-fade":""),style:{left:`${Math.min(e.left+e.widthPx/2,l.x)}px`,width:`${Math.abs(e.left+e.widthPx/2-l.x)}px`,top:`${T(t)}px`,...o?{animationDelay:`${
|
|
69
|
+
/* @__PURE__ */x("span",{className:"rosh-tl-date",children:l.dateText})]}),!a&&/* @__PURE__ */x("i",{"aria-hidden":"true",className:"rosh-tl-lead"+(o?" rosh-tl-fade":""),style:{left:`${Math.min(e.left+e.widthPx/2,l.x)}px`,width:`${Math.abs(e.left+e.widthPx/2-l.x)}px`,top:`${T(t)}px`,...o?{animationDelay:`${r}ms`}:{}}})]},e.key)}),N&&"cluster"===N.group.type&&/* @__PURE__ */f("div",{ref:e=>{d(e,N.x)},id:m,className:"rosh-tl-popover","data-timeline-part":"cluster-popover",style:{top:`${n.rail+6+6}px`},onMouseEnter:()=>g(N.key),onMouseLeave:()=>g(null),children:[
|
|
70
70
|
/* @__PURE__ */x("p",{className:"rosh-tl-popover-head",children:N.text}),
|
|
71
71
|
/* @__PURE__ */x("ol",{children:N.group.members.map(e=>/* @__PURE__ */f("li",{children:[
|
|
72
72
|
/* @__PURE__ */x("span",{children:e.label}),
|
|
73
|
-
/* @__PURE__ */x("span",{className:"rosh-tl-date",children:e.dateText})]},e.key))})]})]})}function Y({thumb:t,value:
|
|
73
|
+
/* @__PURE__ */x("span",{className:"rosh-tl-date",children:e.dateText})]},e.key))})]})]})}function Y({thumb:t,value:n,snap:l,axis:a,geo:s,startMs:i,endMs:m,trackPx:d,layerRef:h,glide:p,onScrub:k,nodes:g,onProgress:M}){const v=o().timeline,b=c(),$=u(!1),P=p?p.px:a.xByMs(n),N=p?p.ms:n,T=O(t.stops),B=T?T.indexOf(n):-1,L=e=>{const t=h.current?.getBoundingClientRect();return t?a.msByPx(e-t.left):n},D=e=>{const r=l(e);r!==n&&t.onChange(r)},K=e=>{k?.(),$.current=!0,e.currentTarget.setPointerCapture?.(e.pointerId),t.onDragStart?.()},A=e=>{$.current&&($.current=!1,e.currentTarget.releasePointerCapture?.(e.pointerId),M(null),t.onDragEnd?.())},j=u(!1),F=()=>{j.current&&(j.current=!1,t.onPreview?.(null))},R=e=>{if(!$.current)return;const t=L(e.clientX);D(t),M(function(e,t){if(!Number.isFinite(t))return null;const r=e.filter(e=>Number.isFinite(e.ms)).slice().sort((e,t)=>e.ms-t.ms);for(let e=0;e+1<r.length;e++){const n=r[e],l=r[e+1];if(t<n.ms||t>l.ms)continue;const a=l.ms-n.ms;return{fromKey:n.key,toKey:l.key,t:a>0?C((t-n.ms)/a,0,1):1,ms:t}}return null}(g,t))},U=t.valueText?t.valueText(N):e(N,b),H=Math.max(1,Math.round((m-i)/r));/* @__PURE__ */
|
|
74
74
|
return f(y,{children:[
|
|
75
|
-
/* @__PURE__ */x("div",{className:"rosh-tl-hit","aria-hidden":"true","data-timeline-part":"hit",style:{top:s.rail-9+"px",height:"24px"},onPointerDown:e=>{K(e),D(L(e.clientX))},onPointerMove:j,onPointerUp:A,onPointerCancel:A}),
|
|
75
|
+
/* @__PURE__ */x("div",{className:"rosh-tl-hit","aria-hidden":"true","data-timeline-part":"hit",style:{top:s.rail-9+"px",height:"24px"},onPointerDown:e=>{F(),K(e),D(L(e.clientX))},onPointerMove:e=>{$.current?R(e):(e=>{t.onPreview&&!p&&"mouse"===e.pointerType&&0===e.buttons&&(j.current=!0,t.onPreview(l(L(e.clientX))))})(e)},onPointerLeave:F,onPointerUp:A,onPointerCancel:A}),
|
|
76
76
|
/* @__PURE__ */x("div",{className:"rosh-tl-chip","data-timeline-part":"chip",style:{left:`${w(P,88,d)+44}px`,top:`${s.tag}px`},children:t.chip?t.chip(N):e(N,b)}),
|
|
77
|
-
/* @__PURE__ */x("div",{role:"slider",tabIndex:0,className:"rosh-tl-thumb text-blue-600","data-timeline-part":"thumb","aria-label":t.ariaLabel??v.scrub,"aria-valuemin":0,"aria-valuemax":T&&T.length>0?T.length-1:R,"aria-valuenow":T&&T.length>0?Math.max(0,B):Math.round((r-i)/n),"aria-valuetext":F,style:{left:`${P}px`,top:`${s.rail+3}px`},onPointerDown:K,onPointerMove:j,onPointerUp:A,onPointerCancel:A,onKeyDown:e=>{const t=(e=>{const{key:t}=e;if(T&&T.length>0){const e=B<0?0:B;return"ArrowRight"===t||"ArrowUp"===t?T[Math.min(e+1,T.length-1)]:"ArrowLeft"===t||"ArrowDown"===t?T[Math.max(e-1,0)]:"Home"===t?T[0]:"End"===t?T[T.length-1]:null}const l=(e.shiftKey?7:1)*n;return"ArrowRight"===t||"ArrowUp"===t?r+l:"ArrowLeft"===t||"ArrowDown"===t?r-l:"Home"===t?i:"End"===t?m:null})(e);null!==t&&(e.preventDefault(),k?.(),D(t))}})]})}function q(e,t,n){return(t?e.height:e.ruler+26)+(n?22:0)}function ee({startMs:t,endMs:k,axis:M="linear",items:v,markers:b=[],pending:w=[],fillToMs:ee,todayMs:te,labels:ne="lanes",activeKey:re=null,onActivate:le,thumb:ae,playback:se,edgeCaptions:ie,phases:oe=[],currentKey:ce,zoomRange:ue=null,motion:me=!0,ariaLabel:de,highlightKeys:he=null,onHoverChange:pe,endMark:xe=null}){const fe="none"===ne,ye=a(Date.now,null),ke=a(D,!1),ge=te??ye,Me=u(null),ve=o().timeline,be=c(),$e=t=>e(t,be),we=u(null),Pe=u(null),Ne=u(null),Ce=u(/* @__PURE__ */new Map),Te=u(void 0),Be=u(void 0),Le=u(null),[De,Ke]=m({}),[Ae,je]=m(null),[Fe,Re]=m(null),[Ue,He]=m(null),[Ie,Oe]=m(null),[We,ze]=m(null),[Se,Ee]=m(null),Xe=d(),Ve=d(),Je=H(Me,!0),Ge=Je>0?Je-(w.length>0&&!fe?176:0):0,Ze=Ge>0&&Ge-20<320,_e=H(we,!Ze),Qe=_e>0?_e:600,Ye=L[ne],qe=fe&&w.length>0,et=qe?Math.max(0,Qe-36):Qe,tt=e=>e>=t-n&&e<=k+n,nt=v.filter(e=>Number.isFinite(e.ms)&&tt(e.ms)).slice().sort((e,t)=>e.ms-t.ms),rt="spread"===M?b.map(e=>new Date(e.date).getTime()).filter(e=>Number.isFinite(e)):[],lt=$([t,...[...nt.map(e=>e.ms),...rt].filter(e=>e>t&&e<k),k],et,"compressed"===(at=M)?{}:"spread"===at?{maxTimeShare:1/0}:{maxTimeShare:1/0,minGapPx:0});var at;const st=lt.xByMs,it=nt.filter(e=>!e.provisional),ot=ce??(it.length>0?it[it.length-1].key:null),ct=nt.map((e,t)=>{const n=e.date??$e(e.ms),r=(e.priority??0)>0||"report"===e.kind,l=function(e){const t=e.kind??"default";return"default"===t&&e.glyph&&"none"!==e.glyph?j[e.glyph]??t:t}(e);return{key:e.key,ms:e.ms,x:st(e.ms),baseX:st(e.ms),kind:l,label:e.label,dateText:n,detail:e.detail,preview:e.preview,glyph:F(e,l,0===t&&"default"===l),role:e.key===ot?"current":r?"dot":"key",widthPx:fe?Math.max(16,K(e.caption??"")+6):De[e.key]||N(e.label,n),collapsible:r,onClick:e.onClick,onOpen:e.onOpen,isItem:!0,caption:e.caption,provisional:!!e.provisional,isCap:!1}}),ut=b.map(e=>({marker:e,ms:new Date(e.date).getTime()})).filter(({ms:e})=>Number.isFinite(e)&&tt(e)).map(({marker:e,ms:t})=>{const n=`marker-${e.id}`,r=$e(t);return{key:n,ms:t,x:st(t),baseX:st(t),kind:e.kind,label:e.label,dateText:r,detail:e.detail,preview:e.preview,glyph:e.glyph??A[e.kind].glyph,role:"key",widthPx:De[n]||N(e.label,r),collapsible:!1,onClick:e.onClick?()=>e.onClick?.(e):void 0,onOpen:e.onOpen?()=>e.onOpen?.(e):void 0,isItem:!1,provisional:!1,isCap:!1}}),mt=qe?(()=>{const e=w[w.length-1],t=w.slice(0,-1).map(e=>e.label);return[{key:e.key,ms:k+n,x:Qe,baseX:Qe,kind:e.kind??"default",label:e.label,dateText:ve.notReached,detail:t.length>0?ve.alsoToCome(t):void 0,glyph:void 0,role:"key",widthPx:16,collapsible:!1,isItem:!1,provisional:!1,isCap:!0}]})():[],dt=fe&&xe&&!qe?[{key:xe.key,ms:k,x:et,baseX:et,kind:"default",label:xe.label,dateText:xe.dateText??$e(k),detail:xe.detail,glyph:void 0,role:"key",widthPx:16,collapsible:!1,isItem:!1,provisional:!1,isCap:!0}]:[],ht=[...ct,...ut,...mt,...dt].sort((e,t)=>e.x-t.x||e.ms-t.ms),pt=ie?.start??ve.start($e(t)),xt=null==pt||!1===pt?0:"string"==typeof pt?Math.ceil(K(pt)):96,ft="lanes"===ne?function(e,t={}){const n=t.minPitchPx??40,r=[];let l=0;for(;l<e.length;){const t=e[l];if(!t.collapsible){r.push({type:"item",mark:t}),l+=1;continue}let a=l+1;for(;a<e.length&&e[a].collapsible&&e[a].kind===t.kind;)a+=1;const s=e.slice(l,a),i=s.length>1&&s.every((e,t)=>{if(0===t)return!0;const r=s[t-1],l=Math.max(n,Math.max(e.widthPx,r.widthPx)+8);return e.x-r.x<l});if(s.length>=3||i)r.push({type:"cluster",kind:t.kind,members:s});else for(const e of s)r.push({type:"item",mark:e});l=a}return r}(ht):[],yt=function(e,t=16){const n=[];let r=0;for(;r<e.length;){let l=r+1;for(;l<e.length&&e[l].x-e[l-1].x<t;)l+=1;if(l-r===1)n.push({type:"item",mark:e[r]});else{const t=e.slice(r,l),a=new Set(t.map(e=>e.kind));n.push({type:"cluster",kind:1===a.size?t[0].kind:P,members:t})}r=l}return n}(ht),kt=e=>"cluster"===e.type?`fold-${e.members[0].key}`:e.mark.key,gt=/* @__PURE__ */new Map;for(const e of yt)if("cluster"===e.type)for(const t of e.members)gt.set(t.key,kt(e));const Mt=Ue??Ie??We,vt=ft.find(e=>"cluster"===e.type&&(e=>"cluster"===e.type?`cluster-${e.members[0].key}`:e.mark.key)(e)===Mt)??yt.find(e=>"cluster"===e.type&&kt(e)===Mt),bt=e=>({x:e.baseX,widthPx:e.widthPx}),$t=vt&&"cluster"===vt.type?vt.members.map(bt):ue?ht.filter(e=>e.ms>=ue[0]&&e.ms<=ue[1]).map(bt):[],wt=$t.length>1?I(lt,$t,et):lt,Pt=wt!==lt;if(Pt)for(const e of ht)e.isCap||(e.x=wt.xByMs(e.ms));const Nt=ht.some(e=>e.x<14),Ct=Pt&&vt?Mt:null,Tt=e=>({key:e.key,mark:e,members:[e],x:e.x,kind:e.kind,openable:!1}),Bt=Ze?ht.map(Tt):yt.flatMap(e=>{if("item"===e.type)return[Tt(e.mark)];const t=kt(e);if(t===Ct&&(n=e.members).every((e,t)=>0===t||e.x-n[t-1].x>=16))return e.members.map(Tt);var n;const r=e.members.map(e=>e.x);return[{key:t,mark:null,members:e.members,x:r.reduce((e,t)=>e+t,0)/r.length,kind:e.kind,openable:new Set(e.members.map(e=>e.ms)).size>1}]}),Lt=/* @__PURE__ */new Map;for(const e of Bt)for(const t of e.members)Lt.set(t.key,e.key);const Dt=yt.find(e=>"cluster"===e.type&&kt(e)===Ct),Kt=Dt&&"cluster"===Dt.type?{from:Math.min(...Dt.members.map(e=>e.x))-16,to:Math.max(...Dt.members.map(e=>e.x))+16}:null,At=u(Ct),[jt,Ft]=m(!1);h(()=>{if(At.current===Ct)return;At.current=Ct,Ft(!0);const e=setTimeout(()=>Ft(!1),240);return()=>clearTimeout(e)},[Ct]);const Rt=ht.map(e=>`${e.key} ${e.label} ${e.dateText}`).join("|");s(()=>{const e=Pe.current;if(!e)return;const t={};for(const n of Array.from(e.children)){const e=n.dataset.laneKey,r=n.getBoundingClientRect().width;e&&r>0&&(t[e]=r)}Ke(e=>function(e,t){const n=Object.keys(e);return n.length===Object.keys(t).length&&n.every(n=>Math.abs((e[n]??0)-(t[n]??0))<.5)}(e,t)?e:t)},[Rt]);const Ut=`${ne}|${M}|${ht.map(e=>`${e.key}@${e.ms}`).join("|")}`,[Ht,It]=m(Ut),Ot=me&&Ht===Ut;h(()=>{Ht!==Ut&&It(Ut)},[Ht,Ut]);const Wt=Math.min(28,340/Math.max(1,ht.length-1)),zt=O(ae?.stops),St=e=>{const n=Math.min(Math.max(e,t),k);if(!zt)return n;let r=zt[0];for(const e of zt)Math.abs(e-n)<Math.abs(r-n)&&(r=e);return r},Et=ae?St(ae.valueMs):null,Xt=se&&ae?ct.filter(e=>!zt||zt.includes(e.ms)).map(e=>({key:e.key,ms:e.ms})):[],Vt=function(e,t,n={}){const r=Number.isFinite(n.speed)&&(n.speed??0)>0?n.speed:1,l=Math.max(0,n.dwellMs??700)/r,a=t.filter(e=>Number.isFinite(e.ms)).slice().sort((e,t)=>e.ms-t.ms),s=[];for(let t=0;t+1<a.length;t++){const i=a[t],o=a[t+1],c=e.xByMs(i.ms),u=e.xByMs(o.ms),m=Math.max(0,u-c),d=m<=.5||n.reducedMotion?0:C(350*m/100,450,1400)/r;s.push({fromKey:i.key,toKey:o.key,fromMs:i.ms,toMs:o.ms,fromPx:c,toPx:u,lengthPx:m,durationMs:d,dwellMs:l,msByPx:e.msByPx})}return s}(wt,Xt,{speed:se?.speed,reducedMotion:ke}),[Jt,Gt]=m(null),Zt=u(null),_t=u({segments:Vt,value:Et,playback:se});h(()=>{_t.current={segments:Vt,value:Et,playback:se}});const Qt=u(null),Yt=p(e=>{null===e&&null===Qt.current||(Qt.current=e,_t.current.playback?.onProgress?.(e))},[]),qt=p(()=>{Zt.current=null,Gt(null),Yt(null),_t.current.playback?.onStop?.()},[Yt]),en=!!se?.playing&&!!ae;h(()=>{if(!en)return;const e=_t.current,t=null===e.value?-1:e.segments.findIndex(t=>t.fromMs===e.value);if(t<0)return void qt();Zt.current&&Zt.current.index===t||(Zt.current={index:t,phase:"rest",t:0,restLeftMs:e.segments[t].dwellMs,sinceMs:null});let n,r=0;const l=e=>Gt(t=>t&&t.px===e.px&&t.ms===e.ms?t:e),a=()=>{clearTimeout(n);const e=Zt.current;"rest"===e?.phase&&(n=setTimeout(s,Math.max(0,e.restLeftMs)))},s=()=>{const e=Zt.current;if("rest"!==e?.phase)return;const t=_t.current.segments[e.index];t?(Zt.current={index:e.index,phase:"glide",t:0,restLeftMs:0,sinceMs:null},l(B(t,0))):qt()},i=e=>{const t=_t.current,n=Zt.current;if(!n)return;const s=function(e,t,n){const r=e[t.index];if(!r)return{cursor:null,at:null,arrived:null,progress:null};const l=null===t.sinceMs?0:Math.max(0,n-t.sinceMs);if("rest"===t.phase){const e=t.restLeftMs-l;return e>0?{cursor:{...t,restLeftMs:e,sinceMs:n},at:B(r,0),arrived:null,progress:null}:{cursor:{index:t.index,phase:"glide",t:0,restLeftMs:0,sinceMs:n},at:B(r,0),arrived:null,progress:null}}const a=r.durationMs>0?Math.min(1,t.t+l/r.durationMs):1,s=B(r,a);if(a<1)return{cursor:{...t,t:a,sinceMs:n},at:s,arrived:null,progress:{fromKey:r.fromKey,toKey:r.toKey,t:T(a),ms:s.ms}};const i=e[t.index+1];return{cursor:i?{index:t.index+1,phase:"rest",t:0,restLeftMs:i.dwellMs,sinceMs:n}:null,at:s,arrived:{key:r.toKey,ms:r.toMs},progress:null}}(t.segments,n,e);Zt.current=s.cursor,s.at&&l(s.at),Yt(s.progress),s.arrived&&t.playback?.onArrive(s.arrived.key,s.arrived.ms),s.cursor?(s.cursor.phase===n.phase&&s.cursor.index===n.index||a(),r=requestAnimationFrame(i)):qt()};return a(),r=requestAnimationFrame(i),()=>{cancelAnimationFrame(r),clearTimeout(n),Zt.current&&(Zt.current.sinceMs=null,Yt(null))}},[en,qt,Yt]);const tn=ct.filter(e=>!e.provisional),nn=ae?Jt?Jt.ms:Et:void 0!==ee?ee:tn.length>0?null===ge?tn[tn.length-1].ms:Math.min(tn[tn.length-1].ms,ge):null,rn=new Set(he??[]),ln=ht.filter(e=>rn.has(e.key)).map(e=>e.x),an=ln.length>0?{from:Math.min(...ln),to:Math.max(...ln)}:null,sn=p(()=>{clearTimeout(Te.current),clearTimeout(Be.current),je(null),Re(null),He(null),Oe(null),ze(null)},[]);h(()=>()=>{clearTimeout(Te.current),clearTimeout(Be.current)},[]),h(()=>{const e=Le.current;e&&(Le.current=null,Ce.current.get(e)?.focus())});const on=null!==Fe||null!==Ue||null!==Ie||null!==We;h(()=>{if(on)return i(e=>"Escape"===e.key&&(sn(),!0))},[on,sn]);const cn=p((e,t)=>{if(!e)return;const n=e.offsetWidth/2;let r=n>0?Math.max(n,Math.min(t,Qe-n)):t;const a=e.parentElement;if(n>0&&a){const t=l(e),s=a.getBoundingClientRect().left,i=t.left+8+n-s,o=t.right-8-n-s;i<=o&&(r=Math.max(i,Math.min(r,o)))}e.style.left=`${r}px`,e.style.setProperty("--rosh-tl-arrow",`${n+(t-r)}px`)},[Qe]),un=Bt.find(e=>e.key===Fe)??null,mn=un?un.x:0;s(()=>{cn(Ne.current,mn)},[cn,Fe,mn]);const dn=Et??void 0,hn=u(null);h(()=>{if(void 0===dn)return;const e=wt.xByMs(dn),t=hn.current;if(hn.current=e,null===t||e<=t)return;const n=[];for(const r of ht){if(r.x<=t||r.x>e)continue;const l=Ce.current.get(Lt.get(r.key)??r.key);l&&(l.classList.add("is-hit"),n.push(setTimeout(()=>l.classList.remove("is-hit"),460)))}return()=>{for(const e of n)clearTimeout(e)}},[dn]);const pn=Bt.map(e=>e.key),xn=ot?Lt.get(ot)??null:null,fn=Se&&pn.includes(Se)?Se:xn&&pn.includes(xn)?xn:pn[0],yn=e=>{const t=pn.indexOf(e.target.dataset?.timelineKey??"");if(t<0)return;const n="ArrowRight"===e.key||"ArrowDown"===e.key?t+1:"ArrowLeft"===e.key||"ArrowUp"===e.key?t-1:"Home"===e.key?0:"End"===e.key?pn.length-1:-1;n<0||n>pn.length-1||(e.preventDefault(),Ee(pn[n]),Ce.current.get(pn[n])?.focus())},kn=()=>clearTimeout(Be.current),gn=e=>{kn(),ze(e)},Mn=()=>{clearTimeout(Be.current),Be.current=setTimeout(()=>ze(null),260)},vn=e=>{Ct&>.get(e)===Ct?kn():(kn(),ze(null))},bn=e=>{clearTimeout(Te.current),je(e),Re(e),pe?.((e=>{const t=Bt.find(t=>t.key===e);return t?.members[0]?.key??e})(e))},$n=e=>{je(t=>t===e?null:t),clearTimeout(Te.current),Te.current=setTimeout(()=>Re(t=>t===e?null:t),160),pe?.(null)},wn=e=>({type:"button","data-timeline-node":e.isCap?"cap":e.isItem?"item":"marker","data-timeline-key":e.key,"aria-label":U(e),"aria-describedby":Fe===e.key?Xe:void 0,tabIndex:e.key===fn?0:-1,ref:t=>{t?Ce.current.set(e.key,t):Ce.current.delete(e.key)},onMouseEnter:()=>{vn(e.key),bn(e.key)},onMouseLeave:()=>{Mn(),$n(e.key)},onFocus:()=>{vn(e.key),bn(e.key),Ee(e.key)},onBlur:()=>{Mn(),$n(e.key)},onPointerDown:e=>e.stopPropagation(),onClick:t=>{t.stopPropagation(),e.onClick?.(),e.isItem&&le?.(e.key)}}),Pn=e=>{return{type:"button","data-timeline-node":"fold","data-timeline-key":e.key,"data-timeline-count":String(e.members.length),"aria-label":(t=e.members,n=ve,n.events(t.length,t.map(U))),"aria-describedby":Fe===e.key?Xe:void 0,tabIndex:e.key===fn?0:-1,ref:t=>{t?Ce.current.set(e.key,t):Ce.current.delete(e.key)},onMouseEnter:()=>{e.openable?gn(e.key):bn(e.key)},onMouseLeave:()=>{Mn(),$n(e.key)},onFocus:()=>{kn(),bn(e.key),Ee(e.key)},onBlur:()=>{Mn(),$n(e.key)},onPointerDown:e=>e.stopPropagation(),onClick:t=>{if(t.stopPropagation(),!e.openable)return void bn(e.key);gn(e.key);const n=e.members[0];Ee(n.key),Le.current=n.key}};var t,n},Nn="lanes"!==ne||ht.length>1;if(Ze)/* @__PURE__ */
|
|
78
|
-
return x("div",{ref:Me,children:/* @__PURE__ */x(E,{marks:ht.filter(e=>!e.isCap),pending:w,currentKey:ot,todayMs:ge,reveal:Ot,ariaLabel:de,step:Wt,nodeProps
|
|
77
|
+
/* @__PURE__ */x("div",{role:"slider",tabIndex:0,className:"rosh-tl-thumb text-blue-600","data-timeline-part":"thumb","aria-label":t.ariaLabel??v.scrub,"aria-valuemin":0,"aria-valuemax":T&&T.length>0?T.length-1:H,"aria-valuenow":T&&T.length>0?Math.max(0,B):Math.round((n-i)/r),"aria-valuetext":U,style:{left:`${P}px`,top:`${s.rail+3}px`},onPointerDown:K,onPointerMove:R,onPointerUp:A,onPointerCancel:A,onKeyDown:e=>{const t=(e=>{const{key:t}=e;if(T&&T.length>0){const e=B<0?0:B;return"ArrowRight"===t||"ArrowUp"===t?T[Math.min(e+1,T.length-1)]:"ArrowLeft"===t||"ArrowDown"===t?T[Math.max(e-1,0)]:"Home"===t?T[0]:"End"===t?T[T.length-1]:null}const l=(e.shiftKey?7:1)*r;return"ArrowRight"===t||"ArrowUp"===t?n+l:"ArrowLeft"===t||"ArrowDown"===t?n-l:"Home"===t?i:"End"===t?m:null})(e);null!==t&&(e.preventDefault(),k?.(),D(t))}})]})}function q(e,t,r){return(t?e.height:e.ruler+26)+(r?22:0)}function ee({startMs:t,endMs:k,axis:M="linear",items:v,markers:b=[],pending:w=[],fillToMs:ee,todayMs:te,labels:re="lanes",activeKey:ne=null,onActivate:le,thumb:ae,playback:se,edgeCaptions:ie,phases:oe=[],currentKey:ce,zoomRange:ue=null,motion:me=!0,ariaLabel:de,highlightKeys:he=null,onHoverChange:pe,endMark:xe=null}){const fe="none"===re,ye=a(Date.now,null),ke=a(D,!1),ge=te??ye,Me=u(null),ve=o().timeline,be=c(),$e=t=>e(t,be),we=u(null),Pe=u(null),Ne=u(null),Ce=u(/* @__PURE__ */new Map),Te=u(void 0),Be=u(void 0),Le=u(null),[De,Ke]=m({}),[Ae,je]=m(null),[Fe,Re]=m(null),[Ue,He]=m(null),[Ie,Oe]=m(null),[We,ze]=m(null),[Se,Ee]=m(null),Xe=d(),Ve=d(),Je=H(Me,!0),Ge=Je>0?Je-(w.length>0&&!fe?176:0):0,Ze=Ge>0&&Ge-20<320,_e=H(we,!Ze),Qe=_e>0?_e:600,Ye=L[re],qe=fe&&w.length>0,et=qe?Math.max(0,Qe-36):Qe,tt=e=>e>=t-r&&e<=k+r,rt=v.filter(e=>Number.isFinite(e.ms)&&tt(e.ms)).slice().sort((e,t)=>e.ms-t.ms),nt="spread"===M?b.map(e=>new Date(e.date).getTime()).filter(e=>Number.isFinite(e)):[],lt=$([t,...[...rt.map(e=>e.ms),...nt].filter(e=>e>t&&e<k),k],et,"compressed"===(at=M)?{}:"spread"===at?{maxTimeShare:1/0}:{maxTimeShare:1/0,minGapPx:0});var at;const st=lt.xByMs,it=rt.filter(e=>!e.provisional),ot=ce??(it.length>0?it[it.length-1].key:null),ct=rt.map((e,t)=>{const r=e.date??$e(e.ms),n=(e.priority??0)>0||"report"===e.kind,l=function(e){const t=e.kind??"default";return"default"===t&&e.glyph&&"none"!==e.glyph?j[e.glyph]??t:t}(e);return{key:e.key,ms:e.ms,x:st(e.ms),baseX:st(e.ms),kind:l,label:e.label,dateText:r,detail:e.detail,preview:e.preview,glyph:F(e,l,0===t&&"default"===l),role:e.key===ot?"current":n?"dot":"key",widthPx:fe?Math.max(16,K(e.caption??"")+6):De[e.key]||N(e.label,r),collapsible:n,onClick:e.onClick,onOpen:e.onOpen,isItem:!0,caption:e.caption,provisional:!!e.provisional,isCap:!1}}),ut=b.map(e=>({marker:e,ms:new Date(e.date).getTime()})).filter(({ms:e})=>Number.isFinite(e)&&tt(e)).map(({marker:e,ms:t})=>{const r=`marker-${e.id}`,n=$e(t);return{key:r,ms:t,x:st(t),baseX:st(t),kind:e.kind,label:e.label,dateText:n,detail:e.detail,preview:e.preview,glyph:e.glyph??A[e.kind].glyph,role:"key",widthPx:De[r]||N(e.label,n),collapsible:!1,onClick:e.onClick?()=>e.onClick?.(e):void 0,onOpen:e.onOpen?()=>e.onOpen?.(e):void 0,isItem:!1,provisional:!1,isCap:!1}}),mt=qe?(()=>{const e=w[w.length-1],t=w.slice(0,-1).map(e=>e.label);return[{key:e.key,ms:k+r,x:Qe,baseX:Qe,kind:e.kind??"default",label:e.label,dateText:ve.notReached,detail:t.length>0?ve.alsoToCome(t):void 0,glyph:void 0,role:"key",widthPx:16,collapsible:!1,isItem:!1,provisional:!1,isCap:!0}]})():[],dt=fe&&xe&&!qe?[{key:xe.key,ms:k,x:et,baseX:et,kind:"default",label:xe.label,dateText:xe.dateText??$e(k),detail:xe.detail,glyph:void 0,role:"key",widthPx:16,collapsible:!1,isItem:!1,provisional:!1,isCap:!0}]:[],ht=[...ct,...ut,...mt,...dt].sort((e,t)=>e.x-t.x||e.ms-t.ms),pt=ie?.start??ve.start($e(t)),xt=null==pt||!1===pt?0:"string"==typeof pt?Math.ceil(K(pt)):96,ft="lanes"===re?function(e,t={}){const r=t.minPitchPx??40,n=[];let l=0;for(;l<e.length;){const t=e[l];if(!t.collapsible){n.push({type:"item",mark:t}),l+=1;continue}let a=l+1;for(;a<e.length&&e[a].collapsible&&e[a].kind===t.kind;)a+=1;const s=e.slice(l,a),i=s.length>1&&s.every((e,t)=>{if(0===t)return!0;const n=s[t-1],l=Math.max(r,Math.max(e.widthPx,n.widthPx)+8);return e.x-n.x<l});if(s.length>=3||i)n.push({type:"cluster",kind:t.kind,members:s});else for(const e of s)n.push({type:"item",mark:e});l=a}return n}(ht):[],yt=function(e,t=16){const r=[];let n=0;for(;n<e.length;){let l=n+1;for(;l<e.length&&e[l].x-e[l-1].x<t;)l+=1;if(l-n===1)r.push({type:"item",mark:e[n]});else{const t=e.slice(n,l),a=new Set(t.map(e=>e.kind));r.push({type:"cluster",kind:1===a.size?t[0].kind:P,members:t})}n=l}return r}(ht),kt=e=>"cluster"===e.type?`fold-${e.members[0].key}`:e.mark.key,gt=/* @__PURE__ */new Map;for(const e of yt)if("cluster"===e.type)for(const t of e.members)gt.set(t.key,kt(e));const Mt=Ue??Ie??We,vt=ft.find(e=>"cluster"===e.type&&(e=>"cluster"===e.type?`cluster-${e.members[0].key}`:e.mark.key)(e)===Mt)??yt.find(e=>"cluster"===e.type&&kt(e)===Mt),bt=e=>({x:e.baseX,widthPx:e.widthPx}),$t=vt&&"cluster"===vt.type?vt.members.map(bt):ue?ht.filter(e=>e.ms>=ue[0]&&e.ms<=ue[1]).map(bt):[],wt=$t.length>1?I(lt,$t,et):lt,Pt=wt!==lt;if(Pt)for(const e of ht)e.isCap||(e.x=wt.xByMs(e.ms));const Nt=ht.some(e=>e.x<14),Ct=Pt&&vt?Mt:null,Tt=e=>({key:e.key,mark:e,members:[e],x:e.x,kind:e.kind,openable:!1}),Bt=Ze?ht.map(Tt):yt.flatMap(e=>{if("item"===e.type)return[Tt(e.mark)];const t=kt(e);if(t===Ct&&(r=e.members).every((e,t)=>0===t||e.x-r[t-1].x>=16))return e.members.map(Tt);var r;const n=e.members.map(e=>e.x);return[{key:t,mark:null,members:e.members,x:n.reduce((e,t)=>e+t,0)/n.length,kind:e.kind,openable:new Set(e.members.map(e=>e.ms)).size>1}]}),Lt=/* @__PURE__ */new Map;for(const e of Bt)for(const t of e.members)Lt.set(t.key,e.key);const Dt=yt.find(e=>"cluster"===e.type&&kt(e)===Ct),Kt=Dt&&"cluster"===Dt.type?{from:Math.min(...Dt.members.map(e=>e.x))-16,to:Math.max(...Dt.members.map(e=>e.x))+16}:null,At=u(Ct),[jt,Ft]=m(!1);h(()=>{if(At.current===Ct)return;At.current=Ct,Ft(!0);const e=setTimeout(()=>Ft(!1),240);return()=>clearTimeout(e)},[Ct]);const Rt=ht.map(e=>`${e.key} ${e.label} ${e.dateText}`).join("|");s(()=>{const e=Pe.current;if(!e)return;const t={};for(const r of Array.from(e.children)){const e=r.dataset.laneKey,n=r.getBoundingClientRect().width;e&&n>0&&(t[e]=n)}Ke(e=>function(e,t){const r=Object.keys(e);return r.length===Object.keys(t).length&&r.every(r=>Math.abs((e[r]??0)-(t[r]??0))<.5)}(e,t)?e:t)},[Rt]);const Ut=`${re}|${M}|${ht.map(e=>`${e.key}@${e.ms}`).join("|")}`,[Ht,It]=m(Ut),Ot=me&&Ht===Ut;h(()=>{Ht!==Ut&&It(Ut)},[Ht,Ut]);const Wt=Math.min(28,340/Math.max(1,ht.length-1)),zt=O(ae?.stops),St=e=>{const r=Math.min(Math.max(e,t),k);if(!zt)return r;let n=zt[0];for(const e of zt)Math.abs(e-r)<Math.abs(n-r)&&(n=e);return n},Et=ae?St(ae.valueMs):null,Xt=se&&ae?ct.filter(e=>!zt||zt.includes(e.ms)).map(e=>({key:e.key,ms:e.ms})):[],Vt=function(e,t,r={}){const n=Number.isFinite(r.speed)&&(r.speed??0)>0?r.speed:1,l=Math.max(0,r.dwellMs??700)/n,a=t.filter(e=>Number.isFinite(e.ms)).slice().sort((e,t)=>e.ms-t.ms),s=[];for(let t=0;t+1<a.length;t++){const i=a[t],o=a[t+1],c=e.xByMs(i.ms),u=e.xByMs(o.ms),m=Math.max(0,u-c),d=m<=.5||r.reducedMotion?0:C(350*m/100,450,1400)/n;s.push({fromKey:i.key,toKey:o.key,fromMs:i.ms,toMs:o.ms,fromPx:c,toPx:u,lengthPx:m,durationMs:d,dwellMs:l,msByPx:e.msByPx})}return s}(wt,Xt,{speed:se?.speed,reducedMotion:ke}),[Jt,Gt]=m(null),Zt=u(null),_t=u({segments:Vt,value:Et,playback:se});h(()=>{_t.current={segments:Vt,value:Et,playback:se}});const Qt=u(null),Yt=p(e=>{null===e&&null===Qt.current||(Qt.current=e,_t.current.playback?.onProgress?.(e))},[]),qt=p(()=>{Zt.current=null,Gt(null),Yt(null),_t.current.playback?.onStop?.()},[Yt]),er=!!se?.playing&&!!ae;h(()=>{if(!er)return;const e=_t.current,t=null===e.value?-1:e.segments.findIndex(t=>t.fromMs===e.value);if(t<0)return void qt();Zt.current&&Zt.current.index===t||(Zt.current={index:t,phase:"rest",t:0,restLeftMs:e.segments[t].dwellMs,sinceMs:null});let r,n=0;const l=e=>Gt(t=>t&&t.px===e.px&&t.ms===e.ms?t:e),a=()=>{clearTimeout(r);const e=Zt.current;"rest"===e?.phase&&(r=setTimeout(s,Math.max(0,e.restLeftMs)))},s=()=>{const e=Zt.current;if("rest"!==e?.phase)return;const t=_t.current.segments[e.index];t?(Zt.current={index:e.index,phase:"glide",t:0,restLeftMs:0,sinceMs:null},l(B(t,0))):qt()},i=e=>{const t=_t.current,r=Zt.current;if(!r)return;const s=function(e,t,r){const n=e[t.index];if(!n)return{cursor:null,at:null,arrived:null,progress:null};const l=null===t.sinceMs?0:Math.max(0,r-t.sinceMs);if("rest"===t.phase){const e=t.restLeftMs-l;return e>0?{cursor:{...t,restLeftMs:e,sinceMs:r},at:B(n,0),arrived:null,progress:null}:{cursor:{index:t.index,phase:"glide",t:0,restLeftMs:0,sinceMs:r},at:B(n,0),arrived:null,progress:null}}const a=n.durationMs>0?Math.min(1,t.t+l/n.durationMs):1,s=B(n,a);if(a<1)return{cursor:{...t,t:a,sinceMs:r},at:s,arrived:null,progress:{fromKey:n.fromKey,toKey:n.toKey,t:T(a),ms:s.ms}};const i=e[t.index+1];return{cursor:i?{index:t.index+1,phase:"rest",t:0,restLeftMs:i.dwellMs,sinceMs:r}:null,at:s,arrived:{key:n.toKey,ms:n.toMs},progress:null}}(t.segments,r,e);Zt.current=s.cursor,s.at&&l(s.at),Yt(s.progress),s.arrived&&t.playback?.onArrive(s.arrived.key,s.arrived.ms),s.cursor?(s.cursor.phase===r.phase&&s.cursor.index===r.index||a(),n=requestAnimationFrame(i)):qt()};return a(),n=requestAnimationFrame(i),()=>{cancelAnimationFrame(n),clearTimeout(r),Zt.current&&(Zt.current.sinceMs=null,Yt(null))}},[er,qt,Yt]);const tr=ct.filter(e=>!e.provisional),rr=ae?Jt?Jt.ms:Et:void 0!==ee?ee:tr.length>0?null===ge?tr[tr.length-1].ms:Math.min(tr[tr.length-1].ms,ge):null,nr=new Set(he??[]),lr=ht.filter(e=>nr.has(e.key)).map(e=>e.x),ar=lr.length>0?{from:Math.min(...lr),to:Math.max(...lr)}:null,sr=p(()=>{clearTimeout(Te.current),clearTimeout(Be.current),je(null),Re(null),He(null),Oe(null),ze(null)},[]);h(()=>()=>{clearTimeout(Te.current),clearTimeout(Be.current)},[]),h(()=>{const e=Le.current;e&&(Le.current=null,Ce.current.get(e)?.focus())});const ir=null!==Fe||null!==Ue||null!==Ie||null!==We;h(()=>{if(ir)return i(e=>"Escape"===e.key&&(sr(),!0))},[ir,sr]);const or=p((e,t)=>{if(!e)return;const r=e.offsetWidth/2;let n=r>0?Math.max(r,Math.min(t,Qe-r)):t;const a=e.parentElement;if(r>0&&a){const t=l(e),s=a.getBoundingClientRect().left,i=t.left+8+r-s,o=t.right-8-r-s;i<=o&&(n=Math.max(i,Math.min(n,o)))}e.style.left=`${n}px`,e.style.setProperty("--rosh-tl-arrow",`${r+(t-n)}px`)},[Qe]),cr=Bt.find(e=>e.key===Fe)??null,ur=cr?cr.x:0;s(()=>{or(Ne.current,ur)},[or,Fe,ur]);const mr=Et??void 0,dr=u(null);h(()=>{if(void 0===mr)return;const e=wt.xByMs(mr),t=dr.current;if(dr.current=e,null===t||e<=t)return;const r=[];for(const n of ht){if(n.x<=t||n.x>e)continue;const l=Ce.current.get(Lt.get(n.key)??n.key);l&&(l.classList.add("is-hit"),r.push(setTimeout(()=>l.classList.remove("is-hit"),460)))}return()=>{for(const e of r)clearTimeout(e)}},[mr]);const hr=Bt.map(e=>e.key),pr=ot?Lt.get(ot)??null:null,xr=Se&&hr.includes(Se)?Se:pr&&hr.includes(pr)?pr:hr[0],fr=e=>{const t=hr.indexOf(e.target.dataset?.timelineKey??"");if(t<0)return;const r="ArrowRight"===e.key||"ArrowDown"===e.key?t+1:"ArrowLeft"===e.key||"ArrowUp"===e.key?t-1:"Home"===e.key?0:"End"===e.key?hr.length-1:-1;r<0||r>hr.length-1||(e.preventDefault(),Ee(hr[r]),Ce.current.get(hr[r])?.focus())},yr=()=>clearTimeout(Be.current),kr=e=>{yr(),ze(e)},gr=()=>{clearTimeout(Be.current),Be.current=setTimeout(()=>ze(null),260)},Mr=e=>{Ct&>.get(e)===Ct?yr():(yr(),ze(null))},vr=e=>{clearTimeout(Te.current),je(e),Re(e),pe?.((e=>{const t=Bt.find(t=>t.key===e);return t?.members[0]?.key??e})(e))},br=e=>{je(t=>t===e?null:t),clearTimeout(Te.current),Te.current=setTimeout(()=>Re(t=>t===e?null:t),160),pe?.(null)},$r=e=>({type:"button","data-timeline-node":e.isCap?"cap":e.isItem?"item":"marker","data-timeline-key":e.key,"aria-label":U(e),"aria-describedby":Fe===e.key?Xe:void 0,tabIndex:e.key===xr?0:-1,ref:t=>{t?Ce.current.set(e.key,t):Ce.current.delete(e.key)},onMouseEnter:()=>{Mr(e.key),vr(e.key)},onMouseLeave:()=>{gr(),br(e.key)},onFocus:()=>{Mr(e.key),vr(e.key),Ee(e.key)},onBlur:()=>{gr(),br(e.key)},onPointerDown:e=>e.stopPropagation(),onClick:t=>{t.stopPropagation(),e.onClick?.(),e.isItem&&le?.(e.key)}}),wr=e=>{return{type:"button","data-timeline-node":"fold","data-timeline-key":e.key,"data-timeline-count":String(e.members.length),"aria-label":(t=e.members,r=ve,r.events(t.length,t.map(U))),"aria-describedby":Fe===e.key?Xe:void 0,tabIndex:e.key===xr?0:-1,ref:t=>{t?Ce.current.set(e.key,t):Ce.current.delete(e.key)},onMouseEnter:()=>{e.openable?kr(e.key):vr(e.key)},onMouseLeave:()=>{gr(),br(e.key)},onFocus:()=>{yr(),vr(e.key),Ee(e.key)},onBlur:()=>{gr(),br(e.key)},onPointerDown:e=>e.stopPropagation(),onClick:t=>{if(t.stopPropagation(),!e.openable)return void vr(e.key);kr(e.key);const r=e.members[0];Ee(r.key),Le.current=r.key}};var t,r},Pr="lanes"!==re||ht.length>1;if(Ze)/* @__PURE__ */
|
|
78
|
+
return x("div",{ref:Me,children:/* @__PURE__ */x(E,{marks:ht.filter(e=>!e.isCap),pending:w,currentKey:ot,todayMs:ge,reveal:Ot,ariaLabel:de,step:Wt,nodeProps:$r,onKeyDown:fr})});const Nr=(e,t)=>null==e||!1===e?null:/* @__PURE__ */x("span",{"aria-hidden":"true",className:"rosh-tl-flank"+(t?" is-end":""),"data-timeline-part":t?"end-caption":"start-caption",style:{paddingTop:Ye.rail-3+"px"},children:e});/* @__PURE__ */
|
|
79
79
|
return f("div",{ref:Me,className:"rosh-tl-body"+(w.length>0&&!fe?"":" is-solo"),children:[
|
|
80
|
-
/* @__PURE__ */f("div",{className:"flex items-stretch gap-3",children:[fe&&
|
|
81
|
-
/* @__PURE__ */x("div",{className:"rosh-tl-stage",style:{height:`${q(Ye,
|
|
82
|
-
/* @__PURE__ */x(X,{axis:wt,geo:Ye,fillTo:
|
|
83
|
-
/* @__PURE__ */x("i",{"aria-hidden":"true",className:"rosh-tl-tail","data-timeline-part":"tail",style:{left:`${et}px`,width:Qe-et+"px",top:Ye.rail+3-1+"px"}}),
|
|
80
|
+
/* @__PURE__ */f("div",{className:"flex items-stretch gap-3",children:[fe&&Nr(pt,!1),
|
|
81
|
+
/* @__PURE__ */x("div",{className:"rosh-tl-stage",style:{height:`${q(Ye,Pr,oe.length>0&&!fe)}px`},children:/* @__PURE__ */f("div",{ref:we,className:`rosh-tl-layer${jt?" is-zooming":""}${Jt?" is-gliding":""}`,onMouseMove:e=>{if(!Kt)return;const t=we.current?.getBoundingClientRect();if(!t)return;const r=e.clientX-t.left;r>=Kt.from&&r<=Kt.to?yr():gr()},onMouseLeave:gr,children:[!fe&&/* @__PURE__ */x(W,{marks:ht,innerRef:Pe}),
|
|
82
|
+
/* @__PURE__ */x(X,{axis:wt,geo:Ye,fillTo:rr,reveal:Ot,trackPx:et,restTo:ae&&!Jt&&null!=ae.restMs&&ae.restMs!==Et?Math.min(Math.max(ae.restMs,t),k):null,tweened:!!ae&&(null==ae.restMs||ae.restMs===Et)}),qe&&
|
|
83
|
+
/* @__PURE__ */x("i",{"aria-hidden":"true",className:"rosh-tl-tail","data-timeline-part":"tail",style:{left:`${et}px`,width:Qe-et+"px",top:Ye.rail+3-1+"px"}}),ar&&/* @__PURE__ */x("div",{"aria-hidden":"true",className:"rosh-tl-band","data-timeline-part":"highlight",style:{left:ar.from-10+"px",width:ar.to-ar.from+20+"px",top:Ye.rail-7+"px",height:"20px"}}),
|
|
84
84
|
/* @__PURE__ */x(z,{startMs:t,endMs:k,axis:wt,geo:Ye,reveal:Ot}),
|
|
85
|
-
/* @__PURE__ */x(V,{geo:Ye,caption:fe?null:pt,endCaption:fe?null:ie?.end,around:Nt,reveal:Ot,trackPx:Qe}),fe&&/* @__PURE__ */x(G,{nodes:Bt,geo:Ye,reveal:Ot}),null!==ge&&ge>t&&ge<=k+
|
|
86
|
-
/* @__PURE__ */x("ol",{className:"rosh-tl-nodes","aria-label":de,onKeyDown:
|
|
87
|
-
return x("li",{children:/* @__PURE__ */x("button",{
|
|
88
|
-
return f("li",{...
|
|
89
|
-
/* @__PURE__ */f("button",{...
|
|
90
|
-
return x("li",{...i.key===ot?{"aria-current":"step"}:{},children:/* @__PURE__ */f("button",{
|
|
91
|
-
/* @__PURE__ */x("span",{className:"rosh-tl-name",children:
|
|
92
|
-
/* @__PURE__ */x("span",{className:"rosh-tl-date",children:
|
|
85
|
+
/* @__PURE__ */x(V,{geo:Ye,caption:fe?null:pt,endCaption:fe?null:ie?.end,around:Nt,reveal:Ot,trackPx:Qe}),fe&&/* @__PURE__ */x(G,{nodes:Bt,geo:Ye,reveal:Ot}),null!==ge&&ge>t&&ge<=k+r&&/* @__PURE__ */x(J,{x:wt.xByMs(Math.min(ge,k)),geo:Ye,trackPx:Qe,label:$e(ge),reveal:Ot}),!fe&&oe.map(e=>/* @__PURE__ */x(Z,{phase:e,geo:Ye,xOf:wt.xByMs},e.key)),
|
|
86
|
+
/* @__PURE__ */x("ol",{className:"rosh-tl-nodes","aria-label":de,onKeyDown:fr,children:Bt.map((e,t)=>{const r=t=>null!==t&&e.members.some(e=>e.key===t),l=`${Ye.rail+3}px`,a=Ot?n(t,Wt):{},s=(e=>!!ar&&e.x>=ar.from-.5&&e.x<=ar.to+.5)(e)?" is-lit":"";if(e.mark?.isCap)/* @__PURE__ */
|
|
87
|
+
return x("li",{children:/* @__PURE__ */x("button",{...$r(e.mark),className:`rosh-tl-node rosh-tl-mark is-cap${s}${Ot?" rosh-tl-pop":""}`,style:{left:`${e.x}px`,top:l,...a}})},e.key);if(!e.mark){const t=e.kind===P,n=R(t?"default":e.kind,"key"),i=t?void 0:A[e.kind]?.glyph;/* @__PURE__ */
|
|
88
|
+
return f("li",{...r(ot)?{"aria-current":"step"}:{},children:[
|
|
89
|
+
/* @__PURE__ */f("button",{...wr(e),className:`${n.className} is-fold${t?" is-mixed":""}${r(ne)?" is-active":""}${s}${Ot?" rosh-tl-pop":""}`,style:{...n.style,left:`${e.x}px`,top:l,...a},children:[i&&/* @__PURE__ */x(g,{name:i}),t&&/* @__PURE__ */f("span",{"aria-hidden":"true",className:"rosh-tl-foldnum",children:["×",e.members.length]})]}),!t&&/* @__PURE__ */f("i",{"aria-hidden":"true",className:"rosh-tl-count"+(Ot?" rosh-tl-fade":""),style:{left:`${e.x}px`,top:l},children:["×",e.members.length]})]},e.key)}const i=e.mark,o=R(i.kind,i.role,i.provisional),{glyph:c}=i;/* @__PURE__ */
|
|
90
|
+
return x("li",{...i.key===ot?{"aria-current":"step"}:{},children:/* @__PURE__ */f("button",{...$r(i),className:`${o.className}${i.key===ne?" is-active":""}${s}${Ot?" rosh-tl-pop":""}`,style:{...o.style,left:`${i.x}px`,top:l,...a},children:[c&&/* @__PURE__ */x(g,{name:c}),"current"===i.role&&/* @__PURE__ */x("span",{"aria-hidden":"true",className:"rosh-tl-pulse bg-blue-600"+(Ot?" is-on":"")})]})},i.key)})}),"lanes"===re?/* @__PURE__ */x(Q,{groups:ft,trackPx:Qe,geo:Ye,startMs:t,endMs:k,currentKey:ot,hoveredKey:Ae,reveal:Ot,step:Wt,zoomedKey:Ct,popId:Ve,aimBubble:or,startCaptionPx:xt,openCluster:Ue,setOpenCluster:He,previewCluster:Ie,setPreviewCluster:Oe,setZoomKey:ze}):"active"===re?/* @__PURE__ */x(_,{nodes:Bt,trackPx:Qe,geo:Ye,activeKey:ne,hoveredKey:Ae,currentKey:ot}):null,cr&&/* @__PURE__ */x("div",{ref:Ne,id:Xe,role:"tooltip",className:"rosh-tl-bubble"+(cr.members.some(e=>e.preview)?" is-preview":""),"data-timeline-part":"tooltip",style:{top:`${Ye.rail+6+6}px`},onMouseEnter:()=>{yr(),vr(cr.key)},onMouseLeave:()=>{gr(),br(cr.key)},onFocus:()=>{yr(),vr(cr.key)},onBlur:()=>{gr(),br(cr.key)},children:cr.mark?/* @__PURE__ */f(y,{children:[
|
|
91
|
+
/* @__PURE__ */x("span",{className:"rosh-tl-name",children:cr.mark.label}),
|
|
92
|
+
/* @__PURE__ */x("span",{className:"rosh-tl-date",children:cr.mark.dateText}),cr.mark.preview?/* @__PURE__ */x("div",{className:"rosh-tl-preview","data-timeline-part":"preview",children:cr.mark.preview}):cr.mark.detail&&/* @__PURE__ */x("span",{className:"rosh-tl-detail",children:cr.mark.detail}),(cr.mark.onOpen??cr.mark.onClick)&&/* @__PURE__ */x("button",{type:"button",className:"rosh-tl-bubble-open text-blue-600","data-timeline-part":"bubble-open",onClick:()=>(cr.mark?.onOpen??cr.mark?.onClick)?.(),children:ve.openButton})]}):
|
|
93
93
|
/* @__PURE__ */f("div",{className:"rosh-tl-fold-list","data-timeline-part":"fold-members",children:[
|
|
94
|
-
/* @__PURE__ */f("p",{className:"rosh-tl-popover-head",children:["×",
|
|
95
|
-
/* @__PURE__ */x("ol",{children:
|
|
94
|
+
/* @__PURE__ */f("p",{className:"rosh-tl-popover-head",children:["×",cr.members.length]}),
|
|
95
|
+
/* @__PURE__ */x("ol",{children:cr.members.map(e=>/* @__PURE__ */f("li",{children:[
|
|
96
96
|
/* @__PURE__ */f("p",{className:"rosh-tl-foldrow",children:[
|
|
97
97
|
/* @__PURE__ */x("span",{children:e.label}),
|
|
98
98
|
/* @__PURE__ */x("span",{className:"rosh-tl-date",children:e.dateText})]}),e.preview?/* @__PURE__ */x("div",{className:"rosh-tl-preview","data-timeline-part":"preview",children:e.preview}):e.detail&&/* @__PURE__ */x("span",{className:"rosh-tl-detail",children:e.detail})]},e.key))})]})}),ae&&null!==Et&&
|
|
99
|
-
/* @__PURE__ */x(Y,{thumb:ae,value:Et,snap:St,axis:wt,geo:Ye,startMs:t,endMs:k,trackPx:Qe,layerRef:we,glide:Jt,onScrub:se?qt:void 0,nodes:Xt,onProgress:Yt})]})}),fe&&
|
|
99
|
+
/* @__PURE__ */x(Y,{thumb:ae,value:Et,snap:St,axis:wt,geo:Ye,startMs:t,endMs:k,trackPx:Qe,layerRef:we,glide:Jt,onScrub:se?qt:void 0,nodes:Xt,onProgress:Yt})]})}),fe&&Nr(ie?.end,!0)]}),w.length>0&&!fe&&/* @__PURE__ */x(S,{pending:w,reveal:Ot})]})}export{g as TimelineGlyph,M as TimelineMilestoneIcon,v as TimelineProgressIcon,ee as TimelineTrack};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{BrandAssetEditor as default}from"../chunk-QO7UHTUE.js";import"../chunk-UHQBHSWL.js";import"../chunk-6KBDNYRW.js";import"../chunk-YMUHIJDJ.js";import"../chunk-
|
|
2
|
+
export{BrandAssetEditor as default}from"../chunk-QO7UHTUE.js";import"../chunk-UHQBHSWL.js";import"../chunk-6KBDNYRW.js";import"../chunk-YMUHIJDJ.js";import"../chunk-MI67DI3H.js";import"../chunk-25RR3GQW.js";import"../chunk-HNIIDDLJ.js";import"../chunk-EFKJLUYP.js";import"../chunk-CCPUNN4F.js";import"../chunk-ROKUEMAK.js";import"../chunk-ITEOA45V.js";import"../chunk-JMGDGNM7.js";import"../chunk-EVYD6UFQ.js";import"../chunk-M5K4AX4E.js";import"../chunk-ISVODSRP.js";import"../chunk-J75ZT2JQ.js";import"../chunk-R2VKEMZH.js";import"../chunk-G67CJAQ2.js";import"../chunk-SOZCWT6I.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-UQYNPYF4.js";import"../chunk-MRJKZWWV.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-DEJIH3ZQ.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{MEDIA_FILES_DRAG_TYPE,MEDIA_FILE_DRAG_TYPE,MEDIA_FOLDER_DRAG_TYPE,MediaLibrary as default,readMediaFileDrag}from"../chunk-
|
|
2
|
+
export{MEDIA_FILES_DRAG_TYPE,MEDIA_FILE_DRAG_TYPE,MEDIA_FOLDER_DRAG_TYPE,MediaLibrary as default,readMediaFileDrag}from"../chunk-767USLF5.js";import"../chunk-FCWBO7I3.js";import"../chunk-FXG7TOZN.js";import"../chunk-HWJQLLJA.js";import"../chunk-CGUMJZUB.js";import"../chunk-IC72MGON.js";import"../chunk-3RX5KCUH.js";import"../chunk-3TCGXYUC.js";import"../chunk-SACUSHVN.js";import"../chunk-YM7AWNMY.js";import"../chunk-3YCU6V3U.js";import"../chunk-JWUNK2PW.js";import"../chunk-QIPO4EVJ.js";import"../chunk-KITSIQCV.js";import"../chunk-EO5RLFRX.js";import"../chunk-K5YT5PMJ.js";import"../chunk-BNPJHOAC.js";import"../chunk-ZDDMFFQK.js";import"../chunk-2NMW66P5.js";import"../chunk-6KBDNYRW.js";import"../chunk-VLKDWKVR.js";import"../chunk-OLFYNMTD.js";import"../chunk-LACL4MAR.js";import"../chunk-HNIIDDLJ.js";import"../chunk-EFKJLUYP.js";import"../chunk-HTHNDX32.js";import"../chunk-CGZBDI6C.js";import"../chunk-QMBMK6PP.js";import"../chunk-ID35S5Y6.js";import"../chunk-PT4GMPUB.js";import"../chunk-3DSGJIC7.js";import"../chunk-UZFFSZFI.js";import"../chunk-SV5RRBVA.js";import"../chunk-AYZY3YNC.js";import"../chunk-CCPUNN4F.js";import"../chunk-ROKUEMAK.js";import"../chunk-ITEOA45V.js";import"../chunk-EIFNESXS.js";import"../chunk-PR6FNBKR.js";import"../chunk-RIG5FEVS.js";import"../chunk-NDWX5Z4D.js";import"../chunk-VWGWZY7A.js";import"../chunk-7QSDPSXP.js";import"../chunk-ZGIAMYTI.js";import"../chunk-F3ZOO23R.js";import"../chunk-UGTRSRIW.js";import"../chunk-DWGYC7OD.js";import"../chunk-JMGDGNM7.js";import"../chunk-GOAFMGUI.js";import"../chunk-URHGHXDN.js";import"../chunk-5QFPTDQF.js";import"../chunk-EVYD6UFQ.js";import"../chunk-M5K4AX4E.js";import"../chunk-ISVODSRP.js";import"../chunk-J75ZT2JQ.js";import"../chunk-R2VKEMZH.js";import"../chunk-G67CJAQ2.js";import"../chunk-SOZCWT6I.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-TMSSR5UH.js";import"../chunk-UQYNPYF4.js";import"../chunk-MRJKZWWV.js";import"../chunk-MAFUXCPZ.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-DEJIH3ZQ.js";import"../chunk-C3QOHMR6.js";
|
package/dist/icons/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{ICON_NAMES,isIconName}from"../chunk-PLD54WSR.js";export{
|
|
2
|
+
export{ICON_NAMES,isIconName}from"../chunk-PLD54WSR.js";export{BRAND_ICON_NAMES,isBrandIconName}from"../chunk-RQGLDRRF.js";export{BRAND_MAX_HEIGHT,BRAND_MIN_HEIGHT_PX,brandBox}from"../chunk-64ACCUNN.js";export{ICON_SET_FOR_THEME,THEME_ICON_SETS,iconSetFor,loadIconSet}from"../chunk-VQCKMT5F.js";export{Icon}from"../chunk-ISVODSRP.js";export{activeIconSet,iconSets,iconsVersion,registerIconSet,registerIcons,resolveIcon,setDefaultIconSet,setIconSet,subscribeIcons}from"../chunk-J75ZT2JQ.js";
|
package/dist/index.d.ts
CHANGED
|
@@ -106,7 +106,7 @@ export { default as LoadingSpinner, LoadingSpinnerProps, SpinnerRing, SpinnerRin
|
|
|
106
106
|
export { default as MetricBar, MetricBarProps } from './shell/MetricBar.js';
|
|
107
107
|
export { default as MetricBarLegend, MetricBarLegendLink, MetricBarLegendProps } from './shell/MetricBarLegend.js';
|
|
108
108
|
export { default as BudgetBar, BudgetBarProps, BudgetState, budgetState } from './shell/BudgetBar.js';
|
|
109
|
-
export { T as TimelineMarker, a as TimelineMarkerKind, b as TimelineScrubProgress, c as TimelineTrack, d as TimelineTrackItem, e as TimelineTrackKind, f as TimelineTrackPending, g as TimelineTrackPhase, h as TimelineTrackPlayback, i as TimelineTrackProps, j as TimelineTrackThumb } from './TimelineTrack-
|
|
109
|
+
export { T as TimelineMarker, a as TimelineMarkerKind, b as TimelineScrubProgress, c as TimelineTrack, d as TimelineTrackItem, e as TimelineTrackKind, f as TimelineTrackPending, g as TimelineTrackPhase, h as TimelineTrackPlayback, i as TimelineTrackProps, j as TimelineTrackThumb } from './TimelineTrack-DCTqfW6Z.js';
|
|
110
110
|
export { Milestone, MilestoneKind, default as MilestoneTimeline, MilestoneTimelineProps } from './shell/MilestoneTimeline.js';
|
|
111
111
|
export { POST_PRODUCTION_STATUSES, default as ProductionTimeline, ProductionTimelineProps, ProductionTimelineSnapshot, ProgressItem, STAGES, TimelineReport, UseProductionTimelineOpts, calcOverall, calcReportOverall, useProductionTimeline } from './shell/ProductionTimeline.js';
|
|
112
112
|
export { fmtSliderDate, toDayMs } from './shell/timelineDates.js';
|