efficient-shell 7.31.1 → 7.33.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 (59) hide show
  1. package/dist/{Browser-G6DW3YVS.js → Browser-3PR7HVTU.js} +14 -14
  2. package/dist/Calculator-6SCEML2T.js +29 -0
  3. package/dist/{CurrencyConverter-MU7GOOUX.js → CurrencyConverter-G3FC4H7V.js} +10 -10
  4. package/dist/{Documents-TKSI6IFR.js → Documents-VR7AGRWL.js} +17 -17
  5. package/dist/{Files-F6N3BSEZ.js → Files-XVXLZWQR.js} +79 -79
  6. package/dist/{Notepad-ZJKKNQZL.js → Notepad-4X5PIHQW.js} +9 -9
  7. package/dist/PdfViewer-PJFETQHR.js +1 -0
  8. package/dist/{PomodoroTimer-LTN3OMBD.js → PomodoroTimer-DL365JYG.js} +18 -18
  9. package/dist/{Preview-RFYUJF6G.js → Preview-SDEYK3LX.js} +177 -179
  10. package/dist/Sidebar-GBQVWSSS.js +44 -0
  11. package/dist/{Spreadsheet-F6ZJHE5K.js → Spreadsheet-2B4MXLMF.js} +14 -14
  12. package/dist/{Stock-NUJG2IAB.js → Stock-SLJJ5EO4.js} +7 -7
  13. package/dist/{Weather-DG7HC4TT.js → Weather-VOG7ST3F.js} +22 -22
  14. package/dist/{WorldClock-M4BQE7D6.js → WorldClock-AS6CZUEK.js} +4 -4
  15. package/dist/apps/index.js +1 -1
  16. package/dist/bin/ui-check.js +1 -1
  17. package/dist/brand.css +1 -1
  18. package/dist/chunk-2J6F4EE7.js +3 -0
  19. package/dist/chunk-3R4JBAS5.js +1032 -0
  20. package/dist/chunk-5LJVYLU6.js +1 -0
  21. package/dist/{chunk-LU7X6LLY.js → chunk-726ZUTV7.js} +7 -7
  22. package/dist/{chunk-7VJ3J7EH.js → chunk-CQYSEMCR.js} +16 -16
  23. package/dist/{chunk-IQW3EDEB.js → chunk-DF733WOR.js} +2 -2
  24. package/dist/{chunk-XT7UUKFA.js → chunk-KIFCFIIN.js} +1 -1
  25. package/dist/chunk-KVX57LJZ.js +1 -0
  26. package/dist/chunk-LU2DSEAL.js +2 -0
  27. package/dist/chunk-QJYJB6OG.js +27 -0
  28. package/dist/{chunk-FJBTASQI.js → chunk-SFZYFUG2.js} +2 -2
  29. package/dist/{chunk-HTHLFM24.js → chunk-TO3SXKDA.js} +107 -107
  30. package/dist/{chunk-Q3WRWTON.js → chunk-U5QVKITI.js} +1 -1
  31. package/dist/{chunk-EQI47WNM.js → chunk-W53EOFSH.js} +1 -1
  32. package/dist/{chunk-ZX5MQM4I.js → chunk-WR6YWZHJ.js} +1 -1
  33. package/dist/{chunk-RAFTWZF5.js → chunk-ZB6MIMTH.js} +1 -1
  34. package/dist/icons/efficient-looks.js +2 -4
  35. package/dist/icons/efficient.d.ts +3 -2
  36. package/dist/icons/efficient.js +346 -346
  37. package/dist/icons/index.d.ts +8 -6
  38. package/dist/icons/index.js +1 -1
  39. package/dist/icons/lucide.js +1 -2
  40. package/dist/icons/phosphor.js +1 -2
  41. package/dist/icons/tabler.js +1 -2
  42. package/dist/{index-Bozgrt9E.d.ts → index-DxgxE97i.d.ts} +24 -8
  43. package/dist/index.d.ts +3 -3
  44. package/dist/index.js +682 -682
  45. package/dist/map/index.js +20 -22
  46. package/dist/pdf/index.js +1 -1
  47. package/dist/telemetry/index.js +1 -1
  48. package/dist/ui/index.d.ts +1 -1
  49. package/dist/ui/index.js +1 -1
  50. package/package.json +1 -1
  51. package/dist/Calculator-DQZGGP2K.js +0 -29
  52. package/dist/PdfViewer-ATYZB7RS.js +0 -1
  53. package/dist/Sidebar-TAEAB6AF.js +0 -44
  54. package/dist/chunk-6YNWFATP.js +0 -27
  55. package/dist/chunk-BTLM7W6P.js +0 -1
  56. package/dist/chunk-NVFKXL52.js +0 -2
  57. package/dist/chunk-QK67IFHD.js +0 -1
  58. package/dist/chunk-R7BUE34N.js +0 -1035
  59. package/dist/chunk-XZXMVACA.js +0 -5
package/dist/map/index.js CHANGED
@@ -1,23 +1,21 @@
1
1
  "use client";
2
- import{Button_default as e}from"../chunk-XZXMVACA.js";import"../chunk-WOZ36LPR.js";import{rootIsDark as t,ROOT_THEME_ATTRIBUTES as n}from"../chunk-7IQ3B77H.js";import"../chunk-FIEA5CGB.js";import"../chunk-K7PQXJO7.js";import"../chunk-D65T4H6J.js";import{Icon as r}from"../chunk-KMSAHFLP.js";import{useShellStrings as o}from"../chunk-2PNYIWIN.js";import"../chunk-C3QOHMR6.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 M="maplibre-gl-worker.mjs",C=e=>`/maplibre-gl/${e}/${M}`,L=null;function $(){return L??=Promise.all([import("maplibre-gl"),import("maplibre-gl/dist/maplibre-gl.css")]).then(([e])=>(e.setWorkerUrl(C(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 O=(e,t,n,r)=>({left:e-n/2,top:t-r/2,right:e+n/2,bottom:t+r/2});function R(e,t){return e.left<t.right+1&&t.left<e.right+1&&e.top<t.bottom+1&&t.top<e.bottom+1}var B=e=>O(e.x,e.y,e.width,e.height);function T(e){for(let t=0;t<e.length;t++)for(let n=t+1;n<e.length;n++)if(R(B(e[t]),B(e[n])))return[e[t],e[n]];return null}function W(e,t=[]){const n=[],r=e=>t.some(t=>R(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=T(o);e;e=T(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(B(e))||(n.push(...e.keys),!1));const a=[];for(const t of e){if(null!==t.stop)continue;const e=O(t.x,t.y,E,E),l=o.find(t=>R(B(t),e));if(l||r(e)){n.push(t.key),l&&l.under++;continue}const i=a.find(t=>R(B(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 P=t;var q="routes",_=["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 Z={light:"https://tiles.openfreemap.org/styles/positron",dark:"https://tiles.openfreemap.org/styles/dark"},D={center:[30,20],zoom:1},G="ring-2 ring-gray-900 ring-offset-2";var Q="var(--color-gray-600, #4b5563)",V="http://www.w3.org/2000/svg",X=()=>window.matchMedia("(prefers-reduced-motion: reduce)").matches,J=/^(?:\d+|[xytrblse](?:-\d+)?|solid|dashed|dotted|double|hidden|none)$/;function U(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-")&&!J.test(r.slice(7))})}var Y=(...e)=>e.filter(Boolean).join(" ");function ee(e){const t=document.createElementNS(V,"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(V,"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",!U(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",!U(e.tone??"")&&"border-white",e.tone??"bg-gray-900 text-white");function ae({pins:t,selectedKey:n,focus:r,onSelect:c,ariaLabel:h,className:g="",children:f,routes:b,fitTo:x,attribution:v,marks:M,groupCrowded:C=!1,noun:L,highlightKey:j=null,picking:z=!1,onPick:O,card:R,cardMinMapWidth:B=480,fullScreen:T,initialView:V=D,cooperativeGestures:J=!1}){const U=o().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,P,()=>!1)?"dark":"light",Ne=a({onSelect:c,onPick:O,picking:z,pins:t,selectedKey:n,highlightKey:j,groupCrowded:C,strings:U,noun:L});i(()=>{Ne.current={onSelect:c,onPick:O,picking:z,pins:t,selectedKey:n,highlightKey:j,groupCrowded:C,strings:U,noun:L}});const Me=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:X()?0:400})},[]),Ce=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;Ce.current=!0,n.once("moveend",()=>{if(Ce.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:X()?0:600})},[]),$e=s(()=>{const e=ce.current,t=ue.current;if(!e||!t||!ae.current||Ce.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:Z[ke],center:V.center,zoom:V.zoom,attributionControl:v?{compact:!0,customAttribution:v}:{compact:!0},dragRotate:!1,pitchWithRotate:!1,touchPitch:!1,maxPitch:0,cooperativeGestures:"coarse"===J?window.matchMedia("(pointer: coarse)").matches:J}),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(V.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(),Me()}),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(Z[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,C);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 M??[]){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,M,C,$e]),i(()=>{be&&$e()},[be,n,j,$e]),i(()=>{if(!be||!n)return;const e=requestAnimationFrame(Me);return()=>cancelAnimationFrame(e)},[be,n,Me]),i(()=>{const e=ce.current,n=ue.current,r=x?[...t,...M??[]].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,M,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(q);if(i&&(i.attribution||"")!==n){for(const t of _)e.getLayer(t)&&e.removeLayer(t);e.removeSource(q)}const s=e.getSource(q);s?s.setData(o):e.addSource(q,{type:"geojson",data:o,...n?{attribution:n}:{}}),e.getLayer("routes-road")||e.addLayer({id:"routes-road",type:"line",source:q,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:q,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||!r)return;const n=t.find(e=>e.key===r.key);if(!n)return;const o=e.getZoom(),a=C?F(e.project([n.lng,n.lat]),t.filter(e=>e.key!==n.key).map(t=>e.project([t.lng,t.lat])),o):-1/0,l={center:[n.lng,n.lat],zoom:Math.min(18,Math.max(o,13,a))};X()?e.jumpTo(l):e.flyTo({...l,duration:600})},[be,r?.n]);const[Se,je]=l(!1);i(()=>{const e=ae.current;if(!e)return;const t=()=>je(e.clientWidth<B);t();const n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[B]);const Ae=n?t.find(e=>e.key===n)??null:null,ze=Ae?.key??null,Oe=Ae?.lng??0,Re=Ae?.lat??0,Be=be&&!Se&&null!=R&&!!Ae,[Te,We]=l(null);i(()=>{const e=ce.current,t=ue.current;if(!(Be&&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([Oe,Re]).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:X()?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})}}},[Be,ze,Oe,Re,$e]);const Fe=T?.active??!1,Ke=a(T?.onChange);i(()=>{Ke.current=T?.onChange}),i(()=>{if(!T)return;const e=document.documentElement;Fe&&!document.fullscreenElement&&e.requestFullscreen&&e.requestFullscreen().catch(()=>{}),!Fe&&document.fullscreenElement&&document.exitFullscreen().catch(()=>{})},[Fe]);const Pe=!!T;return i(()=>{if(!Pe)return;const e=()=>{document.fullscreenElement||Ke.current?.(!1)};return document.addEventListener("fullscreenchange",e),()=>document.removeEventListener("fullscreenchange",e)},[Pe]),/* @__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:U.failed}),T&&/* @__PURE__ */m(e,{"data-map-control":"",variant:"secondary",size:"sm",className:"absolute left-3 top-3 z-10",onClick:()=>T.onChange(!T.active),leftIcon:/* @__PURE__ */m(ie,{leave:T.active}),children:T.active?U.leaveFullScreen:U.fullScreen}),f,null!=R&&!Be&&/* @__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:R}),Be&&Te?d(R,Te):null,be&&/* @__PURE__ */m(le,{pins:t,hosts:fe.current})]})}function le({pins:e,hosts:t}){/* @__PURE__ */
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
- return m(r,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 Me(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 Ce(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
- /* @__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=o().map;/* @__PURE__ */
7
- return p("section",{"aria-label":u.chosen(t.label),className:"absolute bottom-3 left-3 right-3 z-10 max-w-md space-y-2 rounded-lg border border-gray-200 bg-white p-3 shadow-(--elevation-panel)",children:[
8
- /* @__PURE__ */p("div",{className:"flex items-start justify-between gap-2",children:[
9
- /* @__PURE__ */p("div",{className:"min-w-0",children:[
10
- /* @__PURE__ */p("h3",{className:"text-sm font-semibold text-gray-900 [overflow-wrap:anywhere]",children:[null!=n&&/* @__PURE__ */p("span",{className:"mr-1 text-gray-400",children:[n,"."]}),t.label,t.code&&/* @__PURE__ */m("span",{className:"ml-2 text-xs font-normal text-gray-400",children:t.code})]}),
11
- /* @__PURE__ */m("p",{className:"text-xs text-gray-500",children:i[c]?be(c,i):t.category})]}),
12
- /* @__PURE__ */m("button",{type:"button",onClick:l,"aria-label":u.closeCard,className:"rounded p-0.5 text-gray-400 hover:text-gray-600",children:/* @__PURE__ */m(r,{name:"close","aria-hidden":!0,className:"h-4 w-4",strokeWidth:2})})]}),
13
- /* @__PURE__ */m("p",{className:"text-sm text-gray-700 [overflow-wrap:anywhere]",children:t.address||"—"}),s&&/* @__PURE__ */m("p",{className:"text-xs text-gray-500",children:s}),t.matched&&"approximate"===t.placement&&/* @__PURE__ */p("p",{className:"text-xs text-gray-400 [overflow-wrap:anywhere]",children:["Placed at: ",t.matched]}),a&&/* @__PURE__ */m("div",{className:"flex justify-end",children:/* @__PURE__ */m(e,{variant:"secondary",size:"sm",onClick:a,children:u.openRecord})})]})}function Se(e,t,{staleTime:n}={}){return g({queryKey:e,queryFn:t,staleTime:n,refetchInterval:e=>ue(e.state.data)})}function je({queryKey:e,queryFn:t,refreshSignal:n,onOpen:r,ariaLabel:o,title:s="Locations",palette:u=he,numbers:d,className:h="",mapClassName:g="min-h-[240px] flex-1"}){const{data:f,isError:y,refetch:b}=Se(e,t,{staleTime:0}),x=a(!1);i(()=>{x.current?b():x.current=!0},[n]);const[v,w]=l(null),k=c(()=>f?.points??[],[f]),N=c(()=>d??ke(k),[d,k]),M=c(()=>k.filter(pe).map(e=>({key:de(e),label:e.label,lat:e.lat,lng:e.lng,glyph:ve(e,N.get(de(e))??null,u),tone:xe(e,u),approximate:"approximate"===e.placement})),[k,N,u]),C=c(()=>Le(k,N),[k,N]),L=c(()=>Ce(k),[k]),$=f?.pending??0,E=k.find(e=>de(e)===v)??null,S=E&&r?r(E):null;/* @__PURE__ */
14
- return p("section",{"aria-label":s,className:`flex min-w-0 flex-col ${h}`,children:[
15
- /* @__PURE__ */p("div",{className:"flex min-h-[30px] items-center justify-between mb-2",children:[
16
- /* @__PURE__ */m("h3",{className:"text-sm font-semibold text-gray-900",children:s}),f&&/* @__PURE__ */m("span",{className:"text-xs text-gray-500",children:Me(Ne(k))})]}),
17
- /* @__PURE__ */p(ae,{pins:M,selectedKey:v,focus:null,onSelect:w,ariaLabel:o,className:g,children:[
18
- /* @__PURE__ */p("div",{className:"absolute left-3 top-3 z-10 flex max-w-[70%] flex-col items-start gap-2",children:[
19
- /* @__PURE__ */m($e,{categories:L,palette:u,floating:!1}),y&&/* @__PURE__ */p("div",{className:"flex items-center gap-2 rounded-lg border border-gray-200 bg-white px-3 min-h-8 py-1 text-xs text-gray-600 shadow-sm",children:["Couldn’t load the locations.",
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||C.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
- /* @__PURE__ */p("svg",{className:"h-3 w-3 animate-spin",fill:"none",viewBox:"0 0 24 24",children:[
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"]}),C.slice(0,3).map(e=>/* @__PURE__ */m("p",{className:"truncate text-amber-700",title:e.text,children:e.text},e.key)),C.length>3&&/* @__PURE__ */p("p",{className:"text-gray-500",children:["+",C.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,M 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,Ce as legendCategories,$ as loadMapLibre,ke as locationNumbers,C 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,Me as summaryText,se as useMapHighlight,Se as useMapPoints,F as zoomApart};
2
+ import{Button_default as e}from"../chunk-LU2DSEAL.js";import"../chunk-WOZ36LPR.js";import{rootIsDark as t,ROOT_THEME_ATTRIBUTES as n}from"../chunk-7IQ3B77H.js";import"../chunk-FIEA5CGB.js";import"../chunk-K7PQXJO7.js";import"../chunk-D65T4H6J.js";import{Icon as r}from"../chunk-KMSAHFLP.js";import{useShellStrings as o}from"../chunk-2PNYIWIN.js";import"../chunk-C3QOHMR6.js";import{SpinnerRing as a}from"../chunk-2J6F4EE7.js";import{useRef as l,useState as i,useEffect as s,useCallback as c,useMemo as u,useSyncExternalStore as d}from"react";import{createPortal as p}from"react-dom";import{jsxs as m,jsx as h,Fragment as g}from"react/jsx-runtime";import{useQuery as f}from"@tanstack/react-query";var y="maplibregl-compact-show";function b(e){if(!e)return()=>{};const t=()=>!!e.classList.contains(y)&&(e.classList.remove(y),!0);if(t())return()=>{};const n=new MutationObserver(()=>{t()&&n.disconnect()});return n.observe(e,{attributes:!0,attributeFilter:["class"]}),()=>n.disconnect()}var x=20,v=12,w=480,k={center:[0,0],left:[x,0],right:[-20,0],top:[0,x],"top-left":[0,x],"top-right":[0,x],bottom:[0,-20],"bottom-left":[0,-20],"bottom-right":[0,-20]},N=(e,t=12)=>Math.max(0,Math.floor(e-t-v-x-10-16));function M(e,t,n,r=12){const o=e.y-x-r,a=n.height-e.y-x-v,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<v?(s="-left",c=Math.max(0,v-e.x)):e.x+t.width/2>n.width-v&&(s="-right",c=-Math.max(0,e.x-(n.width-v))),{anchor:`${l?"bottom":"top"}${s}`,move:{x:c,y:i}}}var C="maplibre-gl-worker.mjs",L=e=>`/maplibre-gl/${e}/${C}`,E=null;function S(){return E??=Promise.all([import("maplibre-gl"),import("maplibre-gl/dist/maplibre-gl.css")]).then(([e])=>(e.setWorkerUrl(L(e.getVersion())),e)).catch(e=>{throw E=null,e}),E}var $=24,j=28,A=29;function z(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 O(e){const t=Math.max(j,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 F(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:j,height:j,under:0}));for(let e=F(o);e;e=F(o)){const[t,n]=e;t.keys.push(...n.keys),t.stops.push(...n.stops),t.stops.sort((e,t)=>e-t),t.width=O(z(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,$,$),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:$,height:$,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 P(e){const t=new MutationObserver(e);return t.observe(document.documentElement,{attributes:!0,attributeFilter:n}),()=>t.disconnect()}var q=t;var _="routes",H=["routes-road","routes-estimate"];function I(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(),D(n)}function D(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 Z={light:"https://tiles.openfreemap.org/styles/positron",dark:"https://tiles.openfreemap.org/styles/dark"},G={center:[30,20],zoom:1},J="ring-2 ring-gray-900 ring-offset-2";var Q="var(--color-gray-600, #4b5563)",U="http://www.w3.org/2000/svg",V=()=>window.matchMedia("(prefers-reduced-motion: reduce)").matches,X=/^(?:\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-")&&!X.test(r.slice(7))})}var ee=(...e)=>e.filter(Boolean).join(" ");function te(e){const t=document.createElementNS(U,"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(U,"path");e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-linejoin","round"),e.setAttribute("d",n),t.appendChild(e)}return t}function ne(e,t){for(const[n,r]of Object.entries(t??{}))e.dataset[n]=r}var re=(e,t)=>ee("relative grid place-items-center rounded-full cursor-pointer",t&&(null!=e.stop?"h-7 w-7":"h-6 w-6"));function oe(e,t,n,r){const o=t&&!r&&null==e.stop&&!e.dot;return ee("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":J),e.approximate&&"border-dashed opacity-80",e.faded&&!t&&"opacity-40",n&&"scale-125 opacity-100")}var ae=e=>ee("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 le({pins:t,selectedKey:n,focus:r,onSelect:a,ariaLabel:u,className:g="",children:f,routes:y,fitTo:x,attribution:v,marks:w,groupCrowded:C=!1,noun:L,highlightKey:E=null,picking:A=!1,onPick:O,card:R,cardMinMapWidth:B=480,fullScreen:T,initialView:F=G,cooperativeGestures:U=!1}){const X=o().map,Y=l(null),le=l(null),ce=l(null),ue=l(null),de=l([]),pe=l(/* @__PURE__ */new Map),me=l(/* @__PURE__ */new Map),he=l(/* @__PURE__ */new Map),ge=l(null),fe=l(/* @__PURE__ */new Map),ye=l(""),[be,xe]=i(!1),[ve,we]=i(!1),ke=d(P,q,()=>!1)?"dark":"light",Ne=l({onSelect:a,onPick:O,picking:A,pins:t,selectedKey:n,highlightKey:E,groupCrowded:C,strings:X,noun:L});s(()=>{Ne.current={onSelect:a,onPick:O,picking:A,pins:t,selectedKey:n,highlightKey:E,groupCrowded:C,strings:X,noun:L}});const Me=c(()=>{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:V()?0:400})},[]),Ce=l(!1),Le=c((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;Ce.current=!0,n.once("moveend",()=>{if(Ce.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:V()?0:600})},[]),Ee=c(()=>{const e=ce.current,t=ue.current;if(!e||!t||!Y.current||Ce.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=oe(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=[...Y.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?z(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=ee("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)&&J);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?j:$),height:t.button.offsetHeight||(null!=t.pin.stop?j:$)}:n?{at:n.mark,width:n.element.offsetWidth||j,height:n.element.offsetHeight||j}: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]);s(()=>{if(Ee(),!Y.current)return;const e=new ResizeObserver(()=>Ee());e.observe(Y.current);for(const t of Y.current.children)t.contains(le.current)||e.observe(t);return()=>e.disconnect()}),s(()=>{let e=!1,t=null,n=null,r=()=>{};return(async()=>{try{const o=await S();if(e||!le.current)return;ue.current=o,t=new o.Map({container:le.current,style:Z[ke],center:F.center,zoom:F.zoom,attributionControl:v?{compact:!0,customAttribution:v}:{compact:!0},dragRotate:!1,pitchWithRotate:!1,touchPitch:!1,maxPitch:0,cooperativeGestures:"coarse"===U?window.matchMedia("(pointer: coarse)").matches:U}),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(F.center).addTo(t),t.on("click",e=>{Ne.current.picking&&Ne.current.onPick?.({lat:e.lngLat.lat,lng:e.lngLat.lng})}),t.on("move",Ee),t.on("moveend",Ee),t.on("resize",Ee),t.on("error",e=>console.warn("[map]",e.error?.message)),r=b(le.current.querySelector(".maplibregl-ctrl-attrib"));const l=t;n=new ResizeObserver(()=>{l.resize(),Me()}),n.observe(le.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 Se=l(ke);s(()=>{be&&ce.current&&Se.current!==ke&&(Se.current=ke,ce.current.setStyle(Z[ke]))},[be,ke]),s(()=>{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=re(o,C);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(ne(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(te(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=ee("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 w??[]){const r=document.createElement("div");r.dataset.mapMark=t.key,ne(r,t.data),r.className=ae(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})}Ee()},[be,t,w,C,Ee]),s(()=>{be&&Ee()},[be,n,E,Ee]),s(()=>{if(!be||!n)return;const e=requestAnimationFrame(Me);return()=>cancelAnimationFrame(e)},[be,n,Me]),s(()=>{const e=ce.current,n=ue.current,r=x?[...t,...w??[]].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,w,x]),s(()=>{const e=ce.current;if(!be||!e)return;const t=(y??[]).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(),D(t)}(),o={type:"FeatureCollection",features:t.map(e=>({type:"Feature",properties:{key:e.key,estimate:e.estimate,faded:!!e.faded,color:e.color?I(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 H)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,y,ke]),s(()=>{const e=ce.current;if(!be||!e||!r)return;const n=t.find(e=>e.key===r.key);if(!n)return;const o=e.getZoom(),a=C?K(e.project([n.lng,n.lat]),t.filter(e=>e.key!==n.key).map(t=>e.project([t.lng,t.lat])),o):-1/0,l={center:[n.lng,n.lat],zoom:Math.min(18,Math.max(o,13,a))};V()?e.jumpTo(l):e.flyTo({...l,duration:600})},[be,r?.n]);const[$e,je]=i(!1);s(()=>{const e=Y.current;if(!e)return;const t=()=>je(e.clientWidth<B);t();const n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[B]);const Ae=n?t.find(e=>e.key===n)??null:null,ze=Ae?.key??null,Oe=Ae?.lng??0,Re=Ae?.lat??0,Be=be&&!$e&&null!=R&&!!Ae,[Te,Fe]=i(null);s(()=>{const e=ce.current,t=ue.current;if(!(Be&&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:k,className:"rosh-map-card",maxWidth:"none",closeButton:!1,closeOnClick:!1,closeOnMove:!1,focusAfterOpen:!1}).setLngLat([Oe,Re]).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}),Fe(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(),Y.current)+8,u=`${N(a,l)}px`;n.style.maxHeight!==u&&(n.style.maxHeight=u);const d=r.getElement(),p=r.getLngLat(),{anchor:m,move:h}=M(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:V()?0:250}),Ee()},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(),Fe(null),m&&(!document.activeElement||document.activeElement===document.body)){const e=h.get(ze)?.button;e&&"none"!==e.style.display&&e.focus({preventScroll:!0})}}},[Be,ze,Oe,Re,Ee]);const We=T?.active??!1,Ke=l(T?.onChange);s(()=>{Ke.current=T?.onChange}),s(()=>{if(!T)return;const e=document.documentElement;We&&!document.fullscreenElement&&e.requestFullscreen&&e.requestFullscreen().catch(()=>{}),!We&&document.fullscreenElement&&document.exitFullscreen().catch(()=>{})},[We]);const Pe=!!T;return s(()=>{if(!Pe)return;const e=()=>{document.fullscreenElement||Ke.current?.(!1)};return document.addEventListener("fullscreenchange",e),()=>document.removeEventListener("fullscreenchange",e)},[Pe]),/* @__PURE__ */m("div",{ref:Y,className:ee("relative min-h-72 overflow-hidden rounded-lg border border-gray-200 bg-gray-100",A&&"[&_canvas]:cursor-crosshair",g),children:[
3
+ /* @__PURE__ */h("div",{className:"absolute inset-0",children:/* @__PURE__ */h("div",{ref:le,className:"h-full w-full",role:"region","aria-label":u})}),ve&&/* @__PURE__ */h("p",{className:"absolute inset-0 grid place-items-center p-6 text-center text-sm text-gray-500",children:X.failed}),T&&/* @__PURE__ */h(e,{"data-map-control":"",variant:"secondary",size:"sm",className:"absolute left-3 top-3 z-10",onClick:()=>T.onChange(!T.active),leftIcon:/* @__PURE__ */h(se,{leave:T.active}),children:T.active?X.leaveFullScreen:X.fullScreen}),f,null!=R&&!Be&&/* @__PURE__ */h("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:R}),Be&&Te?p(R,Te):null,be&&/* @__PURE__ */h(ie,{pins:t,hosts:fe.current})]})}function ie({pins:e,hosts:t}){/* @__PURE__ */
4
+ return h(g,{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)),p(e.iconNode,n,e.key)})})}function se({leave:e}){/* @__PURE__ */
5
+ return h(r,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 ce(){const[e,t]=i(null);return{highlightKey:e,pointAt:c(e=>{const n=()=>t(e),r=()=>t(t=>t===e?null:t);return{onMouseEnter:n,onMouseLeave:r,onFocus:n,onBlur:r}},[])}}var ue=3e3,de=e=>!!e?.pending&&3e3,pe=e=>`${e.kind}:${e.id}`,me=e=>("located"===e.placement||"approximate"===e.placement)&&null!=e.lat&&null!=e.lng;function he(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 ge={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"}},fe=["importer","dealer","retail","supplier","delivery_location","warehouse"];function ye(e){return"supplier"===e.kind?"supplier":"customer"===e.kind?e.category||"importer":e.kind}var be=(e,t=ge)=>t[e]?.tone??"bg-gray-700 text-white",xe=(e,t=ge)=>t[e]?.label??e,ve=(e,t)=>be(ye(e),t);function we(e,t,n=ge){return null!=t?String(t):(n[ye(e)]?.label??"").charAt(0).toUpperCase()}var ke=["delivery_location","warehouse"];function Ne(e,t=ke){const n=/* @__PURE__ */new Map;let r=0;for(const o of e)t.includes(o.kind)&&n.set(pe(o),++r);return n}function Me(e){const t={onMap:0,approximate:0,pending:0,off:0};for(const n of e)me(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 Le(e){const t=[...new Set(e.filter(me).map(ye))];return[...fe.filter(e=>t.includes(e)),...t.filter(e=>!fe.includes(e))]}function Ee(e,t){return e.filter(e=>!me(e)&&"pending"!==e.placement).map(e=>{const n=t?.get(pe(e)),r=he(e.placement)?.replace(/^Not on the map: /,"")??"";return{key:pe(e),text:`${null!=n?`${n}. `:""}${e.label}: ${r}`}})}function Se({categories:e,palette:t=ge,floating:n=!0}){return e.length<2?null:/* @__PURE__ */h("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__ */m("span",{className:"inline-flex items-center gap-2",children:[
6
+ /* @__PURE__ */h("span",{"aria-hidden":!0,className:`h-2.5 w-2.5 rounded-full ${be(e,t)}`}),xe(e,t)]},e))})}function $e({point:t,number:n,onOpen:a,onClose:l,palette:i=ge}){const s=he(t.placement),c=ye(t),u=o().map;/* @__PURE__ */
7
+ return m("section",{"aria-label":u.chosen(t.label),className:"absolute bottom-3 left-3 right-3 z-10 max-w-md space-y-2 rounded-lg border border-gray-200 bg-white p-3 shadow-(--elevation-panel)",children:[
8
+ /* @__PURE__ */m("div",{className:"flex items-start justify-between gap-2",children:[
9
+ /* @__PURE__ */m("div",{className:"min-w-0",children:[
10
+ /* @__PURE__ */m("h3",{className:"text-sm font-semibold text-gray-900 [overflow-wrap:anywhere]",children:[null!=n&&/* @__PURE__ */m("span",{className:"mr-1 text-gray-400",children:[n,"."]}),t.label,t.code&&/* @__PURE__ */h("span",{className:"ml-2 text-xs font-normal text-gray-400",children:t.code})]}),
11
+ /* @__PURE__ */h("p",{className:"text-xs text-gray-500",children:i[c]?xe(c,i):t.category})]}),
12
+ /* @__PURE__ */h("button",{type:"button",onClick:l,"aria-label":u.closeCard,className:"rounded p-0.5 text-gray-400 hover:text-gray-600",children:/* @__PURE__ */h(r,{name:"close","aria-hidden":!0,className:"h-4 w-4",strokeWidth:2})})]}),
13
+ /* @__PURE__ */h("p",{className:"text-sm text-gray-700 [overflow-wrap:anywhere]",children:t.address||"—"}),s&&/* @__PURE__ */h("p",{className:"text-xs text-gray-500",children:s}),t.matched&&"approximate"===t.placement&&/* @__PURE__ */m("p",{className:"text-xs text-gray-400 [overflow-wrap:anywhere]",children:["Placed at: ",t.matched]}),a&&/* @__PURE__ */h("div",{className:"flex justify-end",children:/* @__PURE__ */h(e,{variant:"secondary",size:"sm",onClick:a,children:u.openRecord})})]})}function je(e,t,{staleTime:n}={}){return f({queryKey:e,queryFn:t,staleTime:n,refetchInterval:e=>de(e.state.data)})}function Ae({queryKey:e,queryFn:t,refreshSignal:n,onOpen:r,ariaLabel:o,title:c="Locations",palette:d=ge,numbers:p,className:g="",mapClassName:f="min-h-[240px] flex-1"}){const{data:y,isError:b,refetch:x}=je(e,t,{staleTime:0}),v=l(!1);s(()=>{v.current?x():v.current=!0},[n]);const[w,k]=i(null),N=u(()=>y?.points??[],[y]),M=u(()=>p??Ne(N),[p,N]),C=u(()=>N.filter(me).map(e=>({key:pe(e),label:e.label,lat:e.lat,lng:e.lng,glyph:we(e,M.get(pe(e))??null,d),tone:ve(e,d),approximate:"approximate"===e.placement})),[N,M,d]),L=u(()=>Ee(N,M),[N,M]),E=u(()=>Le(N),[N]),S=y?.pending??0,$=N.find(e=>pe(e)===w)??null,j=$&&r?r($):null;/* @__PURE__ */
14
+ return m("section",{"aria-label":c,className:`flex min-w-0 flex-col ${g}`,children:[
15
+ /* @__PURE__ */m("div",{className:"flex min-h-[30px] items-center justify-between mb-2",children:[
16
+ /* @__PURE__ */h("h3",{className:"text-sm font-semibold text-gray-900",children:c}),y&&/* @__PURE__ */h("span",{className:"text-xs text-gray-500",children:Ce(Me(N))})]}),
17
+ /* @__PURE__ */m(le,{pins:C,selectedKey:w,focus:null,onSelect:k,ariaLabel:o,className:f,children:[
18
+ /* @__PURE__ */m("div",{className:"absolute left-3 top-3 z-10 flex max-w-[70%] flex-col items-start gap-2",children:[
19
+ /* @__PURE__ */h(Se,{categories:E,palette:d,floating:!1}),b&&/* @__PURE__ */m("div",{className:"flex items-center gap-2 rounded-lg border border-gray-200 bg-white px-3 min-h-8 py-1 text-xs text-gray-600 shadow-sm",children:["Couldn’t load the locations.",
20
+ /* @__PURE__ */h("button",{type:"button",onClick:()=>{x()},className:"font-medium text-blue-600 hover:text-blue-800 hover:underline",children:"Try again"})]}),!b&&(S>0||L.length>0)&&/* @__PURE__ */m("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:[S>0&&/* @__PURE__ */m("p",{className:"flex items-center gap-2 text-gray-500",children:[
21
+ /* @__PURE__ */h(a,{}),"Locating ",S," address",1===S?"":"es"]}),L.slice(0,3).map(e=>/* @__PURE__ */h("p",{className:"truncate text-amber-700",title:e.text,children:e.text},e.key)),L.length>3&&/* @__PURE__ */m("p",{className:"text-gray-500",children:["+",L.length-3," more not on the map"]})]})]}),$&&/* @__PURE__ */h($e,{point:$,number:M.get(pe($))??null,onOpen:j,onClose:()=>k(null),palette:d})]})]})}export{w as CARD_MIN_MAP_WIDTH,y as COMPACT_SHOW,le as EntityMap,Ae as LocationsMap,C as MAPLIBRE_WORKER_FILE,A as MAP_APART_PX,ge as MAP_CATEGORIES,j as MAP_STOP_PX,$ as MAP_TARGET_PX,Se as MapLegend,ue as PENDING_POLL_MS,ke as SECONDARY_KINDS,$e as SelectedCard,N as cardMaxHeight,xe as categoryLabel,be as categoryTone,b as foldAttributionOnce,me as isOnMap,W as layoutPins,Le as legendCategories,S as loadMapLibre,Ne as locationNumbers,L as mapLibreWorkerUrl,de as mapPointsRefetchInterval,Ee as offMapNotes,ye as pinCategory,we as pinGlyph,ve as pinTone,M as placeCard,he as placementNote,pe as pointKey,z as stopsLabel,Me as summarize,Ce as summaryText,ce as useMapHighlight,je as useMapPoints,K as zoomApart};
package/dist/pdf/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import{lazy as r}from"react";var e=r(()=>import("../PdfViewer-ATYZB7RS.js"));export{e as PdfViewer};
2
+ import{lazy as r}from"react";var e=r(()=>import("../PdfViewer-PJFETQHR.js"));export{e as PdfViewer};
@@ -1 +1 @@
1
- export{startClientTelemetry}from"../chunk-Q3WRWTON.js";import"../chunk-QK67IFHD.js";import"../chunk-KNUR2UEG.js";
1
+ export{startClientTelemetry}from"../chunk-U5QVKITI.js";import"../chunk-KVX57LJZ.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 CORNERS_FOR_THEME, am as Calendar, an as CalendarMode, ao as CalendarProps, ap as Candle, aq as CandlestickChart, ar as CandlestickChartProps, as as Card, at as CardPadding, au as CardProps, av as CardTone, aw as CartesianPlot, ax as CartesianPlotProps, ay as CellStyle, az as ChartBackgroundVariant, aA as ChartBrush, aB as ChartBrushProps, aC as ChartCurve, aD as ChartDefs, aE as ChartDefsProps, aF as ChartDot, aG as ChartDotProps, aH as ChartDotVariant, aI as ChartFillVariant, aJ as ChartFrame, aK as ChartFrameProps, aL as ChartHighlightProvider, aM as ChartLegendEntry, aN as ChartLegendSwatch, aO as ChartRange, aP as ChartReferenceLine, aQ as ChartRevealDirection, aR as ChartSkeleton, aS as ChartSkeletonProps, aT as ChartStatusTone, aU as ChartStrokeVariant, aV as ChartTooltip, aW as ChartTooltipProps, aX as ChartTooltipRow, aY as ChatTemplate, aZ as Checkbox, a_ as CheckboxProps, a$ as CheckoutTemplate, b0 as ChordChart, b1 as ChordChartProps, b2 as ColorPicker, b3 as ColorPickerPanel, b4 as ColorPickerPanelProps, b5 as ColorPickerProps, b6 as ColorPreset, b7 as ColorSwatch, b8 as ColorSwatchProps, b9 as ColorSwatchSize, ba as ColoredBadge, bb as ColoredBadgeProps, bc as ColumnChart, bd as ColumnChartProps, C as ColumnDef, be as ColumnSeries, bf as ColumnShares, bg as ComposerAttachments, bh as ComposerAttachmentsProps, bi as ConfirmProvider, bj as ContainerFillChart, bk as ContainerFillChartProps, bl as ContainerFillItem, bm as ContextMenu, bn as ContextMenuPoint, bo as ContextMenuProps, bp as ContextMenuState, bq as ControlSize, br as CornerOption, bs as Corners, bt as CornersInput, bu as CornersInputProps, bv as CountBadge, bw as CountBadgeProps, bx as CountBadgeTone, by as Curve, bz as DAY_MS, bA as DashboardTemplate, bB as DataTable, bC as DataTableColumn, bD as DataTableColumnGroup, bE as DataTableHeader, bF as DataTablePage, bG as DataTableProps, bH as DataTableRowLink, bI as DataTableRowProps, bJ as DatePicker, bK as DatePickerProps, bL as DateRangePicker, bM as DateRangePickerProps, bN as DateTimePicker, bO as DateTimePickerProps, bP as DescriptionColumns, bQ as DescriptionItem, bR as DescriptionList, bS as DescriptionListProps, bT as Dialog, bU as DialogProps, bV as DialogSize, bW as DisplayChipItem, bX as DisplayChips, bY as DisplayChipsProps, bZ as Divider, b_ as DividerProps, b$ as DividerSpacing, c0 as Drawer, c1 as DrawerProps, c2 as DrawerSide, c3 as DrawerSize, c4 as DropdownMenu, c5 as DropdownMenuAlign, c6 as DropdownMenuCheckboxItem, c7 as DropdownMenuDividerItem, c8 as DropdownMenuEntry, c9 as DropdownMenuItem, ca as DropdownMenuLabelItem, cb as DropdownMenuLinkItem, cc as DropdownMenuProps, cd as DropdownMenuRadioItem, ce as DropdownMenuSide, cf as DropdownPositionOptions, cg as ELEVATION_LEVELS, ch as ENGLISH, ci as ENTER, cj as EditableGrid, ck as EditableGridProps, cl as ElevationLevel, cm as EmailTemplate, cn as EmptyState, co as EmptyStateProps, cp as EmptyValue, cq as EmptyValueProps, cr as ErrorBoundary, cs as ErrorBoundaryProps, ct as ErrorPage, cu as ErrorPageProps, cv as FONT_WEIGHTS, cw as FileIntake, cx as FilePicker, cy as FilePickerProps, cz as FillVariant, cA as FloatingBar, cB as FloatingBarAlign, cC as FloatingBarProps, cD as FloatingBarSide, cE as FontWeightRole, cF as FormError, cG as FormErrorSummary, cH as FormErrorSummaryProps, cI as FormField, cJ as FormFieldProps, cK as FormLayoutPage, cL as FunnelChart, cM as FunnelChartProps, cN as FunnelStage, cO as GLASS_DIVIDER, cQ as GROUP_COLORS, cR as GROUP_COLORS_SOLID, cS as GalleryTemplate, cT as Gap, cU as GlassOptions, cV as GlobalSearch, cW as GlobalSearchProps, cX as Grid, cY as GridCols, cZ as GridColumn, c_ as GridProps, c$ as HeatmapChart, d0 as HeatmapChartProps, d1 as HelpCenter, d2 as HelpCenterDoc, d3 as HelpCenterProps, d4 as HexInput, d5 as HistogramBin, d6 as HistogramChart, d7 as HistogramChartProps, d8 as Hsv, d9 as INPUT_BASE, da as INPUT_SIZES, db as IconButton, dc as IconButtonClassesOptions, dd as IconButtonProps, de as IconRail, df as IconRailButton, dg as IconRailButtonProps, dh as IconRailLabels, di as IconRailLabelsShown, dj as IconRailOrientation, dk as IconRailProps, dl as ImageFocusPoint, dm as ImageFocusPointProps, dn as Inline, dp as InlineProps, dq as Input, dr as InputNumber, ds as InputNumberProps, dt as InputProps, du as InputSize, dv as Justify, dw as Kanban, dx as KanbanColumn, dy as KanbanProps, dz as Kbd, dA as KbdProps, dB as KbdSize, dC as KbdTone, dD as Label, dE as LabelClassesOptions, dF as LabelProps, dG as LadderScale, dH as LanguagePanel, dI as LanguagePanelProps, dJ as LanguageSelect, dK as LanguageSelectProps, dL as LinearScale, dM as LinkFilter, dN as LinkFilterField, dO as LinkKindChoice, dP as LinkOption, dQ as LinkOptionGroup, dR as LinkPicker, dS as LinkPickerFieldProps, dT as LinkPickerProps, dU as LinkPickerWindowProps, dV as LinkRules, dW as LinkTarget, dX as ListDrop, dY as ListFooter, dZ as ListLoadError, d_ as ListLoadErrorProps, d$ as ListMove, e0 as ListRow, e1 as ListRowProps, e2 as LoadingSpinner, e3 as LoadingSpinnerProps, e4 as MAX_FRACTION_DIGITS, e5 as MENU_MAX_HEIGHT, e6 as MOD, e7 as MOTION, e8 as MOTION_DURATIONS, e9 as Markdown, e9 as MarkdownLite, ea as MarkdownLiteProps, ea as MarkdownProps, eb as MediaUploadField, ec as MediaUploadFieldProps, ed as MediaUploadGrid, ee as MediaUploadGridItem, ef as MediaUploadGridProps, eg as MenuPos, eh as Meter, ei as MeterProps, ej as MetricBar, ek as MetricBarProps, el as Milestone, em as MilestoneKind, en as MilestoneTimeline, eo as MilestoneTimelineProps, ep as MotionSpeed, er as NEXT_CHUNK_PATH_PREFIX, es as NativeSelect, et as NiceAxis, eu as NumericKeypad, ev as NumericKeypadProps, ew as OVERLAY_OPEN_EVENT, ex as PLACEHOLDER_INK, ey as POPUP_MAX_WIDTH, ez as POST_PRODUCTION_STATUSES, eA as PageHeader, eB as PageHeaderProps, P as PaginatedResponse, eC as Pagination, eD as PaginationProps, eE as PaperclipGlyph, eF as Paragraph, eG as ParagraphProps, eH as PieChart, eI as PieChartProps, eJ as PieSegment, eK as PlotGeometry, eL as Point, eM as Popover, eN as PopoverAlign, eO as PopoverProps, eP as PopoverRenderProps, eQ as PopoverSide, eR as PopupMenu, eS as PopupMenuDivider, eT as PopupMenuItem, eU as PopupMenuItemProps, eV as PopupMenuLabel, eW as PopupMenuProps, eX as PopupSubmenu, eY as PopupSubmenuProps, eZ as PortalBrandingContextValue, e_ as PortalBrandingProvider, e$ as PortalBrandingProviderProps, f0 as ProductionTimeline, f1 as ProductionTimelineProps, f2 as ProductionTimelineSnapshot, f3 as ProgressItem, f4 as PublicPortal, f5 as PublicPortalBranding, f6 as RADAR_SERIES_CAP, f7 as RADIUS_ROLES, f8 as ROW_HEIGHTS, f9 as RadarAxis, fa as RadarChart, fb as RadarChartProps, fc as RadarSeries, fd as RadialBarChart, fe as RadialBarChartProps, ff as RadialBarRow, fg as Radio, fh as RadioGroup, fi as RadioGroupOption, fj as RadioGroupOrientation, fk as RadioGroupProps, fl as RadioProps, fm as RadiusRole, fn as Range, fo as RangeChart, fp as RangeChartProps, fq as RangeRow, fr as RankedBars, fs as RankedBarsProps, ft as RankedBarsRow, fu as ResizeHandle, fv as ResizeHandleOrientation, fw as ResizeHandleProps, fx as ResizeHandleSide, fy as ResizeHandleStackSide, fz as ResolvedPortalBrandAsset, fA as Result, fB as ResultProps, fC as ResultStatus, fD as RevealDirection, fE as SCATTER_SERIES_CAP, fF as SERIES_SLOT_COUNT, fG as SERIES_VARS, fH as SHELL_LANGUAGE_STORAGE_KEY, fI as SHIFT, fJ as SPACING_ROLES, fK as SPACING_SCALE, fL as STAGES, fM as STALE_CHUNK_RELOAD_COOLDOWN_MS, fN as STALE_CHUNK_RELOAD_KEY, fO as STATUS_VARS, fP as SankeyChart, fQ as SankeyChartProps, fR as SankeyLink, fS as SankeyNode, fT as ScatterChart, fU as ScatterChartProps, fV as ScatterPoint, fW as ScatterSeries, S as SearchConfig, fX as SearchListRoute, fY as SearchProvider, fZ as SearchQuickAction, f_ as SearchResponse, f$ as SearchResult, g0 as SearchableItem, g1 as SearchableOption, g2 as SearchableOptionGroup, g3 as SearchableSelect, g4 as SearchableSelectBaseProps, g5 as SearchableSelectMultipleProps, g6 as SearchableSelectProps, g7 as Segmented, g8 as SegmentedOption, g9 as SegmentedProps, ga as SegmentedSize, gb as Select, gc as SelectBaseProps, gd as SelectItem, ge as SelectMultipleProps, gf as SelectOption, gg as SelectOptionGroup, gh as SelectProps, gi as SemanticGroup, gj as SeriesSlots, gk as SettingRow, gl as SettingRowProps, gm as SeverityTone, gp as ShellLanguage, gq as ShellLanguageProvider, gr as ShellLanguageState, gs as ShellPrefsAdapter, gt as ShellPrefsProvider, gu as SidebarActionButton, gv as SidebarActionButtonProps, gw as SidebarGroupLabel, gx as SidebarGroupLabelProps, gy as SidebarLayout, gz as SidebarLayoutProps, gA as SidebarNavGroup, gB as SidebarNavGroupProps, gC as SidebarNavItem, gD as SidebarNavItemProps, gE as Skeleton, gF as SkeletonProps, gG as SkeletonVariant, gH as Slider, gI as SliderGroup, gJ as SliderProps, gK as SliderSize, gL as Snippet, gM as SnippetProps, gN as SnippetSize, gO as SnippetVariant, a as SortState, gP as SortableList, gQ as SortableListProps, gR as SortableListSpacing, gS as SpacingRole, gT as SpacingStep, gU as Sparkline, gV as SparklineProps, gW as Stack, gX as StackProps, gY as StaleChunkReloadOptions, gZ as StatCard, g_ as StatCardProps, g$ as StatTile, h0 as StatTileProps, h1 as Statistic, h2 as StatisticProps, h3 as StatisticSize, h4 as StatisticTone, h5 as StatusBadge, h6 as StatusBadgeProvider, h7 as StatusEmphasis, h8 as StepItem, h9 as Stepper, ha as StepperProps, hb as StrokeVariant, hc as SunburstChart, hd as SunburstChartProps, he as SunburstNode, hf as Switch, hg as SwitchProps, hh as SwitchSize, hi as TYPE_SCALE, hj as TabItem, hk as Tabs, hl as TabsProps, hm as TagInput, hn as TagInputOption, ho as TagInputProps, hp as TagInputTone, hq as Text, hr as TextLinkField, hs as TextLinkFieldProps, ht as TextProps, hu as TextSize, hv as TextTone, hw as TextToolbar, hx as TextToolbarAlign, hy as TextToolbarCase, hz as TextToolbarMark, hA as TextToolbarProps, hB as TextWeight, hC as Textarea, hD as TextareaProps, hE as Theme, hF as TileButton, hG as TileButtonProps, hH as TileSize, hI as TimeAgo, hJ as TimeAgoProps, hK as TimePicker, hL as TimePickerProps, hM as TimeSeriesChart, hN as TimeSeriesChartProps, hO as TimeSeriesSeries, hP as TimelineMarker, hQ as TimelineMarkerKind, hR as TimelineReport, hS as TimelineScrubProgress, hT as TimelineTrack, hU as TimelineTrackItem, hV as TimelineTrackKind, hW as TimelineTrackPending, hX as TimelineTrackPhase, hY as TimelineTrackPlayback, hZ as TimelineTrackProps, h_ as TimelineTrackThumb, h$ as Title, i0 as TitleLevel, i1 as TitleProps, i2 as ToastAction, i3 as ToastCloseReason, i4 as ToastOptions, i5 as ToastPlacement, i6 as ToastUndoableOptions, i7 as Tooltip, i8 as TooltipProps, i9 as TopNav, ia as TopNavItem, ib as TopNavProps, ic as TransferProgress, id as TransferProgressProps, ie as TransferProgressState, ig as Tree, ih as TreeDrop, ii as TreeEmptySlot, ij as TreeEmptySlotProps, ik as TreeGroup, il as TreeGroupLabel, im as TreeGroupLabelProps, io as TreeGroupProps, ip as TreeMove, iq as TreeProps, ir as TreeRow, is as TreeRowProps, it as TreeSeam, iu as TreeSeamProps, iv as TreemapChart, iw as TreemapChartProps, ix as TreemapItem, iy as TreemapTile, iz as TypeStep, iA as UNDOABLE_MS, iB as UseAppUpdateOptions, iC as UseContextMenu, iD as UseProductionTimelineOpts, iE as VERSION, iF as VITE_PRELOAD_ERROR_EVENT, iG as WaterfallChart, iH as WaterfallChartProps, iI as WaterfallStep, iJ as WidthsBar, iK as WidthsBarProps, iL as ZLayer, iM as Z_LAYERS, iN as angleScale, iO as appendKey, iP as applyCorners, iQ as applyIconSet, iR as applyThemePrefs, iS as arcPath, iT as areaBetween, iU as areaFrom, iV as assignSeriesSlots, iW as autoHighlightIndex, iX as backspace, iY as bandScale, iZ as binValues, i_ as budgetState, i$ as bumpPath, j0 as buttonClasses, j1 as calcOverall, j2 as calcReportOverall, j3 as colorFill, j4 as colorSwatchClasses, j5 as columnSharesWidths, j6 as confirm, j7 as confirmDestructive, j8 as cornersFor, j9 as curvePath, ja as dashFor, jc as dismissPopups, jd as fillFor, je as fillId, jf as fmtSliderDate, jg as fromDateKey, jh as glassStyle, ji as glowId, jj as groundId, jk as groupColors, jl as hexToHsv, jm as highlightOpacity, jn as hsvToHex, jo as iconButtonClasses, jp as inputClasses, jq as installStaleChunkReload, jr as isMac, js as isSeverityTone, jt as isSpacingStep, ju as isStaleChunkError, jw as labelClasses, jx as ladderScale, jy as languageSelectWidth, jz as leavesContextMenuAlone, jA as linearPath, jB as linearScale, jC as logScale, jD as maskId, jE as matchShellLanguage, jF as mediaFileName, jG as monotonePath, jH as niceAxis, jI as niceMax, jJ as openGlobalSearch, jK as parseHexColor, jL as polygonPoints, jM as popupBounds, jN as prompt, jO as pushRecentSearch, jP as radiusScale, jQ as readSavedShellLanguage, jR as registerModalEscapeInterceptor, jS as resolveBrandMarkTreatment, jT as resolveColumnShares, jU as resolveColumnWidths, jV as resolveCorners, jW as resolvePortalBrandAsset, jX as resolveSeriesColor, jY as resolveSeriesColorWithin, jZ as resolveShellLanguage, j_ as resolveTheme, j$ as sanitizeRecentSearches, k0 as saveShellLanguage, k1 as seriesColor, k2 as severityOf, k3 as solidSurfaceStyle, k4 as splinePath, k5 as squarify, k6 as stagger, k7 as stepPath, k8 as tabButtonId, k9 as tabPanelId, ka as textToolbarRows, kb as textToolbarWindowColumns, kc as toDateKey, kd as toDayMs, ke as toISODate, kf as toast, kg as toggleSeriesSlot, kh as useAppUpdate, ki as useClickOutside, kj as useConfirm, kk as useContextMenu, kl as useDebouncedValue, km as useDropdownPosition, kn as useFocusTrap, ko as useHighlight, kp as useIsMobile, kq as useLocalStoragePrefs, kr as usePlotWidth, ks as usePortalBranding, kt as useProductionTimeline, ku as useScrollLock, kv as useShellLanguage, kw as useShellPrefs, kx as useStatusLabel, ky as useTheme, kz as useTransferProgress } from '../index-Bozgrt9E.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 CORNERS_FOR_THEME, am as Calendar, an as CalendarMode, ao as CalendarProps, ap as Candle, aq as CandlestickChart, ar as CandlestickChartProps, as as Card, at as CardPadding, au as CardProps, av as CardTone, aw as CartesianPlot, ax as CartesianPlotProps, ay as CellStyle, az as ChartBackgroundVariant, aA as ChartBrush, aB as ChartBrushProps, aC as ChartCurve, aD as ChartDefs, aE as ChartDefsProps, aF as ChartDot, aG as ChartDotProps, aH as ChartDotVariant, aI as ChartFillVariant, aJ as ChartFrame, aK as ChartFrameProps, aL as ChartHighlightProvider, aM as ChartLegendEntry, aN as ChartLegendSwatch, aO as ChartRange, aP as ChartReferenceLine, aQ as ChartRevealDirection, aR as ChartSkeleton, aS as ChartSkeletonProps, aT as ChartStatusTone, aU as ChartStrokeVariant, aV as ChartTooltip, aW as ChartTooltipProps, aX as ChartTooltipRow, aY as ChatTemplate, aZ as Checkbox, a_ as CheckboxProps, a$ as CheckoutTemplate, b0 as ChordChart, b1 as ChordChartProps, b2 as ColorPicker, b3 as ColorPickerPanel, b4 as ColorPickerPanelProps, b5 as ColorPickerProps, b6 as ColorPreset, b7 as ColorSwatch, b8 as ColorSwatchProps, b9 as ColorSwatchSize, ba as ColoredBadge, bb as ColoredBadgeProps, bc as ColumnChart, bd as ColumnChartProps, C as ColumnDef, be as ColumnSeries, bf as ColumnShares, bg as ComposerAttachments, bh as ComposerAttachmentsProps, bi as ConfirmProvider, bj as ContainerFillChart, bk as ContainerFillChartProps, bl as ContainerFillItem, bm as ContextMenu, bn as ContextMenuPoint, bo as ContextMenuProps, bp as ContextMenuState, bq as ControlSize, br as CornerOption, bs as Corners, bt as CornersInput, bu as CornersInputProps, bv as CountBadge, bw as CountBadgeProps, bx as CountBadgeTone, by as Curve, bz as DAY_MS, bA as DashboardTemplate, bB as DataTable, bC as DataTableColumn, bD as DataTableColumnGroup, bE as DataTableHeader, bF as DataTablePage, bG as DataTableProps, bH as DataTableRowLink, bI as DataTableRowProps, bJ as DatePicker, bK as DatePickerProps, bL as DateRangePicker, bM as DateRangePickerProps, bN as DateTimePicker, bO as DateTimePickerProps, bP as DescriptionColumns, bQ as DescriptionItem, bR as DescriptionList, bS as DescriptionListProps, bT as Dialog, bU as DialogProps, bV as DialogSize, bW as DisplayChipItem, bX as DisplayChips, bY as DisplayChipsProps, bZ as Divider, b_ as DividerProps, b$ as DividerSpacing, c0 as Drawer, c1 as DrawerProps, c2 as DrawerSide, c3 as DrawerSize, c4 as DropdownMenu, c5 as DropdownMenuAlign, c6 as DropdownMenuCheckboxItem, c7 as DropdownMenuDividerItem, c8 as DropdownMenuEntry, c9 as DropdownMenuItem, ca as DropdownMenuLabelItem, cb as DropdownMenuLinkItem, cc as DropdownMenuProps, cd as DropdownMenuRadioItem, ce as DropdownMenuSide, cf as DropdownPositionOptions, cg as ELEVATION_LEVELS, ch as ENGLISH, ci as ENTER, cj as EditableGrid, ck as EditableGridProps, cl as ElevationLevel, cm as EmailTemplate, cn as EmptyState, co as EmptyStateProps, cp as EmptyValue, cq as EmptyValueProps, cr as ErrorBoundary, cs as ErrorBoundaryProps, ct as ErrorPage, cu as ErrorPageProps, cv as FONT_WEIGHTS, cw as FileIntake, cx as FilePicker, cy as FilePickerProps, cz as FillVariant, cA as FloatingBar, cB as FloatingBarAlign, cC as FloatingBarProps, cD as FloatingBarSide, cE as FontWeightRole, cF as FormError, cG as FormErrorSummary, cH as FormErrorSummaryProps, cI as FormField, cJ as FormFieldProps, cK as FormLayoutPage, cL as FunnelChart, cM as FunnelChartProps, cN as FunnelStage, cO as GLASS_DIVIDER, cQ as GROUP_COLORS, cR as GROUP_COLORS_SOLID, cS as GalleryTemplate, cT as Gap, cU as GlassOptions, cV as GlobalSearch, cW as GlobalSearchProps, cX as Grid, cY as GridCols, cZ as GridColumn, c_ as GridProps, c$ as HeatmapChart, d0 as HeatmapChartProps, d1 as HelpCenter, d2 as HelpCenterDoc, d3 as HelpCenterProps, d4 as HexInput, d5 as HistogramBin, d6 as HistogramChart, d7 as HistogramChartProps, d8 as Hsv, d9 as INPUT_BASE, da as INPUT_SIZES, db as IconButton, dc as IconButtonClassesOptions, dd as IconButtonProps, de as IconRail, df as IconRailButton, dg as IconRailButtonProps, dh as IconRailLabels, di as IconRailLabelsShown, dj as IconRailOrientation, dk as IconRailProps, dl as ImageFocusPoint, dm as ImageFocusPointProps, dn as Inline, dp as InlineProps, dq as Input, dr as InputNumber, ds as InputNumberProps, dt as InputProps, du as InputSize, dv as Justify, dw as Kanban, dx as KanbanColumn, dy as KanbanProps, dz as Kbd, dA as KbdProps, dB as KbdSize, dC as KbdTone, dD as Label, dE as LabelClassesOptions, dF as LabelProps, dG as LadderScale, dH as LanguagePanel, dI as LanguagePanelProps, dJ as LanguageSelect, dK as LanguageSelectProps, dL as LinearScale, dM as LinkFilter, dN as LinkFilterField, dO as LinkKindChoice, dP as LinkOption, dQ as LinkOptionGroup, dR as LinkPicker, dS as LinkPickerFieldProps, dT as LinkPickerProps, dU as LinkPickerWindowProps, dV as LinkRules, dW as LinkTarget, dX as ListDrop, dY as ListFooter, dZ as ListLoadError, d_ as ListLoadErrorProps, d$ as ListMove, e0 as ListRow, e1 as ListRowProps, e2 as LoadingSpinner, e3 as LoadingSpinnerProps, e4 as MAX_FRACTION_DIGITS, e5 as MENU_MAX_HEIGHT, e6 as MOD, e7 as MOTION, e8 as MOTION_DURATIONS, e9 as Markdown, e9 as MarkdownLite, ea as MarkdownLiteProps, ea as MarkdownProps, eb as MediaUploadField, ec as MediaUploadFieldProps, ed as MediaUploadGrid, ee as MediaUploadGridItem, ef as MediaUploadGridProps, eg as MenuPos, eh as Meter, ei as MeterProps, ej as MetricBar, ek as MetricBarProps, el as Milestone, em as MilestoneKind, en as MilestoneTimeline, eo as MilestoneTimelineProps, ep as MotionSpeed, er as NEXT_CHUNK_PATH_PREFIX, es as NativeSelect, et as NiceAxis, eu as NumericKeypad, ev as NumericKeypadProps, ew as OVERLAY_OPEN_EVENT, ex as PLACEHOLDER_INK, ey as POPUP_MAX_WIDTH, ez as POST_PRODUCTION_STATUSES, eA as PageHeader, eB as PageHeaderProps, P as PaginatedResponse, eC as Pagination, eD as PaginationProps, eE as PaperclipGlyph, eF as Paragraph, eG as ParagraphProps, eH as PieChart, eI as PieChartProps, eJ as PieSegment, eK as PlotGeometry, eL as Point, eM as Popover, eN as PopoverAlign, eO as PopoverProps, eP as PopoverRenderProps, eQ as PopoverSide, eR as PopupMenu, eS as PopupMenuDivider, eT as PopupMenuItem, eU as PopupMenuItemProps, eV as PopupMenuLabel, eW as PopupMenuProps, eX as PopupSubmenu, eY as PopupSubmenuProps, eZ as PortalBrandingContextValue, e_ as PortalBrandingProvider, e$ as PortalBrandingProviderProps, f0 as ProductionTimeline, f1 as ProductionTimelineProps, f2 as ProductionTimelineSnapshot, f3 as ProgressItem, f4 as PublicPortal, f5 as PublicPortalBranding, f6 as RADAR_SERIES_CAP, f7 as RADIUS_ROLES, f8 as ROW_HEIGHTS, f9 as RadarAxis, fa as RadarChart, fb as RadarChartProps, fc as RadarSeries, fd as RadialBarChart, fe as RadialBarChartProps, ff as RadialBarRow, fg as Radio, fh as RadioGroup, fi as RadioGroupOption, fj as RadioGroupOrientation, fk as RadioGroupProps, fl as RadioProps, fm as RadiusRole, fn as Range, fo as RangeChart, fp as RangeChartProps, fq as RangeRow, fr as RankedBars, fs as RankedBarsProps, ft as RankedBarsRow, fu as ResizeHandle, fv as ResizeHandleOrientation, fw as ResizeHandleProps, fx as ResizeHandleSide, fy as ResizeHandleStackSide, fz as ResolvedPortalBrandAsset, fA as Result, fB as ResultProps, fC as ResultStatus, fD as RevealDirection, fE as SCATTER_SERIES_CAP, fF as SERIES_SLOT_COUNT, fG as SERIES_VARS, fH as SHELL_LANGUAGE_STORAGE_KEY, fI as SHIFT, fJ as SPACING_ROLES, fK as SPACING_SCALE, fL as STAGES, fM as STALE_CHUNK_RELOAD_COOLDOWN_MS, fN as STALE_CHUNK_RELOAD_KEY, fO as STATUS_VARS, fP as SankeyChart, fQ as SankeyChartProps, fR as SankeyLink, fS as SankeyNode, fT as ScatterChart, fU as ScatterChartProps, fV as ScatterPoint, fW as ScatterSeries, S as SearchConfig, fX as SearchListRoute, fY as SearchProvider, fZ as SearchQuickAction, f_ as SearchResponse, f$ as SearchResult, g0 as SearchableItem, g1 as SearchableOption, g2 as SearchableOptionGroup, g3 as SearchableSelect, g4 as SearchableSelectBaseProps, g5 as SearchableSelectMultipleProps, g6 as SearchableSelectProps, g7 as Segmented, g8 as SegmentedOption, g9 as SegmentedProps, ga as SegmentedSize, gb as Select, gc as SelectBaseProps, gd as SelectItem, ge as SelectMultipleProps, gf as SelectOption, gg as SelectOptionGroup, gh as SelectProps, gi as SemanticGroup, gj as SeriesSlots, gk as SettingRow, gl as SettingRowProps, gm as SeverityTone, gp as ShellLanguage, gq as ShellLanguageProvider, gr as ShellLanguageState, gs as ShellPrefsAdapter, gt as ShellPrefsProvider, gu as SidebarActionButton, gv as SidebarActionButtonProps, gw as SidebarGroupLabel, gx as SidebarGroupLabelProps, gy as SidebarLayout, gz as SidebarLayoutProps, gA as SidebarNavGroup, gB as SidebarNavGroupProps, gC as SidebarNavItem, gD as SidebarNavItemProps, gE as Skeleton, gF as SkeletonProps, gG as SkeletonVariant, gH as Slider, gI as SliderGroup, gJ as SliderProps, gK as SliderSize, gL as Snippet, gM as SnippetProps, gN as SnippetSize, gO as SnippetVariant, a as SortState, gP as SortableList, gQ as SortableListProps, gR as SortableListSpacing, gS as SpacingRole, gT as SpacingStep, gU as Sparkline, gV as SparklineProps, gW as SpinnerRing, gX as SpinnerRingProps, gY as Stack, gZ as StackProps, g_ as StaleChunkReloadOptions, g$ as StatCard, h0 as StatCardProps, h1 as StatTile, h2 as StatTileProps, h3 as Statistic, h4 as StatisticProps, h5 as StatisticSize, h6 as StatisticTone, h7 as StatusBadge, h8 as StatusBadgeProvider, h9 as StatusEmphasis, ha as StepItem, hb as Stepper, hc as StepperProps, hd as StrokeVariant, he as SunburstChart, hf as SunburstChartProps, hg as SunburstNode, hh as Switch, hi as SwitchProps, hj as SwitchSize, hk as TYPE_SCALE, hl as TabItem, hm as Tabs, hn as TabsProps, ho as TagInput, hp as TagInputOption, hq as TagInputProps, hr as TagInputTone, hs as Text, ht as TextLinkField, hu as TextLinkFieldProps, hv as TextProps, hw as TextSize, hx as TextTone, hy as TextToolbar, hz as TextToolbarAlign, hA as TextToolbarCase, hB as TextToolbarMark, hC as TextToolbarProps, hD as TextWeight, hE as Textarea, hF as TextareaProps, hG as Theme, hH as TileButton, hI as TileButtonProps, hJ as TileSize, hK as TimeAgo, hL as TimeAgoProps, hM as TimePicker, hN as TimePickerProps, hO as TimeSeriesChart, hP as TimeSeriesChartProps, hQ as TimeSeriesSeries, hR as TimelineMarker, hS as TimelineMarkerKind, hT as TimelineReport, hU as TimelineScrubProgress, hV as TimelineTrack, hW as TimelineTrackItem, hX as TimelineTrackKind, hY as TimelineTrackPending, hZ as TimelineTrackPhase, h_ as TimelineTrackPlayback, h$ as TimelineTrackProps, i0 as TimelineTrackThumb, i1 as Title, i2 as TitleLevel, i3 as TitleProps, i4 as ToastAction, i5 as ToastCloseReason, i6 as ToastOptions, i7 as ToastPlacement, i8 as ToastUndoableOptions, i9 as Tooltip, ia as TooltipProps, ib as TopNav, ic as TopNavItem, id as TopNavProps, ie as TransferProgress, ig as TransferProgressProps, ih as TransferProgressState, ii as Tree, ij as TreeDrop, ik as TreeEmptySlot, il as TreeEmptySlotProps, im as TreeGroup, io as TreeGroupLabel, ip as TreeGroupLabelProps, iq as TreeGroupProps, ir as TreeMove, is as TreeProps, it as TreeRow, iu as TreeRowProps, iv as TreeSeam, iw as TreeSeamProps, ix as TreemapChart, iy as TreemapChartProps, iz as TreemapItem, iA as TreemapTile, iB as TypeStep, iC as UNDOABLE_MS, iD as UseAppUpdateOptions, iE as UseContextMenu, iF as UseProductionTimelineOpts, iG as VERSION, iH as VITE_PRELOAD_ERROR_EVENT, iI as WaterfallChart, iJ as WaterfallChartProps, iK as WaterfallStep, iL as WidthsBar, iM as WidthsBarProps, iN as ZLayer, iO as Z_LAYERS, iP as angleScale, iQ as appendKey, iR as applyCorners, iS as applyIconSet, iT as applyThemePrefs, iU as arcPath, iV as areaBetween, iW as areaFrom, iX as assignSeriesSlots, iY as autoHighlightIndex, iZ as backspace, i_ as bandScale, i$ as binValues, j0 as budgetState, j1 as bumpPath, j2 as buttonClasses, j3 as calcOverall, j4 as calcReportOverall, j5 as colorFill, j6 as colorSwatchClasses, j7 as columnSharesWidths, j8 as confirm, j9 as confirmDestructive, ja as cornersFor, jb as curvePath, jc as dashFor, je as dismissPopups, jf as fillFor, jg as fillId, jh as fmtSliderDate, ji as fromDateKey, jj as glassStyle, jk as glowId, jl as groundId, jm as groupColors, jn as hexToHsv, jo as highlightOpacity, jp as hsvToHex, jq as iconButtonClasses, jr as inputClasses, js as installStaleChunkReload, jt as isMac, ju as isSeverityTone, jv as isSpacingStep, jw as isStaleChunkError, jy as labelClasses, jz as ladderScale, jA as languageSelectWidth, jB as leavesContextMenuAlone, jC as linearPath, jD as linearScale, jE as logScale, jF as maskId, jG as matchShellLanguage, jH as mediaFileName, jI as monotonePath, jJ as niceAxis, jK as niceMax, jL as openGlobalSearch, jM as parseHexColor, jN as polygonPoints, jO as popupBounds, jP as prompt, jQ as pushRecentSearch, jR as radiusScale, jS as readSavedShellLanguage, jT as registerModalEscapeInterceptor, jU as resolveBrandMarkTreatment, jV as resolveColumnShares, jW as resolveColumnWidths, jX as resolveCorners, jY as resolvePortalBrandAsset, jZ as resolveSeriesColor, j_ as resolveSeriesColorWithin, j$ as resolveShellLanguage, k0 as resolveTheme, k1 as sanitizeRecentSearches, k2 as saveShellLanguage, k3 as seriesColor, k4 as severityOf, k5 as solidSurfaceStyle, k6 as splinePath, k7 as squarify, k8 as stagger, k9 as stepPath, ka as tabButtonId, kb as tabPanelId, kc as textToolbarRows, kd as textToolbarWindowColumns, ke as toDateKey, kf as toDayMs, kg as toISODate, kh as toast, ki as toggleSeriesSlot, kj as useAppUpdate, kk as useClickOutside, kl as useConfirm, km as useContextMenu, kn as useDebouncedValue, ko as useDropdownPosition, kp as useFocusTrap, kq as useHighlight, kr as useIsMobile, ks as useLocalStoragePrefs, kt as usePlotWidth, ku as usePortalBranding, kv as useProductionTimeline, kw as useScrollLock, kx as useShellLanguage, ky as useShellPrefs, kz as useStatusLabel, kA as useTheme, kB as useTransferProgress } from '../index-DxgxE97i.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,CORNERS_FOR_THEME,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,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,TextToolbar,Textarea_default as Textarea,TileButton_default as TileButton,TimeAgo,TimePicker_default as TimePicker,TimeSeriesChart,TimelineTrack,Title,TopNav,TransferProgress,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,cornersFor,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,textToolbarRows,textToolbarWindowColumns,toKey as toDateKey,toDayMs,toISODate,toggleSeriesSlot,useAppUpdate,useClickOutside,useContextMenu,useDebouncedValue,useHighlight,usePlotWidth,usePortalBranding,useProductionTimeline,useStatusLabel,useTheme,useTransferProgress}from"../chunk-R7BUE34N.js";export{Breadcrumbs}from"../chunk-XDM6YBBX.js";export{EditableGrid}from"../chunk-Z756FAL6.js";import"../chunk-BR22X7E5.js";import"../chunk-RYBDLJJV.js";export{INPUT_BASE,INPUT_SIZES,PLACEHOLDER_INK,inputClasses}from"../chunk-HJQAE6SP.js";export{ResizeHandle,SidebarLayout}from"../chunk-BDXFODVC.js";export{ENGLISH,SHELL_LANGUAGE_STORAGE_KEY,ShellLanguageProvider,matchShellLanguage,readSavedShellLanguage,resolveShellLanguage,saveShellLanguage,useShellLanguage}from"../chunk-2ECESCBH.js";export{BrandMark,GlobalSearch,IconButton_default as IconButton,openGlobalSearch,pushRecent as pushRecentSearch,resolveBrandMarkTreatment,sanitizeRecent as sanitizeRecentSearches}from"../chunk-6YNWFATP.js";export{ICON_NAMES,ICON_SET_FOR_THEME,THEME_ICON_SETS,iconSetFor,isIconName,loadIconSet}from"../chunk-XT7UUKFA.js";export{isSafeLinkHref}from"../chunk-PJPK2ADX.js";export{UNDOABLE_MS,toast_default as toast}from"../chunk-BTLM7W6P.js";export{VERSION}from"../chunk-QK67IFHD.js";export{ALT,ALT_SHIFT_D,ALT_SHIFT_E,ALT_SHIFT_N,CMD_A,CMD_DOT,CMD_ENTER,CMD_K,CMD_S,ENTER,Kbd,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-5MKWCHMD.js";import"../chunk-KNUR2UEG.js";export{ConfirmProvider,Dialog,confirm,confirmDestructive,prompt,useConfirm,useFocusTrap,useScrollLock}from"../chunk-LTH3NJTS.js";import"../chunk-5A7MWTXX.js";export{LoadingSpinner}from"../chunk-NVFKXL52.js";export{PopupMenu,PopupMenuDivider,PopupMenuItem,PopupMenuLabel,PopupSubmenu,leavesContextMenuAlone}from"../chunk-AEJQC7GF.js";import"../chunk-UVBK6YSR.js";export{Button_default as Button}from"../chunk-XZXMVACA.js";export{MENU_MAX_HEIGHT,POPUP_MAX_WIDTH,Tooltip,popupBounds,useDropdownPosition}from"../chunk-WOZ36LPR.js";export{GLASS_DIVIDER,glassStyle,solidSurfaceStyle}from"../chunk-7IQ3B77H.js";export{OVERLAY_OPEN_EVENT,Z_LAYERS,dismissPopups,registerModalEscapeInterceptor}from"../chunk-FIEA5CGB.js";export{buttonClasses,iconButtonClasses}from"../chunk-K7PQXJO7.js";import"../chunk-D65T4H6J.js";export{Icon,activeIconSet,iconSets,iconsVersion,registerIconSet,registerIcons,resolveIcon,setDefaultIconSet,setIconSet,subscribeIcons}from"../chunk-KMSAHFLP.js";export{FileIntakeAlert,acceptsFile,useFileIntake}from"../chunk-DFCTQOIL.js";export{DEFAULT_SHELL_STRINGS,ShellStringsProvider,useShellLocale,useShellStrings}from"../chunk-2PNYIWIN.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";
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,CORNERS_FOR_THEME,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,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,TextToolbar,Textarea_default as Textarea,TileButton_default as TileButton,TimeAgo,TimePicker_default as TimePicker,TimeSeriesChart,TimelineTrack,Title,TopNav,TransferProgress,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,cornersFor,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,textToolbarRows,textToolbarWindowColumns,toKey as toDateKey,toDayMs,toISODate,toggleSeriesSlot,useAppUpdate,useClickOutside,useContextMenu,useDebouncedValue,useHighlight,usePlotWidth,usePortalBranding,useProductionTimeline,useStatusLabel,useTheme,useTransferProgress}from"../chunk-3R4JBAS5.js";export{Breadcrumbs}from"../chunk-XDM6YBBX.js";export{EditableGrid}from"../chunk-Z756FAL6.js";import"../chunk-BR22X7E5.js";import"../chunk-RYBDLJJV.js";export{INPUT_BASE,INPUT_SIZES,PLACEHOLDER_INK,inputClasses}from"../chunk-HJQAE6SP.js";export{ResizeHandle,SidebarLayout}from"../chunk-BDXFODVC.js";export{ENGLISH,SHELL_LANGUAGE_STORAGE_KEY,ShellLanguageProvider,matchShellLanguage,readSavedShellLanguage,resolveShellLanguage,saveShellLanguage,useShellLanguage}from"../chunk-2ECESCBH.js";export{BrandMark,GlobalSearch,IconButton_default as IconButton,openGlobalSearch,pushRecent as pushRecentSearch,resolveBrandMarkTreatment,sanitizeRecent as sanitizeRecentSearches}from"../chunk-QJYJB6OG.js";export{ICON_NAMES,ICON_SET_FOR_THEME,THEME_ICON_SETS,iconSetFor,isIconName,loadIconSet}from"../chunk-KIFCFIIN.js";export{isSafeLinkHref}from"../chunk-PJPK2ADX.js";export{UNDOABLE_MS,toast_default as toast}from"../chunk-5LJVYLU6.js";export{VERSION}from"../chunk-KVX57LJZ.js";export{ALT,ALT_SHIFT_D,ALT_SHIFT_E,ALT_SHIFT_N,CMD_A,CMD_DOT,CMD_ENTER,CMD_K,CMD_S,ENTER,Kbd,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-5MKWCHMD.js";import"../chunk-KNUR2UEG.js";export{ConfirmProvider,Dialog,confirm,confirmDestructive,prompt,useConfirm,useFocusTrap,useScrollLock}from"../chunk-LTH3NJTS.js";import"../chunk-5A7MWTXX.js";export{PopupMenu,PopupMenuDivider,PopupMenuItem,PopupMenuLabel,PopupSubmenu,leavesContextMenuAlone}from"../chunk-AEJQC7GF.js";import"../chunk-UVBK6YSR.js";export{Button_default as Button}from"../chunk-LU2DSEAL.js";export{MENU_MAX_HEIGHT,POPUP_MAX_WIDTH,Tooltip,popupBounds,useDropdownPosition}from"../chunk-WOZ36LPR.js";export{GLASS_DIVIDER,glassStyle,solidSurfaceStyle}from"../chunk-7IQ3B77H.js";export{OVERLAY_OPEN_EVENT,Z_LAYERS,dismissPopups,registerModalEscapeInterceptor}from"../chunk-FIEA5CGB.js";export{buttonClasses,iconButtonClasses}from"../chunk-K7PQXJO7.js";import"../chunk-D65T4H6J.js";export{Icon,activeIconSet,iconSets,iconsVersion,registerIconSet,registerIcons,resolveIcon,setDefaultIconSet,setIconSet,subscribeIcons}from"../chunk-KMSAHFLP.js";export{FileIntakeAlert,acceptsFile,useFileIntake}from"../chunk-DFCTQOIL.js";export{DEFAULT_SHELL_STRINGS,ShellStringsProvider,useShellLocale,useShellStrings}from"../chunk-2PNYIWIN.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{LoadingSpinner,SpinnerRing}from"../chunk-2J6F4EE7.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efficient-shell",
3
- "version": "7.31.1",
3
+ "version": "7.33.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,29 +0,0 @@
1
- import{loadAppearance as e,WidgetSettingsModal as t}from"./chunk-ZX5MQM4I.js";import{useWidgetSettings as n}from"./chunk-HTHLFM24.js";import"./chunk-E5DFGCAL.js";import"./chunk-5MKWCHMD.js";import"./chunk-KNUR2UEG.js";import"./chunk-LTH3NJTS.js";import"./chunk-DSSLOQDW.js";import"./chunk-5A7MWTXX.js";import"./chunk-NVFKXL52.js";import"./chunk-AEJQC7GF.js";import"./chunk-UVBK6YSR.js";import"./chunk-XZXMVACA.js";import"./chunk-WOZ36LPR.js";import"./chunk-7IQ3B77H.js";import"./chunk-FIEA5CGB.js";import"./chunk-K7PQXJO7.js";import"./chunk-D65T4H6J.js";import{Icon as r}from"./chunk-KMSAHFLP.js";import"./chunk-2PNYIWIN.js";import"./chunk-C3QOHMR6.js";import{useState as l,useRef as c,useCallback as i,useEffect as a}from"react";import{jsxs as o,Fragment as s,jsx as u}from"react/jsx-runtime";var h="calc_appearance";function d(){const[d,m]=l("0"),[k,b]=l(null),[p,g]=l(null),[N,y]=l(!1),[x,f]=l(""),[v,C]=l([]),[$,j]=l(!1),[w,E]=l(()=>e(h)),[S,A]=l(!1),[F,T]=l(w),L=c(null);n(i(()=>{T({...w}),A(!0)},[w]));const M=i(e=>{f(""),m(t=>N||"0"===t?(y(!1),"."===e?"0.":e):"."===e&&t.includes(".")?t:t+e)},[N]),W=i(()=>{m("0"),b(null),g(null),y(!1)},[]),H=i((e,t,n)=>{switch(n){case"+":return e+t;case"-":return e-t;case"×":return e*t;case"÷":return 0===t?0:e/t;default:return t}},[]),X=i(e=>{const t=parseFloat(d);if(null!==k&&p&&!N){const e=H(k,t,p);m(String(e)),b(e),C(n=>[`${k} ${p} ${t} = ${e}`,...n].slice(0,20))}else b(t);g(e),y(!0)},[d,k,p,N,H]),D=i(()=>{if(null===k||!p)return;const e=parseFloat(d),t=H(k,e,p),n=`${k} ${p} ${e} =`;C(e=>[`${n} ${t}`,...e].slice(0,20)),f(n),m(String(t)),b(null),g(null),y(!0)},[d,k,p,H]),I=i(()=>{m(e=>String(parseFloat(e)/100))},[]),B=i(()=>{m(e=>e.startsWith("-")?e.slice(1):"0"===e?e:"-"+e)},[]);a(()=>{const e=e=>{const t=e.target.tagName;"INPUT"!==t&&"TEXTAREA"!==t&&"SELECT"!==t&&(e.key>="0"&&e.key<="9"?M(e.key):"."===e.key?M("."):"+"===e.key?X("+"):"-"===e.key?X("-"):"*"===e.key?X("×"):"/"===e.key?(e.preventDefault(),X("÷")):"Enter"===e.key||"="===e.key?("Enter"===e.key&&e.target instanceof Node&&L.current?.contains(e.target)&&e.preventDefault(),D()):"Escape"===e.key?W():"Backspace"===e.key?m(e=>e.length>1?e.slice(0,-1):"0"):"%"===e.key&&I())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[M,X,D,W,I]);const K="flex items-center justify-center rounded-lg text-sm font-medium transition-colors",O=`${K} bg-white border border-gray-200 text-gray-900 hover:bg-gray-50 active:bg-gray-100`,Q=`${K} bg-blue-50 border border-blue-200 text-blue-700 hover:bg-blue-100 active:bg-blue-200`,J=`${K} bg-gray-100 border border-gray-200 text-gray-600 hover:bg-gray-200 active:bg-gray-300`,P=`${K} bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800`;/* @__PURE__ */
2
- return o(s,{children:[
3
- /* @__PURE__ */o("div",{ref:L,className:"flex flex-col h-full",style:{opacity:w.activeOpacity/100,backdropFilter:w.activeBlur>0?`blur(${w.activeBlur}px)`:void 0},children:[
4
- /* @__PURE__ */o("div",{className:"bg-slate-200 rounded-t-lg px-4 py-2 group/display relative flex flex-col justify-end min-h-[120px] border-b border-slate-300",children:[
5
- /* @__PURE__ */u("div",{className:"flex flex-col justify-end flex-1 overflow-hidden",children:v.slice(0,3).reverse().map((e,t)=>/* @__PURE__ */u("div",{className:"text-2xs text-slate-400 text-right font-mono truncate",children:e},t))}),(x||p&&null!==k)&&/* @__PURE__ */u("div",{className:"text-base text-slate-600 text-right font-mono",children:x||`${k} ${p} ${N?"":d}`}),
6
- /* @__PURE__ */o("div",{className:"flex items-center gap-2",children:[
7
- /* @__PURE__ */u("button",{onClick:()=>{navigator.clipboard.writeText(d),j(!0),setTimeout(()=>j(!1),1200)},title:"Copy result",className:"shrink-0 text-slate-300 hover:text-slate-500 transition-colors opacity-0 group-hover/display:opacity-100",children:/* @__PURE__ */u(r,$?{name:"check",className:"h-5 w-5 text-green-500",strokeWidth:2}:{name:"copy",className:"h-5 w-5",strokeWidth:2})}),
8
- /* @__PURE__ */u("div",{className:"text-right text-4xl font-mono font-bold text-slate-800 truncate flex-1",children:(e=>{const t=parseFloat(e);return isNaN(t)||e.endsWith(".")||e.endsWith(".0")||Math.abs(t)<1e15&&e.length<16?e:t.toExponential(6)})(d)})]})]}),
9
- /* @__PURE__ */o("div",{className:"grid grid-cols-4 grid-rows-5 gap-2 flex-1 min-h-0 p-2",children:[
10
- /* @__PURE__ */u("button",{onClick:W,className:J,children:"AC"}),
11
- /* @__PURE__ */u("button",{onClick:B,className:J,children:"+/−"}),
12
- /* @__PURE__ */u("button",{onClick:I,className:J,children:"%"}),
13
- /* @__PURE__ */u("button",{onClick:()=>X("÷"),className:`${Q} ${"÷"===p?"ring-2 ring-blue-400":""}`,children:"÷"}),
14
- /* @__PURE__ */u("button",{onClick:()=>M("7"),className:O,children:"7"}),
15
- /* @__PURE__ */u("button",{onClick:()=>M("8"),className:O,children:"8"}),
16
- /* @__PURE__ */u("button",{onClick:()=>M("9"),className:O,children:"9"}),
17
- /* @__PURE__ */u("button",{onClick:()=>X("×"),className:`${Q} ${"×"===p?"ring-2 ring-blue-400":""}`,children:"×"}),
18
- /* @__PURE__ */u("button",{onClick:()=>M("4"),className:O,children:"4"}),
19
- /* @__PURE__ */u("button",{onClick:()=>M("5"),className:O,children:"5"}),
20
- /* @__PURE__ */u("button",{onClick:()=>M("6"),className:O,children:"6"}),
21
- /* @__PURE__ */u("button",{onClick:()=>X("-"),className:`${Q} ${"-"===p?"ring-2 ring-blue-400":""}`,children:"−"}),
22
- /* @__PURE__ */u("button",{onClick:()=>M("1"),className:O,children:"1"}),
23
- /* @__PURE__ */u("button",{onClick:()=>M("2"),className:O,children:"2"}),
24
- /* @__PURE__ */u("button",{onClick:()=>M("3"),className:O,children:"3"}),
25
- /* @__PURE__ */u("button",{onClick:()=>X("+"),className:`${Q} ${"+"===p?"ring-2 ring-blue-400":""}`,children:"+"}),
26
- /* @__PURE__ */u("button",{onClick:()=>M("0"),className:`${O} col-span-2`,children:"0"}),
27
- /* @__PURE__ */u("button",{onClick:()=>M("."),className:O,children:"."}),
28
- /* @__PURE__ */u("button",{onClick:D,className:P,children:"="})]})]}),
29
- /* @__PURE__ */u(t,{open:S,onClose:()=>A(!1),title:"Calculator Settings",appearance:F,onAppearanceChange:T,onSave:()=>{E(F),localStorage.setItem(h,JSON.stringify(F)),A(!1)}})]})}export{d as default};
@@ -1 +0,0 @@
1
- export{PdfViewer as default,fitScale,pdfWasmParams}from"./chunk-7VJ3J7EH.js";import"./chunk-BTLM7W6P.js";import"./chunk-NVFKXL52.js";import"./chunk-K7PQXJO7.js";import"./chunk-KMSAHFLP.js";import"./chunk-2PNYIWIN.js";import"./chunk-C3QOHMR6.js";
@@ -1,44 +0,0 @@
1
- import{useAuth as e,parseOpenSections as t,readStored as a,RAIL_OPEN_SECTIONS_KEY as r,toggleOpenSection as n,writeStored as i}from"./chunk-S2PS4IOT.js";import{partitionNav as l,BrandMark as s,IconButton_default as o,openGlobalSearch as c,visibleNavChildren as d,visibleSectionItems as m,rowsContainRoute as h}from"./chunk-6YNWFATP.js";import{navSections as u,startMenuCategories as p,TAB_STRIP_H as b,navIcons as g,sectionIcons as f}from"./chunk-DSSLOQDW.js";import"./chunk-5A7MWTXX.js";import"./chunk-NVFKXL52.js";import{PopupMenu as y,PopupMenuItem as x,PopupMenuDivider as N}from"./chunk-AEJQC7GF.js";import"./chunk-UVBK6YSR.js";import"./chunk-WOZ36LPR.js";import"./chunk-7IQ3B77H.js";import"./chunk-FIEA5CGB.js";import"./chunk-K7PQXJO7.js";import"./chunk-D65T4H6J.js";import{Icon as v}from"./chunk-KMSAHFLP.js";import{useShellStrings as k}from"./chunk-2PNYIWIN.js";import"./chunk-C3QOHMR6.js";import{useMemo as C,useState as w,useRef as j,useEffect as S,isValidElement as A,cloneElement as L}from"react";import{jsx as z,jsxs as W,Fragment as I}from"react/jsx-runtime";var $="undefined"!=typeof navigator&&/Mac|iPhone|iPad/.test(navigator.platform),K=(e,t)=>["flex h-(--row-height-menu) w-full items-center gap-3 rounded-md px-3 text-left text-sm font-medium transition-colors",t?"justify-center px-0":"",e?"bg-gray-100 text-gray-900":"text-gray-600 hover:bg-gray-100 hover:text-gray-900"].join(" "),M="flex size-[18px] shrink-0 items-center justify-center [&>svg]:size-[18px]";function P({open:e}){/* @__PURE__ */
2
- return z(v,{name:"chevron-down",className:"size-4 shrink-0 transition-transform "+(e?"rotate-180":""),strokeWidth:2,"aria-hidden":"true"})}function T({dir:e}){/* @__PURE__ */
3
- return z(v,"left"===e?{name:"chevron-double-left",className:"size-[18px]",strokeWidth:1.5,"aria-hidden":"true"}:{name:"chevron-double-right",className:"size-[18px]",strokeWidth:1.5,"aria-hidden":"true"})}function O({className:e}){/* @__PURE__ */
4
- return z(v,{name:"search",className:e,strokeWidth:2,"aria-hidden":"true"})}function R({width:R,collapsed:B,onToggleCollapsed:H,onOpen:_,activeRoute:D,profile:F,user:Q,onLogout:J,onSwitchToDesktop:X,onReportBug:Y,onClose:E,navSections:G=u,navIcons:U=g,sectionIcons:V=f,categories:Z=p,productName:q,productIcon:ee,tagline:te,adaptiveLogo:ae=!1,logoHasAlpha:re=null,logoIsLight:ne=null}){const ie=k().layout,{hasAnyPerm:le}=e(),se=C(()=>l(G,Z,le),[G,Z,le]),[oe,ce]=w(()=>t(a(r))),de=e=>ce(t=>{const a=n(t,e);return i(r,JSON.stringify([...a])),a}),[me,he]=w(null),[ue,pe]=w(!1),be=j(null);S(()=>{B||he(null)},[B]);const ge=(e,t)=>{he(null),e.onSelect?e.onSelect():_(e.to,!!t&&(e=>e.metaKey||e.ctrlKey||1===e.button)(t))},fe=(e,t)=>{const a=t[e];/* @__PURE__ */
5
- return z("span",{className:M,"aria-hidden":"true",children:a&&A(a)?L(a,{className:"size-[18px]"}):a})},ye=(e,t)=>{const a=d(e,le),r=e.menuLabel??e.label;if(a.length>0){const n=`child:${e.to}`,i=oe.has(n),l=!i&&h(a,D,le);/* @__PURE__ */
6
- return W("div",{children:[
7
- /* @__PURE__ */W("button",{type:"button",onClick:()=>de(n),"aria-expanded":i,className:K(l,!1),style:t>0?{paddingLeft:.75+1.75*t+"rem"}:void 0,children:[0===t&&fe(e.to,U),
8
- /* @__PURE__ */z("span",{className:"min-w-0 flex-1 truncate",children:r}),
9
- /* @__PURE__ */z(P,{open:i})]}),i&&/* @__PURE__ */z("div",{className:"space-y-0.5 pt-0.5",children:a.map(e=>ye(e,t+1))}),e.dividerAfter&&/* @__PURE__ */z("div",{className:"mx-2 my-2 border-t border-gray-200","aria-hidden":"true"})]},e.to)}const n=e.to===D;/* @__PURE__ */
10
- return W("div",{children:[
11
- /* @__PURE__ */W("button",{type:"button",onClick:t=>ge(e,t),onAuxClick:t=>{1===t.button&&ge(e,t)},"aria-current":n?"page":void 0,className:K(n,!1),style:t>0?{paddingLeft:.75+1.75*t+"rem"}:void 0,children:[0===t&&fe(e.to,U),
12
- /* @__PURE__ */z("span",{className:"min-w-0 flex-1 truncate",children:r})]}),e.dividerAfter&&/* @__PURE__ */z("div",{className:"mx-2 my-2 border-t border-gray-200","aria-hidden":"true"})]},e.to)},xe=(e,t)=>{const a=t?e.items:m(e,le);if(0===a.length)return null;const r="icon"in e&&e.icon?/* @__PURE__ */z("span",{className:M,"aria-hidden":"true",children:e.icon}):fe(e.label,V),n=e.menuLabel??e.label,i=h(a,D,le),l="dividerAfter"in e&&e.dividerAfter;if(B)/* @__PURE__ */
13
- return W("div",{children:[
14
- /* @__PURE__ */z("button",{type:"button",title:n,"aria-label":n,"aria-haspopup":"menu","aria-expanded":me?.label===e.label,onClick:t=>{const r=t.currentTarget.getBoundingClientRect();he(t=>t?.label===e.label?null:{label:e.label,items:a,top:r.top})},className:K(i||me?.label===e.label,!0),children:r}),l&&/* @__PURE__ */z("div",{className:"mx-2 my-2 border-t border-gray-200","aria-hidden":"true"})]},e.label);const s=oe.has(e.label),o=`rosh-rail-${e.label.replace(/[^a-z0-9]+/gi,"-").toLowerCase()}`;/* @__PURE__ */
15
- return W("div",{children:[
16
- /* @__PURE__ */W("button",{type:"button",onClick:()=>de(e.label),"aria-expanded":s,"aria-controls":o,className:K(!s&&i,!1),children:[r,
17
- /* @__PURE__ */z("span",{className:"min-w-0 flex-1 truncate",children:n}),
18
- /* @__PURE__ */z(P,{open:s})]}),
19
- /* @__PURE__ */z("div",{id:o,role:"group","aria-label":n,hidden:!s,className:"space-y-0.5 pt-0.5",children:s&&a.map(e=>ye(e,1))}),l&&/* @__PURE__ */z("div",{className:"mx-2 my-2 border-t border-gray-200","aria-hidden":"true"})]},e.label)},Ne=F?.first_name?`${F.first_name} ${F.last_name||""}`.trim():Q?.email||"",ve=(F?.first_name?.charAt(0)||Q?.email?.charAt(0)||"?").toUpperCase(),ke=F?.avatar_url?/* @__PURE__ */z("img",{src:F.avatar_url,alt:"",className:"size-8 shrink-0 rounded-full object-cover"}):/* @__PURE__ */z("span",{className:"flex size-8 shrink-0 items-center justify-center rounded-full bg-blue-600 text-xs font-semibold text-white",children:ve}),Ce=ue?be.current?.getBoundingClientRect():void 0,we="px-3",je=se.erpSections.length>0||se.systemSections.length>0||se.virtualSections.length>0;/* @__PURE__ */
20
- return W("aside",{"aria-label":ie.navLabel,className:"fixed left-0 top-0 z-(--z-sidebar) flex h-dvh flex-col border-r border-gray-200 bg-white text-gray-800",style:{width:R},children:[
21
- /* @__PURE__ */W("div",{className:"flex shrink-0 items-center border-b border-gray-200 "+(B?"justify-center":"justify-between gap-2 pl-4 pr-2"),style:{height:b},children:[
22
- /* @__PURE__ */W("span",{className:"flex min-w-0 items-center gap-2",children:[ee&&/* @__PURE__ */z(s,{src:ee,alt:"",slot:"compact",surface:"light",adaptive:ae,hasAlpha:re,isLight:ne,size:28,decorative:!0}),!B&&/* @__PURE__ */W("span",{className:"min-w-0 leading-tight",children:[
23
- /* @__PURE__ */z("span",{className:"block truncate text-base font-bold tracking-wide text-gray-900",children:q??"Apps"}),te&&/* @__PURE__ */z("span",{className:"block truncate text-2xs font-medium text-gray-500",children:te})]})]}),E?/* @__PURE__ */z(o,{onClick:E,"aria-label":ie.closeMenu,children:/* @__PURE__ */z(v,{name:"close",className:"size-[18px]",strokeWidth:1.5,"aria-hidden":"true"})}):!B&&/* @__PURE__ */z("button",{type:"button",onClick:H,"aria-label":ie.collapseSidebar,title:`${ie.collapseSidebar} (${$?"⌘":"Ctrl"} .)`,className:"flex size-8 shrink-0 items-center justify-center rounded-md text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-900",children:/* @__PURE__ */z(T,{dir:"left"})})]}),
24
- /* @__PURE__ */z("div",{className:`shrink-0 pt-3 ${we}`,children:B?/* @__PURE__ */z("button",{type:"button",onClick:c,"aria-label":ie.search,title:`${ie.search} (${$?"⌘K":"Ctrl K"})`,className:K(!1,!0),children:/* @__PURE__ */z(O,{className:"size-[18px]"})}):/* @__PURE__ */W("button",{type:"button",onClick:c,className:"flex h-(--row-height-menu) w-full items-center gap-2 rounded-md border border-gray-200 bg-white px-3 text-left transition-colors hover:bg-gray-100",children:[
25
- /* @__PURE__ */z(O,{className:"size-3.5 text-gray-500"}),
26
- /* @__PURE__ */z("span",{className:"min-w-0 flex-1 truncate text-sm text-gray-500",children:ie.search}),
27
- /* @__PURE__ */z("kbd",{className:"rounded border border-gray-200 bg-gray-100 px-2 py-0.5 font-mono text-2xs font-semibold text-gray-500",children:$?"⌘K":"Ctrl K"})]})}),
28
- /* @__PURE__ */W("nav",{"aria-label":ie.navLabel,className:`min-h-0 flex-1 overflow-y-auto pb-4 pt-3 ${we} ${B?"space-y-1":"space-y-0.5"}`,children:[B&&/* @__PURE__ */z("button",{type:"button",onClick:H,"aria-label":ie.expandSidebar,title:`${ie.expandSidebar} (${$?"⌘":"Ctrl"} .)`,className:`${K(!1,!0)} mb-3`,children:/* @__PURE__ */z(T,{dir:"right"})}),se.topItems.map(e=>{if(!B)return ye(e,0);const t=d(e,le),a=e.to===D||h(t,D,le),r=e.menuLabel??e.label;/* @__PURE__ */
29
- return W("div",{children:[
30
- /* @__PURE__ */z("button",{type:"button",title:r,"aria-label":r,onClick:a=>{if(0===t.length)return void ge(e,a);const r=a.currentTarget.getBoundingClientRect();he(a=>a?.label===e.to?null:{label:e.to,items:t,top:r.top})},className:K(a,!0),children:fe(e.to,U)}),e.dividerAfter&&/* @__PURE__ */z("div",{className:"mx-2 my-2 border-t border-gray-200","aria-hidden":"true"})]},e.to)}),se.topItems.length>0&&je&&!se.topItems[se.topItems.length-1].dividerAfter&&/* @__PURE__ */z("div",{className:"mx-2 my-2 border-t border-gray-200","aria-hidden":"true"}),se.erpSections.map(e=>xe(e,!1)),se.systemSections.map(e=>xe(e,!1)),se.virtualSections.map(e=>xe(e,!0)),se.footerSections.length>0&&/* @__PURE__ */z("div",{className:"mx-2 my-2 border-t border-gray-200","aria-hidden":"true"}),se.footerSections.map(e=>xe(e,!1))]}),
31
- /* @__PURE__ */z("div",{className:`shrink-0 border-t border-gray-200 py-2 ${we}`,children:/* @__PURE__ */W("button",{ref:be,type:"button",onClick:()=>pe(e=>!e),"aria-haspopup":"menu","aria-expanded":ue,"aria-label":B?ie.accountMenu(Ne):void 0,className:"flex w-full items-center gap-3 rounded-md hover:bg-gray-100 "+(B?"justify-center py-2":"px-2 py-2"),children:[ke,!B&&/* @__PURE__ */W("span",{className:"min-w-0 flex-1 text-left",children:[
32
- /* @__PURE__ */z("span",{className:"block truncate text-sm font-semibold text-gray-800",children:Ne}),Q?.email&&Ne!==Q.email&&/* @__PURE__ */z("span",{className:"block truncate text-2xs text-gray-500",children:Q.email})]})]})}),ue&&Ce&&/* @__PURE__ */W(y,{portal:!0,minWidth:224,onClose:()=>pe(!1),style:{left:Ce.left,bottom:window.innerHeight-Ce.top+8},children:[B&&/* @__PURE__ */W("div",{className:"border-b border-gray-200 px-3 py-3",children:[
33
- /* @__PURE__ */z("p",{className:"truncate text-sm font-semibold text-gray-800",children:Ne}),Q?.email&&/* @__PURE__ */z("p",{className:"truncate text-xs text-gray-500",children:Q.email})]}),
34
- /* @__PURE__ */W(x,{onClick:()=>{pe(!1),_("/profile",!1)},children:[
35
- /* @__PURE__ */z(v,{name:"account",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ie.profile]}),se.footerItems.map(e=>/* @__PURE__ */W(x,{onClick:()=>{pe(!1),ge(e)},children:[
36
- /* @__PURE__ */z("span",{className:"h-4 w-4 [&>svg]:size-4","aria-hidden":"true",children:U[e.to]}),e.menuLabel??e.label]},e.to)),Y&&/* @__PURE__ */W(x,{onClick:()=>{pe(!1),Y()},children:[
37
- /* @__PURE__ */z(v,{name:"error",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ie.reportIssue]}),
38
- /* @__PURE__ */z(N,{}),X&&/* @__PURE__ */W(I,{children:[
39
- /* @__PURE__ */W(x,{onClick:()=>{pe(!1),X()},children:[
40
- /* @__PURE__ */z(v,{name:"desktop",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ie.switchToDesktop]}),
41
- /* @__PURE__ */z(N,{})]}),
42
- /* @__PURE__ */W(x,{danger:!0,onClick:()=>{pe(!1),J()},children:[
43
- /* @__PURE__ */z(v,{name:"logout",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ie.signOut]})]}),me&&B&&/* @__PURE__ */z(y,{portal:!0,minWidth:220,onClose:()=>he(null),style:{left:R+6,top:Math.min(me.top,window.innerHeight-48*Math.min(me.items.length,10)-16)},children:me.items.flatMap(e=>{const t=d(e,le);return(t.length>0?t:[e]).map(e=>/* @__PURE__ */W(x,{onClick:()=>ge(e),children:[fe(e.to,U),
44
- /* @__PURE__ */z("span",{className:e.to===D?"font-semibold":"",children:e.menuLabel??e.label})]},e.to))})})]})}export{R as default};
@@ -1,27 +0,0 @@
1
- import{navVisible as e,isReachable as t,visibleChildren as r,isSection as n}from"./chunk-5A7MWTXX.js";import{LoadingSpinner as a}from"./chunk-NVFKXL52.js";import{useDismissPopupsOnOpen as s}from"./chunk-UVBK6YSR.js";import{isAriaDisabled as l,swallowPress as o,describedByWith as i,OffWithReason as c}from"./chunk-WOZ36LPR.js";import{glassStyle as d}from"./chunk-7IQ3B77H.js";import{Z_LAYERS as u}from"./chunk-FIEA5CGB.js";import{iconButtonClasses as p}from"./chunk-K7PQXJO7.js";import{useShellStrings as y}from"./chunk-2PNYIWIN.js";import{forwardRef as f,useId as m,useState as h,useEffect as b,useRef as g,useMemo as k,useCallback as v}from"react";import{jsx as x,jsxs as w}from"react/jsx-runtime";import{createPortal as N}from"react-dom";var L=f(function({children:e,variant:t="ghost",size:r="md",type:n="button",className:a="",pressed:s,disabledReason:d,ink:u,disabled:y,onClick:f,"aria-disabled":h,"aria-describedby":b,...g},k){const v=m(),w=(Boolean(y)||l(h))&&null!=d&&""!==d,N=w||l(h),L=/* @__PURE__ */x("button",{ref:k,type:n,className:p({variant:t,size:r,pressed:s??(!0===g["aria-pressed"]||"true"===g["aria-pressed"]),ink:u,className:a}),...g,disabled:w?void 0:y,"aria-disabled":!!N||h,"aria-describedby":i(b,w?v:void 0),onClick:N?o:f,children:e});return w?/* @__PURE__ */x(c,{reason:d,id:v,children:L}):L}),_={favicon:"h-8 w-8",compact:"h-10 w-10",wordmark:"h-10 w-40"};function A(e){return e.trim().charAt(0).toLocaleUpperCase()||"·"}function C(e,t,r){return!1===e?"framed":null==e||null==t?"plate-light":t?"light"===r?"plate-dark":"bare":"dark"===r?"plate-light":"bare"}var I={"plate-light":"bg-white shadow-[0_2px_12px_var(--rosh-mark-plate-shadow)]","plate-dark":"bg-neutral-900 shadow-[0_2px_12px_var(--rosh-mark-plate-shadow-strong)]",framed:"border border-black/10 shadow-[0_2px_12px_var(--rosh-mark-plate-shadow)]",bare:""};function $(e,t,r){return"bare"===e?{}:"framed"===e?{borderRadius:t}:{borderRadius:t,padding:r}}function E({src:e,fallbackSrc:t,fallbackHasAlpha:r=null,fallbackIsLight:n=null,fallbackAdaptive:a,alt:s,slot:l="compact",surface:o="light",size:i,width:c,height:d,decorative:u=!1,fallbackMode:p="monogram",adaptive:y=!1,hasAlpha:f=null,isLight:m=null,treatmentPadding:g=4,treatmentRadius:k=8,className:v="",style:w}){const[N,L]=h(e||t||"");b(()=>{L(e||t||"")},[e,t]);const E=Boolean(t&&N===t&&N!==e),j=(E?a??y:y)?C(E?r:f,E?n:m,o):"bare",T=["inline-flex shrink-0 items-center justify-center overflow-hidden",null==i&&null==c&&null==d?_[l]:"","dark"===o?"text-white":"text-gray-700",I[j],v].filter(Boolean).join(" "),S={...$(j,k,g),...null==i?{width:c,height:d}:{width:i,height:i},...w};return N?/* @__PURE__ */x("span",{className:T,"data-brand-treatment":j,style:S,children:/* @__PURE__ */x("img",{src:N,alt:u?"":s,"data-brand-slot":l,className:"block max-h-full max-w-full",style:{objectFit:"contain"},onError:()=>L(e=>t&&e!==t?t:"")})}):"none"===p?null:/* @__PURE__ */x("span",{"data-brand-fallback":!0,"data-brand-slot":l,"aria-label":u?void 0:s,"aria-hidden":u||void 0,role:u?void 0:"img",className:`${T} rounded-md bg-gray-100 font-semibold`,style:S,children:u?null:A(s)})}function j(r,n){return e(r,n)?r.items.filter(r=>e(r,n)&&t(r,n)):[]}function T(e,n){return r(e,n).filter(e=>t(e,n))}function S(r,a,s){const l=new Set(a.erp),o=new Set(a.system),i=new Set(a.footer??[]),c=r.filter(n),d=e=>c.filter(t=>e.has(t.label)&&j(t,s).length>0);return{topItems:r.filter(e=>!n(e)).filter(r=>e(r,s)&&t(r,s)),erpSections:d(l),systemSections:d(o),virtualSections:(a.virtual??[]).filter(e=>e.items.length>0),footerSections:d(i),footerItems:(a.footerItems??[]).filter(r=>e(r,s)&&t(r,s))}}function M(e,t,r){return!!t&&e.some(e=>e.to===t||M(T(e,r),t,r))}var R="__page__";function K(e){const t=e.indexOf("?");if(t<0)return{path:e,search:""};const r=new URLSearchParams(e.slice(t+1));return{path:e.slice(0,t),search:r.get("search")??""}}function B(e,t,r){const n=function(e,t){const r=[],n=e=>{const a=T(e,t);0===a.length?r.push(e):a.forEach(n)};e.topItems.forEach(n);for(const r of[...e.erpSections,...e.systemSections,...e.footerSections])j(r,t).forEach(n);for(const t of e.virtualSections)t.items.forEach(n);return e.footerItems.forEach(n),r}(e,t);return Object.assign(async e=>{const t=e.trim().toLowerCase();if(!t)return[];const a=/* @__PURE__ */new Set,s=[];for(const e of n){const n=e.menuLabel??e.label;a.has(e.to)||!e.label.toLowerCase().includes(t)&&!n.toLowerCase().includes(t)||(a.add(e.to),s.push({type:r,label:e.label,entity_type:R,entity_id:e.to}))}return s.slice(0,8)},{destinations:n})}function P(e,t){if(!Array.isArray(e))return[];const r=[];for(const n of e){if(!n||"string"!=typeof n.entityType||"string"!=typeof n.entityId||"string"!=typeof n.label)continue;if("preview-file"===n.entityType)continue;const e="page"===n.entityType;r.push({type:e?t:"",label:n.label,entity_type:e?R:n.entityType,entity_id:n.entityId})}return r}var D="M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z";function z(e){return e.typeKey??e.type}function F(e,t){return t?.[z(e)]??e.type}function H(e,t,r){return 0===r.length?null:{key:e,title:t,rows:r.map((e,t)=>({kind:"action",key:`action:${t}:${e.label}`,label:e.label,icon:e.icon,action:e})),count:r.length}}function U(e,t,r,n){return{type:e,label:t,entity_type:R,entity_id:`${r}?search=${encodeURIComponent(n.trim())}`}}function W(e,t,r,n,a){const s=function(e){const t=/* @__PURE__ */new Map;for(const r of e){const e=z(r),n=t.get(e);n?n.results.push(r):t.set(e,{type:r.type,results:[r]})}return Array.from(t,([e,t])=>({key:e,...t}))}(e).map(e=>{const t=e.results.map((t,r)=>({kind:"result",key:`result:${e.key}:${t.entity_type}:${t.entity_id}:${r}`,label:t.label,sub:t.sub,result:t})),n=!!a?.truncatedTypes?.includes(e.key),s=n?a?.listRoutes?.[e.key]:void 0,l=a?.typeLabels?.[e.key]??e.type;if(a&&s){const n=a.seeAllLabel(s.label);t.push({kind:"seeAll",key:`seeall:${e.key}`,label:n,result:U(l,n,s.path,r)})}return{key:`type:${e.key}`,title:l,rows:t,count:e.results.length,truncated:n}}),l=H("actions",n,function(e,t){const r=t.trim().toLowerCase();return e&&r?e.filter(e=>e.label.toLowerCase().includes(r)||(e.keywords??[]).some(e=>e.toLowerCase().includes(r))):[]}(t,r));return l?[...s,l]:s}function O(e,t,r){return 0===r?0:Math.min(Math.max(e+t,0),r-1)}var X=(e,t)=>e.entity_type===t.entity_type&&e.entity_id===t.entity_id;function V(e,t,r=8){return[t,...e.filter(e=>!X(e,t))].slice(0,r)}function G(e){if(!Array.isArray(e))return[];const t=[];for(const r of e){if(!r||"object"!=typeof r)continue;const e=r;if("string"!=typeof e.type||"string"!=typeof e.label||"string"!=typeof e.entity_type||"string"!=typeof e.entity_id)continue;const n={type:e.type,label:e.label,entity_type:e.entity_type,entity_id:e.entity_id};"string"==typeof e.sub&&(n.sub=e.sub),"string"==typeof e.typeKey&&(n.typeKey=e.typeKey),t.some(e=>X(e,n))||t.push(n)}return t.slice(0,8)}function Q(e){if(Array.isArray(e))return{results:e,truncatedTypes:[]};if(e&&"object"==typeof e&&Array.isArray(e.results)){const{results:t,truncatedTypes:r}=e;return{results:t,truncatedTypes:Array.isArray(r)?r:[]}}return{results:[],truncatedTypes:[]}}var Y=[];function q(e,t,r){const[n,a]=h([]),[s,l]=h(Y),[o,i]=h(!1),[c,d]=h("none"),u=g(function(){let e=0,t=null;const r=()=>{e+=1,t?.abort(),t=null};return{begin:()=>{r();const n=e,a=new AbortController;return t=a,{signal:a.signal,isCurrent:()=>n===e}},cancel:r}}());b(()=>{const n=u.current;if(e.length<r||!t||0===t.length)return n.cancel(),a(e=>0===e.length?e:[]),l(Y),d("none"),void i(!1);i(!0);const s=setTimeout(async()=>{const r=n.begin(),s=await async function(e,t,r){const n=await Promise.all(e.map(async e=>{try{return{failed:!1,...Q(await e(t,{signal:r}))}}catch(e){const t=r.aborted||function(e){if(!e||"object"!=typeof e)return!1;const{name:t,code:r}=e;return"AbortError"===t||"CanceledError"===t||"ERR_CANCELED"===r}(e);return{failed:!t,results:[],truncatedTypes:[]}}}));return{results:n.flatMap(e=>e.results),truncatedTypes:Array.from(new Set(n.flatMap(e=>e.truncatedTypes))),failed:n.filter(e=>e.failed).length}}(t,e,r.signal);r.isCurrent()&&(a(s.results),l(s.truncatedTypes),d(0===s.failed?"none":s.failed>=t.length?"all":"some"),i(!1))},250);return()=>{clearTimeout(s),n.cancel()}},[e,t,r]);return{results:n,truncatedTypes:s,loading:o,failure:c,reset:v(()=>{u.current.cancel(),a(e=>0===e.length?e:[]),l(Y),d("none"),i(!1)},[])}}var J=(e,t)=>`${e}-opt-${t}`;function Z(e,t){if("seeAll"===e.kind)return"M13.5 4.5L21 12m0 0l-7.5 7.5M21 12H3";if("action"===e.kind)return e.icon??D;if(e.icon)return e.icon;const r=t?.[z(e.result)];return r||D}function ee({sections:e,activeIdx:t,listId:r,label:n,typeIcons:a,groupCount:s,groupLabel:l,onHover:o,onPick:i}){let c=0;/* @__PURE__ */
2
- return x("div",{id:r,role:"listbox","aria-label":n,className:"py-1",children:e.map(e=>/* @__PURE__ */w("div",{role:"group","aria-label":l(e.title,e.count,!!e.truncated),children:[
3
- /* @__PURE__ */w("div",{"aria-hidden":"true",className:"flex items-center justify-between px-4 pt-2 pb-1 text-2xs font-semibold uppercase tracking-wide text-gray-400",children:[
4
- /* @__PURE__ */x("span",{children:e.title}),
5
- /* @__PURE__ */x("span",{className:"font-medium normal-case tracking-normal",children:s(e.count,!!e.truncated)})]}),e.rows.map(e=>{const n=c++,s=n===t,l="action"===e.kind||"seeAll"===e.kind?void 0:e.badge,d="action"===e.kind||"seeAll"===e.kind?void 0:e.sub,u="seeAll"===e.kind;/* @__PURE__ */
6
- return w("div",{id:J(r,n),role:"option","aria-selected":s,className:"flex items-center gap-3 w-full px-4 py-3 text-left cursor-pointer transition-colors "+(s?"bg-blue-50":"hover:bg-gray-50"),onMouseDown:e=>e.preventDefault(),onClick:()=>i(e),onMouseEnter:()=>o(n),children:[
7
- /* @__PURE__ */x("svg",{className:"h-4 w-4 text-gray-400 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",children:/* @__PURE__ */x("path",{strokeLinecap:"round",strokeLinejoin:"round",d:Z(e,a)})}),
8
- /* @__PURE__ */w("div",{className:"flex-1 min-w-0",children:[
9
- /* @__PURE__ */x("p",{className:"text-sm font-medium truncate "+(u?"text-blue-600":"text-gray-900"),children:e.label}),d&&/* @__PURE__ */x("p",{className:"text-xs text-gray-400 truncate",children:d})]}),l&&/* @__PURE__ */x("span",{className:"shrink-0 rounded-full bg-gray-100 px-2 py-0.5 text-3xs font-medium text-gray-500",children:l})]},e.key)})]},e.key))})}var te="react-os-shell:open-global-search";function re(){"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent(te))}function ne({providers:e,typeIcons:t,typeLabels:r,listRoutes:n,placeholder:l,quickActions:o,onSelect:i,recent:c,onRecord:p,favorites:f,hotkey:L=!0}={}){const _=y().search,A=l??_.placeholder,[C,I]=h(!1),[$,E]=h(""),[j,T]=h(0),S=g(null),{results:M,truncatedTypes:R,loading:K,failure:B,reset:P}=q($,e,2);b(()=>{const e=e=>{L&&!e.defaultPrevented&&(e.ctrlKey||e.metaKey)&&"k"===e.key&&(e.preventDefault(),I(e=>!e)),"Escape"===e.key&&C&&I(!1)},t=()=>I(!0);return window.addEventListener("keydown",e),window.addEventListener(te,t),()=>{window.removeEventListener("keydown",e),window.removeEventListener(te,t)}},[C,L]),s(C);const[z,U]=h(!1);C!==z&&(U(C),C&&(E(""),T(0),P())),b(()=>{C?setTimeout(()=>S.current?.focus(),50):E("")},[C]),b(()=>{T(0)},[M]);const X=$.length>=2,V=k(()=>X?W(M,o,$,_.actions,{truncatedTypes:R,listRoutes:n,typeLabels:r,seeAllLabel:_.seeAll}):function(e,t){const r=[];e.recent?.length&&r.push({key:"recent",title:t.recent,rows:e.recent.map((t,r)=>({kind:"recent",key:`recent:${t.entity_type}:${t.entity_id}:${r}`,label:t.label,sub:t.sub,badge:F(t,e.typeLabels),result:t})),count:e.recent.length}),e.favorites?.length&&r.push({key:"favorites",title:t.favorites,rows:e.favorites.map((t,r)=>({kind:"favorite",key:`favorite:${t.entity_type}:${t.entity_id}:${r}`,label:t.label,sub:t.sub,badge:F(t,e.typeLabels)||void 0,icon:"M11.48 3.499a.562.562 0 011.04 0l2.125 5.111a.563.563 0 00.475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 00-.182.557l1.285 5.385a.562.562 0 01-.84.61l-4.725-2.885a.563.563 0 00-.586 0L6.982 20.54a.562.562 0 01-.84-.61l1.285-5.386a.562.562 0 00-.182-.557l-4.204-3.602a.563.563 0 01.321-.988l5.518-.442a.563.563 0 00.475-.345L11.48 3.5z",result:t})),count:e.favorites.length});const n=H("actions",t.actions,e.actions??[]);return n&&r.push(n),r}({recent:c,favorites:f,actions:o,typeLabels:r},_),[X,M,R,n,r,o,$,c,f,_]),G=k(()=>function(e){return e.flatMap(e=>e.rows)}(V),[V]),Q=Math.min(j,Math.max(G.length-1,0)),Y=m(),Z=G.length>0;b(()=>{C&&0!==G.length&&document.getElementById(J(Y,Q))?.scrollIntoView?.({block:"nearest"})},[C,Q,G.length,Y]);const re=v(e=>{I(!1),"action"!==e.kind?("result"!==e.kind&&"recent"!==e.kind||p?.(e.result),i?.(e.result)):e.action.onSelect()},[i,p]);return C?N(
10
- /* @__PURE__ */w("div",{"data-global-search":"",className:"fixed inset-0 flex items-start justify-center pt-[15vh]",style:{zIndex:u.overlay},onClick:()=>I(!1),children:[
11
- /* @__PURE__ */x("div",{"data-global-search-backdrop":"",className:"absolute inset-0 bg-black/50 backdrop-blur-sm"}),
12
- /* @__PURE__ */w("div",{className:"relative z-10 w-full max-w-xl rounded-(--radius-popup) overflow-hidden",onClick:e=>e.stopPropagation(),style:d(),children:[
13
- /* @__PURE__ */w("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-gray-200",children:[
14
- /* @__PURE__ */x("svg",{className:"h-5 w-5 text-gray-400 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:/* @__PURE__ */x("path",{strokeLinecap:"round",strokeLinejoin:"round",d:D})}),
15
- /* @__PURE__ */x("input",{ref:S,type:"text",value:$,onChange:e=>{E(e.target.value),T(0)},onKeyDown:e=>{"ArrowDown"===e.key?(e.preventDefault(),T(O(Q,1,G.length))):"ArrowUp"===e.key?(e.preventDefault(),T(O(Q,-1,G.length))):"Tab"===e.key&&G.length>0?(e.preventDefault(),T(function(e,t,r){const n=e.length;if(0===n)return 0;const a=[];let s=0;for(const t of e)a.push(s),s+=t;let l=0;for(let e=0;e<n;e++)t>=a[e]&&(l=e);return a[(l+r+n)%n]}(V.map(e=>e.rows.length),Q,e.shiftKey?-1:1))):"Enter"===e.key&&G[Q]&&re(G[Q])},placeholder:A,role:"combobox","aria-expanded":Z,"aria-controls":Z?Y:void 0,"aria-activedescendant":Z?J(Y,Q):void 0,"aria-autocomplete":"list",className:"flex-1 text-sm bg-transparent border-0 rosh-focus-ring placeholder-gray-400"}),K&&/* @__PURE__ */x("span",{"data-global-search-spinner":"",role:"status","aria-label":_.searching,className:"h-4 w-4 shrink-0 animate-spin rounded-full border-2 border-gray-300 border-t-gray-500"}),
16
- /* @__PURE__ */x("kbd",{className:"hidden sm:inline-flex items-center rounded border border-gray-300 px-2 py-0.5 text-2xs font-medium text-gray-400",children:_.escBadge})]}),
17
- /* @__PURE__ */w("div",{className:"max-h-[50vh] overflow-y-auto",children:[K&&0===G.length&&/* @__PURE__ */x(a,{size:"sm",padding:"py-6",label:_.searching}),!K&&"all"===B&&X&&/* @__PURE__ */x("div",{role:"alert",className:"px-4 py-3 text-center text-sm text-red-600",children:_.searchFailed}),!K&&X&&0===G.length&&"all"!==B&&/* @__PURE__ */x("div",{className:"px-4 py-6 text-center text-sm text-gray-400",children:_.noResults}),Z&&/* @__PURE__ */x(ee,{sections:V,activeIdx:Q,listId:Y,label:_.listLabel,typeIcons:t,groupCount:_.groupCount,groupLabel:_.groupLabel,onHover:T,onPick:re}),!K&&"some"===B&&X&&/* @__PURE__ */x("div",{role:"status",className:"px-4 py-2 text-xs text-amber-600",children:_.partialFailure}),!K&&!X&&0===G.length&&/* @__PURE__ */x("div",{className:"px-4 py-6 text-center text-sm text-gray-400",children:_.minChars(2)})]}),
18
- /* @__PURE__ */w("div",{className:"flex items-center justify-between px-4 py-2 border-t border-gray-100 bg-gray-50 text-2xs text-gray-400",children:[
19
- /* @__PURE__ */w("div",{className:"flex items-center gap-3",children:[
20
- /* @__PURE__ */w("span",{className:"flex items-center gap-1",children:[
21
- /* @__PURE__ */x("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:"↑"}),
22
- /* @__PURE__ */x("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:"↓"}),` ${_.navigate}`]}),
23
- /* @__PURE__ */w("span",{className:"flex items-center gap-1",children:[
24
- /* @__PURE__ */x("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:_.enterKey}),` ${_.open}`]}),V.length>1&&/* @__PURE__ */w("span",{className:"flex items-center gap-1",children:[
25
- /* @__PURE__ */x("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:_.tabKey}),` ${_.nextGroup}`]})]}),
26
- /* @__PURE__ */w("span",{className:"flex items-center gap-1",children:[
27
- /* @__PURE__ */x("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:_.escKey}),` ${_.close}`]})]})]})]}),document.body):null}export{E as BrandMark,ne as GlobalSearch,L as IconButton_default,R as PAGE_RESULT_ENTITY,P as favoritesToResults,B as navPagesProvider,re as openGlobalSearch,K as parsePageResultTarget,S as partitionNav,V as pushRecent,C as resolveBrandMarkTreatment,M as rowsContainRoute,G as sanitizeRecent,T as visibleNavChildren,j as visibleSectionItems};
@@ -1 +0,0 @@
1
- import{buttonClasses as t}from"./chunk-K7PQXJO7.js";import{currentShellStrings as e}from"./chunk-2PNYIWIN.js";var n="http://www.w3.org/2000/svg",o={},s=/* @__PURE__ */new Map;function i(t,e){let n=document.getElementById(t);return n||(n=document.createElement("div"),n.id=t,n.className=e,document.body.appendChild(n)),n}var r={success:"M5 13l4 4L19 7",error:"M6 18L18 6M6 6l12 12",warning:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z",info:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",loading:"M12 3a9 9 0 019 9",bell:"M14.857 17.082a23.848 23.848 0 005.454-1.31A8.967 8.967 0 0118 9.75v-.7V9A6 6 0 006 9v.75a8.967 8.967 0 01-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 01-5.714 0m5.714 0a3 3 0 11-5.714 0"};function a(t,e){const o=document.createElementNS(n,"svg");o.setAttribute("class",e),o.setAttribute("fill","none"),o.setAttribute("viewBox","0 0 24 24"),o.setAttribute("stroke","currentColor"),o.setAttribute("stroke-width","2");const s=document.createElementNS(n,"path");return s.setAttribute("stroke-linecap","round"),"loading"!==t&&s.setAttribute("stroke-linejoin","round"),s.setAttribute("d",r[t]),o.appendChild(s),o}function c(t,e){const n=document.createElement("div");return n.className=t,void 0!==e&&(n.textContent=e),n}function l(e,n,r){const l={...o,...r},d=l.placement??"top",u=l.sticky??!1,m=`${d}|${e}|${n}`;if(l.dedupe){const t=s.get(m);if(t)return t.restart(),{dismiss:t.dismiss}}"loading"!==e&&!1!==l.sound&&import("./sounds-FO772MN2.js").then(t=>{"success"===e?t.playSuccess():"error"===e?t.playError():t.playNotification()}).catch(()=>{});const p="bottom"===d?i("toast-container-bottom","fixed bottom-4 left-1/2 -translate-x-1/2 z-(--z-toast) flex flex-col-reverse gap-2 items-center pointer-events-none"):i("toast-container","fixed top-4 left-1/2 -translate-x-1/2 z-(--z-toast) flex flex-col gap-2 items-center pointer-events-none"),f="bottom"===d?"translateY(10px)":"translateY(-10px)",h=c("pointer-events-auto cursor-pointer rosh-toast");h.style.opacity="0",h.style.transform=`${f} scale(0.95)`,h.setAttribute("role","error"===e?"alert":"status"),h.setAttribute("aria-atomic","true"),h.appendChild(a(e,`h-4 w-4 rosh-tone-${e}${"loading"===e?" animate-spin":""}`));const y=document.createElement("span");if(y.textContent=n,h.appendChild(y),l.action){const{label:e,onClick:n}=l.action,o=document.createElement("button");o.type="button",o.className=t({variant:"link",size:"sm"}),o.textContent=e,o.addEventListener("click",t=>{t.stopPropagation(),b||(n(),g("action"))}),h.appendChild(o)}let v;p.appendChild(h),requestAnimationFrame(()=>{h.style.opacity="1",h.style.transform="translateY(0) scale(1)"});let b=!1;const g=t=>{b||(b=!0,v&&clearTimeout(v),s.delete(m),h.style.opacity="0",h.style.transform=`${f} scale(0.95)`,setTimeout(()=>h.remove(),300),l.onClose?.(t))},x=()=>g("dismissed"),w=l.duration??("info"===e?4500:3e3),C=()=>{v&&clearTimeout(v),u||(v=setTimeout(()=>g("timeout"),w))};return C(),h.addEventListener("mouseenter",()=>{v&&clearTimeout(v)}),h.addEventListener("mouseleave",()=>{b||C()}),h.addEventListener("click",x),s.set(m,{el:h,restart:C,dismiss:x}),{dismiss:x}}var d=8e3,u=/* @__PURE__ */new Map,m=!1;var p={success:(t,e)=>l("success",t,e),error:(t,e)=>l("error",t,e),warning:(t,e)=>l("warning",t,e),info:(t,e)=>l("info",t,e),notify:(t,n)=>function(t,n){!1!==(n?.sound??o.sound)&&import("./sounds-FO772MN2.js").then(t=>t.playNotification()).catch(()=>{});const s=i("notif-container","fixed top-4 right-4 z-(--z-toast) flex flex-col gap-3 items-end pointer-events-none"),r=c("pointer-events-auto cursor-pointer rosh-notif");r.style.opacity="0",r.style.transform="translateX(30px) scale(0.95)";const l=c("rosh-notif-badge");l.appendChild(a("bell","h-5 w-5"));const d=c("rosh-notif-body");d.append(c("rosh-notif-title",e().toast.notification),c("notif-msg rosh-notif-msg",t));const u=document.createElement("button");u.className="rosh-notif-close",u.textContent="×",r.append(l,d,u);const m=()=>{r.style.opacity="0",r.style.transform="translateX(30px) scale(0.95)",setTimeout(()=>r.remove(),300)};u.addEventListener("click",t=>{t.stopPropagation(),m()}),r.addEventListener("click",m),s.appendChild(r),requestAnimationFrame(()=>{r.style.opacity="1",r.style.transform="translateX(0) scale(1)"}),setTimeout(m,n?.duration??1e4)}(t,n),promise:(t,e,n)=>{const o=l("loading",e.loading,{...n,sticky:!0});return t.then(t=>{o.dismiss(),l("success","function"==typeof e.success?e.success(t):e.success,n)},t=>{o.dismiss(),l("error","function"==typeof e.error?e.error(t):e.error,n)}),t},configure:t=>{o={...t}},undoable:function(t,n){m||"undefined"==typeof window||(m=!0,window.addEventListener("pagehide",()=>{const t=[...u.values()];u.clear();for(const e of t)e.run({keepalive:!0})}));const o=/* @__PURE__ */Symbol("undoable");let s=!1,i=null;const r=async t=>{if(!s){s=!0,u.delete(o);try{await(t?n.commit(t):n.commit())}catch(t){n.onFail?.(t)}}},a=()=>!s&&(s=!0,u.delete(o),n.undo(),!0);return u.set(o,{run:r}),i=l("success",t,{sound:!1,placement:n.placement,duration:n.duration??8e3,action:{label:n.actionLabel??e().toast.undo,onClick:()=>{a()}},onClose:t=>{"action"!==t&&r()}}),{undo:()=>{const t=a();return t&&i?.dismiss(),t},commit:async()=>{if(s)return;const t=r();i?.dismiss(),await t}}}};export{d as UNDOABLE_MS,p as toast_default};
@@ -1,2 +0,0 @@
1
- import{jsx as e,jsxs as r}from"react/jsx-runtime";function t({size:t="md",padding:s="py-12",label:n,className:l=""}){const a=r=>/* @__PURE__ */e("div",{className:`${r} shrink-0 animate-spin rounded-full border-2 border-(--line-strong) border-t-current text-blue-600`});return null==n?/* @__PURE__ */e("div",{className:`flex items-center justify-center ${s} ${l}`,children:a("sm"===t?"h-5 w-5":"lg"===t?"h-12 w-12":"h-8 w-8")}):/* @__PURE__ */r("div",{role:"status",className:`flex items-center justify-center gap-2 ${s} ${l}`,children:[a("h-4 w-4"),
2
- /* @__PURE__ */e("span",{className:"text-sm text-gray-500",children:n})]})}export{t as LoadingSpinner};
@@ -1 +0,0 @@
1
- var r="7.31.1",a=r;export{a as APP_VERSION,r as VERSION};