efficient-shell 7.34.0 → 7.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -0
- package/dist/{Browser-TUW5HXDQ.js → Browser-2RGXJRGC.js} +11 -11
- package/dist/Calculator-3WKCMBTQ.js +29 -0
- package/dist/ConfirmDialog-4W3Y7XES.js +1 -0
- package/dist/{CurrencyConverter-G3FC4H7V.js → CurrencyConverter-PMJC4PJE.js} +12 -12
- package/dist/{Documents-3FU3DMNP.js → Documents-IDOEW4C2.js} +12 -12
- package/dist/{Files-LVJKCD25.js → Files-VE4RSBCG.js} +43 -43
- package/dist/{Notepad-KXEK5N4N.js → Notepad-KQOSAH2N.js} +10 -10
- package/dist/PdfViewer-3WDGKHRE.js +1 -0
- package/dist/{PomodoroTimer-DL365JYG.js → PomodoroTimer-G44MKPIG.js} +5 -5
- package/dist/{Preview-TI4DLL2H.js → Preview-CBCZPC4F.js} +16 -16
- package/dist/{Sidebar-GBQVWSSS.js → Sidebar-4EQQQGEY.js} +37 -37
- package/dist/{Spreadsheet-S2YYU65W.js → Spreadsheet-KUIL3XXZ.js} +14 -14
- package/dist/{Stock-SLJJ5EO4.js → Stock-H6RD4DQL.js} +7 -7
- package/dist/{Weather-VOG7ST3F.js → Weather-52XQ47XS.js} +22 -22
- package/dist/{WorldClock-AS6CZUEK.js → WorldClock-5W2IMU5E.js} +6 -6
- package/dist/apps/index.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/chunk-3N7UFUJP.js +1 -0
- package/dist/{chunk-KMSAHFLP.js → chunk-6OXNDFJE.js} +3 -3
- package/dist/{chunk-DF733WOR.js → chunk-CUKZPOKT.js} +2 -2
- package/dist/chunk-DCE2WL7J.js +1 -0
- package/dist/{chunk-E5DFGCAL.js → chunk-DTCIMQP7.js} +1 -1
- package/dist/{chunk-WR6YWZHJ.js → chunk-GPPFGCT4.js} +1 -1
- package/dist/{chunk-2TSSECQG.js → chunk-J5O7NMNC.js} +188 -188
- package/dist/{chunk-W53EOFSH.js → chunk-KNNGYRYW.js} +1 -1
- package/dist/{chunk-TO3SXKDA.js → chunk-L7UURACV.js} +90 -90
- package/dist/{chunk-3KAY2R3O.js → chunk-LU2SMEID.js} +1 -1
- package/dist/{chunk-LTH3NJTS.js → chunk-M5W23H56.js} +15 -15
- package/dist/{chunk-AAOAQKB4.js → chunk-M7U7E4QD.js} +11 -11
- package/dist/{chunk-CQYSEMCR.js → chunk-MD3UGBCE.js} +12 -12
- package/dist/{chunk-MDD5DHF2.js → chunk-MWAPICLX.js} +2 -2
- package/dist/{chunk-T4HEQXBK.js → chunk-P6WZ24CB.js} +1 -1
- package/dist/{chunk-U4JBPDWA.js → chunk-PEYPKCRT.js} +3 -3
- package/dist/{chunk-XDM6YBBX.js → chunk-TYZR3BEG.js} +1 -1
- package/dist/{chunk-AEJQC7GF.js → chunk-UBRW43AM.js} +9 -9
- package/dist/{chunk-5MKWCHMD.js → chunk-UFXQAFZN.js} +6 -6
- package/dist/icons/index.d.ts +10 -4
- package/dist/icons/index.js +1 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.js +682 -682
- package/dist/map/index.js +7 -7
- package/dist/markdown/index.js +1 -1
- package/dist/page-tabs/index.js +5 -5
- package/dist/pdf/index.js +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/ui/index.js +1 -1
- package/package.json +1 -1
- package/dist/Calculator-6SCEML2T.js +0 -29
- package/dist/ConfirmDialog-VQWA4FJP.js +0 -1
- package/dist/PdfViewer-PJFETQHR.js +0 -1
- package/dist/chunk-KIFCFIIN.js +0 -1
- package/dist/chunk-T4X7UE7V.js +0 -1
package/dist/map/index.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{Button_default as e}from"../chunk-LU2DSEAL.js";import"../chunk-WOZ36LPR.js";import{rootIsDark as t,ROOT_THEME_ATTRIBUTES as n}from"../chunk-7IQ3B77H.js";import"../chunk-FIEA5CGB.js";import"../chunk-K7PQXJO7.js";import"../chunk-D65T4H6J.js";import{Icon as r}from"../chunk-KMSAHFLP.js";import{useShellStrings as o}from"../chunk-2PNYIWIN.js";import"../chunk-C3QOHMR6.js";import{SpinnerRing as a}from"../chunk-2J6F4EE7.js";import{useRef as l,useState as i,useEffect as s,useCallback as c,useMemo as u,useSyncExternalStore as d}from"react";import{createPortal as p}from"react-dom";import{jsxs as m,jsx as h,Fragment as g}from"react/jsx-runtime";import{useQuery as f}from"@tanstack/react-query";var y="maplibregl-compact-show";function b(e){if(!e)return()=>{};const t=()=>!!e.classList.contains(y)&&(e.classList.remove(y),!0);if(t())return()=>{};const n=new MutationObserver(()=>{t()&&n.disconnect()});return n.observe(e,{attributes:!0,attributeFilter:["class"]}),()=>n.disconnect()}var x=20,v=12,w=480,k={center:[0,0],left:[x,0],right:[-20,0],top:[0,x],"top-left":[0,x],"top-right":[0,x],bottom:[0,-20],"bottom-left":[0,-20],"bottom-right":[0,-20]},N=(e,t=12)=>Math.max(0,Math.floor(e-t-v-x-10-16));function M(e,t,n,r=12){const o=e.y-x-r,a=n.height-e.y-x-v,l=t.height<=o||t.height>a&&o>=a,i=l?Math.max(0,t.height-o):-Math.max(0,t.height-a);let s="",c=0;return e.x-t.width/2<v?(s="-left",c=Math.max(0,v-e.x)):e.x+t.width/2>n.width-v&&(s="-right",c=-Math.max(0,e.x-(n.width-v))),{anchor:`${l?"bottom":"top"}${s}`,move:{x:c,y:i}}}var C="maplibre-gl-worker.mjs",L=e=>`/maplibre-gl/${e}/${C}`,E=null;function S(){return E??=Promise.all([import("maplibre-gl"),import("maplibre-gl/dist/maplibre-gl.css")]).then(([e])=>(e.setWorkerUrl(L(e.getVersion())),e)).catch(e=>{throw E=null,e}),E}var $=24,j=28,A=29;function z(e){const t=[...e].sort((e,t)=>e-t),n=[];for(let e=0;e<t.length;){let r=e;for(;r+1<t.length&&t[r+1]===t[r]+1;)r++;n.push(r===e?String(t[e]):`${t[e]}–${t[r]}`),e=r+1}return n.join(", ")}function O(e){const t=Math.max(j,12+8*e.length);return t+t%2}var R=(e,t,n,r)=>({left:e-n/2,top:t-r/2,right:e+n/2,bottom:t+r/2});function B(e,t){return e.left<t.right+1&&t.left<e.right+1&&e.top<t.bottom+1&&t.top<e.bottom+1}var T=e=>R(e.x,e.y,e.width,e.height);function F(e){for(let t=0;t<e.length;t++)for(let n=t+1;n<e.length;n++)if(B(T(e[t]),T(e[n])))return[e[t],e[n]];return null}function W(e,t=[]){const n=[],r=e=>t.some(t=>B(t,e));let o=e.filter(e=>null!==e.stop).sort((e,t)=>e.stop-t.stop).map(e=>({keys:[e.key],stops:[e.stop],x:e.x,y:e.y,width:j,height:j,under:0}));for(let e=F(o);e;e=F(o)){const[t,n]=e;t.keys.push(...n.keys),t.stops.push(...n.stops),t.stops.sort((e,t)=>e-t),t.width=O(z(t.stops)),o=o.filter(e=>e!==n)}o=o.filter(e=>!r(T(e))||(n.push(...e.keys),!1));const a=[];for(const t of e){if(null!==t.stop)continue;const e=R(t.x,t.y,$,$),l=o.find(t=>B(T(t),e));if(l||r(e)){n.push(t.key),l&&l.under++;continue}const i=a.find(t=>B(T(t),e));i?i.keys.push(t.key):a.push({keys:[t.key],stops:[],x:t.x,y:t.y,width:$,height:$,under:0})}return{groups:[...o,...a],hidden:n}}function K(e,t,n){let r=-1/0;for(const o of t){const t=Math.max(Math.abs(o.x-e.x),Math.abs(o.y-e.y));r=Math.max(r,0===t?1/0:n+Math.log2(29/t))}return r}function P(e){const t=new MutationObserver(e);return t.observe(document.documentElement,{attributes:!0,attributeFilter:n}),()=>t.disconnect()}var q=t;var _="routes",H=["routes-road","routes-estimate"];function I(e){const t=document.createElement("span");t.style.display="none",t.style.color=e,document.body.appendChild(t);const n=getComputedStyle(t).color||"#2563eb";return t.remove(),D(n)}function D(e){const t=document.createElement("canvas").getContext("2d");if(!t)return"#2563eb";t.fillStyle="#2563eb",t.fillStyle=e,t.fillRect(0,0,1,1);const[n,r,o]=t.getImageData(0,0,1,1).data;return`rgb(${n}, ${r}, ${o})`}var Z={light:"https://tiles.openfreemap.org/styles/positron",dark:"https://tiles.openfreemap.org/styles/dark"},G={center:[30,20],zoom:1},J="ring-2 ring-gray-900 ring-offset-2";var Q="var(--color-gray-600, #4b5563)",U="http://www.w3.org/2000/svg",V=()=>window.matchMedia("(prefers-reduced-motion: reduce)").matches,X=/^(?:\d+|[xytrblse](?:-\d+)?|solid|dashed|dotted|double|hidden|none)$/;function Y(e){return e.split(/\s+/).some(e=>{const t=e.search(/[[(]/),n=t<0?e:e.slice(0,t),r=e.slice(n.lastIndexOf(":")+1);return r.startsWith("border-")&&!X.test(r.slice(7))})}var ee=(...e)=>e.filter(Boolean).join(" ");function te(e){const t=document.createElementNS(U,"svg");t.setAttribute("viewBox","0 0 24 24"),t.setAttribute("fill","none"),t.setAttribute("stroke","currentColor"),t.setAttribute("stroke-width","2"),t.setAttribute("aria-hidden","true");for(const n of e){const e=document.createElementNS(U,"path");e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-linejoin","round"),e.setAttribute("d",n),t.appendChild(e)}return t}function ne(e,t){for(const[n,r]of Object.entries(t??{}))e.dataset[n]=r}var re=(e,t)=>ee("relative grid place-items-center rounded-full cursor-pointer",t&&(null!=e.stop?"h-7 w-7":"h-6 w-6"));function oe(e,t,n,r){const o=t&&!r&&null==e.stop&&!e.dot;return ee("grid place-items-center rounded-full border-2 font-semibold leading-none shadow-sm transition-transform motion-reduce:transition-none",!Y(e.tone)&&"border-white",e.tone,e.dot?"h-4 w-4 opacity-80":null!=e.stop?"h-7 w-7 text-xs ring-2 ring-gray-900":o?"h-8 w-8 text-xs [&_svg]:h-4 [&_svg]:w-4":"h-6 w-6 text-2xs [&_svg]:h-3.5 [&_svg]:w-3.5",t&&(o?"ring-2 ring-gray-900 ring-offset-1":J),e.approximate&&"border-dashed opacity-80",e.faded&&!t&&"opacity-40",n&&"scale-125 opacity-100")}var ae=e=>ee("grid place-items-center border-2 px-0.5 text-xs font-semibold leading-none shadow-sm",e.stop?"h-7 min-w-7":"h-6 min-w-6",!Y(e.tone??"")&&"border-white",e.tone??"bg-gray-900 text-white");function le({pins:t,selectedKey:n,focus:r,onSelect:a,ariaLabel:u,className:g="",children:f,routes:y,fitTo:x,attribution:v,marks:w,groupCrowded:C=!1,noun:L,highlightKey:E=null,picking:A=!1,onPick:O,card:R,cardMinMapWidth:B=480,fullScreen:T,initialView:F=G,cooperativeGestures:U=!1}){const X=o().map,Y=l(null),le=l(null),ce=l(null),ue=l(null),de=l([]),pe=l(/* @__PURE__ */new Map),me=l(/* @__PURE__ */new Map),he=l(/* @__PURE__ */new Map),ge=l(null),fe=l(/* @__PURE__ */new Map),ye=l(""),[be,xe]=i(!1),[ve,we]=i(!1),ke=d(P,q,()=>!1)?"dark":"light",Ne=l({onSelect:a,onPick:O,picking:A,pins:t,selectedKey:n,highlightKey:E,groupCrowded:C,strings:X,noun:L});s(()=>{Ne.current={onSelect:a,onPick:O,picking:A,pins:t,selectedKey:n,highlightKey:E,groupCrowded:C,strings:X,noun:L}});const Me=c(()=>{const e=ce.current,{pins:t,selectedKey:n}=Ne.current,r=n?t.find(e=>e.key===n):void 0;e&&r&&!e.getBounds().contains([r.lng,r.lat])&&e.easeTo({center:[r.lng,r.lat],duration:V()?0:400})},[]),Ce=l(!1),Le=c((e,t)=>{const n=ce.current,r=ue.current;if(!n||!r)return;const o=n.getZoom();if(o>=17.5){const t=e.indexOf(Ne.current.selectedKey??"");return void Ne.current.onSelect(e[(t+1)%e.length])}const a=e.map(e=>pe.current.get(e).pin),l=new r.LngLatBounds([a[0].lng,a[0].lat],[a[0].lng,a[0].lat]);for(const e of a)l.extend([e.lng,e.lat]);const i=a.map(e=>n.project([e.lng,e.lat])),s=Math.max(...i.map((e,t)=>K(e,i.filter((e,n)=>n!==t),o))),{clientWidth:c,clientHeight:u}=n.getContainer(),d=n.cameraForBounds(l,{padding:Math.min(64,c/4,u/4)})?.zoom??18,p=document.activeElement===t;Ce.current=!0,n.once("moveend",()=>{if(Ce.current=!1,!p)return;const e=a[0].key,t=pe.current.get(e)?.button,n=t&&"none"!==t.style.display?t:[...me.current.values()].find(t=>t.keys.includes(e))?.button;n?.focus({preventScroll:!0})}),n.easeTo({center:l.getCenter(),zoom:Math.min(18,Math.max(o+1,Math.min(d,s))),duration:V()?0:600})},[]),Ee=c(()=>{const e=ce.current,t=ue.current;if(!e||!t||!Y.current||Ce.current&&e.isMoving())return;const{selectedKey:n,highlightKey:r,groupCrowded:o,strings:a,noun:l}=Ne.current;for(const[e,t]of pe.current){const a=oe(t.pin,e===n,e===r,o);t.mark.className!==a&&(t.mark.className=a);const l=e===n?"1":"";t.button.style.zIndex!==l&&(t.button.style.zIndex=l)}let i=null;if(o){const r=e.getContainer().getBoundingClientRect(),o=[...Y.current.querySelectorAll("a[href], button, input, select, textarea, summary, [role='button'], [tabindex]:not([tabindex='-1'])")].filter(e=>!e.closest("[data-pin], [data-pin-group], .maplibregl-canvas")).map(e=>{const t=e.getBoundingClientRect(),n=e.closest("[data-map-card]")?.getBoundingClientRect()??t;return{left:Math.max(t.left,n.left)-r.left,top:Math.max(t.top,n.top)-r.top,right:Math.min(t.right,n.right)-r.left,bottom:Math.min(t.bottom,n.bottom)-r.top}}).filter(e=>e.right>e.left&&e.bottom>e.top);i=W([...pe.current.values()].map(({pin:t})=>{const n=e.project([t.lng,t.lat]);return{key:t.key,x:n.x,y:n.y,stop:t.stop??null}}),o);const s=e=>(l??a.places)(e),c=e.getZoom()<17.5?a.spread:a.cycle,u=(e,t)=>{const n=t?"":"none";e.style.display!==n&&(e.style.display=n)},d=/* @__PURE__ */new Map;for(const r of i.groups){const o=r.under>0?a.closeBy(r.under,s(r.under)):null,l=1===r.keys.length?pe.current.get(r.keys[0]):null;if(l){u(l.button,!0),l.button.setAttribute("aria-label",o?`${l.name}; ${o}`:l.name),l.button.title=o?`${l.title}\n${o}`:l.title;continue}for(const e of r.keys)u(pe.current.get(e).button,!1);const i=r.keys.join(" ");let p=me.current.get(i);if(!p){const n=document.createElement("button");n.type="button",n.dataset.pinGroup="",n.className="grid place-items-center rounded-full cursor-pointer",n.append(document.createElement("span"));const o=pe.current.get(r.keys[0]).pin,a={button:n,keys:r.keys,marker:new t.Marker({element:n,anchor:"center"}).setLngLat([o.lng,o.lat]).addTo(e)};n.addEventListener("click",e=>{e.stopPropagation(),Le(a.keys,n)}),p=a}p.keys=r.keys;const m=r.keys.map(e=>pe.current.get(e)),h=r.stops.length>0?z(r.stops):String(m.length),g=r.stops.length>0?a.stops(h):a.group(m.length,s(m.length));p.button.style.width=`${r.width}px`,p.button.style.height=`${r.height}px`,p.button.setAttribute("aria-label",`${g}: ${m.map(e=>e.pin.label).join("; ")}. ${c}${o?`; ${o}`:""}.`),p.button.title=[`${g}:`,...m.map(e=>e.title),...o?[o]:[],c].join("\n");const f=p.button.firstElementChild;f.textContent=h;const y=ee("grid place-items-center rounded-full border-2 border-gray-700 bg-white font-semibold leading-none text-gray-900 shadow-sm",r.stops.length>0?"h-7 w-full px-1 text-xs ring-2 ring-gray-900":m.every(e=>e.pin.dot)?"h-5 w-5 text-3xs":"h-6 w-6 text-2xs",null!=n&&r.keys.includes(n)&&J);f.className!==y&&(f.className=y),d.set(i,p)}for(const e of i.hidden)u(pe.current.get(e).button,!1);for(const[e,t]of me.current)d.has(e)||t.marker.remove();me.current=d}if(ge.current){const e=r&&i?i.groups.find(e=>e.keys.includes(r)&&e.keys.length>1):void 0,t=r?pe.current.get(r):void 0,n=r?he.current.get(r):void 0,o=e?{at:pe.current.get(e.keys[0]).pin,width:e.width,height:e.height}:t?{at:t.pin,width:t.button.offsetWidth||(null!=t.pin.stop?j:$),height:t.button.offsetHeight||(null!=t.pin.stop?j:$)}:n?{at:n.mark,width:n.element.offsetWidth||j,height:n.element.offsetHeight||j}:null,a=ge.current.getElement();a.style.display=o?"":"none",o&&(ge.current.setLngLat([o.at.lng,o.at.lat]),a.style.width=`${o.width+22}px`,a.style.height=`${o.height+22}px`)}},[Le]);s(()=>{if(Ee(),!Y.current)return;const e=new ResizeObserver(()=>Ee());e.observe(Y.current);for(const t of Y.current.children)t.contains(le.current)||e.observe(t);return()=>e.disconnect()}),s(()=>{let e=!1,t=null,n=null,r=()=>{};return(async()=>{try{const o=await S();if(e||!le.current)return;ue.current=o,t=new o.Map({container:le.current,style:Z[ke],center:F.center,zoom:F.zoom,attributionControl:v?{compact:!0,customAttribution:v}:{compact:!0},dragRotate:!1,pitchWithRotate:!1,touchPitch:!1,maxPitch:0,cooperativeGestures:"coarse"===U?window.matchMedia("(pointer: coarse)").matches:U}),t.touchZoomRotate.disableRotation(),t.keyboard.disableRotation(),t.addControl(new o.NavigationControl({showCompass:!1}),"top-right");const a=document.createElement("div");a.dataset.pinRing="",a.setAttribute("aria-hidden","true"),a.className="pointer-events-none rounded-full border-2 border-gray-900 bg-gray-900/15 shadow-[0_0_0_2px_var(--color-white,#fff)]",a.style.display="none",ge.current=new o.Marker({element:a,anchor:"center"}).setLngLat(F.center).addTo(t),t.on("click",e=>{Ne.current.picking&&Ne.current.onPick?.({lat:e.lngLat.lat,lng:e.lngLat.lng})}),t.on("move",Ee),t.on("moveend",Ee),t.on("resize",Ee),t.on("error",e=>console.warn("[map]",e.error?.message)),r=b(le.current.querySelector(".maplibregl-ctrl-attrib"));const l=t;n=new ResizeObserver(()=>{l.resize(),Me()}),n.observe(le.current),ce.current=t,xe(!0)}catch(t){console.error("[map] could not start",t),e||we(!0)}})(),()=>{e=!0,n?.disconnect(),r(),de.current.forEach(e=>e.remove()),de.current=[],me.current.forEach(e=>e.marker.remove()),me.current.clear(),ge.current?.remove(),ge.current=null,t?.remove(),ce.current=null}},[]);const Se=l(ke);s(()=>{be&&ce.current&&Se.current!==ke&&(Se.current=ke,ce.current.setStyle(Z[ke]))},[be,ke]),s(()=>{const e=ce.current,n=ue.current;if(!be||!e||!n)return;de.current.forEach(e=>e.remove()),de.current=[],me.current.forEach(e=>e.marker.remove()),me.current.clear(),pe.current.clear(),he.current.clear();for(const e of fe.current.keys())t.some(t=>t.key===e)||fe.current.delete(e);const r=Ne.current.strings;for(const o of t){const t=document.createElement("button");t.type="button",t.dataset.pin=o.key,t.className=re(o,C);const a=o.approximate?r.approximate(o.label):o.label,l=o.title??(o.approximate?r.approximateTitle(o.label):o.label);t.setAttribute("aria-label",a),t.title=l;const i=document.createElement("span");if(ne(i,o.data),o.dot);else if(null!=o.iconNode){const e=fe.current.get(o.key);e&&i.append(e)}else o.icon?.length?i.append(te(o.icon)):i.textContent=null!=o.stop?String(o.stop):o.glyph;if(t.append(i),o.badge){const e=document.createElement("span");e.setAttribute("aria-hidden","true"),e.className=ee("absolute -right-2 -top-2 grid h-4 min-w-4 place-items-center rounded-full px-0.5 text-3xs font-semibold leading-none shadow",o.badgeTone??"bg-white text-gray-900"),e.textContent=o.badge,t.appendChild(e)}t.addEventListener("click",e=>{e.stopPropagation(),Ne.current.onSelect(o.key)}),de.current.push(new n.Marker({element:t,anchor:"center"}).setLngLat([o.lng,o.lat]).addTo(e)),pe.current.set(o.key,{pin:o,button:t,mark:i,name:a,title:l})}for(const t of w??[]){const r=document.createElement("div");r.dataset.mapMark=t.key,ne(r,t.data),r.className=ae(t),r.textContent=t.text,r.title=t.title??t.label,r.setAttribute("role","img"),r.setAttribute("aria-label",t.label),de.current.push(new n.Marker({element:r,anchor:"center"}).setLngLat([t.lng,t.lat]).addTo(e)),he.current.set(t.key,{mark:t,element:r})}Ee()},[be,t,w,C,Ee]),s(()=>{be&&Ee()},[be,n,E,Ee]),s(()=>{if(!be||!n)return;const e=requestAnimationFrame(Me);return()=>cancelAnimationFrame(e)},[be,n,Me]),s(()=>{const e=ce.current,n=ue.current,r=x?[...t,...w??[]].filter(e=>x.includes(e.key)):t;if(!be||!e||!n||0===r.length)return;const o=r.map(e=>`${e.key}@${e.lat},${e.lng}`).sort().join("|");if(ye.current===o)return;const a=""===ye.current;if(ye.current=o,1===r.length)return void e.jumpTo({center:[r[0].lng,r[0].lat],zoom:13});const l=new n.LngLatBounds([r[0].lng,r[0].lat],[r[0].lng,r[0].lat]);for(const e of r)l.extend([e.lng,e.lat]);e.fitBounds(l,{padding:48,maxZoom:14,animate:!a})},[be,t,w,x]),s(()=>{const e=ce.current;if(!be||!e)return;const t=(y??[]).filter(e=>e.coordinates.length>=2),n=[...new Set(t.flatMap(e=>e.attribution?[e.attribution]:[]))].join(" · "),r=()=>{const r=function(){const e=document.createElement("span");e.className="text-blue-600",e.style.display="none",document.body.appendChild(e);const t=getComputedStyle(e).color||"#2563eb";return e.remove(),D(t)}(),o={type:"FeatureCollection",features:t.map(e=>({type:"Feature",properties:{key:e.key,estimate:e.estimate,faded:!!e.faded,color:e.color?I(e.color):r},geometry:{type:"LineString",coordinates:e.coordinates}}))},a=["case",["get","faded"],.25,.85],l=["get","color"],i=e.getSource(_);if(i&&(i.attribution||"")!==n){for(const t of H)e.getLayer(t)&&e.removeLayer(t);e.removeSource(_)}const s=e.getSource(_);s?s.setData(o):e.addSource(_,{type:"geojson",data:o,...n?{attribution:n}:{}}),e.getLayer("routes-road")||e.addLayer({id:"routes-road",type:"line",source:_,filter:["!",["get","estimate"]],layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":l,"line-width":4,"line-opacity":a}}),e.getLayer("routes-estimate")||e.addLayer({id:"routes-estimate",type:"line",source:_,filter:["get","estimate"],layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":l,"line-width":3,"line-dasharray":[1.5,1.5],"line-opacity":a}})},o=()=>{try{r()}catch(e){console.debug("[map] routes wait for the style",e)}};return o(),e.on("style.load",o),e.once("idle",o),()=>{e.off("style.load",o),e.off("idle",o)}},[be,y,ke]),s(()=>{const e=ce.current;if(!be||!e||!r)return;const n=t.find(e=>e.key===r.key);if(!n)return;const o=e.getZoom(),a=C?K(e.project([n.lng,n.lat]),t.filter(e=>e.key!==n.key).map(t=>e.project([t.lng,t.lat])),o):-1/0,l={center:[n.lng,n.lat],zoom:Math.min(18,Math.max(o,13,a))};V()?e.jumpTo(l):e.flyTo({...l,duration:600})},[be,r?.n]);const[$e,je]=i(!1);s(()=>{const e=Y.current;if(!e)return;const t=()=>je(e.clientWidth<B);t();const n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[B]);const Ae=n?t.find(e=>e.key===n)??null:null,ze=Ae?.key??null,Oe=Ae?.lng??0,Re=Ae?.lat??0,Be=be&&!$e&&null!=R&&!!Ae,[Te,Fe]=i(null);s(()=>{const e=ce.current,t=ue.current;if(!(Be&&e&&t&&ze))return;const n=document.createElement("div");n.dataset.mapCard="",n.className="w-[26rem] overflow-y-auto overscroll-contain";const r=new t.Popup({anchor:"bottom",offset:k,className:"rosh-map-card",maxWidth:"none",closeButton:!1,closeOnClick:!1,closeOnMove:!1,focusAfterOpen:!1}).setLngLat([Oe,Re]).setDOMContent(n).addTo(e),o=r.getElement(),a=o.querySelector(".maplibregl-popup-content");a&&Object.assign(a.style,{padding:"0",background:"transparent",borderRadius:"0",boxShadow:"none"});const l=o.querySelector(".maplibregl-popup-tip");l&&Object.assign(l.style,{borderTopColor:Q,borderBottomColor:Q}),Fe(n);let i=!1,s=!1;const c=(t=!0)=>{if(s)return;if(e.isMoving())return void(i||(i=!0,e.once("moveend",()=>{i=!1,c()})));const{clientWidth:o,clientHeight:a}=e.getContainer(),l=function(e,t){const n=e.getBoundingClientRect().top,r=[...e.querySelectorAll(".maplibregl-ctrl-top-left > *, .maplibregl-ctrl-top-right > *"),...t?.querySelectorAll(":scope > [data-map-control]")??[]];let o=0;for(const e of r){const t=e.getBoundingClientRect();t.height>0&&(o=Math.max(o,t.bottom-n))}return o}(e.getContainer(),Y.current)+8,u=`${N(a,l)}px`;n.style.maxHeight!==u&&(n.style.maxHeight=u);const d=r.getElement(),p=r.getLngLat(),{anchor:m,move:h}=M(e.project(p),{width:d.offsetWidth,height:d.offsetHeight},{width:o,height:a},l);r.options.anchor!==m&&(r.options.anchor=m,r.setLngLat(p)),!t||0===h.x&&0===h.y||e.panBy([-h.x,-h.y],{duration:V()?0:250}),Ee()},u=new ResizeObserver(()=>c());u.observe(n);const d=()=>c(),p=()=>{i||c(!1)};e.on("resize",d),e.on("moveend",p);let m=!1;const h=pe.current,g=e=>{m=n.contains(e.target)};return document.addEventListener("focusin",g),()=>{if(s=!0,u.disconnect(),e.off("resize",d),e.off("moveend",p),document.removeEventListener("focusin",g),r.remove(),Fe(null),m&&(!document.activeElement||document.activeElement===document.body)){const e=h.get(ze)?.button;e&&"none"!==e.style.display&&e.focus({preventScroll:!0})}}},[Be,ze,Oe,Re,Ee]);const We=T?.active??!1,Ke=l(T?.onChange);s(()=>{Ke.current=T?.onChange}),s(()=>{if(!T)return;const e=document.documentElement;We&&!document.fullscreenElement&&e.requestFullscreen&&e.requestFullscreen().catch(()=>{}),!We&&document.fullscreenElement&&document.exitFullscreen().catch(()=>{})},[We]);const Pe=!!T;return s(()=>{if(!Pe)return;const e=()=>{document.fullscreenElement||Ke.current?.(!1)};return document.addEventListener("fullscreenchange",e),()=>document.removeEventListener("fullscreenchange",e)},[Pe]),/* @__PURE__ */m("div",{ref:Y,className:ee("relative min-h-72 overflow-hidden rounded-lg border border-gray-200 bg-gray-100",A&&"[&_canvas]:cursor-crosshair",g),children:[
|
|
2
|
+
import{Button_default as e}from"../chunk-LU2DSEAL.js";import"../chunk-WOZ36LPR.js";import{rootIsDark as t,ROOT_THEME_ATTRIBUTES as n}from"../chunk-7IQ3B77H.js";import"../chunk-FIEA5CGB.js";import"../chunk-K7PQXJO7.js";import"../chunk-D65T4H6J.js";import{Icon as r}from"../chunk-6OXNDFJE.js";import{useShellStrings as o}from"../chunk-2PNYIWIN.js";import"../chunk-C3QOHMR6.js";import{SpinnerRing as a}from"../chunk-2J6F4EE7.js";import{useRef as l,useState as i,useEffect as s,useCallback as c,useMemo as u,useSyncExternalStore as d}from"react";import{createPortal as p}from"react-dom";import{jsxs as m,jsx as h,Fragment as g}from"react/jsx-runtime";import{useQuery as f}from"@tanstack/react-query";var y="maplibregl-compact-show";function b(e){if(!e)return()=>{};const t=()=>!!e.classList.contains(y)&&(e.classList.remove(y),!0);if(t())return()=>{};const n=new MutationObserver(()=>{t()&&n.disconnect()});return n.observe(e,{attributes:!0,attributeFilter:["class"]}),()=>n.disconnect()}var x=20,v=12,w=480,k={center:[0,0],left:[x,0],right:[-20,0],top:[0,x],"top-left":[0,x],"top-right":[0,x],bottom:[0,-20],"bottom-left":[0,-20],"bottom-right":[0,-20]},N=(e,t=12)=>Math.max(0,Math.floor(e-t-v-x-10-16));function M(e,t,n,r=12){const o=e.y-x-r,a=n.height-e.y-x-v,l=t.height<=o||t.height>a&&o>=a,i=l?Math.max(0,t.height-o):-Math.max(0,t.height-a);let s="",c=0;return e.x-t.width/2<v?(s="-left",c=Math.max(0,v-e.x)):e.x+t.width/2>n.width-v&&(s="-right",c=-Math.max(0,e.x-(n.width-v))),{anchor:`${l?"bottom":"top"}${s}`,move:{x:c,y:i}}}var C="maplibre-gl-worker.mjs",L=e=>`/maplibre-gl/${e}/${C}`,E=null;function $(){return E??=Promise.all([import("maplibre-gl"),import("maplibre-gl/dist/maplibre-gl.css")]).then(([e])=>(e.setWorkerUrl(L(e.getVersion())),e)).catch(e=>{throw E=null,e}),E}var S=24,j=28,A=29;function z(e){const t=[...e].sort((e,t)=>e-t),n=[];for(let e=0;e<t.length;){let r=e;for(;r+1<t.length&&t[r+1]===t[r]+1;)r++;n.push(r===e?String(t[e]):`${t[e]}–${t[r]}`),e=r+1}return n.join(", ")}function O(e){const t=Math.max(j,12+8*e.length);return t+t%2}var R=(e,t,n,r)=>({left:e-n/2,top:t-r/2,right:e+n/2,bottom:t+r/2});function B(e,t){return e.left<t.right+1&&t.left<e.right+1&&e.top<t.bottom+1&&t.top<e.bottom+1}var T=e=>R(e.x,e.y,e.width,e.height);function F(e){for(let t=0;t<e.length;t++)for(let n=t+1;n<e.length;n++)if(B(T(e[t]),T(e[n])))return[e[t],e[n]];return null}function W(e,t=[]){const n=[],r=e=>t.some(t=>B(t,e));let o=e.filter(e=>null!==e.stop).sort((e,t)=>e.stop-t.stop).map(e=>({keys:[e.key],stops:[e.stop],x:e.x,y:e.y,width:j,height:j,under:0}));for(let e=F(o);e;e=F(o)){const[t,n]=e;t.keys.push(...n.keys),t.stops.push(...n.stops),t.stops.sort((e,t)=>e-t),t.width=O(z(t.stops)),o=o.filter(e=>e!==n)}o=o.filter(e=>!r(T(e))||(n.push(...e.keys),!1));const a=[];for(const t of e){if(null!==t.stop)continue;const e=R(t.x,t.y,S,S),l=o.find(t=>B(T(t),e));if(l||r(e)){n.push(t.key),l&&l.under++;continue}const i=a.find(t=>B(T(t),e));i?i.keys.push(t.key):a.push({keys:[t.key],stops:[],x:t.x,y:t.y,width:S,height:S,under:0})}return{groups:[...o,...a],hidden:n}}function K(e,t,n){let r=-1/0;for(const o of t){const t=Math.max(Math.abs(o.x-e.x),Math.abs(o.y-e.y));r=Math.max(r,0===t?1/0:n+Math.log2(29/t))}return r}function q(e){const t=new MutationObserver(e);return t.observe(document.documentElement,{attributes:!0,attributeFilter:n}),()=>t.disconnect()}var P=t;var _="routes",I=["routes-road","routes-estimate"];function H(e){const t=document.createElement("span");t.style.display="none",t.style.color=e,document.body.appendChild(t);const n=getComputedStyle(t).color||"#2563eb";return t.remove(),D(n)}function D(e){const t=document.createElement("canvas").getContext("2d");if(!t)return"#2563eb";t.fillStyle="#2563eb",t.fillStyle=e,t.fillRect(0,0,1,1);const[n,r,o]=t.getImageData(0,0,1,1).data;return`rgb(${n}, ${r}, ${o})`}var Z={light:"https://tiles.openfreemap.org/styles/positron",dark:"https://tiles.openfreemap.org/styles/dark"},G={center:[30,20],zoom:1},J="ring-2 ring-gray-900 ring-offset-2";var Q="var(--color-gray-600, #4b5563)",U="http://www.w3.org/2000/svg",V=()=>window.matchMedia("(prefers-reduced-motion: reduce)").matches,X=/^(?:\d+|[xytrblse](?:-\d+)?|solid|dashed|dotted|double|hidden|none)$/;function Y(e){return e.split(/\s+/).some(e=>{const t=e.search(/[[(]/),n=t<0?e:e.slice(0,t),r=e.slice(n.lastIndexOf(":")+1);return r.startsWith("border-")&&!X.test(r.slice(7))})}var ee=(...e)=>e.filter(Boolean).join(" ");function te(e){const t=document.createElementNS(U,"svg");t.setAttribute("viewBox","0 0 24 24"),t.setAttribute("fill","none"),t.setAttribute("stroke","currentColor"),t.setAttribute("stroke-width","2"),t.setAttribute("aria-hidden","true");for(const n of e){const e=document.createElementNS(U,"path");e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-linejoin","round"),e.setAttribute("d",n),t.appendChild(e)}return t}function ne(e,t){for(const[n,r]of Object.entries(t??{}))e.dataset[n]=r}var re=(e,t)=>ee("relative grid place-items-center rounded-full cursor-pointer",t&&(null!=e.stop?"h-7 w-7":"h-6 w-6"));function oe(e,t,n,r){const o=t&&!r&&null==e.stop&&!e.dot;return ee("grid place-items-center rounded-full border-2 font-semibold leading-none shadow-sm transition-transform motion-reduce:transition-none",!Y(e.tone)&&"border-white",e.tone,e.dot?"h-4 w-4 opacity-80":null!=e.stop?"h-7 w-7 text-xs ring-2 ring-gray-900":o?"h-8 w-8 text-xs [&_svg]:h-4 [&_svg]:w-4":"h-6 w-6 text-2xs [&_svg]:h-3.5 [&_svg]:w-3.5",t&&(o?"ring-2 ring-gray-900 ring-offset-1":J),e.approximate&&"border-dashed opacity-80",e.faded&&!t&&"opacity-40",n&&"scale-125 opacity-100")}var ae=e=>ee("grid place-items-center border-2 px-0.5 text-xs font-semibold leading-none shadow-sm",e.stop?"h-7 min-w-7":"h-6 min-w-6",!Y(e.tone??"")&&"border-white",e.tone??"bg-gray-900 text-white");function le({pins:t,selectedKey:n,focus:r,onSelect:a,ariaLabel:u,className:g="",children:f,routes:y,fitTo:x,attribution:v,marks:w,groupCrowded:C=!1,noun:L,highlightKey:E=null,picking:A=!1,onPick:O,card:R,cardMinMapWidth:B=480,fullScreen:T,initialView:F=G,cooperativeGestures:U=!1}){const X=o().map,Y=l(null),le=l(null),ce=l(null),ue=l(null),de=l([]),pe=l(/* @__PURE__ */new Map),me=l(/* @__PURE__ */new Map),he=l(/* @__PURE__ */new Map),ge=l(null),fe=l(/* @__PURE__ */new Map),ye=l(""),[be,xe]=i(!1),[ve,we]=i(!1),ke=d(q,P,()=>!1)?"dark":"light",Ne=l({onSelect:a,onPick:O,picking:A,pins:t,selectedKey:n,highlightKey:E,groupCrowded:C,strings:X,noun:L});s(()=>{Ne.current={onSelect:a,onPick:O,picking:A,pins:t,selectedKey:n,highlightKey:E,groupCrowded:C,strings:X,noun:L}});const Me=c(()=>{const e=ce.current,{pins:t,selectedKey:n}=Ne.current,r=n?t.find(e=>e.key===n):void 0;e&&r&&!e.getBounds().contains([r.lng,r.lat])&&e.easeTo({center:[r.lng,r.lat],duration:V()?0:400})},[]),Ce=l(!1),Le=c((e,t)=>{const n=ce.current,r=ue.current;if(!n||!r)return;const o=n.getZoom();if(o>=17.5){const t=e.indexOf(Ne.current.selectedKey??"");return void Ne.current.onSelect(e[(t+1)%e.length])}const a=e.map(e=>pe.current.get(e).pin),l=new r.LngLatBounds([a[0].lng,a[0].lat],[a[0].lng,a[0].lat]);for(const e of a)l.extend([e.lng,e.lat]);const i=a.map(e=>n.project([e.lng,e.lat])),s=Math.max(...i.map((e,t)=>K(e,i.filter((e,n)=>n!==t),o))),{clientWidth:c,clientHeight:u}=n.getContainer(),d=n.cameraForBounds(l,{padding:Math.min(64,c/4,u/4)})?.zoom??18,p=document.activeElement===t;Ce.current=!0,n.once("moveend",()=>{if(Ce.current=!1,!p)return;const e=a[0].key,t=pe.current.get(e)?.button,n=t&&"none"!==t.style.display?t:[...me.current.values()].find(t=>t.keys.includes(e))?.button;n?.focus({preventScroll:!0})}),n.easeTo({center:l.getCenter(),zoom:Math.min(18,Math.max(o+1,Math.min(d,s))),duration:V()?0:600})},[]),Ee=c(()=>{const e=ce.current,t=ue.current;if(!e||!t||!Y.current||Ce.current&&e.isMoving())return;const{selectedKey:n,highlightKey:r,groupCrowded:o,strings:a,noun:l}=Ne.current;for(const[e,t]of pe.current){const a=oe(t.pin,e===n,e===r,o);t.mark.className!==a&&(t.mark.className=a);const l=e===n?"1":"";t.button.style.zIndex!==l&&(t.button.style.zIndex=l)}let i=null;if(o){const r=e.getContainer().getBoundingClientRect(),o=[...Y.current.querySelectorAll("a[href], button, input, select, textarea, summary, [role='button'], [tabindex]:not([tabindex='-1'])")].filter(e=>!e.closest("[data-pin], [data-pin-group], .maplibregl-canvas")).map(e=>{const t=e.getBoundingClientRect(),n=e.closest("[data-map-card]")?.getBoundingClientRect()??t;return{left:Math.max(t.left,n.left)-r.left,top:Math.max(t.top,n.top)-r.top,right:Math.min(t.right,n.right)-r.left,bottom:Math.min(t.bottom,n.bottom)-r.top}}).filter(e=>e.right>e.left&&e.bottom>e.top);i=W([...pe.current.values()].map(({pin:t})=>{const n=e.project([t.lng,t.lat]);return{key:t.key,x:n.x,y:n.y,stop:t.stop??null}}),o);const s=e=>(l??a.places)(e),c=e.getZoom()<17.5?a.spread:a.cycle,u=(e,t)=>{const n=t?"":"none";e.style.display!==n&&(e.style.display=n)},d=/* @__PURE__ */new Map;for(const r of i.groups){const o=r.under>0?a.closeBy(r.under,s(r.under)):null,l=1===r.keys.length?pe.current.get(r.keys[0]):null;if(l){u(l.button,!0),l.button.setAttribute("aria-label",o?`${l.name}; ${o}`:l.name),l.button.title=o?`${l.title}\n${o}`:l.title;continue}for(const e of r.keys)u(pe.current.get(e).button,!1);const i=r.keys.join(" ");let p=me.current.get(i);if(!p){const n=document.createElement("button");n.type="button",n.dataset.pinGroup="",n.className="grid place-items-center rounded-full cursor-pointer",n.append(document.createElement("span"));const o=pe.current.get(r.keys[0]).pin,a={button:n,keys:r.keys,marker:new t.Marker({element:n,anchor:"center"}).setLngLat([o.lng,o.lat]).addTo(e)};n.addEventListener("click",e=>{e.stopPropagation(),Le(a.keys,n)}),p=a}p.keys=r.keys;const m=r.keys.map(e=>pe.current.get(e)),h=r.stops.length>0?z(r.stops):String(m.length),g=r.stops.length>0?a.stops(h):a.group(m.length,s(m.length));p.button.style.width=`${r.width}px`,p.button.style.height=`${r.height}px`,p.button.setAttribute("aria-label",`${g}: ${m.map(e=>e.pin.label).join("; ")}. ${c}${o?`; ${o}`:""}.`),p.button.title=[`${g}:`,...m.map(e=>e.title),...o?[o]:[],c].join("\n");const f=p.button.firstElementChild;f.textContent=h;const y=ee("grid place-items-center rounded-full border-2 border-gray-700 bg-white font-semibold leading-none text-gray-900 shadow-sm",r.stops.length>0?"h-7 w-full px-1 text-xs ring-2 ring-gray-900":m.every(e=>e.pin.dot)?"h-5 w-5 text-3xs":"h-6 w-6 text-2xs",null!=n&&r.keys.includes(n)&&J);f.className!==y&&(f.className=y),d.set(i,p)}for(const e of i.hidden)u(pe.current.get(e).button,!1);for(const[e,t]of me.current)d.has(e)||t.marker.remove();me.current=d}if(ge.current){const e=r&&i?i.groups.find(e=>e.keys.includes(r)&&e.keys.length>1):void 0,t=r?pe.current.get(r):void 0,n=r?he.current.get(r):void 0,o=e?{at:pe.current.get(e.keys[0]).pin,width:e.width,height:e.height}:t?{at:t.pin,width:t.button.offsetWidth||(null!=t.pin.stop?j:S),height:t.button.offsetHeight||(null!=t.pin.stop?j:S)}:n?{at:n.mark,width:n.element.offsetWidth||j,height:n.element.offsetHeight||j}:null,a=ge.current.getElement();a.style.display=o?"":"none",o&&(ge.current.setLngLat([o.at.lng,o.at.lat]),a.style.width=`${o.width+22}px`,a.style.height=`${o.height+22}px`)}},[Le]);s(()=>{if(Ee(),!Y.current)return;const e=new ResizeObserver(()=>Ee());e.observe(Y.current);for(const t of Y.current.children)t.contains(le.current)||e.observe(t);return()=>e.disconnect()}),s(()=>{let e=!1,t=null,n=null,r=()=>{};return(async()=>{try{const o=await $();if(e||!le.current)return;ue.current=o,t=new o.Map({container:le.current,style:Z[ke],center:F.center,zoom:F.zoom,attributionControl:v?{compact:!0,customAttribution:v}:{compact:!0},dragRotate:!1,pitchWithRotate:!1,touchPitch:!1,maxPitch:0,cooperativeGestures:"coarse"===U?window.matchMedia("(pointer: coarse)").matches:U}),t.touchZoomRotate.disableRotation(),t.keyboard.disableRotation(),t.addControl(new o.NavigationControl({showCompass:!1}),"top-right");const a=document.createElement("div");a.dataset.pinRing="",a.setAttribute("aria-hidden","true"),a.className="pointer-events-none rounded-full border-2 border-gray-900 bg-gray-900/15 shadow-[0_0_0_2px_var(--color-white,#fff)]",a.style.display="none",ge.current=new o.Marker({element:a,anchor:"center"}).setLngLat(F.center).addTo(t),t.on("click",e=>{Ne.current.picking&&Ne.current.onPick?.({lat:e.lngLat.lat,lng:e.lngLat.lng})}),t.on("move",Ee),t.on("moveend",Ee),t.on("resize",Ee),t.on("error",e=>console.warn("[map]",e.error?.message)),r=b(le.current.querySelector(".maplibregl-ctrl-attrib"));const l=t;n=new ResizeObserver(()=>{l.resize(),Me()}),n.observe(le.current),ce.current=t,xe(!0)}catch(t){console.error("[map] could not start",t),e||we(!0)}})(),()=>{e=!0,n?.disconnect(),r(),de.current.forEach(e=>e.remove()),de.current=[],me.current.forEach(e=>e.marker.remove()),me.current.clear(),ge.current?.remove(),ge.current=null,t?.remove(),ce.current=null}},[]);const $e=l(ke);s(()=>{be&&ce.current&&$e.current!==ke&&($e.current=ke,ce.current.setStyle(Z[ke]))},[be,ke]),s(()=>{const e=ce.current,n=ue.current;if(!be||!e||!n)return;de.current.forEach(e=>e.remove()),de.current=[],me.current.forEach(e=>e.marker.remove()),me.current.clear(),pe.current.clear(),he.current.clear();for(const e of fe.current.keys())t.some(t=>t.key===e)||fe.current.delete(e);const r=Ne.current.strings;for(const o of t){const t=document.createElement("button");t.type="button",t.dataset.pin=o.key,t.className=re(o,C);const a=o.approximate?r.approximate(o.label):o.label,l=o.title??(o.approximate?r.approximateTitle(o.label):o.label);t.setAttribute("aria-label",a),t.title=l;const i=document.createElement("span");if(ne(i,o.data),o.dot);else if(null!=o.iconNode){const e=fe.current.get(o.key);e&&i.append(e)}else o.icon?.length?i.append(te(o.icon)):i.textContent=null!=o.stop?String(o.stop):o.glyph;if(t.append(i),o.badge){const e=document.createElement("span");e.setAttribute("aria-hidden","true"),e.className=ee("absolute -right-2 -top-2 grid h-4 min-w-4 place-items-center rounded-full px-0.5 text-3xs font-semibold leading-none shadow",o.badgeTone??"bg-white text-gray-900"),e.textContent=o.badge,t.appendChild(e)}t.addEventListener("click",e=>{e.stopPropagation(),Ne.current.onSelect(o.key)}),de.current.push(new n.Marker({element:t,anchor:"center"}).setLngLat([o.lng,o.lat]).addTo(e)),pe.current.set(o.key,{pin:o,button:t,mark:i,name:a,title:l})}for(const t of w??[]){const r=document.createElement("div");r.dataset.mapMark=t.key,ne(r,t.data),r.className=ae(t),r.textContent=t.text,r.title=t.title??t.label,r.setAttribute("role","img"),r.setAttribute("aria-label",t.label),de.current.push(new n.Marker({element:r,anchor:"center"}).setLngLat([t.lng,t.lat]).addTo(e)),he.current.set(t.key,{mark:t,element:r})}Ee()},[be,t,w,C,Ee]),s(()=>{be&&Ee()},[be,n,E,Ee]),s(()=>{if(!be||!n)return;const e=requestAnimationFrame(Me);return()=>cancelAnimationFrame(e)},[be,n,Me]),s(()=>{const e=ce.current,n=ue.current,r=x?[...t,...w??[]].filter(e=>x.includes(e.key)):t;if(!be||!e||!n||0===r.length)return;const o=r.map(e=>`${e.key}@${e.lat},${e.lng}`).sort().join("|");if(ye.current===o)return;const a=""===ye.current;if(ye.current=o,1===r.length)return void e.jumpTo({center:[r[0].lng,r[0].lat],zoom:13});const l=new n.LngLatBounds([r[0].lng,r[0].lat],[r[0].lng,r[0].lat]);for(const e of r)l.extend([e.lng,e.lat]);e.fitBounds(l,{padding:48,maxZoom:14,animate:!a})},[be,t,w,x]),s(()=>{const e=ce.current;if(!be||!e)return;const t=(y??[]).filter(e=>e.coordinates.length>=2),n=[...new Set(t.flatMap(e=>e.attribution?[e.attribution]:[]))].join(" · "),r=()=>{const r=function(){const e=document.createElement("span");e.className="text-blue-600",e.style.display="none",document.body.appendChild(e);const t=getComputedStyle(e).color||"#2563eb";return e.remove(),D(t)}(),o={type:"FeatureCollection",features:t.map(e=>({type:"Feature",properties:{key:e.key,estimate:e.estimate,faded:!!e.faded,color:e.color?H(e.color):r},geometry:{type:"LineString",coordinates:e.coordinates}}))},a=["case",["get","faded"],.25,.85],l=["get","color"],i=e.getSource(_);if(i&&(i.attribution||"")!==n){for(const t of I)e.getLayer(t)&&e.removeLayer(t);e.removeSource(_)}const s=e.getSource(_);s?s.setData(o):e.addSource(_,{type:"geojson",data:o,...n?{attribution:n}:{}}),e.getLayer("routes-road")||e.addLayer({id:"routes-road",type:"line",source:_,filter:["!",["get","estimate"]],layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":l,"line-width":4,"line-opacity":a}}),e.getLayer("routes-estimate")||e.addLayer({id:"routes-estimate",type:"line",source:_,filter:["get","estimate"],layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":l,"line-width":3,"line-dasharray":[1.5,1.5],"line-opacity":a}})},o=()=>{try{r()}catch(e){console.debug("[map] routes wait for the style",e)}};return o(),e.on("style.load",o),e.once("idle",o),()=>{e.off("style.load",o),e.off("idle",o)}},[be,y,ke]),s(()=>{const e=ce.current;if(!be||!e||!r)return;const n=t.find(e=>e.key===r.key);if(!n)return;const o=e.getZoom(),a=C?K(e.project([n.lng,n.lat]),t.filter(e=>e.key!==n.key).map(t=>e.project([t.lng,t.lat])),o):-1/0,l={center:[n.lng,n.lat],zoom:Math.min(18,Math.max(o,13,a))};V()?e.jumpTo(l):e.flyTo({...l,duration:600})},[be,r?.n]);const[Se,je]=i(!1);s(()=>{const e=Y.current;if(!e)return;const t=()=>je(e.clientWidth<B);t();const n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[B]);const Ae=n?t.find(e=>e.key===n)??null:null,ze=Ae?.key??null,Oe=Ae?.lng??0,Re=Ae?.lat??0,Be=be&&!Se&&null!=R&&!!Ae,[Te,Fe]=i(null);s(()=>{const e=ce.current,t=ue.current;if(!(Be&&e&&t&&ze))return;const n=document.createElement("div");n.dataset.mapCard="",n.className="w-[26rem] overflow-y-auto overscroll-contain";const r=new t.Popup({anchor:"bottom",offset:k,className:"rosh-map-card",maxWidth:"none",closeButton:!1,closeOnClick:!1,closeOnMove:!1,focusAfterOpen:!1}).setLngLat([Oe,Re]).setDOMContent(n).addTo(e),o=r.getElement(),a=o.querySelector(".maplibregl-popup-content");a&&Object.assign(a.style,{padding:"0",background:"transparent",borderRadius:"0",boxShadow:"none"});const l=o.querySelector(".maplibregl-popup-tip");l&&Object.assign(l.style,{borderTopColor:Q,borderBottomColor:Q}),Fe(n);let i=!1,s=!1;const c=(t=!0)=>{if(s)return;if(e.isMoving())return void(i||(i=!0,e.once("moveend",()=>{i=!1,c()})));const{clientWidth:o,clientHeight:a}=e.getContainer(),l=function(e,t){const n=e.getBoundingClientRect().top,r=[...e.querySelectorAll(".maplibregl-ctrl-top-left > *, .maplibregl-ctrl-top-right > *"),...t?.querySelectorAll(":scope > [data-map-control]")??[]];let o=0;for(const e of r){const t=e.getBoundingClientRect();t.height>0&&(o=Math.max(o,t.bottom-n))}return o}(e.getContainer(),Y.current)+8,u=`${N(a,l)}px`;n.style.maxHeight!==u&&(n.style.maxHeight=u);const d=r.getElement(),p=r.getLngLat(),{anchor:m,move:h}=M(e.project(p),{width:d.offsetWidth,height:d.offsetHeight},{width:o,height:a},l);r.options.anchor!==m&&(r.options.anchor=m,r.setLngLat(p)),!t||0===h.x&&0===h.y||e.panBy([-h.x,-h.y],{duration:V()?0:250}),Ee()},u=new ResizeObserver(()=>c());u.observe(n);const d=()=>c(),p=()=>{i||c(!1)};e.on("resize",d),e.on("moveend",p);let m=!1;const h=pe.current,g=e=>{m=n.contains(e.target)};return document.addEventListener("focusin",g),()=>{if(s=!0,u.disconnect(),e.off("resize",d),e.off("moveend",p),document.removeEventListener("focusin",g),r.remove(),Fe(null),m&&(!document.activeElement||document.activeElement===document.body)){const e=h.get(ze)?.button;e&&"none"!==e.style.display&&e.focus({preventScroll:!0})}}},[Be,ze,Oe,Re,Ee]);const We=T?.active??!1,Ke=l(T?.onChange);s(()=>{Ke.current=T?.onChange}),s(()=>{if(!T)return;const e=document.documentElement;We&&!document.fullscreenElement&&e.requestFullscreen&&e.requestFullscreen().catch(()=>{}),!We&&document.fullscreenElement&&document.exitFullscreen().catch(()=>{})},[We]);const qe=!!T;return s(()=>{if(!qe)return;const e=()=>{document.fullscreenElement||Ke.current?.(!1)};return document.addEventListener("fullscreenchange",e),()=>document.removeEventListener("fullscreenchange",e)},[qe]),/* @__PURE__ */m("div",{ref:Y,className:ee("relative min-h-72 overflow-hidden rounded-lg border border-gray-200 bg-gray-100",A&&"[&_canvas]:cursor-crosshair",g),children:[
|
|
3
3
|
/* @__PURE__ */h("div",{className:"absolute inset-0",children:/* @__PURE__ */h("div",{ref:le,className:"h-full w-full",role:"region","aria-label":u})}),ve&&/* @__PURE__ */h("p",{className:"absolute inset-0 grid place-items-center p-6 text-center text-sm text-gray-500",children:X.failed}),T&&/* @__PURE__ */h(e,{"data-map-control":"",variant:"secondary",size:"sm",className:"absolute left-3 top-3 z-10",onClick:()=>T.onChange(!T.active),leftIcon:/* @__PURE__ */h(se,{leave:T.active}),children:T.active?X.leaveFullScreen:X.fullScreen}),f,null!=R&&!Be&&/* @__PURE__ */h("div",{"data-map-card":"",className:"absolute bottom-3 left-3 right-3 z-10 max-h-[calc(100%-1.5rem)] max-w-md overflow-y-auto overscroll-contain",children:R}),Be&&Te?p(R,Te):null,be&&/* @__PURE__ */h(ie,{pins:t,hosts:fe.current})]})}function ie({pins:e,hosts:t}){/* @__PURE__ */
|
|
4
4
|
return h(g,{children:e.map(e=>{if(null==e.iconNode||e.dot)return null;let n=t.get(e.key);return n||(n=document.createElement("span"),n.className="contents",t.set(e.key,n)),p(e.iconNode,n,e.key)})})}function se({leave:e}){/* @__PURE__ */
|
|
5
|
-
return h(r,e?{name:"collapse","aria-hidden":"true",className:"h-4 w-4",strokeWidth:2}:{name:"expand","aria-hidden":"true",className:"h-4 w-4",strokeWidth:2})}function ce(){const[e,t]=i(null);return{highlightKey:e,pointAt:c(e=>{const n=()=>t(e),r=()=>t(t=>t===e?null:t);return{onMouseEnter:n,onMouseLeave:r,onFocus:n,onBlur:r}},[])}}var ue=3e3,de=e=>!!e?.pending&&3e3,pe=e=>`${e.kind}:${e.id}`,me=e=>("located"===e.placement||"approximate"===e.placement)&&null!=e.lat&&null!=e.lng;function he(e){switch(e){case"located":return null;case"approximate":return"Approximate: only the suburb or postcode matched";case"pending":return"Locating";case"not_found":return"Not on the map: address not found";case"failed":return"Not on the map: the map service could not be reached";case"no_address":return"Not on the map: no city or postcode"}}var ge={importer:{label:"Importer",tone:"bg-sky-600 text-white"},dealer:{label:"Dealer",tone:"bg-purple-600 text-white"},retail:{label:"Retail",tone:"bg-green-600 text-white"},supplier:{label:"Supplier",tone:"bg-sky-600 text-white"},delivery_location:{label:"Delivery location",tone:"bg-amber-600 text-white"},warehouse:{label:"Warehouse",tone:"bg-amber-600 text-white"}},fe=["importer","dealer","retail","supplier","delivery_location","warehouse"];function ye(e){return"supplier"===e.kind?"supplier":"customer"===e.kind?e.category||"importer":e.kind}var be=(e,t=ge)=>t[e]?.tone??"bg-gray-700 text-white",xe=(e,t=ge)=>t[e]?.label??e,ve=(e,t)=>be(ye(e),t);function we(e,t,n=ge){return null!=t?String(t):(n[ye(e)]?.label??"").charAt(0).toUpperCase()}var ke=["delivery_location","warehouse"];function Ne(e,t=ke){const n=/* @__PURE__ */new Map;let r=0;for(const o of e)t.includes(o.kind)&&n.set(pe(o),++r);return n}function Me(e){const t={onMap:0,approximate:0,pending:0,off:0};for(const n of e)me(n)?(t.onMap+=1,"approximate"===n.placement&&(t.approximate+=1)):"pending"===n.placement?t.pending+=1:t.off+=1;return t}function Ce(e){const t=[`${e.onMap} on the map`];return e.approximate&&t.push(`${e.approximate} approximate`),e.pending&&t.push(`${e.pending} locating`),e.off&&t.push(`${e.off} not on the map`),t.join(" · ")}function Le(e){const t=[...new Set(e.filter(me).map(ye))];return[...fe.filter(e=>t.includes(e)),...t.filter(e=>!fe.includes(e))]}function Ee(e,t){return e.filter(e=>!me(e)&&"pending"!==e.placement).map(e=>{const n=t?.get(pe(e)),r=he(e.placement)?.replace(/^Not on the map: /,"")??"";return{key:pe(e),text:`${null!=n?`${n}. `:""}${e.label}: ${r}`}})}function
|
|
6
|
-
/* @__PURE__ */h("span",{"aria-hidden":!0,className:`h-2.5 w-2.5 rounded-full ${be(e,t)}`}),xe(e,t)]},e))})}function
|
|
5
|
+
return h(r,e?{name:"collapse","aria-hidden":"true",className:"h-4 w-4",strokeWidth:2}:{name:"expand","aria-hidden":"true",className:"h-4 w-4",strokeWidth:2})}function ce(){const[e,t]=i(null);return{highlightKey:e,pointAt:c(e=>{const n=()=>t(e),r=()=>t(t=>t===e?null:t);return{onMouseEnter:n,onMouseLeave:r,onFocus:n,onBlur:r}},[])}}var ue=3e3,de=e=>!!e?.pending&&3e3,pe=e=>`${e.kind}:${e.id}`,me=e=>("located"===e.placement||"approximate"===e.placement)&&null!=e.lat&&null!=e.lng;function he(e){switch(e){case"located":return null;case"approximate":return"Approximate: only the suburb or postcode matched";case"pending":return"Locating";case"not_found":return"Not on the map: address not found";case"failed":return"Not on the map: the map service could not be reached";case"no_address":return"Not on the map: no city or postcode"}}var ge={importer:{label:"Importer",tone:"bg-sky-600 text-white"},dealer:{label:"Dealer",tone:"bg-purple-600 text-white"},retail:{label:"Retail",tone:"bg-green-600 text-white"},supplier:{label:"Supplier",tone:"bg-sky-600 text-white"},delivery_location:{label:"Delivery location",tone:"bg-amber-600 text-white"},warehouse:{label:"Warehouse",tone:"bg-amber-600 text-white"}},fe=["importer","dealer","retail","supplier","delivery_location","warehouse"];function ye(e){return"supplier"===e.kind?"supplier":"customer"===e.kind?e.category||"importer":e.kind}var be=(e,t=ge)=>t[e]?.tone??"bg-gray-700 text-white",xe=(e,t=ge)=>t[e]?.label??e,ve=(e,t)=>be(ye(e),t);function we(e,t,n=ge){return null!=t?String(t):(n[ye(e)]?.label??"").charAt(0).toUpperCase()}var ke=["delivery_location","warehouse"];function Ne(e,t=ke){const n=/* @__PURE__ */new Map;let r=0;for(const o of e)t.includes(o.kind)&&n.set(pe(o),++r);return n}function Me(e){const t={onMap:0,approximate:0,pending:0,off:0};for(const n of e)me(n)?(t.onMap+=1,"approximate"===n.placement&&(t.approximate+=1)):"pending"===n.placement?t.pending+=1:t.off+=1;return t}function Ce(e){const t=[`${e.onMap} on the map`];return e.approximate&&t.push(`${e.approximate} approximate`),e.pending&&t.push(`${e.pending} locating`),e.off&&t.push(`${e.off} not on the map`),t.join(" · ")}function Le(e){const t=[...new Set(e.filter(me).map(ye))];return[...fe.filter(e=>t.includes(e)),...t.filter(e=>!fe.includes(e))]}function Ee(e,t){return e.filter(e=>!me(e)&&"pending"!==e.placement).map(e=>{const n=t?.get(pe(e)),r=he(e.placement)?.replace(/^Not on the map: /,"")??"";return{key:pe(e),text:`${null!=n?`${n}. `:""}${e.label}: ${r}`}})}function $e({categories:e,palette:t=ge,floating:n=!0}){return e.length<2?null:/* @__PURE__ */h("div",{className:(n?"absolute left-3 top-3 z-10 ":"")+"flex flex-wrap gap-x-3 gap-y-1 rounded-lg border border-gray-200 bg-white px-3 py-2 text-xs text-gray-600 shadow-sm",children:e.map(e=>/* @__PURE__ */m("span",{className:"inline-flex items-center gap-2",children:[
|
|
6
|
+
/* @__PURE__ */h("span",{"aria-hidden":!0,className:`h-2.5 w-2.5 rounded-full ${be(e,t)}`}),xe(e,t)]},e))})}function Se({point:t,number:n,onOpen:a,onClose:l,palette:i=ge}){const s=he(t.placement),c=ye(t),u=o().map;/* @__PURE__ */
|
|
7
7
|
return m("section",{"aria-label":u.chosen(t.label),className:"absolute bottom-3 left-3 right-3 z-10 max-w-md space-y-2 rounded-lg border border-gray-200 bg-white p-3 shadow-(--elevation-panel)",children:[
|
|
8
8
|
/* @__PURE__ */m("div",{className:"flex items-start justify-between gap-2",children:[
|
|
9
9
|
/* @__PURE__ */m("div",{className:"min-w-0",children:[
|
|
10
10
|
/* @__PURE__ */m("h3",{className:"text-sm font-semibold text-gray-900 [overflow-wrap:anywhere]",children:[null!=n&&/* @__PURE__ */m("span",{className:"mr-1 text-gray-400",children:[n,"."]}),t.label,t.code&&/* @__PURE__ */h("span",{className:"ml-2 text-xs font-normal text-gray-400",children:t.code})]}),
|
|
11
11
|
/* @__PURE__ */h("p",{className:"text-xs text-gray-500",children:i[c]?xe(c,i):t.category})]}),
|
|
12
12
|
/* @__PURE__ */h("button",{type:"button",onClick:l,"aria-label":u.closeCard,className:"rounded p-0.5 text-gray-400 hover:text-gray-600",children:/* @__PURE__ */h(r,{name:"close","aria-hidden":!0,className:"h-4 w-4",strokeWidth:2})})]}),
|
|
13
|
-
/* @__PURE__ */h("p",{className:"text-sm text-gray-700 [overflow-wrap:anywhere]",children:t.address||"—"}),s&&/* @__PURE__ */h("p",{className:"text-xs text-gray-500",children:s}),t.matched&&"approximate"===t.placement&&/* @__PURE__ */m("p",{className:"text-xs text-gray-400 [overflow-wrap:anywhere]",children:["Placed at: ",t.matched]}),a&&/* @__PURE__ */h("div",{className:"flex justify-end",children:/* @__PURE__ */h(e,{variant:"secondary",size:"sm",onClick:a,children:u.openRecord})})]})}function je(e,t,{staleTime:n}={}){return f({queryKey:e,queryFn:t,staleTime:n,refetchInterval:e=>de(e.state.data)})}function Ae({queryKey:e,queryFn:t,refreshSignal:n,onOpen:r,ariaLabel:o,title:c="Locations",palette:d=ge,numbers:p,className:g="",mapClassName:f="min-h-[240px] flex-1"}){const{data:y,isError:b,refetch:x}=je(e,t,{staleTime:0}),v=l(!1);s(()=>{v.current?x():v.current=!0},[n]);const[w,k]=i(null),N=u(()=>y?.points??[],[y]),M=u(()=>p??Ne(N),[p,N]),C=u(()=>N.filter(me).map(e=>({key:pe(e),label:e.label,lat:e.lat,lng:e.lng,glyph:we(e,M.get(pe(e))??null,d),tone:ve(e,d),approximate:"approximate"===e.placement})),[N,M,d]),L=u(()=>Ee(N,M),[N,M]),E=u(()=>Le(N),[N])
|
|
13
|
+
/* @__PURE__ */h("p",{className:"text-sm text-gray-700 [overflow-wrap:anywhere]",children:t.address||"—"}),s&&/* @__PURE__ */h("p",{className:"text-xs text-gray-500",children:s}),t.matched&&"approximate"===t.placement&&/* @__PURE__ */m("p",{className:"text-xs text-gray-400 [overflow-wrap:anywhere]",children:["Placed at: ",t.matched]}),a&&/* @__PURE__ */h("div",{className:"flex justify-end",children:/* @__PURE__ */h(e,{variant:"secondary",size:"sm",onClick:a,children:u.openRecord})})]})}function je(e,t,{staleTime:n}={}){return f({queryKey:e,queryFn:t,staleTime:n,refetchInterval:e=>de(e.state.data)})}function Ae({queryKey:e,queryFn:t,refreshSignal:n,onOpen:r,ariaLabel:o,title:c="Locations",palette:d=ge,numbers:p,className:g="",mapClassName:f="min-h-[240px] flex-1"}){const{data:y,isError:b,refetch:x}=je(e,t,{staleTime:0}),v=l(!1);s(()=>{v.current?x():v.current=!0},[n]);const[w,k]=i(null),N=u(()=>y?.points??[],[y]),M=u(()=>p??Ne(N),[p,N]),C=u(()=>N.filter(me).map(e=>({key:pe(e),label:e.label,lat:e.lat,lng:e.lng,glyph:we(e,M.get(pe(e))??null,d),tone:ve(e,d),approximate:"approximate"===e.placement})),[N,M,d]),L=u(()=>Ee(N,M),[N,M]),E=u(()=>Le(N),[N]),$=y?.pending??0,S=N.find(e=>pe(e)===w)??null,j=S&&r?r(S):null;/* @__PURE__ */
|
|
14
14
|
return m("section",{"aria-label":c,className:`flex min-w-0 flex-col ${g}`,children:[
|
|
15
15
|
/* @__PURE__ */m("div",{className:"flex min-h-[30px] items-center justify-between mb-2",children:[
|
|
16
16
|
/* @__PURE__ */h("h3",{className:"text-sm font-semibold text-gray-900",children:c}),y&&/* @__PURE__ */h("span",{className:"text-xs text-gray-500",children:Ce(Me(N))})]}),
|
|
17
17
|
/* @__PURE__ */m(le,{pins:C,selectedKey:w,focus:null,onSelect:k,ariaLabel:o,className:f,children:[
|
|
18
18
|
/* @__PURE__ */m("div",{className:"absolute left-3 top-3 z-10 flex max-w-[70%] flex-col items-start gap-2",children:[
|
|
19
|
-
/* @__PURE__ */h(
|
|
20
|
-
/* @__PURE__ */h("button",{type:"button",onClick:()=>{x()},className:"font-medium text-blue-600 hover:text-blue-800 hover:underline",children:"Try again"})]}),!b&&(
|
|
21
|
-
/* @__PURE__ */h(a,{}),"Locating "
|
|
19
|
+
/* @__PURE__ */h($e,{categories:E,palette:d,floating:!1}),b&&/* @__PURE__ */m("div",{className:"flex items-center gap-2 rounded-lg border border-gray-200 bg-white px-3 min-h-8 py-1 text-xs text-gray-600 shadow-sm",children:["Couldn’t load the locations.",
|
|
20
|
+
/* @__PURE__ */h("button",{type:"button",onClick:()=>{x()},className:"font-medium text-blue-600 hover:text-blue-800 hover:underline",children:"Try again"})]}),!b&&($>0||L.length>0)&&/* @__PURE__ */m("div",{className:"max-w-full space-y-0.5 rounded-lg border border-gray-200 bg-white px-3 py-2 text-xs shadow-sm","aria-live":"polite",children:[$>0&&/* @__PURE__ */m("p",{className:"flex items-center gap-2 text-gray-500",children:[
|
|
21
|
+
/* @__PURE__ */h(a,{}),"Locating ",$," address",1===$?"":"es"]}),L.slice(0,3).map(e=>/* @__PURE__ */h("p",{className:"truncate text-amber-700",title:e.text,children:e.text},e.key)),L.length>3&&/* @__PURE__ */m("p",{className:"text-gray-500",children:["+",L.length-3," more not on the map"]})]})]}),S&&/* @__PURE__ */h(Se,{point:S,number:M.get(pe(S))??null,onOpen:j,onClose:()=>k(null),palette:d})]})]})}export{w as CARD_MIN_MAP_WIDTH,y as COMPACT_SHOW,le as EntityMap,Ae as LocationsMap,C as MAPLIBRE_WORKER_FILE,A as MAP_APART_PX,ge as MAP_CATEGORIES,j as MAP_STOP_PX,S as MAP_TARGET_PX,$e as MapLegend,ue as PENDING_POLL_MS,ke as SECONDARY_KINDS,Se as SelectedCard,N as cardMaxHeight,xe as categoryLabel,be as categoryTone,b as foldAttributionOnce,me as isOnMap,W as layoutPins,Le as legendCategories,$ as loadMapLibre,Ne as locationNumbers,L as mapLibreWorkerUrl,de as mapPointsRefetchInterval,Ee as offMapNotes,ye as pinCategory,we as pinGlyph,ve as pinTone,M as placeCard,he as placementNote,pe as pointKey,z as stopsLabel,Me as summarize,Ce as summaryText,ce as useMapHighlight,je as useMapPoints,K as zoomApart};
|
package/dist/markdown/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{useBrowserLayoutEffect as e}from"../chunk-D65T4H6J.js";import{Icon as t}from"../chunk-
|
|
2
|
+
import{useBrowserLayoutEffect as e}from"../chunk-D65T4H6J.js";import{Icon as t}from"../chunk-6OXNDFJE.js";import{memo as r,useRef as a,useState as o,useMemo as s}from"react";import l from"react-markdown";import n from"remark-breaks";import m from"remark-gfm";import{jsx as d,jsxs as c}from"react/jsx-runtime";function i(){const e=this.data();(e.micromarkExtensions??=[]).push({disable:{null:["codeIndented","htmlFlow","htmlText","setextUnderline"]}})}var b={note:[m,n,i],article:[m,i]},x=({node:e,...t})=>/* @__PURE__ */d("a",{...t,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:underline break-all"}),g=({node:e,...t})=>/* @__PURE__ */d("code",{className:"rounded bg-gray-200 px-1 py-0.5 font-mono text-[0.85em] text-gray-800",...t}),h=e=>({node:t,...r})=>/* @__PURE__ */d("pre",{className:`${e} overflow-x-auto rounded-lg border border-gray-200 bg-gray-50 font-mono text-xs [&>code]:bg-transparent [&>code]:p-0 [&>code]:[font-size:inherit]`,...r}),y={th:({node:e,...t})=>/* @__PURE__ */d("th",{className:"border border-gray-200 bg-gray-50 px-2 py-1 text-left font-semibold text-gray-700",...t}),td:({node:e,...t})=>/* @__PURE__ */d("td",{className:"border border-gray-200 px-2 py-1 align-top",...t})},p={a:x,h1:({node:e,...t})=>/* @__PURE__ */d("h1",{className:"text-base font-semibold text-gray-900",...t}),h2:({node:e,...t})=>/* @__PURE__ */d("h2",{className:"text-sm font-semibold text-gray-900",...t}),h3:({node:e,...t})=>/* @__PURE__ */d("h3",{className:"text-sm font-semibold text-gray-700",...t}),h4:({node:e,...t})=>/* @__PURE__ */d("h4",{className:"text-sm font-semibold text-gray-700",...t}),h5:({node:e,...t})=>/* @__PURE__ */d("h5",{className:"text-sm font-semibold text-gray-700",...t}),h6:({node:e,...t})=>/* @__PURE__ */d("h6",{className:"text-sm font-semibold text-gray-700",...t}),ul:({node:e,...t})=>/* @__PURE__ */d("ul",{className:"list-disc pl-5",...t}),ol:({node:e,...t})=>/* @__PURE__ */d("ol",{className:"list-decimal pl-5",...t}),code:g,pre:h("p-2"),blockquote:({node:e,...t})=>/* @__PURE__ */d("blockquote",{className:"border-l-2 border-gray-300 pl-3 text-gray-600",...t}),hr:({node:e,...t})=>/* @__PURE__ */d("hr",{className:"border-gray-200",...t}),table:({node:e,...t})=>/* @__PURE__ */d("div",{className:"overflow-x-auto",children:/* @__PURE__ */d("table",{className:"text-xs border-collapse",...t})}),...y,img:({node:e,alt:t,...r})=>/* @__PURE__ */d("img",{...r,alt:t??"",loading:"lazy",className:"max-w-full max-h-64 rounded-lg border border-gray-200"})};function f(e){return e?{...p,img:({node:t,src:r,alt:a,...o})=>{const s="string"==typeof r?r:void 0;/* @__PURE__ */
|
|
3
3
|
return d("img",{...o,src:s?e(s):s,alt:a??"",loading:"lazy",className:"max-w-full max-h-64 rounded-lg border border-gray-200"})}}:p}function u({src:e,alt:r}){const[a,s]=o(!1),l=(r??"").replace(/^screenshot:\s*/i,"");return!e||a?/* @__PURE__ */c("span",{className:"my-3 flex items-start gap-2 rounded-lg border border-dashed border-gray-300 bg-gray-50 px-3 py-3 text-gray-500",children:[
|
|
4
4
|
/* @__PURE__ */d(t,{name:"camera",look:"mini",className:"mt-0.5 h-4 w-4 shrink-0","aria-hidden":"true"}),
|
|
5
5
|
/* @__PURE__ */d("span",{className:"text-xs",children:l||"Screenshot"})]}):/* @__PURE__ */d("img",{src:e,alt:r??"",loading:"lazy",onError:()=>s(!0),className:"my-3 block max-w-full rounded-lg border border-gray-200"})}function N(e){return{a:x,h1:({node:e,...t})=>/* @__PURE__ */d("h1",{className:"mt-6 mb-3 text-xl font-semibold text-gray-900 first:mt-0",...t}),h2:({node:e,...t})=>/* @__PURE__ */d("h2",{className:"mt-6 mb-3 border-b border-gray-200 pb-2 text-lg font-semibold text-gray-900 first:mt-0",...t}),h3:({node:e,...t})=>/* @__PURE__ */d("h3",{className:"mt-5 mb-2 text-base font-semibold text-gray-900 first:mt-0",...t}),h4:({node:e,...t})=>/* @__PURE__ */d("h4",{className:"mt-4 mb-2 text-sm font-semibold text-gray-900 first:mt-0",...t}),h5:({node:e,...t})=>/* @__PURE__ */d("h5",{className:"mt-4 mb-2 text-sm font-semibold text-gray-700 first:mt-0",...t}),h6:({node:e,...t})=>/* @__PURE__ */d("h6",{className:"mt-4 mb-2 text-sm font-semibold text-gray-700 first:mt-0",...t}),p:({node:e,...t})=>/* @__PURE__ */d("p",{className:"my-3 leading-relaxed",...t}),ul:({node:e,...t})=>/* @__PURE__ */d("ul",{className:"my-3 list-disc space-y-1 pl-5",...t}),ol:({node:e,...t})=>/* @__PURE__ */d("ol",{className:"my-3 list-decimal space-y-1 pl-5",...t}),li:({node:e,...t})=>/* @__PURE__ */d("li",{className:"leading-relaxed [&>p]:my-1",...t}),code:g,pre:h("my-3 p-3"),blockquote:({node:e,...t})=>/* @__PURE__ */d("blockquote",{className:"my-3 rounded-r-lg border-l-4 border-blue-400/60 bg-blue-50 px-3 py-2 text-gray-700 [&>p]:my-1",...t}),hr:({node:e,...t})=>/* @__PURE__ */d("hr",{className:"my-4 border-gray-200",...t}),table:({node:e,...t})=>/* @__PURE__ */d("div",{className:"my-3 overflow-x-auto",children:/* @__PURE__ */d("table",{className:"border-collapse text-sm",...t})}),...y,img:({node:t,src:r,alt:a})=>{const o="string"==typeof r?r:void 0;/* @__PURE__ */
|
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(
|
|
2
|
+
import{TabStrip as e}from"../chunk-M7U7E4QD.js";import{useShellLanguage as t}from"../chunk-2ECESCBH.js";import"../chunk-DTCIMQP7.js";import{confirm as n}from"../chunk-M5W23H56.js";import"../chunk-UBRW43AM.js";import"../chunk-UVBK6YSR.js";import"../chunk-7IQ3B77H.js";import"../chunk-FIEA5CGB.js";import"../chunk-K7PQXJO7.js";import{useBrowserLayoutEffect as r}from"../chunk-D65T4H6J.js";import"../chunk-6OXNDFJE.js";import{useShellStrings as i}from"../chunk-2PNYIWIN.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),I=12;var N=(e,t)=>e.filter(e=>e!==t);function M(e,t){return[...t.map(t=>e.find(e=>e.key===t)).filter(e=>Boolean(e)),...e.filter(e=>!t.includes(e.key))]}function T(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 C(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:N(e.mounted,t),dirty:N(e.dirty,t),activeKey:e.activeKey===t?null:e.activeKey,closing:e.closing===t?null:e.closing}}function A(e,t){switch(t.type){case"visit":return T(e,t.entry,t.maxTabs);case"transient":return C(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]:N(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(),I=b(),N=i().pageTabs,j=y(),x=s(l);x.current=l;const E=d(e=>{const t=x.current(e);return t?{key:t.key??e.pathname,path:w(e),title:t.title}:null},[]),{language:B}=t(),[D,L]=f(A,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=>E(O(e)),B);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:M(r,n)}}({tabs:[],activeKey:null,mounted:[],dirty:[],closing:null,clock:0,tabs:e},c.map(e=>E(O(e))).filter(e=>Boolean(e)));const n=h?E(F):null;return t=n?T(t,n,k):C(t),t}),S=s(D);S.current=D;const R=s(/* @__PURE__ */new Map),$=h?E(F):null,H=$?.key??null;r(()=>{if(!h)return;const e=E(F);e?(R.current.set(e.key,F),L({type:"visit",entry:e,maxTabs:k})):L({type:"transient"})},[F,h,k,E]),o(()=>{const e=new Set(D.tabs.map(e=>e.key));for(const t of R.current.keys())e.has(t)||R.current.delete(t)},[D.tabs]);const J=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)}(D,B),[D,B]);o(()=>{if(a)try{localStorage.setItem(a,J)}catch{}},[J,a]);const P=D.dirty.length>0;o(()=>{if(!P)return;const e=e=>{e.preventDefault(),e.returnValue=""};return window.addEventListener("beforeunload",e),()=>window.removeEventListener("beforeunload",e)},[P]);const Q=s(/* @__PURE__ */new Map),W=d((e,t)=>{let n=Q.current.get(e);return void 0===n&&(n=Q.current.size,Q.current.set(e,n)),`${j}-page-${t}-${n}`},[j]),U=d(e=>g?g(e):n({title:N.discardTitle,message:1===e.length?N.discardOne:N.discardCount?.(e.length)??`${e.length} ${N.discardMany}`,confirmLabel:N.discardConfirm,cancelLabel:N.keepEditing,variant:"warning"}),[g,N]),V=d(()=>{const e=S.current;return e.tabs.find(e=>e.pinned)?.path??"/"},[]),X=d((e,t,n)=>{const r=S.current,i=r.activeKey;if(!i||!e.includes(i))return void L({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??V()}L({type:"close",keys:e.filter(e=>e!==i),closing:i}),I(l)},[I,V]),Y=d(async(e,t={})=>{const n=S.current.tabs.find(t=>t.key===e);return!n||n.pinned?(t.to&&I(t.to),!1):!(!t.force&&S.current.dirty.includes(e)&&!await U([n]))&&(!!S.current.tabs.some(t=>t.key===e)&&(X([e],t.to),!0))},[U,X,I]),z=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)}(S.current,e,t);const r=S.current.tabs.filter(e=>n.includes(e.key)&&S.current.dirty.includes(e.key));r.length&&!await U(r)&&(n=n.filter(e=>!r.some(t=>t.key===e)));const i=new Set(S.current.tabs.map(e=>e.key));n=n.filter(e=>i.has(e)),n.length&&X(n,void 0,"all"===e?null:t)},[U,X]),G=d(e=>{const t=S.current.tabs.find(t=>t.key===e);t&&e!==S.current.activeKey&&I(t.path)},[I]),q=d((e,t)=>L({type:"title",key:e,title:t}),[]),Z=d((e,t)=>L({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=>E(e)?.key??null,[E]),re=d(e=>R.current.get(e),[]),ie=u(()=>h?D.tabs.filter(e=>e.key!==D.closing):[],[h,D.tabs,D.closing]),le=u(()=>({enabled:h,state:D,currentKey:H,resolve:l,keyFor:ne,locationFor:re,idFor:W,activate:G,close:Y,closeMany:z,setTitle:q,setDirty:Z,copies:_,setCopy:te,visibleTabs:ie}),[h,D,H,l,ne,re,W,G,Y,z,q,Z,_,te,ie]);/* @__PURE__ */
|
|
3
|
+
return v(K.Provider,{value:le,children:e})}var E=l.Activity,B=Boolean(E);function D({active:e,children:t}){return E?/* @__PURE__ */v(E,{mode:e?"visible":"hidden",children:t}):/* @__PURE__ */v(h,{children:t})}var L=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(D,{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)),S="\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)},S);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(L,{tabKey:n,active:i,location:s,render:e,className:t,panelId:a(n,"panel"),tabId:a(n,"tab")},n):null}),!l&&/* @__PURE__ */v(L,{tabKey:S,active:!0,location:r,render:e,className:t},S)]})}function $({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 H={enabled:!1,tabs:[],activeKey:null,activate:()=>{},close:async()=>!1,closeOthers:async()=>{},closeRight:async()=>{},closeAll:async()=>{}};function J(){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)}:H}function P(){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 Q(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 U(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{I as DEFAULT_MAX_TABS,B as PAGE_TABS_PAUSE_HIDDEN,$ as PageTabBar,R as PageTabsOutlet,x as PageTabsProvider,O as parseTabPath,P as usePageTab,W as usePageTabCopy,U as usePageTabDirty,Q as usePageTabTitle,J 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-3WDGKHRE.js"));export{e as PdfViewer};
|
package/dist/telemetry/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{startClientTelemetry}from"../chunk-
|
|
1
|
+
export{startClientTelemetry}from"../chunk-LU2SMEID.js";import"../chunk-DCE2WL7J.js";import"../chunk-KNUR2UEG.js";
|
package/dist/ui/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{APP_UPDATE_POLL_MS,Accordion,AlignmentGrid,AppUpdateBanner,AttachButton,AttachmentDropZone,AttachmentList,AuthScreen,Avatar,AvatarGroup,BORDER_WIDTHS,Banner,BoxPlotChart,BrandAssetEditor,BudgetBar,CHART_INK,COLUMN_COUNT_MAX,COLUMN_COUNT_WIDTHS,COLUMN_SHARES_EQUAL,COLUMN_SHARE_MIN,CONTROL_HEIGHTS,CORNERS,CORNERS_FOR_THEME,Calendar,CandlestickChart,Card,CartesianPlot,ChartBrush,ChartDefs,ChartDot,ChartFrame,ChartHighlightProvider,ChartSkeleton,ChartTooltip,ChatTemplate,Checkbox_default as Checkbox,CheckoutTemplate,ChordChart,ColorPicker,ColorPickerPanel,ColorSwatch,ColoredBadge,ColumnChart,ComposerAttachments,ContainerFillChart,ContextMenu,CornersInput,CountBadge,DAY_MS,DashboardTemplate,DataTable,DataTablePage,DatePicker_default as DatePicker,DateRangePicker,DateTimePicker_default as DateTimePicker,DescriptionList,DisplayChips,Divider,Drawer,DropdownMenu,ELEVATION_LEVELS,EmailTemplate,EmptyState,EmptyValue,ErrorBoundary,ErrorPage,FONT_WEIGHTS,FilePicker_default as FilePicker,FloatingBar,FormErrorSummary,FormField,FormLayoutPage,FunnelChart,GROUP_COLORS,GROUP_COLORS_SOLID,GalleryTemplate,Grid,HeatmapChart,HelpCenter,HexInput,HistogramChart,IconRail,IconRailButton,ImageFocusPoint,Inline,Input_default as Input,InputNumber_default as InputNumber,Kanban,Label,LanguagePanel,LanguageSelect,LinkPicker,ListFooter,ListLoadError,ListRow,MAX_FRACTION_DIGITS,MOTION,MOTION_DURATIONS,Markdown,Markdown as MarkdownLite,MediaUploadField,MediaUploadGrid,Meter,MetricBar,MilestoneTimeline,NativeSelect,NumericKeypad,POST_PRODUCTION_STATUSES,PageHeader,Pagination,PaperclipGlyph,Paragraph,PieChart,Popover,PortalBrandingProvider,ProductionTimeline,RADAR_SERIES_CAP,RADIUS_ROLES,ROW_HEIGHTS,RadarChart,RadialBarChart,Radio_default as Radio,RadioGroup,RangeChart,RankedBars,SCATTER_SERIES_CAP,SERIES_SLOT_COUNT,SERIES_VARS,SPACING_ROLES,SPACING_SCALE,STAGES,STATUS_VARS,SankeyChart,ScatterChart,SearchableSelect,Segmented,Select_default as Select,SettingRow,SidebarActionButton,SidebarGroupLabel,SidebarNavGroup,SidebarNavItem,Skeleton,Slider,SliderGroup,Snippet,SortableList,Sparkline,Stack,StatCard,StatTile,Statistic,StatusBadge,StatusBadgeProvider,Stepper,SunburstChart,Switch_default as Switch,TYPE_SCALE,Tabs,TagInput,Text,TextLinkField,TextToolbar,Textarea_default as Textarea,TileButton_default as TileButton,TimeAgo,TimePicker_default as TimePicker,TimeSeriesChart,TimelineTrack,Title,TopNav,TransferProgress,Tree,TreeEmptySlot,TreeGroup,TreeGroupLabel,TreeRow,TreeSeam,TreemapChart,WaterfallChart,WidthsBar,angleScale,appendKey,applyCorners,applyIconSet,applyThemePrefs,arcPath,areaBetween,areaFrom,assignSeriesSlots,autoHighlightIndex,backspace,bandScale,binValues,budgetState,bumpPath,calcOverall,calcReportOverall,colorFill,colorSwatchClasses,columnSharesWidths,cornersFor,curvePath,dashFor,fillFor,fillId,fmtSliderDate,fromKey as fromDateKey,glowId,groundId,groupColors,hexToHsv,highlightOpacity,hsvToHex,isSeverityTone,isSpacingStep,labelClasses,ladderScale,languageSelectWidth,linearPath,linearScale,logScale,maskId,mediaFileName,monotonePath,niceAxis,niceMax,parseHexColor,polygonPoints,radiusScale,resolveColumnShares,resolveColumnWidths,resolveCorners,resolvePortalBrandAsset,resolveSeriesColor,resolveSeriesColorWithin,resolveTheme,seriesColor,severityOf,splinePath,squarify,stagger,stepPath,tabButtonId,tabPanelId,textToolbarRows,textToolbarWindowColumns,toKey as toDateKey,toDayMs,toISODate,toggleSeriesSlot,useAppUpdate,useClickOutside,useContextMenu,useDebouncedValue,useHighlight,usePlotWidth,usePortalBranding,useProductionTimeline,useStatusLabel,useTheme,useTransferProgress}from"../chunk-
|
|
2
|
+
export{APP_UPDATE_POLL_MS,Accordion,AlignmentGrid,AppUpdateBanner,AttachButton,AttachmentDropZone,AttachmentList,AuthScreen,Avatar,AvatarGroup,BORDER_WIDTHS,Banner,BoxPlotChart,BrandAssetEditor,BudgetBar,CHART_INK,COLUMN_COUNT_MAX,COLUMN_COUNT_WIDTHS,COLUMN_SHARES_EQUAL,COLUMN_SHARE_MIN,CONTROL_HEIGHTS,CORNERS,CORNERS_FOR_THEME,Calendar,CandlestickChart,Card,CartesianPlot,ChartBrush,ChartDefs,ChartDot,ChartFrame,ChartHighlightProvider,ChartSkeleton,ChartTooltip,ChatTemplate,Checkbox_default as Checkbox,CheckoutTemplate,ChordChart,ColorPicker,ColorPickerPanel,ColorSwatch,ColoredBadge,ColumnChart,ComposerAttachments,ContainerFillChart,ContextMenu,CornersInput,CountBadge,DAY_MS,DashboardTemplate,DataTable,DataTablePage,DatePicker_default as DatePicker,DateRangePicker,DateTimePicker_default as DateTimePicker,DescriptionList,DisplayChips,Divider,Drawer,DropdownMenu,ELEVATION_LEVELS,EmailTemplate,EmptyState,EmptyValue,ErrorBoundary,ErrorPage,FONT_WEIGHTS,FilePicker_default as FilePicker,FloatingBar,FormErrorSummary,FormField,FormLayoutPage,FunnelChart,GROUP_COLORS,GROUP_COLORS_SOLID,GalleryTemplate,Grid,HeatmapChart,HelpCenter,HexInput,HistogramChart,IconRail,IconRailButton,ImageFocusPoint,Inline,Input_default as Input,InputNumber_default as InputNumber,Kanban,Label,LanguagePanel,LanguageSelect,LinkPicker,ListFooter,ListLoadError,ListRow,MAX_FRACTION_DIGITS,MOTION,MOTION_DURATIONS,Markdown,Markdown as MarkdownLite,MediaUploadField,MediaUploadGrid,Meter,MetricBar,MilestoneTimeline,NativeSelect,NumericKeypad,POST_PRODUCTION_STATUSES,PageHeader,Pagination,PaperclipGlyph,Paragraph,PieChart,Popover,PortalBrandingProvider,ProductionTimeline,RADAR_SERIES_CAP,RADIUS_ROLES,ROW_HEIGHTS,RadarChart,RadialBarChart,Radio_default as Radio,RadioGroup,RangeChart,RankedBars,SCATTER_SERIES_CAP,SERIES_SLOT_COUNT,SERIES_VARS,SPACING_ROLES,SPACING_SCALE,STAGES,STATUS_VARS,SankeyChart,ScatterChart,SearchableSelect,Segmented,Select_default as Select,SettingRow,SidebarActionButton,SidebarGroupLabel,SidebarNavGroup,SidebarNavItem,Skeleton,Slider,SliderGroup,Snippet,SortableList,Sparkline,Stack,StatCard,StatTile,Statistic,StatusBadge,StatusBadgeProvider,Stepper,SunburstChart,Switch_default as Switch,TYPE_SCALE,Tabs,TagInput,Text,TextLinkField,TextToolbar,Textarea_default as Textarea,TileButton_default as TileButton,TimeAgo,TimePicker_default as TimePicker,TimeSeriesChart,TimelineTrack,Title,TopNav,TransferProgress,Tree,TreeEmptySlot,TreeGroup,TreeGroupLabel,TreeRow,TreeSeam,TreemapChart,WaterfallChart,WidthsBar,angleScale,appendKey,applyCorners,applyIconSet,applyThemePrefs,arcPath,areaBetween,areaFrom,assignSeriesSlots,autoHighlightIndex,backspace,bandScale,binValues,budgetState,bumpPath,calcOverall,calcReportOverall,colorFill,colorSwatchClasses,columnSharesWidths,cornersFor,curvePath,dashFor,fillFor,fillId,fmtSliderDate,fromKey as fromDateKey,glowId,groundId,groupColors,hexToHsv,highlightOpacity,hsvToHex,isSeverityTone,isSpacingStep,labelClasses,ladderScale,languageSelectWidth,linearPath,linearScale,logScale,maskId,mediaFileName,monotonePath,niceAxis,niceMax,parseHexColor,polygonPoints,radiusScale,resolveColumnShares,resolveColumnWidths,resolveCorners,resolvePortalBrandAsset,resolveSeriesColor,resolveSeriesColorWithin,resolveTheme,seriesColor,severityOf,splinePath,squarify,stagger,stepPath,tabButtonId,tabPanelId,textToolbarRows,textToolbarWindowColumns,toKey as toDateKey,toDayMs,toISODate,toggleSeriesSlot,useAppUpdate,useClickOutside,useContextMenu,useDebouncedValue,useHighlight,usePlotWidth,usePortalBranding,useProductionTimeline,useStatusLabel,useTheme,useTransferProgress}from"../chunk-J5O7NMNC.js";export{Breadcrumbs}from"../chunk-TYZR3BEG.js";export{EditableGrid}from"../chunk-Z756FAL6.js";import"../chunk-BR22X7E5.js";import"../chunk-RYBDLJJV.js";export{INPUT_BASE,INPUT_SIZES,PLACEHOLDER_INK,inputClasses}from"../chunk-HJQAE6SP.js";export{ResizeHandle,SidebarLayout}from"../chunk-BDXFODVC.js";export{ENGLISH,SHELL_LANGUAGE_STORAGE_KEY,ShellLanguageProvider,matchShellLanguage,readSavedShellLanguage,resolveShellLanguage,saveShellLanguage,useShellLanguage}from"../chunk-2ECESCBH.js";export{BrandMark,GlobalSearch,IconButton_default as IconButton,openGlobalSearch,pushRecent as pushRecentSearch,resolveBrandMarkTreatment,sanitizeRecent as sanitizeRecentSearches}from"../chunk-QJYJB6OG.js";export{ICON_NAMES,ICON_SET_FOR_THEME,THEME_ICON_SETS,iconSetFor,isIconName,loadIconSet}from"../chunk-3N7UFUJP.js";export{isSafeLinkHref}from"../chunk-PJPK2ADX.js";export{UNDOABLE_MS,toast_default as toast}from"../chunk-5LJVYLU6.js";export{VERSION}from"../chunk-DCE2WL7J.js";export{ALT,ALT_SHIFT_D,ALT_SHIFT_E,ALT_SHIFT_N,CMD_A,CMD_DOT,CMD_ENTER,CMD_K,CMD_S,ENTER,Kbd,MOD,NEXT_CHUNK_PATH_PREFIX,Result,SHIFT,STALE_CHUNK_RELOAD_COOLDOWN_MS,STALE_CHUNK_RELOAD_KEY,ShellPrefsProvider,VITE_PRELOAD_ERROR_EVENT,installStaleChunkReload,isMac,isStaleChunkError,useIsMobile,useLocalStoragePrefs,useShellPrefs}from"../chunk-UFXQAFZN.js";import"../chunk-KNUR2UEG.js";export{ConfirmProvider,Dialog,confirm,confirmDestructive,prompt,useConfirm,useFocusTrap,useScrollLock}from"../chunk-M5W23H56.js";import"../chunk-5A7MWTXX.js";export{PopupMenu,PopupMenuDivider,PopupMenuItem,PopupMenuLabel,PopupSubmenu,leavesContextMenuAlone}from"../chunk-UBRW43AM.js";import"../chunk-UVBK6YSR.js";export{Button_default as Button}from"../chunk-LU2DSEAL.js";export{MENU_MAX_HEIGHT,POPUP_MAX_WIDTH,Tooltip,popupBounds,useDropdownPosition}from"../chunk-WOZ36LPR.js";export{GLASS_DIVIDER,glassStyle,solidSurfaceStyle}from"../chunk-7IQ3B77H.js";export{OVERLAY_OPEN_EVENT,Z_LAYERS,dismissPopups,registerModalEscapeInterceptor}from"../chunk-FIEA5CGB.js";export{buttonClasses,iconButtonClasses}from"../chunk-K7PQXJO7.js";import"../chunk-D65T4H6J.js";export{Icon,activeIconSet,iconSets,iconsVersion,registerIconSet,registerIcons,resolveIcon,setDefaultIconSet,setIconSet,subscribeIcons}from"../chunk-6OXNDFJE.js";export{FileIntakeAlert,acceptsFile,useFileIntake}from"../chunk-DFCTQOIL.js";export{DEFAULT_SHELL_STRINGS,ShellStringsProvider,useShellLocale,useShellStrings}from"../chunk-2PNYIWIN.js";import"../chunk-C3QOHMR6.js";export{FOCAL_DEFAULT,FOCAL_NUDGE_COARSE,FOCAL_NUDGE_STEP,focalFromRect,formatFocal,nudgeFocal,parseFocal}from"../chunk-AP2QEJXQ.js";export{DATE_FORMAT_OPTIONS,EMPTY_VALUE,TZ_AUTO,currencyDecimals,currencySymbol,firstDayOfWeek,formatBytes,formatDate,formatDateTime,formatMoney,formatTime,getUserDateFormat,getUserTimezone,setCurrencyFormats,setUserDateFormat,setUserTimezone,syncTimezoneFromProfile,timeAgo}from"../chunk-W32SKK3D.js";export{LoadingSpinner,SpinnerRing}from"../chunk-2J6F4EE7.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "efficient-shell",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.35.0",
|
|
4
4
|
"description": "Desktop-style React UI shell — windows, taskbar, start menu, sticky notes, frosted glass theming, and bundled apps.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": "Efficient Pty Ltd",
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import{loadAppearance as e,WidgetSettingsModal as t}from"./chunk-WR6YWZHJ.js";import{useWidgetSettings as n}from"./chunk-TO3SXKDA.js";import"./chunk-E5DFGCAL.js";import"./chunk-5MKWCHMD.js";import"./chunk-KNUR2UEG.js";import"./chunk-LTH3NJTS.js";import"./chunk-DSSLOQDW.js";import"./chunk-5A7MWTXX.js";import"./chunk-AEJQC7GF.js";import"./chunk-UVBK6YSR.js";import"./chunk-LU2DSEAL.js";import"./chunk-WOZ36LPR.js";import"./chunk-7IQ3B77H.js";import"./chunk-FIEA5CGB.js";import"./chunk-K7PQXJO7.js";import"./chunk-D65T4H6J.js";import{Icon as r}from"./chunk-KMSAHFLP.js";import"./chunk-2PNYIWIN.js";import"./chunk-C3QOHMR6.js";import"./chunk-2J6F4EE7.js";import{useState as l,useRef as c,useCallback as i,useEffect as a}from"react";import{jsxs as o,Fragment as s,jsx as u}from"react/jsx-runtime";var h="calc_appearance";function d(){const[d,m]=l("0"),[k,b]=l(null),[p,g]=l(null),[N,y]=l(!1),[x,f]=l(""),[v,C]=l([]),[$,j]=l(!1),[E,S]=l(()=>e(h)),[w,W]=l(!1),[A,T]=l(E),F=c(null);n(i(()=>{T({...E}),W(!0)},[E]));const L=i(e=>{f(""),m(t=>N||"0"===t?(y(!1),"."===e?"0.":e):"."===e&&t.includes(".")?t:t+e)},[N]),D=i(()=>{m("0"),b(null),g(null),y(!1)},[]),H=i((e,t,n)=>{switch(n){case"+":return e+t;case"-":return e-t;case"×":return e*t;case"÷":return 0===t?0:e/t;default:return t}},[]),J=i(e=>{const t=parseFloat(d);if(null!==k&&p&&!N){const e=H(k,t,p);m(String(e)),b(e),C(n=>[`${k} ${p} ${t} = ${e}`,...n].slice(0,20))}else b(t);g(e),y(!0)},[d,k,p,N,H]),O=i(()=>{if(null===k||!p)return;const e=parseFloat(d),t=H(k,e,p),n=`${k} ${p} ${e} =`;C(e=>[`${n} ${t}`,...e].slice(0,20)),f(n),m(String(t)),b(null),g(null),y(!0)},[d,k,p,H]),B=i(()=>{m(e=>String(parseFloat(e)/100))},[]),I=i(()=>{m(e=>e.startsWith("-")?e.slice(1):"0"===e?e:"-"+e)},[]);a(()=>{const e=e=>{const t=e.target.tagName;"INPUT"!==t&&"TEXTAREA"!==t&&"SELECT"!==t&&(e.key>="0"&&e.key<="9"?L(e.key):"."===e.key?L("."):"+"===e.key?J("+"):"-"===e.key?J("-"):"*"===e.key?J("×"):"/"===e.key?(e.preventDefault(),J("÷")):"Enter"===e.key||"="===e.key?("Enter"===e.key&&e.target instanceof Node&&F.current?.contains(e.target)&&e.preventDefault(),O()):"Escape"===e.key?D():"Backspace"===e.key?m(e=>e.length>1?e.slice(0,-1):"0"):"%"===e.key&&B())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[L,J,O,D,B]);const K="flex items-center justify-center rounded-lg text-sm font-medium transition-colors",M=`${K} bg-white border border-gray-200 text-gray-900 hover:bg-gray-50 active:bg-gray-100`,R=`${K} bg-blue-50 border border-blue-200 text-blue-700 hover:bg-blue-100 active:bg-blue-200`,P=`${K} bg-gray-100 border border-gray-200 text-gray-600 hover:bg-gray-200 active:bg-gray-300`,Q=`${K} bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800`;/* @__PURE__ */
|
|
2
|
-
return o(s,{children:[
|
|
3
|
-
/* @__PURE__ */o("div",{ref:F,className:"flex flex-col h-full",style:{opacity:E.activeOpacity/100,backdropFilter:E.activeBlur>0?`blur(${E.activeBlur}px)`:void 0},children:[
|
|
4
|
-
/* @__PURE__ */o("div",{className:"bg-slate-200 rounded-t-lg px-4 py-2 group/display relative flex flex-col justify-end min-h-[120px] border-b border-slate-300",children:[
|
|
5
|
-
/* @__PURE__ */u("div",{className:"flex flex-col justify-end flex-1 overflow-hidden",children:v.slice(0,3).reverse().map((e,t)=>/* @__PURE__ */u("div",{className:"text-2xs text-slate-400 text-right font-mono truncate",children:e},t))}),(x||p&&null!==k)&&/* @__PURE__ */u("div",{className:"text-base text-slate-600 text-right font-mono",children:x||`${k} ${p} ${N?"":d}`}),
|
|
6
|
-
/* @__PURE__ */o("div",{className:"flex items-center gap-2",children:[
|
|
7
|
-
/* @__PURE__ */u("button",{onClick:()=>{navigator.clipboard.writeText(d),j(!0),setTimeout(()=>j(!1),1200)},title:"Copy result",className:"shrink-0 text-slate-300 hover:text-slate-500 transition-colors opacity-0 group-hover/display:opacity-100",children:/* @__PURE__ */u(r,$?{name:"check",className:"h-5 w-5 text-green-500",strokeWidth:2}:{name:"copy",className:"h-5 w-5",strokeWidth:2})}),
|
|
8
|
-
/* @__PURE__ */u("div",{className:"text-right text-4xl font-mono font-bold text-slate-800 truncate flex-1",children:(e=>{const t=parseFloat(e);return isNaN(t)||e.endsWith(".")||e.endsWith(".0")||Math.abs(t)<1e15&&e.length<16?e:t.toExponential(6)})(d)})]})]}),
|
|
9
|
-
/* @__PURE__ */o("div",{className:"grid grid-cols-4 grid-rows-5 gap-2 flex-1 min-h-0 p-2",children:[
|
|
10
|
-
/* @__PURE__ */u("button",{onClick:D,className:P,children:"AC"}),
|
|
11
|
-
/* @__PURE__ */u("button",{onClick:I,className:P,children:"+/−"}),
|
|
12
|
-
/* @__PURE__ */u("button",{onClick:B,className:P,children:"%"}),
|
|
13
|
-
/* @__PURE__ */u("button",{onClick:()=>J("÷"),className:`${R} ${"÷"===p?"ring-2 ring-blue-400":""}`,children:"÷"}),
|
|
14
|
-
/* @__PURE__ */u("button",{onClick:()=>L("7"),className:M,children:"7"}),
|
|
15
|
-
/* @__PURE__ */u("button",{onClick:()=>L("8"),className:M,children:"8"}),
|
|
16
|
-
/* @__PURE__ */u("button",{onClick:()=>L("9"),className:M,children:"9"}),
|
|
17
|
-
/* @__PURE__ */u("button",{onClick:()=>J("×"),className:`${R} ${"×"===p?"ring-2 ring-blue-400":""}`,children:"×"}),
|
|
18
|
-
/* @__PURE__ */u("button",{onClick:()=>L("4"),className:M,children:"4"}),
|
|
19
|
-
/* @__PURE__ */u("button",{onClick:()=>L("5"),className:M,children:"5"}),
|
|
20
|
-
/* @__PURE__ */u("button",{onClick:()=>L("6"),className:M,children:"6"}),
|
|
21
|
-
/* @__PURE__ */u("button",{onClick:()=>J("-"),className:`${R} ${"-"===p?"ring-2 ring-blue-400":""}`,children:"−"}),
|
|
22
|
-
/* @__PURE__ */u("button",{onClick:()=>L("1"),className:M,children:"1"}),
|
|
23
|
-
/* @__PURE__ */u("button",{onClick:()=>L("2"),className:M,children:"2"}),
|
|
24
|
-
/* @__PURE__ */u("button",{onClick:()=>L("3"),className:M,children:"3"}),
|
|
25
|
-
/* @__PURE__ */u("button",{onClick:()=>J("+"),className:`${R} ${"+"===p?"ring-2 ring-blue-400":""}`,children:"+"}),
|
|
26
|
-
/* @__PURE__ */u("button",{onClick:()=>L("0"),className:`${M} col-span-2`,children:"0"}),
|
|
27
|
-
/* @__PURE__ */u("button",{onClick:()=>L("."),className:M,children:"."}),
|
|
28
|
-
/* @__PURE__ */u("button",{onClick:O,className:Q,children:"="})]})]}),
|
|
29
|
-
/* @__PURE__ */u(t,{open:w,onClose:()=>W(!1),title:"Calculator Settings",appearance:A,onAppearanceChange:T,onSave:()=>{S(A),localStorage.setItem(h,JSON.stringify(A)),W(!1)}})]})}export{d as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{ConfirmProvider,confirm,confirmDestructive,prompt,useConfirm}from"./chunk-LTH3NJTS.js";import"./chunk-UVBK6YSR.js";import"./chunk-FIEA5CGB.js";import"./chunk-K7PQXJO7.js";import"./chunk-KMSAHFLP.js";import"./chunk-2PNYIWIN.js";import"./chunk-C3QOHMR6.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{PdfViewer as default,fitScale,pdfWasmParams}from"./chunk-CQYSEMCR.js";import"./chunk-5LJVYLU6.js";import"./chunk-K7PQXJO7.js";import"./chunk-KMSAHFLP.js";import"./chunk-2PNYIWIN.js";import"./chunk-C3QOHMR6.js";import"./chunk-2J6F4EE7.js";
|
package/dist/chunk-KIFCFIIN.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{hasIconSet as e,registerIconSet as r}from"./chunk-KMSAHFLP.js";var o=["academic-cap","accent","account","account-circle","add","add-circle","add-person","adjust","align-center","align-justify","align-left","align-right","align-separate","anchor","animation","apps","archive-box","arrow","arrow-down","arrow-left","arrow-left-end-on-rectangle","arrow-long-right","arrow-right","arrow-trending-down","arrow-trending-up","arrow-up","arrow-up-right","at-symbol","attach","background","bag","bank","bars-3-bottom-left","battery","beaker","bell","bell-alert","bell-plus","billing","black-and-white","block-badge","block-banner","block-box","block-button","block-column","block-coupon","block-divider","block-footer","block-heading","block-image","block-included-list","block-layered-images","block-product","block-product-title","block-section","block-social","block-spacer","block-text","block-video","blog-post","bold","bolt","book-open","bookmark","bookmark-square","braces","breadcrumb","briefcase","bug","bug-ant","building-library","building-office-2","button","button-arrow","calculator","calendar","calendar-check","camera","caption","car","card-payment","caret","cart","case","case-lower","case-normal","case-upper","category","chart","chart-bar","chart-bar-square","chart-line","chat","chat-bubble-left-right","chat-bubble-oval-left-ellipsis","check","check-circle","checkbox","chevron","chevron-double","chevron-double-left","chevron-double-right","chevron-down","chevron-left","chevron-right","chevron-up","chevron-up-down","circle-stack","clear-marks","clipboard","clipboard-check","clipboard-document-list","clipboard-list","clock","close","close-circle","cloud","cloud-download","code","code-bracket","collapse","collapse-all","column-gap","column-widths","columns","company","compose","contrast","cookie","copied","copy","copy-style","copy-to-page","corner","crop","cube-transparent","cursor","cursor-arrow-rays","cursor-click","dashboard","date","desktop","diagram","direction","direction-down","direction-left","direction-right","direction-up","document","document-check","document-magnifying-glass","dollar","dot","download","drag","drop","duplicate","edit","email","emphasis","eraser","error","expand","external","eye","eye-off","face-smile","filter","finish","fire","flag","folder","folder-open","folder-plus","forward","full-width","gap","gem","gift","globe","grid","ground","hand","hand-thumb-up","hash","headquarters","heart","height","help","help-off","hexagon","home","hover","identification","image","image-off","images","inbox","info","italic","key","layers","layout","letter-spacing","lightbulb","line-between","line-style","link","link-slash","list","location","lock","logo","logout","map","media","megaphone","menu","meta","microphone","money","moon","more","more-vertical","move-down","move-up","newspaper","no-symbol","note","nudge","numbered-list","opacity","own-text","package","package-open","padding-bottom","padding-left","padding-right","padding-top","padding-x","padding-y","page","paint-brush","panel-left","panel-right","paragraph-spacing","parcel","paste","paste-style","pause","pen","people","percent","phone","phone-hidden","placement","play","plus-minus","power","presentation-chart-bar","print","product","product-field","product-size","progress","quiet","radio-dot","radius","receipt","receipt-percent","receipt-refund","rectangle-group","redo","refresh","remove","remove-circle","rename","reply","reply-all","revert","robot","rotate","scale","scroll-point","scroll-text","search","select-all","send","server","settings","shadow","shape-ellipse","shape-rect","share","shield-check","shield-exclamation","signal","signal-slash","sitemap","slide-arrows-bare","slide-arrows-round","slide-arrows-square","slide-picker-bar","slide-picker-cards","slide-picker-dots","slide-picker-numbers","sort","sparkles","speaker","speaker-wave","spec-table","spinner","split","square","star","state","status-circle","status-dot","sticky","stop-circle","store","strike","styles","subscript","success-burst","sun","superscript","swap","swatch","table","tablet","tabs","tag","target","team","telephone","template","text-color","text-lines","text-size","text-small","text-value","texture","theme","ticket","title","trash","trigger","truck","tv","type","tyre","underline","undo","upload","v-align","verified","video-off","view-columns","wallet","warning","weight","wheel","widgets","width","window","windows","words-from","wrap","wrench","wrench-screwdriver","zoom-in"],a=new Set(o),t=e=>"string"==typeof e&&a.has(e),l=[{name:"phosphor",label:"Phosphor"},{name:"iconoir",label:"Iconoir"},{name:"lucide",label:"Lucide"},{name:"tabler",label:"Tabler"}],c={pink:"phosphor",green:"iconoir",grey:"lucide",blue:"tabler"},i={phosphor:()=>import("./icons/phosphor.js").then(e=>e.phosphor),iconoir:()=>import("./icons/iconoir.js").then(e=>e.iconoir),lucide:()=>import("./icons/lucide.js").then(e=>e.lucide),tabler:()=>import("./icons/tabler.js").then(e=>e.tabler)},n=/* @__PURE__ */new Map;function s(o){const a=i[o];if(!a||e(o))return Promise.resolve();let t=n.get(o);return t||(t=a(),n.set(o,t),t.catch(()=>{n.delete(o)})),t.then(a=>{e(o)||r(a,{asDefault:!1})},()=>{})}function p(e,r,o){return o?"string"==typeof r&&r?r:null:c[e]??null}export{o as ICON_NAMES,c as ICON_SET_FOR_THEME,l as THEME_ICON_SETS,p as iconSetFor,t as isIconName,s as loadIconSet};
|
package/dist/chunk-T4X7UE7V.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var r="7.34.0",a=r;export{a as APP_VERSION,r as VERSION};
|