efficient-shell 5.6.0 → 5.6.1
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 +5 -2
- package/dist/{Browser-6QB2QTO7.js → Browser-RXGEZ77D.js} +18 -18
- package/dist/Calculator-MVPKTZZF.js +29 -0
- package/dist/ConfirmDialog-XOYCYFA7.js +1 -0
- package/dist/{CurrencyConverter-YJ47A3L5.js → CurrencyConverter-2IGOOR3I.js} +9 -9
- package/dist/{Documents-TGGI2QBV.js → Documents-YBLR7WVX.js} +22 -22
- package/dist/{Files-KSDK3EO4.js → Files-7XNR5IL2.js} +87 -87
- package/dist/{Notepad-EKB6FJPR.js → Notepad-ZQYQXV75.js} +14 -14
- package/dist/PdfViewer-SQVMMA7B.js +1 -0
- package/dist/{PomodoroTimer-RD5GRRA5.js → PomodoroTimer-XIUN4M73.js} +7 -7
- package/dist/{Preview-AQVXKT2I.js → Preview-YCOA5JPP.js} +126 -126
- package/dist/{Sidebar-VYXN5YIJ.js → Sidebar-VI7E3EKI.js} +8 -8
- package/dist/{Spreadsheet-INXG5UMI.js → Spreadsheet-SRAUU3OA.js} +13 -13
- package/dist/{Stock-CBQN2IJF.js → Stock-7EKOAQ7C.js} +3 -3
- package/dist/{Weather-2EVUTIXX.js → Weather-RWI6NKB2.js} +15 -15
- package/dist/{WorldClock-TZUF7MOB.js → WorldClock-CEHWDFEO.js} +6 -6
- package/dist/apps/index.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/{chunk-3GPU3JOW.js → chunk-5ABLFFC5.js} +7 -7
- package/dist/{chunk-PKEQ7XOH.js → chunk-7WC3EOFS.js} +1 -1
- package/dist/{chunk-RCHCT7AO.js → chunk-F6B3J3GW.js} +1 -1
- package/dist/{chunk-ZUCYJAQH.js → chunk-IMMHJIV5.js} +4 -4
- package/dist/{chunk-HRLPFUPB.js → chunk-P4CIOJHP.js} +3 -3
- package/dist/{chunk-Z2353HNE.js → chunk-RBDGN4YU.js} +5 -5
- package/dist/{chunk-RDQ7OXUA.js → chunk-RC2EG6P4.js} +300 -300
- package/dist/chunk-SFCDHHQP.js +1 -0
- package/dist/{chunk-L5XA5MLK.js → chunk-VWBQ2P5G.js} +46 -46
- package/dist/{chunk-R4XSSHDI.js → chunk-WWF2EQXF.js} +1 -1
- package/dist/{chunk-FROOMUJ7.js → chunk-YGC7AX3X.js} +6 -6
- package/dist/{chunk-MLYC5VQI.js → chunk-YIH6JLMV.js} +2 -2
- package/dist/{chunk-JEM73E4C.js → chunk-Z7D6Y5WA.js} +13 -13
- package/dist/{index-BgM75MC6.d.ts → index-ZI6vl2Wq.d.ts} +2 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +99 -99
- package/dist/map/index.js +4 -4
- package/dist/page-tabs/index.js +5 -5
- package/dist/pdf/index.js +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.js +1 -1
- package/package.json +1 -1
- package/dist/Calculator-KOWRV2VK.js +0 -29
- package/dist/ConfirmDialog-32NLLK4K.js +0 -1
- package/dist/PdfViewer-KW5B44AX.js +0 -1
- package/dist/chunk-WRBXEZFN.js +0 -1
package/dist/map/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{Button_default as e}from"../chunk-OGXU7QFW.js";import{rootIsDark as t,ROOT_THEME_ATTRIBUTES as n}from"../chunk-HZZNJHRH.js";import"../chunk-X4FJ54PP.js";import"../chunk-D65T4H6J.js";import{CollapseFallback as r,ExpandFallback as o,CloseFallback as a}from"../chunk-6LTDJKIL.js";import{useShellStrings as l}from"../chunk-TNBCUZVE.js";import"../chunk-C3QOHMR6.js";import{Icon as i}from"../chunk-XWSWYMGM.js";import{useRef as s,useState as c,useEffect as u,useCallback as d,useMemo as p,useSyncExternalStore as m}from"react";import{createPortal as h}from"react-dom";import{jsxs as g,jsx as f,Fragment as y}from"react/jsx-runtime";import{useQuery as b}from"@tanstack/react-query";var x="maplibregl-compact-show";function v(e){if(!e)return()=>{};const t=()=>!!e.classList.contains(x)&&(e.classList.remove(x),!0);if(t())return()=>{};const n=new MutationObserver(()=>{t()&&n.disconnect()});return n.observe(e,{attributes:!0,attributeFilter:["class"]}),()=>n.disconnect()}var w=20,k=12,N=480,M={center:[0,0],left:[w,0],right:[-20,0],top:[0,w],"top-left":[0,w],"top-right":[0,w],bottom:[0,-20],"bottom-left":[0,-20],"bottom-right":[0,-20]},C=(e,t=12)=>Math.max(0,Math.floor(e-t-k-w-10-16));function L(e,t,n,r=12){const o=e.y-w-r,a=n.height-e.y-w-k,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<k?(s="-left",c=Math.max(0,k-e.x)):e.x+t.width/2>n.width-k&&(s="-right",c=-Math.max(0,e.x-(n.width-k))),{anchor:`${l?"bottom":"top"}${s}`,move:{x:c,y:i}}}var $="maplibre-gl-worker.mjs",E=e=>`/maplibre-gl/${e}/${$}`,S=null;function j(){return S??=Promise.all([import("maplibre-gl"),import("maplibre-gl/dist/maplibre-gl.css")]).then(([e])=>(e.setWorkerUrl(E(e.getVersion())),e)).catch(e=>{throw S=null,e}),S}var z=24,A=28,R=29;function T(e){const t=[...e].sort((e,t)=>e-t),n=[];for(let e=0;e<t.length;){let r=e;for(;r+1<t.length&&t[r+1]===t[r]+1;)r++;n.push(r===e?String(t[e]):`${t[e]}–${t[r]}`),e=r+1}return n.join(", ")}function O(e){const t=Math.max(A,12+8*e.length);return t+t%2}var B=(e,t,n,r)=>({left:e-n/2,top:t-r/2,right:e+n/2,bottom:t+r/2});function W(e,t){return e.left<t.right+1&&t.left<e.right+1&&e.top<t.bottom+1&&t.top<e.bottom+1}var F=e=>B(e.x,e.y,e.width,e.height);function K(e){for(let t=0;t<e.length;t++)for(let n=t+1;n<e.length;n++)if(W(F(e[t]),F(e[n])))return[e[t],e[n]];return null}function q(e,t=[]){const n=[],r=e=>t.some(t=>W(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:A,height:A,under:0}));for(let e=K(o);e;e=K(o)){const[t,n]=e;t.keys.push(...n.keys),t.stops.push(...n.stops),t.stops.sort((e,t)=>e-t),t.width=O(T(t.stops)),o=o.filter(e=>e!==n)}o=o.filter(e=>!r(F(e))||(n.push(...e.keys),!1));const a=[];for(const t of e){if(null!==t.stop)continue;const e=B(t.x,t.y,z,z),l=o.find(t=>W(F(t),e));if(l||r(e)){n.push(t.key),l&&l.under++;continue}const i=a.find(t=>W(F(t),e));i?i.keys.push(t.key):a.push({keys:[t.key],stops:[],x:t.x,y:t.y,width:z,height:z,under:0})}return{groups:[...o,...a],hidden:n}}function _(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 H(e){const t=new MutationObserver(e);return t.observe(document.documentElement,{attributes:!0,attributeFilter:n}),()=>t.disconnect()}var P=t;var I="routes",Z=["routes-road","routes-estimate"];function D(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(),G(n)}function G(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 J={light:"https://tiles.openfreemap.org/styles/positron",dark:"https://tiles.openfreemap.org/styles/dark"},U={center:[30,20],zoom:1},V="ring-2 ring-gray-900 ring-offset-2";var X="var(--color-gray-600, #4b5563)",Q="http://www.w3.org/2000/svg",Y=()=>window.matchMedia("(prefers-reduced-motion: reduce)").matches,ee=/^(?:\d+|[xytrblse](?:-\d+)?|solid|dashed|dotted|double|hidden|none)$/;function te(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-")&&!ee.test(r.slice(7))})}var ne=(...e)=>e.filter(Boolean).join(" ");function re(e){const t=document.createElementNS(Q,"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(Q,"path");e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-linejoin","round"),e.setAttribute("d",n),t.appendChild(e)}return t}function oe(e,t){for(const[n,r]of Object.entries(t??{}))e.dataset[n]=r}var ae=(e,t)=>ne("relative grid place-items-center rounded-full cursor-pointer",t&&(null!=e.stop?"h-7 w-7":"h-6 w-6"));function le(e,t,n,r){const o=t&&!r&&null==e.stop&&!e.dot;return ne("grid place-items-center rounded-full border-2 font-semibold leading-none shadow-md transition-transform motion-reduce:transition-none",!te(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-[10px] [&_svg]:h-3.5 [&_svg]:w-3.5",t&&(o?"ring-2 ring-gray-900 ring-offset-1":V),e.approximate&&"border-dashed opacity-80",e.faded&&!t&&"opacity-40",n&&"scale-125 opacity-100")}var ie=e=>ne("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",!te(e.tone??"")&&"border-white",e.tone??"bg-gray-900 text-white");function se({pins:t,selectedKey:n,focus:r,onSelect:o,ariaLabel:a,className:i="",children:p,routes:y,fitTo:b,attribution:x,marks:w,groupCrowded:k=!1,noun:N,highlightKey:$=null,picking:E=!1,onPick:S,card:R,cardMinMapWidth:O=480,fullScreen:B,initialView:W=U,cooperativeGestures:F=!1}){const K=l().map,Q=s(null),ee=s(null),te=s(null),se=s(null),de=s([]),pe=s(/* @__PURE__ */new Map),me=s(/* @__PURE__ */new Map),he=s(/* @__PURE__ */new Map),ge=s(null),fe=s(/* @__PURE__ */new Map),ye=s(""),[be,xe]=c(!1),[ve,we]=c(!1),ke=m(H,P,()=>!1)?"dark":"light",Ne=s({onSelect:o,onPick:S,picking:E,pins:t,selectedKey:n,highlightKey:$,groupCrowded:k,strings:K,noun:N});u(()=>{Ne.current={onSelect:o,onPick:S,picking:E,pins:t,selectedKey:n,highlightKey:$,groupCrowded:k,strings:K,noun:N}});const Me=d(()=>{const e=te.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:Y()?0:400})},[]),Ce=s(!1),Le=d((e,t)=>{const n=te.current,r=se.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)=>_(e,i.filter((e,n)=>n!==t),o))),{clientWidth:c,clientHeight:u}=n.getContainer(),d=n.cameraForBounds(l,{padding:Math.min(64,c/4,u/4)})?.zoom??18,p=document.activeElement===t;Ce.current=!0,n.once("moveend",()=>{if(Ce.current=!1,!p)return;const e=a[0].key,t=pe.current.get(e)?.button,n=t&&"none"!==t.style.display?t:[...me.current.values()].find(t=>t.keys.includes(e))?.button;n?.focus({preventScroll:!0})}),n.easeTo({center:l.getCenter(),zoom:Math.min(18,Math.max(o+1,Math.min(d,s))),duration:Y()?0:600})},[]),$e=d(()=>{const e=te.current,t=se.current;if(!e||!t||!Q.current||Ce.current&&e.isMoving())return;const{selectedKey:n,highlightKey:r,groupCrowded:o,strings:a,noun:l}=Ne.current;for(const[e,t]of pe.current){const a=le(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=[...Q.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=q([...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?T(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=ne("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-[0.6rem]":"h-6 w-6 text-[0.7rem]",null!=n&&r.keys.includes(n)&&V);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?A:z),height:t.button.offsetHeight||(null!=t.pin.stop?A:z)}:n?{at:n.mark,width:n.element.offsetWidth||A,height:n.element.offsetHeight||A}: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]);u(()=>{if($e(),!Q.current)return;const e=new ResizeObserver(()=>$e());e.observe(Q.current);for(const t of Q.current.children)t.contains(ee.current)||e.observe(t);return()=>e.disconnect()}),u(()=>{let e=!1,t=null,n=null,r=()=>{};return(async()=>{try{const o=await j();if(e||!ee.current)return;se.current=o,t=new o.Map({container:ee.current,style:J[ke],center:W.center,zoom:W.zoom,attributionControl:x?{compact:!0,customAttribution:x}:{compact:!0},dragRotate:!1,pitchWithRotate:!1,touchPitch:!1,maxPitch:0,cooperativeGestures:"coarse"===F?window.matchMedia("(pointer: coarse)").matches:F}),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(W.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=v(ee.current.querySelector(".maplibregl-ctrl-attrib"));const l=t;n=new ResizeObserver(()=>{l.resize(),Me()}),n.observe(ee.current),te.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(),te.current=null}},[]);const Ee=s(ke);u(()=>{be&&te.current&&Ee.current!==ke&&(Ee.current=ke,te.current.setStyle(J[ke]))},[be,ke]),u(()=>{const e=te.current,n=se.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=ae(o,k);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(oe(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(re(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=ne("absolute -right-2 -top-2 grid h-4 min-w-4 place-items-center rounded-full px-0.5 text-[9px] font-semibold leading-none shadow",o.badgeTone??"bg-white text-gray-900"),e.textContent=o.badge,t.appendChild(e)}t.addEventListener("click",e=>{e.stopPropagation(),Ne.current.onSelect(o.key)}),de.current.push(new n.Marker({element:t,anchor:"center"}).setLngLat([o.lng,o.lat]).addTo(e)),pe.current.set(o.key,{pin:o,button:t,mark:i,name:a,title:l})}for(const t of w??[]){const r=document.createElement("div");r.dataset.mapMark=t.key,oe(r,t.data),r.className=ie(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,w,k,$e]),u(()=>{be&&$e()},[be,n,$,$e]),u(()=>{if(!be||!n)return;const e=requestAnimationFrame(Me);return()=>cancelAnimationFrame(e)},[be,n,Me]),u(()=>{const e=te.current,n=se.current,r=b?[...t,...w??[]].filter(e=>b.includes(e.key)):t;if(!be||!e||!n||0===r.length)return;const o=r.map(e=>`${e.key}@${e.lat},${e.lng}`).sort().join("|");if(ye.current===o)return;const a=""===ye.current;if(ye.current=o,1===r.length)return void e.jumpTo({center:[r[0].lng,r[0].lat],zoom:13});const l=new n.LngLatBounds([r[0].lng,r[0].lat],[r[0].lng,r[0].lat]);for(const e of r)l.extend([e.lng,e.lat]);e.fitBounds(l,{padding:48,maxZoom:14,animate:!a})},[be,t,w,b]),u(()=>{const e=te.current;if(!be||!e)return;const t=(y??[]).filter(e=>e.coordinates.length>=2),n=[...new Set(t.flatMap(e=>e.attribution?[e.attribution]:[]))].join(" · "),r=()=>{const r=function(){const e=document.createElement("span");e.className="text-blue-600",e.style.display="none",document.body.appendChild(e);const t=getComputedStyle(e).color||"#2563eb";return e.remove(),G(t)}(),o={type:"FeatureCollection",features:t.map(e=>({type:"Feature",properties:{key:e.key,estimate:e.estimate,faded:!!e.faded,color:e.color?D(e.color):r},geometry:{type:"LineString",coordinates:e.coordinates}}))},a=["case",["get","faded"],.25,.85],l=["get","color"],i=e.getSource(I);if(i&&(i.attribution||"")!==n){for(const t of Z)e.getLayer(t)&&e.removeLayer(t);e.removeSource(I)}const s=e.getSource(I);s?s.setData(o):e.addSource(I,{type:"geojson",data:o,...n?{attribution:n}:{}}),e.getLayer("routes-road")||e.addLayer({id:"routes-road",type:"line",source:I,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:I,filter:["get","estimate"],layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":l,"line-width":3,"line-dasharray":[1.5,1.5],"line-opacity":a}})},o=()=>{try{r()}catch(e){console.debug("[map] routes wait for the style",e)}};return o(),e.on("style.load",o),e.once("idle",o),()=>{e.off("style.load",o),e.off("idle",o)}},[be,y,ke]),u(()=>{const e=te.current;if(!be||!e||!r)return;const n=t.find(e=>e.key===r.key);if(!n)return;const o=e.getZoom(),a=k?_(e.project([n.lng,n.lat]),t.filter(e=>e.key!==n.key).map(t=>e.project([t.lng,t.lat])),o):-1/0,l={center:[n.lng,n.lat],zoom:Math.min(18,Math.max(o,13,a))};Y()?e.jumpTo(l):e.flyTo({...l,duration:600})},[be,r?.n]);const[Se,je]=c(!1);u(()=>{const e=Q.current;if(!e)return;const t=()=>je(e.clientWidth<O);t();const n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[O]);const ze=n?t.find(e=>e.key===n)??null:null,Ae=ze?.key??null,Re=ze?.lng??0,Te=ze?.lat??0,Oe=be&&!Se&&null!=R&&!!ze,[Be,We]=c(null);u(()=>{const e=te.current,t=se.current;if(!(Oe&&e&&t&&Ae))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:M,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:X,borderBottomColor:X}),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(),Q.current)+8,u=`${C(a,l)}px`;n.style.maxHeight!==u&&(n.style.maxHeight=u);const d=r.getElement(),p=r.getLngLat(),{anchor:m,move:h}=L(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:Y()?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(Ae)?.button;e&&"none"!==e.style.display&&e.focus({preventScroll:!0})}}},[Oe,Ae,Re,Te,$e]);const Fe=B?.active??!1,Ke=s(B?.onChange);u(()=>{Ke.current=B?.onChange}),u(()=>{if(!B)return;const e=document.documentElement;Fe&&!document.fullscreenElement&&e.requestFullscreen&&e.requestFullscreen().catch(()=>{}),!Fe&&document.fullscreenElement&&document.exitFullscreen().catch(()=>{})},[Fe]);const qe=!!B;return u(()=>{if(!qe)return;const e=()=>{document.fullscreenElement||Ke.current?.(!1)};return document.addEventListener("fullscreenchange",e),()=>document.removeEventListener("fullscreenchange",e)},[qe]),/* @__PURE__ */g("div",{ref:Q,className:ne("relative min-h-72 overflow-hidden rounded-lg border border-gray-200 bg-gray-100",E&&"[&_canvas]:cursor-crosshair",i),children:[
|
|
2
|
+
import{Button_default as e}from"../chunk-OGXU7QFW.js";import{rootIsDark as t,ROOT_THEME_ATTRIBUTES as n}from"../chunk-HZZNJHRH.js";import"../chunk-X4FJ54PP.js";import"../chunk-D65T4H6J.js";import{CollapseFallback as r,ExpandFallback as o,CloseFallback as a}from"../chunk-6LTDJKIL.js";import{Icon as l}from"../chunk-XWSWYMGM.js";import{useShellStrings as i}from"../chunk-TNBCUZVE.js";import"../chunk-C3QOHMR6.js";import{useRef as s,useState as c,useEffect as u,useCallback as d,useMemo as p,useSyncExternalStore as m}from"react";import{createPortal as h}from"react-dom";import{jsxs as g,jsx as f,Fragment as y}from"react/jsx-runtime";import{useQuery as b}from"@tanstack/react-query";var x="maplibregl-compact-show";function v(e){if(!e)return()=>{};const t=()=>!!e.classList.contains(x)&&(e.classList.remove(x),!0);if(t())return()=>{};const n=new MutationObserver(()=>{t()&&n.disconnect()});return n.observe(e,{attributes:!0,attributeFilter:["class"]}),()=>n.disconnect()}var w=20,k=12,N=480,M={center:[0,0],left:[w,0],right:[-20,0],top:[0,w],"top-left":[0,w],"top-right":[0,w],bottom:[0,-20],"bottom-left":[0,-20],"bottom-right":[0,-20]},C=(e,t=12)=>Math.max(0,Math.floor(e-t-k-w-10-16));function L(e,t,n,r=12){const o=e.y-w-r,a=n.height-e.y-w-k,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<k?(s="-left",c=Math.max(0,k-e.x)):e.x+t.width/2>n.width-k&&(s="-right",c=-Math.max(0,e.x-(n.width-k))),{anchor:`${l?"bottom":"top"}${s}`,move:{x:c,y:i}}}var $="maplibre-gl-worker.mjs",E=e=>`/maplibre-gl/${e}/${$}`,S=null;function j(){return S??=Promise.all([import("maplibre-gl"),import("maplibre-gl/dist/maplibre-gl.css")]).then(([e])=>(e.setWorkerUrl(E(e.getVersion())),e)).catch(e=>{throw S=null,e}),S}var z=24,A=28,R=29;function T(e){const t=[...e].sort((e,t)=>e-t),n=[];for(let e=0;e<t.length;){let r=e;for(;r+1<t.length&&t[r+1]===t[r]+1;)r++;n.push(r===e?String(t[e]):`${t[e]}–${t[r]}`),e=r+1}return n.join(", ")}function O(e){const t=Math.max(A,12+8*e.length);return t+t%2}var B=(e,t,n,r)=>({left:e-n/2,top:t-r/2,right:e+n/2,bottom:t+r/2});function W(e,t){return e.left<t.right+1&&t.left<e.right+1&&e.top<t.bottom+1&&t.top<e.bottom+1}var F=e=>B(e.x,e.y,e.width,e.height);function K(e){for(let t=0;t<e.length;t++)for(let n=t+1;n<e.length;n++)if(W(F(e[t]),F(e[n])))return[e[t],e[n]];return null}function q(e,t=[]){const n=[],r=e=>t.some(t=>W(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:A,height:A,under:0}));for(let e=K(o);e;e=K(o)){const[t,n]=e;t.keys.push(...n.keys),t.stops.push(...n.stops),t.stops.sort((e,t)=>e-t),t.width=O(T(t.stops)),o=o.filter(e=>e!==n)}o=o.filter(e=>!r(F(e))||(n.push(...e.keys),!1));const a=[];for(const t of e){if(null!==t.stop)continue;const e=B(t.x,t.y,z,z),l=o.find(t=>W(F(t),e));if(l||r(e)){n.push(t.key),l&&l.under++;continue}const i=a.find(t=>W(F(t),e));i?i.keys.push(t.key):a.push({keys:[t.key],stops:[],x:t.x,y:t.y,width:z,height:z,under:0})}return{groups:[...o,...a],hidden:n}}function _(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 H(e){const t=new MutationObserver(e);return t.observe(document.documentElement,{attributes:!0,attributeFilter:n}),()=>t.disconnect()}var P=t;var I="routes",Z=["routes-road","routes-estimate"];function D(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(),G(n)}function G(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 J={light:"https://tiles.openfreemap.org/styles/positron",dark:"https://tiles.openfreemap.org/styles/dark"},U={center:[30,20],zoom:1},V="ring-2 ring-gray-900 ring-offset-2";var X="var(--color-gray-600, #4b5563)",Q="http://www.w3.org/2000/svg",Y=()=>window.matchMedia("(prefers-reduced-motion: reduce)").matches,ee=/^(?:\d+|[xytrblse](?:-\d+)?|solid|dashed|dotted|double|hidden|none)$/;function te(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-")&&!ee.test(r.slice(7))})}var ne=(...e)=>e.filter(Boolean).join(" ");function re(e){const t=document.createElementNS(Q,"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(Q,"path");e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-linejoin","round"),e.setAttribute("d",n),t.appendChild(e)}return t}function oe(e,t){for(const[n,r]of Object.entries(t??{}))e.dataset[n]=r}var ae=(e,t)=>ne("relative grid place-items-center rounded-full cursor-pointer",t&&(null!=e.stop?"h-7 w-7":"h-6 w-6"));function le(e,t,n,r){const o=t&&!r&&null==e.stop&&!e.dot;return ne("grid place-items-center rounded-full border-2 font-semibold leading-none shadow-md transition-transform motion-reduce:transition-none",!te(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-[10px] [&_svg]:h-3.5 [&_svg]:w-3.5",t&&(o?"ring-2 ring-gray-900 ring-offset-1":V),e.approximate&&"border-dashed opacity-80",e.faded&&!t&&"opacity-40",n&&"scale-125 opacity-100")}var ie=e=>ne("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",!te(e.tone??"")&&"border-white",e.tone??"bg-gray-900 text-white");function se({pins:t,selectedKey:n,focus:r,onSelect:o,ariaLabel:a,className:l="",children:p,routes:y,fitTo:b,attribution:x,marks:w,groupCrowded:k=!1,noun:N,highlightKey:$=null,picking:E=!1,onPick:S,card:R,cardMinMapWidth:O=480,fullScreen:B,initialView:W=U,cooperativeGestures:F=!1}){const K=i().map,Q=s(null),ee=s(null),te=s(null),se=s(null),de=s([]),pe=s(/* @__PURE__ */new Map),me=s(/* @__PURE__ */new Map),he=s(/* @__PURE__ */new Map),ge=s(null),fe=s(/* @__PURE__ */new Map),ye=s(""),[be,xe]=c(!1),[ve,we]=c(!1),ke=m(H,P,()=>!1)?"dark":"light",Ne=s({onSelect:o,onPick:S,picking:E,pins:t,selectedKey:n,highlightKey:$,groupCrowded:k,strings:K,noun:N});u(()=>{Ne.current={onSelect:o,onPick:S,picking:E,pins:t,selectedKey:n,highlightKey:$,groupCrowded:k,strings:K,noun:N}});const Me=d(()=>{const e=te.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:Y()?0:400})},[]),Ce=s(!1),Le=d((e,t)=>{const n=te.current,r=se.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)=>_(e,i.filter((e,n)=>n!==t),o))),{clientWidth:c,clientHeight:u}=n.getContainer(),d=n.cameraForBounds(l,{padding:Math.min(64,c/4,u/4)})?.zoom??18,p=document.activeElement===t;Ce.current=!0,n.once("moveend",()=>{if(Ce.current=!1,!p)return;const e=a[0].key,t=pe.current.get(e)?.button,n=t&&"none"!==t.style.display?t:[...me.current.values()].find(t=>t.keys.includes(e))?.button;n?.focus({preventScroll:!0})}),n.easeTo({center:l.getCenter(),zoom:Math.min(18,Math.max(o+1,Math.min(d,s))),duration:Y()?0:600})},[]),$e=d(()=>{const e=te.current,t=se.current;if(!e||!t||!Q.current||Ce.current&&e.isMoving())return;const{selectedKey:n,highlightKey:r,groupCrowded:o,strings:a,noun:l}=Ne.current;for(const[e,t]of pe.current){const a=le(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=[...Q.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=q([...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?T(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=ne("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-[0.6rem]":"h-6 w-6 text-[0.7rem]",null!=n&&r.keys.includes(n)&&V);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?A:z),height:t.button.offsetHeight||(null!=t.pin.stop?A:z)}:n?{at:n.mark,width:n.element.offsetWidth||A,height:n.element.offsetHeight||A}: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]);u(()=>{if($e(),!Q.current)return;const e=new ResizeObserver(()=>$e());e.observe(Q.current);for(const t of Q.current.children)t.contains(ee.current)||e.observe(t);return()=>e.disconnect()}),u(()=>{let e=!1,t=null,n=null,r=()=>{};return(async()=>{try{const o=await j();if(e||!ee.current)return;se.current=o,t=new o.Map({container:ee.current,style:J[ke],center:W.center,zoom:W.zoom,attributionControl:x?{compact:!0,customAttribution:x}:{compact:!0},dragRotate:!1,pitchWithRotate:!1,touchPitch:!1,maxPitch:0,cooperativeGestures:"coarse"===F?window.matchMedia("(pointer: coarse)").matches:F}),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(W.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=v(ee.current.querySelector(".maplibregl-ctrl-attrib"));const l=t;n=new ResizeObserver(()=>{l.resize(),Me()}),n.observe(ee.current),te.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(),te.current=null}},[]);const Ee=s(ke);u(()=>{be&&te.current&&Ee.current!==ke&&(Ee.current=ke,te.current.setStyle(J[ke]))},[be,ke]),u(()=>{const e=te.current,n=se.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=ae(o,k);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(oe(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(re(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=ne("absolute -right-2 -top-2 grid h-4 min-w-4 place-items-center rounded-full px-0.5 text-[9px] font-semibold leading-none shadow",o.badgeTone??"bg-white text-gray-900"),e.textContent=o.badge,t.appendChild(e)}t.addEventListener("click",e=>{e.stopPropagation(),Ne.current.onSelect(o.key)}),de.current.push(new n.Marker({element:t,anchor:"center"}).setLngLat([o.lng,o.lat]).addTo(e)),pe.current.set(o.key,{pin:o,button:t,mark:i,name:a,title:l})}for(const t of w??[]){const r=document.createElement("div");r.dataset.mapMark=t.key,oe(r,t.data),r.className=ie(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,w,k,$e]),u(()=>{be&&$e()},[be,n,$,$e]),u(()=>{if(!be||!n)return;const e=requestAnimationFrame(Me);return()=>cancelAnimationFrame(e)},[be,n,Me]),u(()=>{const e=te.current,n=se.current,r=b?[...t,...w??[]].filter(e=>b.includes(e.key)):t;if(!be||!e||!n||0===r.length)return;const o=r.map(e=>`${e.key}@${e.lat},${e.lng}`).sort().join("|");if(ye.current===o)return;const a=""===ye.current;if(ye.current=o,1===r.length)return void e.jumpTo({center:[r[0].lng,r[0].lat],zoom:13});const l=new n.LngLatBounds([r[0].lng,r[0].lat],[r[0].lng,r[0].lat]);for(const e of r)l.extend([e.lng,e.lat]);e.fitBounds(l,{padding:48,maxZoom:14,animate:!a})},[be,t,w,b]),u(()=>{const e=te.current;if(!be||!e)return;const t=(y??[]).filter(e=>e.coordinates.length>=2),n=[...new Set(t.flatMap(e=>e.attribution?[e.attribution]:[]))].join(" · "),r=()=>{const r=function(){const e=document.createElement("span");e.className="text-blue-600",e.style.display="none",document.body.appendChild(e);const t=getComputedStyle(e).color||"#2563eb";return e.remove(),G(t)}(),o={type:"FeatureCollection",features:t.map(e=>({type:"Feature",properties:{key:e.key,estimate:e.estimate,faded:!!e.faded,color:e.color?D(e.color):r},geometry:{type:"LineString",coordinates:e.coordinates}}))},a=["case",["get","faded"],.25,.85],l=["get","color"],i=e.getSource(I);if(i&&(i.attribution||"")!==n){for(const t of Z)e.getLayer(t)&&e.removeLayer(t);e.removeSource(I)}const s=e.getSource(I);s?s.setData(o):e.addSource(I,{type:"geojson",data:o,...n?{attribution:n}:{}}),e.getLayer("routes-road")||e.addLayer({id:"routes-road",type:"line",source:I,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:I,filter:["get","estimate"],layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":l,"line-width":3,"line-dasharray":[1.5,1.5],"line-opacity":a}})},o=()=>{try{r()}catch(e){console.debug("[map] routes wait for the style",e)}};return o(),e.on("style.load",o),e.once("idle",o),()=>{e.off("style.load",o),e.off("idle",o)}},[be,y,ke]),u(()=>{const e=te.current;if(!be||!e||!r)return;const n=t.find(e=>e.key===r.key);if(!n)return;const o=e.getZoom(),a=k?_(e.project([n.lng,n.lat]),t.filter(e=>e.key!==n.key).map(t=>e.project([t.lng,t.lat])),o):-1/0,l={center:[n.lng,n.lat],zoom:Math.min(18,Math.max(o,13,a))};Y()?e.jumpTo(l):e.flyTo({...l,duration:600})},[be,r?.n]);const[Se,je]=c(!1);u(()=>{const e=Q.current;if(!e)return;const t=()=>je(e.clientWidth<O);t();const n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[O]);const ze=n?t.find(e=>e.key===n)??null:null,Ae=ze?.key??null,Re=ze?.lng??0,Te=ze?.lat??0,Oe=be&&!Se&&null!=R&&!!ze,[Be,We]=c(null);u(()=>{const e=te.current,t=se.current;if(!(Oe&&e&&t&&Ae))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:M,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:X,borderBottomColor:X}),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(),Q.current)+8,u=`${C(a,l)}px`;n.style.maxHeight!==u&&(n.style.maxHeight=u);const d=r.getElement(),p=r.getLngLat(),{anchor:m,move:h}=L(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:Y()?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(Ae)?.button;e&&"none"!==e.style.display&&e.focus({preventScroll:!0})}}},[Oe,Ae,Re,Te,$e]);const Fe=B?.active??!1,Ke=s(B?.onChange);u(()=>{Ke.current=B?.onChange}),u(()=>{if(!B)return;const e=document.documentElement;Fe&&!document.fullscreenElement&&e.requestFullscreen&&e.requestFullscreen().catch(()=>{}),!Fe&&document.fullscreenElement&&document.exitFullscreen().catch(()=>{})},[Fe]);const qe=!!B;return u(()=>{if(!qe)return;const e=()=>{document.fullscreenElement||Ke.current?.(!1)};return document.addEventListener("fullscreenchange",e),()=>document.removeEventListener("fullscreenchange",e)},[qe]),/* @__PURE__ */g("div",{ref:Q,className:ne("relative min-h-72 overflow-hidden rounded-lg border border-gray-200 bg-gray-100",E&&"[&_canvas]:cursor-crosshair",l),children:[
|
|
3
3
|
/* @__PURE__ */f("div",{className:"absolute inset-0",children:/* @__PURE__ */f("div",{ref:ee,className:"h-full w-full",role:"region","aria-label":a})}),ve&&/* @__PURE__ */f("p",{className:"absolute inset-0 grid place-items-center p-6 text-center text-sm text-gray-500",children:K.failed}),B&&/* @__PURE__ */f(e,{"data-map-control":"",variant:"secondary",size:"sm",className:"absolute left-3 top-3 z-10",onClick:()=>B.onChange(!B.active),leftIcon:/* @__PURE__ */f(ue,{leave:B.active}),children:B.active?K.leaveFullScreen:K.fullScreen}),p,null!=R&&!Oe&&/* @__PURE__ */f("div",{"data-map-card":"",className:"absolute bottom-3 left-3 right-3 z-10 max-h-[calc(100%-1.5rem)] max-w-md overflow-y-auto overscroll-contain",children:R}),Oe&&Be?h(R,Be):null,be&&/* @__PURE__ */f(ce,{pins:t,hosts:fe.current})]})}function ce({pins:e,hosts:t}){/* @__PURE__ */
|
|
4
4
|
return f(y,{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)),h(e.iconNode,n,e.key)})})}function ue({leave:e}){/* @__PURE__ */
|
|
5
|
-
return f(
|
|
6
|
-
/* @__PURE__ */f("span",{"aria-hidden":!0,className:`h-2.5 w-2.5 rounded-full ${ve(e,t)}`}),we(e,t)]},e))})}function ze({point:t,number:n,onOpen:r,onClose:o,palette:s=ye}){const c=fe(t.placement),u=xe(t),d=
|
|
5
|
+
return f(l,e?{name:"collapse",fallback:r,"aria-hidden":"true",className:"h-4 w-4",strokeWidth:2}:{name:"expand",fallback:o,"aria-hidden":"true",className:"h-4 w-4",strokeWidth:2})}function de(){const[e,t]=c(null);return{highlightKey:e,pointAt:d(e=>{const n=()=>t(e),r=()=>t(t=>t===e?null:t);return{onMouseEnter:n,onMouseLeave:r,onFocus:n,onBlur:r}},[])}}var pe=3e3,me=e=>!!e?.pending&&3e3,he=e=>`${e.kind}:${e.id}`,ge=e=>("located"===e.placement||"approximate"===e.placement)&&null!=e.lat&&null!=e.lng;function fe(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 ye={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"}},be=["importer","dealer","retail","supplier","delivery_location","warehouse"];function xe(e){return"supplier"===e.kind?"supplier":"customer"===e.kind?e.category||"importer":e.kind}var ve=(e,t=ye)=>t[e]?.tone??"bg-gray-700 text-white",we=(e,t=ye)=>t[e]?.label??e,ke=(e,t)=>ve(xe(e),t);function Ne(e,t,n=ye){return null!=t?String(t):(n[xe(e)]?.label??"").charAt(0).toUpperCase()}var Me=["delivery_location","warehouse"];function Ce(e,t=Me){const n=/* @__PURE__ */new Map;let r=0;for(const o of e)t.includes(o.kind)&&n.set(he(o),++r);return n}function Le(e){const t={onMap:0,approximate:0,pending:0,off:0};for(const n of e)ge(n)?(t.onMap+=1,"approximate"===n.placement&&(t.approximate+=1)):"pending"===n.placement?t.pending+=1:t.off+=1;return t}function $e(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 Ee(e){const t=[...new Set(e.filter(ge).map(xe))];return[...be.filter(e=>t.includes(e)),...t.filter(e=>!be.includes(e))]}function Se(e,t){return e.filter(e=>!ge(e)&&"pending"!==e.placement).map(e=>{const n=t?.get(he(e)),r=fe(e.placement)?.replace(/^Not on the map: /,"")??"";return{key:he(e),text:`${null!=n?`${n}. `:""}${e.label}: ${r}`}})}function je({categories:e,palette:t=ye,floating:n=!0}){return e.length<2?null:/* @__PURE__ */f("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-2.5 py-1.5 text-xs text-gray-600 shadow-sm",children:e.map(e=>/* @__PURE__ */g("span",{className:"inline-flex items-center gap-1.5",children:[
|
|
6
|
+
/* @__PURE__ */f("span",{"aria-hidden":!0,className:`h-2.5 w-2.5 rounded-full ${ve(e,t)}`}),we(e,t)]},e))})}function ze({point:t,number:n,onOpen:r,onClose:o,palette:s=ye}){const c=fe(t.placement),u=xe(t),d=i().map;/* @__PURE__ */
|
|
7
7
|
return g("section",{"aria-label":d.chosen(t.label),className:"absolute bottom-3 left-3 right-3 z-10 max-w-md space-y-1.5 rounded-lg border border-gray-200 bg-white p-3 shadow-md",children:[
|
|
8
8
|
/* @__PURE__ */g("div",{className:"flex items-start justify-between gap-2",children:[
|
|
9
9
|
/* @__PURE__ */g("div",{className:"min-w-0",children:[
|
|
10
10
|
/* @__PURE__ */g("h3",{className:"text-sm font-semibold text-gray-900 [overflow-wrap:anywhere]",children:[null!=n&&/* @__PURE__ */g("span",{className:"mr-1 text-gray-400",children:[n,"."]}),t.label,t.code&&/* @__PURE__ */f("span",{className:"ml-1.5 text-xs font-normal text-gray-400",children:t.code})]}),
|
|
11
11
|
/* @__PURE__ */f("p",{className:"text-xs text-gray-500",children:s[u]?we(u,s):t.category})]}),
|
|
12
|
-
/* @__PURE__ */f("button",{type:"button",onClick:o,"aria-label":d.closeCard,className:"rounded p-0.5 text-gray-400 hover:text-gray-600",children:/* @__PURE__ */f(
|
|
12
|
+
/* @__PURE__ */f("button",{type:"button",onClick:o,"aria-label":d.closeCard,className:"rounded p-0.5 text-gray-400 hover:text-gray-600",children:/* @__PURE__ */f(l,{name:"close",fallback:a,"aria-hidden":!0,className:"h-4 w-4",strokeWidth:2})})]}),
|
|
13
13
|
/* @__PURE__ */f("p",{className:"text-sm text-gray-700 [overflow-wrap:anywhere]",children:t.address||"—"}),c&&/* @__PURE__ */f("p",{className:"text-xs text-gray-500",children:c}),t.matched&&"approximate"===t.placement&&/* @__PURE__ */g("p",{className:"text-xs text-gray-400 [overflow-wrap:anywhere]",children:["Placed at: ",t.matched]}),r&&/* @__PURE__ */f("div",{className:"flex justify-end",children:/* @__PURE__ */f(e,{variant:"secondary",size:"sm",onClick:r,children:d.openRecord})})]})}function Ae(e,t,{staleTime:n}={}){return b({queryKey:e,queryFn:t,staleTime:n,refetchInterval:e=>me(e.state.data)})}function Re({queryKey:e,queryFn:t,refreshSignal:n,onOpen:r,ariaLabel:o,title:a="Locations",palette:l=ye,numbers:i,className:d="",mapClassName:m="min-h-[240px] flex-1"}){const{data:h,isError:y,refetch:b}=Ae(e,t,{staleTime:0}),x=s(!1);u(()=>{x.current?b():x.current=!0},[n]);const[v,w]=c(null),k=p(()=>h?.points??[],[h]),N=p(()=>i??Ce(k),[i,k]),M=p(()=>k.filter(ge).map(e=>({key:he(e),label:e.label,lat:e.lat,lng:e.lng,glyph:Ne(e,N.get(he(e))??null,l),tone:ke(e,l),approximate:"approximate"===e.placement})),[k,N,l]),C=p(()=>Se(k,N),[k,N]),L=p(()=>Ee(k),[k]),$=h?.pending??0,E=k.find(e=>he(e)===v)??null,S=E&&r?r(E):null;/* @__PURE__ */
|
|
14
14
|
return g("section",{"aria-label":a,className:`flex min-w-0 flex-col ${d}`,children:[
|
|
15
15
|
/* @__PURE__ */g("div",{className:"flex min-h-[30px] items-center justify-between mb-2",children:[
|
package/dist/page-tabs/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{TabStrip as e}from"../chunk-
|
|
3
|
-
return v(K.Provider,{value:le,children:e})}var
|
|
4
|
-
return v("div",{ref:y,role:c?"tabpanel":void 0,id:c,"aria-labelledby":a,hidden:!t,style:t?void 0:{display:"none"},className:l,"data-page-tab":e,children:/* @__PURE__ */v(F.Provider,{value:p,children:/* @__PURE__ */v(
|
|
5
|
-
return v("div",{className:t,children:e(r)},
|
|
6
|
-
return v(e,{tabs:a.map(e=>({key:e.key,title:e.title,pinned:e.pinned,dirty:s.dirty.includes(e.key),copy:l.copies[e.key],icon:f(O(e.path))?.icon})),activeKey:l.currentKey??null,idFor:o,panelMounted:e=>s.mounted.includes(e),onActivate:u,onClose:e=>{y(e)},onCloseMany:(e,t)=>{d(e,t)},label:c.label,className:t,activeClassName:n,end:r})}var
|
|
2
|
+
import{TabStrip as e}from"../chunk-Z7D6Y5WA.js";import{useShellLanguage as t}from"../chunk-GG7AE6OC.js";import"../chunk-P4CIOJHP.js";import{confirm as n}from"../chunk-IMMHJIV5.js";import"../chunk-RMJZOKHY.js";import"../chunk-AFYQTVZO.js";import"../chunk-HZZNJHRH.js";import"../chunk-X4FJ54PP.js";import{useBrowserLayoutEffect as r}from"../chunk-D65T4H6J.js";import"../chunk-6LTDJKIL.js";import"../chunk-XWSWYMGM.js";import{useShellStrings as i}from"../chunk-TNBCUZVE.js";import"../chunk-C3QOHMR6.js";import*as l from"react";import{createContext as c,memo as a,useRef as s,useEffect as o,useMemo as u,useId as y,useCallback as d,useReducer as f,useState as p,useContext as k}from"react";import{useLocation as m,useNavigate as b}from"react-router-dom";import{jsx as v,Fragment as h,jsxs as g}from"react/jsx-runtime";var K=c(null),F=c(null),T=12;var M=(e,t)=>e.filter(e=>e!==t);function I(e,t){return[...t.map(t=>e.find(e=>e.key===t)).filter(e=>Boolean(e)),...e.filter(e=>!t.includes(e.key))]}function N(e,t,n=12){const r=e.clock+1;let i;i=e.tabs.find(e=>e.key===t.key)?e.tabs.map(e=>e.key===t.key?{...e,path:t.path,title:"page"===e.titleFrom?e.title:t.title||e.title,lastActive:r}:e):[...e.tabs,{key:t.key,path:t.path,title:t.title,titleFrom:"route",pinned:!1,lastActive:r}];let l={...e,tabs:i,activeKey:t.key,mounted:(c=e.mounted,a=t.key,c.includes(a)?c:[...c,a]),clock:r};var c,a;return l.closing&&l.closing!==t.key?l=j(l,l.closing):l.closing===t.key&&(l={...l,closing:null}),function(e,t){let n=e;for(;n.tabs.length>t;){const e=n.tabs.filter(e=>!e.pinned&&e.key!==n.activeKey&&!n.dirty.includes(e.key)&&e.key!==n.closing).sort((e,t)=>e.lastActive-t.lastActive);if(0===e.length)break;n=j(n,e[0].key)}return n}(l,n)}function A(e){let t={...e,activeKey:null};return t.closing&&(t=j(t,t.closing)),t}function j(e,t){return{...e,tabs:e.tabs.filter(e=>e.key!==t),mounted:M(e.mounted,t),dirty:M(e.dirty,t),activeKey:e.activeKey===t?null:e.activeKey,closing:e.closing===t?null:e.closing}}function C(e,t){switch(t.type){case"visit":return N(e,t.entry,t.maxTabs);case"transient":return A(e);case"close":{let n=e;for(const e of t.keys)n=j(n,e);return t.closing?function(e,t){return{...e,closing:t}}(n,t.closing):n}case"title":return function(e,t,n){const r=e.tabs.find(e=>e.key===t);return!r||!n||r.title===n&&"page"===r.titleFrom?e:{...e,tabs:e.tabs.map(e=>e.key===t?{...e,title:n,titleFrom:"page"}:e)}}(e,t.key,t.title);case"dirty":return function(e,t,n){return n===e.dirty.includes(t)?e:{...e,dirty:n?[...e.dirty,t]:M(e.dirty,t)}}(e,t.key,t.dirty)}}var w=e=>`${e.pathname}${e.search}`;function O(e){const t=e.indexOf("#"),n=t>=0?e.slice(t):"",r=t>=0?e.slice(0,t):e,i=r.indexOf("?");return{pathname:i>=0?r.slice(0,i):r,search:i>=0?r.slice(i):"",hash:n}}function x({children:e,resolve:l,pinned:c=[],storageKey:a,maxTabs:k=12,enabled:h=!0,confirmDiscard:g}){const F=m(),T=b(),M=i().pageTabs,j=y(),x=s(l);x.current=l;const L=d(e=>{const t=x.current(e);return t?{key:t.key??e.pathname,path:w(e),title:t.title}:null},[]),{language:J}=t(),[H,D]=f(C,void 0,()=>{const e=function(e,t,n){if(!e)return[];let r;try{r=JSON.parse(e)}catch{return[]}const i=r;if(!i||1!==i.v||!Array.isArray(i.tabs))return[];const l=Boolean(n&&"string"==typeof i.lang&&i.lang!==n),c=[];for(const e of i.tabs){if(!e||"string"!=typeof e.path||!e.path.startsWith("/")||e.path.startsWith("//"))continue;const n=e.path.indexOf("#"),r=n>=0?e.path.slice(0,n):e.path,i=t(r);if(!i||c.some(e=>e.key===i.key))continue;const a=!l&&"page"===e.titleFrom&&"string"==typeof e.title&&e.title;c.push({key:i.key,path:r,title:a||i.title,titleFrom:a?"page":"route",pinned:!1,lastActive:0})}return c}(function(e){if(!e)return null;try{return localStorage.getItem(e)}catch{return null}}(a),e=>L(O(e)),J);let t=function(e,t){const n=t.map(e=>e.key);let r=e.tabs.map(e=>({...e,pinned:n.includes(e.key)}));for(const e of t)r.some(t=>t.key===e.key)||(r=[...r,{key:e.key,path:e.path,title:e.title,titleFrom:"route",pinned:!0,lastActive:0}]);return{...e,tabs:I(r,n)}}({tabs:[],activeKey:null,mounted:[],dirty:[],closing:null,clock:0,tabs:e},c.map(e=>L(O(e))).filter(e=>Boolean(e)));const n=h?L(F):null;return t=n?N(t,n,k):A(t),t}),E=s(H);E.current=H;const R=s(/* @__PURE__ */new Map),S=h?L(F):null,$=S?.key??null;r(()=>{if(!h)return;const e=L(F);e?(R.current.set(e.key,F),D({type:"visit",entry:e,maxTabs:k})):D({type:"transient"})},[F,h,k,L]),o(()=>{const e=new Set(H.tabs.map(e=>e.key));for(const t of R.current.keys())e.has(t)||R.current.delete(t)},[H.tabs]);const P=u(()=>function(e,t){const n={v:1,...t?{lang:t}:{},tabs:e.tabs.filter(t=>t.key!==e.closing).map(({key:e,path:t,title:n,titleFrom:r})=>({key:e,path:t,title:n,titleFrom:r}))};return JSON.stringify(n)}(H,J),[H,J]);o(()=>{if(a)try{localStorage.setItem(a,P)}catch{}},[P,a]);const Z=H.dirty.length>0;o(()=>{if(!Z)return;const e=e=>{e.preventDefault(),e.returnValue=""};return window.addEventListener("beforeunload",e),()=>window.removeEventListener("beforeunload",e)},[Z]);const B=s(/* @__PURE__ */new Map),W=d((e,t)=>{let n=B.current.get(e);return void 0===n&&(n=B.current.size,B.current.set(e,n)),`${j}-page-${t}-${n}`},[j]),V=d(e=>g?g(e):n({title:M.discardTitle,message:1===e.length?M.discardOne:M.discardCount?.(e.length)??`${e.length} ${M.discardMany}`,confirmLabel:M.discardConfirm,cancelLabel:M.keepEditing,variant:"warning"}),[g,M]),Y=d(()=>{const e=E.current;return e.tabs.find(e=>e.pinned)?.path??"/"},[]),G=d((e,t,n)=>{const r=E.current,i=r.activeKey;if(!i||!e.includes(i))return void D({type:"close",keys:e,closing:null});let l=t;if(!l){const t={...r,tabs:r.tabs.filter(t=>t.key===i||!e.includes(t.key))},c=n?r.tabs.find(t=>t.key===n&&!e.includes(t.key)):void 0;l=(c??function(e,t){const n=e.tabs.filter(n=>n.key!==e.closing||n.key===t),r=n.findIndex(e=>e.key===t);return r<0?null:n[r+1]??n[r-1]??null}(t,i))?.path??Y()}D({type:"close",keys:e.filter(e=>e!==i),closing:i}),T(l)},[T,Y]),Q=d(async(e,t={})=>{const n=E.current.tabs.find(t=>t.key===e);return!n||n.pinned?(t.to&&T(t.to),!1):!(!t.force&&E.current.dirty.includes(e)&&!await V([n]))&&(!!E.current.tabs.some(t=>t.key===e)&&(G([e],t.to),!0))},[V,G,T]),X=d(async(e,t)=>{let n=function(e,t,n){const r=e.tabs.filter(e=>!e.pinned);if("all"===t)return r.map(e=>e.key);if("others"===t)return r.filter(e=>e.key!==n).map(e=>e.key);const i=e.tabs.findIndex(e=>e.key===n);return i<0?[]:e.tabs.slice(i+1).filter(e=>!e.pinned).map(e=>e.key)}(E.current,e,t);const r=E.current.tabs.filter(e=>n.includes(e.key)&&E.current.dirty.includes(e.key));r.length&&!await V(r)&&(n=n.filter(e=>!r.some(t=>t.key===e)));const i=new Set(E.current.tabs.map(e=>e.key));n=n.filter(e=>i.has(e)),n.length&&G(n,void 0,"all"===e?null:t)},[V,G]),z=d(e=>{const t=E.current.tabs.find(t=>t.key===e);t&&e!==E.current.activeKey&&T(t.path)},[T]),U=d((e,t)=>D({type:"title",key:e,title:t}),[]),q=d((e,t)=>D({type:"dirty",key:e,dirty:t}),[]),[_,ee]=p({}),te=d((e,t)=>{ee(n=>{if((n[e]??null)===t)return n;const r={...n};return t?r[e]=t:delete r[e],r})},[]),ne=d(e=>L(e)?.key??null,[L]),re=d(e=>R.current.get(e),[]),ie=u(()=>h?H.tabs.filter(e=>e.key!==H.closing):[],[h,H.tabs,H.closing]),le=u(()=>({enabled:h,state:H,currentKey:$,resolve:l,keyFor:ne,locationFor:re,idFor:W,activate:z,close:Q,closeMany:X,setTitle:U,setDirty:q,copies:_,setCopy:te,visibleTabs:ie}),[h,H,$,l,ne,re,W,z,Q,X,U,q,_,te,ie]);/* @__PURE__ */
|
|
3
|
+
return v(K.Provider,{value:le,children:e})}var L=l.Activity,J=Boolean(L);function H({active:e,children:t}){return L?/* @__PURE__ */v(L,{mode:e?"visible":"hidden",children:t}):/* @__PURE__ */v(h,{children:t})}var D=a(function({tabKey:e,active:t,location:n,render:i,className:l,panelId:c,tabId:a}){const y=s(null),d=s(t),f=s(/* @__PURE__ */new Map);r(()=>{const e=d.current;if(d.current=t,t&&!e)for(const[e,[t,n]]of f.current)e.isConnected?(e.scrollTop=t,e.scrollLeft=n):f.current.delete(e)},[t]),o(()=>{const e=y.current;if(!e)return;const t=e=>{if(!d.current)return;const t=e.target;t&&"number"==typeof t.scrollTop&&f.current.set(t,[t.scrollTop,t.scrollLeft])};return e.addEventListener("scroll",t,!0),()=>e.removeEventListener("scroll",t,!0)},[]);const p=u(()=>({key:e,activeRef:d}),[e]);/* @__PURE__ */
|
|
4
|
+
return v("div",{ref:y,role:c?"tabpanel":void 0,id:c,"aria-labelledby":a,hidden:!t,style:t?void 0:{display:"none"},className:l,"data-page-tab":e,children:/* @__PURE__ */v(F.Provider,{value:p,children:/* @__PURE__ */v(H,{active:t,children:i(n)})})})},(e,t)=>e.active===t.active&&e.location===t.location&&e.className===t.className&&e.panelId===t.panelId&&e.tabId===t.tabId&&(!t.active||e.render===t.render)),E="\0transient";function R({children:e,frameClassName:t}){const n=k(K),r=m();if(!n||!n.enabled)/* @__PURE__ */
|
|
5
|
+
return v("div",{className:t,children:e(r)},E);const{state:i,currentKey:l,locationFor:c,idFor:a}=n,s=i.tabs.filter(e=>i.mounted.includes(e.key)).map(e=>e.key);return l&&!s.includes(l)&&s.push(l),/* @__PURE__ */g(h,{children:[s.map(n=>{const i=n===l,s=i?r:c(n);return s?/* @__PURE__ */v(D,{tabKey:n,active:i,location:s,render:e,className:t,panelId:a(n,"panel"),tabId:a(n,"tab")},n):null}),!l&&/* @__PURE__ */v(D,{tabKey:E,active:!0,location:r,render:e,className:t},E)]})}function S({className:t,activeClassName:n,end:r}){const l=k(K),c=i().pageTabs;if(!l||!l.enabled)return null;const{visibleTabs:a,state:s,idFor:o,activate:u,close:y,closeMany:d,resolve:f}=l;/* @__PURE__ */
|
|
6
|
+
return v(e,{tabs:a.map(e=>({key:e.key,title:e.title,pinned:e.pinned,dirty:s.dirty.includes(e.key),copy:l.copies[e.key],icon:f(O(e.path))?.icon})),activeKey:l.currentKey??null,idFor:o,panelMounted:e=>s.mounted.includes(e),onActivate:u,onClose:e=>{y(e)},onCloseMany:(e,t)=>{d(e,t)},label:c.label,className:t,activeClassName:n,end:r})}var $={enabled:!1,tabs:[],activeKey:null,activate:()=>{},close:async()=>!1,closeOthers:async()=>{},closeRight:async()=>{},closeAll:async()=>{}};function P(){const e=k(K);return e&&e.enabled?{enabled:!0,tabs:e.visibleTabs,activeKey:e.currentKey,activate:e.activate,close:e.close,closeOthers:t=>e.closeMany("others",t),closeRight:t=>e.closeMany("right",t),closeAll:()=>e.closeMany("all",null)}:$}function Z(){const e=k(K),t=k(F),n=b();return{key:e?.enabled&&t?t.key:null,close:d(async(r={})=>e?.enabled&&t&&e.state.tabs.some(e=>e.key===t.key)?e.close(t.key,r):(r.to&&n(r.to),!1),[e,t,n])}}function B(e){const t=k(K),n=k(F),r=t?.enabled?t.setTitle:void 0,i=n?.key;o(()=>{r&&i&&e&&r(i,e)},[r,i,e])}function W(e){const t=k(K),n=k(F),r=t?.enabled?t.setCopy:void 0,i=n?.key;o(()=>{if(r&&i)return r(i,e||null),()=>r(i,null)},[r,i,e])}function V(e){const t=k(K),n=k(F),r=t?.enabled?t.setDirty:void 0;o(()=>{if(r&&n)return r(n.key,e),()=>{n.activeRef.current&&r(n.key,!1)}},[r,n,e])}export{T as DEFAULT_MAX_TABS,J as PAGE_TABS_PAUSE_HIDDEN,S as PageTabBar,R as PageTabsOutlet,x as PageTabsProvider,O as parseTabPath,Z as usePageTab,W as usePageTabCopy,V as usePageTabDirty,B as usePageTabTitle,P as usePageTabs};
|
package/dist/pdf/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{lazy as r}from"react";var e=r(()=>import("../PdfViewer-
|
|
2
|
+
import{lazy as r}from"react";var e=r(()=>import("../PdfViewer-SQVMMA7B.js"));export{e as PdfViewer};
|
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 BarChart, N as BarChartProps, O as BorderRole, Q as BoxPlotBox, R as BoxPlotChart, T as BoxPlotChartProps, U as BrandAssetEditor, V as BrandAssetEditorProps, W as BrandAssetPreview, X as BrandMark, Y as BrandMarkProps, Z as BrandMarkSlot, _ as BrandMarkSurface, $ as BrandMarkTreatment, a0 as BreadcrumbItem, a1 as Breadcrumbs, a2 as BreadcrumbsProps, a3 as BudgetBar, a4 as BudgetBarProps, a5 as BudgetState, a6 as Button, a7 as ButtonClassesOptions, a8 as ButtonProps, a9 as ButtonSize, aa as ButtonVariant, ab as CHART_INK, ac as CMD_A, ad as CMD_DOT, ae as CMD_ENTER, af as CMD_K, ag as CMD_S, ah as COLUMN_COUNT_MAX, ai as COLUMN_COUNT_WIDTHS, aj as COLUMN_SHARES_EQUAL, ak as COLUMN_SHARE_MIN, al as CONTROL_HEIGHTS, am as CORNERS, an as Calendar, ao as CalendarMode, ap as CalendarProps, aq as Candle, ar as CandlestickChart, as as CandlestickChartProps, at as Card, au as CardPadding, av as CardProps, aw as CartesianPlot, ax as CartesianPlotProps, ay as CellStyle, az as ChartBackgroundVariant, aA as ChartBrush, aB as ChartBrushProps, aC as ChartCurve, aD as ChartDefs, aE as ChartDefsProps, aF as ChartDot, aG as ChartDotProps, aH as ChartDotVariant, aI as ChartFillVariant, aJ as ChartFrame, aK as ChartFrameProps, aL as ChartHighlightProvider, aM as ChartLegendEntry, aN as ChartLegendSwatch, aO as ChartRange, aP as ChartReferenceLine, aQ as ChartRevealDirection, aR as ChartSkeleton, aS as ChartSkeletonProps, aT as ChartStatusTone, aU as ChartStrokeVariant, aV as ChartTooltip, aW as ChartTooltipProps, aX as ChartTooltipRow, aY as ChatTemplate, aZ as Checkbox, a_ as CheckboxProps, a$ as CheckoutTemplate, b0 as ChordChart, b1 as ChordChartProps, b2 as ColorPicker, b3 as ColorPickerPanel, b4 as ColorPickerPanelProps, b5 as ColorPickerProps, b6 as ColorPreset, b7 as ColorSwatch, b8 as ColorSwatchProps, b9 as ColorSwatchSize, ba as ColoredBadge, bb as ColoredBadgeProps, bc as ColumnChart, bd as ColumnChartProps, C as ColumnDef, be as ColumnSeries, bf as ColumnShares, bg as ComposerAttachments, bh as ComposerAttachmentsProps, bi as ConfirmProvider, bj as ContainerFillChart, bk as ContainerFillChartProps, bl as ContainerFillItem, bm as ContextMenu, bn as ContextMenuPoint, bo as ContextMenuProps, bp as ContextMenuState, bq as ControlSize, br as CornerOption, bs as Corners, bt as CornersInput, bu as CornersInputProps, bv as CountBadge, bw as CountBadgeProps, bx as CountBadgeTone, by as Curve, bz as DAY_MS, bA as DashboardTemplate, bB as DataTable, bC as DataTableColumn, bD as DataTableColumnGroup, bE as DataTableHeader, bF as DataTablePage, bG as DataTableProps, bH as DataTableRowLink, bI as DataTableRowProps, bJ as DatePicker, bK as DatePickerProps, bL as DateRangePicker, bM as DateRangePickerProps, bN as DateTimePicker, bO as DateTimePickerProps, bP as DescriptionColumns, bQ as DescriptionItem, bR as DescriptionList, bS as DescriptionListProps, bT as Dialog, bU as DialogProps, bV as DialogSize, bW as DisplayChipItem, bX as DisplayChips, bY as DisplayChipsProps, bZ as Divider, b_ as DividerProps, b$ as DividerSpacing, c0 as DonutChart, c1 as DonutChartProps, c2 as DonutSegment, c3 as Drawer, c4 as DrawerProps, c5 as DrawerSide, c6 as DrawerSize, c7 as DropdownMenu, c8 as DropdownMenuAlign, c9 as DropdownMenuCheckboxItem, ca as DropdownMenuDividerItem, cb as DropdownMenuEntry, cc as DropdownMenuItem, cd as DropdownMenuLabelItem, ce as DropdownMenuLinkItem, cf as DropdownMenuProps, cg as DropdownMenuRadioItem, ch as DropdownMenuSide, ci as DropdownPositionOptions, cj as ELEVATION_LEVELS, ck as ENGLISH, cl as ENTER, cm as EditableGrid, cn as EditableGridProps, co as ElevationLevel, cp as EmailTemplate, cq as EmptyState, cr as EmptyStateProps, cs as EmptyValue, ct as EmptyValueProps, cu as ErrorBoundary, cv as ErrorBoundaryProps, cw as ErrorPage, cx as ErrorPageProps, cy as FONT_WEIGHTS, cz as FileIntake, cA as FilePicker, cB as FilePickerProps, cC as FillVariant, cD as FontWeightRole, cE as FormError, cF as FormErrorSummary, cG as FormErrorSummaryProps, cH as FormField, cI as FormFieldProps, cJ as FormLayoutPage, cK as FunnelChart, cL as FunnelChartProps, cM as FunnelStage, cN as GLASS_DIVIDER, cP as GROUP_COLORS, cQ as GROUP_COLORS_SOLID, cR as GalleryTemplate, cS as Gap, cT as GlassOptions, cU as GlobalSearch, cV as GlobalSearchProps, cW as Grid, cX as GridCols, cY as GridColumn, cZ as GridProps, c_ as HeatmapChart, c$ as HeatmapChartProps, d0 as HelpCenter, d1 as HelpCenterDoc, d2 as HelpCenterProps, d3 as HexInput, d4 as HistogramBin, d5 as HistogramChart, d6 as HistogramChartProps, d7 as Hsv, d8 as INPUT_BASE, d9 as INPUT_SIZES, da as IconButton, db as IconButtonClassesOptions, dc as IconButtonProps, dd as IconRail, de as IconRailButton, df as IconRailButtonProps, dg as IconRailLabels, dh as IconRailLabelsShown, di as IconRailOrientation, dj as IconRailProps, dk as ImageFocusPoint, dl as ImageFocusPointProps, dm as Inline, dn as InlineProps, dp as Input, dq as InputNumber, dr as InputNumberProps, ds as InputProps, dt as InputSize, du as Justify, dv as Kanban, dw as KanbanColumn, dx as KanbanProps, dy as Kbd, dz as KbdProps, dA as KbdSize, dB as Label, dC as LabelClassesOptions, dD as LabelProps, dE as LadderScale, dF as LanguagePanel, dG as LanguagePanelProps, dH as LanguageSelect, dI as LanguageSelectProps, dJ as LineChart, dK as LineChartProps, dL as LineChartSeries, dM as LinearScale, dN as LinkFilter, dO as LinkFilterField, dP as LinkKindChoice, dQ as LinkOption, dR as LinkOptionGroup, dS as LinkPicker, dT as LinkPickerFieldProps, dU as LinkPickerProps, dV as LinkPickerWindowProps, dW as LinkRules, dX as LinkTarget, dY as ListDrop, dZ as ListFooter, d_ as ListLoadError, d$ as ListLoadErrorProps, e0 as ListMove, e1 as ListRow, e2 as ListRowProps, e3 as LoadingSpinner, e4 as LoadingSpinnerProps, e5 as MAX_FRACTION_DIGITS, e6 as MENU_MAX_HEIGHT, e7 as MOD, e8 as MOTION, e9 as MOTION_DURATIONS, ea as Markdown, ea as MarkdownLite, eb as MarkdownLiteProps, eb as MarkdownProps, ec as MediaUploadField, ed as MediaUploadFieldProps, ee as MediaUploadGrid, ef as MediaUploadGridItem, eg as MediaUploadGridProps, eh as MenuPos, ei as Meter, ej as MeterProps, ek as MetricBar, el as MetricBarProps, em as Milestone, en as MilestoneKind, eo as MilestoneTimeline, ep as MilestoneTimelineProps, eq as MotionSpeed, es as NEXT_CHUNK_PATH_PREFIX, et as NativeSelect, eu as NumericKeypad, ev as NumericKeypadProps, ew as OVERLAY_OPEN_EVENT, ex as POPUP_MAX_WIDTH, ey as POST_PRODUCTION_STATUSES, ez as PageHeader, eA as PageHeaderProps, P as PaginatedResponse, eB as Pagination, eC as PaginationProps, eD as PaperclipGlyph, eE as Paragraph, eF as ParagraphProps, eG as PieChart, eH as PieChartProps, eI as PieSegment, eJ as PlotGeometry, eK as Point, eL as Popover, eM as PopoverAlign, eN as PopoverProps, eO as PopoverRenderProps, eP as PopoverSide, eQ as PopupMenu, eR as PopupMenuDivider, eS as PopupMenuItem, eT as PopupMenuItemProps, eU as PopupMenuLabel, eV as PopupMenuProps, eW as PopupSubmenu, eX as PopupSubmenuProps, eY as PortalBrandingContextValue, eZ as PortalBrandingProvider, e_ as PortalBrandingProviderProps, e$ as ProductionTimeline, f0 as ProductionTimelineProps, f1 as ProductionTimelineSnapshot, f2 as ProgressItem, f3 as PublicPortal, f4 as PublicPortalBranding, f5 as RADAR_SERIES_CAP, f6 as RADIUS_ROLES, f7 as RadarAxis, f8 as RadarChart, f9 as RadarChartProps, fa as RadarSeries, fb as RadialBarChart, fc as RadialBarChartProps, fd as RadialBarRow, fe as Radio, ff as RadioGroup, fg as RadioGroupOption, fh as RadioGroupOrientation, fi as RadioGroupProps, fj as RadioProps, fk as RadiusRole, fl as Range, fm as RangeChart, fn as RangeChartProps, fo as RangeRow, fp as RankedBars, fq as RankedBarsProps, fr as RankedBarsRow, fs as ResizeHandle, ft as ResizeHandleProps, fu as ResizeHandleSide, fv as ResolvedPortalBrandAsset, fw as Result, fx as ResultProps, fy as ResultStatus, fz as RevealDirection, fA as SCATTER_SERIES_CAP, fB as SERIES_SLOT_COUNT, fC as SERIES_VARS, fD as SHELL_LANGUAGE_STORAGE_KEY, fE as SHIFT, fF as SPACING_ROLES, fG as SPACING_SCALE, fH as STAGES, fI as STALE_CHUNK_RELOAD_COOLDOWN_MS, fJ as STALE_CHUNK_RELOAD_KEY, fK as STATUS_VARS, fL as SankeyChart, fM as SankeyChartProps, fN as SankeyLink, fO as SankeyNode, fP as ScatterChart, fQ as ScatterChartProps, fR as ScatterPoint, fS as ScatterSeries, S as SearchConfig, fT as SearchListRoute, fU as SearchProvider, fV as SearchQuickAction, fW as SearchResponse, fX as SearchResult, fY as SearchableItem, fZ as SearchableOption, f_ as SearchableOptionGroup, f$ as SearchableSelect, g0 as SearchableSelectBaseProps, g1 as SearchableSelectMultipleProps, g2 as SearchableSelectProps, g3 as Segmented, g4 as SegmentedOption, g5 as SegmentedProps, g6 as SegmentedSize, g7 as Select, g8 as SelectBaseProps, g9 as SelectItem, ga as SelectMultipleProps, gb as SelectOption, gc as SelectOptionGroup, gd as SelectProps, ge as SemanticGroup, 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 Text, hk as TextLinkField, hl as TextLinkFieldProps, hm as TextProps, hn as TextSize, ho as TextTone, hp as TextWeight, hq as Textarea, hr as TextareaProps, hs as Theme, ht as TileButton, hu as TileButtonProps, hv as TileSize, hw as TimeAgo, hx as TimeAgoProps, hy as TimePicker, hz as TimePickerProps, hA as TimeSeriesChart, hB as TimeSeriesChartProps, hC as TimeSeriesSeries, hD as TimelineMarker, hE as TimelineMarkerKind, hF as TimelineReport, hG as TimelineScrubProgress, hH as TimelineTrack, hI as TimelineTrackItem, hJ as TimelineTrackKind, hK as TimelineTrackPending, hL as TimelineTrackPhase, hM as TimelineTrackPlayback, hN as TimelineTrackProps, hO as TimelineTrackThumb, hP as Title, hQ as TitleLevel, hR as TitleProps, hS as ToastOptions, hT as ToastPlacement, hU as Tooltip, hV as TooltipProps, hW as TopNav, hX as TopNavItem, hY as TopNavProps, hZ as Tree, h_ as TreeDrop, h$ as TreeEmptySlot, i0 as TreeEmptySlotProps, i1 as TreeGroup, i2 as TreeGroupLabel, i3 as TreeGroupProps, i4 as TreeMove, i5 as TreeProps, i6 as TreeRow, i7 as TreeRowProps, i8 as TreeSeam, i9 as TreeSeamProps, ia as TreemapChart, ib as TreemapChartProps, ic as TreemapItem, id as TreemapTile, ie as TypeStep, ig as UseAppUpdateOptions, ih as UseContextMenu, ii as UseProductionTimelineOpts, ij as VERSION, ik as VITE_PRELOAD_ERROR_EVENT, il as WaterfallChart, im as WaterfallChartProps, io as WaterfallStep, ip as WidthsBar, iq as WidthsBarProps, ir as ZLayer, is as Z_LAYERS, it as angleScale, iu as appendKey, iv as applyCorners, iw as applyIconSet, ix as applyThemePrefs, iy as arcPath, iz as areaBetween, iA as areaFrom, iB as autoHighlightIndex, iC as backspace, iD as bandScale, iE as binValues, iF as budgetState, iG as bumpPath, iH as buttonClasses, iI as calcOverall, iJ as calcReportOverall, iK as colorFill, iL as colorSwatchClasses, iM as columnSharesWidths, iN as confirm, iO as confirmDestructive, iP as curvePath, iQ as dashFor, iS as dismissPopups, iT as fillFor, iU as fillId, iV as fmtSliderDate, iW as fromDateKey, iX as glassStyle, iY as glowId, iZ as groundId, i_ as groupColors, i$ as hexToHsv, j0 as highlightOpacity, j1 as hsvToHex, j2 as iconButtonClasses, j3 as inputClasses, j4 as installStaleChunkReload, j5 as isMac, j6 as isSafeLinkHref, j7 as isSeverityTone, j8 as isSpacingStep, j9 as isStaleChunkError, jb as labelClasses, jc as ladderScale, jd as languageSelectWidth, je as leavesContextMenuAlone, jf as linearPath, jg as linearScale, jh as logScale, ji as maskId, jj as matchShellLanguage, jk as mediaFileName, jl as monotonePath, jm as niceMax, jn as openGlobalSearch, jo as parseHexColor, jp as polygonPoints, jq as popupBounds, jr as prompt, js as pushRecentSearch, jt as radiusScale, ju as readSavedShellLanguage, jv as registerModalEscapeInterceptor, jw as resolveBrandMarkTreatment, jx as resolveColumnShares, jy as resolveColumnWidths, jz as resolveCorners, jA as resolvePortalBrandAsset, jB as resolveSeriesColor, jC as resolveShellLanguage, jD as resolveTheme, jE as sanitizeRecentSearches, jF as saveShellLanguage, jG as seriesColor, jH as severityOf, jI as splinePath, jJ as squarify, jK as stagger, jL as stepPath, jM as tabButtonId, jN as tabPanelId, jO as toDateKey, jP as toDayMs, jQ as toISODate, jR as toast, jS as useAppUpdate, jT as useClickOutside, jU as useConfirm, jV as useContextMenu, jW as useDebouncedValue, jX as useDropdownPosition, jY as useFocusTrap, jZ as useHighlight, j_ as useIsMobile, j$ as useLocalStoragePrefs, k0 as usePlotWidth, k1 as usePortalBranding, k2 as useProductionTimeline, k3 as useScrollLock, k4 as useShellLanguage, k5 as useShellPrefs, k6 as useStatusLabel, k7 as useTheme } from '../index-BgM75MC6.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 BarChart, N as BarChartProps, O as BorderRole, Q as BoxPlotBox, R as BoxPlotChart, T as BoxPlotChartProps, U as BrandAssetEditor, V as BrandAssetEditorProps, W as BrandAssetPreview, X as BrandMark, Y as BrandMarkProps, Z as BrandMarkSlot, _ as BrandMarkSurface, $ as BrandMarkTreatment, a0 as BreadcrumbItem, a1 as Breadcrumbs, a2 as BreadcrumbsProps, a3 as BudgetBar, a4 as BudgetBarProps, a5 as BudgetState, a6 as Button, a7 as ButtonClassesOptions, a8 as ButtonProps, a9 as ButtonSize, aa as ButtonVariant, ab as CHART_INK, ac as CMD_A, ad as CMD_DOT, ae as CMD_ENTER, af as CMD_K, ag as CMD_S, ah as COLUMN_COUNT_MAX, ai as COLUMN_COUNT_WIDTHS, aj as COLUMN_SHARES_EQUAL, ak as COLUMN_SHARE_MIN, al as CONTROL_HEIGHTS, am as CORNERS, an as Calendar, ao as CalendarMode, ap as CalendarProps, aq as Candle, ar as CandlestickChart, as as CandlestickChartProps, at as Card, au as CardPadding, av as CardProps, aw as CartesianPlot, ax as CartesianPlotProps, ay as CellStyle, az as ChartBackgroundVariant, aA as ChartBrush, aB as ChartBrushProps, aC as ChartCurve, aD as ChartDefs, aE as ChartDefsProps, aF as ChartDot, aG as ChartDotProps, aH as ChartDotVariant, aI as ChartFillVariant, aJ as ChartFrame, aK as ChartFrameProps, aL as ChartHighlightProvider, aM as ChartLegendEntry, aN as ChartLegendSwatch, aO as ChartRange, aP as ChartReferenceLine, aQ as ChartRevealDirection, aR as ChartSkeleton, aS as ChartSkeletonProps, aT as ChartStatusTone, aU as ChartStrokeVariant, aV as ChartTooltip, aW as ChartTooltipProps, aX as ChartTooltipRow, aY as ChatTemplate, aZ as Checkbox, a_ as CheckboxProps, a$ as CheckoutTemplate, b0 as ChordChart, b1 as ChordChartProps, b2 as ColorPicker, b3 as ColorPickerPanel, b4 as ColorPickerPanelProps, b5 as ColorPickerProps, b6 as ColorPreset, b7 as ColorSwatch, b8 as ColorSwatchProps, b9 as ColorSwatchSize, ba as ColoredBadge, bb as ColoredBadgeProps, bc as ColumnChart, bd as ColumnChartProps, C as ColumnDef, be as ColumnSeries, bf as ColumnShares, bg as ComposerAttachments, bh as ComposerAttachmentsProps, bi as ConfirmProvider, bj as ContainerFillChart, bk as ContainerFillChartProps, bl as ContainerFillItem, bm as ContextMenu, bn as ContextMenuPoint, bo as ContextMenuProps, bp as ContextMenuState, bq as ControlSize, br as CornerOption, bs as Corners, bt as CornersInput, bu as CornersInputProps, bv as CountBadge, bw as CountBadgeProps, bx as CountBadgeTone, by as Curve, bz as DAY_MS, bA as DashboardTemplate, bB as DataTable, bC as DataTableColumn, bD as DataTableColumnGroup, bE as DataTableHeader, bF as DataTablePage, bG as DataTableProps, bH as DataTableRowLink, bI as DataTableRowProps, bJ as DatePicker, bK as DatePickerProps, bL as DateRangePicker, bM as DateRangePickerProps, bN as DateTimePicker, bO as DateTimePickerProps, bP as DescriptionColumns, bQ as DescriptionItem, bR as DescriptionList, bS as DescriptionListProps, bT as Dialog, bU as DialogProps, bV as DialogSize, bW as DisplayChipItem, bX as DisplayChips, bY as DisplayChipsProps, bZ as Divider, b_ as DividerProps, b$ as DividerSpacing, c0 as DonutChart, c1 as DonutChartProps, c2 as DonutSegment, c3 as Drawer, c4 as DrawerProps, c5 as DrawerSide, c6 as DrawerSize, c7 as DropdownMenu, c8 as DropdownMenuAlign, c9 as DropdownMenuCheckboxItem, ca as DropdownMenuDividerItem, cb as DropdownMenuEntry, cc as DropdownMenuItem, cd as DropdownMenuLabelItem, ce as DropdownMenuLinkItem, cf as DropdownMenuProps, cg as DropdownMenuRadioItem, ch as DropdownMenuSide, ci as DropdownPositionOptions, cj as ELEVATION_LEVELS, ck as ENGLISH, cl as ENTER, cm as EditableGrid, cn as EditableGridProps, co as ElevationLevel, cp as EmailTemplate, cq as EmptyState, cr as EmptyStateProps, cs as EmptyValue, ct as EmptyValueProps, cu as ErrorBoundary, cv as ErrorBoundaryProps, cw as ErrorPage, cx as ErrorPageProps, cy as FONT_WEIGHTS, cz as FileIntake, cA as FilePicker, cB as FilePickerProps, cC as FillVariant, cD as FontWeightRole, cE as FormError, cF as FormErrorSummary, cG as FormErrorSummaryProps, cH as FormField, cI as FormFieldProps, cJ as FormLayoutPage, cK as FunnelChart, cL as FunnelChartProps, cM as FunnelStage, cN as GLASS_DIVIDER, cP as GROUP_COLORS, cQ as GROUP_COLORS_SOLID, cR as GalleryTemplate, cS as Gap, cT as GlassOptions, cU as GlobalSearch, cV as GlobalSearchProps, cW as Grid, cX as GridCols, cY as GridColumn, cZ as GridProps, c_ as HeatmapChart, c$ as HeatmapChartProps, d0 as HelpCenter, d1 as HelpCenterDoc, d2 as HelpCenterProps, d3 as HexInput, d4 as HistogramBin, d5 as HistogramChart, d6 as HistogramChartProps, d7 as Hsv, d8 as INPUT_BASE, d9 as INPUT_SIZES, da as IconButton, db as IconButtonClassesOptions, dc as IconButtonProps, dd as IconRail, de as IconRailButton, df as IconRailButtonProps, dg as IconRailLabels, dh as IconRailLabelsShown, di as IconRailOrientation, dj as IconRailProps, dk as ImageFocusPoint, dl as ImageFocusPointProps, dm as Inline, dn as InlineProps, dp as Input, dq as InputNumber, dr as InputNumberProps, ds as InputProps, dt as InputSize, du as Justify, dv as Kanban, dw as KanbanColumn, dx as KanbanProps, dy as Kbd, dz as KbdProps, dA as KbdSize, dB as Label, dC as LabelClassesOptions, dD as LabelProps, dE as LadderScale, dF as LanguagePanel, dG as LanguagePanelProps, dH as LanguageSelect, dI as LanguageSelectProps, dJ as LineChart, dK as LineChartProps, dL as LineChartSeries, dM as LinearScale, dN as LinkFilter, dO as LinkFilterField, dP as LinkKindChoice, dQ as LinkOption, dR as LinkOptionGroup, dS as LinkPicker, dT as LinkPickerFieldProps, dU as LinkPickerProps, dV as LinkPickerWindowProps, dW as LinkRules, dX as LinkTarget, dY as ListDrop, dZ as ListFooter, d_ as ListLoadError, d$ as ListLoadErrorProps, e0 as ListMove, e1 as ListRow, e2 as ListRowProps, e3 as LoadingSpinner, e4 as LoadingSpinnerProps, e5 as MAX_FRACTION_DIGITS, e6 as MENU_MAX_HEIGHT, e7 as MOD, e8 as MOTION, e9 as MOTION_DURATIONS, ea as Markdown, ea as MarkdownLite, eb as MarkdownLiteProps, eb as MarkdownProps, ec as MediaUploadField, ed as MediaUploadFieldProps, ee as MediaUploadGrid, ef as MediaUploadGridItem, eg as MediaUploadGridProps, eh as MenuPos, ei as Meter, ej as MeterProps, ek as MetricBar, el as MetricBarProps, em as Milestone, en as MilestoneKind, eo as MilestoneTimeline, ep as MilestoneTimelineProps, eq as MotionSpeed, es as NEXT_CHUNK_PATH_PREFIX, et as NativeSelect, eu as NumericKeypad, ev as NumericKeypadProps, ew as OVERLAY_OPEN_EVENT, ex as POPUP_MAX_WIDTH, ey as POST_PRODUCTION_STATUSES, ez as PageHeader, eA as PageHeaderProps, P as PaginatedResponse, eB as Pagination, eC as PaginationProps, eD as PaperclipGlyph, eE as Paragraph, eF as ParagraphProps, eG as PieChart, eH as PieChartProps, eI as PieSegment, eJ as PlotGeometry, eK as Point, eL as Popover, eM as PopoverAlign, eN as PopoverProps, eO as PopoverRenderProps, eP as PopoverSide, eQ as PopupMenu, eR as PopupMenuDivider, eS as PopupMenuItem, eT as PopupMenuItemProps, eU as PopupMenuLabel, eV as PopupMenuProps, eW as PopupSubmenu, eX as PopupSubmenuProps, eY as PortalBrandingContextValue, eZ as PortalBrandingProvider, e_ as PortalBrandingProviderProps, e$ as ProductionTimeline, f0 as ProductionTimelineProps, f1 as ProductionTimelineSnapshot, f2 as ProgressItem, f3 as PublicPortal, f4 as PublicPortalBranding, f5 as RADAR_SERIES_CAP, f6 as RADIUS_ROLES, f7 as RadarAxis, f8 as RadarChart, f9 as RadarChartProps, fa as RadarSeries, fb as RadialBarChart, fc as RadialBarChartProps, fd as RadialBarRow, fe as Radio, ff as RadioGroup, fg as RadioGroupOption, fh as RadioGroupOrientation, fi as RadioGroupProps, fj as RadioProps, fk as RadiusRole, fl as Range, fm as RangeChart, fn as RangeChartProps, fo as RangeRow, fp as RankedBars, fq as RankedBarsProps, fr as RankedBarsRow, fs as ResizeHandle, ft as ResizeHandleProps, fu as ResizeHandleSide, fv as ResolvedPortalBrandAsset, fw as Result, fx as ResultProps, fy as ResultStatus, fz as RevealDirection, fA as SCATTER_SERIES_CAP, fB as SERIES_SLOT_COUNT, fC as SERIES_VARS, fD as SHELL_LANGUAGE_STORAGE_KEY, fE as SHIFT, fF as SPACING_ROLES, fG as SPACING_SCALE, fH as STAGES, fI as STALE_CHUNK_RELOAD_COOLDOWN_MS, fJ as STALE_CHUNK_RELOAD_KEY, fK as STATUS_VARS, fL as SankeyChart, fM as SankeyChartProps, fN as SankeyLink, fO as SankeyNode, fP as ScatterChart, fQ as ScatterChartProps, fR as ScatterPoint, fS as ScatterSeries, S as SearchConfig, fT as SearchListRoute, fU as SearchProvider, fV as SearchQuickAction, fW as SearchResponse, fX as SearchResult, fY as SearchableItem, fZ as SearchableOption, f_ as SearchableOptionGroup, f$ as SearchableSelect, g0 as SearchableSelectBaseProps, g1 as SearchableSelectMultipleProps, g2 as SearchableSelectProps, g3 as Segmented, g4 as SegmentedOption, g5 as SegmentedProps, g6 as SegmentedSize, g7 as Select, g8 as SelectBaseProps, g9 as SelectItem, ga as SelectMultipleProps, gb as SelectOption, gc as SelectOptionGroup, gd as SelectProps, ge as SemanticGroup, 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 Text, hk as TextLinkField, hl as TextLinkFieldProps, hm as TextProps, hn as TextSize, ho as TextTone, hp as TextWeight, hq as Textarea, hr as TextareaProps, hs as Theme, ht as TileButton, hu as TileButtonProps, hv as TileSize, hw as TimeAgo, hx as TimeAgoProps, hy as TimePicker, hz as TimePickerProps, hA as TimeSeriesChart, hB as TimeSeriesChartProps, hC as TimeSeriesSeries, hD as TimelineMarker, hE as TimelineMarkerKind, hF as TimelineReport, hG as TimelineScrubProgress, hH as TimelineTrack, hI as TimelineTrackItem, hJ as TimelineTrackKind, hK as TimelineTrackPending, hL as TimelineTrackPhase, hM as TimelineTrackPlayback, hN as TimelineTrackProps, hO as TimelineTrackThumb, hP as Title, hQ as TitleLevel, hR as TitleProps, hS as ToastOptions, hT as ToastPlacement, hU as Tooltip, hV as TooltipProps, hW as TopNav, hX as TopNavItem, hY as TopNavProps, hZ as Tree, h_ as TreeDrop, h$ as TreeEmptySlot, i0 as TreeEmptySlotProps, i1 as TreeGroup, i2 as TreeGroupLabel, i3 as TreeGroupProps, i4 as TreeMove, i5 as TreeProps, i6 as TreeRow, i7 as TreeRowProps, i8 as TreeSeam, i9 as TreeSeamProps, ia as TreemapChart, ib as TreemapChartProps, ic as TreemapItem, id as TreemapTile, ie as TypeStep, ig as UseAppUpdateOptions, ih as UseContextMenu, ii as UseProductionTimelineOpts, ij as VERSION, ik as VITE_PRELOAD_ERROR_EVENT, il as WaterfallChart, im as WaterfallChartProps, io as WaterfallStep, ip as WidthsBar, iq as WidthsBarProps, ir as ZLayer, is as Z_LAYERS, it as angleScale, iu as appendKey, iv as applyCorners, iw as applyIconSet, ix as applyThemePrefs, iy as arcPath, iz as areaBetween, iA as areaFrom, iB as autoHighlightIndex, iC as backspace, iD as bandScale, iE as binValues, iF as budgetState, iG as bumpPath, iH as buttonClasses, iI as calcOverall, iJ as calcReportOverall, iK as colorFill, iL as colorSwatchClasses, iM as columnSharesWidths, iN as confirm, iO as confirmDestructive, iP as curvePath, iQ as dashFor, iS as dismissPopups, iT as fillFor, iU as fillId, iV as fmtSliderDate, iW as fromDateKey, iX as glassStyle, iY as glowId, iZ as groundId, i_ as groupColors, i$ as hexToHsv, j0 as highlightOpacity, j1 as hsvToHex, j2 as iconButtonClasses, j3 as inputClasses, j4 as installStaleChunkReload, j5 as isMac, j6 as isSafeLinkHref, j7 as isSeverityTone, j8 as isSpacingStep, j9 as isStaleChunkError, jb as labelClasses, jc as ladderScale, jd as languageSelectWidth, je as leavesContextMenuAlone, jf as linearPath, jg as linearScale, jh as logScale, ji as maskId, jj as matchShellLanguage, jk as mediaFileName, jl as monotonePath, jm as niceMax, jn as openGlobalSearch, jo as parseHexColor, jp as polygonPoints, jq as popupBounds, jr as prompt, js as pushRecentSearch, jt as radiusScale, ju as readSavedShellLanguage, jv as registerModalEscapeInterceptor, jw as resolveBrandMarkTreatment, jx as resolveColumnShares, jy as resolveColumnWidths, jz as resolveCorners, jA as resolvePortalBrandAsset, jB as resolveSeriesColor, jC as resolveShellLanguage, jD as resolveTheme, jE as sanitizeRecentSearches, jF as saveShellLanguage, jG as seriesColor, jH as severityOf, jI as splinePath, jJ as squarify, jK as stagger, jL as stepPath, jM as tabButtonId, jN as tabPanelId, jO as toDateKey, jP as toDayMs, jQ as toISODate, jR as toast, jS as useAppUpdate, jT as useClickOutside, jU as useConfirm, jV as useContextMenu, jW as useDebouncedValue, jX as useDropdownPosition, jY as useFocusTrap, jZ as useHighlight, j_ as useIsMobile, j$ as useLocalStoragePrefs, k0 as usePlotWidth, k1 as usePortalBranding, k2 as useProductionTimeline, k3 as useScrollLock, k4 as useShellLanguage, k5 as useShellPrefs, k6 as useStatusLabel, k7 as useTheme } from '../index-ZI6vl2Wq.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 { FileIntakeAlert, FileIntakeLimits, FileIntakeOptions, FileRejection, FileRejectionReason, acceptsFile, useFileIntake } from '../file-intake/index.js';
|
|
4
4
|
export { ICON_NAMES, Icon, IconName, IconProps, IconTone, isIconName } from '../icons/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,BarChart,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,DonutChart,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,INPUT_BASE,INPUT_SIZES,IconButton_default as IconButton,IconRail,IconRailButton,ImageFocusPoint,Inline,Input_default as Input,InputNumber_default as InputNumber,Kanban,Label,LanguagePanel,LanguageSelect,LineChart,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,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,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,inputClasses,isSafeLinkHref,isSeverityTone,isSpacingStep,labelClasses,ladderScale,languageSelectWidth,linearPath,linearScale,logScale,maskId,mediaFileName,monotonePath,niceMax,parseHexColor,polygonPoints,radiusScale,resolveColumnShares,resolveColumnWidths,resolveCorners,resolvePortalBrandAsset,resolveSeriesColor,resolveTheme,seriesColor,severityOf,splinePath,squarify,stagger,stepPath,tabButtonId,tabPanelId,toKey as toDateKey,toDayMs,toISODate,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,BarChart,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,DonutChart,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,INPUT_BASE,INPUT_SIZES,IconButton_default as IconButton,IconRail,IconRailButton,ImageFocusPoint,Inline,Input_default as Input,InputNumber_default as InputNumber,Kanban,Label,LanguagePanel,LanguageSelect,LineChart,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,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,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,inputClasses,isSafeLinkHref,isSeverityTone,isSpacingStep,labelClasses,ladderScale,languageSelectWidth,linearPath,linearScale,logScale,maskId,mediaFileName,monotonePath,niceMax,parseHexColor,polygonPoints,radiusScale,resolveColumnShares,resolveColumnWidths,resolveCorners,resolvePortalBrandAsset,resolveSeriesColor,resolveTheme,seriesColor,severityOf,splinePath,squarify,stagger,stepPath,tabButtonId,tabPanelId,toKey as toDateKey,toDayMs,toISODate,useAppUpdate,useClickOutside,useContextMenu,useDebouncedValue,useHighlight,usePlotWidth,usePortalBranding,useProductionTimeline,useStatusLabel,useTheme}from"../chunk-RC2EG6P4.js";export{Breadcrumbs}from"../chunk-F6B3J3GW.js";export{ResizeHandle,SidebarLayout}from"../chunk-4SWPNARR.js";export{BrandMark,GlobalSearch,openGlobalSearch,pushRecent as pushRecentSearch,resolveBrandMarkTreatment,sanitizeRecent as sanitizeRecentSearches}from"../chunk-SKB6L53D.js";export{EditableGrid}from"../chunk-N3A3GWJI.js";import"../chunk-BR22X7E5.js";export{ICON_NAMES,isIconName}from"../chunk-WOEFPBQF.js";export{ENGLISH,SHELL_LANGUAGE_STORAGE_KEY,ShellLanguageProvider,matchShellLanguage,readSavedShellLanguage,resolveShellLanguage,saveShellLanguage,useShellLanguage}from"../chunk-GG7AE6OC.js";export{toast_default as toast}from"../chunk-3HJTOINK.js";export{VERSION}from"../chunk-SFCDHHQP.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-YGC7AX3X.js";import"../chunk-5A7MWTXX.js";export{Button_default as Button,MENU_MAX_HEIGHT,POPUP_MAX_WIDTH,Tooltip,buttonClasses,iconButtonClasses,popupBounds,useDropdownPosition}from"../chunk-OGXU7QFW.js";export{ConfirmProvider,Dialog,confirm,confirmDestructive,prompt,useConfirm,useFocusTrap,useScrollLock}from"../chunk-IMMHJIV5.js";export{PopupMenu,PopupMenuDivider,PopupMenuItem,PopupMenuLabel,PopupSubmenu,leavesContextMenuAlone}from"../chunk-RMJZOKHY.js";import"../chunk-AFYQTVZO.js";export{GLASS_DIVIDER,glassStyle}from"../chunk-HZZNJHRH.js";export{OVERLAY_OPEN_EVENT,Z_LAYERS,dismissPopups,registerModalEscapeInterceptor}from"../chunk-X4FJ54PP.js";import"../chunk-D65T4H6J.js";import"../chunk-6LTDJKIL.js";export{Icon,activeIconSet,iconSets,iconsVersion,registerIconSet,registerIcons,resolveIcon,setDefaultIconSet,setIconSet,subscribeIcons}from"../chunk-XWSWYMGM.js";export{FileIntakeAlert,acceptsFile,useFileIntake}from"../chunk-CLPJDJH4.js";export{DEFAULT_SHELL_STRINGS,ShellStringsProvider,useShellLocale,useShellStrings}from"../chunk-TNBCUZVE.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";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "efficient-shell",
|
|
3
|
-
"version": "5.6.
|
|
3
|
+
"version": "5.6.1",
|
|
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-PKEQ7XOH.js";import{useWidgetSettings as n}from"./chunk-L5XA5MLK.js";import"./chunk-FROOMUJ7.js";import"./chunk-DSSLOQDW.js";import"./chunk-5A7MWTXX.js";import"./chunk-OGXU7QFW.js";import"./chunk-HRLPFUPB.js";import"./chunk-ZUCYJAQH.js";import"./chunk-RMJZOKHY.js";import"./chunk-AFYQTVZO.js";import"./chunk-HZZNJHRH.js";import"./chunk-X4FJ54PP.js";import"./chunk-D65T4H6J.js";import{CheckFallbackB as l,CopyFallbackB as r}from"./chunk-6LTDJKIL.js";import"./chunk-TNBCUZVE.js";import"./chunk-C3QOHMR6.js";import{Icon as c}from"./chunk-XWSWYMGM.js";import{useState as a,useRef as i,useCallback as o,useEffect as s}from"react";import{jsxs as u,Fragment as d,jsx as h}from"react/jsx-runtime";var m="calc_appearance";function b(){const[b,k]=a("0"),[p,g]=a(null),[f,y]=a(null),[N,x]=a(!1),[v,C]=a(""),[$,j]=a([]),[w,E]=a(!1),[S,T]=a(()=>e(m)),[F,O]=a(!1),[W,H]=a(S),L=i(null);n(o(()=>{H({...S}),O(!0)},[S]));const A=o(e=>{C(""),k(t=>N||"0"===t?(x(!1),"."===e?"0.":e):"."===e&&t.includes(".")?t:t+e)},[N]),J=o(()=>{k("0"),g(null),y(null),x(!1)},[]),M=o((e,t,n)=>{switch(n){case"+":return e+t;case"-":return e-t;case"×":return e*t;case"÷":return 0===t?0:e/t;default:return t}},[]),X=o(e=>{const t=parseFloat(b);if(null!==p&&f&&!N){const e=M(p,t,f);k(String(e)),g(e),j(n=>[`${p} ${f} ${t} = ${e}`,...n].slice(0,20))}else g(t);y(e),x(!0)},[b,p,f,N,M]),D=o(()=>{if(null===p||!f)return;const e=parseFloat(b),t=M(p,e,f),n=`${p} ${f} ${e} =`;j(e=>[`${n} ${t}`,...e].slice(0,20)),C(n),k(String(t)),g(null),y(null),x(!0)},[b,p,f,M]),P=o(()=>{k(e=>String(parseFloat(e)/100))},[]),Q=o(()=>{k(e=>e.startsWith("-")?e.slice(1):"0"===e?e:"-"+e)},[]);s(()=>{const e=e=>{const t=e.target.tagName;"INPUT"!==t&&"TEXTAREA"!==t&&"SELECT"!==t&&(e.key>="0"&&e.key<="9"?A(e.key):"."===e.key?A("."):"+"===e.key?X("+"):"-"===e.key?X("-"):"*"===e.key?X("×"):"/"===e.key?(e.preventDefault(),X("÷")):"Enter"===e.key||"="===e.key?("Enter"===e.key&&e.target instanceof Node&&L.current?.contains(e.target)&&e.preventDefault(),D()):"Escape"===e.key?J():"Backspace"===e.key?k(e=>e.length>1?e.slice(0,-1):"0"):"%"===e.key&&P())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[A,X,D,J,P]);const R="flex items-center justify-center rounded-lg text-sm font-medium transition-colors",U=`${R} bg-white border border-gray-200 text-gray-900 hover:bg-gray-50 active:bg-gray-100`,Z=`${R} bg-blue-50 border border-blue-200 text-blue-700 hover:bg-blue-100 active:bg-blue-200`,B=`${R} bg-gray-100 border border-gray-200 text-gray-600 hover:bg-gray-200 active:bg-gray-300`,K=`${R} bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800`;/* @__PURE__ */
|
|
2
|
-
return u(d,{children:[
|
|
3
|
-
/* @__PURE__ */u("div",{ref:L,className:"flex flex-col h-full",style:{opacity:S.activeOpacity/100,backdropFilter:S.activeBlur>0?`blur(${S.activeBlur}px)`:void 0},children:[
|
|
4
|
-
/* @__PURE__ */u("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__ */h("div",{className:"flex flex-col justify-end flex-1 overflow-hidden",children:$.slice(0,3).reverse().map((e,t)=>/* @__PURE__ */h("div",{className:"text-[11px] text-slate-400 text-right font-mono truncate",children:e},t))}),(v||f&&null!==p)&&/* @__PURE__ */h("div",{className:"text-base text-slate-600 text-right font-mono",children:v||`${p} ${f} ${N?"":b}`}),
|
|
6
|
-
/* @__PURE__ */u("div",{className:"flex items-center gap-2",children:[
|
|
7
|
-
/* @__PURE__ */h("button",{onClick:()=>{navigator.clipboard.writeText(b),E(!0),setTimeout(()=>E(!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__ */h(c,w?{name:"check",fallback:l,className:"h-5 w-5 text-green-500",strokeWidth:2}:{name:"copy",fallback:r,className:"h-5 w-5",strokeWidth:2})}),
|
|
8
|
-
/* @__PURE__ */h("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)})(b)})]})]}),
|
|
9
|
-
/* @__PURE__ */u("div",{className:"grid grid-cols-4 grid-rows-5 gap-1.5 flex-1 min-h-0 p-2",children:[
|
|
10
|
-
/* @__PURE__ */h("button",{onClick:J,className:B,children:"AC"}),
|
|
11
|
-
/* @__PURE__ */h("button",{onClick:Q,className:B,children:"+/−"}),
|
|
12
|
-
/* @__PURE__ */h("button",{onClick:P,className:B,children:"%"}),
|
|
13
|
-
/* @__PURE__ */h("button",{onClick:()=>X("÷"),className:`${Z} ${"÷"===f?"ring-2 ring-blue-400":""}`,children:"÷"}),
|
|
14
|
-
/* @__PURE__ */h("button",{onClick:()=>A("7"),className:U,children:"7"}),
|
|
15
|
-
/* @__PURE__ */h("button",{onClick:()=>A("8"),className:U,children:"8"}),
|
|
16
|
-
/* @__PURE__ */h("button",{onClick:()=>A("9"),className:U,children:"9"}),
|
|
17
|
-
/* @__PURE__ */h("button",{onClick:()=>X("×"),className:`${Z} ${"×"===f?"ring-2 ring-blue-400":""}`,children:"×"}),
|
|
18
|
-
/* @__PURE__ */h("button",{onClick:()=>A("4"),className:U,children:"4"}),
|
|
19
|
-
/* @__PURE__ */h("button",{onClick:()=>A("5"),className:U,children:"5"}),
|
|
20
|
-
/* @__PURE__ */h("button",{onClick:()=>A("6"),className:U,children:"6"}),
|
|
21
|
-
/* @__PURE__ */h("button",{onClick:()=>X("-"),className:`${Z} ${"-"===f?"ring-2 ring-blue-400":""}`,children:"−"}),
|
|
22
|
-
/* @__PURE__ */h("button",{onClick:()=>A("1"),className:U,children:"1"}),
|
|
23
|
-
/* @__PURE__ */h("button",{onClick:()=>A("2"),className:U,children:"2"}),
|
|
24
|
-
/* @__PURE__ */h("button",{onClick:()=>A("3"),className:U,children:"3"}),
|
|
25
|
-
/* @__PURE__ */h("button",{onClick:()=>X("+"),className:`${Z} ${"+"===f?"ring-2 ring-blue-400":""}`,children:"+"}),
|
|
26
|
-
/* @__PURE__ */h("button",{onClick:()=>A("0"),className:`${U} col-span-2`,children:"0"}),
|
|
27
|
-
/* @__PURE__ */h("button",{onClick:()=>A("."),className:U,children:"."}),
|
|
28
|
-
/* @__PURE__ */h("button",{onClick:D,className:K,children:"="})]})]}),
|
|
29
|
-
/* @__PURE__ */h(t,{open:F,onClose:()=>O(!1),title:"Calculator Settings",appearance:W,onAppearanceChange:H,onSave:()=>{T(W),localStorage.setItem(m,JSON.stringify(W)),O(!1)}})]})}export{b as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{ConfirmProvider,confirm,confirmDestructive,prompt,useConfirm}from"./chunk-ZUCYJAQH.js";import"./chunk-AFYQTVZO.js";import"./chunk-X4FJ54PP.js";import"./chunk-6LTDJKIL.js";import"./chunk-TNBCUZVE.js";import"./chunk-C3QOHMR6.js";import"./chunk-XWSWYMGM.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{PdfViewer as default,fitScale,pdfWasmParams}from"./chunk-3GPU3JOW.js";import"./chunk-3HJTOINK.js";import"./chunk-6LTDJKIL.js";import"./chunk-TNBCUZVE.js";import"./chunk-C3QOHMR6.js";import"./chunk-XWSWYMGM.js";
|
package/dist/chunk-WRBXEZFN.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var r="5.6.0",a=r;export{a as APP_VERSION,r as VERSION};
|