efficient-shell 7.13.2 → 7.14.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -0
- package/dist/{Browser-K57UUI7M.js → Browser-UK35KCEV.js} +15 -15
- package/dist/Calculator-NGSHZWOR.js +29 -0
- package/dist/{CurrencyConverter-CSXJ4T4P.js → CurrencyConverter-PICVES6A.js} +2 -2
- package/dist/{Documents-MZ7BEGNG.js → Documents-4YA6RONK.js} +10 -10
- package/dist/{Files-P4PB4GMS.js → Files-ZDYW6JWY.js} +80 -80
- package/dist/{Notepad-7QFTPWIM.js → Notepad-P6PA4ZD4.js} +11 -11
- package/dist/{PomodoroTimer-MYTQX74U.js → PomodoroTimer-OCAJKGQU.js} +63 -63
- package/dist/{Preview-K62QJSSB.js → Preview-W5CQYJSX.js} +26 -26
- package/dist/{Spreadsheet-LEDD423O.js → Spreadsheet-PCE7KNMT.js} +11 -11
- package/dist/{Stock-3H2PR3XA.js → Stock-74K5L75A.js} +4 -4
- package/dist/{Weather-LQOFFWMT.js → Weather-QTRJYIPS.js} +17 -17
- package/dist/{WorldClock-TJCZHIL2.js → WorldClock-L6PSFBLE.js} +6 -6
- package/dist/apps/index.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/brand.css +1 -1
- package/dist/{chunk-E3FQXACV.js → chunk-BIYMQKF3.js} +1 -1
- package/dist/{chunk-ERJTO4DO.js → chunk-FEIO6NND.js} +1 -1
- package/dist/chunk-H2NSZMFS.js +1024 -0
- package/dist/chunk-HJQAE6SP.js +1 -0
- package/dist/{chunk-AEAPCPOG.js → chunk-IBGEW3OA.js} +107 -107
- package/dist/chunk-N7UO5JMD.js +1 -0
- package/dist/{chunk-HDGFEYPU.js → chunk-QWSVX6OP.js} +1 -1
- package/dist/{chunk-OV7F663H.js → chunk-VFBUDSMF.js} +2 -2
- package/dist/chunk-WYNQLAKD.js +13 -0
- package/dist/{chunk-YNKJZKFF.js → chunk-ZLRVXY5F.js} +2 -2
- package/dist/{index-CGgt7t0J.d.ts → index-C32oXyz3.d.ts} +41 -13
- package/dist/index.d.ts +2 -2
- package/dist/index.js +631 -631
- package/dist/map/index.js +3 -3
- package/dist/telemetry/index.js +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.js +1 -1
- package/dist/ui.css +3 -3
- package/package.json +1 -1
- package/dist/Calculator-DICFEP4L.js +0 -29
- package/dist/chunk-6ZLZP6GV.js +0 -1023
- package/dist/chunk-A7TXAKTX.js +0 -12
- package/dist/chunk-OESIYQSY.js +0 -1
- package/dist/chunk-PM4GMFN3.js +0 -1
package/dist/map/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{Button_default as e}from"../chunk-A7TXAKTX.js";import"../chunk-JTNKC4CR.js";import{rootIsDark as t,ROOT_THEME_ATTRIBUTES as n}from"../chunk-7IQ3B77H.js";import"../chunk-FIEA5CGB.js";import"../chunk-D65T4H6J.js";import{useShellStrings as r}from"../chunk-QRCDQPJA.js";import"../chunk-C3QOHMR6.js";import{Icon as o}from"../chunk-ZGUQLVY4.js";import{useRef as a,useState as l,useEffect as i,useCallback as s,useMemo as c,useSyncExternalStore as u}from"react";import{createPortal as d}from"react-dom";import{jsxs as p,jsx as m,Fragment as h}from"react/jsx-runtime";import{useQuery as g}from"@tanstack/react-query";var f="maplibregl-compact-show";function y(e){if(!e)return()=>{};const t=()=>!!e.classList.contains(f)&&(e.classList.remove(f),!0);if(t())return()=>{};const n=new MutationObserver(()=>{t()&&n.disconnect()});return n.observe(e,{attributes:!0,attributeFilter:["class"]}),()=>n.disconnect()}var b=20,x=12,v=480,w={center:[0,0],left:[b,0],right:[-20,0],top:[0,b],"top-left":[0,b],"top-right":[0,b],bottom:[0,-20],"bottom-left":[0,-20],"bottom-right":[0,-20]},k=(e,t=12)=>Math.max(0,Math.floor(e-t-x-b-10-16));function N(e,t,n,r=12){const o=e.y-b-r,a=n.height-e.y-b-x,l=t.height<=o||t.height>a&&o>=a,i=l?Math.max(0,t.height-o):-Math.max(0,t.height-a);let s="",c=0;return e.x-t.width/2<x?(s="-left",c=Math.max(0,x-e.x)):e.x+t.width/2>n.width-x&&(s="-right",c=-Math.max(0,e.x-(n.width-x))),{anchor:`${l?"bottom":"top"}${s}`,move:{x:c,y:i}}}var C="maplibre-gl-worker.mjs",M=e=>`/maplibre-gl/${e}/${C}`,L=null;function $(){return L??=Promise.all([import("maplibre-gl"),import("maplibre-gl/dist/maplibre-gl.css")]).then(([e])=>(e.setWorkerUrl(M(e.getVersion())),e)).catch(e=>{throw L=null,e}),L}var E=24,S=28,j=29;function A(e){const t=[...e].sort((e,t)=>e-t),n=[];for(let e=0;e<t.length;){let r=e;for(;r+1<t.length&&t[r+1]===t[r]+1;)r++;n.push(r===e?String(t[e]):`${t[e]}–${t[r]}`),e=r+1}return n.join(", ")}function z(e){const t=Math.max(S,12+8*e.length);return t+t%2}var R=(e,t,n,r)=>({left:e-n/2,top:t-r/2,right:e+n/2,bottom:t+r/2});function T(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=>R(e.x,e.y,e.width,e.height);function O(e){for(let t=0;t<e.length;t++)for(let n=t+1;n<e.length;n++)if(T(B(e[t]),B(e[n])))return[e[t],e[n]];return null}function K(e,t=[]){const n=[],r=e=>t.some(t=>T(t,e));let o=e.filter(e=>null!==e.stop).sort((e,t)=>e.stop-t.stop).map(e=>({keys:[e.key],stops:[e.stop],x:e.x,y:e.y,width:S,height:S,under:0}));for(let e=O(o);e;e=O(o)){const[t,n]=e;t.keys.push(...n.keys),t.stops.push(...n.stops),t.stops.sort((e,t)=>e-t),t.width=z(A(t.stops)),o=o.filter(e=>e!==n)}o=o.filter(e=>!r(B(e))||(n.push(...e.keys),!1));const a=[];for(const t of e){if(null!==t.stop)continue;const e=R(t.x,t.y,E,E),l=o.find(t=>T(B(t),e));if(l||r(e)){n.push(t.key),l&&l.under++;continue}const i=a.find(t=>T(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 W(e,t,n){let r=-1/0;for(const o of t){const t=Math.max(Math.abs(o.x-e.x),Math.abs(o.y-e.y));r=Math.max(r,0===t?1/0:n+Math.log2(29/t))}return r}function F(e){const t=new MutationObserver(e);return t.observe(document.documentElement,{attributes:!0,attributeFilter:n}),()=>t.disconnect()}var q=t;var _="routes",P=["routes-road","routes-estimate"];function H(e){const t=document.createElement("span");t.style.display="none",t.style.color=e,document.body.appendChild(t);const n=getComputedStyle(t).color||"#2563eb";return t.remove(),I(n)}function I(e){const t=document.createElement("canvas").getContext("2d");if(!t)return"#2563eb";t.fillStyle="#2563eb",t.fillStyle=e,t.fillRect(0,0,1,1);const[n,r,o]=t.getImageData(0,0,1,1).data;return`rgb(${n}, ${r}, ${o})`}var D={light:"https://tiles.openfreemap.org/styles/positron",dark:"https://tiles.openfreemap.org/styles/dark"},Z={center:[30,20],zoom:1},G="ring-2 ring-gray-900 ring-offset-2";var Q="var(--color-gray-600, #4b5563)",J="http://www.w3.org/2000/svg",U=()=>window.matchMedia("(prefers-reduced-motion: reduce)").matches,V=/^(?:\d+|[xytrblse](?:-\d+)?|solid|dashed|dotted|double|hidden|none)$/;function X(e){return e.split(/\s+/).some(e=>{const t=e.search(/[[(]/),n=t<0?e:e.slice(0,t),r=e.slice(n.lastIndexOf(":")+1);return r.startsWith("border-")&&!V.test(r.slice(7))})}var Y=(...e)=>e.filter(Boolean).join(" ");function ee(e){const t=document.createElementNS(J,"svg");t.setAttribute("viewBox","0 0 24 24"),t.setAttribute("fill","none"),t.setAttribute("stroke","currentColor"),t.setAttribute("stroke-width","2"),t.setAttribute("aria-hidden","true");for(const n of e){const e=document.createElementNS(J,"path");e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-linejoin","round"),e.setAttribute("d",n),t.appendChild(e)}return t}function te(e,t){for(const[n,r]of Object.entries(t??{}))e.dataset[n]=r}var ne=(e,t)=>Y("relative grid place-items-center rounded-full cursor-pointer",t&&(null!=e.stop?"h-7 w-7":"h-6 w-6"));function re(e,t,n,r){const o=t&&!r&&null==e.stop&&!e.dot;return Y("grid place-items-center rounded-full border-2 font-semibold leading-none shadow-sm transition-transform motion-reduce:transition-none",!X(e.tone)&&"border-white",e.tone,e.dot?"h-4 w-4 opacity-80":null!=e.stop?"h-7 w-7 text-xs ring-2 ring-gray-900":o?"h-8 w-8 text-xs [&_svg]:h-4 [&_svg]:w-4":"h-6 w-6 text-2xs [&_svg]:h-3.5 [&_svg]:w-3.5",t&&(o?"ring-2 ring-gray-900 ring-offset-1":G),e.approximate&&"border-dashed opacity-80",e.faded&&!t&&"opacity-40",n&&"scale-125 opacity-100")}var oe=e=>Y("grid place-items-center border-2 px-0.5 text-xs font-semibold leading-none shadow-sm",e.stop?"h-7 min-w-7":"h-6 min-w-6",!X(e.tone??"")&&"border-white",e.tone??"bg-gray-900 text-white");function ae({pins:t,selectedKey:n,focus:o,onSelect:c,ariaLabel:h,className:g="",children:f,routes:b,fitTo:x,attribution:v,marks:C,groupCrowded:M=!1,noun:L,highlightKey:j=null,picking:z=!1,onPick:R,card:T,cardMinMapWidth:B=480,fullScreen:O,initialView:J=Z,cooperativeGestures:V=!1}){const X=r().map,ae=a(null),se=a(null),ce=a(null),ue=a(null),de=a([]),pe=a(/* @__PURE__ */new Map),me=a(/* @__PURE__ */new Map),he=a(/* @__PURE__ */new Map),ge=a(null),fe=a(/* @__PURE__ */new Map),ye=a(""),[be,xe]=l(!1),[ve,we]=l(!1),ke=u(F,q,()=>!1)?"dark":"light",Ne=a({onSelect:c,onPick:R,picking:z,pins:t,selectedKey:n,highlightKey:j,groupCrowded:M,strings:X,noun:L});i(()=>{Ne.current={onSelect:c,onPick:R,picking:z,pins:t,selectedKey:n,highlightKey:j,groupCrowded:M,strings:X,noun:L}});const Ce=s(()=>{const e=ce.current,{pins:t,selectedKey:n}=Ne.current,r=n?t.find(e=>e.key===n):void 0;e&&r&&!e.getBounds().contains([r.lng,r.lat])&&e.easeTo({center:[r.lng,r.lat],duration:U()?0:400})},[]),Me=a(!1),Le=s((e,t)=>{const n=ce.current,r=ue.current;if(!n||!r)return;const o=n.getZoom();if(o>=17.5){const t=e.indexOf(Ne.current.selectedKey??"");return void Ne.current.onSelect(e[(t+1)%e.length])}const a=e.map(e=>pe.current.get(e).pin),l=new r.LngLatBounds([a[0].lng,a[0].lat],[a[0].lng,a[0].lat]);for(const e of a)l.extend([e.lng,e.lat]);const i=a.map(e=>n.project([e.lng,e.lat])),s=Math.max(...i.map((e,t)=>W(e,i.filter((e,n)=>n!==t),o))),{clientWidth:c,clientHeight:u}=n.getContainer(),d=n.cameraForBounds(l,{padding:Math.min(64,c/4,u/4)})?.zoom??18,p=document.activeElement===t;Me.current=!0,n.once("moveend",()=>{if(Me.current=!1,!p)return;const e=a[0].key,t=pe.current.get(e)?.button,n=t&&"none"!==t.style.display?t:[...me.current.values()].find(t=>t.keys.includes(e))?.button;n?.focus({preventScroll:!0})}),n.easeTo({center:l.getCenter(),zoom:Math.min(18,Math.max(o+1,Math.min(d,s))),duration:U()?0:600})},[]),$e=s(()=>{const e=ce.current,t=ue.current;if(!e||!t||!ae.current||Me.current&&e.isMoving())return;const{selectedKey:n,highlightKey:r,groupCrowded:o,strings:a,noun:l}=Ne.current;for(const[e,t]of pe.current){const a=re(t.pin,e===n,e===r,o);t.mark.className!==a&&(t.mark.className=a);const l=e===n?"1":"";t.button.style.zIndex!==l&&(t.button.style.zIndex=l)}let i=null;if(o){const r=e.getContainer().getBoundingClientRect(),o=[...ae.current.querySelectorAll("a[href], button, input, select, textarea, summary, [role='button'], [tabindex]:not([tabindex='-1'])")].filter(e=>!e.closest("[data-pin], [data-pin-group], .maplibregl-canvas")).map(e=>{const t=e.getBoundingClientRect(),n=e.closest("[data-map-card]")?.getBoundingClientRect()??t;return{left:Math.max(t.left,n.left)-r.left,top:Math.max(t.top,n.top)-r.top,right:Math.min(t.right,n.right)-r.left,bottom:Math.min(t.bottom,n.bottom)-r.top}}).filter(e=>e.right>e.left&&e.bottom>e.top);i=K([...pe.current.values()].map(({pin:t})=>{const n=e.project([t.lng,t.lat]);return{key:t.key,x:n.x,y:n.y,stop:t.stop??null}}),o);const s=e=>(l??a.places)(e),c=e.getZoom()<17.5?a.spread:a.cycle,u=(e,t)=>{const n=t?"":"none";e.style.display!==n&&(e.style.display=n)},d=/* @__PURE__ */new Map;for(const r of i.groups){const o=r.under>0?a.closeBy(r.under,s(r.under)):null,l=1===r.keys.length?pe.current.get(r.keys[0]):null;if(l){u(l.button,!0),l.button.setAttribute("aria-label",o?`${l.name}; ${o}`:l.name),l.button.title=o?`${l.title}\n${o}`:l.title;continue}for(const e of r.keys)u(pe.current.get(e).button,!1);const i=r.keys.join(" ");let p=me.current.get(i);if(!p){const n=document.createElement("button");n.type="button",n.dataset.pinGroup="",n.className="grid place-items-center rounded-full cursor-pointer",n.append(document.createElement("span"));const o=pe.current.get(r.keys[0]).pin,a={button:n,keys:r.keys,marker:new t.Marker({element:n,anchor:"center"}).setLngLat([o.lng,o.lat]).addTo(e)};n.addEventListener("click",e=>{e.stopPropagation(),Le(a.keys,n)}),p=a}p.keys=r.keys;const m=r.keys.map(e=>pe.current.get(e)),h=r.stops.length>0?A(r.stops):String(m.length),g=r.stops.length>0?a.stops(h):a.group(m.length,s(m.length));p.button.style.width=`${r.width}px`,p.button.style.height=`${r.height}px`,p.button.setAttribute("aria-label",`${g}: ${m.map(e=>e.pin.label).join("; ")}. ${c}${o?`; ${o}`:""}.`),p.button.title=[`${g}:`,...m.map(e=>e.title),...o?[o]:[],c].join("\n");const f=p.button.firstElementChild;f.textContent=h;const y=Y("grid place-items-center rounded-full border-2 border-gray-700 bg-white font-semibold leading-none text-gray-900 shadow-sm",r.stops.length>0?"h-7 w-full px-1 text-xs ring-2 ring-gray-900":m.every(e=>e.pin.dot)?"h-5 w-5 text-3xs":"h-6 w-6 text-2xs",null!=n&&r.keys.includes(n)&&G);f.className!==y&&(f.className=y),d.set(i,p)}for(const e of i.hidden)u(pe.current.get(e).button,!1);for(const[e,t]of me.current)d.has(e)||t.marker.remove();me.current=d}if(ge.current){const e=r&&i?i.groups.find(e=>e.keys.includes(r)&&e.keys.length>1):void 0,t=r?pe.current.get(r):void 0,n=r?he.current.get(r):void 0,o=e?{at:pe.current.get(e.keys[0]).pin,width:e.width,height:e.height}:t?{at:t.pin,width:t.button.offsetWidth||(null!=t.pin.stop?S:E),height:t.button.offsetHeight||(null!=t.pin.stop?S:E)}:n?{at:n.mark,width:n.element.offsetWidth||S,height:n.element.offsetHeight||S}:null,a=ge.current.getElement();a.style.display=o?"":"none",o&&(ge.current.setLngLat([o.at.lng,o.at.lat]),a.style.width=`${o.width+22}px`,a.style.height=`${o.height+22}px`)}},[Le]);i(()=>{if($e(),!ae.current)return;const e=new ResizeObserver(()=>$e());e.observe(ae.current);for(const t of ae.current.children)t.contains(se.current)||e.observe(t);return()=>e.disconnect()}),i(()=>{let e=!1,t=null,n=null,r=()=>{};return(async()=>{try{const o=await $();if(e||!se.current)return;ue.current=o,t=new o.Map({container:se.current,style:D[ke],center:J.center,zoom:J.zoom,attributionControl:v?{compact:!0,customAttribution:v}:{compact:!0},dragRotate:!1,pitchWithRotate:!1,touchPitch:!1,maxPitch:0,cooperativeGestures:"coarse"===V?window.matchMedia("(pointer: coarse)").matches:V}),t.touchZoomRotate.disableRotation(),t.keyboard.disableRotation(),t.addControl(new o.NavigationControl({showCompass:!1}),"top-right");const a=document.createElement("div");a.dataset.pinRing="",a.setAttribute("aria-hidden","true"),a.className="pointer-events-none rounded-full border-2 border-gray-900 bg-gray-900/15 shadow-[0_0_0_2px_var(--color-white,#fff)]",a.style.display="none",ge.current=new o.Marker({element:a,anchor:"center"}).setLngLat(J.center).addTo(t),t.on("click",e=>{Ne.current.picking&&Ne.current.onPick?.({lat:e.lngLat.lat,lng:e.lngLat.lng})}),t.on("move",$e),t.on("moveend",$e),t.on("resize",$e),t.on("error",e=>console.warn("[map]",e.error?.message)),r=y(se.current.querySelector(".maplibregl-ctrl-attrib"));const l=t;n=new ResizeObserver(()=>{l.resize(),Ce()}),n.observe(se.current),ce.current=t,xe(!0)}catch(t){console.error("[map] could not start",t),e||we(!0)}})(),()=>{e=!0,n?.disconnect(),r(),de.current.forEach(e=>e.remove()),de.current=[],me.current.forEach(e=>e.marker.remove()),me.current.clear(),ge.current?.remove(),ge.current=null,t?.remove(),ce.current=null}},[]);const Ee=a(ke);i(()=>{be&&ce.current&&Ee.current!==ke&&(Ee.current=ke,ce.current.setStyle(D[ke]))},[be,ke]),i(()=>{const e=ce.current,n=ue.current;if(!be||!e||!n)return;de.current.forEach(e=>e.remove()),de.current=[],me.current.forEach(e=>e.marker.remove()),me.current.clear(),pe.current.clear(),he.current.clear();for(const e of fe.current.keys())t.some(t=>t.key===e)||fe.current.delete(e);const r=Ne.current.strings;for(const o of t){const t=document.createElement("button");t.type="button",t.dataset.pin=o.key,t.className=ne(o,M);const a=o.approximate?r.approximate(o.label):o.label,l=o.title??(o.approximate?r.approximateTitle(o.label):o.label);t.setAttribute("aria-label",a),t.title=l;const i=document.createElement("span");if(te(i,o.data),o.dot);else if(null!=o.iconNode){const e=fe.current.get(o.key);e&&i.append(e)}else o.icon?.length?i.append(ee(o.icon)):i.textContent=null!=o.stop?String(o.stop):o.glyph;if(t.append(i),o.badge){const e=document.createElement("span");e.setAttribute("aria-hidden","true"),e.className=Y("absolute -right-2 -top-2 grid h-4 min-w-4 place-items-center rounded-full px-0.5 text-3xs font-semibold leading-none shadow",o.badgeTone??"bg-white text-gray-900"),e.textContent=o.badge,t.appendChild(e)}t.addEventListener("click",e=>{e.stopPropagation(),Ne.current.onSelect(o.key)}),de.current.push(new n.Marker({element:t,anchor:"center"}).setLngLat([o.lng,o.lat]).addTo(e)),pe.current.set(o.key,{pin:o,button:t,mark:i,name:a,title:l})}for(const t of C??[]){const r=document.createElement("div");r.dataset.mapMark=t.key,te(r,t.data),r.className=oe(t),r.textContent=t.text,r.title=t.title??t.label,r.setAttribute("role","img"),r.setAttribute("aria-label",t.label),de.current.push(new n.Marker({element:r,anchor:"center"}).setLngLat([t.lng,t.lat]).addTo(e)),he.current.set(t.key,{mark:t,element:r})}$e()},[be,t,C,M,$e]),i(()=>{be&&$e()},[be,n,j,$e]),i(()=>{if(!be||!n)return;const e=requestAnimationFrame(Ce);return()=>cancelAnimationFrame(e)},[be,n,Ce]),i(()=>{const e=ce.current,n=ue.current,r=x?[...t,...C??[]].filter(e=>x.includes(e.key)):t;if(!be||!e||!n||0===r.length)return;const o=r.map(e=>`${e.key}@${e.lat},${e.lng}`).sort().join("|");if(ye.current===o)return;const a=""===ye.current;if(ye.current=o,1===r.length)return void e.jumpTo({center:[r[0].lng,r[0].lat],zoom:13});const l=new n.LngLatBounds([r[0].lng,r[0].lat],[r[0].lng,r[0].lat]);for(const e of r)l.extend([e.lng,e.lat]);e.fitBounds(l,{padding:48,maxZoom:14,animate:!a})},[be,t,C,x]),i(()=>{const e=ce.current;if(!be||!e)return;const t=(b??[]).filter(e=>e.coordinates.length>=2),n=[...new Set(t.flatMap(e=>e.attribution?[e.attribution]:[]))].join(" · "),r=()=>{const r=function(){const e=document.createElement("span");e.className="text-blue-600",e.style.display="none",document.body.appendChild(e);const t=getComputedStyle(e).color||"#2563eb";return e.remove(),I(t)}(),o={type:"FeatureCollection",features:t.map(e=>({type:"Feature",properties:{key:e.key,estimate:e.estimate,faded:!!e.faded,color:e.color?H(e.color):r},geometry:{type:"LineString",coordinates:e.coordinates}}))},a=["case",["get","faded"],.25,.85],l=["get","color"],i=e.getSource(_);if(i&&(i.attribution||"")!==n){for(const t of P)e.getLayer(t)&&e.removeLayer(t);e.removeSource(_)}const s=e.getSource(_);s?s.setData(o):e.addSource(_,{type:"geojson",data:o,...n?{attribution:n}:{}}),e.getLayer("routes-road")||e.addLayer({id:"routes-road",type:"line",source:_,filter:["!",["get","estimate"]],layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":l,"line-width":4,"line-opacity":a}}),e.getLayer("routes-estimate")||e.addLayer({id:"routes-estimate",type:"line",source:_,filter:["get","estimate"],layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":l,"line-width":3,"line-dasharray":[1.5,1.5],"line-opacity":a}})},o=()=>{try{r()}catch(e){console.debug("[map] routes wait for the style",e)}};return o(),e.on("style.load",o),e.once("idle",o),()=>{e.off("style.load",o),e.off("idle",o)}},[be,b,ke]),i(()=>{const e=ce.current;if(!be||!e||!o)return;const n=t.find(e=>e.key===o.key);if(!n)return;const r=e.getZoom(),a=M?W(e.project([n.lng,n.lat]),t.filter(e=>e.key!==n.key).map(t=>e.project([t.lng,t.lat])),r):-1/0,l={center:[n.lng,n.lat],zoom:Math.min(18,Math.max(r,13,a))};U()?e.jumpTo(l):e.flyTo({...l,duration:600})},[be,o?.n]);const[Se,je]=l(!1);i(()=>{const e=ae.current;if(!e)return;const t=()=>je(e.clientWidth<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,Re=Ae?.lng??0,Te=Ae?.lat??0,Be=be&&!Se&&null!=T&&!!Ae,[Oe,Ke]=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([Re,Te]).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}),Ke(n);let i=!1,s=!1;const c=(t=!0)=>{if(s)return;if(e.isMoving())return void(i||(i=!0,e.once("moveend",()=>{i=!1,c()})));const{clientWidth:o,clientHeight:a}=e.getContainer(),l=function(e,t){const n=e.getBoundingClientRect().top,r=[...e.querySelectorAll(".maplibregl-ctrl-top-left > *, .maplibregl-ctrl-top-right > *"),...t?.querySelectorAll(":scope > [data-map-control]")??[]];let o=0;for(const e of r){const t=e.getBoundingClientRect();t.height>0&&(o=Math.max(o,t.bottom-n))}return o}(e.getContainer(),ae.current)+8,u=`${k(a,l)}px`;n.style.maxHeight!==u&&(n.style.maxHeight=u);const d=r.getElement(),p=r.getLngLat(),{anchor:m,move:h}=N(e.project(p),{width:d.offsetWidth,height:d.offsetHeight},{width:o,height:a},l);r.options.anchor!==m&&(r.options.anchor=m,r.setLngLat(p)),!t||0===h.x&&0===h.y||e.panBy([-h.x,-h.y],{duration:U()?0:250}),$e()},u=new ResizeObserver(()=>c());u.observe(n);const d=()=>c(),p=()=>{i||c(!1)};e.on("resize",d),e.on("moveend",p);let m=!1;const h=pe.current,g=e=>{m=n.contains(e.target)};return document.addEventListener("focusin",g),()=>{if(s=!0,u.disconnect(),e.off("resize",d),e.off("moveend",p),document.removeEventListener("focusin",g),r.remove(),Ke(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,Re,Te,$e]);const We=O?.active??!1,Fe=a(O?.onChange);i(()=>{Fe.current=O?.onChange}),i(()=>{if(!O)return;const e=document.documentElement;We&&!document.fullscreenElement&&e.requestFullscreen&&e.requestFullscreen().catch(()=>{}),!We&&document.fullscreenElement&&document.exitFullscreen().catch(()=>{})},[We]);const qe=!!O;return i(()=>{if(!qe)return;const e=()=>{document.fullscreenElement||Fe.current?.(!1)};return document.addEventListener("fullscreenchange",e),()=>document.removeEventListener("fullscreenchange",e)},[qe]),/* @__PURE__ */p("div",{ref:ae,className: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:
|
|
2
|
+
import{Button_default as e}from"../chunk-WYNQLAKD.js";import"../chunk-JTNKC4CR.js";import{rootIsDark as t,ROOT_THEME_ATTRIBUTES as n}from"../chunk-7IQ3B77H.js";import"../chunk-FIEA5CGB.js";import"../chunk-D65T4H6J.js";import{useShellStrings as r}from"../chunk-QRCDQPJA.js";import"../chunk-C3QOHMR6.js";import{Icon as o}from"../chunk-ZGUQLVY4.js";import{useRef as a,useState as l,useEffect as i,useCallback as s,useMemo as c,useSyncExternalStore as u}from"react";import{createPortal as d}from"react-dom";import{jsxs as p,jsx as m,Fragment as h}from"react/jsx-runtime";import{useQuery as g}from"@tanstack/react-query";var f="maplibregl-compact-show";function y(e){if(!e)return()=>{};const t=()=>!!e.classList.contains(f)&&(e.classList.remove(f),!0);if(t())return()=>{};const n=new MutationObserver(()=>{t()&&n.disconnect()});return n.observe(e,{attributes:!0,attributeFilter:["class"]}),()=>n.disconnect()}var b=20,x=12,v=480,w={center:[0,0],left:[b,0],right:[-20,0],top:[0,b],"top-left":[0,b],"top-right":[0,b],bottom:[0,-20],"bottom-left":[0,-20],"bottom-right":[0,-20]},k=(e,t=12)=>Math.max(0,Math.floor(e-t-x-b-10-16));function N(e,t,n,r=12){const o=e.y-b-r,a=n.height-e.y-b-x,l=t.height<=o||t.height>a&&o>=a,i=l?Math.max(0,t.height-o):-Math.max(0,t.height-a);let s="",c=0;return e.x-t.width/2<x?(s="-left",c=Math.max(0,x-e.x)):e.x+t.width/2>n.width-x&&(s="-right",c=-Math.max(0,e.x-(n.width-x))),{anchor:`${l?"bottom":"top"}${s}`,move:{x:c,y:i}}}var C="maplibre-gl-worker.mjs",M=e=>`/maplibre-gl/${e}/${C}`,L=null;function $(){return L??=Promise.all([import("maplibre-gl"),import("maplibre-gl/dist/maplibre-gl.css")]).then(([e])=>(e.setWorkerUrl(M(e.getVersion())),e)).catch(e=>{throw L=null,e}),L}var E=24,S=28,j=29;function A(e){const t=[...e].sort((e,t)=>e-t),n=[];for(let e=0;e<t.length;){let r=e;for(;r+1<t.length&&t[r+1]===t[r]+1;)r++;n.push(r===e?String(t[e]):`${t[e]}–${t[r]}`),e=r+1}return n.join(", ")}function z(e){const t=Math.max(S,12+8*e.length);return t+t%2}var R=(e,t,n,r)=>({left:e-n/2,top:t-r/2,right:e+n/2,bottom:t+r/2});function B(e,t){return e.left<t.right+1&&t.left<e.right+1&&e.top<t.bottom+1&&t.top<e.bottom+1}var T=e=>R(e.x,e.y,e.width,e.height);function O(e){for(let t=0;t<e.length;t++)for(let n=t+1;n<e.length;n++)if(B(T(e[t]),T(e[n])))return[e[t],e[n]];return null}function W(e,t=[]){const n=[],r=e=>t.some(t=>B(t,e));let o=e.filter(e=>null!==e.stop).sort((e,t)=>e.stop-t.stop).map(e=>({keys:[e.key],stops:[e.stop],x:e.x,y:e.y,width:S,height:S,under:0}));for(let e=O(o);e;e=O(o)){const[t,n]=e;t.keys.push(...n.keys),t.stops.push(...n.stops),t.stops.sort((e,t)=>e-t),t.width=z(A(t.stops)),o=o.filter(e=>e!==n)}o=o.filter(e=>!r(T(e))||(n.push(...e.keys),!1));const a=[];for(const t of e){if(null!==t.stop)continue;const e=R(t.x,t.y,E,E),l=o.find(t=>B(T(t),e));if(l||r(e)){n.push(t.key),l&&l.under++;continue}const i=a.find(t=>B(T(t),e));i?i.keys.push(t.key):a.push({keys:[t.key],stops:[],x:t.x,y:t.y,width:E,height:E,under:0})}return{groups:[...o,...a],hidden:n}}function K(e,t,n){let r=-1/0;for(const o of t){const t=Math.max(Math.abs(o.x-e.x),Math.abs(o.y-e.y));r=Math.max(r,0===t?1/0:n+Math.log2(29/t))}return r}function F(e){const t=new MutationObserver(e);return t.observe(document.documentElement,{attributes:!0,attributeFilter:n}),()=>t.disconnect()}var q=t;var _="routes",P=["routes-road","routes-estimate"];function H(e){const t=document.createElement("span");t.style.display="none",t.style.color=e,document.body.appendChild(t);const n=getComputedStyle(t).color||"#2563eb";return t.remove(),I(n)}function I(e){const t=document.createElement("canvas").getContext("2d");if(!t)return"#2563eb";t.fillStyle="#2563eb",t.fillStyle=e,t.fillRect(0,0,1,1);const[n,r,o]=t.getImageData(0,0,1,1).data;return`rgb(${n}, ${r}, ${o})`}var D={light:"https://tiles.openfreemap.org/styles/positron",dark:"https://tiles.openfreemap.org/styles/dark"},Q={center:[30,20],zoom:1},Z="ring-2 ring-gray-900 ring-offset-2";var G="var(--color-gray-600, #4b5563)",J="http://www.w3.org/2000/svg",U=()=>window.matchMedia("(prefers-reduced-motion: reduce)").matches,V=/^(?:\d+|[xytrblse](?:-\d+)?|solid|dashed|dotted|double|hidden|none)$/;function Y(e){return e.split(/\s+/).some(e=>{const t=e.search(/[[(]/),n=t<0?e:e.slice(0,t),r=e.slice(n.lastIndexOf(":")+1);return r.startsWith("border-")&&!V.test(r.slice(7))})}var X=(...e)=>e.filter(Boolean).join(" ");function ee(e){const t=document.createElementNS(J,"svg");t.setAttribute("viewBox","0 0 24 24"),t.setAttribute("fill","none"),t.setAttribute("stroke","currentColor"),t.setAttribute("stroke-width","2"),t.setAttribute("aria-hidden","true");for(const n of e){const e=document.createElementNS(J,"path");e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-linejoin","round"),e.setAttribute("d",n),t.appendChild(e)}return t}function te(e,t){for(const[n,r]of Object.entries(t??{}))e.dataset[n]=r}var ne=(e,t)=>X("relative grid place-items-center rounded-full cursor-pointer",t&&(null!=e.stop?"h-7 w-7":"h-6 w-6"));function re(e,t,n,r){const o=t&&!r&&null==e.stop&&!e.dot;return X("grid place-items-center rounded-full border-2 font-semibold leading-none shadow-sm transition-transform motion-reduce:transition-none",!Y(e.tone)&&"border-white",e.tone,e.dot?"h-4 w-4 opacity-80":null!=e.stop?"h-7 w-7 text-xs ring-2 ring-gray-900":o?"h-8 w-8 text-xs [&_svg]:h-4 [&_svg]:w-4":"h-6 w-6 text-2xs [&_svg]:h-3.5 [&_svg]:w-3.5",t&&(o?"ring-2 ring-gray-900 ring-offset-1":Z),e.approximate&&"border-dashed opacity-80",e.faded&&!t&&"opacity-40",n&&"scale-125 opacity-100")}var oe=e=>X("grid place-items-center border-2 px-0.5 text-xs font-semibold leading-none shadow-sm",e.stop?"h-7 min-w-7":"h-6 min-w-6",!Y(e.tone??"")&&"border-white",e.tone??"bg-gray-900 text-white");function ae({pins:t,selectedKey:n,focus:o,onSelect:c,ariaLabel:h,className:g="",children:f,routes:b,fitTo:x,attribution:v,marks:C,groupCrowded:M=!1,noun:L,highlightKey:j=null,picking:z=!1,onPick:R,card:B,cardMinMapWidth:T=480,fullScreen:O,initialView:J=Q,cooperativeGestures:V=!1}){const Y=r().map,ae=a(null),se=a(null),ce=a(null),ue=a(null),de=a([]),pe=a(/* @__PURE__ */new Map),me=a(/* @__PURE__ */new Map),he=a(/* @__PURE__ */new Map),ge=a(null),fe=a(/* @__PURE__ */new Map),ye=a(""),[be,xe]=l(!1),[ve,we]=l(!1),ke=u(F,q,()=>!1)?"dark":"light",Ne=a({onSelect:c,onPick:R,picking:z,pins:t,selectedKey:n,highlightKey:j,groupCrowded:M,strings:Y,noun:L});i(()=>{Ne.current={onSelect:c,onPick:R,picking:z,pins:t,selectedKey:n,highlightKey:j,groupCrowded:M,strings:Y,noun:L}});const Ce=s(()=>{const e=ce.current,{pins:t,selectedKey:n}=Ne.current,r=n?t.find(e=>e.key===n):void 0;e&&r&&!e.getBounds().contains([r.lng,r.lat])&&e.easeTo({center:[r.lng,r.lat],duration:U()?0:400})},[]),Me=a(!1),Le=s((e,t)=>{const n=ce.current,r=ue.current;if(!n||!r)return;const o=n.getZoom();if(o>=17.5){const t=e.indexOf(Ne.current.selectedKey??"");return void Ne.current.onSelect(e[(t+1)%e.length])}const a=e.map(e=>pe.current.get(e).pin),l=new r.LngLatBounds([a[0].lng,a[0].lat],[a[0].lng,a[0].lat]);for(const e of a)l.extend([e.lng,e.lat]);const i=a.map(e=>n.project([e.lng,e.lat])),s=Math.max(...i.map((e,t)=>K(e,i.filter((e,n)=>n!==t),o))),{clientWidth:c,clientHeight:u}=n.getContainer(),d=n.cameraForBounds(l,{padding:Math.min(64,c/4,u/4)})?.zoom??18,p=document.activeElement===t;Me.current=!0,n.once("moveend",()=>{if(Me.current=!1,!p)return;const e=a[0].key,t=pe.current.get(e)?.button,n=t&&"none"!==t.style.display?t:[...me.current.values()].find(t=>t.keys.includes(e))?.button;n?.focus({preventScroll:!0})}),n.easeTo({center:l.getCenter(),zoom:Math.min(18,Math.max(o+1,Math.min(d,s))),duration:U()?0:600})},[]),$e=s(()=>{const e=ce.current,t=ue.current;if(!e||!t||!ae.current||Me.current&&e.isMoving())return;const{selectedKey:n,highlightKey:r,groupCrowded:o,strings:a,noun:l}=Ne.current;for(const[e,t]of pe.current){const a=re(t.pin,e===n,e===r,o);t.mark.className!==a&&(t.mark.className=a);const l=e===n?"1":"";t.button.style.zIndex!==l&&(t.button.style.zIndex=l)}let i=null;if(o){const r=e.getContainer().getBoundingClientRect(),o=[...ae.current.querySelectorAll("a[href], button, input, select, textarea, summary, [role='button'], [tabindex]:not([tabindex='-1'])")].filter(e=>!e.closest("[data-pin], [data-pin-group], .maplibregl-canvas")).map(e=>{const t=e.getBoundingClientRect(),n=e.closest("[data-map-card]")?.getBoundingClientRect()??t;return{left:Math.max(t.left,n.left)-r.left,top:Math.max(t.top,n.top)-r.top,right:Math.min(t.right,n.right)-r.left,bottom:Math.min(t.bottom,n.bottom)-r.top}}).filter(e=>e.right>e.left&&e.bottom>e.top);i=W([...pe.current.values()].map(({pin:t})=>{const n=e.project([t.lng,t.lat]);return{key:t.key,x:n.x,y:n.y,stop:t.stop??null}}),o);const s=e=>(l??a.places)(e),c=e.getZoom()<17.5?a.spread:a.cycle,u=(e,t)=>{const n=t?"":"none";e.style.display!==n&&(e.style.display=n)},d=/* @__PURE__ */new Map;for(const r of i.groups){const o=r.under>0?a.closeBy(r.under,s(r.under)):null,l=1===r.keys.length?pe.current.get(r.keys[0]):null;if(l){u(l.button,!0),l.button.setAttribute("aria-label",o?`${l.name}; ${o}`:l.name),l.button.title=o?`${l.title}\n${o}`:l.title;continue}for(const e of r.keys)u(pe.current.get(e).button,!1);const i=r.keys.join(" ");let p=me.current.get(i);if(!p){const n=document.createElement("button");n.type="button",n.dataset.pinGroup="",n.className="grid place-items-center rounded-full cursor-pointer",n.append(document.createElement("span"));const o=pe.current.get(r.keys[0]).pin,a={button:n,keys:r.keys,marker:new t.Marker({element:n,anchor:"center"}).setLngLat([o.lng,o.lat]).addTo(e)};n.addEventListener("click",e=>{e.stopPropagation(),Le(a.keys,n)}),p=a}p.keys=r.keys;const m=r.keys.map(e=>pe.current.get(e)),h=r.stops.length>0?A(r.stops):String(m.length),g=r.stops.length>0?a.stops(h):a.group(m.length,s(m.length));p.button.style.width=`${r.width}px`,p.button.style.height=`${r.height}px`,p.button.setAttribute("aria-label",`${g}: ${m.map(e=>e.pin.label).join("; ")}. ${c}${o?`; ${o}`:""}.`),p.button.title=[`${g}:`,...m.map(e=>e.title),...o?[o]:[],c].join("\n");const f=p.button.firstElementChild;f.textContent=h;const y=X("grid place-items-center rounded-full border-2 border-gray-700 bg-white font-semibold leading-none text-gray-900 shadow-sm",r.stops.length>0?"h-7 w-full px-1 text-xs ring-2 ring-gray-900":m.every(e=>e.pin.dot)?"h-5 w-5 text-3xs":"h-6 w-6 text-2xs",null!=n&&r.keys.includes(n)&&Z);f.className!==y&&(f.className=y),d.set(i,p)}for(const e of i.hidden)u(pe.current.get(e).button,!1);for(const[e,t]of me.current)d.has(e)||t.marker.remove();me.current=d}if(ge.current){const e=r&&i?i.groups.find(e=>e.keys.includes(r)&&e.keys.length>1):void 0,t=r?pe.current.get(r):void 0,n=r?he.current.get(r):void 0,o=e?{at:pe.current.get(e.keys[0]).pin,width:e.width,height:e.height}:t?{at:t.pin,width:t.button.offsetWidth||(null!=t.pin.stop?S:E),height:t.button.offsetHeight||(null!=t.pin.stop?S:E)}:n?{at:n.mark,width:n.element.offsetWidth||S,height:n.element.offsetHeight||S}:null,a=ge.current.getElement();a.style.display=o?"":"none",o&&(ge.current.setLngLat([o.at.lng,o.at.lat]),a.style.width=`${o.width+22}px`,a.style.height=`${o.height+22}px`)}},[Le]);i(()=>{if($e(),!ae.current)return;const e=new ResizeObserver(()=>$e());e.observe(ae.current);for(const t of ae.current.children)t.contains(se.current)||e.observe(t);return()=>e.disconnect()}),i(()=>{let e=!1,t=null,n=null,r=()=>{};return(async()=>{try{const o=await $();if(e||!se.current)return;ue.current=o,t=new o.Map({container:se.current,style:D[ke],center:J.center,zoom:J.zoom,attributionControl:v?{compact:!0,customAttribution:v}:{compact:!0},dragRotate:!1,pitchWithRotate:!1,touchPitch:!1,maxPitch:0,cooperativeGestures:"coarse"===V?window.matchMedia("(pointer: coarse)").matches:V}),t.touchZoomRotate.disableRotation(),t.keyboard.disableRotation(),t.addControl(new o.NavigationControl({showCompass:!1}),"top-right");const a=document.createElement("div");a.dataset.pinRing="",a.setAttribute("aria-hidden","true"),a.className="pointer-events-none rounded-full border-2 border-gray-900 bg-gray-900/15 shadow-[0_0_0_2px_var(--color-white,#fff)]",a.style.display="none",ge.current=new o.Marker({element:a,anchor:"center"}).setLngLat(J.center).addTo(t),t.on("click",e=>{Ne.current.picking&&Ne.current.onPick?.({lat:e.lngLat.lat,lng:e.lngLat.lng})}),t.on("move",$e),t.on("moveend",$e),t.on("resize",$e),t.on("error",e=>console.warn("[map]",e.error?.message)),r=y(se.current.querySelector(".maplibregl-ctrl-attrib"));const l=t;n=new ResizeObserver(()=>{l.resize(),Ce()}),n.observe(se.current),ce.current=t,xe(!0)}catch(t){console.error("[map] could not start",t),e||we(!0)}})(),()=>{e=!0,n?.disconnect(),r(),de.current.forEach(e=>e.remove()),de.current=[],me.current.forEach(e=>e.marker.remove()),me.current.clear(),ge.current?.remove(),ge.current=null,t?.remove(),ce.current=null}},[]);const Ee=a(ke);i(()=>{be&&ce.current&&Ee.current!==ke&&(Ee.current=ke,ce.current.setStyle(D[ke]))},[be,ke]),i(()=>{const e=ce.current,n=ue.current;if(!be||!e||!n)return;de.current.forEach(e=>e.remove()),de.current=[],me.current.forEach(e=>e.marker.remove()),me.current.clear(),pe.current.clear(),he.current.clear();for(const e of fe.current.keys())t.some(t=>t.key===e)||fe.current.delete(e);const r=Ne.current.strings;for(const o of t){const t=document.createElement("button");t.type="button",t.dataset.pin=o.key,t.className=ne(o,M);const a=o.approximate?r.approximate(o.label):o.label,l=o.title??(o.approximate?r.approximateTitle(o.label):o.label);t.setAttribute("aria-label",a),t.title=l;const i=document.createElement("span");if(te(i,o.data),o.dot);else if(null!=o.iconNode){const e=fe.current.get(o.key);e&&i.append(e)}else o.icon?.length?i.append(ee(o.icon)):i.textContent=null!=o.stop?String(o.stop):o.glyph;if(t.append(i),o.badge){const e=document.createElement("span");e.setAttribute("aria-hidden","true"),e.className=X("absolute -right-2 -top-2 grid h-4 min-w-4 place-items-center rounded-full px-0.5 text-3xs font-semibold leading-none shadow",o.badgeTone??"bg-white text-gray-900"),e.textContent=o.badge,t.appendChild(e)}t.addEventListener("click",e=>{e.stopPropagation(),Ne.current.onSelect(o.key)}),de.current.push(new n.Marker({element:t,anchor:"center"}).setLngLat([o.lng,o.lat]).addTo(e)),pe.current.set(o.key,{pin:o,button:t,mark:i,name:a,title:l})}for(const t of C??[]){const r=document.createElement("div");r.dataset.mapMark=t.key,te(r,t.data),r.className=oe(t),r.textContent=t.text,r.title=t.title??t.label,r.setAttribute("role","img"),r.setAttribute("aria-label",t.label),de.current.push(new n.Marker({element:r,anchor:"center"}).setLngLat([t.lng,t.lat]).addTo(e)),he.current.set(t.key,{mark:t,element:r})}$e()},[be,t,C,M,$e]),i(()=>{be&&$e()},[be,n,j,$e]),i(()=>{if(!be||!n)return;const e=requestAnimationFrame(Ce);return()=>cancelAnimationFrame(e)},[be,n,Ce]),i(()=>{const e=ce.current,n=ue.current,r=x?[...t,...C??[]].filter(e=>x.includes(e.key)):t;if(!be||!e||!n||0===r.length)return;const o=r.map(e=>`${e.key}@${e.lat},${e.lng}`).sort().join("|");if(ye.current===o)return;const a=""===ye.current;if(ye.current=o,1===r.length)return void e.jumpTo({center:[r[0].lng,r[0].lat],zoom:13});const l=new n.LngLatBounds([r[0].lng,r[0].lat],[r[0].lng,r[0].lat]);for(const e of r)l.extend([e.lng,e.lat]);e.fitBounds(l,{padding:48,maxZoom:14,animate:!a})},[be,t,C,x]),i(()=>{const e=ce.current;if(!be||!e)return;const t=(b??[]).filter(e=>e.coordinates.length>=2),n=[...new Set(t.flatMap(e=>e.attribution?[e.attribution]:[]))].join(" · "),r=()=>{const r=function(){const e=document.createElement("span");e.className="text-blue-600",e.style.display="none",document.body.appendChild(e);const t=getComputedStyle(e).color||"#2563eb";return e.remove(),I(t)}(),o={type:"FeatureCollection",features:t.map(e=>({type:"Feature",properties:{key:e.key,estimate:e.estimate,faded:!!e.faded,color:e.color?H(e.color):r},geometry:{type:"LineString",coordinates:e.coordinates}}))},a=["case",["get","faded"],.25,.85],l=["get","color"],i=e.getSource(_);if(i&&(i.attribution||"")!==n){for(const t of P)e.getLayer(t)&&e.removeLayer(t);e.removeSource(_)}const s=e.getSource(_);s?s.setData(o):e.addSource(_,{type:"geojson",data:o,...n?{attribution:n}:{}}),e.getLayer("routes-road")||e.addLayer({id:"routes-road",type:"line",source:_,filter:["!",["get","estimate"]],layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":l,"line-width":4,"line-opacity":a}}),e.getLayer("routes-estimate")||e.addLayer({id:"routes-estimate",type:"line",source:_,filter:["get","estimate"],layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":l,"line-width":3,"line-dasharray":[1.5,1.5],"line-opacity":a}})},o=()=>{try{r()}catch(e){console.debug("[map] routes wait for the style",e)}};return o(),e.on("style.load",o),e.once("idle",o),()=>{e.off("style.load",o),e.off("idle",o)}},[be,b,ke]),i(()=>{const e=ce.current;if(!be||!e||!o)return;const n=t.find(e=>e.key===o.key);if(!n)return;const r=e.getZoom(),a=M?K(e.project([n.lng,n.lat]),t.filter(e=>e.key!==n.key).map(t=>e.project([t.lng,t.lat])),r):-1/0,l={center:[n.lng,n.lat],zoom:Math.min(18,Math.max(r,13,a))};U()?e.jumpTo(l):e.flyTo({...l,duration:600})},[be,o?.n]);const[Se,je]=l(!1);i(()=>{const e=ae.current;if(!e)return;const t=()=>je(e.clientWidth<T);t();const n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[T]);const Ae=n?t.find(e=>e.key===n)??null:null,ze=Ae?.key??null,Re=Ae?.lng??0,Be=Ae?.lat??0,Te=be&&!Se&&null!=B&&!!Ae,[Oe,We]=l(null);i(()=>{const e=ce.current,t=ue.current;if(!(Te&&e&&t&&ze))return;const n=document.createElement("div");n.dataset.mapCard="",n.className="w-[26rem] overflow-y-auto overscroll-contain";const r=new t.Popup({anchor:"bottom",offset:w,className:"rosh-map-card",maxWidth:"none",closeButton:!1,closeOnClick:!1,closeOnMove:!1,focusAfterOpen:!1}).setLngLat([Re,Be]).setDOMContent(n).addTo(e),o=r.getElement(),a=o.querySelector(".maplibregl-popup-content");a&&Object.assign(a.style,{padding:"0",background:"transparent",borderRadius:"0",boxShadow:"none"});const l=o.querySelector(".maplibregl-popup-tip");l&&Object.assign(l.style,{borderTopColor:G,borderBottomColor:G}),We(n);let i=!1,s=!1;const c=(t=!0)=>{if(s)return;if(e.isMoving())return void(i||(i=!0,e.once("moveend",()=>{i=!1,c()})));const{clientWidth:o,clientHeight:a}=e.getContainer(),l=function(e,t){const n=e.getBoundingClientRect().top,r=[...e.querySelectorAll(".maplibregl-ctrl-top-left > *, .maplibregl-ctrl-top-right > *"),...t?.querySelectorAll(":scope > [data-map-control]")??[]];let o=0;for(const e of r){const t=e.getBoundingClientRect();t.height>0&&(o=Math.max(o,t.bottom-n))}return o}(e.getContainer(),ae.current)+8,u=`${k(a,l)}px`;n.style.maxHeight!==u&&(n.style.maxHeight=u);const d=r.getElement(),p=r.getLngLat(),{anchor:m,move:h}=N(e.project(p),{width:d.offsetWidth,height:d.offsetHeight},{width:o,height:a},l);r.options.anchor!==m&&(r.options.anchor=m,r.setLngLat(p)),!t||0===h.x&&0===h.y||e.panBy([-h.x,-h.y],{duration:U()?0:250}),$e()},u=new ResizeObserver(()=>c());u.observe(n);const d=()=>c(),p=()=>{i||c(!1)};e.on("resize",d),e.on("moveend",p);let m=!1;const h=pe.current,g=e=>{m=n.contains(e.target)};return document.addEventListener("focusin",g),()=>{if(s=!0,u.disconnect(),e.off("resize",d),e.off("moveend",p),document.removeEventListener("focusin",g),r.remove(),We(null),m&&(!document.activeElement||document.activeElement===document.body)){const e=h.get(ze)?.button;e&&"none"!==e.style.display&&e.focus({preventScroll:!0})}}},[Te,ze,Re,Be,$e]);const Ke=O?.active??!1,Fe=a(O?.onChange);i(()=>{Fe.current=O?.onChange}),i(()=>{if(!O)return;const e=document.documentElement;Ke&&!document.fullscreenElement&&e.requestFullscreen&&e.requestFullscreen().catch(()=>{}),!Ke&&document.fullscreenElement&&document.exitFullscreen().catch(()=>{})},[Ke]);const qe=!!O;return i(()=>{if(!qe)return;const e=()=>{document.fullscreenElement||Fe.current?.(!1)};return document.addEventListener("fullscreenchange",e),()=>document.removeEventListener("fullscreenchange",e)},[qe]),/* @__PURE__ */p("div",{ref:ae,className:X("relative min-h-72 overflow-hidden rounded-lg border border-gray-200 bg-gray-100",z&&"[&_canvas]:cursor-crosshair",g),children:[
|
|
3
|
+
/* @__PURE__ */m("div",{className:"absolute inset-0",children:/* @__PURE__ */m("div",{ref:se,className:"h-full w-full",role:"region","aria-label":h})}),ve&&/* @__PURE__ */m("p",{className:"absolute inset-0 grid place-items-center p-6 text-center text-sm text-gray-500",children:Y.failed}),O&&/* @__PURE__ */m(e,{"data-map-control":"",variant:"secondary",size:"sm",className:"absolute left-3 top-3 z-10",onClick:()=>O.onChange(!O.active),leftIcon:/* @__PURE__ */m(ie,{leave:O.active}),children:O.active?Y.leaveFullScreen:Y.fullScreen}),f,null!=B&&!Te&&/* @__PURE__ */m("div",{"data-map-card":"",className:"absolute bottom-3 left-3 right-3 z-10 max-h-[calc(100%-1.5rem)] max-w-md overflow-y-auto overscroll-contain",children:B}),Te&&Oe?d(B,Oe):null,be&&/* @__PURE__ */m(le,{pins:t,hosts:fe.current})]})}function le({pins:e,hosts:t}){/* @__PURE__ */
|
|
4
4
|
return m(h,{children:e.map(e=>{if(null==e.iconNode||e.dot)return null;let n=t.get(e.key);return n||(n=document.createElement("span"),n.className="contents",t.set(e.key,n)),d(e.iconNode,n,e.key)})})}function ie({leave:e}){/* @__PURE__ */
|
|
5
5
|
return m(o,e?{name:"collapse","aria-hidden":"true",className:"h-4 w-4",strokeWidth:2}:{name:"expand","aria-hidden":"true",className:"h-4 w-4",strokeWidth:2})}function se(){const[e,t]=l(null);return{highlightKey:e,pointAt:s(e=>{const n=()=>t(e),r=()=>t(t=>t===e?null:t);return{onMouseEnter:n,onMouseLeave:r,onFocus:n,onBlur:r}},[])}}var ce=3e3,ue=e=>!!e?.pending&&3e3,de=e=>`${e.kind}:${e.id}`,pe=e=>("located"===e.placement||"approximate"===e.placement)&&null!=e.lat&&null!=e.lng;function me(e){switch(e){case"located":return null;case"approximate":return"Approximate: only the suburb or postcode matched";case"pending":return"Locating…";case"not_found":return"Not on the map: address not found";case"failed":return"Not on the map: the map service could not be reached";case"no_address":return"Not on the map: no city or postcode"}}var he={importer:{label:"Importer",tone:"bg-sky-600 text-white"},dealer:{label:"Dealer",tone:"bg-purple-600 text-white"},retail:{label:"Retail",tone:"bg-green-600 text-white"},supplier:{label:"Supplier",tone:"bg-sky-600 text-white"},delivery_location:{label:"Delivery location",tone:"bg-amber-600 text-white"},warehouse:{label:"Warehouse",tone:"bg-amber-600 text-white"}},ge=["importer","dealer","retail","supplier","delivery_location","warehouse"];function fe(e){return"supplier"===e.kind?"supplier":"customer"===e.kind?e.category||"importer":e.kind}var ye=(e,t=he)=>t[e]?.tone??"bg-gray-700 text-white",be=(e,t=he)=>t[e]?.label??e,xe=(e,t)=>ye(fe(e),t);function ve(e,t,n=he){return null!=t?String(t):(n[fe(e)]?.label??"").charAt(0).toUpperCase()}var we=["delivery_location","warehouse"];function ke(e,t=we){const n=/* @__PURE__ */new Map;let r=0;for(const o of e)t.includes(o.kind)&&n.set(de(o),++r);return n}function Ne(e){const t={onMap:0,approximate:0,pending:0,off:0};for(const n of e)pe(n)?(t.onMap+=1,"approximate"===n.placement&&(t.approximate+=1)):"pending"===n.placement?t.pending+=1:t.off+=1;return t}function Ce(e){const t=[`${e.onMap} on the map`];return e.approximate&&t.push(`${e.approximate} approximate`),e.pending&&t.push(`${e.pending} locating`),e.off&&t.push(`${e.off} not on the map`),t.join(" · ")}function Me(e){const t=[...new Set(e.filter(pe).map(fe))];return[...ge.filter(e=>t.includes(e)),...t.filter(e=>!ge.includes(e))]}function Le(e,t){return e.filter(e=>!pe(e)&&"pending"!==e.placement).map(e=>{const n=t?.get(de(e)),r=me(e.placement)?.replace(/^Not on the map: /,"")??"";return{key:de(e),text:`${null!=n?`${n}. `:""}${e.label}: ${r}`}})}function $e({categories:e,palette:t=he,floating:n=!0}){return e.length<2?null:/* @__PURE__ */m("div",{className:(n?"absolute left-3 top-3 z-10 ":"")+"flex flex-wrap gap-x-3 gap-y-1 rounded-lg border border-gray-200 bg-white px-3 py-2 text-xs text-gray-600 shadow-sm",children:e.map(e=>/* @__PURE__ */p("span",{className:"inline-flex items-center gap-2",children:[
|
|
6
6
|
/* @__PURE__ */m("span",{"aria-hidden":!0,className:`h-2.5 w-2.5 rounded-full ${ye(e,t)}`}),be(e,t)]},e))})}function Ee({point:t,number:n,onOpen:a,onClose:l,palette:i=he}){const s=me(t.placement),c=fe(t),u=r().map;/* @__PURE__ */
|
|
@@ -20,4 +20,4 @@ return p("section",{"aria-label":s,className:`flex min-w-0 flex-col ${h}`,childr
|
|
|
20
20
|
/* @__PURE__ */m("button",{type:"button",onClick:()=>{b()},className:"font-medium text-blue-600 hover:text-blue-800 hover:underline",children:"Try again"})]}),!y&&($>0||M.length>0)&&/* @__PURE__ */p("div",{className:"max-w-full space-y-0.5 rounded-lg border border-gray-200 bg-white px-3 py-2 text-xs shadow-sm","aria-live":"polite",children:[$>0&&/* @__PURE__ */p("p",{className:"flex items-center gap-2 text-gray-500",children:[
|
|
21
21
|
/* @__PURE__ */p("svg",{className:"h-3 w-3 animate-spin",fill:"none",viewBox:"0 0 24 24",children:[
|
|
22
22
|
/* @__PURE__ */m("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),
|
|
23
|
-
/* @__PURE__ */m("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"})]}),"Locating ",$," address",1===$?"":"es","…"]}),M.slice(0,3).map(e=>/* @__PURE__ */m("p",{className:"truncate text-amber-700",title:e.text,children:e.text},e.key)),M.length>3&&/* @__PURE__ */p("p",{className:"text-gray-500",children:["+",M.length-3," more not on the map"]})]})]}),E&&/* @__PURE__ */m(Ee,{point:E,number:N.get(de(E))??null,onOpen:S,onClose:()=>w(null),palette:u})]})]})}export{v as CARD_MIN_MAP_WIDTH,f as COMPACT_SHOW,ae as EntityMap,je as LocationsMap,C as MAPLIBRE_WORKER_FILE,j as MAP_APART_PX,he as MAP_CATEGORIES,S as MAP_STOP_PX,E as MAP_TARGET_PX,$e as MapLegend,ce as PENDING_POLL_MS,we as SECONDARY_KINDS,Ee as SelectedCard,k as cardMaxHeight,be as categoryLabel,ye as categoryTone,y as foldAttributionOnce,pe as isOnMap,
|
|
23
|
+
/* @__PURE__ */m("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"})]}),"Locating ",$," address",1===$?"":"es","…"]}),M.slice(0,3).map(e=>/* @__PURE__ */m("p",{className:"truncate text-amber-700",title:e.text,children:e.text},e.key)),M.length>3&&/* @__PURE__ */p("p",{className:"text-gray-500",children:["+",M.length-3," more not on the map"]})]})]}),E&&/* @__PURE__ */m(Ee,{point:E,number:N.get(de(E))??null,onOpen:S,onClose:()=>w(null),palette:u})]})]})}export{v as CARD_MIN_MAP_WIDTH,f as COMPACT_SHOW,ae as EntityMap,je as LocationsMap,C as MAPLIBRE_WORKER_FILE,j as MAP_APART_PX,he as MAP_CATEGORIES,S as MAP_STOP_PX,E as MAP_TARGET_PX,$e as MapLegend,ce as PENDING_POLL_MS,we as SECONDARY_KINDS,Ee as SelectedCard,k as cardMaxHeight,be as categoryLabel,ye as categoryTone,y as foldAttributionOnce,pe as isOnMap,W as layoutPins,Me as legendCategories,$ as loadMapLibre,ke as locationNumbers,M as mapLibreWorkerUrl,ue as mapPointsRefetchInterval,Le as offMapNotes,fe as pinCategory,ve as pinGlyph,xe as pinTone,N as placeCard,me as placementNote,de as pointKey,A as stopsLabel,Ne as summarize,Ce as summaryText,se as useMapHighlight,Se as useMapPoints,K as zoomApart};
|
package/dist/telemetry/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{startClientTelemetry}from"../chunk-
|
|
1
|
+
export{startClientTelemetry}from"../chunk-FEIO6NND.js";import"../chunk-N7UO5JMD.js";import"../chunk-KNUR2UEG.js";
|
package/dist/ui/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as ALT, b as ALT_SHIFT_D, c as ALT_SHIFT_E, d as ALT_SHIFT_N, e as APP_UPDATE_POLL_MS, f as Accordion, g as AccordionItem, h as AccordionProps, i as Align, j as AlignmentGrid, k as AlignmentGridProps, l as AlignmentPoint, m as AngleScale, n as AppUpdateBanner, o as AppUpdateBannerProps, p as AttachButton, q as AttachButtonProps, r as AttachmentDropZone, s as AttachmentDropZoneProps, t as AttachmentList, u as AttachmentListProps, v as AuthScreen, w as AuthScreenProps, x as Avatar, y as AvatarGroup, z as AvatarGroupProps, B as AvatarProps, D as AvatarSize, E as AvatarStatus, F as BORDER_WIDTHS, G as BackgroundVariant, H as BandScale, I as Banner, J as BannerEmphasis, K as BannerProps, L as BannerTone, M as BorderRole, N as BoxPlotBox, O as BoxPlotChart, Q as BoxPlotChartProps, R as BrandAssetEditor, T as BrandAssetEditorProps, U as BrandAssetPreview, V as BrandMark, W as BrandMarkProps, X as BrandMarkSlot, Y as BrandMarkSurface, Z as BrandMarkTreatment, _ as BreadcrumbItem, $ as Breadcrumbs, a0 as BreadcrumbsProps, a1 as BudgetBar, a2 as BudgetBarProps, a3 as BudgetState, a4 as Button, a5 as ButtonClassesOptions, a6 as ButtonProps, a7 as ButtonSize, a8 as ButtonVariant, a9 as CHART_INK, aa as CMD_A, ab as CMD_DOT, ac as CMD_ENTER, ad as CMD_K, ae as CMD_S, af as COLUMN_COUNT_MAX, ag as COLUMN_COUNT_WIDTHS, ah as COLUMN_SHARES_EQUAL, ai as COLUMN_SHARE_MIN, aj as CONTROL_HEIGHTS, ak as CORNERS, al as Calendar, am as CalendarMode, an as CalendarProps, ao as Candle, ap as CandlestickChart, aq as CandlestickChartProps, ar as Card, as as CardPadding, at as CardProps, au as CardTone, av as CartesianPlot, aw as CartesianPlotProps, ax as CellStyle, ay as ChartBackgroundVariant, az as ChartBrush, aA as ChartBrushProps, aB as ChartCurve, aC as ChartDefs, aD as ChartDefsProps, aE as ChartDot, aF as ChartDotProps, aG as ChartDotVariant, aH as ChartFillVariant, aI as ChartFrame, aJ as ChartFrameProps, aK as ChartHighlightProvider, aL as ChartLegendEntry, aM as ChartLegendSwatch, aN as ChartRange, aO as ChartReferenceLine, aP as ChartRevealDirection, aQ as ChartSkeleton, aR as ChartSkeletonProps, aS as ChartStatusTone, aT as ChartStrokeVariant, aU as ChartTooltip, aV as ChartTooltipProps, aW as ChartTooltipRow, aX as ChatTemplate, aY as Checkbox, aZ as CheckboxProps, a_ as CheckoutTemplate, a$ as ChordChart, b0 as ChordChartProps, b1 as ColorPicker, b2 as ColorPickerPanel, b3 as ColorPickerPanelProps, b4 as ColorPickerProps, b5 as ColorPreset, b6 as ColorSwatch, b7 as ColorSwatchProps, b8 as ColorSwatchSize, b9 as ColoredBadge, ba as ColoredBadgeProps, bb as ColumnChart, bc as ColumnChartProps, C as ColumnDef, bd as ColumnSeries, be as ColumnShares, bf as ComposerAttachments, bg as ComposerAttachmentsProps, bh as ConfirmProvider, bi as ContainerFillChart, bj as ContainerFillChartProps, bk as ContainerFillItem, bl as ContextMenu, bm as ContextMenuPoint, bn as ContextMenuProps, bo as ContextMenuState, bp as ControlSize, bq as CornerOption, br as Corners, bs as CornersInput, bt as CornersInputProps, bu as CountBadge, bv as CountBadgeProps, bw as CountBadgeTone, bx as Curve, by as DAY_MS, bz as DashboardTemplate, bA as DataTable, bB as DataTableColumn, bC as DataTableColumnGroup, bD as DataTableHeader, bE as DataTablePage, bF as DataTableProps, bG as DataTableRowLink, bH as DataTableRowProps, bI as DatePicker, bJ as DatePickerProps, bK as DateRangePicker, bL as DateRangePickerProps, bM as DateTimePicker, bN as DateTimePickerProps, bO as DescriptionColumns, bP as DescriptionItem, bQ as DescriptionList, bR as DescriptionListProps, bS as Dialog, bT as DialogProps, bU as DialogSize, bV as DisplayChipItem, bW as DisplayChips, bX as DisplayChipsProps, bY as Divider, bZ as DividerProps, b_ as DividerSpacing, b$ as Drawer, c0 as DrawerProps, c1 as DrawerSide, c2 as DrawerSize, c3 as DropdownMenu, c4 as DropdownMenuAlign, c5 as DropdownMenuCheckboxItem, c6 as DropdownMenuDividerItem, c7 as DropdownMenuEntry, c8 as DropdownMenuItem, c9 as DropdownMenuLabelItem, ca as DropdownMenuLinkItem, cb as DropdownMenuProps, cc as DropdownMenuRadioItem, cd as DropdownMenuSide, ce as DropdownPositionOptions, cf as ELEVATION_LEVELS, cg as ENGLISH, ch as ENTER, ci as EditableGrid, cj as EditableGridProps, ck as ElevationLevel, cl as EmailTemplate, cm as EmptyState, cn as EmptyStateProps, co as EmptyValue, cp as EmptyValueProps, cq as ErrorBoundary, cr as ErrorBoundaryProps, cs as ErrorPage, ct as ErrorPageProps, cu as FONT_WEIGHTS, cv as FileIntake, cw as FilePicker, cx as FilePickerProps, cy as FillVariant, cz as FontWeightRole, cA as FormError, cB as FormErrorSummary, cC as FormErrorSummaryProps, cD as FormField, cE as FormFieldProps, cF as FormLayoutPage, cG as FunnelChart, cH as FunnelChartProps, cI as FunnelStage, cJ as GLASS_DIVIDER, cL as GROUP_COLORS, cM as GROUP_COLORS_SOLID, cN as GalleryTemplate, cO as Gap, cP as GlassOptions, cQ as GlobalSearch, cR as GlobalSearchProps, cS as Grid, cT as GridCols, cU as GridColumn, cV as GridProps, cW as HeatmapChart, cX as HeatmapChartProps, cY as HelpCenter, cZ as HelpCenterDoc, c_ as HelpCenterProps, c$ as HexInput, d0 as HistogramBin, d1 as HistogramChart, d2 as HistogramChartProps, d3 as Hsv, d4 as INPUT_BASE, d5 as INPUT_SIZES, d6 as IconButton, d7 as IconButtonClassesOptions, d8 as IconButtonProps, d9 as IconRail, da as IconRailButton, db as IconRailButtonProps, dc as IconRailLabels, dd as IconRailLabelsShown, de as IconRailOrientation, df as IconRailProps, dg as ImageFocusPoint, dh as ImageFocusPointProps, di as Inline, dj as InlineProps, dk as Input, dl as InputNumber, dm as InputNumberProps, dn as InputProps, dp as InputSize, dq as Justify, dr as Kanban, ds as KanbanColumn, dt as KanbanProps, du as Kbd, dv as KbdProps, dw as KbdSize, dx as KbdTone, dy as Label, dz as LabelClassesOptions, dA as LabelProps, dB as LadderScale, dC as LanguagePanel, dD as LanguagePanelProps, dE as LanguageSelect, dF as LanguageSelectProps, dG as LinearScale, dH as LinkFilter, dI as LinkFilterField, dJ as LinkKindChoice, dK as LinkOption, dL as LinkOptionGroup, dM as LinkPicker, dN as LinkPickerFieldProps, dO as LinkPickerProps, dP as LinkPickerWindowProps, dQ as LinkRules, dR as LinkTarget, dS as ListDrop, dT as ListFooter, dU as ListLoadError, dV as ListLoadErrorProps, dW as ListMove, dX as ListRow, dY as ListRowProps, dZ as LoadingSpinner, d_ as LoadingSpinnerProps, d$ as MAX_FRACTION_DIGITS, e0 as MENU_MAX_HEIGHT, e1 as MOD, e2 as MOTION, e3 as MOTION_DURATIONS, e4 as Markdown, e4 as MarkdownLite, e5 as MarkdownLiteProps, e5 as MarkdownProps, e6 as MediaUploadField, e7 as MediaUploadFieldProps, e8 as MediaUploadGrid, e9 as MediaUploadGridItem, ea as MediaUploadGridProps, eb as MenuPos, ec as Meter, ed as MeterProps, ee as MetricBar, ef as MetricBarProps, eg as Milestone, eh as MilestoneKind, ei as MilestoneTimeline, ej as MilestoneTimelineProps, ek as MotionSpeed, em as NEXT_CHUNK_PATH_PREFIX, en as NativeSelect, eo as NiceAxis, ep as NumericKeypad, eq as NumericKeypadProps, er as OVERLAY_OPEN_EVENT, es as PLACEHOLDER_INK, et as POPUP_MAX_WIDTH, eu as POST_PRODUCTION_STATUSES, ev as PageHeader, ew as PageHeaderProps, P as PaginatedResponse, ex as Pagination, ey as PaginationProps, ez as PaperclipGlyph, eA as Paragraph, eB as ParagraphProps, eC as PieChart, eD as PieChartProps, eE as PieSegment, eF as PlotGeometry, eG as Point, eH as Popover, eI as PopoverAlign, eJ as PopoverProps, eK as PopoverRenderProps, eL as PopoverSide, eM as PopupMenu, eN as PopupMenuDivider, eO as PopupMenuItem, eP as PopupMenuItemProps, eQ as PopupMenuLabel, eR as PopupMenuProps, eS as PopupSubmenu, eT as PopupSubmenuProps, eU as PortalBrandingContextValue, eV as PortalBrandingProvider, eW as PortalBrandingProviderProps, eX as ProductionTimeline, eY as ProductionTimelineProps, eZ as ProductionTimelineSnapshot, e_ as ProgressItem, e$ as PublicPortal, f0 as PublicPortalBranding, f1 as RADAR_SERIES_CAP, f2 as RADIUS_ROLES, f3 as ROW_HEIGHTS, f4 as RadarAxis, f5 as RadarChart, f6 as RadarChartProps, f7 as RadarSeries, f8 as RadialBarChart, f9 as RadialBarChartProps, fa as RadialBarRow, fb as Radio, fc as RadioGroup, fd as RadioGroupOption, fe as RadioGroupOrientation, ff as RadioGroupProps, fg as RadioProps, fh as RadiusRole, fi as Range, fj as RangeChart, fk as RangeChartProps, fl as RangeRow, fm as RankedBars, fn as RankedBarsProps, fo as RankedBarsRow, fp as ResizeHandle, fq as ResizeHandleOrientation, fr as ResizeHandleProps, fs as ResizeHandleSide, ft as ResizeHandleStackSide, fu as ResolvedPortalBrandAsset, fv as Result, fw as ResultProps, fx as ResultStatus, fy as RevealDirection, fz as SCATTER_SERIES_CAP, fA as SERIES_SLOT_COUNT, fB as SERIES_VARS, fC as SHELL_LANGUAGE_STORAGE_KEY, fD as SHIFT, fE as SPACING_ROLES, fF as SPACING_SCALE, fG as STAGES, fH as STALE_CHUNK_RELOAD_COOLDOWN_MS, fI as STALE_CHUNK_RELOAD_KEY, fJ as STATUS_VARS, fK as SankeyChart, fL as SankeyChartProps, fM as SankeyLink, fN as SankeyNode, fO as ScatterChart, fP as ScatterChartProps, fQ as ScatterPoint, fR as ScatterSeries, S as SearchConfig, fS as SearchListRoute, fT as SearchProvider, fU as SearchQuickAction, fV as SearchResponse, fW as SearchResult, fX as SearchableItem, fY as SearchableOption, fZ as SearchableOptionGroup, f_ as SearchableSelect, f$ as SearchableSelectBaseProps, g0 as SearchableSelectMultipleProps, g1 as SearchableSelectProps, g2 as Segmented, g3 as SegmentedOption, g4 as SegmentedProps, g5 as SegmentedSize, g6 as Select, g7 as SelectBaseProps, g8 as SelectItem, g9 as SelectMultipleProps, ga as SelectOption, gb as SelectOptionGroup, gc as SelectProps, gd as SemanticGroup, ge as SeriesSlots, gf as SettingRow, gg as SettingRowProps, gh as SeverityTone, gk as ShellLanguage, gl as ShellLanguageProvider, gm as ShellLanguageState, gn as ShellPrefsAdapter, go as ShellPrefsProvider, gp as SidebarActionButton, gq as SidebarActionButtonProps, gr as SidebarGroupLabel, gs as SidebarGroupLabelProps, gt as SidebarLayout, gu as SidebarLayoutProps, gv as SidebarNavGroup, gw as SidebarNavGroupProps, gx as SidebarNavItem, gy as SidebarNavItemProps, gz as Skeleton, gA as SkeletonProps, gB as SkeletonVariant, gC as Slider, gD as SliderProps, gE as SliderSize, gF as Snippet, gG as SnippetProps, gH as SnippetSize, gI as SnippetVariant, a as SortState, gJ as SortableList, gK as SortableListProps, gL as SortableListSpacing, gM as SpacingRole, gN as SpacingStep, gO as Sparkline, gP as SparklineProps, gQ as Stack, gR as StackProps, gS as StaleChunkReloadOptions, gT as StatCard, gU as StatCardProps, gV as StatTile, gW as StatTileProps, gX as Statistic, gY as StatisticProps, gZ as StatisticSize, g_ as StatisticTone, g$ as StatusBadge, h0 as StatusBadgeProvider, h1 as StatusEmphasis, h2 as StepItem, h3 as Stepper, h4 as StepperProps, h5 as StrokeVariant, h6 as SunburstChart, h7 as SunburstChartProps, h8 as SunburstNode, h9 as Switch, ha as SwitchProps, hb as SwitchSize, hc as TYPE_SCALE, hd as TabItem, he as Tabs, hf as TabsProps, hg as TagInput, hh as TagInputOption, hi as TagInputProps, hj as TagInputTone, hk as Text, hl as TextLinkField, hm as TextLinkFieldProps, hn as TextProps, ho as TextSize, hp as TextTone, hq as TextWeight, hr as Textarea, hs as TextareaProps, ht as Theme, hu as TileButton, hv as TileButtonProps, hw as TileSize, hx as TimeAgo, hy as TimeAgoProps, hz as TimePicker, hA as TimePickerProps, hB as TimeSeriesChart, hC as TimeSeriesChartProps, hD as TimeSeriesSeries, hE as TimelineMarker, hF as TimelineMarkerKind, hG as TimelineReport, hH as TimelineScrubProgress, hI as TimelineTrack, hJ as TimelineTrackItem, hK as TimelineTrackKind, hL as TimelineTrackPending, hM as TimelineTrackPhase, hN as TimelineTrackPlayback, hO as TimelineTrackProps, hP as TimelineTrackThumb, hQ as Title, hR as TitleLevel, hS as TitleProps, hT as ToastOptions, hU as ToastPlacement, hV as Tooltip, hW as TooltipProps, hX as TopNav, hY as TopNavItem, hZ as TopNavProps, h_ as Tree, h$ as TreeDrop, i0 as TreeEmptySlot, i1 as TreeEmptySlotProps, i2 as TreeGroup, i3 as TreeGroupLabel, i4 as TreeGroupProps, i5 as TreeMove, i6 as TreeProps, i7 as TreeRow, i8 as TreeRowProps, i9 as TreeSeam, ia as TreeSeamProps, ib as TreemapChart, ic as TreemapChartProps, id as TreemapItem, ie as TreemapTile, ig as TypeStep, ih as UseAppUpdateOptions, ii as UseContextMenu, ij as UseProductionTimelineOpts, ik as VERSION, il as VITE_PRELOAD_ERROR_EVENT, im as WaterfallChart, io as WaterfallChartProps, ip as WaterfallStep, iq as WidthsBar, ir as WidthsBarProps, is as ZLayer, it as Z_LAYERS, iu as angleScale, iv as appendKey, iw as applyCorners, ix as applyIconSet, iy as applyThemePrefs, iz as arcPath, iA as areaBetween, iB as areaFrom, iC as assignSeriesSlots, iD as autoHighlightIndex, iE as backspace, iF as bandScale, iG as binValues, iH as budgetState, iI as bumpPath, iJ as buttonClasses, iK as calcOverall, iL as calcReportOverall, iM as colorFill, iN as colorSwatchClasses, iO as columnSharesWidths, iP as confirm, iQ as confirmDestructive, iR as curvePath, iS as dashFor, iU as dismissPopups, iV as fillFor, iW as fillId, iX as fmtSliderDate, iY as fromDateKey, iZ as glassStyle, i_ as glowId, i$ as groundId, j0 as groupColors, j1 as hexToHsv, j2 as highlightOpacity, j3 as hsvToHex, j4 as iconButtonClasses, j5 as inputClasses, j6 as installStaleChunkReload, j7 as isMac, j8 as isSeverityTone, j9 as isSpacingStep, ja as isStaleChunkError, jc as labelClasses, jd as ladderScale, je as languageSelectWidth, jf as leavesContextMenuAlone, jg as linearPath, jh as linearScale, ji as logScale, jj as maskId, jk as matchShellLanguage, jl as mediaFileName, jm as monotonePath, jn as niceAxis, jo as niceMax, jp as openGlobalSearch, jq as parseHexColor, jr as polygonPoints, js as popupBounds, jt as prompt, ju as pushRecentSearch, jv as radiusScale, jw as readSavedShellLanguage, jx as registerModalEscapeInterceptor, jy as resolveBrandMarkTreatment, jz as resolveColumnShares, jA as resolveColumnWidths, jB as resolveCorners, jC as resolvePortalBrandAsset, jD as resolveSeriesColor, jE as resolveSeriesColorWithin, jF as resolveShellLanguage, jG as resolveTheme, jH as sanitizeRecentSearches, jI as saveShellLanguage, jJ as seriesColor, jK as severityOf, jL as splinePath, jM as squarify, jN as stagger, jO as stepPath, jP as tabButtonId, jQ as tabPanelId, jR as toDateKey, jS as toDayMs, jT as toISODate, jU as toast, jV as toggleSeriesSlot, jW as useAppUpdate, jX as useClickOutside, jY as useConfirm, jZ as useContextMenu, j_ as useDebouncedValue, j$ as useDropdownPosition, k0 as useFocusTrap, k1 as useHighlight, k2 as useIsMobile, k3 as useLocalStoragePrefs, k4 as usePlotWidth, k5 as usePortalBranding, k6 as useProductionTimeline, k7 as useScrollLock, k8 as useShellLanguage, k9 as useShellPrefs, ka as useStatusLabel, kb as useTheme } from '../index-CGgt7t0J.js';
|
|
1
|
+
export { A as ALT, b as ALT_SHIFT_D, c as ALT_SHIFT_E, d as ALT_SHIFT_N, e as APP_UPDATE_POLL_MS, f as Accordion, g as AccordionItem, h as AccordionProps, i as Align, j as AlignmentGrid, k as AlignmentGridProps, l as AlignmentPoint, m as AngleScale, n as AppUpdateBanner, o as AppUpdateBannerProps, p as AttachButton, q as AttachButtonProps, r as AttachmentDropZone, s as AttachmentDropZoneProps, t as AttachmentList, u as AttachmentListProps, v as AuthScreen, w as AuthScreenProps, x as Avatar, y as AvatarGroup, z as AvatarGroupProps, B as AvatarProps, D as AvatarSize, E as AvatarStatus, F as BORDER_WIDTHS, G as BackgroundVariant, H as BandScale, I as Banner, J as BannerEmphasis, K as BannerProps, L as BannerTone, M as BorderRole, N as BoxPlotBox, O as BoxPlotChart, Q as BoxPlotChartProps, R as BrandAssetEditor, T as BrandAssetEditorProps, U as BrandAssetPreview, V as BrandMark, W as BrandMarkProps, X as BrandMarkSlot, Y as BrandMarkSurface, Z as BrandMarkTreatment, _ as BreadcrumbItem, $ as Breadcrumbs, a0 as BreadcrumbsProps, a1 as BudgetBar, a2 as BudgetBarProps, a3 as BudgetState, a4 as Button, a5 as ButtonClassesOptions, a6 as ButtonProps, a7 as ButtonSize, a8 as ButtonVariant, a9 as CHART_INK, aa as CMD_A, ab as CMD_DOT, ac as CMD_ENTER, ad as CMD_K, ae as CMD_S, af as COLUMN_COUNT_MAX, ag as COLUMN_COUNT_WIDTHS, ah as COLUMN_SHARES_EQUAL, ai as COLUMN_SHARE_MIN, aj as CONTROL_HEIGHTS, ak as CORNERS, al as Calendar, am as CalendarMode, an as CalendarProps, ao as Candle, ap as CandlestickChart, aq as CandlestickChartProps, ar as Card, as as CardPadding, at as CardProps, au as CardTone, av as CartesianPlot, aw as CartesianPlotProps, ax as CellStyle, ay as ChartBackgroundVariant, az as ChartBrush, aA as ChartBrushProps, aB as ChartCurve, aC as ChartDefs, aD as ChartDefsProps, aE as ChartDot, aF as ChartDotProps, aG as ChartDotVariant, aH as ChartFillVariant, aI as ChartFrame, aJ as ChartFrameProps, aK as ChartHighlightProvider, aL as ChartLegendEntry, aM as ChartLegendSwatch, aN as ChartRange, aO as ChartReferenceLine, aP as ChartRevealDirection, aQ as ChartSkeleton, aR as ChartSkeletonProps, aS as ChartStatusTone, aT as ChartStrokeVariant, aU as ChartTooltip, aV as ChartTooltipProps, aW as ChartTooltipRow, aX as ChatTemplate, aY as Checkbox, aZ as CheckboxProps, a_ as CheckoutTemplate, a$ as ChordChart, b0 as ChordChartProps, b1 as ColorPicker, b2 as ColorPickerPanel, b3 as ColorPickerPanelProps, b4 as ColorPickerProps, b5 as ColorPreset, b6 as ColorSwatch, b7 as ColorSwatchProps, b8 as ColorSwatchSize, b9 as ColoredBadge, ba as ColoredBadgeProps, bb as ColumnChart, bc as ColumnChartProps, C as ColumnDef, bd as ColumnSeries, be as ColumnShares, bf as ComposerAttachments, bg as ComposerAttachmentsProps, bh as ConfirmProvider, bi as ContainerFillChart, bj as ContainerFillChartProps, bk as ContainerFillItem, bl as ContextMenu, bm as ContextMenuPoint, bn as ContextMenuProps, bo as ContextMenuState, bp as ControlSize, bq as CornerOption, br as Corners, bs as CornersInput, bt as CornersInputProps, bu as CountBadge, bv as CountBadgeProps, bw as CountBadgeTone, bx as Curve, by as DAY_MS, bz as DashboardTemplate, bA as DataTable, bB as DataTableColumn, bC as DataTableColumnGroup, bD as DataTableHeader, bE as DataTablePage, bF as DataTableProps, bG as DataTableRowLink, bH as DataTableRowProps, bI as DatePicker, bJ as DatePickerProps, bK as DateRangePicker, bL as DateRangePickerProps, bM as DateTimePicker, bN as DateTimePickerProps, bO as DescriptionColumns, bP as DescriptionItem, bQ as DescriptionList, bR as DescriptionListProps, bS as Dialog, bT as DialogProps, bU as DialogSize, bV as DisplayChipItem, bW as DisplayChips, bX as DisplayChipsProps, bY as Divider, bZ as DividerProps, b_ as DividerSpacing, b$ as Drawer, c0 as DrawerProps, c1 as DrawerSide, c2 as DrawerSize, c3 as DropdownMenu, c4 as DropdownMenuAlign, c5 as DropdownMenuCheckboxItem, c6 as DropdownMenuDividerItem, c7 as DropdownMenuEntry, c8 as DropdownMenuItem, c9 as DropdownMenuLabelItem, ca as DropdownMenuLinkItem, cb as DropdownMenuProps, cc as DropdownMenuRadioItem, cd as DropdownMenuSide, ce as DropdownPositionOptions, cf as ELEVATION_LEVELS, cg as ENGLISH, ch as ENTER, ci as EditableGrid, cj as EditableGridProps, ck as ElevationLevel, cl as EmailTemplate, cm as EmptyState, cn as EmptyStateProps, co as EmptyValue, cp as EmptyValueProps, cq as ErrorBoundary, cr as ErrorBoundaryProps, cs as ErrorPage, ct as ErrorPageProps, cu as FONT_WEIGHTS, cv as FileIntake, cw as FilePicker, cx as FilePickerProps, cy as FillVariant, cz as FontWeightRole, cA as FormError, cB as FormErrorSummary, cC as FormErrorSummaryProps, cD as FormField, cE as FormFieldProps, cF as FormLayoutPage, cG as FunnelChart, cH as FunnelChartProps, cI as FunnelStage, cJ as GLASS_DIVIDER, cL as GROUP_COLORS, cM as GROUP_COLORS_SOLID, cN as GalleryTemplate, cO as Gap, cP as GlassOptions, cQ as GlobalSearch, cR as GlobalSearchProps, cS as Grid, cT as GridCols, cU as GridColumn, cV as GridProps, cW as HeatmapChart, cX as HeatmapChartProps, cY as HelpCenter, cZ as HelpCenterDoc, c_ as HelpCenterProps, c$ as HexInput, d0 as HistogramBin, d1 as HistogramChart, d2 as HistogramChartProps, d3 as Hsv, d4 as INPUT_BASE, d5 as INPUT_SIZES, d6 as IconButton, d7 as IconButtonClassesOptions, d8 as IconButtonProps, d9 as IconRail, da as IconRailButton, db as IconRailButtonProps, dc as IconRailLabels, dd as IconRailLabelsShown, de as IconRailOrientation, df as IconRailProps, dg as ImageFocusPoint, dh as ImageFocusPointProps, di as Inline, dj as InlineProps, dk as Input, dl as InputNumber, dm as InputNumberProps, dn as InputProps, dp as InputSize, dq as Justify, dr as Kanban, ds as KanbanColumn, dt as KanbanProps, du as Kbd, dv as KbdProps, dw as KbdSize, dx as KbdTone, dy as Label, dz as LabelClassesOptions, dA as LabelProps, dB as LadderScale, dC as LanguagePanel, dD as LanguagePanelProps, dE as LanguageSelect, dF as LanguageSelectProps, dG as LinearScale, dH as LinkFilter, dI as LinkFilterField, dJ as LinkKindChoice, dK as LinkOption, dL as LinkOptionGroup, dM as LinkPicker, dN as LinkPickerFieldProps, dO as LinkPickerProps, dP as LinkPickerWindowProps, dQ as LinkRules, dR as LinkTarget, dS as ListDrop, dT as ListFooter, dU as ListLoadError, dV as ListLoadErrorProps, dW as ListMove, dX as ListRow, dY as ListRowProps, dZ as LoadingSpinner, d_ as LoadingSpinnerProps, d$ as MAX_FRACTION_DIGITS, e0 as MENU_MAX_HEIGHT, e1 as MOD, e2 as MOTION, e3 as MOTION_DURATIONS, e4 as Markdown, e4 as MarkdownLite, e5 as MarkdownLiteProps, e5 as MarkdownProps, e6 as MediaUploadField, e7 as MediaUploadFieldProps, e8 as MediaUploadGrid, e9 as MediaUploadGridItem, ea as MediaUploadGridProps, eb as MenuPos, ec as Meter, ed as MeterProps, ee as MetricBar, ef as MetricBarProps, eg as Milestone, eh as MilestoneKind, ei as MilestoneTimeline, ej as MilestoneTimelineProps, ek as MotionSpeed, em as NEXT_CHUNK_PATH_PREFIX, en as NativeSelect, eo as NiceAxis, ep as NumericKeypad, eq as NumericKeypadProps, er as OVERLAY_OPEN_EVENT, es as PLACEHOLDER_INK, et as POPUP_MAX_WIDTH, eu as POST_PRODUCTION_STATUSES, ev as PageHeader, ew as PageHeaderProps, P as PaginatedResponse, ex as Pagination, ey as PaginationProps, ez as PaperclipGlyph, eA as Paragraph, eB as ParagraphProps, eC as PieChart, eD as PieChartProps, eE as PieSegment, eF as PlotGeometry, eG as Point, eH as Popover, eI as PopoverAlign, eJ as PopoverProps, eK as PopoverRenderProps, eL as PopoverSide, eM as PopupMenu, eN as PopupMenuDivider, eO as PopupMenuItem, eP as PopupMenuItemProps, eQ as PopupMenuLabel, eR as PopupMenuProps, eS as PopupSubmenu, eT as PopupSubmenuProps, eU as PortalBrandingContextValue, eV as PortalBrandingProvider, eW as PortalBrandingProviderProps, eX as ProductionTimeline, eY as ProductionTimelineProps, eZ as ProductionTimelineSnapshot, e_ as ProgressItem, e$ as PublicPortal, f0 as PublicPortalBranding, f1 as RADAR_SERIES_CAP, f2 as RADIUS_ROLES, f3 as ROW_HEIGHTS, f4 as RadarAxis, f5 as RadarChart, f6 as RadarChartProps, f7 as RadarSeries, f8 as RadialBarChart, f9 as RadialBarChartProps, fa as RadialBarRow, fb as Radio, fc as RadioGroup, fd as RadioGroupOption, fe as RadioGroupOrientation, ff as RadioGroupProps, fg as RadioProps, fh as RadiusRole, fi as Range, fj as RangeChart, fk as RangeChartProps, fl as RangeRow, fm as RankedBars, fn as RankedBarsProps, fo as RankedBarsRow, fp as ResizeHandle, fq as ResizeHandleOrientation, fr as ResizeHandleProps, fs as ResizeHandleSide, ft as ResizeHandleStackSide, fu as ResolvedPortalBrandAsset, fv as Result, fw as ResultProps, fx as ResultStatus, fy as RevealDirection, fz as SCATTER_SERIES_CAP, fA as SERIES_SLOT_COUNT, fB as SERIES_VARS, fC as SHELL_LANGUAGE_STORAGE_KEY, fD as SHIFT, fE as SPACING_ROLES, fF as SPACING_SCALE, fG as STAGES, fH as STALE_CHUNK_RELOAD_COOLDOWN_MS, fI as STALE_CHUNK_RELOAD_KEY, fJ as STATUS_VARS, fK as SankeyChart, fL as SankeyChartProps, fM as SankeyLink, fN as SankeyNode, fO as ScatterChart, fP as ScatterChartProps, fQ as ScatterPoint, fR as ScatterSeries, S as SearchConfig, fS as SearchListRoute, fT as SearchProvider, fU as SearchQuickAction, fV as SearchResponse, fW as SearchResult, fX as SearchableItem, fY as SearchableOption, fZ as SearchableOptionGroup, f_ as SearchableSelect, f$ as SearchableSelectBaseProps, g0 as SearchableSelectMultipleProps, g1 as SearchableSelectProps, g2 as Segmented, g3 as SegmentedOption, g4 as SegmentedProps, g5 as SegmentedSize, g6 as Select, g7 as SelectBaseProps, g8 as SelectItem, g9 as SelectMultipleProps, ga as SelectOption, gb as SelectOptionGroup, gc as SelectProps, gd as SemanticGroup, ge as SeriesSlots, gf as SettingRow, gg as SettingRowProps, gh as SeverityTone, gk as ShellLanguage, gl as ShellLanguageProvider, gm as ShellLanguageState, gn as ShellPrefsAdapter, go as ShellPrefsProvider, gp as SidebarActionButton, gq as SidebarActionButtonProps, gr as SidebarGroupLabel, gs as SidebarGroupLabelProps, gt as SidebarLayout, gu as SidebarLayoutProps, gv as SidebarNavGroup, gw as SidebarNavGroupProps, gx as SidebarNavItem, gy as SidebarNavItemProps, gz as Skeleton, gA as SkeletonProps, gB as SkeletonVariant, gC as Slider, gD as SliderProps, gE as SliderSize, gF as Snippet, gG as SnippetProps, gH as SnippetSize, gI as SnippetVariant, a as SortState, gJ as SortableList, gK as SortableListProps, gL as SortableListSpacing, gM as SpacingRole, gN as SpacingStep, gO as Sparkline, gP as SparklineProps, gQ as Stack, gR as StackProps, gS as StaleChunkReloadOptions, gT as StatCard, gU as StatCardProps, gV as StatTile, gW as StatTileProps, gX as Statistic, gY as StatisticProps, gZ as StatisticSize, g_ as StatisticTone, g$ as StatusBadge, h0 as StatusBadgeProvider, h1 as StatusEmphasis, h2 as StepItem, h3 as Stepper, h4 as StepperProps, h5 as StrokeVariant, h6 as SunburstChart, h7 as SunburstChartProps, h8 as SunburstNode, h9 as Switch, ha as SwitchProps, hb as SwitchSize, hc as TYPE_SCALE, hd as TabItem, he as Tabs, hf as TabsProps, hg as TagInput, hh as TagInputOption, hi as TagInputProps, hj as TagInputTone, hk as Text, hl as TextLinkField, hm as TextLinkFieldProps, hn as TextProps, ho as TextSize, hp as TextTone, hq as TextWeight, hr as Textarea, hs as TextareaProps, ht as Theme, hu as TileButton, hv as TileButtonProps, hw as TileSize, hx as TimeAgo, hy as TimeAgoProps, hz as TimePicker, hA as TimePickerProps, hB as TimeSeriesChart, hC as TimeSeriesChartProps, hD as TimeSeriesSeries, hE as TimelineMarker, hF as TimelineMarkerKind, hG as TimelineReport, hH as TimelineScrubProgress, hI as TimelineTrack, hJ as TimelineTrackItem, hK as TimelineTrackKind, hL as TimelineTrackPending, hM as TimelineTrackPhase, hN as TimelineTrackPlayback, hO as TimelineTrackProps, hP as TimelineTrackThumb, hQ as Title, hR as TitleLevel, hS as TitleProps, hT as ToastOptions, hU as ToastPlacement, hV as Tooltip, hW as TooltipProps, hX as TopNav, hY as TopNavItem, hZ as TopNavProps, h_ as Tree, h$ as TreeDrop, i0 as TreeEmptySlot, i1 as TreeEmptySlotProps, i2 as TreeGroup, i3 as TreeGroupLabel, i4 as TreeGroupProps, i5 as TreeMove, i6 as TreeProps, i7 as TreeRow, i8 as TreeRowProps, i9 as TreeSeam, ia as TreeSeamProps, ib as TreemapChart, ic as TreemapChartProps, id as TreemapItem, ie as TreemapTile, ig as TypeStep, ih as UseAppUpdateOptions, ii as UseContextMenu, ij as UseProductionTimelineOpts, ik as VERSION, il as VITE_PRELOAD_ERROR_EVENT, im as WaterfallChart, io as WaterfallChartProps, ip as WaterfallStep, iq as WidthsBar, ir as WidthsBarProps, is as ZLayer, it as Z_LAYERS, iu as angleScale, iv as appendKey, iw as applyCorners, ix as applyIconSet, iy as applyThemePrefs, iz as arcPath, iA as areaBetween, iB as areaFrom, iC as assignSeriesSlots, iD as autoHighlightIndex, iE as backspace, iF as bandScale, iG as binValues, iH as budgetState, iI as bumpPath, iJ as buttonClasses, iK as calcOverall, iL as calcReportOverall, iM as colorFill, iN as colorSwatchClasses, iO as columnSharesWidths, iP as confirm, iQ as confirmDestructive, iR as curvePath, iS as dashFor, iU as dismissPopups, iV as fillFor, iW as fillId, iX as fmtSliderDate, iY as fromDateKey, iZ as glassStyle, i_ as glowId, i$ as groundId, j0 as groupColors, j1 as hexToHsv, j2 as highlightOpacity, j3 as hsvToHex, j4 as iconButtonClasses, j5 as inputClasses, j6 as installStaleChunkReload, j7 as isMac, j8 as isSeverityTone, j9 as isSpacingStep, ja as isStaleChunkError, jc as labelClasses, jd as ladderScale, je as languageSelectWidth, jf as leavesContextMenuAlone, jg as linearPath, jh as linearScale, ji as logScale, jj as maskId, jk as matchShellLanguage, jl as mediaFileName, jm as monotonePath, jn as niceAxis, jo as niceMax, jp as openGlobalSearch, jq as parseHexColor, jr as polygonPoints, js as popupBounds, jt as prompt, ju as pushRecentSearch, jv as radiusScale, jw as readSavedShellLanguage, jx as registerModalEscapeInterceptor, jy as resolveBrandMarkTreatment, jz as resolveColumnShares, jA as resolveColumnWidths, jB as resolveCorners, jC as resolvePortalBrandAsset, jD as resolveSeriesColor, jE as resolveSeriesColorWithin, jF as resolveShellLanguage, jG as resolveTheme, jH as sanitizeRecentSearches, jI as saveShellLanguage, jJ as seriesColor, jK as severityOf, jL as splinePath, jM as squarify, jN as stagger, jO as stepPath, jP as tabButtonId, jQ as tabPanelId, jR as toDateKey, jS as toDayMs, jT as toISODate, jU as toast, jV as toggleSeriesSlot, jW as useAppUpdate, jX as useClickOutside, jY as useConfirm, jZ as useContextMenu, j_ as useDebouncedValue, j$ as useDropdownPosition, k0 as useFocusTrap, k1 as useHighlight, k2 as useIsMobile, k3 as useLocalStoragePrefs, k4 as usePlotWidth, k5 as usePortalBranding, k6 as useProductionTimeline, k7 as useScrollLock, k8 as useShellLanguage, k9 as useShellPrefs, ka as useStatusLabel, kb as useTheme } from '../index-C32oXyz3.js';
|
|
2
2
|
export { C as CurrencyFormat, D as DATE_FORMAT_OPTIONS, a as DateFormatKey, E as EMPTY_VALUE, F as FOCAL_DEFAULT, b as FOCAL_NUDGE_COARSE, c as FOCAL_NUDGE_STEP, d as FocalPoint, e as FormatDateOptions, f as FormatMoneyOptions, T as TZ_AUTO, g as TimeAgoOptions, h as currencyDecimals, i as currencySymbol, j as firstDayOfWeek, k as focalFromRect, l as formatBytes, m as formatDate, n as formatDateTime, o as formatFocal, p as formatMoney, q as formatTime, r as getUserDateFormat, s as getUserTimezone, t as nudgeFocal, u as parseFocal, v as setCurrencyFormats, w as setUserDateFormat, x as setUserTimezone, y as syncTimezoneFromProfile, z as timeAgo } from '../index-CHufemKB.js';
|
|
3
3
|
export { isSafeLinkHref } from '../markup/index.js';
|
|
4
4
|
export { FileIntakeAlert, FileIntakeLimits, FileIntakeOptions, FileRejection, FileRejectionReason, acceptsFile, useFileIntake } from '../file-intake/index.js';
|
package/dist/ui/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{APP_UPDATE_POLL_MS,Accordion,AlignmentGrid,AppUpdateBanner,AttachButton,AttachmentDropZone,AttachmentList,AuthScreen,Avatar,AvatarGroup,BORDER_WIDTHS,Banner,BoxPlotChart,BrandAssetEditor,BudgetBar,CHART_INK,COLUMN_COUNT_MAX,COLUMN_COUNT_WIDTHS,COLUMN_SHARES_EQUAL,COLUMN_SHARE_MIN,CONTROL_HEIGHTS,CORNERS,Calendar,CandlestickChart,Card,CartesianPlot,ChartBrush,ChartDefs,ChartDot,ChartFrame,ChartHighlightProvider,ChartSkeleton,ChartTooltip,ChatTemplate,Checkbox_default as Checkbox,CheckoutTemplate,ChordChart,ColorPicker,ColorPickerPanel,ColorSwatch,ColoredBadge,ColumnChart,ComposerAttachments,ContainerFillChart,ContextMenu,CornersInput,CountBadge,DAY_MS,DashboardTemplate,DataTable,DataTablePage,DatePicker_default as DatePicker,DateRangePicker,DateTimePicker_default as DateTimePicker,DescriptionList,DisplayChips,Divider,Drawer,DropdownMenu,ELEVATION_LEVELS,EmailTemplate,EmptyState,EmptyValue,ErrorBoundary,ErrorPage,FONT_WEIGHTS,FilePicker_default as FilePicker,FormErrorSummary,FormField,FormLayoutPage,FunnelChart,GROUP_COLORS,GROUP_COLORS_SOLID,GalleryTemplate,Grid,HeatmapChart,HelpCenter,HexInput,HistogramChart,IconButton_default as IconButton,IconRail,IconRailButton,ImageFocusPoint,Inline,Input_default as Input,InputNumber_default as InputNumber,Kanban,Label,LanguagePanel,LanguageSelect,LinkPicker,ListFooter,ListLoadError,ListRow,MAX_FRACTION_DIGITS,MOTION,MOTION_DURATIONS,Markdown,Markdown as MarkdownLite,MediaUploadField,MediaUploadGrid,Meter,MetricBar,MilestoneTimeline,NativeSelect,NumericKeypad,POST_PRODUCTION_STATUSES,PageHeader,Pagination,PaperclipGlyph,Paragraph,PieChart,Popover,PortalBrandingProvider,ProductionTimeline,RADAR_SERIES_CAP,RADIUS_ROLES,ROW_HEIGHTS,RadarChart,RadialBarChart,Radio_default as Radio,RadioGroup,RangeChart,RankedBars,SCATTER_SERIES_CAP,SERIES_SLOT_COUNT,SERIES_VARS,SPACING_ROLES,SPACING_SCALE,STAGES,STATUS_VARS,SankeyChart,ScatterChart,SearchableSelect,Segmented,Select_default as Select,SettingRow,SidebarActionButton,SidebarGroupLabel,SidebarNavGroup,SidebarNavItem,Skeleton,Slider,Snippet,SortableList,Sparkline,Stack,StatCard,StatTile,Statistic,StatusBadge,StatusBadgeProvider,Stepper,SunburstChart,Switch_default as Switch,TYPE_SCALE,Tabs,TagInput,Text,TextLinkField,Textarea_default as Textarea,TileButton_default as TileButton,TimeAgo,TimePicker_default as TimePicker,TimeSeriesChart,TimelineTrack,Title,TopNav,Tree,TreeEmptySlot,TreeGroup,TreeGroupLabel,TreeRow,TreeSeam,TreemapChart,WaterfallChart,WidthsBar,angleScale,appendKey,applyCorners,applyIconSet,applyThemePrefs,arcPath,areaBetween,areaFrom,assignSeriesSlots,autoHighlightIndex,backspace,bandScale,binValues,budgetState,bumpPath,calcOverall,calcReportOverall,colorFill,colorSwatchClasses,columnSharesWidths,curvePath,dashFor,fillFor,fillId,fmtSliderDate,fromKey as fromDateKey,glowId,groundId,groupColors,hexToHsv,highlightOpacity,hsvToHex,isSeverityTone,isSpacingStep,labelClasses,ladderScale,languageSelectWidth,linearPath,linearScale,logScale,maskId,mediaFileName,monotonePath,niceAxis,niceMax,parseHexColor,polygonPoints,radiusScale,resolveColumnShares,resolveColumnWidths,resolveCorners,resolvePortalBrandAsset,resolveSeriesColor,resolveSeriesColorWithin,resolveTheme,seriesColor,severityOf,splinePath,squarify,stagger,stepPath,tabButtonId,tabPanelId,toKey as toDateKey,toDayMs,toISODate,toggleSeriesSlot,useAppUpdate,useClickOutside,useContextMenu,useDebouncedValue,useHighlight,usePlotWidth,usePortalBranding,useProductionTimeline,useStatusLabel,useTheme}from"../chunk-
|
|
2
|
+
export{APP_UPDATE_POLL_MS,Accordion,AlignmentGrid,AppUpdateBanner,AttachButton,AttachmentDropZone,AttachmentList,AuthScreen,Avatar,AvatarGroup,BORDER_WIDTHS,Banner,BoxPlotChart,BrandAssetEditor,BudgetBar,CHART_INK,COLUMN_COUNT_MAX,COLUMN_COUNT_WIDTHS,COLUMN_SHARES_EQUAL,COLUMN_SHARE_MIN,CONTROL_HEIGHTS,CORNERS,Calendar,CandlestickChart,Card,CartesianPlot,ChartBrush,ChartDefs,ChartDot,ChartFrame,ChartHighlightProvider,ChartSkeleton,ChartTooltip,ChatTemplate,Checkbox_default as Checkbox,CheckoutTemplate,ChordChart,ColorPicker,ColorPickerPanel,ColorSwatch,ColoredBadge,ColumnChart,ComposerAttachments,ContainerFillChart,ContextMenu,CornersInput,CountBadge,DAY_MS,DashboardTemplate,DataTable,DataTablePage,DatePicker_default as DatePicker,DateRangePicker,DateTimePicker_default as DateTimePicker,DescriptionList,DisplayChips,Divider,Drawer,DropdownMenu,ELEVATION_LEVELS,EmailTemplate,EmptyState,EmptyValue,ErrorBoundary,ErrorPage,FONT_WEIGHTS,FilePicker_default as FilePicker,FormErrorSummary,FormField,FormLayoutPage,FunnelChart,GROUP_COLORS,GROUP_COLORS_SOLID,GalleryTemplate,Grid,HeatmapChart,HelpCenter,HexInput,HistogramChart,IconButton_default as IconButton,IconRail,IconRailButton,ImageFocusPoint,Inline,Input_default as Input,InputNumber_default as InputNumber,Kanban,Label,LanguagePanel,LanguageSelect,LinkPicker,ListFooter,ListLoadError,ListRow,MAX_FRACTION_DIGITS,MOTION,MOTION_DURATIONS,Markdown,Markdown as MarkdownLite,MediaUploadField,MediaUploadGrid,Meter,MetricBar,MilestoneTimeline,NativeSelect,NumericKeypad,POST_PRODUCTION_STATUSES,PageHeader,Pagination,PaperclipGlyph,Paragraph,PieChart,Popover,PortalBrandingProvider,ProductionTimeline,RADAR_SERIES_CAP,RADIUS_ROLES,ROW_HEIGHTS,RadarChart,RadialBarChart,Radio_default as Radio,RadioGroup,RangeChart,RankedBars,SCATTER_SERIES_CAP,SERIES_SLOT_COUNT,SERIES_VARS,SPACING_ROLES,SPACING_SCALE,STAGES,STATUS_VARS,SankeyChart,ScatterChart,SearchableSelect,Segmented,Select_default as Select,SettingRow,SidebarActionButton,SidebarGroupLabel,SidebarNavGroup,SidebarNavItem,Skeleton,Slider,Snippet,SortableList,Sparkline,Stack,StatCard,StatTile,Statistic,StatusBadge,StatusBadgeProvider,Stepper,SunburstChart,Switch_default as Switch,TYPE_SCALE,Tabs,TagInput,Text,TextLinkField,Textarea_default as Textarea,TileButton_default as TileButton,TimeAgo,TimePicker_default as TimePicker,TimeSeriesChart,TimelineTrack,Title,TopNav,Tree,TreeEmptySlot,TreeGroup,TreeGroupLabel,TreeRow,TreeSeam,TreemapChart,WaterfallChart,WidthsBar,angleScale,appendKey,applyCorners,applyIconSet,applyThemePrefs,arcPath,areaBetween,areaFrom,assignSeriesSlots,autoHighlightIndex,backspace,bandScale,binValues,budgetState,bumpPath,calcOverall,calcReportOverall,colorFill,colorSwatchClasses,columnSharesWidths,curvePath,dashFor,fillFor,fillId,fmtSliderDate,fromKey as fromDateKey,glowId,groundId,groupColors,hexToHsv,highlightOpacity,hsvToHex,isSeverityTone,isSpacingStep,labelClasses,ladderScale,languageSelectWidth,linearPath,linearScale,logScale,maskId,mediaFileName,monotonePath,niceAxis,niceMax,parseHexColor,polygonPoints,radiusScale,resolveColumnShares,resolveColumnWidths,resolveCorners,resolvePortalBrandAsset,resolveSeriesColor,resolveSeriesColorWithin,resolveTheme,seriesColor,severityOf,splinePath,squarify,stagger,stepPath,tabButtonId,tabPanelId,toKey as toDateKey,toDayMs,toISODate,toggleSeriesSlot,useAppUpdate,useClickOutside,useContextMenu,useDebouncedValue,useHighlight,usePlotWidth,usePortalBranding,useProductionTimeline,useStatusLabel,useTheme}from"../chunk-H2NSZMFS.js";export{Breadcrumbs}from"../chunk-Z2TTHY7G.js";export{ResizeHandle,SidebarLayout}from"../chunk-VFBUDSMF.js";export{BrandMark,GlobalSearch,openGlobalSearch,pushRecent as pushRecentSearch,resolveBrandMarkTreatment,sanitizeRecent as sanitizeRecentSearches}from"../chunk-BQ7GR7H6.js";export{EditableGrid}from"../chunk-7BX3JQBP.js";import"../chunk-BR22X7E5.js";export{INPUT_BASE,INPUT_SIZES,PLACEHOLDER_INK,inputClasses}from"../chunk-HJQAE6SP.js";export{isSafeLinkHref}from"../chunk-PJPK2ADX.js";export{ENGLISH,SHELL_LANGUAGE_STORAGE_KEY,ShellLanguageProvider,matchShellLanguage,readSavedShellLanguage,resolveShellLanguage,saveShellLanguage,useShellLanguage}from"../chunk-RBKIYZ7H.js";export{toast_default as toast}from"../chunk-RUHUTZN4.js";export{ALT,ALT_SHIFT_D,ALT_SHIFT_E,ALT_SHIFT_N,CMD_A,CMD_DOT,CMD_ENTER,CMD_K,CMD_S,ENTER,Kbd,LoadingSpinner,MOD,NEXT_CHUNK_PATH_PREFIX,Result,SHIFT,STALE_CHUNK_RELOAD_COOLDOWN_MS,STALE_CHUNK_RELOAD_KEY,ShellPrefsProvider,VITE_PRELOAD_ERROR_EVENT,installStaleChunkReload,isMac,isStaleChunkError,useIsMobile,useLocalStoragePrefs,useShellPrefs}from"../chunk-ZRU5F2XT.js";import"../chunk-5A7MWTXX.js";export{Button_default as Button,MENU_MAX_HEIGHT,POPUP_MAX_WIDTH,Tooltip,popupBounds,useDropdownPosition}from"../chunk-WYNQLAKD.js";export{ConfirmProvider,Dialog,confirm,confirmDestructive,prompt,useConfirm,useFocusTrap,useScrollLock}from"../chunk-QBXX5A7U.js";export{PopupMenu,PopupMenuDivider,PopupMenuItem,PopupMenuLabel,PopupSubmenu,leavesContextMenuAlone}from"../chunk-IQDY2YFN.js";import"../chunk-UVBK6YSR.js";export{buttonClasses,iconButtonClasses}from"../chunk-JTNKC4CR.js";export{GLASS_DIVIDER,glassStyle}from"../chunk-7IQ3B77H.js";export{OVERLAY_OPEN_EVENT,Z_LAYERS,dismissPopups,registerModalEscapeInterceptor}from"../chunk-FIEA5CGB.js";import"../chunk-D65T4H6J.js";export{VERSION}from"../chunk-N7UO5JMD.js";import"../chunk-KNUR2UEG.js";export{FileIntakeAlert,acceptsFile,useFileIntake}from"../chunk-M4TRVJTO.js";export{DEFAULT_SHELL_STRINGS,ShellStringsProvider,useShellLocale,useShellStrings}from"../chunk-QRCDQPJA.js";import"../chunk-C3QOHMR6.js";export{FOCAL_DEFAULT,FOCAL_NUDGE_COARSE,FOCAL_NUDGE_STEP,focalFromRect,formatFocal,nudgeFocal,parseFocal}from"../chunk-AP2QEJXQ.js";export{DATE_FORMAT_OPTIONS,EMPTY_VALUE,TZ_AUTO,currencyDecimals,currencySymbol,firstDayOfWeek,formatBytes,formatDate,formatDateTime,formatMoney,formatTime,getUserDateFormat,getUserTimezone,setCurrencyFormats,setUserDateFormat,setUserTimezone,syncTimezoneFromProfile,timeAgo}from"../chunk-W32SKK3D.js";export{ICON_NAMES,isIconName}from"../chunk-KBOYLXAT.js";export{Icon,activeIconSet,iconSets,iconsVersion,registerIconSet,registerIcons,resolveIcon,setDefaultIconSet,setIconSet,subscribeIcons}from"../chunk-ZGUQLVY4.js";
|
package/dist/ui.css
CHANGED
|
@@ -252,8 +252,8 @@
|
|
|
252
252
|
--space-panel-pad-narrow: var(--space-12);
|
|
253
253
|
--space-panel-setting: var(--space-32);
|
|
254
254
|
|
|
255
|
-
/* Control heights: button, field, select, segmented control, filter chip
|
|
256
|
-
sidebar row
|
|
255
|
+
/* Control heights: button, field, select, segmented control, filter chip.
|
|
256
|
+
Menu, list and sidebar rows are --row-height-menu below. */
|
|
257
257
|
--control-height-sm: 1.5rem;
|
|
258
258
|
--control-height-md: 2rem;
|
|
259
259
|
--control-height-lg: 2.5rem;
|
|
@@ -264,7 +264,7 @@
|
|
|
264
264
|
it stays 32. */
|
|
265
265
|
--row-height-menu: 2.25rem;
|
|
266
266
|
--row-height-window-bar: 2.75rem;
|
|
267
|
-
--row-height-compact-bar:
|
|
267
|
+
--row-height-compact-bar: var(--control-height-md);
|
|
268
268
|
}
|
|
269
269
|
|
|
270
270
|
/* The default `utils/glass.ts` already assumes at `getMenuOpacity()`'s
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "efficient-shell",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.14.3",
|
|
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-HDGFEYPU.js";import{useWidgetSettings as n}from"./chunk-AEAPCPOG.js";import"./chunk-DSSLOQDW.js";import"./chunk-SCJT2XXU.js";import"./chunk-ZRU5F2XT.js";import"./chunk-5A7MWTXX.js";import"./chunk-A7TXAKTX.js";import"./chunk-QBXX5A7U.js";import"./chunk-IQDY2YFN.js";import"./chunk-UVBK6YSR.js";import"./chunk-JTNKC4CR.js";import"./chunk-7IQ3B77H.js";import"./chunk-FIEA5CGB.js";import"./chunk-D65T4H6J.js";import"./chunk-KNUR2UEG.js";import"./chunk-QRCDQPJA.js";import"./chunk-C3QOHMR6.js";import{Icon as r}from"./chunk-ZGUQLVY4.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 d="calc_appearance";function h(){const[h,m]=l("0"),[b,k]=l(null),[p,g]=l(null),[y,N]=l(!1),[x,f]=l(""),[v,C]=l([]),[$,j]=l(!1),[w,E]=l(()=>e(d)),[T,A]=l(!1),[S,X]=l(w),F=c(null);n(i(()=>{X({...w}),A(!0)},[w]));const U=i(e=>{f(""),m(t=>y||"0"===t?(N(!1),"."===e?"0.":e):"."===e&&t.includes(".")?t:t+e)},[y]),D=i(()=>{m("0"),k(null),g(null),N(!1)},[]),Q=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}},[]),B=i(e=>{const t=parseFloat(h);if(null!==b&&p&&!y){const e=Q(b,t,p);m(String(e)),k(e),C(n=>[`${b} ${p} ${t} = ${e}`,...n].slice(0,20))}else k(t);g(e),N(!0)},[h,b,p,y,Q]),R=i(()=>{if(null===b||!p)return;const e=parseFloat(h),t=Q(b,e,p),n=`${b} ${p} ${e} =`;C(e=>[`${n} ${t}`,...e].slice(0,20)),f(n),m(String(t)),k(null),g(null),N(!0)},[h,b,p,Q]),W=i(()=>{m(e=>String(parseFloat(e)/100))},[]),G=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"?U(e.key):"."===e.key?U("."):"+"===e.key?B("+"):"-"===e.key?B("-"):"*"===e.key?B("×"):"/"===e.key?(e.preventDefault(),B("÷")):"Enter"===e.key||"="===e.key?("Enter"===e.key&&e.target instanceof Node&&F.current?.contains(e.target)&&e.preventDefault(),R()):"Escape"===e.key?D():"Backspace"===e.key?m(e=>e.length>1?e.slice(0,-1):"0"):"%"===e.key&&W())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[U,B,R,D,W]);const I="flex items-center justify-center rounded-lg text-sm font-medium transition-colors",J=`${I} bg-white border border-gray-200 text-gray-900 hover:bg-gray-50 active:bg-gray-100`,L=`${I} bg-blue-50 border border-blue-200 text-blue-700 hover:bg-blue-100 active:bg-blue-200`,O=`${I} bg-gray-100 border border-gray-200 text-gray-600 hover:bg-gray-200 active:bg-gray-300`,P=`${I} bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800`;/* @__PURE__ */
|
|
2
|
-
return o(s,{children:[
|
|
3
|
-
/* @__PURE__ */o("div",{ref:F,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!==b)&&/* @__PURE__ */u("div",{className:"text-base text-slate-600 text-right font-mono",children:x||`${b} ${p} ${y?"":h}`}),
|
|
6
|
-
/* @__PURE__ */o("div",{className:"flex items-center gap-2",children:[
|
|
7
|
-
/* @__PURE__ */u("button",{onClick:()=>{navigator.clipboard.writeText(h),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)})(h)})]})]}),
|
|
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:D,className:O,children:"AC"}),
|
|
11
|
-
/* @__PURE__ */u("button",{onClick:G,className:O,children:"+/−"}),
|
|
12
|
-
/* @__PURE__ */u("button",{onClick:W,className:O,children:"%"}),
|
|
13
|
-
/* @__PURE__ */u("button",{onClick:()=>B("÷"),className:`${L} ${"÷"===p?"ring-2 ring-blue-400":""}`,children:"÷"}),
|
|
14
|
-
/* @__PURE__ */u("button",{onClick:()=>U("7"),className:J,children:"7"}),
|
|
15
|
-
/* @__PURE__ */u("button",{onClick:()=>U("8"),className:J,children:"8"}),
|
|
16
|
-
/* @__PURE__ */u("button",{onClick:()=>U("9"),className:J,children:"9"}),
|
|
17
|
-
/* @__PURE__ */u("button",{onClick:()=>B("×"),className:`${L} ${"×"===p?"ring-2 ring-blue-400":""}`,children:"×"}),
|
|
18
|
-
/* @__PURE__ */u("button",{onClick:()=>U("4"),className:J,children:"4"}),
|
|
19
|
-
/* @__PURE__ */u("button",{onClick:()=>U("5"),className:J,children:"5"}),
|
|
20
|
-
/* @__PURE__ */u("button",{onClick:()=>U("6"),className:J,children:"6"}),
|
|
21
|
-
/* @__PURE__ */u("button",{onClick:()=>B("-"),className:`${L} ${"-"===p?"ring-2 ring-blue-400":""}`,children:"−"}),
|
|
22
|
-
/* @__PURE__ */u("button",{onClick:()=>U("1"),className:J,children:"1"}),
|
|
23
|
-
/* @__PURE__ */u("button",{onClick:()=>U("2"),className:J,children:"2"}),
|
|
24
|
-
/* @__PURE__ */u("button",{onClick:()=>U("3"),className:J,children:"3"}),
|
|
25
|
-
/* @__PURE__ */u("button",{onClick:()=>B("+"),className:`${L} ${"+"===p?"ring-2 ring-blue-400":""}`,children:"+"}),
|
|
26
|
-
/* @__PURE__ */u("button",{onClick:()=>U("0"),className:`${J} col-span-2`,children:"0"}),
|
|
27
|
-
/* @__PURE__ */u("button",{onClick:()=>U("."),className:J,children:"."}),
|
|
28
|
-
/* @__PURE__ */u("button",{onClick:R,className:P,children:"="})]})]}),
|
|
29
|
-
/* @__PURE__ */u(t,{open:T,onClose:()=>A(!1),title:"Calculator Settings",appearance:S,onAppearanceChange:X,onSave:()=>{E(S),localStorage.setItem(d,JSON.stringify(S)),A(!1)}})]})}export{h as default};
|