efficient-shell 7.19.0 → 7.21.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.
Files changed (40) hide show
  1. package/README.md +42 -0
  2. package/dist/{Browser-62T2OSLK.js → Browser-CMG4E355.js} +14 -14
  3. package/dist/{Calculator-YSHOGYHB.js → Calculator-QLVWIU4C.js} +22 -22
  4. package/dist/{CurrencyConverter-V6LH7VQP.js → CurrencyConverter-7UT6W5OA.js} +9 -9
  5. package/dist/{Documents-R6IE64IZ.js → Documents-3HI2X2CW.js} +7 -7
  6. package/dist/Files-R25E77W4.js +87 -0
  7. package/dist/{Notepad-2QJH5T7B.js → Notepad-XMDF3VX7.js} +10 -10
  8. package/dist/{PomodoroTimer-M7BLRWTH.js → PomodoroTimer-3OJYMVX7.js} +47 -47
  9. package/dist/{Preview-3ZQ7SSHV.js → Preview-VQOOKLO5.js} +24 -24
  10. package/dist/{Spreadsheet-OBFCMT3L.js → Spreadsheet-25C2SXPH.js} +11 -11
  11. package/dist/{Stock-XDKUT7RW.js → Stock-5RQ2JXWL.js} +3 -3
  12. package/dist/{Weather-XGIJGO23.js → Weather-3AMX2QSU.js} +14 -14
  13. package/dist/{WorldClock-V6S6QEXK.js → WorldClock-JNHPO3ZQ.js} +6 -6
  14. package/dist/apps/index.js +1 -1
  15. package/dist/bin/ui-check.js +1 -1
  16. package/dist/brand.css +1 -1
  17. package/dist/{chunk-AJCAZNBF.js → chunk-5V3IFQ7F.js} +1 -1
  18. package/dist/{chunk-NUCPJVKD.js → chunk-7LRJBINZ.js} +36 -36
  19. package/dist/chunk-BVYOUFSW.js +19 -0
  20. package/dist/{chunk-VFBUDSMF.js → chunk-GIWC2ZTG.js} +2 -2
  21. package/dist/{chunk-7JN73EKI.js → chunk-HMCE2MKM.js} +1 -1
  22. package/dist/chunk-IJ7RXIWX.js +13 -0
  23. package/dist/chunk-OA7DQ77U.js +1025 -0
  24. package/dist/chunk-VOFDPOB6.js +1 -0
  25. package/dist/{chunk-3LEHVM4D.js → chunk-Y6KFHPIP.js} +1 -1
  26. package/dist/chunk-YLWIEEDW.js +1 -0
  27. package/dist/{chunk-3FLFIKAL.js → chunk-ZAKN5MPN.js} +1 -1
  28. package/dist/{index-C4iOtAIZ.d.ts → index-DbNqOkOy.d.ts} +74 -4
  29. package/dist/index.d.ts +2 -2
  30. package/dist/index.js +631 -631
  31. package/dist/map/index.js +3 -3
  32. package/dist/telemetry/index.js +1 -1
  33. package/dist/ui/index.d.ts +1 -1
  34. package/dist/ui/index.js +1 -1
  35. package/package.json +1 -1
  36. package/dist/Files-RVESLH5D.js +0 -87
  37. package/dist/chunk-7BX3JQBP.js +0 -19
  38. package/dist/chunk-FTZ5WHJM.js +0 -1
  39. package/dist/chunk-Q2HEVH2C.js +0 -1025
  40. package/dist/chunk-WYNQLAKD.js +0 -13
package/dist/map/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use client";
2
- import{Button_default as e}from"../chunk-WYNQLAKD.js";import"../chunk-JTNKC4CR.js";import{rootIsDark as t,ROOT_THEME_ATTRIBUTES as n}from"../chunk-7IQ3B77H.js";import"../chunk-FIEA5CGB.js";import"../chunk-D65T4H6J.js";import{useShellStrings as r}from"../chunk-QRCDQPJA.js";import"../chunk-C3QOHMR6.js";import{Icon as o}from"../chunk-ZGUQLVY4.js";import{useRef as a,useState as l,useEffect as i,useCallback as s,useMemo as c,useSyncExternalStore as u}from"react";import{createPortal as d}from"react-dom";import{jsxs as p,jsx as m,Fragment as h}from"react/jsx-runtime";import{useQuery as g}from"@tanstack/react-query";var f="maplibregl-compact-show";function y(e){if(!e)return()=>{};const t=()=>!!e.classList.contains(f)&&(e.classList.remove(f),!0);if(t())return()=>{};const n=new MutationObserver(()=>{t()&&n.disconnect()});return n.observe(e,{attributes:!0,attributeFilter:["class"]}),()=>n.disconnect()}var b=20,x=12,v=480,w={center:[0,0],left:[b,0],right:[-20,0],top:[0,b],"top-left":[0,b],"top-right":[0,b],bottom:[0,-20],"bottom-left":[0,-20],"bottom-right":[0,-20]},k=(e,t=12)=>Math.max(0,Math.floor(e-t-x-b-10-16));function N(e,t,n,r=12){const o=e.y-b-r,a=n.height-e.y-b-x,l=t.height<=o||t.height>a&&o>=a,i=l?Math.max(0,t.height-o):-Math.max(0,t.height-a);let s="",c=0;return e.x-t.width/2<x?(s="-left",c=Math.max(0,x-e.x)):e.x+t.width/2>n.width-x&&(s="-right",c=-Math.max(0,e.x-(n.width-x))),{anchor:`${l?"bottom":"top"}${s}`,move:{x:c,y:i}}}var C="maplibre-gl-worker.mjs",M=e=>`/maplibre-gl/${e}/${C}`,L=null;function $(){return L??=Promise.all([import("maplibre-gl"),import("maplibre-gl/dist/maplibre-gl.css")]).then(([e])=>(e.setWorkerUrl(M(e.getVersion())),e)).catch(e=>{throw L=null,e}),L}var E=24,S=28,j=29;function A(e){const t=[...e].sort((e,t)=>e-t),n=[];for(let e=0;e<t.length;){let r=e;for(;r+1<t.length&&t[r+1]===t[r]+1;)r++;n.push(r===e?String(t[e]):`${t[e]}–${t[r]}`),e=r+1}return n.join(", ")}function z(e){const t=Math.max(S,12+8*e.length);return t+t%2}var R=(e,t,n,r)=>({left:e-n/2,top:t-r/2,right:e+n/2,bottom:t+r/2});function B(e,t){return e.left<t.right+1&&t.left<e.right+1&&e.top<t.bottom+1&&t.top<e.bottom+1}var T=e=>R(e.x,e.y,e.width,e.height);function O(e){for(let t=0;t<e.length;t++)for(let n=t+1;n<e.length;n++)if(B(T(e[t]),T(e[n])))return[e[t],e[n]];return null}function W(e,t=[]){const n=[],r=e=>t.some(t=>B(t,e));let o=e.filter(e=>null!==e.stop).sort((e,t)=>e.stop-t.stop).map(e=>({keys:[e.key],stops:[e.stop],x:e.x,y:e.y,width:S,height:S,under:0}));for(let e=O(o);e;e=O(o)){const[t,n]=e;t.keys.push(...n.keys),t.stops.push(...n.stops),t.stops.sort((e,t)=>e-t),t.width=z(A(t.stops)),o=o.filter(e=>e!==n)}o=o.filter(e=>!r(T(e))||(n.push(...e.keys),!1));const a=[];for(const t of e){if(null!==t.stop)continue;const e=R(t.x,t.y,E,E),l=o.find(t=>B(T(t),e));if(l||r(e)){n.push(t.key),l&&l.under++;continue}const i=a.find(t=>B(T(t),e));i?i.keys.push(t.key):a.push({keys:[t.key],stops:[],x:t.x,y:t.y,width:E,height:E,under:0})}return{groups:[...o,...a],hidden:n}}function K(e,t,n){let r=-1/0;for(const o of t){const t=Math.max(Math.abs(o.x-e.x),Math.abs(o.y-e.y));r=Math.max(r,0===t?1/0:n+Math.log2(29/t))}return r}function F(e){const t=new MutationObserver(e);return t.observe(document.documentElement,{attributes:!0,attributeFilter:n}),()=>t.disconnect()}var q=t;var _="routes",P=["routes-road","routes-estimate"];function H(e){const t=document.createElement("span");t.style.display="none",t.style.color=e,document.body.appendChild(t);const n=getComputedStyle(t).color||"#2563eb";return t.remove(),I(n)}function I(e){const t=document.createElement("canvas").getContext("2d");if(!t)return"#2563eb";t.fillStyle="#2563eb",t.fillStyle=e,t.fillRect(0,0,1,1);const[n,r,o]=t.getImageData(0,0,1,1).data;return`rgb(${n}, ${r}, ${o})`}var D={light:"https://tiles.openfreemap.org/styles/positron",dark:"https://tiles.openfreemap.org/styles/dark"},Q={center:[30,20],zoom:1},Z="ring-2 ring-gray-900 ring-offset-2";var G="var(--color-gray-600, #4b5563)",J="http://www.w3.org/2000/svg",U=()=>window.matchMedia("(prefers-reduced-motion: reduce)").matches,V=/^(?:\d+|[xytrblse](?:-\d+)?|solid|dashed|dotted|double|hidden|none)$/;function Y(e){return e.split(/\s+/).some(e=>{const t=e.search(/[[(]/),n=t<0?e:e.slice(0,t),r=e.slice(n.lastIndexOf(":")+1);return r.startsWith("border-")&&!V.test(r.slice(7))})}var X=(...e)=>e.filter(Boolean).join(" ");function ee(e){const t=document.createElementNS(J,"svg");t.setAttribute("viewBox","0 0 24 24"),t.setAttribute("fill","none"),t.setAttribute("stroke","currentColor"),t.setAttribute("stroke-width","2"),t.setAttribute("aria-hidden","true");for(const n of e){const e=document.createElementNS(J,"path");e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-linejoin","round"),e.setAttribute("d",n),t.appendChild(e)}return t}function te(e,t){for(const[n,r]of Object.entries(t??{}))e.dataset[n]=r}var ne=(e,t)=>X("relative grid place-items-center rounded-full cursor-pointer",t&&(null!=e.stop?"h-7 w-7":"h-6 w-6"));function re(e,t,n,r){const o=t&&!r&&null==e.stop&&!e.dot;return X("grid place-items-center rounded-full border-2 font-semibold leading-none shadow-sm transition-transform motion-reduce:transition-none",!Y(e.tone)&&"border-white",e.tone,e.dot?"h-4 w-4 opacity-80":null!=e.stop?"h-7 w-7 text-xs ring-2 ring-gray-900":o?"h-8 w-8 text-xs [&_svg]:h-4 [&_svg]:w-4":"h-6 w-6 text-2xs [&_svg]:h-3.5 [&_svg]:w-3.5",t&&(o?"ring-2 ring-gray-900 ring-offset-1":Z),e.approximate&&"border-dashed opacity-80",e.faded&&!t&&"opacity-40",n&&"scale-125 opacity-100")}var oe=e=>X("grid place-items-center border-2 px-0.5 text-xs font-semibold leading-none shadow-sm",e.stop?"h-7 min-w-7":"h-6 min-w-6",!Y(e.tone??"")&&"border-white",e.tone??"bg-gray-900 text-white");function ae({pins:t,selectedKey:n,focus:o,onSelect:c,ariaLabel:h,className:g="",children:f,routes:b,fitTo:x,attribution:v,marks:C,groupCrowded:M=!1,noun:L,highlightKey:j=null,picking:z=!1,onPick:R,card:B,cardMinMapWidth:T=480,fullScreen:O,initialView:J=Q,cooperativeGestures:V=!1}){const Y=r().map,ae=a(null),se=a(null),ce=a(null),ue=a(null),de=a([]),pe=a(/* @__PURE__ */new Map),me=a(/* @__PURE__ */new Map),he=a(/* @__PURE__ */new Map),ge=a(null),fe=a(/* @__PURE__ */new Map),ye=a(""),[be,xe]=l(!1),[ve,we]=l(!1),ke=u(F,q,()=>!1)?"dark":"light",Ne=a({onSelect:c,onPick:R,picking:z,pins:t,selectedKey:n,highlightKey:j,groupCrowded:M,strings:Y,noun:L});i(()=>{Ne.current={onSelect:c,onPick:R,picking:z,pins:t,selectedKey:n,highlightKey:j,groupCrowded:M,strings:Y,noun:L}});const Ce=s(()=>{const e=ce.current,{pins:t,selectedKey:n}=Ne.current,r=n?t.find(e=>e.key===n):void 0;e&&r&&!e.getBounds().contains([r.lng,r.lat])&&e.easeTo({center:[r.lng,r.lat],duration:U()?0:400})},[]),Me=a(!1),Le=s((e,t)=>{const n=ce.current,r=ue.current;if(!n||!r)return;const o=n.getZoom();if(o>=17.5){const t=e.indexOf(Ne.current.selectedKey??"");return void Ne.current.onSelect(e[(t+1)%e.length])}const a=e.map(e=>pe.current.get(e).pin),l=new r.LngLatBounds([a[0].lng,a[0].lat],[a[0].lng,a[0].lat]);for(const e of a)l.extend([e.lng,e.lat]);const i=a.map(e=>n.project([e.lng,e.lat])),s=Math.max(...i.map((e,t)=>K(e,i.filter((e,n)=>n!==t),o))),{clientWidth:c,clientHeight:u}=n.getContainer(),d=n.cameraForBounds(l,{padding:Math.min(64,c/4,u/4)})?.zoom??18,p=document.activeElement===t;Me.current=!0,n.once("moveend",()=>{if(Me.current=!1,!p)return;const e=a[0].key,t=pe.current.get(e)?.button,n=t&&"none"!==t.style.display?t:[...me.current.values()].find(t=>t.keys.includes(e))?.button;n?.focus({preventScroll:!0})}),n.easeTo({center:l.getCenter(),zoom:Math.min(18,Math.max(o+1,Math.min(d,s))),duration:U()?0:600})},[]),$e=s(()=>{const e=ce.current,t=ue.current;if(!e||!t||!ae.current||Me.current&&e.isMoving())return;const{selectedKey:n,highlightKey:r,groupCrowded:o,strings:a,noun:l}=Ne.current;for(const[e,t]of pe.current){const a=re(t.pin,e===n,e===r,o);t.mark.className!==a&&(t.mark.className=a);const l=e===n?"1":"";t.button.style.zIndex!==l&&(t.button.style.zIndex=l)}let i=null;if(o){const r=e.getContainer().getBoundingClientRect(),o=[...ae.current.querySelectorAll("a[href], button, input, select, textarea, summary, [role='button'], [tabindex]:not([tabindex='-1'])")].filter(e=>!e.closest("[data-pin], [data-pin-group], .maplibregl-canvas")).map(e=>{const t=e.getBoundingClientRect(),n=e.closest("[data-map-card]")?.getBoundingClientRect()??t;return{left:Math.max(t.left,n.left)-r.left,top:Math.max(t.top,n.top)-r.top,right:Math.min(t.right,n.right)-r.left,bottom:Math.min(t.bottom,n.bottom)-r.top}}).filter(e=>e.right>e.left&&e.bottom>e.top);i=W([...pe.current.values()].map(({pin:t})=>{const n=e.project([t.lng,t.lat]);return{key:t.key,x:n.x,y:n.y,stop:t.stop??null}}),o);const s=e=>(l??a.places)(e),c=e.getZoom()<17.5?a.spread:a.cycle,u=(e,t)=>{const n=t?"":"none";e.style.display!==n&&(e.style.display=n)},d=/* @__PURE__ */new Map;for(const r of i.groups){const o=r.under>0?a.closeBy(r.under,s(r.under)):null,l=1===r.keys.length?pe.current.get(r.keys[0]):null;if(l){u(l.button,!0),l.button.setAttribute("aria-label",o?`${l.name}; ${o}`:l.name),l.button.title=o?`${l.title}\n${o}`:l.title;continue}for(const e of r.keys)u(pe.current.get(e).button,!1);const i=r.keys.join(" ");let p=me.current.get(i);if(!p){const n=document.createElement("button");n.type="button",n.dataset.pinGroup="",n.className="grid place-items-center rounded-full cursor-pointer",n.append(document.createElement("span"));const o=pe.current.get(r.keys[0]).pin,a={button:n,keys:r.keys,marker:new t.Marker({element:n,anchor:"center"}).setLngLat([o.lng,o.lat]).addTo(e)};n.addEventListener("click",e=>{e.stopPropagation(),Le(a.keys,n)}),p=a}p.keys=r.keys;const m=r.keys.map(e=>pe.current.get(e)),h=r.stops.length>0?A(r.stops):String(m.length),g=r.stops.length>0?a.stops(h):a.group(m.length,s(m.length));p.button.style.width=`${r.width}px`,p.button.style.height=`${r.height}px`,p.button.setAttribute("aria-label",`${g}: ${m.map(e=>e.pin.label).join("; ")}. ${c}${o?`; ${o}`:""}.`),p.button.title=[`${g}:`,...m.map(e=>e.title),...o?[o]:[],c].join("\n");const f=p.button.firstElementChild;f.textContent=h;const y=X("grid place-items-center rounded-full border-2 border-gray-700 bg-white font-semibold leading-none text-gray-900 shadow-sm",r.stops.length>0?"h-7 w-full px-1 text-xs ring-2 ring-gray-900":m.every(e=>e.pin.dot)?"h-5 w-5 text-3xs":"h-6 w-6 text-2xs",null!=n&&r.keys.includes(n)&&Z);f.className!==y&&(f.className=y),d.set(i,p)}for(const e of i.hidden)u(pe.current.get(e).button,!1);for(const[e,t]of me.current)d.has(e)||t.marker.remove();me.current=d}if(ge.current){const e=r&&i?i.groups.find(e=>e.keys.includes(r)&&e.keys.length>1):void 0,t=r?pe.current.get(r):void 0,n=r?he.current.get(r):void 0,o=e?{at:pe.current.get(e.keys[0]).pin,width:e.width,height:e.height}:t?{at:t.pin,width:t.button.offsetWidth||(null!=t.pin.stop?S:E),height:t.button.offsetHeight||(null!=t.pin.stop?S:E)}:n?{at:n.mark,width:n.element.offsetWidth||S,height:n.element.offsetHeight||S}:null,a=ge.current.getElement();a.style.display=o?"":"none",o&&(ge.current.setLngLat([o.at.lng,o.at.lat]),a.style.width=`${o.width+22}px`,a.style.height=`${o.height+22}px`)}},[Le]);i(()=>{if($e(),!ae.current)return;const e=new ResizeObserver(()=>$e());e.observe(ae.current);for(const t of ae.current.children)t.contains(se.current)||e.observe(t);return()=>e.disconnect()}),i(()=>{let e=!1,t=null,n=null,r=()=>{};return(async()=>{try{const o=await $();if(e||!se.current)return;ue.current=o,t=new o.Map({container:se.current,style:D[ke],center:J.center,zoom:J.zoom,attributionControl:v?{compact:!0,customAttribution:v}:{compact:!0},dragRotate:!1,pitchWithRotate:!1,touchPitch:!1,maxPitch:0,cooperativeGestures:"coarse"===V?window.matchMedia("(pointer: coarse)").matches:V}),t.touchZoomRotate.disableRotation(),t.keyboard.disableRotation(),t.addControl(new o.NavigationControl({showCompass:!1}),"top-right");const a=document.createElement("div");a.dataset.pinRing="",a.setAttribute("aria-hidden","true"),a.className="pointer-events-none rounded-full border-2 border-gray-900 bg-gray-900/15 shadow-[0_0_0_2px_var(--color-white,#fff)]",a.style.display="none",ge.current=new o.Marker({element:a,anchor:"center"}).setLngLat(J.center).addTo(t),t.on("click",e=>{Ne.current.picking&&Ne.current.onPick?.({lat:e.lngLat.lat,lng:e.lngLat.lng})}),t.on("move",$e),t.on("moveend",$e),t.on("resize",$e),t.on("error",e=>console.warn("[map]",e.error?.message)),r=y(se.current.querySelector(".maplibregl-ctrl-attrib"));const l=t;n=new ResizeObserver(()=>{l.resize(),Ce()}),n.observe(se.current),ce.current=t,xe(!0)}catch(t){console.error("[map] could not start",t),e||we(!0)}})(),()=>{e=!0,n?.disconnect(),r(),de.current.forEach(e=>e.remove()),de.current=[],me.current.forEach(e=>e.marker.remove()),me.current.clear(),ge.current?.remove(),ge.current=null,t?.remove(),ce.current=null}},[]);const Ee=a(ke);i(()=>{be&&ce.current&&Ee.current!==ke&&(Ee.current=ke,ce.current.setStyle(D[ke]))},[be,ke]),i(()=>{const e=ce.current,n=ue.current;if(!be||!e||!n)return;de.current.forEach(e=>e.remove()),de.current=[],me.current.forEach(e=>e.marker.remove()),me.current.clear(),pe.current.clear(),he.current.clear();for(const e of fe.current.keys())t.some(t=>t.key===e)||fe.current.delete(e);const r=Ne.current.strings;for(const o of t){const t=document.createElement("button");t.type="button",t.dataset.pin=o.key,t.className=ne(o,M);const a=o.approximate?r.approximate(o.label):o.label,l=o.title??(o.approximate?r.approximateTitle(o.label):o.label);t.setAttribute("aria-label",a),t.title=l;const i=document.createElement("span");if(te(i,o.data),o.dot);else if(null!=o.iconNode){const e=fe.current.get(o.key);e&&i.append(e)}else o.icon?.length?i.append(ee(o.icon)):i.textContent=null!=o.stop?String(o.stop):o.glyph;if(t.append(i),o.badge){const e=document.createElement("span");e.setAttribute("aria-hidden","true"),e.className=X("absolute -right-2 -top-2 grid h-4 min-w-4 place-items-center rounded-full px-0.5 text-3xs font-semibold leading-none shadow",o.badgeTone??"bg-white text-gray-900"),e.textContent=o.badge,t.appendChild(e)}t.addEventListener("click",e=>{e.stopPropagation(),Ne.current.onSelect(o.key)}),de.current.push(new n.Marker({element:t,anchor:"center"}).setLngLat([o.lng,o.lat]).addTo(e)),pe.current.set(o.key,{pin:o,button:t,mark:i,name:a,title:l})}for(const t of C??[]){const r=document.createElement("div");r.dataset.mapMark=t.key,te(r,t.data),r.className=oe(t),r.textContent=t.text,r.title=t.title??t.label,r.setAttribute("role","img"),r.setAttribute("aria-label",t.label),de.current.push(new n.Marker({element:r,anchor:"center"}).setLngLat([t.lng,t.lat]).addTo(e)),he.current.set(t.key,{mark:t,element:r})}$e()},[be,t,C,M,$e]),i(()=>{be&&$e()},[be,n,j,$e]),i(()=>{if(!be||!n)return;const e=requestAnimationFrame(Ce);return()=>cancelAnimationFrame(e)},[be,n,Ce]),i(()=>{const e=ce.current,n=ue.current,r=x?[...t,...C??[]].filter(e=>x.includes(e.key)):t;if(!be||!e||!n||0===r.length)return;const o=r.map(e=>`${e.key}@${e.lat},${e.lng}`).sort().join("|");if(ye.current===o)return;const a=""===ye.current;if(ye.current=o,1===r.length)return void e.jumpTo({center:[r[0].lng,r[0].lat],zoom:13});const l=new n.LngLatBounds([r[0].lng,r[0].lat],[r[0].lng,r[0].lat]);for(const e of r)l.extend([e.lng,e.lat]);e.fitBounds(l,{padding:48,maxZoom:14,animate:!a})},[be,t,C,x]),i(()=>{const e=ce.current;if(!be||!e)return;const t=(b??[]).filter(e=>e.coordinates.length>=2),n=[...new Set(t.flatMap(e=>e.attribution?[e.attribution]:[]))].join(" · "),r=()=>{const r=function(){const e=document.createElement("span");e.className="text-blue-600",e.style.display="none",document.body.appendChild(e);const t=getComputedStyle(e).color||"#2563eb";return e.remove(),I(t)}(),o={type:"FeatureCollection",features:t.map(e=>({type:"Feature",properties:{key:e.key,estimate:e.estimate,faded:!!e.faded,color:e.color?H(e.color):r},geometry:{type:"LineString",coordinates:e.coordinates}}))},a=["case",["get","faded"],.25,.85],l=["get","color"],i=e.getSource(_);if(i&&(i.attribution||"")!==n){for(const t of P)e.getLayer(t)&&e.removeLayer(t);e.removeSource(_)}const s=e.getSource(_);s?s.setData(o):e.addSource(_,{type:"geojson",data:o,...n?{attribution:n}:{}}),e.getLayer("routes-road")||e.addLayer({id:"routes-road",type:"line",source:_,filter:["!",["get","estimate"]],layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":l,"line-width":4,"line-opacity":a}}),e.getLayer("routes-estimate")||e.addLayer({id:"routes-estimate",type:"line",source:_,filter:["get","estimate"],layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":l,"line-width":3,"line-dasharray":[1.5,1.5],"line-opacity":a}})},o=()=>{try{r()}catch(e){console.debug("[map] routes wait for the style",e)}};return o(),e.on("style.load",o),e.once("idle",o),()=>{e.off("style.load",o),e.off("idle",o)}},[be,b,ke]),i(()=>{const e=ce.current;if(!be||!e||!o)return;const n=t.find(e=>e.key===o.key);if(!n)return;const r=e.getZoom(),a=M?K(e.project([n.lng,n.lat]),t.filter(e=>e.key!==n.key).map(t=>e.project([t.lng,t.lat])),r):-1/0,l={center:[n.lng,n.lat],zoom:Math.min(18,Math.max(r,13,a))};U()?e.jumpTo(l):e.flyTo({...l,duration:600})},[be,o?.n]);const[Se,je]=l(!1);i(()=>{const e=ae.current;if(!e)return;const t=()=>je(e.clientWidth<T);t();const n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[T]);const Ae=n?t.find(e=>e.key===n)??null:null,ze=Ae?.key??null,Re=Ae?.lng??0,Be=Ae?.lat??0,Te=be&&!Se&&null!=B&&!!Ae,[Oe,We]=l(null);i(()=>{const e=ce.current,t=ue.current;if(!(Te&&e&&t&&ze))return;const n=document.createElement("div");n.dataset.mapCard="",n.className="w-[26rem] overflow-y-auto overscroll-contain";const r=new t.Popup({anchor:"bottom",offset:w,className:"rosh-map-card",maxWidth:"none",closeButton:!1,closeOnClick:!1,closeOnMove:!1,focusAfterOpen:!1}).setLngLat([Re,Be]).setDOMContent(n).addTo(e),o=r.getElement(),a=o.querySelector(".maplibregl-popup-content");a&&Object.assign(a.style,{padding:"0",background:"transparent",borderRadius:"0",boxShadow:"none"});const l=o.querySelector(".maplibregl-popup-tip");l&&Object.assign(l.style,{borderTopColor:G,borderBottomColor:G}),We(n);let i=!1,s=!1;const c=(t=!0)=>{if(s)return;if(e.isMoving())return void(i||(i=!0,e.once("moveend",()=>{i=!1,c()})));const{clientWidth:o,clientHeight:a}=e.getContainer(),l=function(e,t){const n=e.getBoundingClientRect().top,r=[...e.querySelectorAll(".maplibregl-ctrl-top-left > *, .maplibregl-ctrl-top-right > *"),...t?.querySelectorAll(":scope > [data-map-control]")??[]];let o=0;for(const e of r){const t=e.getBoundingClientRect();t.height>0&&(o=Math.max(o,t.bottom-n))}return o}(e.getContainer(),ae.current)+8,u=`${k(a,l)}px`;n.style.maxHeight!==u&&(n.style.maxHeight=u);const d=r.getElement(),p=r.getLngLat(),{anchor:m,move:h}=N(e.project(p),{width:d.offsetWidth,height:d.offsetHeight},{width:o,height:a},l);r.options.anchor!==m&&(r.options.anchor=m,r.setLngLat(p)),!t||0===h.x&&0===h.y||e.panBy([-h.x,-h.y],{duration:U()?0:250}),$e()},u=new ResizeObserver(()=>c());u.observe(n);const d=()=>c(),p=()=>{i||c(!1)};e.on("resize",d),e.on("moveend",p);let m=!1;const h=pe.current,g=e=>{m=n.contains(e.target)};return document.addEventListener("focusin",g),()=>{if(s=!0,u.disconnect(),e.off("resize",d),e.off("moveend",p),document.removeEventListener("focusin",g),r.remove(),We(null),m&&(!document.activeElement||document.activeElement===document.body)){const e=h.get(ze)?.button;e&&"none"!==e.style.display&&e.focus({preventScroll:!0})}}},[Te,ze,Re,Be,$e]);const Ke=O?.active??!1,Fe=a(O?.onChange);i(()=>{Fe.current=O?.onChange}),i(()=>{if(!O)return;const e=document.documentElement;Ke&&!document.fullscreenElement&&e.requestFullscreen&&e.requestFullscreen().catch(()=>{}),!Ke&&document.fullscreenElement&&document.exitFullscreen().catch(()=>{})},[Ke]);const qe=!!O;return i(()=>{if(!qe)return;const e=()=>{document.fullscreenElement||Fe.current?.(!1)};return document.addEventListener("fullscreenchange",e),()=>document.removeEventListener("fullscreenchange",e)},[qe]),/* @__PURE__ */p("div",{ref:ae,className:X("relative min-h-72 overflow-hidden rounded-lg border border-gray-200 bg-gray-100",z&&"[&_canvas]:cursor-crosshair",g),children:[
3
- /* @__PURE__ */m("div",{className:"absolute inset-0",children:/* @__PURE__ */m("div",{ref:se,className:"h-full w-full",role:"region","aria-label":h})}),ve&&/* @__PURE__ */m("p",{className:"absolute inset-0 grid place-items-center p-6 text-center text-sm text-gray-500",children:Y.failed}),O&&/* @__PURE__ */m(e,{"data-map-control":"",variant:"secondary",size:"sm",className:"absolute left-3 top-3 z-10",onClick:()=>O.onChange(!O.active),leftIcon:/* @__PURE__ */m(ie,{leave:O.active}),children:O.active?Y.leaveFullScreen:Y.fullScreen}),f,null!=B&&!Te&&/* @__PURE__ */m("div",{"data-map-card":"",className:"absolute bottom-3 left-3 right-3 z-10 max-h-[calc(100%-1.5rem)] max-w-md overflow-y-auto overscroll-contain",children:B}),Te&&Oe?d(B,Oe):null,be&&/* @__PURE__ */m(le,{pins:t,hosts:fe.current})]})}function le({pins:e,hosts:t}){/* @__PURE__ */
2
+ import{Button_default as e}from"../chunk-IJ7RXIWX.js";import"../chunk-JTNKC4CR.js";import{rootIsDark as t,ROOT_THEME_ATTRIBUTES as n}from"../chunk-7IQ3B77H.js";import"../chunk-FIEA5CGB.js";import"../chunk-D65T4H6J.js";import{useShellStrings as r}from"../chunk-QRCDQPJA.js";import"../chunk-C3QOHMR6.js";import{Icon as o}from"../chunk-ZGUQLVY4.js";import{useRef as a,useState as l,useEffect as i,useCallback as s,useMemo as c,useSyncExternalStore as u}from"react";import{createPortal as d}from"react-dom";import{jsxs as p,jsx as m,Fragment as h}from"react/jsx-runtime";import{useQuery as g}from"@tanstack/react-query";var f="maplibregl-compact-show";function y(e){if(!e)return()=>{};const t=()=>!!e.classList.contains(f)&&(e.classList.remove(f),!0);if(t())return()=>{};const n=new MutationObserver(()=>{t()&&n.disconnect()});return n.observe(e,{attributes:!0,attributeFilter:["class"]}),()=>n.disconnect()}var b=20,x=12,v=480,w={center:[0,0],left:[b,0],right:[-20,0],top:[0,b],"top-left":[0,b],"top-right":[0,b],bottom:[0,-20],"bottom-left":[0,-20],"bottom-right":[0,-20]},k=(e,t=12)=>Math.max(0,Math.floor(e-t-x-b-10-16));function N(e,t,n,r=12){const o=e.y-b-r,a=n.height-e.y-b-x,l=t.height<=o||t.height>a&&o>=a,i=l?Math.max(0,t.height-o):-Math.max(0,t.height-a);let s="",c=0;return e.x-t.width/2<x?(s="-left",c=Math.max(0,x-e.x)):e.x+t.width/2>n.width-x&&(s="-right",c=-Math.max(0,e.x-(n.width-x))),{anchor:`${l?"bottom":"top"}${s}`,move:{x:c,y:i}}}var C="maplibre-gl-worker.mjs",M=e=>`/maplibre-gl/${e}/${C}`,L=null;function $(){return L??=Promise.all([import("maplibre-gl"),import("maplibre-gl/dist/maplibre-gl.css")]).then(([e])=>(e.setWorkerUrl(M(e.getVersion())),e)).catch(e=>{throw L=null,e}),L}var E=24,S=28,j=29;function A(e){const t=[...e].sort((e,t)=>e-t),n=[];for(let e=0;e<t.length;){let r=e;for(;r+1<t.length&&t[r+1]===t[r]+1;)r++;n.push(r===e?String(t[e]):`${t[e]}–${t[r]}`),e=r+1}return n.join(", ")}function z(e){const t=Math.max(S,12+8*e.length);return t+t%2}var R=(e,t,n,r)=>({left:e-n/2,top:t-r/2,right:e+n/2,bottom:t+r/2});function B(e,t){return e.left<t.right+1&&t.left<e.right+1&&e.top<t.bottom+1&&t.top<e.bottom+1}var T=e=>R(e.x,e.y,e.width,e.height);function O(e){for(let t=0;t<e.length;t++)for(let n=t+1;n<e.length;n++)if(B(T(e[t]),T(e[n])))return[e[t],e[n]];return null}function W(e,t=[]){const n=[],r=e=>t.some(t=>B(t,e));let o=e.filter(e=>null!==e.stop).sort((e,t)=>e.stop-t.stop).map(e=>({keys:[e.key],stops:[e.stop],x:e.x,y:e.y,width:S,height:S,under:0}));for(let e=O(o);e;e=O(o)){const[t,n]=e;t.keys.push(...n.keys),t.stops.push(...n.stops),t.stops.sort((e,t)=>e-t),t.width=z(A(t.stops)),o=o.filter(e=>e!==n)}o=o.filter(e=>!r(T(e))||(n.push(...e.keys),!1));const a=[];for(const t of e){if(null!==t.stop)continue;const e=R(t.x,t.y,E,E),l=o.find(t=>B(T(t),e));if(l||r(e)){n.push(t.key),l&&l.under++;continue}const i=a.find(t=>B(T(t),e));i?i.keys.push(t.key):a.push({keys:[t.key],stops:[],x:t.x,y:t.y,width:E,height:E,under:0})}return{groups:[...o,...a],hidden:n}}function F(e,t,n){let r=-1/0;for(const o of t){const t=Math.max(Math.abs(o.x-e.x),Math.abs(o.y-e.y));r=Math.max(r,0===t?1/0:n+Math.log2(29/t))}return r}function K(e){const t=new MutationObserver(e);return t.observe(document.documentElement,{attributes:!0,attributeFilter:n}),()=>t.disconnect()}var q=t;var _="routes",P=["routes-road","routes-estimate"];function H(e){const t=document.createElement("span");t.style.display="none",t.style.color=e,document.body.appendChild(t);const n=getComputedStyle(t).color||"#2563eb";return t.remove(),I(n)}function I(e){const t=document.createElement("canvas").getContext("2d");if(!t)return"#2563eb";t.fillStyle="#2563eb",t.fillStyle=e,t.fillRect(0,0,1,1);const[n,r,o]=t.getImageData(0,0,1,1).data;return`rgb(${n}, ${r}, ${o})`}var D={light:"https://tiles.openfreemap.org/styles/positron",dark:"https://tiles.openfreemap.org/styles/dark"},Z={center:[30,20],zoom:1},G="ring-2 ring-gray-900 ring-offset-2";var Q="var(--color-gray-600, #4b5563)",J="http://www.w3.org/2000/svg",U=()=>window.matchMedia("(prefers-reduced-motion: reduce)").matches,V=/^(?:\d+|[xytrblse](?:-\d+)?|solid|dashed|dotted|double|hidden|none)$/;function X(e){return e.split(/\s+/).some(e=>{const t=e.search(/[[(]/),n=t<0?e:e.slice(0,t),r=e.slice(n.lastIndexOf(":")+1);return r.startsWith("border-")&&!V.test(r.slice(7))})}var Y=(...e)=>e.filter(Boolean).join(" ");function ee(e){const t=document.createElementNS(J,"svg");t.setAttribute("viewBox","0 0 24 24"),t.setAttribute("fill","none"),t.setAttribute("stroke","currentColor"),t.setAttribute("stroke-width","2"),t.setAttribute("aria-hidden","true");for(const n of e){const e=document.createElementNS(J,"path");e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-linejoin","round"),e.setAttribute("d",n),t.appendChild(e)}return t}function te(e,t){for(const[n,r]of Object.entries(t??{}))e.dataset[n]=r}var ne=(e,t)=>Y("relative grid place-items-center rounded-full cursor-pointer",t&&(null!=e.stop?"h-7 w-7":"h-6 w-6"));function re(e,t,n,r){const o=t&&!r&&null==e.stop&&!e.dot;return Y("grid place-items-center rounded-full border-2 font-semibold leading-none shadow-sm transition-transform motion-reduce:transition-none",!X(e.tone)&&"border-white",e.tone,e.dot?"h-4 w-4 opacity-80":null!=e.stop?"h-7 w-7 text-xs ring-2 ring-gray-900":o?"h-8 w-8 text-xs [&_svg]:h-4 [&_svg]:w-4":"h-6 w-6 text-2xs [&_svg]:h-3.5 [&_svg]:w-3.5",t&&(o?"ring-2 ring-gray-900 ring-offset-1":G),e.approximate&&"border-dashed opacity-80",e.faded&&!t&&"opacity-40",n&&"scale-125 opacity-100")}var oe=e=>Y("grid place-items-center border-2 px-0.5 text-xs font-semibold leading-none shadow-sm",e.stop?"h-7 min-w-7":"h-6 min-w-6",!X(e.tone??"")&&"border-white",e.tone??"bg-gray-900 text-white");function ae({pins:t,selectedKey:n,focus:o,onSelect:c,ariaLabel:h,className:g="",children:f,routes:b,fitTo:x,attribution:v,marks:C,groupCrowded:M=!1,noun:L,highlightKey:j=null,picking:z=!1,onPick:R,card:B,cardMinMapWidth:T=480,fullScreen:O,initialView:J=Z,cooperativeGestures:V=!1}){const X=r().map,ae=a(null),se=a(null),ce=a(null),ue=a(null),de=a([]),pe=a(/* @__PURE__ */new Map),me=a(/* @__PURE__ */new Map),he=a(/* @__PURE__ */new Map),ge=a(null),fe=a(/* @__PURE__ */new Map),ye=a(""),[be,xe]=l(!1),[ve,we]=l(!1),ke=u(K,q,()=>!1)?"dark":"light",Ne=a({onSelect:c,onPick:R,picking:z,pins:t,selectedKey:n,highlightKey:j,groupCrowded:M,strings:X,noun:L});i(()=>{Ne.current={onSelect:c,onPick:R,picking:z,pins:t,selectedKey:n,highlightKey:j,groupCrowded:M,strings:X,noun:L}});const Ce=s(()=>{const e=ce.current,{pins:t,selectedKey:n}=Ne.current,r=n?t.find(e=>e.key===n):void 0;e&&r&&!e.getBounds().contains([r.lng,r.lat])&&e.easeTo({center:[r.lng,r.lat],duration:U()?0:400})},[]),Me=a(!1),Le=s((e,t)=>{const n=ce.current,r=ue.current;if(!n||!r)return;const o=n.getZoom();if(o>=17.5){const t=e.indexOf(Ne.current.selectedKey??"");return void Ne.current.onSelect(e[(t+1)%e.length])}const a=e.map(e=>pe.current.get(e).pin),l=new r.LngLatBounds([a[0].lng,a[0].lat],[a[0].lng,a[0].lat]);for(const e of a)l.extend([e.lng,e.lat]);const i=a.map(e=>n.project([e.lng,e.lat])),s=Math.max(...i.map((e,t)=>F(e,i.filter((e,n)=>n!==t),o))),{clientWidth:c,clientHeight:u}=n.getContainer(),d=n.cameraForBounds(l,{padding:Math.min(64,c/4,u/4)})?.zoom??18,p=document.activeElement===t;Me.current=!0,n.once("moveend",()=>{if(Me.current=!1,!p)return;const e=a[0].key,t=pe.current.get(e)?.button,n=t&&"none"!==t.style.display?t:[...me.current.values()].find(t=>t.keys.includes(e))?.button;n?.focus({preventScroll:!0})}),n.easeTo({center:l.getCenter(),zoom:Math.min(18,Math.max(o+1,Math.min(d,s))),duration:U()?0:600})},[]),$e=s(()=>{const e=ce.current,t=ue.current;if(!e||!t||!ae.current||Me.current&&e.isMoving())return;const{selectedKey:n,highlightKey:r,groupCrowded:o,strings:a,noun:l}=Ne.current;for(const[e,t]of pe.current){const a=re(t.pin,e===n,e===r,o);t.mark.className!==a&&(t.mark.className=a);const l=e===n?"1":"";t.button.style.zIndex!==l&&(t.button.style.zIndex=l)}let i=null;if(o){const r=e.getContainer().getBoundingClientRect(),o=[...ae.current.querySelectorAll("a[href], button, input, select, textarea, summary, [role='button'], [tabindex]:not([tabindex='-1'])")].filter(e=>!e.closest("[data-pin], [data-pin-group], .maplibregl-canvas")).map(e=>{const t=e.getBoundingClientRect(),n=e.closest("[data-map-card]")?.getBoundingClientRect()??t;return{left:Math.max(t.left,n.left)-r.left,top:Math.max(t.top,n.top)-r.top,right:Math.min(t.right,n.right)-r.left,bottom:Math.min(t.bottom,n.bottom)-r.top}}).filter(e=>e.right>e.left&&e.bottom>e.top);i=W([...pe.current.values()].map(({pin:t})=>{const n=e.project([t.lng,t.lat]);return{key:t.key,x:n.x,y:n.y,stop:t.stop??null}}),o);const s=e=>(l??a.places)(e),c=e.getZoom()<17.5?a.spread:a.cycle,u=(e,t)=>{const n=t?"":"none";e.style.display!==n&&(e.style.display=n)},d=/* @__PURE__ */new Map;for(const r of i.groups){const o=r.under>0?a.closeBy(r.under,s(r.under)):null,l=1===r.keys.length?pe.current.get(r.keys[0]):null;if(l){u(l.button,!0),l.button.setAttribute("aria-label",o?`${l.name}; ${o}`:l.name),l.button.title=o?`${l.title}\n${o}`:l.title;continue}for(const e of r.keys)u(pe.current.get(e).button,!1);const i=r.keys.join(" ");let p=me.current.get(i);if(!p){const n=document.createElement("button");n.type="button",n.dataset.pinGroup="",n.className="grid place-items-center rounded-full cursor-pointer",n.append(document.createElement("span"));const o=pe.current.get(r.keys[0]).pin,a={button:n,keys:r.keys,marker:new t.Marker({element:n,anchor:"center"}).setLngLat([o.lng,o.lat]).addTo(e)};n.addEventListener("click",e=>{e.stopPropagation(),Le(a.keys,n)}),p=a}p.keys=r.keys;const m=r.keys.map(e=>pe.current.get(e)),h=r.stops.length>0?A(r.stops):String(m.length),g=r.stops.length>0?a.stops(h):a.group(m.length,s(m.length));p.button.style.width=`${r.width}px`,p.button.style.height=`${r.height}px`,p.button.setAttribute("aria-label",`${g}: ${m.map(e=>e.pin.label).join("; ")}. ${c}${o?`; ${o}`:""}.`),p.button.title=[`${g}:`,...m.map(e=>e.title),...o?[o]:[],c].join("\n");const f=p.button.firstElementChild;f.textContent=h;const y=Y("grid place-items-center rounded-full border-2 border-gray-700 bg-white font-semibold leading-none text-gray-900 shadow-sm",r.stops.length>0?"h-7 w-full px-1 text-xs ring-2 ring-gray-900":m.every(e=>e.pin.dot)?"h-5 w-5 text-3xs":"h-6 w-6 text-2xs",null!=n&&r.keys.includes(n)&&G);f.className!==y&&(f.className=y),d.set(i,p)}for(const e of i.hidden)u(pe.current.get(e).button,!1);for(const[e,t]of me.current)d.has(e)||t.marker.remove();me.current=d}if(ge.current){const e=r&&i?i.groups.find(e=>e.keys.includes(r)&&e.keys.length>1):void 0,t=r?pe.current.get(r):void 0,n=r?he.current.get(r):void 0,o=e?{at:pe.current.get(e.keys[0]).pin,width:e.width,height:e.height}:t?{at:t.pin,width:t.button.offsetWidth||(null!=t.pin.stop?S:E),height:t.button.offsetHeight||(null!=t.pin.stop?S:E)}:n?{at:n.mark,width:n.element.offsetWidth||S,height:n.element.offsetHeight||S}:null,a=ge.current.getElement();a.style.display=o?"":"none",o&&(ge.current.setLngLat([o.at.lng,o.at.lat]),a.style.width=`${o.width+22}px`,a.style.height=`${o.height+22}px`)}},[Le]);i(()=>{if($e(),!ae.current)return;const e=new ResizeObserver(()=>$e());e.observe(ae.current);for(const t of ae.current.children)t.contains(se.current)||e.observe(t);return()=>e.disconnect()}),i(()=>{let e=!1,t=null,n=null,r=()=>{};return(async()=>{try{const o=await $();if(e||!se.current)return;ue.current=o,t=new o.Map({container:se.current,style:D[ke],center:J.center,zoom:J.zoom,attributionControl:v?{compact:!0,customAttribution:v}:{compact:!0},dragRotate:!1,pitchWithRotate:!1,touchPitch:!1,maxPitch:0,cooperativeGestures:"coarse"===V?window.matchMedia("(pointer: coarse)").matches:V}),t.touchZoomRotate.disableRotation(),t.keyboard.disableRotation(),t.addControl(new o.NavigationControl({showCompass:!1}),"top-right");const a=document.createElement("div");a.dataset.pinRing="",a.setAttribute("aria-hidden","true"),a.className="pointer-events-none rounded-full border-2 border-gray-900 bg-gray-900/15 shadow-[0_0_0_2px_var(--color-white,#fff)]",a.style.display="none",ge.current=new o.Marker({element:a,anchor:"center"}).setLngLat(J.center).addTo(t),t.on("click",e=>{Ne.current.picking&&Ne.current.onPick?.({lat:e.lngLat.lat,lng:e.lngLat.lng})}),t.on("move",$e),t.on("moveend",$e),t.on("resize",$e),t.on("error",e=>console.warn("[map]",e.error?.message)),r=y(se.current.querySelector(".maplibregl-ctrl-attrib"));const l=t;n=new ResizeObserver(()=>{l.resize(),Ce()}),n.observe(se.current),ce.current=t,xe(!0)}catch(t){console.error("[map] could not start",t),e||we(!0)}})(),()=>{e=!0,n?.disconnect(),r(),de.current.forEach(e=>e.remove()),de.current=[],me.current.forEach(e=>e.marker.remove()),me.current.clear(),ge.current?.remove(),ge.current=null,t?.remove(),ce.current=null}},[]);const Ee=a(ke);i(()=>{be&&ce.current&&Ee.current!==ke&&(Ee.current=ke,ce.current.setStyle(D[ke]))},[be,ke]),i(()=>{const e=ce.current,n=ue.current;if(!be||!e||!n)return;de.current.forEach(e=>e.remove()),de.current=[],me.current.forEach(e=>e.marker.remove()),me.current.clear(),pe.current.clear(),he.current.clear();for(const e of fe.current.keys())t.some(t=>t.key===e)||fe.current.delete(e);const r=Ne.current.strings;for(const o of t){const t=document.createElement("button");t.type="button",t.dataset.pin=o.key,t.className=ne(o,M);const a=o.approximate?r.approximate(o.label):o.label,l=o.title??(o.approximate?r.approximateTitle(o.label):o.label);t.setAttribute("aria-label",a),t.title=l;const i=document.createElement("span");if(te(i,o.data),o.dot);else if(null!=o.iconNode){const e=fe.current.get(o.key);e&&i.append(e)}else o.icon?.length?i.append(ee(o.icon)):i.textContent=null!=o.stop?String(o.stop):o.glyph;if(t.append(i),o.badge){const e=document.createElement("span");e.setAttribute("aria-hidden","true"),e.className=Y("absolute -right-2 -top-2 grid h-4 min-w-4 place-items-center rounded-full px-0.5 text-3xs font-semibold leading-none shadow",o.badgeTone??"bg-white text-gray-900"),e.textContent=o.badge,t.appendChild(e)}t.addEventListener("click",e=>{e.stopPropagation(),Ne.current.onSelect(o.key)}),de.current.push(new n.Marker({element:t,anchor:"center"}).setLngLat([o.lng,o.lat]).addTo(e)),pe.current.set(o.key,{pin:o,button:t,mark:i,name:a,title:l})}for(const t of C??[]){const r=document.createElement("div");r.dataset.mapMark=t.key,te(r,t.data),r.className=oe(t),r.textContent=t.text,r.title=t.title??t.label,r.setAttribute("role","img"),r.setAttribute("aria-label",t.label),de.current.push(new n.Marker({element:r,anchor:"center"}).setLngLat([t.lng,t.lat]).addTo(e)),he.current.set(t.key,{mark:t,element:r})}$e()},[be,t,C,M,$e]),i(()=>{be&&$e()},[be,n,j,$e]),i(()=>{if(!be||!n)return;const e=requestAnimationFrame(Ce);return()=>cancelAnimationFrame(e)},[be,n,Ce]),i(()=>{const e=ce.current,n=ue.current,r=x?[...t,...C??[]].filter(e=>x.includes(e.key)):t;if(!be||!e||!n||0===r.length)return;const o=r.map(e=>`${e.key}@${e.lat},${e.lng}`).sort().join("|");if(ye.current===o)return;const a=""===ye.current;if(ye.current=o,1===r.length)return void e.jumpTo({center:[r[0].lng,r[0].lat],zoom:13});const l=new n.LngLatBounds([r[0].lng,r[0].lat],[r[0].lng,r[0].lat]);for(const e of r)l.extend([e.lng,e.lat]);e.fitBounds(l,{padding:48,maxZoom:14,animate:!a})},[be,t,C,x]),i(()=>{const e=ce.current;if(!be||!e)return;const t=(b??[]).filter(e=>e.coordinates.length>=2),n=[...new Set(t.flatMap(e=>e.attribution?[e.attribution]:[]))].join(" · "),r=()=>{const r=function(){const e=document.createElement("span");e.className="text-blue-600",e.style.display="none",document.body.appendChild(e);const t=getComputedStyle(e).color||"#2563eb";return e.remove(),I(t)}(),o={type:"FeatureCollection",features:t.map(e=>({type:"Feature",properties:{key:e.key,estimate:e.estimate,faded:!!e.faded,color:e.color?H(e.color):r},geometry:{type:"LineString",coordinates:e.coordinates}}))},a=["case",["get","faded"],.25,.85],l=["get","color"],i=e.getSource(_);if(i&&(i.attribution||"")!==n){for(const t of P)e.getLayer(t)&&e.removeLayer(t);e.removeSource(_)}const s=e.getSource(_);s?s.setData(o):e.addSource(_,{type:"geojson",data:o,...n?{attribution:n}:{}}),e.getLayer("routes-road")||e.addLayer({id:"routes-road",type:"line",source:_,filter:["!",["get","estimate"]],layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":l,"line-width":4,"line-opacity":a}}),e.getLayer("routes-estimate")||e.addLayer({id:"routes-estimate",type:"line",source:_,filter:["get","estimate"],layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":l,"line-width":3,"line-dasharray":[1.5,1.5],"line-opacity":a}})},o=()=>{try{r()}catch(e){console.debug("[map] routes wait for the style",e)}};return o(),e.on("style.load",o),e.once("idle",o),()=>{e.off("style.load",o),e.off("idle",o)}},[be,b,ke]),i(()=>{const e=ce.current;if(!be||!e||!o)return;const n=t.find(e=>e.key===o.key);if(!n)return;const r=e.getZoom(),a=M?F(e.project([n.lng,n.lat]),t.filter(e=>e.key!==n.key).map(t=>e.project([t.lng,t.lat])),r):-1/0,l={center:[n.lng,n.lat],zoom:Math.min(18,Math.max(r,13,a))};U()?e.jumpTo(l):e.flyTo({...l,duration:600})},[be,o?.n]);const[Se,je]=l(!1);i(()=>{const e=ae.current;if(!e)return;const t=()=>je(e.clientWidth<T);t();const n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[T]);const Ae=n?t.find(e=>e.key===n)??null:null,ze=Ae?.key??null,Re=Ae?.lng??0,Be=Ae?.lat??0,Te=be&&!Se&&null!=B&&!!Ae,[Oe,We]=l(null);i(()=>{const e=ce.current,t=ue.current;if(!(Te&&e&&t&&ze))return;const n=document.createElement("div");n.dataset.mapCard="",n.className="w-[26rem] overflow-y-auto overscroll-contain";const r=new t.Popup({anchor:"bottom",offset:w,className:"rosh-map-card",maxWidth:"none",closeButton:!1,closeOnClick:!1,closeOnMove:!1,focusAfterOpen:!1}).setLngLat([Re,Be]).setDOMContent(n).addTo(e),o=r.getElement(),a=o.querySelector(".maplibregl-popup-content");a&&Object.assign(a.style,{padding:"0",background:"transparent",borderRadius:"0",boxShadow:"none"});const l=o.querySelector(".maplibregl-popup-tip");l&&Object.assign(l.style,{borderTopColor:Q,borderBottomColor:Q}),We(n);let i=!1,s=!1;const c=(t=!0)=>{if(s)return;if(e.isMoving())return void(i||(i=!0,e.once("moveend",()=>{i=!1,c()})));const{clientWidth:o,clientHeight:a}=e.getContainer(),l=function(e,t){const n=e.getBoundingClientRect().top,r=[...e.querySelectorAll(".maplibregl-ctrl-top-left > *, .maplibregl-ctrl-top-right > *"),...t?.querySelectorAll(":scope > [data-map-control]")??[]];let o=0;for(const e of r){const t=e.getBoundingClientRect();t.height>0&&(o=Math.max(o,t.bottom-n))}return o}(e.getContainer(),ae.current)+8,u=`${k(a,l)}px`;n.style.maxHeight!==u&&(n.style.maxHeight=u);const d=r.getElement(),p=r.getLngLat(),{anchor:m,move:h}=N(e.project(p),{width:d.offsetWidth,height:d.offsetHeight},{width:o,height:a},l);r.options.anchor!==m&&(r.options.anchor=m,r.setLngLat(p)),!t||0===h.x&&0===h.y||e.panBy([-h.x,-h.y],{duration:U()?0:250}),$e()},u=new ResizeObserver(()=>c());u.observe(n);const d=()=>c(),p=()=>{i||c(!1)};e.on("resize",d),e.on("moveend",p);let m=!1;const h=pe.current,g=e=>{m=n.contains(e.target)};return document.addEventListener("focusin",g),()=>{if(s=!0,u.disconnect(),e.off("resize",d),e.off("moveend",p),document.removeEventListener("focusin",g),r.remove(),We(null),m&&(!document.activeElement||document.activeElement===document.body)){const e=h.get(ze)?.button;e&&"none"!==e.style.display&&e.focus({preventScroll:!0})}}},[Te,ze,Re,Be,$e]);const Fe=O?.active??!1,Ke=a(O?.onChange);i(()=>{Ke.current=O?.onChange}),i(()=>{if(!O)return;const e=document.documentElement;Fe&&!document.fullscreenElement&&e.requestFullscreen&&e.requestFullscreen().catch(()=>{}),!Fe&&document.fullscreenElement&&document.exitFullscreen().catch(()=>{})},[Fe]);const qe=!!O;return i(()=>{if(!qe)return;const e=()=>{document.fullscreenElement||Ke.current?.(!1)};return document.addEventListener("fullscreenchange",e),()=>document.removeEventListener("fullscreenchange",e)},[qe]),/* @__PURE__ */p("div",{ref:ae,className:Y("relative min-h-72 overflow-hidden rounded-lg border border-gray-200 bg-gray-100",z&&"[&_canvas]:cursor-crosshair",g),children:[
3
+ /* @__PURE__ */m("div",{className:"absolute inset-0",children:/* @__PURE__ */m("div",{ref:se,className:"h-full w-full",role:"region","aria-label":h})}),ve&&/* @__PURE__ */m("p",{className:"absolute inset-0 grid place-items-center p-6 text-center text-sm text-gray-500",children:X.failed}),O&&/* @__PURE__ */m(e,{"data-map-control":"",variant:"secondary",size:"sm",className:"absolute left-3 top-3 z-10",onClick:()=>O.onChange(!O.active),leftIcon:/* @__PURE__ */m(ie,{leave:O.active}),children:O.active?X.leaveFullScreen:X.fullScreen}),f,null!=B&&!Te&&/* @__PURE__ */m("div",{"data-map-card":"",className:"absolute bottom-3 left-3 right-3 z-10 max-h-[calc(100%-1.5rem)] max-w-md overflow-y-auto overscroll-contain",children:B}),Te&&Oe?d(B,Oe):null,be&&/* @__PURE__ */m(le,{pins:t,hosts:fe.current})]})}function le({pins:e,hosts:t}){/* @__PURE__ */
4
4
  return m(h,{children:e.map(e=>{if(null==e.iconNode||e.dot)return null;let n=t.get(e.key);return n||(n=document.createElement("span"),n.className="contents",t.set(e.key,n)),d(e.iconNode,n,e.key)})})}function ie({leave:e}){/* @__PURE__ */
5
5
  return m(o,e?{name:"collapse","aria-hidden":"true",className:"h-4 w-4",strokeWidth:2}:{name:"expand","aria-hidden":"true",className:"h-4 w-4",strokeWidth:2})}function se(){const[e,t]=l(null);return{highlightKey:e,pointAt:s(e=>{const n=()=>t(e),r=()=>t(t=>t===e?null:t);return{onMouseEnter:n,onMouseLeave:r,onFocus:n,onBlur:r}},[])}}var ce=3e3,ue=e=>!!e?.pending&&3e3,de=e=>`${e.kind}:${e.id}`,pe=e=>("located"===e.placement||"approximate"===e.placement)&&null!=e.lat&&null!=e.lng;function me(e){switch(e){case"located":return null;case"approximate":return"Approximate: only the suburb or postcode matched";case"pending":return"Locating…";case"not_found":return"Not on the map: address not found";case"failed":return"Not on the map: the map service could not be reached";case"no_address":return"Not on the map: no city or postcode"}}var he={importer:{label:"Importer",tone:"bg-sky-600 text-white"},dealer:{label:"Dealer",tone:"bg-purple-600 text-white"},retail:{label:"Retail",tone:"bg-green-600 text-white"},supplier:{label:"Supplier",tone:"bg-sky-600 text-white"},delivery_location:{label:"Delivery location",tone:"bg-amber-600 text-white"},warehouse:{label:"Warehouse",tone:"bg-amber-600 text-white"}},ge=["importer","dealer","retail","supplier","delivery_location","warehouse"];function fe(e){return"supplier"===e.kind?"supplier":"customer"===e.kind?e.category||"importer":e.kind}var ye=(e,t=he)=>t[e]?.tone??"bg-gray-700 text-white",be=(e,t=he)=>t[e]?.label??e,xe=(e,t)=>ye(fe(e),t);function ve(e,t,n=he){return null!=t?String(t):(n[fe(e)]?.label??"").charAt(0).toUpperCase()}var we=["delivery_location","warehouse"];function ke(e,t=we){const n=/* @__PURE__ */new Map;let r=0;for(const o of e)t.includes(o.kind)&&n.set(de(o),++r);return n}function Ne(e){const t={onMap:0,approximate:0,pending:0,off:0};for(const n of e)pe(n)?(t.onMap+=1,"approximate"===n.placement&&(t.approximate+=1)):"pending"===n.placement?t.pending+=1:t.off+=1;return t}function Ce(e){const t=[`${e.onMap} on the map`];return e.approximate&&t.push(`${e.approximate} approximate`),e.pending&&t.push(`${e.pending} locating`),e.off&&t.push(`${e.off} not on the map`),t.join(" · ")}function Me(e){const t=[...new Set(e.filter(pe).map(fe))];return[...ge.filter(e=>t.includes(e)),...t.filter(e=>!ge.includes(e))]}function Le(e,t){return e.filter(e=>!pe(e)&&"pending"!==e.placement).map(e=>{const n=t?.get(de(e)),r=me(e.placement)?.replace(/^Not on the map: /,"")??"";return{key:de(e),text:`${null!=n?`${n}. `:""}${e.label}: ${r}`}})}function $e({categories:e,palette:t=he,floating:n=!0}){return e.length<2?null:/* @__PURE__ */m("div",{className:(n?"absolute left-3 top-3 z-10 ":"")+"flex flex-wrap gap-x-3 gap-y-1 rounded-lg border border-gray-200 bg-white px-3 py-2 text-xs text-gray-600 shadow-sm",children:e.map(e=>/* @__PURE__ */p("span",{className:"inline-flex items-center gap-2",children:[
6
6
  /* @__PURE__ */m("span",{"aria-hidden":!0,className:`h-2.5 w-2.5 rounded-full ${ye(e,t)}`}),be(e,t)]},e))})}function Ee({point:t,number:n,onOpen:a,onClose:l,palette:i=he}){const s=me(t.placement),c=fe(t),u=r().map;/* @__PURE__ */
@@ -20,4 +20,4 @@ return p("section",{"aria-label":s,className:`flex min-w-0 flex-col ${h}`,childr
20
20
  /* @__PURE__ */m("button",{type:"button",onClick:()=>{b()},className:"font-medium text-blue-600 hover:text-blue-800 hover:underline",children:"Try again"})]}),!y&&($>0||M.length>0)&&/* @__PURE__ */p("div",{className:"max-w-full space-y-0.5 rounded-lg border border-gray-200 bg-white px-3 py-2 text-xs shadow-sm","aria-live":"polite",children:[$>0&&/* @__PURE__ */p("p",{className:"flex items-center gap-2 text-gray-500",children:[
21
21
  /* @__PURE__ */p("svg",{className:"h-3 w-3 animate-spin",fill:"none",viewBox:"0 0 24 24",children:[
22
22
  /* @__PURE__ */m("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),
23
- /* @__PURE__ */m("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"})]}),"Locating ",$," address",1===$?"":"es","…"]}),M.slice(0,3).map(e=>/* @__PURE__ */m("p",{className:"truncate text-amber-700",title:e.text,children:e.text},e.key)),M.length>3&&/* @__PURE__ */p("p",{className:"text-gray-500",children:["+",M.length-3," more not on the map"]})]})]}),E&&/* @__PURE__ */m(Ee,{point:E,number:N.get(de(E))??null,onOpen:S,onClose:()=>w(null),palette:u})]})]})}export{v as CARD_MIN_MAP_WIDTH,f as COMPACT_SHOW,ae as EntityMap,je as LocationsMap,C as MAPLIBRE_WORKER_FILE,j as MAP_APART_PX,he as MAP_CATEGORIES,S as MAP_STOP_PX,E as MAP_TARGET_PX,$e as MapLegend,ce as PENDING_POLL_MS,we as SECONDARY_KINDS,Ee as SelectedCard,k as cardMaxHeight,be as categoryLabel,ye as categoryTone,y as foldAttributionOnce,pe as isOnMap,W as layoutPins,Me as legendCategories,$ as loadMapLibre,ke as locationNumbers,M as mapLibreWorkerUrl,ue as mapPointsRefetchInterval,Le as offMapNotes,fe as pinCategory,ve as pinGlyph,xe as pinTone,N as placeCard,me as placementNote,de as pointKey,A as stopsLabel,Ne as summarize,Ce as summaryText,se as useMapHighlight,Se as useMapPoints,K as zoomApart};
23
+ /* @__PURE__ */m("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"})]}),"Locating ",$," address",1===$?"":"es","…"]}),M.slice(0,3).map(e=>/* @__PURE__ */m("p",{className:"truncate text-amber-700",title:e.text,children:e.text},e.key)),M.length>3&&/* @__PURE__ */p("p",{className:"text-gray-500",children:["+",M.length-3," more not on the map"]})]})]}),E&&/* @__PURE__ */m(Ee,{point:E,number:N.get(de(E))??null,onOpen:S,onClose:()=>w(null),palette:u})]})]})}export{v as CARD_MIN_MAP_WIDTH,f as COMPACT_SHOW,ae as EntityMap,je as LocationsMap,C as MAPLIBRE_WORKER_FILE,j as MAP_APART_PX,he as MAP_CATEGORIES,S as MAP_STOP_PX,E as MAP_TARGET_PX,$e as MapLegend,ce as PENDING_POLL_MS,we as SECONDARY_KINDS,Ee as SelectedCard,k as cardMaxHeight,be as categoryLabel,ye as categoryTone,y as foldAttributionOnce,pe as isOnMap,W as layoutPins,Me as legendCategories,$ as loadMapLibre,ke as locationNumbers,M as mapLibreWorkerUrl,ue as mapPointsRefetchInterval,Le as offMapNotes,fe as pinCategory,ve as pinGlyph,xe as pinTone,N as placeCard,me as placementNote,de as pointKey,A as stopsLabel,Ne as summarize,Ce as summaryText,se as useMapHighlight,Se as useMapPoints,F as zoomApart};
@@ -1 +1 @@
1
- export{startClientTelemetry}from"../chunk-3FLFIKAL.js";import"../chunk-FTZ5WHJM.js";import"../chunk-KNUR2UEG.js";
1
+ export{startClientTelemetry}from"../chunk-ZAKN5MPN.js";import"../chunk-YLWIEEDW.js";import"../chunk-KNUR2UEG.js";
@@ -1,4 +1,4 @@
1
- export { A as ALT, b as ALT_SHIFT_D, c as ALT_SHIFT_E, d as ALT_SHIFT_N, e as APP_UPDATE_POLL_MS, f as Accordion, g as AccordionItem, h as AccordionProps, i as Align, j as AlignmentGrid, k as AlignmentGridProps, l as AlignmentPoint, m as AngleScale, n as AppUpdateBanner, o as AppUpdateBannerProps, p as AttachButton, q as AttachButtonProps, r as AttachmentDropZone, s as AttachmentDropZoneProps, t as AttachmentList, u as AttachmentListProps, v as AuthScreen, w as AuthScreenProps, x as Avatar, y as AvatarGroup, z as AvatarGroupProps, B as AvatarProps, D as AvatarSize, E as AvatarStatus, F as BORDER_WIDTHS, G as BackgroundVariant, H as BandScale, I as Banner, J as BannerEmphasis, K as BannerProps, L as BannerTone, M as BorderRole, N as BoxPlotBox, O as BoxPlotChart, Q as BoxPlotChartProps, R as BrandAssetEditor, T as BrandAssetEditorProps, U as BrandAssetPreview, V as BrandMark, W as BrandMarkProps, X as BrandMarkSlot, Y as BrandMarkSurface, Z as BrandMarkTreatment, _ as BreadcrumbItem, $ as Breadcrumbs, a0 as BreadcrumbsProps, a1 as BudgetBar, a2 as BudgetBarProps, a3 as BudgetState, a4 as Button, a5 as ButtonClassesOptions, a6 as ButtonProps, a7 as ButtonSize, a8 as ButtonVariant, a9 as CHART_INK, aa as CMD_A, ab as CMD_DOT, ac as CMD_ENTER, ad as CMD_K, ae as CMD_S, af as COLUMN_COUNT_MAX, ag as COLUMN_COUNT_WIDTHS, ah as COLUMN_SHARES_EQUAL, ai as COLUMN_SHARE_MIN, aj as CONTROL_HEIGHTS, ak as CORNERS, al as Calendar, am as CalendarMode, an as CalendarProps, ao as Candle, ap as CandlestickChart, aq as CandlestickChartProps, ar as Card, as as CardPadding, at as CardProps, au as CardTone, av as CartesianPlot, aw as CartesianPlotProps, ax as CellStyle, ay as ChartBackgroundVariant, az as ChartBrush, aA as ChartBrushProps, aB as ChartCurve, aC as ChartDefs, aD as ChartDefsProps, aE as ChartDot, aF as ChartDotProps, aG as ChartDotVariant, aH as ChartFillVariant, aI as ChartFrame, aJ as ChartFrameProps, aK as ChartHighlightProvider, aL as ChartLegendEntry, aM as ChartLegendSwatch, aN as ChartRange, aO as ChartReferenceLine, aP as ChartRevealDirection, aQ as ChartSkeleton, aR as ChartSkeletonProps, aS as ChartStatusTone, aT as ChartStrokeVariant, aU as ChartTooltip, aV as ChartTooltipProps, aW as ChartTooltipRow, aX as ChatTemplate, aY as Checkbox, aZ as CheckboxProps, a_ as CheckoutTemplate, a$ as ChordChart, b0 as ChordChartProps, b1 as ColorPicker, b2 as ColorPickerPanel, b3 as ColorPickerPanelProps, b4 as ColorPickerProps, b5 as ColorPreset, b6 as ColorSwatch, b7 as ColorSwatchProps, b8 as ColorSwatchSize, b9 as ColoredBadge, ba as ColoredBadgeProps, bb as ColumnChart, bc as ColumnChartProps, C as ColumnDef, bd as ColumnSeries, be as ColumnShares, bf as ComposerAttachments, bg as ComposerAttachmentsProps, bh as ConfirmProvider, bi as ContainerFillChart, bj as ContainerFillChartProps, bk as ContainerFillItem, bl as ContextMenu, bm as ContextMenuPoint, bn as ContextMenuProps, bo as ContextMenuState, bp as ControlSize, bq as CornerOption, br as Corners, bs as CornersInput, bt as CornersInputProps, bu as CountBadge, bv as CountBadgeProps, bw as CountBadgeTone, bx as Curve, by as DAY_MS, bz as DashboardTemplate, bA as DataTable, bB as DataTableColumn, bC as DataTableColumnGroup, bD as DataTableHeader, bE as DataTablePage, bF as DataTableProps, bG as DataTableRowLink, bH as DataTableRowProps, bI as DatePicker, bJ as DatePickerProps, bK as DateRangePicker, bL as DateRangePickerProps, bM as DateTimePicker, bN as DateTimePickerProps, bO as DescriptionColumns, bP as DescriptionItem, bQ as DescriptionList, bR as DescriptionListProps, bS as Dialog, bT as DialogProps, bU as DialogSize, bV as DisplayChipItem, bW as DisplayChips, bX as DisplayChipsProps, bY as Divider, bZ as DividerProps, b_ as DividerSpacing, b$ as Drawer, c0 as DrawerProps, c1 as DrawerSide, c2 as DrawerSize, c3 as DropdownMenu, c4 as DropdownMenuAlign, c5 as DropdownMenuCheckboxItem, c6 as DropdownMenuDividerItem, c7 as DropdownMenuEntry, c8 as DropdownMenuItem, c9 as DropdownMenuLabelItem, ca as DropdownMenuLinkItem, cb as DropdownMenuProps, cc as DropdownMenuRadioItem, cd as DropdownMenuSide, ce as DropdownPositionOptions, cf as ELEVATION_LEVELS, cg as ENGLISH, ch as ENTER, ci as EditableGrid, cj as EditableGridProps, ck as ElevationLevel, cl as EmailTemplate, cm as EmptyState, cn as EmptyStateProps, co as EmptyValue, cp as EmptyValueProps, cq as ErrorBoundary, cr as ErrorBoundaryProps, cs as ErrorPage, ct as ErrorPageProps, cu as FONT_WEIGHTS, cv as FileIntake, cw as FilePicker, cx as FilePickerProps, cy as FillVariant, cz as FontWeightRole, cA as FormError, cB as FormErrorSummary, cC as FormErrorSummaryProps, cD as FormField, cE as FormFieldProps, cF as FormLayoutPage, cG as FunnelChart, cH as FunnelChartProps, cI as FunnelStage, cJ as GLASS_DIVIDER, cL as GROUP_COLORS, cM as GROUP_COLORS_SOLID, cN as GalleryTemplate, cO as Gap, cP as GlassOptions, cQ as GlobalSearch, cR as GlobalSearchProps, cS as Grid, cT as GridCols, cU as GridColumn, cV as GridProps, cW as HeatmapChart, cX as HeatmapChartProps, cY as HelpCenter, cZ as HelpCenterDoc, c_ as HelpCenterProps, c$ as HexInput, d0 as HistogramBin, d1 as HistogramChart, d2 as HistogramChartProps, d3 as Hsv, d4 as INPUT_BASE, d5 as INPUT_SIZES, d6 as IconButton, d7 as IconButtonClassesOptions, d8 as IconButtonProps, d9 as IconRail, da as IconRailButton, db as IconRailButtonProps, dc as IconRailLabels, dd as IconRailLabelsShown, de as IconRailOrientation, df as IconRailProps, dg as ImageFocusPoint, dh as ImageFocusPointProps, di as Inline, dj as InlineProps, dk as Input, dl as InputNumber, dm as InputNumberProps, dn as InputProps, dp as InputSize, dq as Justify, dr as Kanban, ds as KanbanColumn, dt as KanbanProps, du as Kbd, dv as KbdProps, dw as KbdSize, dx as KbdTone, dy as Label, dz as LabelClassesOptions, dA as LabelProps, dB as LadderScale, dC as LanguagePanel, dD as LanguagePanelProps, dE as LanguageSelect, dF as LanguageSelectProps, dG as LinearScale, dH as LinkFilter, dI as LinkFilterField, dJ as LinkKindChoice, dK as LinkOption, dL as LinkOptionGroup, dM as LinkPicker, dN as LinkPickerFieldProps, dO as LinkPickerProps, dP as LinkPickerWindowProps, dQ as LinkRules, dR as LinkTarget, dS as ListDrop, dT as ListFooter, dU as ListLoadError, dV as ListLoadErrorProps, dW as ListMove, dX as ListRow, dY as ListRowProps, dZ as LoadingSpinner, d_ as LoadingSpinnerProps, d$ as MAX_FRACTION_DIGITS, e0 as MENU_MAX_HEIGHT, e1 as MOD, e2 as MOTION, e3 as MOTION_DURATIONS, e4 as Markdown, e4 as MarkdownLite, e5 as MarkdownLiteProps, e5 as MarkdownProps, e6 as MediaUploadField, e7 as MediaUploadFieldProps, e8 as MediaUploadGrid, e9 as MediaUploadGridItem, ea as MediaUploadGridProps, eb as MenuPos, ec as Meter, ed as MeterProps, ee as MetricBar, ef as MetricBarProps, eg as Milestone, eh as MilestoneKind, ei as MilestoneTimeline, ej as MilestoneTimelineProps, ek as MotionSpeed, em as NEXT_CHUNK_PATH_PREFIX, en as NativeSelect, eo as NiceAxis, ep as NumericKeypad, eq as NumericKeypadProps, er as OVERLAY_OPEN_EVENT, es as PLACEHOLDER_INK, et as POPUP_MAX_WIDTH, eu as POST_PRODUCTION_STATUSES, ev as PageHeader, ew as PageHeaderProps, P as PaginatedResponse, ex as Pagination, ey as PaginationProps, ez as PaperclipGlyph, eA as Paragraph, eB as ParagraphProps, eC as PieChart, eD as PieChartProps, eE as PieSegment, eF as PlotGeometry, eG as Point, eH as Popover, eI as PopoverAlign, eJ as PopoverProps, eK as PopoverRenderProps, eL as PopoverSide, eM as PopupMenu, eN as PopupMenuDivider, eO as PopupMenuItem, eP as PopupMenuItemProps, eQ as PopupMenuLabel, eR as PopupMenuProps, eS as PopupSubmenu, eT as PopupSubmenuProps, eU as PortalBrandingContextValue, eV as PortalBrandingProvider, eW as PortalBrandingProviderProps, eX as ProductionTimeline, eY as ProductionTimelineProps, eZ as ProductionTimelineSnapshot, e_ as ProgressItem, e$ as PublicPortal, f0 as PublicPortalBranding, f1 as RADAR_SERIES_CAP, f2 as RADIUS_ROLES, f3 as ROW_HEIGHTS, f4 as RadarAxis, f5 as RadarChart, f6 as RadarChartProps, f7 as RadarSeries, f8 as RadialBarChart, f9 as RadialBarChartProps, fa as RadialBarRow, fb as Radio, fc as RadioGroup, fd as RadioGroupOption, fe as RadioGroupOrientation, ff as RadioGroupProps, fg as RadioProps, fh as RadiusRole, fi as Range, fj as RangeChart, fk as RangeChartProps, fl as RangeRow, fm as RankedBars, fn as RankedBarsProps, fo as RankedBarsRow, fp as ResizeHandle, fq as ResizeHandleOrientation, fr as ResizeHandleProps, fs as ResizeHandleSide, ft as ResizeHandleStackSide, fu as ResolvedPortalBrandAsset, fv as Result, fw as ResultProps, fx as ResultStatus, fy as RevealDirection, fz as SCATTER_SERIES_CAP, fA as SERIES_SLOT_COUNT, fB as SERIES_VARS, fC as SHELL_LANGUAGE_STORAGE_KEY, fD as SHIFT, fE as SPACING_ROLES, fF as SPACING_SCALE, fG as STAGES, fH as STALE_CHUNK_RELOAD_COOLDOWN_MS, fI as STALE_CHUNK_RELOAD_KEY, fJ as STATUS_VARS, fK as SankeyChart, fL as SankeyChartProps, fM as SankeyLink, fN as SankeyNode, fO as ScatterChart, fP as ScatterChartProps, fQ as ScatterPoint, fR as ScatterSeries, S as SearchConfig, fS as SearchListRoute, fT as SearchProvider, fU as SearchQuickAction, fV as SearchResponse, fW as SearchResult, fX as SearchableItem, fY as SearchableOption, fZ as SearchableOptionGroup, f_ as SearchableSelect, f$ as SearchableSelectBaseProps, g0 as SearchableSelectMultipleProps, g1 as SearchableSelectProps, g2 as Segmented, g3 as SegmentedOption, g4 as SegmentedProps, g5 as SegmentedSize, g6 as Select, g7 as SelectBaseProps, g8 as SelectItem, g9 as SelectMultipleProps, ga as SelectOption, gb as SelectOptionGroup, gc as SelectProps, gd as SemanticGroup, ge as SeriesSlots, gf as SettingRow, gg as SettingRowProps, gh as SeverityTone, gk as ShellLanguage, gl as ShellLanguageProvider, gm as ShellLanguageState, gn as ShellPrefsAdapter, go as ShellPrefsProvider, gp as SidebarActionButton, gq as SidebarActionButtonProps, gr as SidebarGroupLabel, gs as SidebarGroupLabelProps, gt as SidebarLayout, gu as SidebarLayoutProps, gv as SidebarNavGroup, gw as SidebarNavGroupProps, gx as SidebarNavItem, gy as SidebarNavItemProps, gz as Skeleton, gA as SkeletonProps, gB as SkeletonVariant, gC as Slider, gD as SliderGroup, gE as SliderProps, gF as SliderSize, gG as Snippet, gH as SnippetProps, gI as SnippetSize, gJ as SnippetVariant, a as SortState, gK as SortableList, gL as SortableListProps, gM as SortableListSpacing, gN as SpacingRole, gO as SpacingStep, gP as Sparkline, gQ as SparklineProps, gR as Stack, gS as StackProps, gT as StaleChunkReloadOptions, gU as StatCard, gV as StatCardProps, gW as StatTile, gX as StatTileProps, gY as Statistic, gZ as StatisticProps, g_ as StatisticSize, g$ as StatisticTone, h0 as StatusBadge, h1 as StatusBadgeProvider, h2 as StatusEmphasis, h3 as StepItem, h4 as Stepper, h5 as StepperProps, h6 as StrokeVariant, h7 as SunburstChart, h8 as SunburstChartProps, h9 as SunburstNode, ha as Switch, hb as SwitchProps, hc as SwitchSize, hd as TYPE_SCALE, he as TabItem, hf as Tabs, hg as TabsProps, hh as TagInput, hi as TagInputOption, hj as TagInputProps, hk as TagInputTone, hl as Text, hm as TextLinkField, hn as TextLinkFieldProps, ho as TextProps, hp as TextSize, hq as TextTone, hr as TextWeight, hs as Textarea, ht as TextareaProps, hu as Theme, hv as TileButton, hw as TileButtonProps, hx as TileSize, hy as TimeAgo, hz as TimeAgoProps, hA as TimePicker, hB as TimePickerProps, hC as TimeSeriesChart, hD as TimeSeriesChartProps, hE as TimeSeriesSeries, hF as TimelineMarker, hG as TimelineMarkerKind, hH as TimelineReport, hI as TimelineScrubProgress, hJ as TimelineTrack, hK as TimelineTrackItem, hL as TimelineTrackKind, hM as TimelineTrackPending, hN as TimelineTrackPhase, hO as TimelineTrackPlayback, hP as TimelineTrackProps, hQ as TimelineTrackThumb, hR as Title, hS as TitleLevel, hT as TitleProps, hU as ToastOptions, hV as ToastPlacement, hW as Tooltip, hX as TooltipProps, hY as TopNav, hZ as TopNavItem, h_ as TopNavProps, h$ as Tree, i0 as TreeDrop, i1 as TreeEmptySlot, i2 as TreeEmptySlotProps, i3 as TreeGroup, i4 as TreeGroupLabel, i5 as TreeGroupProps, i6 as TreeMove, i7 as TreeProps, i8 as TreeRow, i9 as TreeRowProps, ia as TreeSeam, ib as TreeSeamProps, ic as TreemapChart, id as TreemapChartProps, ie as TreemapItem, ig as TreemapTile, ih as TypeStep, ii as UseAppUpdateOptions, ij as UseContextMenu, ik as UseProductionTimelineOpts, il as VERSION, im as VITE_PRELOAD_ERROR_EVENT, io as WaterfallChart, ip as WaterfallChartProps, iq as WaterfallStep, ir as WidthsBar, is as WidthsBarProps, it as ZLayer, iu as Z_LAYERS, iv as angleScale, iw as appendKey, ix as applyCorners, iy as applyIconSet, iz as applyThemePrefs, iA as arcPath, iB as areaBetween, iC as areaFrom, iD as assignSeriesSlots, iE as autoHighlightIndex, iF as backspace, iG as bandScale, iH as binValues, iI as budgetState, iJ as bumpPath, iK as buttonClasses, iL as calcOverall, iM as calcReportOverall, iN as colorFill, iO as colorSwatchClasses, iP as columnSharesWidths, iQ as confirm, iR as confirmDestructive, iS as curvePath, iT as dashFor, iV as dismissPopups, iW as fillFor, iX as fillId, iY as fmtSliderDate, iZ as fromDateKey, i_ as glassStyle, i$ as glowId, j0 as groundId, j1 as groupColors, j2 as hexToHsv, j3 as highlightOpacity, j4 as hsvToHex, j5 as iconButtonClasses, j6 as inputClasses, j7 as installStaleChunkReload, j8 as isMac, j9 as isSeverityTone, ja as isSpacingStep, jb as isStaleChunkError, jd as labelClasses, je as ladderScale, jf as languageSelectWidth, jg as leavesContextMenuAlone, jh as linearPath, ji as linearScale, jj as logScale, jk as maskId, jl as matchShellLanguage, jm as mediaFileName, jn as monotonePath, jo as niceAxis, jp as niceMax, jq as openGlobalSearch, jr as parseHexColor, js as polygonPoints, jt as popupBounds, ju as prompt, jv as pushRecentSearch, jw as radiusScale, jx as readSavedShellLanguage, jy as registerModalEscapeInterceptor, jz as resolveBrandMarkTreatment, jA as resolveColumnShares, jB as resolveColumnWidths, jC as resolveCorners, jD as resolvePortalBrandAsset, jE as resolveSeriesColor, jF as resolveSeriesColorWithin, jG as resolveShellLanguage, jH as resolveTheme, jI as sanitizeRecentSearches, jJ as saveShellLanguage, jK as seriesColor, jL as severityOf, jM as splinePath, jN as squarify, jO as stagger, jP as stepPath, jQ as tabButtonId, jR as tabPanelId, jS as toDateKey, jT as toDayMs, jU as toISODate, jV as toast, jW as toggleSeriesSlot, jX as useAppUpdate, jY as useClickOutside, jZ as useConfirm, j_ as useContextMenu, j$ as useDebouncedValue, k0 as useDropdownPosition, k1 as useFocusTrap, k2 as useHighlight, k3 as useIsMobile, k4 as useLocalStoragePrefs, k5 as usePlotWidth, k6 as usePortalBranding, k7 as useProductionTimeline, k8 as useScrollLock, k9 as useShellLanguage, ka as useShellPrefs, kb as useStatusLabel, kc as useTheme } from '../index-C4iOtAIZ.js';
1
+ export { A as ALT, b as ALT_SHIFT_D, c as ALT_SHIFT_E, d as ALT_SHIFT_N, e as APP_UPDATE_POLL_MS, f as Accordion, g as AccordionItem, h as AccordionProps, i as Align, j as AlignmentGrid, k as AlignmentGridProps, l as AlignmentPoint, m as AngleScale, n as AppUpdateBanner, o as AppUpdateBannerProps, p as AttachButton, q as AttachButtonProps, r as AttachmentDropZone, s as AttachmentDropZoneProps, t as AttachmentList, u as AttachmentListProps, v as AuthScreen, w as AuthScreenProps, x as Avatar, y as AvatarGroup, z as AvatarGroupProps, B as AvatarProps, D as AvatarSize, E as AvatarStatus, F as BORDER_WIDTHS, G as BackgroundVariant, H as BandScale, I as Banner, J as BannerEmphasis, K as BannerProps, L as BannerTone, M as BorderRole, N as BoxPlotBox, O as BoxPlotChart, Q as BoxPlotChartProps, R as BrandAssetEditor, T as BrandAssetEditorProps, U as BrandAssetPreview, V as BrandMark, W as BrandMarkProps, X as BrandMarkSlot, Y as BrandMarkSurface, Z as BrandMarkTreatment, _ as BreadcrumbItem, $ as Breadcrumbs, a0 as BreadcrumbsProps, a1 as BudgetBar, a2 as BudgetBarProps, a3 as BudgetState, a4 as Button, a5 as ButtonClassesOptions, a6 as ButtonProps, a7 as ButtonSize, a8 as ButtonVariant, a9 as CHART_INK, aa as CMD_A, ab as CMD_DOT, ac as CMD_ENTER, ad as CMD_K, ae as CMD_S, af as COLUMN_COUNT_MAX, ag as COLUMN_COUNT_WIDTHS, ah as COLUMN_SHARES_EQUAL, ai as COLUMN_SHARE_MIN, aj as CONTROL_HEIGHTS, ak as CORNERS, al as Calendar, am as CalendarMode, an as CalendarProps, ao as Candle, ap as CandlestickChart, aq as CandlestickChartProps, ar as Card, as as CardPadding, at as CardProps, au as CardTone, av as CartesianPlot, aw as CartesianPlotProps, ax as CellStyle, ay as ChartBackgroundVariant, az as ChartBrush, aA as ChartBrushProps, aB as ChartCurve, aC as ChartDefs, aD as ChartDefsProps, aE as ChartDot, aF as ChartDotProps, aG as ChartDotVariant, aH as ChartFillVariant, aI as ChartFrame, aJ as ChartFrameProps, aK as ChartHighlightProvider, aL as ChartLegendEntry, aM as ChartLegendSwatch, aN as ChartRange, aO as ChartReferenceLine, aP as ChartRevealDirection, aQ as ChartSkeleton, aR as ChartSkeletonProps, aS as ChartStatusTone, aT as ChartStrokeVariant, aU as ChartTooltip, aV as ChartTooltipProps, aW as ChartTooltipRow, aX as ChatTemplate, aY as Checkbox, aZ as CheckboxProps, a_ as CheckoutTemplate, a$ as ChordChart, b0 as ChordChartProps, b1 as ColorPicker, b2 as ColorPickerPanel, b3 as ColorPickerPanelProps, b4 as ColorPickerProps, b5 as ColorPreset, b6 as ColorSwatch, b7 as ColorSwatchProps, b8 as ColorSwatchSize, b9 as ColoredBadge, ba as ColoredBadgeProps, bb as ColumnChart, bc as ColumnChartProps, C as ColumnDef, bd as ColumnSeries, be as ColumnShares, bf as ComposerAttachments, bg as ComposerAttachmentsProps, bh as ConfirmProvider, bi as ContainerFillChart, bj as ContainerFillChartProps, bk as ContainerFillItem, bl as ContextMenu, bm as ContextMenuPoint, bn as ContextMenuProps, bo as ContextMenuState, bp as ControlSize, bq as CornerOption, br as Corners, bs as CornersInput, bt as CornersInputProps, bu as CountBadge, bv as CountBadgeProps, bw as CountBadgeTone, bx as Curve, by as DAY_MS, bz as DashboardTemplate, bA as DataTable, bB as DataTableColumn, bC as DataTableColumnGroup, bD as DataTableHeader, bE as DataTablePage, bF as DataTableProps, bG as DataTableRowLink, bH as DataTableRowProps, bI as DatePicker, bJ as DatePickerProps, bK as DateRangePicker, bL as DateRangePickerProps, bM as DateTimePicker, bN as DateTimePickerProps, bO as DescriptionColumns, bP as DescriptionItem, bQ as DescriptionList, bR as DescriptionListProps, bS as Dialog, bT as DialogProps, bU as DialogSize, bV as DisplayChipItem, bW as DisplayChips, bX as DisplayChipsProps, bY as Divider, bZ as DividerProps, b_ as DividerSpacing, b$ as Drawer, c0 as DrawerProps, c1 as DrawerSide, c2 as DrawerSize, c3 as DropdownMenu, c4 as DropdownMenuAlign, c5 as DropdownMenuCheckboxItem, c6 as DropdownMenuDividerItem, c7 as DropdownMenuEntry, c8 as DropdownMenuItem, c9 as DropdownMenuLabelItem, ca as DropdownMenuLinkItem, cb as DropdownMenuProps, cc as DropdownMenuRadioItem, cd as DropdownMenuSide, ce as DropdownPositionOptions, cf as ELEVATION_LEVELS, cg as ENGLISH, ch as ENTER, ci as EditableGrid, cj as EditableGridProps, ck as ElevationLevel, cl as EmailTemplate, cm as EmptyState, cn as EmptyStateProps, co as EmptyValue, cp as EmptyValueProps, cq as ErrorBoundary, cr as ErrorBoundaryProps, cs as ErrorPage, ct as ErrorPageProps, cu as FONT_WEIGHTS, cv as FileIntake, cw as FilePicker, cx as FilePickerProps, cy as FillVariant, cz as FloatingBar, cA as FloatingBarAlign, cB as FloatingBarProps, cC as FloatingBarSide, cD as FontWeightRole, cE as FormError, cF as FormErrorSummary, cG as FormErrorSummaryProps, cH as FormField, cI as FormFieldProps, cJ as FormLayoutPage, cK as FunnelChart, cL as FunnelChartProps, cM as FunnelStage, cN as GLASS_DIVIDER, cP as GROUP_COLORS, cQ as GROUP_COLORS_SOLID, cR as GalleryTemplate, cS as Gap, cT as GlassOptions, cU as GlobalSearch, cV as GlobalSearchProps, cW as Grid, cX as GridCols, cY as GridColumn, cZ as GridProps, c_ as HeatmapChart, c$ as HeatmapChartProps, d0 as HelpCenter, d1 as HelpCenterDoc, d2 as HelpCenterProps, d3 as HexInput, d4 as HistogramBin, d5 as HistogramChart, d6 as HistogramChartProps, d7 as Hsv, d8 as INPUT_BASE, d9 as INPUT_SIZES, da as IconButton, db as IconButtonClassesOptions, dc as IconButtonProps, dd as IconRail, de as IconRailButton, df as IconRailButtonProps, dg as IconRailLabels, dh as IconRailLabelsShown, di as IconRailOrientation, dj as IconRailProps, dk as ImageFocusPoint, dl as ImageFocusPointProps, dm as Inline, dn as InlineProps, dp as Input, dq as InputNumber, dr as InputNumberProps, ds as InputProps, dt as InputSize, du as Justify, dv as Kanban, dw as KanbanColumn, dx as KanbanProps, dy as Kbd, dz as KbdProps, dA as KbdSize, dB as KbdTone, dC as Label, dD as LabelClassesOptions, dE as LabelProps, dF as LadderScale, dG as LanguagePanel, dH as LanguagePanelProps, dI as LanguageSelect, dJ as LanguageSelectProps, dK as LinearScale, dL as LinkFilter, dM as LinkFilterField, dN as LinkKindChoice, dO as LinkOption, dP as LinkOptionGroup, dQ as LinkPicker, dR as LinkPickerFieldProps, dS as LinkPickerProps, dT as LinkPickerWindowProps, dU as LinkRules, dV as LinkTarget, dW as ListDrop, dX as ListFooter, dY as ListLoadError, dZ as ListLoadErrorProps, d_ as ListMove, d$ as ListRow, e0 as ListRowProps, e1 as LoadingSpinner, e2 as LoadingSpinnerProps, e3 as MAX_FRACTION_DIGITS, e4 as MENU_MAX_HEIGHT, e5 as MOD, e6 as MOTION, e7 as MOTION_DURATIONS, e8 as Markdown, e8 as MarkdownLite, e9 as MarkdownLiteProps, e9 as MarkdownProps, ea as MediaUploadField, eb as MediaUploadFieldProps, ec as MediaUploadGrid, ed as MediaUploadGridItem, ee as MediaUploadGridProps, ef as MenuPos, eg as Meter, eh as MeterProps, ei as MetricBar, ej as MetricBarProps, ek as Milestone, el as MilestoneKind, em as MilestoneTimeline, en as MilestoneTimelineProps, eo as MotionSpeed, eq as NEXT_CHUNK_PATH_PREFIX, er as NativeSelect, es as NiceAxis, et as NumericKeypad, eu as NumericKeypadProps, ev as OVERLAY_OPEN_EVENT, ew as PLACEHOLDER_INK, ex as POPUP_MAX_WIDTH, ey as POST_PRODUCTION_STATUSES, ez as PageHeader, eA as PageHeaderProps, P as PaginatedResponse, eB as Pagination, eC as PaginationProps, eD as PaperclipGlyph, eE as Paragraph, eF as ParagraphProps, eG as PieChart, eH as PieChartProps, eI as PieSegment, eJ as PlotGeometry, eK as Point, eL as Popover, eM as PopoverAlign, eN as PopoverProps, eO as PopoverRenderProps, eP as PopoverSide, eQ as PopupMenu, eR as PopupMenuDivider, eS as PopupMenuItem, eT as PopupMenuItemProps, eU as PopupMenuLabel, eV as PopupMenuProps, eW as PopupSubmenu, eX as PopupSubmenuProps, eY as PortalBrandingContextValue, eZ as PortalBrandingProvider, e_ as PortalBrandingProviderProps, e$ as ProductionTimeline, f0 as ProductionTimelineProps, f1 as ProductionTimelineSnapshot, f2 as ProgressItem, f3 as PublicPortal, f4 as PublicPortalBranding, f5 as RADAR_SERIES_CAP, f6 as RADIUS_ROLES, f7 as ROW_HEIGHTS, f8 as RadarAxis, f9 as RadarChart, fa as RadarChartProps, fb as RadarSeries, fc as RadialBarChart, fd as RadialBarChartProps, fe as RadialBarRow, ff as Radio, fg as RadioGroup, fh as RadioGroupOption, fi as RadioGroupOrientation, fj as RadioGroupProps, fk as RadioProps, fl as RadiusRole, fm as Range, fn as RangeChart, fo as RangeChartProps, fp as RangeRow, fq as RankedBars, fr as RankedBarsProps, fs as RankedBarsRow, ft as ResizeHandle, fu as ResizeHandleOrientation, fv as ResizeHandleProps, fw as ResizeHandleSide, fx as ResizeHandleStackSide, fy as ResolvedPortalBrandAsset, fz as Result, fA as ResultProps, fB as ResultStatus, fC as RevealDirection, fD as SCATTER_SERIES_CAP, fE as SERIES_SLOT_COUNT, fF as SERIES_VARS, fG as SHELL_LANGUAGE_STORAGE_KEY, fH as SHIFT, fI as SPACING_ROLES, fJ as SPACING_SCALE, fK as STAGES, fL as STALE_CHUNK_RELOAD_COOLDOWN_MS, fM as STALE_CHUNK_RELOAD_KEY, fN as STATUS_VARS, fO as SankeyChart, fP as SankeyChartProps, fQ as SankeyLink, fR as SankeyNode, fS as ScatterChart, fT as ScatterChartProps, fU as ScatterPoint, fV as ScatterSeries, S as SearchConfig, fW as SearchListRoute, fX as SearchProvider, fY as SearchQuickAction, fZ as SearchResponse, f_ as SearchResult, f$ as SearchableItem, g0 as SearchableOption, g1 as SearchableOptionGroup, g2 as SearchableSelect, g3 as SearchableSelectBaseProps, g4 as SearchableSelectMultipleProps, g5 as SearchableSelectProps, g6 as Segmented, g7 as SegmentedOption, g8 as SegmentedProps, g9 as SegmentedSize, ga as Select, gb as SelectBaseProps, gc as SelectItem, gd as SelectMultipleProps, ge as SelectOption, gf as SelectOptionGroup, gg as SelectProps, gh as SemanticGroup, gi as SeriesSlots, gj as SettingRow, gk as SettingRowProps, gl as SeverityTone, go as ShellLanguage, gp as ShellLanguageProvider, gq as ShellLanguageState, gr as ShellPrefsAdapter, gs as ShellPrefsProvider, gt as SidebarActionButton, gu as SidebarActionButtonProps, gv as SidebarGroupLabel, gw as SidebarGroupLabelProps, gx as SidebarLayout, gy as SidebarLayoutProps, gz as SidebarNavGroup, gA as SidebarNavGroupProps, gB as SidebarNavItem, gC as SidebarNavItemProps, gD as Skeleton, gE as SkeletonProps, gF as SkeletonVariant, gG as Slider, gH as SliderGroup, gI as SliderProps, gJ as SliderSize, gK as Snippet, gL as SnippetProps, gM as SnippetSize, gN as SnippetVariant, a as SortState, gO as SortableList, gP as SortableListProps, gQ as SortableListSpacing, gR as SpacingRole, gS as SpacingStep, gT as Sparkline, gU as SparklineProps, gV as Stack, gW as StackProps, gX as StaleChunkReloadOptions, gY as StatCard, gZ as StatCardProps, g_ as StatTile, g$ as StatTileProps, h0 as Statistic, h1 as StatisticProps, h2 as StatisticSize, h3 as StatisticTone, h4 as StatusBadge, h5 as StatusBadgeProvider, h6 as StatusEmphasis, h7 as StepItem, h8 as Stepper, h9 as StepperProps, ha as StrokeVariant, hb as SunburstChart, hc as SunburstChartProps, hd as SunburstNode, he as Switch, hf as SwitchProps, hg as SwitchSize, hh as TYPE_SCALE, hi as TabItem, hj as Tabs, hk as TabsProps, hl as TagInput, hm as TagInputOption, hn as TagInputProps, ho as TagInputTone, hp as Text, hq as TextLinkField, hr as TextLinkFieldProps, hs as TextProps, ht as TextSize, hu as TextTone, hv as TextWeight, hw as Textarea, hx as TextareaProps, hy as Theme, hz as TileButton, hA as TileButtonProps, hB as TileSize, hC as TimeAgo, hD as TimeAgoProps, hE as TimePicker, hF as TimePickerProps, hG as TimeSeriesChart, hH as TimeSeriesChartProps, hI as TimeSeriesSeries, hJ as TimelineMarker, hK as TimelineMarkerKind, hL as TimelineReport, hM as TimelineScrubProgress, hN as TimelineTrack, hO as TimelineTrackItem, hP as TimelineTrackKind, hQ as TimelineTrackPending, hR as TimelineTrackPhase, hS as TimelineTrackPlayback, hT as TimelineTrackProps, hU as TimelineTrackThumb, hV as Title, hW as TitleLevel, hX as TitleProps, hY as ToastOptions, hZ as ToastPlacement, h_ as Tooltip, h$ as TooltipProps, i0 as TopNav, i1 as TopNavItem, i2 as TopNavProps, i3 as Tree, i4 as TreeDrop, i5 as TreeEmptySlot, i6 as TreeEmptySlotProps, i7 as TreeGroup, i8 as TreeGroupLabel, i9 as TreeGroupLabelProps, ia as TreeGroupProps, ib as TreeMove, ic as TreeProps, id as TreeRow, ie as TreeRowProps, ig as TreeSeam, ih as TreeSeamProps, ii as TreemapChart, ij as TreemapChartProps, ik as TreemapItem, il as TreemapTile, im as TypeStep, io as UseAppUpdateOptions, ip as UseContextMenu, iq as UseProductionTimelineOpts, ir as VERSION, is as VITE_PRELOAD_ERROR_EVENT, it as WaterfallChart, iu as WaterfallChartProps, iv as WaterfallStep, iw as WidthsBar, ix as WidthsBarProps, iy as ZLayer, iz as Z_LAYERS, iA as angleScale, iB as appendKey, iC as applyCorners, iD as applyIconSet, iE as applyThemePrefs, iF as arcPath, iG as areaBetween, iH as areaFrom, iI as assignSeriesSlots, iJ as autoHighlightIndex, iK as backspace, iL as bandScale, iM as binValues, iN as budgetState, iO as bumpPath, iP as buttonClasses, iQ as calcOverall, iR as calcReportOverall, iS as colorFill, iT as colorSwatchClasses, iU as columnSharesWidths, iV as confirm, iW as confirmDestructive, iX as curvePath, iY as dashFor, i_ as dismissPopups, i$ as fillFor, j0 as fillId, j1 as fmtSliderDate, j2 as fromDateKey, j3 as glassStyle, j4 as glowId, j5 as groundId, j6 as groupColors, j7 as hexToHsv, j8 as highlightOpacity, j9 as hsvToHex, ja as iconButtonClasses, jb as inputClasses, jc as installStaleChunkReload, jd as isMac, je as isSeverityTone, jf as isSpacingStep, jg as isStaleChunkError, ji as labelClasses, jj as ladderScale, jk as languageSelectWidth, jl as leavesContextMenuAlone, jm as linearPath, jn as linearScale, jo as logScale, jp as maskId, jq as matchShellLanguage, jr as mediaFileName, js as monotonePath, jt as niceAxis, ju as niceMax, jv as openGlobalSearch, jw as parseHexColor, jx as polygonPoints, jy as popupBounds, jz as prompt, jA as pushRecentSearch, jB as radiusScale, jC as readSavedShellLanguage, jD as registerModalEscapeInterceptor, jE as resolveBrandMarkTreatment, jF as resolveColumnShares, jG as resolveColumnWidths, jH as resolveCorners, jI as resolvePortalBrandAsset, jJ as resolveSeriesColor, jK as resolveSeriesColorWithin, jL as resolveShellLanguage, jM as resolveTheme, jN as sanitizeRecentSearches, jO as saveShellLanguage, jP as seriesColor, jQ as severityOf, jR as solidSurfaceStyle, jS as splinePath, jT as squarify, jU as stagger, jV as stepPath, jW as tabButtonId, jX as tabPanelId, jY as toDateKey, jZ as toDayMs, j_ as toISODate, j$ as toast, k0 as toggleSeriesSlot, k1 as useAppUpdate, k2 as useClickOutside, k3 as useConfirm, k4 as useContextMenu, k5 as useDebouncedValue, k6 as useDropdownPosition, k7 as useFocusTrap, k8 as useHighlight, k9 as useIsMobile, ka as useLocalStoragePrefs, kb as usePlotWidth, kc as usePortalBranding, kd as useProductionTimeline, ke as useScrollLock, kf as useShellLanguage, kg as useShellPrefs, kh as useStatusLabel, ki as useTheme } from '../index-DbNqOkOy.js';
2
2
  export { C as CurrencyFormat, D as DATE_FORMAT_OPTIONS, a as DateFormatKey, E as EMPTY_VALUE, F as FOCAL_DEFAULT, b as FOCAL_NUDGE_COARSE, c as FOCAL_NUDGE_STEP, d as FocalPoint, e as FormatDateOptions, f as FormatMoneyOptions, T as TZ_AUTO, g as TimeAgoOptions, h as currencyDecimals, i as currencySymbol, j as firstDayOfWeek, k as focalFromRect, l as formatBytes, m as formatDate, n as formatDateTime, o as formatFocal, p as formatMoney, q as formatTime, r as getUserDateFormat, s as getUserTimezone, t as nudgeFocal, u as parseFocal, v as setCurrencyFormats, w as setUserDateFormat, x as setUserTimezone, y as syncTimezoneFromProfile, z as timeAgo } from '../index-CHufemKB.js';
3
3
  export { isSafeLinkHref } from '../markup/index.js';
4
4
  export { FileIntakeAlert, FileIntakeLimits, FileIntakeOptions, FileRejection, FileRejectionReason, acceptsFile, useFileIntake } from '../file-intake/index.js';
package/dist/ui/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{APP_UPDATE_POLL_MS,Accordion,AlignmentGrid,AppUpdateBanner,AttachButton,AttachmentDropZone,AttachmentList,AuthScreen,Avatar,AvatarGroup,BORDER_WIDTHS,Banner,BoxPlotChart,BrandAssetEditor,BudgetBar,CHART_INK,COLUMN_COUNT_MAX,COLUMN_COUNT_WIDTHS,COLUMN_SHARES_EQUAL,COLUMN_SHARE_MIN,CONTROL_HEIGHTS,CORNERS,Calendar,CandlestickChart,Card,CartesianPlot,ChartBrush,ChartDefs,ChartDot,ChartFrame,ChartHighlightProvider,ChartSkeleton,ChartTooltip,ChatTemplate,Checkbox_default as Checkbox,CheckoutTemplate,ChordChart,ColorPicker,ColorPickerPanel,ColorSwatch,ColoredBadge,ColumnChart,ComposerAttachments,ContainerFillChart,ContextMenu,CornersInput,CountBadge,DAY_MS,DashboardTemplate,DataTable,DataTablePage,DatePicker_default as DatePicker,DateRangePicker,DateTimePicker_default as DateTimePicker,DescriptionList,DisplayChips,Divider,Drawer,DropdownMenu,ELEVATION_LEVELS,EmailTemplate,EmptyState,EmptyValue,ErrorBoundary,ErrorPage,FONT_WEIGHTS,FilePicker_default as FilePicker,FormErrorSummary,FormField,FormLayoutPage,FunnelChart,GROUP_COLORS,GROUP_COLORS_SOLID,GalleryTemplate,Grid,HeatmapChart,HelpCenter,HexInput,HistogramChart,IconButton_default as IconButton,IconRail,IconRailButton,ImageFocusPoint,Inline,Input_default as Input,InputNumber_default as InputNumber,Kanban,Label,LanguagePanel,LanguageSelect,LinkPicker,ListFooter,ListLoadError,ListRow,MAX_FRACTION_DIGITS,MOTION,MOTION_DURATIONS,Markdown,Markdown as MarkdownLite,MediaUploadField,MediaUploadGrid,Meter,MetricBar,MilestoneTimeline,NativeSelect,NumericKeypad,POST_PRODUCTION_STATUSES,PageHeader,Pagination,PaperclipGlyph,Paragraph,PieChart,Popover,PortalBrandingProvider,ProductionTimeline,RADAR_SERIES_CAP,RADIUS_ROLES,ROW_HEIGHTS,RadarChart,RadialBarChart,Radio_default as Radio,RadioGroup,RangeChart,RankedBars,SCATTER_SERIES_CAP,SERIES_SLOT_COUNT,SERIES_VARS,SPACING_ROLES,SPACING_SCALE,STAGES,STATUS_VARS,SankeyChart,ScatterChart,SearchableSelect,Segmented,Select_default as Select,SettingRow,SidebarActionButton,SidebarGroupLabel,SidebarNavGroup,SidebarNavItem,Skeleton,Slider,SliderGroup,Snippet,SortableList,Sparkline,Stack,StatCard,StatTile,Statistic,StatusBadge,StatusBadgeProvider,Stepper,SunburstChart,Switch_default as Switch,TYPE_SCALE,Tabs,TagInput,Text,TextLinkField,Textarea_default as Textarea,TileButton_default as TileButton,TimeAgo,TimePicker_default as TimePicker,TimeSeriesChart,TimelineTrack,Title,TopNav,Tree,TreeEmptySlot,TreeGroup,TreeGroupLabel,TreeRow,TreeSeam,TreemapChart,WaterfallChart,WidthsBar,angleScale,appendKey,applyCorners,applyIconSet,applyThemePrefs,arcPath,areaBetween,areaFrom,assignSeriesSlots,autoHighlightIndex,backspace,bandScale,binValues,budgetState,bumpPath,calcOverall,calcReportOverall,colorFill,colorSwatchClasses,columnSharesWidths,curvePath,dashFor,fillFor,fillId,fmtSliderDate,fromKey as fromDateKey,glowId,groundId,groupColors,hexToHsv,highlightOpacity,hsvToHex,isSeverityTone,isSpacingStep,labelClasses,ladderScale,languageSelectWidth,linearPath,linearScale,logScale,maskId,mediaFileName,monotonePath,niceAxis,niceMax,parseHexColor,polygonPoints,radiusScale,resolveColumnShares,resolveColumnWidths,resolveCorners,resolvePortalBrandAsset,resolveSeriesColor,resolveSeriesColorWithin,resolveTheme,seriesColor,severityOf,splinePath,squarify,stagger,stepPath,tabButtonId,tabPanelId,toKey as toDateKey,toDayMs,toISODate,toggleSeriesSlot,useAppUpdate,useClickOutside,useContextMenu,useDebouncedValue,useHighlight,usePlotWidth,usePortalBranding,useProductionTimeline,useStatusLabel,useTheme}from"../chunk-Q2HEVH2C.js";export{Breadcrumbs}from"../chunk-Z2TTHY7G.js";export{ResizeHandle,SidebarLayout}from"../chunk-VFBUDSMF.js";export{BrandMark,GlobalSearch,openGlobalSearch,pushRecent as pushRecentSearch,resolveBrandMarkTreatment,sanitizeRecent as sanitizeRecentSearches}from"../chunk-BQ7GR7H6.js";export{EditableGrid}from"../chunk-7BX3JQBP.js";import"../chunk-BR22X7E5.js";export{INPUT_BASE,INPUT_SIZES,PLACEHOLDER_INK,inputClasses}from"../chunk-HJQAE6SP.js";export{isSafeLinkHref}from"../chunk-PJPK2ADX.js";export{ENGLISH,SHELL_LANGUAGE_STORAGE_KEY,ShellLanguageProvider,matchShellLanguage,readSavedShellLanguage,resolveShellLanguage,saveShellLanguage,useShellLanguage}from"../chunk-RBKIYZ7H.js";export{toast_default as toast}from"../chunk-RUHUTZN4.js";export{ALT,ALT_SHIFT_D,ALT_SHIFT_E,ALT_SHIFT_N,CMD_A,CMD_DOT,CMD_ENTER,CMD_K,CMD_S,ENTER,Kbd,LoadingSpinner,MOD,NEXT_CHUNK_PATH_PREFIX,Result,SHIFT,STALE_CHUNK_RELOAD_COOLDOWN_MS,STALE_CHUNK_RELOAD_KEY,ShellPrefsProvider,VITE_PRELOAD_ERROR_EVENT,installStaleChunkReload,isMac,isStaleChunkError,useIsMobile,useLocalStoragePrefs,useShellPrefs}from"../chunk-ZRU5F2XT.js";import"../chunk-5A7MWTXX.js";export{Button_default as Button,MENU_MAX_HEIGHT,POPUP_MAX_WIDTH,Tooltip,popupBounds,useDropdownPosition}from"../chunk-WYNQLAKD.js";export{ConfirmProvider,Dialog,confirm,confirmDestructive,prompt,useConfirm,useFocusTrap,useScrollLock}from"../chunk-76VCH7N6.js";export{PopupMenu,PopupMenuDivider,PopupMenuItem,PopupMenuLabel,PopupSubmenu,leavesContextMenuAlone}from"../chunk-IQDY2YFN.js";import"../chunk-UVBK6YSR.js";export{buttonClasses,iconButtonClasses}from"../chunk-JTNKC4CR.js";export{GLASS_DIVIDER,glassStyle}from"../chunk-7IQ3B77H.js";export{OVERLAY_OPEN_EVENT,Z_LAYERS,dismissPopups,registerModalEscapeInterceptor}from"../chunk-FIEA5CGB.js";import"../chunk-D65T4H6J.js";export{VERSION}from"../chunk-FTZ5WHJM.js";import"../chunk-KNUR2UEG.js";export{FOCAL_DEFAULT,FOCAL_NUDGE_COARSE,FOCAL_NUDGE_STEP,focalFromRect,formatFocal,nudgeFocal,parseFocal}from"../chunk-AP2QEJXQ.js";export{DATE_FORMAT_OPTIONS,EMPTY_VALUE,TZ_AUTO,currencyDecimals,currencySymbol,firstDayOfWeek,formatBytes,formatDate,formatDateTime,formatMoney,formatTime,getUserDateFormat,getUserTimezone,setCurrencyFormats,setUserDateFormat,setUserTimezone,syncTimezoneFromProfile,timeAgo}from"../chunk-W32SKK3D.js";export{FileIntakeAlert,acceptsFile,useFileIntake}from"../chunk-M4TRVJTO.js";export{DEFAULT_SHELL_STRINGS,ShellStringsProvider,useShellLocale,useShellStrings}from"../chunk-QRCDQPJA.js";import"../chunk-C3QOHMR6.js";export{ICON_NAMES,isIconName}from"../chunk-KBOYLXAT.js";export{Icon,activeIconSet,iconSets,iconsVersion,registerIconSet,registerIcons,resolveIcon,setDefaultIconSet,setIconSet,subscribeIcons}from"../chunk-ZGUQLVY4.js";
2
+ export{APP_UPDATE_POLL_MS,Accordion,AlignmentGrid,AppUpdateBanner,AttachButton,AttachmentDropZone,AttachmentList,AuthScreen,Avatar,AvatarGroup,BORDER_WIDTHS,Banner,BoxPlotChart,BrandAssetEditor,BudgetBar,CHART_INK,COLUMN_COUNT_MAX,COLUMN_COUNT_WIDTHS,COLUMN_SHARES_EQUAL,COLUMN_SHARE_MIN,CONTROL_HEIGHTS,CORNERS,Calendar,CandlestickChart,Card,CartesianPlot,ChartBrush,ChartDefs,ChartDot,ChartFrame,ChartHighlightProvider,ChartSkeleton,ChartTooltip,ChatTemplate,Checkbox_default as Checkbox,CheckoutTemplate,ChordChart,ColorPicker,ColorPickerPanel,ColorSwatch,ColoredBadge,ColumnChart,ComposerAttachments,ContainerFillChart,ContextMenu,CornersInput,CountBadge,DAY_MS,DashboardTemplate,DataTable,DataTablePage,DatePicker_default as DatePicker,DateRangePicker,DateTimePicker_default as DateTimePicker,DescriptionList,DisplayChips,Divider,Drawer,DropdownMenu,ELEVATION_LEVELS,EmailTemplate,EmptyState,EmptyValue,ErrorBoundary,ErrorPage,FONT_WEIGHTS,FilePicker_default as FilePicker,FloatingBar,FormErrorSummary,FormField,FormLayoutPage,FunnelChart,GROUP_COLORS,GROUP_COLORS_SOLID,GalleryTemplate,Grid,HeatmapChart,HelpCenter,HexInput,HistogramChart,IconButton_default as IconButton,IconRail,IconRailButton,ImageFocusPoint,Inline,Input_default as Input,InputNumber_default as InputNumber,Kanban,Label,LanguagePanel,LanguageSelect,LinkPicker,ListFooter,ListLoadError,ListRow,MAX_FRACTION_DIGITS,MOTION,MOTION_DURATIONS,Markdown,Markdown as MarkdownLite,MediaUploadField,MediaUploadGrid,Meter,MetricBar,MilestoneTimeline,NativeSelect,NumericKeypad,POST_PRODUCTION_STATUSES,PageHeader,Pagination,PaperclipGlyph,Paragraph,PieChart,Popover,PortalBrandingProvider,ProductionTimeline,RADAR_SERIES_CAP,RADIUS_ROLES,ROW_HEIGHTS,RadarChart,RadialBarChart,Radio_default as Radio,RadioGroup,RangeChart,RankedBars,SCATTER_SERIES_CAP,SERIES_SLOT_COUNT,SERIES_VARS,SPACING_ROLES,SPACING_SCALE,STAGES,STATUS_VARS,SankeyChart,ScatterChart,SearchableSelect,Segmented,Select_default as Select,SettingRow,SidebarActionButton,SidebarGroupLabel,SidebarNavGroup,SidebarNavItem,Skeleton,Slider,SliderGroup,Snippet,SortableList,Sparkline,Stack,StatCard,StatTile,Statistic,StatusBadge,StatusBadgeProvider,Stepper,SunburstChart,Switch_default as Switch,TYPE_SCALE,Tabs,TagInput,Text,TextLinkField,Textarea_default as Textarea,TileButton_default as TileButton,TimeAgo,TimePicker_default as TimePicker,TimeSeriesChart,TimelineTrack,Title,TopNav,Tree,TreeEmptySlot,TreeGroup,TreeGroupLabel,TreeRow,TreeSeam,TreemapChart,WaterfallChart,WidthsBar,angleScale,appendKey,applyCorners,applyIconSet,applyThemePrefs,arcPath,areaBetween,areaFrom,assignSeriesSlots,autoHighlightIndex,backspace,bandScale,binValues,budgetState,bumpPath,calcOverall,calcReportOverall,colorFill,colorSwatchClasses,columnSharesWidths,curvePath,dashFor,fillFor,fillId,fmtSliderDate,fromKey as fromDateKey,glowId,groundId,groupColors,hexToHsv,highlightOpacity,hsvToHex,isSeverityTone,isSpacingStep,labelClasses,ladderScale,languageSelectWidth,linearPath,linearScale,logScale,maskId,mediaFileName,monotonePath,niceAxis,niceMax,parseHexColor,polygonPoints,radiusScale,resolveColumnShares,resolveColumnWidths,resolveCorners,resolvePortalBrandAsset,resolveSeriesColor,resolveSeriesColorWithin,resolveTheme,seriesColor,severityOf,splinePath,squarify,stagger,stepPath,tabButtonId,tabPanelId,toKey as toDateKey,toDayMs,toISODate,toggleSeriesSlot,useAppUpdate,useClickOutside,useContextMenu,useDebouncedValue,useHighlight,usePlotWidth,usePortalBranding,useProductionTimeline,useStatusLabel,useTheme}from"../chunk-OA7DQ77U.js";export{Breadcrumbs}from"../chunk-Z2TTHY7G.js";export{ResizeHandle,SidebarLayout}from"../chunk-GIWC2ZTG.js";export{BrandMark,GlobalSearch,openGlobalSearch,pushRecent as pushRecentSearch,resolveBrandMarkTreatment,sanitizeRecent as sanitizeRecentSearches}from"../chunk-BQ7GR7H6.js";export{EditableGrid}from"../chunk-BVYOUFSW.js";import"../chunk-BR22X7E5.js";import"../chunk-VOFDPOB6.js";export{INPUT_BASE,INPUT_SIZES,PLACEHOLDER_INK,inputClasses}from"../chunk-HJQAE6SP.js";export{ENGLISH,SHELL_LANGUAGE_STORAGE_KEY,ShellLanguageProvider,matchShellLanguage,readSavedShellLanguage,resolveShellLanguage,saveShellLanguage,useShellLanguage}from"../chunk-RBKIYZ7H.js";export{isSafeLinkHref}from"../chunk-PJPK2ADX.js";export{toast_default as toast}from"../chunk-RUHUTZN4.js";export{ALT,ALT_SHIFT_D,ALT_SHIFT_E,ALT_SHIFT_N,CMD_A,CMD_DOT,CMD_ENTER,CMD_K,CMD_S,ENTER,Kbd,LoadingSpinner,MOD,NEXT_CHUNK_PATH_PREFIX,Result,SHIFT,STALE_CHUNK_RELOAD_COOLDOWN_MS,STALE_CHUNK_RELOAD_KEY,ShellPrefsProvider,VITE_PRELOAD_ERROR_EVENT,installStaleChunkReload,isMac,isStaleChunkError,useIsMobile,useLocalStoragePrefs,useShellPrefs}from"../chunk-ZRU5F2XT.js";import"../chunk-5A7MWTXX.js";export{Button_default as Button,MENU_MAX_HEIGHT,POPUP_MAX_WIDTH,Tooltip,popupBounds,useDropdownPosition}from"../chunk-IJ7RXIWX.js";export{ConfirmProvider,Dialog,confirm,confirmDestructive,prompt,useConfirm,useFocusTrap,useScrollLock}from"../chunk-76VCH7N6.js";export{PopupMenu,PopupMenuDivider,PopupMenuItem,PopupMenuLabel,PopupSubmenu,leavesContextMenuAlone}from"../chunk-IQDY2YFN.js";import"../chunk-UVBK6YSR.js";export{buttonClasses,iconButtonClasses}from"../chunk-JTNKC4CR.js";export{GLASS_DIVIDER,glassStyle,solidSurfaceStyle}from"../chunk-7IQ3B77H.js";export{OVERLAY_OPEN_EVENT,Z_LAYERS,dismissPopups,registerModalEscapeInterceptor}from"../chunk-FIEA5CGB.js";import"../chunk-D65T4H6J.js";export{VERSION}from"../chunk-YLWIEEDW.js";import"../chunk-KNUR2UEG.js";export{FileIntakeAlert,acceptsFile,useFileIntake}from"../chunk-M4TRVJTO.js";export{DEFAULT_SHELL_STRINGS,ShellStringsProvider,useShellLocale,useShellStrings}from"../chunk-QRCDQPJA.js";import"../chunk-C3QOHMR6.js";export{FOCAL_DEFAULT,FOCAL_NUDGE_COARSE,FOCAL_NUDGE_STEP,focalFromRect,formatFocal,nudgeFocal,parseFocal}from"../chunk-AP2QEJXQ.js";export{DATE_FORMAT_OPTIONS,EMPTY_VALUE,TZ_AUTO,currencyDecimals,currencySymbol,firstDayOfWeek,formatBytes,formatDate,formatDateTime,formatMoney,formatTime,getUserDateFormat,getUserTimezone,setCurrencyFormats,setUserDateFormat,setUserTimezone,syncTimezoneFromProfile,timeAgo}from"../chunk-W32SKK3D.js";export{ICON_NAMES,isIconName}from"../chunk-KBOYLXAT.js";export{Icon,activeIconSet,iconSets,iconsVersion,registerIconSet,registerIcons,resolveIcon,setDefaultIconSet,setIconSet,subscribeIcons}from"../chunk-ZGUQLVY4.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efficient-shell",
3
- "version": "7.19.0",
3
+ "version": "7.21.0",
4
4
  "description": "Desktop-style React UI shell — windows, taskbar, start menu, sticky notes, frosted glass theming, and bundled apps.",
5
5
  "license": "UNLICENSED",
6
6
  "author": "Efficient Pty Ltd",
@@ -1,87 +0,0 @@
1
- import{openPreviewFile as e}from"./chunk-B4PGVDB6.js";import{Breadcrumbs as t}from"./chunk-Z2TTHY7G.js";import{SidebarLayout as a}from"./chunk-VFBUDSMF.js";import{getFilesDemoTree as r}from"./chunk-7HLTPMQV.js";import{AboutApp as n}from"./chunk-3LEHVM4D.js";import{peekFilesViewRequest as s,consumeFilesViewRequest as i,FILES_SHOW_TRASH_EVENT as l,FILES_OPEN_DESKTOP_FOLDER_EVENT as o,subscribeDesktopFolders as d,getDesktopFoldersSnapshot as c,FolderGlyph as m,DesktopItemMiniIcon as h,desktopItemTypeLabel as p}from"./chunk-XN7CAWSZ.js";import"./chunk-ESL5TDNA.js";import"./chunk-VTVSMRFX.js";import{useWindowManager as u,WindowTitle as f}from"./chunk-NUCPJVKD.js";import"./chunk-DSSLOQDW.js";import"./chunk-SCJT2XXU.js";import{toast_default as x}from"./chunk-RUHUTZN4.js";import"./chunk-ZRU5F2XT.js";import"./chunk-5A7MWTXX.js";import"./chunk-WYNQLAKD.js";import{confirm as g,prompt as y}from"./chunk-76VCH7N6.js";import"./chunk-IQDY2YFN.js";import"./chunk-UVBK6YSR.js";import"./chunk-JTNKC4CR.js";import"./chunk-7IQ3B77H.js";import"./chunk-FIEA5CGB.js";import"./chunk-D65T4H6J.js";import"./chunk-FTZ5WHJM.js";import"./chunk-KNUR2UEG.js";import{formatBytes as b}from"./chunk-W32SKK3D.js";import"./chunk-QRCDQPJA.js";import"./chunk-C3QOHMR6.js";import{Icon as N}from"./chunk-ZGUQLVY4.js";import{useState as k,useEffect as w,useSyncExternalStore as v,useRef as j,useCallback as C}from"react";import{jsxs as $,jsx as D,Fragment as T}from"react/jsx-runtime";var L="undefined"!=typeof window&&window.__REACT_OS_SHELL_FILE_SERVER__||"http://localhost:4000",E={pdf:"pdf",dxf:"dxf",csv:"csv",jpg:"image",jpeg:"image",png:"image",gif:"image",webp:"image",svg:"image",avif:"image",bmp:"image",stp:"3d",step:"3d",stl:"3d",obj:"3d",gltf:"3d",glb:"3d","3mf":"3d",iges:"3d",igs:"3d",ply:"3d",fbx:"3d"};function R(e,t){return"/"===e||""===e?"/"+t:e.replace(/\/$/,"")+"/"+t}function S(e){if(!e)return"—";try{const t=new Date(e);return isNaN(t.getTime())?"—":t.toLocaleString(void 0,{dateStyle:"short",timeStyle:"short"})}catch{return e}}function F(){const F=L.replace(/\/$/,""),P=null!==r(),[U,W]=k("/"),[I,M]=k([]),[A,O]=k([]),[V,H]=k(null),[B,K]=k(!0),[Q,z]=k(!1),[J,_]=k(null),[X,Y]=k(!1),[Z,G]=k(()=>{const e=s();return"trash"===e?"trash":e?{desktopFolderId:e.folderId}:"files"});w(()=>{i()},[]);const[q,ee]=k([]);w(()=>{const e=()=>{i(),G("trash")},t=e=>{i();const t=e.detail?.folderId;t&&G({desktopFolderId:t})};return window.addEventListener(l,e),window.addEventListener(o,t),()=>{window.removeEventListener(l,e),window.removeEventListener(o,t)}},[]);const te=v(d,c,c),ae="object"==typeof Z?Z.desktopFolderId:null,re=ae?te?.folders.find(e=>e.id===ae)??null:null,ne=ae&&te?.itemsByFolder[ae]||[];w(()=>{ae&&te&&!te.folders.some(e=>e.id===ae)&&G("files")},[ae,te]);const se=j(0),ie=j(null),{openPage:le,openEntity:oe}=u(),de=t=>{"preview-file"===t.entityType&&t.filePath&&t.fileKind?e({filePath:t.filePath,filename:t.label,kind:t.fileKind,onStaged:e=>le(e)}):"page"===t.entityType?le(t.entityId):oe(t.entityType,t.entityId,null,t.label)},ce=C((e,t={})=>fetch(e,{...t,credentials:"include"}),[]),me=C(async()=>{try{const e=await ce(`${F}/api/quota`);if(e.ok){const t=await e.json();_({used:t.used,limit:t.limit})}}catch{}},[ce,F]),he=C(async e=>{if(H(null),P){const t=function(e){const t=r();if(!t)return[];let a=t;for(const t of e.split("/").filter(Boolean)){const e=a.find(e=>"folder"===e.kind&&e.name===t);if(!e||!e.children)return[];a=e.children}return a.map(e=>({name:e.name,kind:e.kind,size:e.size??0,modifiedAt:e.modifiedAt??""}))}(e);return M(t),W(e),z(!1),K(!1),void("/"===e&&O(t.filter(e=>"folder"===e.kind).map(e=>e.name)))}K(!0);try{const t=await ce(`${F}/api/files?path=${encodeURIComponent(e)}`);if(!t.ok){const e=await t.json().catch(()=>({}));return void x.error(e.error||`Failed to list (${t.status})`)}const a=await t.json(),r=a.entries||[];M(r),W(a.path||e),z(!1),"/"===(a.path||e)&&O(r.filter(e=>"folder"===e.kind).map(e=>e.name))}catch(e){z(!0)}finally{K(!1)}me()},[ce,F,me,P]),pe=C(async()=>{if(P)return ee([]),void K(!1);K(!0),H(null);try{const e=await ce(`${F}/api/trash`);if(!e.ok){const t=await e.json().catch(()=>({}));return void x.error(t.error||`Failed to list trash (${e.status})`)}const t=await e.json();ee(t.entries||[]),z(!1)}catch{z(!0)}finally{K(!1)}me()},[ce,F,me,P]);w(()=>{"files"===Z?he(U):"trash"===Z&&pe()},[U,Z]);const ue=async e=>{const t=R(U,e.name);try{const a=await ce(`${F}/api/file?path=${encodeURIComponent(t)}`);if(!a.ok)return void x.error(`Download failed (${a.status})`);const r=await a.blob(),n=URL.createObjectURL(r),s=document.createElement("a");s.href=n,s.download=e.name,s.click(),setTimeout(()=>URL.revokeObjectURL(n),1e3)}catch(e){x.error(e?.message||"Download failed")}},fe=async e=>{const t=Array.from(e);for(const e of t){const t=new FormData;t.append("file",e);try{const a=await ce(`${F}/api/upload?path=${encodeURIComponent(U)}`,{method:"POST",body:t});if(!a.ok){const t=await a.json().catch(()=>({}));if(413===a.status){const a=Math.max(0,(t.limit||0)-(t.used||0));x.error(`Quota exceeded — ${b(a)} free, ${e.name} is ${b(t.attempted||e.size)}`)}else x.error(`Upload ${e.name}: ${t.error||a.status}`)}}catch(t){x.error(`Upload ${e.name}: ${t?.message||"failed"}`)}}he(U)},xe=()=>{se.current=0,Y(!1)};if(w(()=>{const e=()=>xe();return window.addEventListener("dragend",e),window.addEventListener("drop",e),()=>{window.removeEventListener("dragend",e),window.removeEventListener("drop",e)}},[]),Q)/* @__PURE__ */
2
- return $("div",{className:"flex flex-col h-full bg-white",children:[
3
- /* @__PURE__ */D(f,{title:"Files - offline"}),
4
- /* @__PURE__ */D("div",{className:"flex-1 flex items-center justify-center p-8 text-center",children:/* @__PURE__ */$("div",{className:"max-w-md",children:[
5
- /* @__PURE__ */D(N,{name:"close-circle",className:"h-12 w-12 mx-auto text-gray-300 mb-3",strokeWidth:1.4}),
6
- /* @__PURE__ */D("h3",{className:"text-base font-semibold text-gray-800 mb-1",children:"Can't reach the file server"}),
7
- /* @__PURE__ */$("p",{className:"text-sm text-gray-500 mb-3",children:["No response from ",
8
- /* @__PURE__ */D("span",{className:"font-mono",children:F}),". Make sure the server is running — see ",
9
- /* @__PURE__ */D("span",{className:"font-mono",children:"examples/file-server/README.md"}),"."]}),
10
- /* @__PURE__ */D("button",{onClick:()=>he(U),className:"px-3 h-8 text-sm bg-blue-500 text-white rounded hover:bg-blue-600",children:"Retry"})]})})]});const ge="/"===U?[]:U.split("/").filter(Boolean),ye=J&&J.limit>0?Math.min(100,Math.round(J.used/J.limit*100)):0,be=ye>90?"bg-red-500":ye>75?"bg-amber-500":"bg-blue-500",Ne=[{label:"My files",onClick:()=>W("/")},...ge.map((e,t)=>({label:e,onClick:()=>W("/"+ge.slice(0,t+1).join("/"))}))],ke=e=>"flex w-full items-center gap-2 rounded-md px-3 min-h-(--row-height-menu) py-2 text-left text-sm transition-colors "+(e?"bg-blue-50 font-medium text-blue-700":"text-gray-700 hover:bg-gray-100"),we=e=>/* @__PURE__ */D("svg",{className:"h-4 w-4 shrink-0 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.6,children:/* @__PURE__ */D("path",{strokeLinecap:"round",strokeLinejoin:"round",d:e})}),ve=/* @__PURE__ */$("nav",{className:"p-2",children:[
11
- /* @__PURE__ */D("div",{className:"px-2 py-2 text-2xs font-semibold uppercase tracking-wide text-gray-400",children:"Locations"}),
12
- /* @__PURE__ */$("button",{onClick:()=>{G("files"),W("/")},className:ke("files"===Z&&"/"===U),children:[we("M2.25 12l8.954-8.955a1.5 1.5 0 012.122 0L21.75 12M4.5 9.75v9.75a.75.75 0 00.75.75H9V15a.75.75 0 01.75-.75h4.5A.75.75 0 0115 15v5.25h3.75a.75.75 0 00.75-.75V9.75"),"My files"]}),A.map(e=>/* @__PURE__ */$("button",{onClick:()=>{G("files"),W("/"+e)},className:ke("files"===Z&&U==="/"+e),children:[we("M2.25 12.75V12A2.25 2.25 0 014.5 9.75h15A2.25 2.25 0 0121.75 12v.75m-8.69-6.44l-2.12-2.12a1.5 1.5 0 00-1.061-.44H4.5A2.25 2.25 0 002.25 6v12a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9a2.25 2.25 0 00-2.25-2.25h-5.379a1.5 1.5 0 01-1.06-.44z"),
13
- /* @__PURE__ */D("span",{className:"truncate",children:e})]},e)),!P&&/* @__PURE__ */$("button",{onClick:()=>G("trash"),className:ke("trash"===Z),children:[we("M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79"),"Trash"]}),te&&te.folders.length>0&&/* @__PURE__ */$(T,{children:[
14
- /* @__PURE__ */D("div",{className:"px-2 pt-3 pb-2 text-2xs font-semibold uppercase tracking-wide text-gray-400",children:"Desktop"}),te.folders.map(e=>/* @__PURE__ */$("button",{onClick:()=>G({desktopFolderId:e.id}),className:ke(ae===e.id),children:[
15
- /* @__PURE__ */D(m,{className:"h-4 w-4 shrink-0 text-amber-500"}),
16
- /* @__PURE__ */D("span",{className:"truncate",children:e.name}),e.itemCount>0&&/* @__PURE__ */D("span",{className:"ml-auto text-2xs text-gray-400 tabular-nums",children:e.itemCount})]},e.id))]})]});/* @__PURE__ */
17
- return $("div",{className:"relative flex flex-col h-full bg-white",onDragEnter:e=>{P||"object"==typeof Z||e.dataTransfer?.types?.includes?.("Files")&&(e.preventDefault(),se.current++,X||Y(!0))},onDragOver:e=>{e.dataTransfer?.types?.includes?.("Files")&&e.preventDefault()},onDragLeave:()=>{se.current>0&&se.current--,0===se.current&&Y(!1)},onDrop:e=>{e.preventDefault(),xe(),P||"object"==typeof Z||e.dataTransfer.files?.length&&fe(e.dataTransfer.files)},children:[
18
- /* @__PURE__ */D(f,{title:re?`Files - ${re.name}`:"Files"+("/"===U?"":" - "+U)}),
19
- /* @__PURE__ */D(n,{app:"files"}),
20
- /* @__PURE__ */D("input",{ref:ie,type:"file",multiple:!0,className:"hidden",onChange:e=>{e.target.files?.length&&fe(e.target.files),ie.current&&(ie.current.value="")}}),
21
- /* @__PURE__ */D("div",{className:"flex-1 min-h-0",children:/* @__PURE__ */D(a,{sidebar:ve,storageKey:"files.sidebarWidth",defaultWidth:200,minWidth:150,maxWidth:320,children:/* @__PURE__ */$("div",{className:"flex h-full min-w-0 flex-col",children:[
22
- /* @__PURE__ */$("div",{className:"flex items-center gap-1 px-2 py-2 border-b border-gray-200 bg-gray-50 shrink-0 text-xs",children:[/* @__PURE__ */$(T,"files"===Z?{children:[
23
- /* @__PURE__ */D("button",{onClick:()=>W(function(e){if("/"===e||""===e)return"/";const t=e.replace(/\/$/,""),a=t.lastIndexOf("/");return a<=0?"/":t.slice(0,a)}(U)),disabled:"/"===U,className:"px-2 py-1 rounded hover:bg-gray-200 disabled:opacity-30 text-gray-600",title:"Parent folder",children:/* @__PURE__ */D(N,{name:"arrow-left",className:"h-3.5 w-3.5",strokeWidth:2})}),
24
- /* @__PURE__ */D("div",{className:"flex-1 min-w-0",children:/* @__PURE__ */D(t,{items:Ne,maxItems:5})}),
25
- /* @__PURE__ */D("button",{onClick:()=>he(U),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600",title:"Refresh",children:/* @__PURE__ */D(N,{name:"refresh",className:"h-3.5 w-3.5",strokeWidth:1.8})}),!P&&/* @__PURE__ */$(T,{children:[
26
- /* @__PURE__ */$("button",{onClick:()=>G("trash"),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600 flex items-center gap-1",title:"Open trash",children:[
27
- /* @__PURE__ */D(N,{name:"trash",className:"h-3.5 w-3.5",strokeWidth:1.5}),"Trash"]}),
28
- /* @__PURE__ */$("button",{onClick:async()=>{const e=await y({title:"New folder",placeholder:"Folder name",confirmLabel:"Create"});if(!e)return;if(/[\\/]/.test(e))return void x.error("Folder names cannot contain slashes");const t=R(U,e),a=await ce(`${F}/api/folder`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:t})});if(!a.ok){const e=await a.json().catch(()=>({}));return void x.error(e.error||`Create folder failed (${a.status})`)}he(U)},className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600 flex items-center gap-1",children:[
29
- /* @__PURE__ */D(N,{name:"folder-plus",className:"h-3.5 w-3.5",strokeWidth:1.5}),"New Folder"]}),
30
- /* @__PURE__ */$("button",{onClick:()=>ie.current?.click(),className:"px-2 py-1 rounded bg-blue-500 text-white hover:bg-blue-600 flex items-center gap-1",children:[
31
- /* @__PURE__ */D(N,{name:"upload",className:"h-3.5 w-3.5",strokeWidth:1.8}),"Upload"]})]})]}:"trash"===Z?{children:[
32
- /* @__PURE__ */D("button",{onClick:()=>G("files"),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600",title:"Back to files",children:/* @__PURE__ */D(N,{name:"arrow-left",className:"h-3.5 w-3.5",strokeWidth:2})}),
33
- /* @__PURE__ */D("span",{className:"flex-1 text-gray-700 font-medium px-2",children:"Trash"}),
34
- /* @__PURE__ */D("button",{onClick:pe,className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600",title:"Refresh",children:/* @__PURE__ */D(N,{name:"refresh",className:"h-3.5 w-3.5",strokeWidth:1.8})}),
35
- /* @__PURE__ */D("button",{onClick:async()=>{if(0===q.length)return;if(!await g({title:"Empty trash",message:`${q.length} item${1===q.length?"":"s"} will be permanently removed. This can't be undone.`,confirmLabel:"Empty trash",variant:"danger"}))return;const e=await ce(`${F}/api/trash`,{method:"DELETE"});if(!e.ok){const t=await e.json().catch(()=>({}));return void x.error(t.error||`Empty trash failed (${e.status})`)}pe()},disabled:0===q.length,className:"px-2 py-1 rounded text-red-600 hover:bg-red-50 disabled:opacity-30 flex items-center gap-1",children:"Empty trash"})]}:{children:[
36
- /* @__PURE__ */D("button",{onClick:()=>G("files"),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600",title:"Back to files",children:/* @__PURE__ */D(N,{name:"arrow-left",className:"h-3.5 w-3.5",strokeWidth:2})}),
37
- /* @__PURE__ */D(m,{className:"h-4 w-4 text-amber-500 ml-1"}),
38
- /* @__PURE__ */D("span",{className:"flex-1 text-gray-700 font-medium px-1 truncate",children:re?.name??"Desktop folder"}),
39
- /* @__PURE__ */D("span",{className:"text-2xs text-gray-400 px-2",children:"Desktop shortcuts"})]}),J&&/* @__PURE__ */$(T,{children:[
40
- /* @__PURE__ */D("div",{className:"h-4 w-px bg-gray-300 mx-1"}),
41
- /* @__PURE__ */$("div",{className:"flex items-center gap-2",title:`${b(J.used)} of ${b(J.limit)} used`,children:[
42
- /* @__PURE__ */D("div",{className:"w-20 h-1.5 rounded-full bg-gray-200 overflow-hidden",children:/* @__PURE__ */D("div",{className:`h-full ${be} transition-all`,style:{width:`${ye}%`}})}),
43
- /* @__PURE__ */$("span",{className:"text-2xs text-gray-500 tabular-nums whitespace-nowrap",children:[b(J.used)," / ",b(J.limit)]})]})]})]}),
44
- /* @__PURE__ */D("div",{className:"flex-1 overflow-auto",children:"object"==typeof Z?0===ne.length?/* @__PURE__ */D("div",{className:"p-10 text-center text-sm text-gray-400",children:"This desktop folder is empty. Drag shortcuts onto it on the desktop."}):/* @__PURE__ */$("table",{className:"w-full text-sm",children:[
45
- /* @__PURE__ */D("thead",{className:"bg-gray-50 text-2xs uppercase tracking-wide text-gray-500",children:/* @__PURE__ */$("tr",{children:[
46
- /* @__PURE__ */D("th",{className:"text-left font-medium px-3 h-8",children:"Name"}),
47
- /* @__PURE__ */D("th",{className:"text-left font-medium px-3 h-8 w-28",children:"Type"}),
48
- /* @__PURE__ */D("th",{className:"w-56"})]})}),
49
- /* @__PURE__ */D("tbody",{children:ne.map(e=>{const t=`${e.entityType}|${e.entityId}`;/* @__PURE__ */
50
- return $("tr",{onClick:()=>H(t),onDoubleClick:()=>de(e),className:"cursor-default border-b border-gray-100 "+(V===t?"bg-blue-50":"hover:bg-gray-50"),children:[
51
- /* @__PURE__ */$("td",{className:"px-3 h-8 flex items-center gap-2",children:[
52
- /* @__PURE__ */D(h,{item:e}),
53
- /* @__PURE__ */D("span",{className:"truncate",title:e.label,children:e.label})]}),
54
- /* @__PURE__ */D("td",{className:"px-3 h-8 text-xs text-gray-500",children:p(e)}),
55
- /* @__PURE__ */$("td",{className:"px-3 h-8 text-right whitespace-nowrap",children:[
56
- /* @__PURE__ */D("button",{onClick:t=>{t.stopPropagation(),de(e)},className:"px-2 py-0.5 rounded hover:bg-gray-200 text-blue-600 text-2xs",children:"Open"}),
57
- /* @__PURE__ */D("button",{onClick:t=>{t.stopPropagation(),te?.moveToDesktop([e])},className:"px-2 py-0.5 rounded hover:bg-gray-200 text-gray-500 text-2xs ml-1",children:"Move to desktop"}),
58
- /* @__PURE__ */D("button",{onClick:t=>{t.stopPropagation(),te?.removeShortcuts([e])},className:"px-2 py-0.5 rounded hover:bg-red-100 text-red-600 text-2xs ml-1",children:"Remove"})]})]},t)})})]}):"trash"===Z?B&&0===q.length?/* @__PURE__ */D("div",{className:"p-6 text-center text-sm text-gray-400",children:"Loading…"}):0===q.length?/* @__PURE__ */D("div",{className:"p-10 text-center text-sm text-gray-400",children:"Trash is empty."}):/* @__PURE__ */$("table",{className:"w-full text-sm",children:[
59
- /* @__PURE__ */D("thead",{className:"bg-gray-50 text-2xs uppercase tracking-wide text-gray-500",children:/* @__PURE__ */$("tr",{children:[
60
- /* @__PURE__ */D("th",{className:"text-left font-medium px-3 h-8",children:"Name"}),
61
- /* @__PURE__ */D("th",{className:"text-left font-medium px-3 h-8",children:"Original location"}),
62
- /* @__PURE__ */D("th",{className:"text-right font-medium px-3 h-8 w-24",children:"Size"}),
63
- /* @__PURE__ */D("th",{className:"text-right font-medium px-3 h-8 w-40",children:"Deleted"}),
64
- /* @__PURE__ */D("th",{className:"w-44"})]})}),
65
- /* @__PURE__ */D("tbody",{children:q.map(e=>/* @__PURE__ */$("tr",{className:"border-b border-gray-100 hover:bg-gray-50",children:[
66
- /* @__PURE__ */$("td",{className:"px-3 h-8 flex items-center gap-2",children:["folder"===e.kind?/* @__PURE__ */D(N,{name:"folder",look:"solid",className:"h-4 w-4 text-amber-500 shrink-0"}):/* @__PURE__ */D(N,{name:"page",className:"h-4 w-4 text-gray-400 shrink-0",strokeWidth:1.5}),
67
- /* @__PURE__ */D("span",{className:"truncate",title:e.name,children:e.name})]}),
68
- /* @__PURE__ */D("td",{className:"px-3 h-8 text-gray-500 text-xs font-mono truncate",title:e.originalPath,children:e.originalPath||"—"}),
69
- /* @__PURE__ */D("td",{className:"px-3 h-8 text-right tabular-nums text-gray-500",children:b(e.size)}),
70
- /* @__PURE__ */D("td",{className:"px-3 h-8 text-right text-gray-500 tabular-nums",children:e.deletedAt?S(e.deletedAt):"—"}),
71
- /* @__PURE__ */$("td",{className:"px-3 h-8 text-right whitespace-nowrap",children:[
72
- /* @__PURE__ */D("button",{onClick:()=>(async e=>{const t=await ce(`${F}/api/trash/restore`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e.id})});if(!t.ok){const e=await t.json().catch(()=>({}));return void x.error(e.error||`Restore failed (${t.status})`)}x.success(`Restored "${e.name}"`),pe()})(e),className:"px-2 py-0.5 rounded hover:bg-gray-200 text-blue-600 text-2xs",children:"Restore"}),
73
- /* @__PURE__ */D("button",{onClick:()=>(async e=>{if(!await g({title:"Permanently delete",message:`"${e.name}" will be permanently removed. This can't be undone.`,confirmLabel:"Delete forever",variant:"danger"}))return;const t=await ce(`${F}/api/trash/${encodeURIComponent(e.id)}`,{method:"DELETE"});if(!t.ok){const e=await t.json().catch(()=>({}));return void x.error(e.error||`Delete failed (${t.status})`)}pe()})(e),className:"px-2 py-0.5 rounded hover:bg-red-100 text-red-600 text-2xs ml-1",children:"Delete forever"})]})]},e.id))})]}):B&&0===I.length?/* @__PURE__ */D("div",{className:"p-6 text-center text-sm text-gray-400",children:"Loading…"}):0===I.length?/* @__PURE__ */$("div",{className:"p-10 text-center text-sm text-gray-400",children:["Empty folder.",!P&&/* @__PURE__ */$(T,{children:[" Drop files here or click ",
74
- /* @__PURE__ */D("span",{className:"font-medium",children:"Upload"}),"."]})]}):/* @__PURE__ */$("table",{className:"w-full text-sm",children:[
75
- /* @__PURE__ */D("thead",{className:"bg-gray-50 text-2xs uppercase tracking-wide text-gray-500",children:/* @__PURE__ */$("tr",{children:[
76
- /* @__PURE__ */D("th",{className:"text-left font-medium px-3 h-8",children:"Name"}),
77
- /* @__PURE__ */D("th",{className:"text-right font-medium px-3 h-8 w-24",children:"Size"}),
78
- /* @__PURE__ */D("th",{className:"text-right font-medium px-3 h-8 w-40",children:"Modified"}),
79
- /* @__PURE__ */D("th",{className:"w-32"})]})}),
80
- /* @__PURE__ */D("tbody",{children:I.map(t=>/* @__PURE__ */$("tr",{onClick:()=>H(t.name),onDoubleClick:()=>{"folder"===t.kind?W(R(U,t.name)):(async t=>{if(P)return;const a=R(U,t.name),r=(t.name.split(".").pop()||"").toLowerCase(),n=E[r];n?await e({filePath:a,filename:t.name,kind:n,onStaged:e=>le(e)}):ue(t)})(t)},className:"cursor-default border-b border-gray-100 "+(V===t.name?"bg-blue-50":"hover:bg-gray-50"),children:[
81
- /* @__PURE__ */$("td",{className:"px-3 h-8 flex items-center gap-2",children:["folder"===t.kind?/* @__PURE__ */D(N,{name:"folder",look:"solid",className:"h-4 w-4 text-amber-500 shrink-0"}):/* @__PURE__ */D(N,{name:"page",className:"h-4 w-4 text-gray-400 shrink-0",strokeWidth:1.5}),
82
- /* @__PURE__ */D("span",{className:"truncate",title:t.name,children:t.name})]}),
83
- /* @__PURE__ */D("td",{className:"px-3 h-8 text-right tabular-nums text-gray-500",children:"folder"===t.kind?"—":b(t.size)}),
84
- /* @__PURE__ */D("td",{className:"px-3 h-8 text-right text-gray-500 tabular-nums",children:S(t.modifiedAt)}),
85
- /* @__PURE__ */D("td",{className:"px-3 h-8 text-right whitespace-nowrap",children:!P&&/* @__PURE__ */$(T,{children:["file"===t.kind&&/* @__PURE__ */D("button",{onClick:e=>{e.stopPropagation(),ue(t)},className:"px-2 py-0.5 rounded hover:bg-gray-200 text-gray-500 text-2xs",children:"Download"}),
86
- /* @__PURE__ */D("button",{onClick:e=>{e.stopPropagation(),(async e=>{const t=await y({title:`Rename ${e.kind}`,defaultValue:e.name,confirmLabel:"Rename"});if(!t||t===e.name)return;if(/[\\/]/.test(t))return void x.error("Names cannot contain slashes");const a=R(U,e.name),r=R(U,t),n=await ce(`${F}/api/rename`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({from:a,to:r})});if(!n.ok){const e=await n.json().catch(()=>({}));return void x.error(e.error||`Rename failed (${n.status})`)}he(U)})(t)},className:"px-2 py-0.5 rounded hover:bg-gray-200 text-gray-500 text-2xs ml-1",children:"Rename"}),
87
- /* @__PURE__ */D("button",{onClick:e=>{e.stopPropagation(),(async e=>{if(!await g({title:`Delete ${e.kind}`,message:`"${e.name}"${"folder"===e.kind?" and everything inside":""} will be permanently removed.`,confirmLabel:"Delete",variant:"danger"}))return;const t=R(U,e.name),a=await ce(`${F}/api/files?path=${encodeURIComponent(t)}`,{method:"DELETE"});if(!a.ok){const e=await a.json().catch(()=>({}));return void x.error(e.error||`Delete failed (${a.status})`)}he(U)})(t)},className:"px-2 py-0.5 rounded hover:bg-red-100 text-red-600 text-2xs ml-1",children:"Delete"})]})})]},t.name))})]})})]})})}),X&&/* @__PURE__ */D("div",{className:"absolute inset-0 bg-blue-500/15 border-4 border-dashed border-blue-500 pointer-events-none flex items-center justify-center z-20",children:/* @__PURE__ */D("div",{className:"px-4 py-2 rounded-md bg-blue-600 text-white text-sm font-medium shadow-lg",children:"Drop to upload"})})]})}export{F as default};
@@ -1,19 +0,0 @@
1
- import{escapeHtml as e}from"./chunk-BR22X7E5.js";import{useBrowserLayoutEffect as t}from"./chunk-D65T4H6J.js";import{useShellStrings as n}from"./chunk-QRCDQPJA.js";import{useRef as r,useState as o,useEffect as l,useCallback as c,useMemo as a}from"react";import{createPortal as s}from"react-dom";import{jsxs as i,jsx as u,Fragment as h}from"react/jsx-runtime";function d(e,t){const n=e[e.length-1];return n&&!n.some(e=>e.trim())?e:[...e,Array(t).fill("")]}function w({text:t,...n}){const r=a(()=>({__html:e(t)}),[t]);/* @__PURE__ */
2
- return u("div",{...n,dangerouslySetInnerHTML:r})}function g({columns:e,data:g,onChange:m,onColumnsChange:p,fixedRows:f=!1,minRows:y=15,maxHeight:b="260px",cellStyles:v,onFocusChange:x,onSelectionChange:M}){const D=r(null),k=n().grid,[C,E]=o(null);l(()=>{x?.(C)},[C,x]);const[L,S]=o({}),$=r(null),[z,A]=o({}),N=r(null),[O,R]=o(null),[T,K]=o(null),[P,F]=o(null),[I,X]=o(null),[H,Y]=o(null),j=r(null);t(()=>{const e=j.current;if(!e||e.row!==H?.row||e.col!==H?.col)return;j.current=null;const t=D.current?.querySelector(`[data-row="${e.row}"][data-col="${e.col}"]`);if(!t)return;t.focus();const n=document.createRange();n.selectNodeContents(t),n.collapse(!1);const r=window.getSelection();r?.removeAllRanges(),r?.addRange(n)},[H]);const[q,B]=o(null),[W,J]=o(null);l(()=>{M?.(q&&W?{anchor:q,end:W}:null)},[q,W,M]);const Q=r(!1),[_,U]=o(null),V=r(!1),G=r({a:null,e:null});G.current={a:q,e:W};const Z=q&&W&&(q.row!==W.row||q.col!==W.col),ee=[...g];if(!f)for(;ee.length<y;)ee.push(Array(e.length).fill(""));const te=c((t,n,r)=>{const o=ee.map(e=>[...e]);for(;o.length<=t;)o.push(Array(e.length).fill(""));for(;o[t].length<e.length;)o[t].push("");o[t][n]=r,m(o)},[ee,e.length,m]),ne=c((e,t,n)=>{if(0!==e.button)return;const r=document.activeElement;if(r?.dataset?.row&&r?.dataset?.col){const e=parseInt(r.dataset.row),t=parseInt(r.dataset.col),n=r.textContent||"";if(n!==(ee[e]?.[t]||"")){const r=ee.map(e=>[...e]);r[e]&&(r[e][t]=n,m(r))}}Q.current=!0,e.shiftKey&&q||B({row:t,col:n}),J({row:t,col:n})},[ee,m,q]),re=c((e,t)=>{Q.current&&J({row:e,col:t})},[]);l(()=>{const e=()=>{Q.current=!1};return window.addEventListener("mouseup",e),()=>window.removeEventListener("mouseup",e)},[]),l(()=>{const e=e=>{if(!e.ctrlKey&&!e.metaKey||"c"!==e.key)return;if(!q||!W)return;const t=window.getSelection();if(t&&t.toString().length>0&&!Z)return;const n=Math.min(q.row,W.row),r=Math.max(q.row,W.row),o=Math.min(q.col,W.col),l=Math.max(q.col,W.col),c=[];for(let e=n;e<=r;e++){const t=[];for(let n=o;n<=l;n++)t.push(ee[e]?.[n]||"");c.push(t.join("\t"))}const a=c.join("\n");a&&(e.preventDefault(),navigator.clipboard.writeText(a))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[q,W,ee,Z]),l(()=>{const t=t=>{if(!C)return;const n=document.activeElement;if(n?.isContentEditable)return;if(!D.current?.contains(n))return;const r=t.clipboardData?.getData("text/plain");if(!r)return;t.preventDefault();const o=r.split("\n").filter(e=>e).map(e=>e.split("\t")),l=ee.map(e=>[...e]);for(let t=0;t<o.length;t++){const n=C.row+t;for(;l.length<=n;)l.push(Array(e.length).fill(""));for(;l[n].length<e.length;)l[n].push("");for(let r=0;r<o[t].length;r++){const c=C.col+r;if(c>=e.length)break;e[c].readOnly||(l[n][c]=o[t][r].trim())}}m(f?l:d(l,e.length)),B({row:C.row,col:C.col}),J({row:Math.min(C.row+o.length-1,l.length-1),col:Math.min(C.col+(o[0]?.length||1)-1,e.length-1)})};return window.addEventListener("paste",t),()=>window.removeEventListener("paste",t)},[C,ee,e,m,f]);const oe=c((t,n,r)=>{const o=t.clipboardData.getData("text/plain");if(!o)return;const l=o.split("\n").map(e=>e.split("\t"));if(l.length<=1&&l[0]?.length<=1)return;t.preventDefault();const c=ee.map(e=>[...e]);for(let t=0;t<l.length;t++){const o=n+t;for(;c.length<=o;)c.push(Array(e.length).fill(""));for(;c[o].length<e.length;)c[o].push("");for(let n=0;n<l[t].length;n++){const a=r+n;if(a>=e.length)break;e[a].readOnly||(c[o][a]=l[t][n].trim())}}m(f?c:d(c,e.length))},[ee,e,m,f]),le=c((t,n,r)=>{let o=n,l=r;if("Tab"===t.key)t.preventDefault(),l=t.shiftKey?r-1:r+1,l>=e.length&&(l=0,o=n+1),l<0&&(l=e.length-1,o=n-1);else if("Enter"===t.key)t.preventDefault(),o=t.shiftKey?n-1:n+1;else if("ArrowDown"===t.key)t.preventDefault(),o=n+1;else if("ArrowUp"===t.key)t.preventDefault(),o=n-1;else if("ArrowLeft"===t.key)t.preventDefault(),l=r-1;else{if("ArrowRight"!==t.key){if("Delete"===t.key||"Backspace"===t.key){const o=t.target;if(o.isContentEditable)return void(o.textContent&&window.getSelection()?.toString()===o.textContent&&(t.preventDefault(),te(n,r,"")));if(t.preventDefault(),q&&W){const t=Math.min(q.row,W.row),n=Math.max(q.row,W.row),r=Math.min(q.col,W.col),o=Math.max(q.col,W.col),l=ee.map(e=>[...e]);for(let c=t;c<=n;c++)for(let t=r;t<=o;t++)l[c]&&!e[t]?.readOnly&&(l[c][t]="");m(l)}else te(n,r,"");return}return}t.preventDefault(),l=r+1}for(;l>=0&&l<e.length&&e[l].readOnly;)l+="Tab"===t.key&&t.shiftKey?-1:1;if(o>=0&&o<ee.length&&l>=0&&l<e.length){const e=D.current?.querySelector(`[data-row="${o}"][data-col="${l}"]`);e&&(e.focus({preventScroll:!0}),e.scrollIntoView({block:"nearest",inline:"nearest"}),E({row:o,col:l}),Y(null),B({row:o,col:l}),J({row:o,col:l}))}},[e,ee,ee.length,te,q,W,m]),ce=c(t=>{if(!f&&t>=ee.length-2){const t=ee.map(e=>[...e]);for(let n=0;n<5;n++)t.push(Array(e.length).fill(""));m(t)}},[f,ee,e.length,m]),[ae,se]=o(null);l(()=>{if(!ae)return;const e=()=>se(null);return window.addEventListener("pointerdown",e),()=>window.removeEventListener("pointerdown",e)},[ae]);const ie=c(t=>{const n=ee.map(e=>[...e]);n.splice(t,0,Array(e.length).fill("")),m(n)},[ee,e.length,m]),ue=c(e=>{if(ee.length<=1)return;const t=ee.filter((t,n)=>n!==e);m(t)},[ee,m]),he=c(e=>{const t=ee.map(t=>{const n=[...t];return n.splice(e,0,""),n});m(t)},[ee,m]),de=c(t=>{if(e.length<=1)return;const n=ee.map(e=>{const n=[...e];return n.splice(t,1),n});m(n)},[ee,e.length,m]),we=c((e,t)=>{e.preventDefault(),f||se({x:e.clientX,y:e.clientY,items:[{label:k.insertRowAbove,onClick:()=>{ie(t),se(null)}},{label:k.insertRowBelow,onClick:()=>{ie(t+1),se(null)}},{label:k.deleteRow(t+1),onClick:()=>{ue(t),se(null)}}]})},[f,ie,ue,k]),ge=c((t,n)=>{t.preventDefault(),f||se({x:t.clientX,y:t.clientY,items:[{label:k.insertColumnLeft,onClick:()=>{he(n),se(null)}},{label:k.insertColumnRight,onClick:()=>{he(n+1),se(null)}},{label:k.deleteColumn(String(e[n]?.title||n+1)),onClick:()=>{de(n),se(null)}}]})},[f,e,he,de,k]),me=t=>L[t]??e[t]?.width??150;l(()=>{const t=e=>{if(!$.current)return;const t=e.clientX-$.current.startX,n=Math.max(40,$.current.startW+t);S(e=>({...e,[$.current.col]:n}))},n=()=>{if($.current&&p){const t=e.map((e,t)=>({...e,width:L[t]??e.width}));t[$.current.col]={...t[$.current.col],width:L[$.current.col]??e[$.current.col].width},p(t)}$.current=null,document.body.style.cursor=""};return window.addEventListener("mousemove",t),window.addEventListener("mouseup",n),()=>{window.removeEventListener("mousemove",t),window.removeEventListener("mouseup",n)}},[e,L,p]);const pe=e=>z[e]??28;l(()=>{const e=e=>{if(!N.current)return;const t=e.clientY-N.current.startY,n=Math.max(20,N.current.startH+t);A(e=>({...e,[N.current.row]:n}))},t=()=>{N.current=null,document.body.style.cursor=""};return window.addEventListener("mousemove",e),window.addEventListener("mouseup",t),()=>{window.removeEventListener("mousemove",e),window.removeEventListener("mouseup",t)}},[]);const fe=c(t=>{const n=document.createElement("canvas").getContext("2d");if(!n)return;n.font="12px ui-monospace, SFMono-Regular, Menlo, monospace";let r=0;for(const e of ee){const o=String(e[t]??"").replace(/<[^>]*>/g,""),l=n.measureText(o).width;l>r&&(r=l)}const o=n.measureText(e[t]?.title??"").width;o>r&&(r=o);const l=Math.max(40,Math.ceil(r+24));if(S(e=>({...e,[t]:l})),p){const n=e.map((e,n)=>({...e,width:n===t?l:L[n]??e.width}));p(n)}},[ee,e,L,p]),ye=c(e=>{A(t=>{const n={...t};return delete n[e],n})},[]),be=c(t=>{const{a:n,e:r}=G.current;if(!n||!r)return;const o=Math.min(n.row,r.row),l=Math.max(n.row,r.row),c=Math.min(n.col,r.col),a=Math.max(n.col,r.col);let s=o,i=l,u=c,h=a;t.row>l?i=t.row:t.row<o&&(s=t.row),t.col>a?h=t.col:t.col<c&&(u=t.col);const d=l-o+1,w=a-c+1,g=ee.map(e=>[...e]);for(;g.length<=i;)g.push(Array(e.length).fill(""));for(const e of g)for(;e.length<=h;)e.push("");function p(e){const t=e.map(e=>parseFloat(e));if(t.length<2||t.some(e=>Number.isNaN(e)))return null;const n=t[1]-t[0];for(let e=2;e<t.length;e++)if(Math.abs(t[e]-t[e-1]-n)>1e-9)return null;return{step:n}}for(let e=s;e<=i;e++)for(let t=u;t<=h;t++){if(e>=o&&e<=l&&t>=c&&t<=a)continue;let n;if(1===w&&u===c&&h===a){const r=p(Array.from({length:d},(e,n)=>g[o+n]?.[t]??""));if(r){const c=parseFloat(g[l]?.[t]??"0"),a=parseFloat(g[o]?.[t]??"0"),s=e>l?e-l:-(o-e);n=String((e>l?c:a)+r.step*s)}else{const r=((e-o)%d+d)%d;n=g[o+r]?.[t]??""}}else if(1===d&&s===o&&i===l){const r=p(Array.from({length:w},(t,n)=>g[e]?.[c+n]??""));if(r){const o=parseFloat(g[e]?.[a]??"0"),l=parseFloat(g[e]?.[c]??"0"),s=t>a?t-a:-(c-t);n=String((t>a?o:l)+r.step*s)}else{const r=((t-c)%w+w)%w;n=g[e]?.[c+r]??""}}else{const r=((e-o)%d+d)%d,l=((t-c)%w+w)%w;n=g[o+r]?.[c+l]??""}g[e][t]=n}m(g),B({row:s,col:u}),J({row:i,col:h})},[ee,e.length,m]);l(()=>{const e=e=>{if(!V.current)return;const t=document.elementFromPoint(e.clientX,e.clientY),n=t?.closest?.("[data-row][data-col]");if(!n)return;const r=parseInt(n.dataset.row),o=parseInt(n.dataset.col);U({row:r,col:o})},t=()=>{V.current&&_&&be(_),V.current=!1,U(null),document.body.style.cursor=""};return window.addEventListener("mousemove",e),window.addEventListener("mouseup",t),()=>{window.removeEventListener("mousemove",e),window.removeEventListener("mouseup",t)}},[_,be]);const ve=e=>{e.preventDefault(),e.stopPropagation(),V.current=!0,document.body.style.cursor="crosshair"},xe=r(null),[Me,De]=o(0),[ke,Ce]=o(800);l(()=>{const e=xe.current;if(!e)return;const t=()=>Ce(e.clientHeight||800);t();const n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[]);const Ee=ee.length>100,Le=Ee?Math.max(0,Math.floor(Me/28)-20):0,Se=Ee?Math.min(ee.length,Math.ceil((Me+ke)/28)+20):ee.length,$e=a(()=>ee.slice(Le,Se),[ee,Le,Se]),ze=28*Le,Ae=28*(ee.length-Se),Ne="px-2 h-8 text-left text-xs font-medium text-gray-500 uppercase bg-gray-100 border-b border-r border-gray-200 select-none";/* @__PURE__ */
3
- return i("div",{ref:xe,className:"border border-gray-300 rounded overflow-scroll grid-scroll",style:{maxHeight:b,height:b},onScroll:e=>De(e.target.scrollTop),children:[
4
- /* @__PURE__ */i("table",{ref:D,className:"border-collapse select-none",style:{tableLayout:"fixed",minWidth:36+e.reduce((t,n)=>t+me(e.indexOf(n)),0)},children:[
5
- /* @__PURE__ */i("colgroup",{children:[
6
- /* @__PURE__ */u("col",{style:{width:36}}),e.map((e,t)=>/* @__PURE__ */u("col",{style:{width:me(t)}},e.key))]}),
7
- /* @__PURE__ */u("thead",{className:"sticky top-0 z-10",children:/* @__PURE__ */i("tr",{children:[
8
- /* @__PURE__ */u("th",{className:Ne+" text-center w-9 cursor-pointer hover:bg-gray-200",onClick:()=>{B({row:0,col:0}),J({row:ee.length-1,col:e.length-1})},title:k.selectAll,children:"#"}),e.map((t,n)=>{const r=q&&W&&Math.min(q.col,W.col)<=n&&n<=Math.max(q.col,W.col)&&0===Math.min(q.row,W.row)&&Math.max(q.row,W.row)===ee.length-1;/* @__PURE__ */
9
- return i("th",{className:`${Ne} cursor-pointer hover:bg-gray-200 relative${r?" !bg-blue-200":""}${I===n?" !bg-blue-100":""}`,style:{width:me(n)},draggable:!0,onDragStart:()=>(e=>F(e))(n),onDragOver:e=>((e,t)=>{e.preventDefault(),X(t)})(e,n),onDrop:()=>(t=>{if(null===P||P===t)return F(null),void X(null);const n=ee.map(e=>{const n=[...e],[r]=n.splice(P,1);return n.splice(t,0,r),n});if(m(n),p){const n=[...e],[r]=n.splice(P,1);n.splice(t,0,r),p(n)}F(null),X(null)})(n),onDragEnd:()=>{F(null),X(null)},onClick:e=>{e.shiftKey&&q||B({row:0,col:n}),J({row:ee.length-1,col:n})},onContextMenu:e=>ge(e,n),children:[t.title,
10
- /* @__PURE__ */u("div",{className:"absolute -right-1 top-0 bottom-0 w-2 cursor-col-resize z-20",onMouseDown:e=>((e,t)=>{e.preventDefault(),e.stopPropagation(),$.current={col:t,startX:e.clientX,startW:me(t)},document.body.style.cursor="col-resize"})(e,n),onDoubleClick:e=>{e.stopPropagation(),fe(n)},title:k.resize})]},t.key)})]})}),
11
- /* @__PURE__ */i("tbody",{children:[ze>0&&/* @__PURE__ */u("tr",{style:{height:ze}}),$e.map((t,n)=>{const r=Le+n,o=q&&W&&Math.min(q.row,W.row)<=r&&r<=Math.max(q.row,W.row)&&0===Math.min(q.col,W.col)&&Math.max(q.col,W.col)===e.length-1;/* @__PURE__ */
12
- return i("tr",{style:{height:pe(r)},children:[
13
- /* @__PURE__ */i("td",{className:`relative px-1 py-1 text-center text-2xs text-gray-400 border-b border-r border-gray-200 bg-gray-50 select-none cursor-pointer hover:bg-gray-200${o?" !bg-blue-200 !text-gray-700":""}${T===r?" !bg-blue-100":""}`,draggable:!0,onDragStart:()=>(e=>R(e))(r),onDragOver:e=>((e,t)=>{e.preventDefault(),K(t)})(e,r),onDrop:()=>(e=>{if(null===O||O===e)return R(null),void K(null);const t=ee.map(e=>[...e]),[n]=t.splice(O,1);t.splice(e,0,n),m(t),R(null),K(null)})(r),onDragEnd:()=>{R(null),K(null)},onClick:t=>{t.shiftKey&&q||B({row:r,col:0}),J({row:r,col:e.length-1})},onContextMenu:e=>we(e,r),children:[r+1,
14
- /* @__PURE__ */u("div",{className:"absolute -bottom-1 left-0 right-0 h-2 cursor-row-resize z-20",onMouseDown:e=>((e,t)=>{e.preventDefault(),e.stopPropagation(),N.current={row:t,startY:e.clientY,startH:pe(t)},document.body.style.cursor="row-resize"})(e,r),onDoubleClick:e=>{e.stopPropagation(),ye(r)},title:k.resize})]}),e.map((e,n)=>{const o=q&&W&&function(e,t,n,r){const o=Math.min(e.row,t.row),l=Math.max(e.row,t.row),c=Math.min(e.col,t.col),a=Math.max(e.col,t.col);return n>=o&&n<=l&&r>=c&&r<=a}(q,W,r,n),l=H?.row===r&&H?.col===n&&!e.readOnly,c=C?.row===r&&C?.col===n,a=v?.[`${r}:${n}`],s=q&&W?Math.max(q.row,W.row):-1,h=q&&W?Math.max(q.col,W.col):-1,d=q&&W&&r===s&&n===h,g=V.current&&_&&q&&W&&(()=>{const e=Math.min(q.row,W.row),t=Math.max(q.row,W.row),o=Math.min(q.col,W.col),l=Math.max(q.col,W.col);let c=e,a=t,s=o,i=l;return _.row>t?a=_.row:_.row<e&&(c=_.row),_.col>l?i=_.col:_.col<o&&(s=_.col),r>=c&&r<=a&&n>=s&&n<=i&&!(r>=e&&r<=t&&n>=o&&n<=l)})(),m="sm"===a?.fontSize?"text-2xs":"lg"===a?.fontSize?"text-sm":"xl"===a?.fontSize?"text-base":"text-xs",p=`${a?.bold?" font-bold":""}${a?.italic?" italic":""}${a?.underline?" underline":""}`;/* @__PURE__ */
15
- return i("td",{className:`relative px-0 py-0 border-b border-r border-gray-200 text-sm${e.readOnly?" bg-gray-50 text-gray-500 cursor-default":" cursor-cell"}${o?" !bg-blue-100":""}${c&&!o?" ring-2 ring-inset ring-blue-400":""}${g?" !bg-blue-50 ring-1 ring-inset ring-blue-300":""}`,onMouseDown:e=>{if(e.target===e.currentTarget){ne(e,r,n);const t=e.currentTarget.querySelector("[data-row][data-col]");t?.focus()}},onMouseEnter:()=>re(r,n),onClick:e=>{if(e.target===e.currentTarget){const t=e.currentTarget.querySelector("[data-row][data-col]");t?.focus()}},onDoubleClick:t=>{t.target!==t.currentTarget||e.readOnly||Y({row:r,col:n})},children:[
16
- /* @__PURE__ */u(w,{contentEditable:l,suppressContentEditableWarning:!0,tabIndex:0,"data-row":r,"data-col":n,className:`w-full h-full px-2 py-1 rosh-focus-ring whitespace-nowrap overflow-hidden ${"right"===e.align?"text-right":"center"===e.align?"text-center":""} ${e.readOnly?"cursor-default":"cursor-cell"} font-mono ${m}${p}`,onMouseDown:e=>ne(e,r,n),onMouseEnter:()=>re(r,n),onDoubleClick:()=>{e.readOnly||Y({row:r,col:n})},onFocus:()=>{E({row:r,col:n}),Q.current||(B({row:r,col:n}),J({row:r,col:n}))},onBlur:e=>{const o=e.currentTarget.textContent||"";o!==(t[n]||"")&&te(r,n,o),Y(null)},onInput:()=>ce(r),onPaste:e=>oe(e,r,n),onKeyDown:t=>{if(!(l||e.readOnly||1!==t.key.length||t.ctrlKey||t.metaKey||t.altKey))return t.preventDefault(),te(r,n,t.key),j.current={row:r,col:n},void Y({row:r,col:n});le(t,r,n)},text:t[n]||""}),d&&/* @__PURE__ */u("div",{onMouseDown:ve,title:k.fill,className:"absolute -bottom-[3px] -right-[3px] w-[7px] h-[7px] bg-blue-500 border border-white cursor-crosshair z-30 hover:bg-blue-600"})]},n)})]},r)}),Ae>0&&/* @__PURE__ */u("tr",{style:{height:Ae}})]})]}),ae&&s(
17
- /* @__PURE__ */i(h,{children:[
18
- /* @__PURE__ */u("div",{className:"fixed inset-0 z-(--z-popup)",onPointerDown:()=>se(null)}),
19
- /* @__PURE__ */u("div",{className:"fixed z-(--z-popup) bg-white rounded-lg shadow-lg border border-gray-200 py-1 min-w-[160px]",style:{left:ae.x,top:ae.y},children:ae.items.map((e,t)=>/* @__PURE__ */u("button",{onPointerDown:t=>{t.stopPropagation(),e.onClick()},className:"w-full text-left px-3 min-h-(--row-height-menu) py-2 leading-5 text-sm text-gray-700 hover:bg-gray-100",children:e.label},t))})]}),document.body)]})}export{g as EditableGrid,d as withSpareRow};
@@ -1 +0,0 @@
1
- var r="7.19.0",a=r;export{a as APP_VERSION,r as VERSION};