efficient-shell 7.40.0 → 7.43.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/dist/{Browser-WFF3V5XN.js → Browser-XNIEIZS2.js} +13 -13
- package/dist/Calculator-Q3TNKTCG.js +29 -0
- package/dist/ConfirmDialog-QT4KJAP7.js +1 -0
- package/dist/{CurrencyConverter-5LXIRNZG.js → CurrencyConverter-QIH4GI3K.js} +12 -12
- package/dist/{Documents-73VBBEBF.js → Documents-7AYPEXL2.js} +4 -4
- package/dist/{Files-FFNF3QZ7.js → Files-GKEGMDUL.js} +43 -43
- package/dist/{Notepad-XIG4KJA5.js → Notepad-W4FJYXO4.js} +10 -10
- package/dist/PdfViewer-LGD633HY.js +1 -0
- package/dist/PomodoroTimer-LMLEPMFD.js +91 -0
- package/dist/{Preview-C2ZC2SM3.js → Preview-DI7VDRQR.js} +24 -24
- package/dist/Sidebar-HT7BIMTD.js +44 -0
- package/dist/{Spreadsheet-FZV4FL6H.js → Spreadsheet-NTLSJ37V.js} +13 -13
- package/dist/{Stock-PWDOGWFR.js → Stock-VUGVYNNI.js} +7 -7
- package/dist/{Weather-WRNKDPM2.js → Weather-TAJQCYIV.js} +18 -18
- package/dist/{WorldClock-L43LQEXI.js → WorldClock-ZQ2VI2NB.js} +6 -6
- package/dist/apps/index.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/{chunk-KNGFJOQD.js → chunk-22EP5XS2.js} +1 -1
- package/dist/{chunk-4755JEGD.js → chunk-3G5TA3IF.js} +34 -7
- package/dist/{chunk-3K5JZXDC.js → chunk-6K5EFHDQ.js} +8 -8
- package/dist/{chunk-UQVSH226.js → chunk-7RI5F5VX.js} +1 -1
- package/dist/chunk-7TD4XKYF.js +1 -0
- package/dist/{chunk-TRNQNGYE.js → chunk-BY3KWWWU.js} +14 -14
- package/dist/{chunk-UONWRDS7.js → chunk-COUELSZF.js} +4 -4
- package/dist/{chunk-KEZYLOFK.js → chunk-DENNF2LM.js} +2 -2
- package/dist/chunk-FWEGDHFT.js +1 -0
- package/dist/{chunk-Y6V2JPN3.js → chunk-JK4PTQFV.js} +1 -1
- package/dist/{chunk-F7OP5E6L.js → chunk-NT4SZH5L.js} +1 -1
- package/dist/{chunk-E4FJNJ2I.js → chunk-OMOQC57R.js} +97 -97
- package/dist/{chunk-IL4TXZ2Z.js → chunk-PMDHTWBR.js} +471 -465
- package/dist/{chunk-OTFHGJSO.js → chunk-QDCMVFK5.js} +5 -5
- package/dist/{chunk-XKANXONN.js → chunk-TFYZB4NY.js} +2 -2
- package/dist/{chunk-VHHZHNJC.js → chunk-UNA3BQJI.js} +7 -7
- package/dist/{chunk-F5BQTXGY.js → chunk-YD4DPX4H.js} +1 -1
- package/dist/{chunk-CXF2BVXH.js → chunk-YRLOXHKG.js} +1 -1
- package/dist/{chunk-E3JFDVQ5.js → chunk-ZN6W2KOC.js} +11 -11
- package/dist/icons/efficient-looks.js +102 -86
- package/dist/icons/efficient.d.ts +23 -7
- package/dist/icons/efficient.js +325 -303
- package/dist/icons/index.d.ts +1 -1
- package/dist/icons/index.js +1 -1
- package/dist/{index-CFyMUpku.d.ts → index-p7sSFfAC.d.ts} +287 -188
- package/dist/index.d.ts +2 -2
- package/dist/index.js +682 -682
- package/dist/map/index.js +2 -2
- 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.d.ts +1 -1
- package/dist/ui/index.js +1 -1
- package/package.json +1 -1
- package/dist/Calculator-L6726KWL.js +0 -29
- package/dist/ConfirmDialog-V7JRHNK7.js +0 -1
- package/dist/PdfViewer-BS5UDROT.js +0 -1
- package/dist/PomodoroTimer-LHHDM6ML.js +0 -91
- package/dist/Sidebar-XMH2FKCU.js +0 -44
- package/dist/chunk-ENMILDMH.js +0 -1
- package/dist/chunk-IZWMK4LP.js +0 -1
package/dist/map/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{Button_default as e}from"../chunk-G5GERM76.js";import"../chunk-3E27HV76.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-4755JEGD.js";import{useShellStrings as o}from"../chunk-LVCRH3K6.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 R(e){const t=Math.max(j,12+8*e.length);return t+t%2}var O=(e,t,n,r)=>({left:e-n/2,top:t-r/2,right:e+n/2,bottom:t+r/2});function 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=>O(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 K(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=R(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=O(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 W(e,t,n){let r=-1/0;for(const o of t){const t=Math.max(Math.abs(o.x-e.x),Math.abs(o.y-e.y));r=Math.max(r,0===t?1/0:n+Math.log2(29/t))}return r}function q(e){const t=new MutationObserver(e);return t.observe(document.documentElement,{attributes:!0,attributeFilter:n}),()=>t.disconnect()}var _=t;var H="routes",P=["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 G={light:"https://tiles.openfreemap.org/styles/positron",dark:"https://tiles.openfreemap.org/styles/dark"},Z={center:[30,20],zoom:1},J="ring-2 ring-gray-900 ring-offset-2";var V="var(--color-gray-600, #4b5563)",Q="http://www.w3.org/2000/svg",U=()=>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(Q,"svg");t.setAttribute("viewBox","0 0 24 24"),t.setAttribute("fill","none"),t.setAttribute("stroke","currentColor"),t.setAttribute("stroke-width","2"),t.setAttribute("aria-hidden","true");for(const n of e){const e=document.createElementNS(Q,"path");e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-linejoin","round"),e.setAttribute("d",n),t.appendChild(e)}return t}function 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:R,card:O,cardMinMapWidth:B=480,fullScreen:T,initialView:F=Z,cooperativeGestures:Q=!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,_,()=>!1)?"dark":"light",Ne=l({onSelect:a,onPick:R,picking:A,pins:t,selectedKey:n,highlightKey:E,groupCrowded:C,strings:X,noun:L});s(()=>{Ne.current={onSelect:a,onPick:R,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:U()?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)=>W(e,i.filter((e,n)=>n!==t),o))),{clientWidth:c,clientHeight:u}=n.getContainer(),d=n.cameraForBounds(l,{padding:Math.min(64,c/4,u/4)})?.zoom??18,p=document.activeElement===t;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:U()?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=K([...pe.current.values()].map(({pin:t})=>{const n=e.project([t.lng,t.lat]);return{key:t.key,x:n.x,y:n.y,stop:t.stop??null}}),o);const s=e=>(l??a.places)(e),c=e.getZoom()<17.5?a.spread:a.cycle,u=(e,t)=>{const n=t?"":"none";e.style.display!==n&&(e.style.display=n)},d=/* @__PURE__ */new Map;for(const r of i.groups){const o=r.under>0?a.closeBy(r.under,s(r.under)):null,l=1===r.keys.length?pe.current.get(r.keys[0]):null;if(l){u(l.button,!0),l.button.setAttribute("aria-label",o?`${l.name}; ${o}`:l.name),l.button.title=o?`${l.title}\n${o}`:l.title;continue}for(const e of r.keys)u(pe.current.get(e).button,!1);const i=r.keys.join(" ");let p=me.current.get(i);if(!p){const n=document.createElement("button");n.type="button",n.dataset.pinGroup="",n.className="grid place-items-center rounded-full cursor-pointer",n.append(document.createElement("span"));const o=pe.current.get(r.keys[0]).pin,a={button:n,keys:r.keys,marker:new t.Marker({element:n,anchor:"center"}).setLngLat([o.lng,o.lat]).addTo(e)};n.addEventListener("click",e=>{e.stopPropagation(),Le(a.keys,n)}),p=a}p.keys=r.keys;const m=r.keys.map(e=>pe.current.get(e)),h=r.stops.length>0?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:G[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"===Q?window.matchMedia("(pointer: coarse)").matches:Q}),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(G[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(H);if(i&&(i.attribution||"")!==n){for(const t of P)e.getLayer(t)&&e.removeLayer(t);e.removeSource(H)}const s=e.getSource(H);s?s.setData(o):e.addSource(H,{type:"geojson",data:o,...n?{attribution:n}:{}}),e.getLayer("routes-road")||e.addLayer({id:"routes-road",type:"line",source:H,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:H,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?W(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))};U()?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,Re=Ae?.lng??0,Oe=Ae?.lat??0,Be=be&&!Se&&null!=O&&!!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([Re,Oe]).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:V,borderBottomColor:V}),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:U()?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,Re,Oe,Ee]);const Ke=T?.active??!1,We=l(T?.onChange);s(()=>{We.current=T?.onChange}),s(()=>{if(!T)return;const e=document.documentElement;Ke&&!document.fullscreenElement&&e.requestFullscreen&&e.requestFullscreen().catch(()=>{}),!Ke&&document.fullscreenElement&&document.exitFullscreen().catch(()=>{})},[Ke]);const qe=!!T;return s(()=>{if(!qe)return;const e=()=>{document.fullscreenElement||We.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
|
-
/* @__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}),
|
|
2
|
+
import{Button_default as e}from"../chunk-G5GERM76.js";import"../chunk-3E27HV76.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-3G5TA3IF.js";import{useShellStrings as o}from"../chunk-LVCRH3K6.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 R(e){const t=Math.max(j,12+8*e.length);return t+t%2}var O=(e,t,n,r)=>({left:e-n/2,top:t-r/2,right:e+n/2,bottom:t+r/2});function T(e,t){return e.left<t.right+1&&t.left<e.right+1&&e.top<t.bottom+1&&t.top<e.bottom+1}var B=e=>O(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(T(B(e[t]),B(e[n])))return[e[t],e[n]];return null}function K(e,t=[]){const n=[],r=e=>t.some(t=>T(t,e));let o=e.filter(e=>null!==e.stop).sort((e,t)=>e.stop-t.stop).map(e=>({keys:[e.key],stops:[e.stop],x:e.x,y:e.y,width: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=R(z(t.stops)),o=o.filter(e=>e!==n)}o=o.filter(e=>!r(B(e))||(n.push(...e.keys),!1));const a=[];for(const t of e){if(null!==t.stop)continue;const e=O(t.x,t.y,S,S),l=o.find(t=>T(B(t),e));if(l||r(e)){n.push(t.key),l&&l.under++;continue}const i=a.find(t=>T(B(t),e));i?i.keys.push(t.key):a.push({keys:[t.key],stops:[],x:t.x,y:t.y,width:S,height:S,under:0})}return{groups:[...o,...a],hidden:n}}function W(e,t,n){let r=-1/0;for(const o of t){const t=Math.max(Math.abs(o.x-e.x),Math.abs(o.y-e.y));r=Math.max(r,0===t?1/0:n+Math.log2(29/t))}return r}function q(e){const t=new MutationObserver(e);return t.observe(document.documentElement,{attributes:!0,attributeFilter:n}),()=>t.disconnect()}var _=t;var H="routes",P=["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(),G(n)}function G(e){const t=document.createElement("canvas").getContext("2d");if(!t)return"#2563eb";t.fillStyle="#2563eb",t.fillStyle=e,t.fillRect(0,0,1,1);const[n,r,o]=t.getImageData(0,0,1,1).data;return`rgb(${n}, ${r}, ${o})`}var D={light:"https://tiles.openfreemap.org/styles/positron",dark:"https://tiles.openfreemap.org/styles/dark"},Z={center:[30,20],zoom:1},V="ring-2 ring-gray-900 ring-offset-2";var J="var(--color-gray-600, #4b5563)",Q="http://www.w3.org/2000/svg",U=()=>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(Q,"svg");t.setAttribute("viewBox","0 0 24 24"),t.setAttribute("fill","none"),t.setAttribute("stroke","currentColor"),t.setAttribute("stroke-width","2"),t.setAttribute("aria-hidden","true");for(const n of e){const e=document.createElementNS(Q,"path");e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-linejoin","round"),e.setAttribute("d",n),t.appendChild(e)}return t}function 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":V),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:R,card:O,cardMinMapWidth:T=480,fullScreen:B,initialView:F=Z,cooperativeGestures:Q=!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,_,()=>!1)?"dark":"light",Ne=l({onSelect:a,onPick:R,picking:A,pins:t,selectedKey:n,highlightKey:E,groupCrowded:C,strings:X,noun:L});s(()=>{Ne.current={onSelect:a,onPick:R,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:U()?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)=>W(e,i.filter((e,n)=>n!==t),o))),{clientWidth:c,clientHeight:u}=n.getContainer(),d=n.cameraForBounds(l,{padding:Math.min(64,c/4,u/4)})?.zoom??18,p=document.activeElement===t;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:U()?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=K([...pe.current.values()].map(({pin:t})=>{const n=e.project([t.lng,t.lat]);return{key:t.key,x:n.x,y:n.y,stop:t.stop??null}}),o);const s=e=>(l??a.places)(e),c=e.getZoom()<17.5?a.spread:a.cycle,u=(e,t)=>{const n=t?"":"none";e.style.display!==n&&(e.style.display=n)},d=/* @__PURE__ */new Map;for(const r of i.groups){const o=r.under>0?a.closeBy(r.under,s(r.under)):null,l=1===r.keys.length?pe.current.get(r.keys[0]):null;if(l){u(l.button,!0),l.button.setAttribute("aria-label",o?`${l.name}; ${o}`:l.name),l.button.title=o?`${l.title}\n${o}`:l.title;continue}for(const e of r.keys)u(pe.current.get(e).button,!1);const i=r.keys.join(" ");let p=me.current.get(i);if(!p){const n=document.createElement("button");n.type="button",n.dataset.pinGroup="",n.className="grid place-items-center rounded-full cursor-pointer",n.append(document.createElement("span"));const o=pe.current.get(r.keys[0]).pin,a={button:n,keys:r.keys,marker:new t.Marker({element:n,anchor:"center"}).setLngLat([o.lng,o.lat]).addTo(e)};n.addEventListener("click",e=>{e.stopPropagation(),Le(a.keys,n)}),p=a}p.keys=r.keys;const m=r.keys.map(e=>pe.current.get(e)),h=r.stops.length>0?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)&&V);f.className!==y&&(f.className=y),d.set(i,p)}for(const e of i.hidden)u(pe.current.get(e).button,!1);for(const[e,t]of me.current)d.has(e)||t.marker.remove();me.current=d}if(ge.current){const e=r&&i?i.groups.find(e=>e.keys.includes(r)&&e.keys.length>1):void 0,t=r?pe.current.get(r):void 0,n=r?he.current.get(r):void 0,o=e?{at:pe.current.get(e.keys[0]).pin,width:e.width,height:e.height}:t?{at:t.pin,width:t.button.offsetWidth||(null!=t.pin.stop?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:D[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"===Q?window.matchMedia("(pointer: coarse)").matches:Q}),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(D[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(),G(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(H);if(i&&(i.attribution||"")!==n){for(const t of P)e.getLayer(t)&&e.removeLayer(t);e.removeSource(H)}const s=e.getSource(H);s?s.setData(o):e.addSource(H,{type:"geojson",data:o,...n?{attribution:n}:{}}),e.getLayer("routes-road")||e.addLayer({id:"routes-road",type:"line",source:H,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:H,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?W(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))};U()?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<T);t();const n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[T]);const Ae=n?t.find(e=>e.key===n)??null:null,ze=Ae?.key??null,Re=Ae?.lng??0,Oe=Ae?.lat??0,Te=be&&!Se&&null!=O&&!!Ae,[Be,Fe]=i(null);s(()=>{const e=ce.current,t=ue.current;if(!(Te&&e&&t&&ze))return;const n=document.createElement("div");n.dataset.mapCard="",n.className="w-[26rem] overflow-y-auto overscroll-contain";const r=new t.Popup({anchor:"bottom",offset:k,className:"rosh-map-card",maxWidth:"none",closeButton:!1,closeOnClick:!1,closeOnMove:!1,focusAfterOpen:!1}).setLngLat([Re,Oe]).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:J,borderBottomColor:J}),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:U()?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})}}},[Te,ze,Re,Oe,Ee]);const Ke=B?.active??!1,We=l(B?.onChange);s(()=>{We.current=B?.onChange}),s(()=>{if(!B)return;const e=document.documentElement;Ke&&!document.fullscreenElement&&e.requestFullscreen&&e.requestFullscreen().catch(()=>{}),!Ke&&document.fullscreenElement&&document.exitFullscreen().catch(()=>{})},[Ke]);const qe=!!B;return s(()=>{if(!qe)return;const e=()=>{document.fullscreenElement||We.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
|
+
/* @__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}),B&&/* @__PURE__ */h(e,{"data-map-control":"",variant:"secondary",size:"sm",className:"absolute left-3 top-3 z-10",onClick:()=>B.onChange(!B.active),leftIcon:/* @__PURE__ */h(se,{leave:B.active}),children:B.active?X.leaveFullScreen:X.fullScreen}),f,null!=O&&!Te&&/* @__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:O}),Te&&Be?p(O,Be):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
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
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__ */
|
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-3G5TA3IF.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 B=l.Activity,
|
|
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)},R);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(
|
|
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-ZN6W2KOC.js";import{useShellLanguage as t}from"../chunk-PBZ2VHS3.js";import"../chunk-YD4DPX4H.js";import{confirm as n}from"../chunk-BY3KWWWU.js";import"../chunk-UNA3BQJI.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-3G5TA3IF.js";import{useShellStrings as i}from"../chunk-LVCRH3K6.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 T(e,t){return[...t.map(t=>e.find(e=>e.key===t)).filter(e=>Boolean(e)),...e.filter(e=>!t.includes(e.key))]}function A(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=C(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=C(n,e[0].key)}return n}(l,n)}function j(e){let t={...e,activeKey:null};return t.closing&&(t=C(t,t.closing)),t}function C(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 w(e,t){switch(t.type){case"visit":return A(e,t.entry,t.maxTabs);case"transient":return j(e);case"close":{let n=e;for(const e of t.keys)n=C(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 M=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,C=y(),x=s(l);x.current=l;const B=d(e=>{const t=x.current(e);return t?{key:t.key??e.pathname,path:M(e),title:t.title}:null},[]),{language:L}=t(),[S,D]=f(w,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=>B(O(e)),L);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:T(r,n)}}({tabs:[],activeKey:null,mounted:[],dirty:[],closing:null,clock:0,tabs:e},c.map(e=>B(O(e))).filter(e=>Boolean(e)));const n=h?B(F):null;return t=n?A(t,n,k):j(t),t}),R=s(S);R.current=S;const $=s(/* @__PURE__ */new Map),E=h?B(F):null,H=E?.key??null;r(()=>{if(!h)return;const e=B(F);e?($.current.set(e.key,F),D({type:"visit",entry:e,maxTabs:k})):D({type:"transient"})},[F,h,k,B]),o(()=>{const e=new Set(S.tabs.map(e=>e.key));for(const t of $.current.keys())e.has(t)||$.current.delete(t)},[S.tabs]);const W=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)}(S,L),[S,L]);o(()=>{if(a)try{localStorage.setItem(a,W)}catch{}},[W,a]);const J=S.dirty.length>0;o(()=>{if(!J)return;const e=e=>{e.preventDefault(),e.returnValue=""};return window.addEventListener("beforeunload",e),()=>window.removeEventListener("beforeunload",e)},[J]);const P=s(/* @__PURE__ */new Map),Q=d((e,t)=>{let n=P.current.get(e);return void 0===n&&(n=P.current.size,P.current.set(e,n)),`${C}-page-${t}-${n}`},[C]),V=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]),U=d(()=>{const e=R.current;return e.tabs.find(e=>e.pinned)?.path??"/"},[]),Y=d((e,t,n)=>{const r=R.current,i=r.activeKey;if(!i||!e.includes(i))return void D({type:"close",keys:e,closing:null});let l=t;if(!l){const t={...r,tabs:r.tabs.filter(t=>t.key===i||!e.includes(t.key))},c=n?r.tabs.find(t=>t.key===n&&!e.includes(t.key)):void 0;l=(c??function(e,t){const n=e.tabs.filter(n=>n.key!==e.closing||n.key===t),r=n.findIndex(e=>e.key===t);return r<0?null:n[r+1]??n[r-1]??null}(t,i))?.path??U()}D({type:"close",keys:e.filter(e=>e!==i),closing:i}),I(l)},[I,U]),G=d(async(e,t={})=>{const n=R.current.tabs.find(t=>t.key===e);return!n||n.pinned?(t.to&&I(t.to),!1):!(!t.force&&R.current.dirty.includes(e)&&!await V([n]))&&(!!R.current.tabs.some(t=>t.key===e)&&(Y([e],t.to),!0))},[V,Y,I]),X=d(async(e,t)=>{let n=function(e,t,n){const r=e.tabs.filter(e=>!e.pinned);if("all"===t)return r.map(e=>e.key);if("others"===t)return r.filter(e=>e.key!==n).map(e=>e.key);const i=e.tabs.findIndex(e=>e.key===n);return i<0?[]:e.tabs.slice(i+1).filter(e=>!e.pinned).map(e=>e.key)}(R.current,e,t);const r=R.current.tabs.filter(e=>n.includes(e.key)&&R.current.dirty.includes(e.key));r.length&&!await V(r)&&(n=n.filter(e=>!r.some(t=>t.key===e)));const i=new Set(R.current.tabs.map(e=>e.key));n=n.filter(e=>i.has(e)),n.length&&Y(n,void 0,"all"===e?null:t)},[V,Y]),Z=d(e=>{const t=R.current.tabs.find(t=>t.key===e);t&&e!==R.current.activeKey&&I(t.path)},[I]),z=d((e,t)=>D({type:"title",key:e,title:t}),[]),q=d((e,t)=>D({type:"dirty",key:e,dirty:t}),[]),[_,ee]=p({}),te=d((e,t)=>{ee(n=>{if((n[e]??null)===t)return n;const r={...n};return t?r[e]=t:delete r[e],r})},[]),ne=d(e=>B(e)?.key??null,[B]),re=d(e=>$.current.get(e),[]),ie=u(()=>h?S.tabs.filter(e=>e.key!==S.closing):[],[h,S.tabs,S.closing]),le=u(()=>({enabled:h,state:S,currentKey:H,resolve:l,keyFor:ne,locationFor:re,idFor:Q,activate:Z,close:G,closeMany:X,setTitle:z,setDirty:q,copies:_,setCopy:te,visibleTabs:ie}),[h,S,H,l,ne,re,Q,Z,G,X,z,q,_,te,ie]);/* @__PURE__ */
|
|
3
|
+
return v(K.Provider,{value:le,children:e})}var B=l.Activity,L=Boolean(B);function S({active:e,children:t}){return B?/* @__PURE__ */v(B,{mode:e?"visible":"hidden",children:t}):/* @__PURE__ */v(h,{children:t})}var D=a(function({tabKey:e,active:t,location:n,render:i,className:l,panelId:c,tabId:a}){const y=s(null),d=s(t),f=s(/* @__PURE__ */new Map);r(()=>{const e=d.current;if(d.current=t,t&&!e)for(const[e,[t,n]]of f.current)e.isConnected?(e.scrollTop=t,e.scrollLeft=n):f.current.delete(e)},[t]),o(()=>{const e=y.current;if(!e)return;const t=e=>{if(!d.current)return;const t=e.target;t&&"number"==typeof t.scrollTop&&f.current.set(t,[t.scrollTop,t.scrollLeft])};return e.addEventListener("scroll",t,!0),()=>e.removeEventListener("scroll",t,!0)},[]);const p=u(()=>({key:e,activeRef:d}),[e]);/* @__PURE__ */
|
|
4
|
+
return v("div",{ref:y,role:c?"tabpanel":void 0,id:c,"aria-labelledby":a,hidden:!t,style:t?void 0:{display:"none"},className:l,"data-page-tab":e,children:/* @__PURE__ */v(F.Provider,{value:p,children:/* @__PURE__ */v(S,{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)),R="\0transient";function $({children:e,frameClassName:t}){const n=k(K),r=m();if(!n||!n.enabled)/* @__PURE__ */
|
|
5
|
+
return v("div",{className:t,children:e(r)},R);const{state:i,currentKey:l,locationFor:c,idFor:a}=n,s=i.tabs.filter(e=>i.mounted.includes(e.key)).map(e=>e.key);return l&&!s.includes(l)&&s.push(l),/* @__PURE__ */g(h,{children:[s.map(n=>{const i=n===l,s=i?r:c(n);return s?/* @__PURE__ */v(D,{tabKey:n,active:i,location:s,render:e,className:t,panelId:a(n,"panel"),tabId:a(n,"tab")},n):null}),!l&&/* @__PURE__ */v(D,{tabKey:R,active:!0,location:r,render:e,className:t},R)]})}function E({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 W(){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 J(){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 P(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 Q(e){const t=k(K),n=k(F),r=t?.enabled?t.setCopy:void 0,i=n?.key;o(()=>{if(r&&i)return r(i,e||null),()=>r(i,null)},[r,i,e])}function V(e){const t=k(K),n=k(F),r=t?.enabled?t.setDirty:void 0;o(()=>{if(r&&n)return r(n.key,e),()=>{n.activeRef.current&&r(n.key,!1)}},[r,n,e])}export{I as DEFAULT_MAX_TABS,L as PAGE_TABS_PAUSE_HIDDEN,E as PageTabBar,$ as PageTabsOutlet,x as PageTabsProvider,O as parseTabPath,J as usePageTab,Q as usePageTabCopy,V as usePageTabDirty,P as usePageTabTitle,W 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-LGD633HY.js"));export{e as PdfViewer};
|
package/dist/telemetry/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{startClientTelemetry}from"../chunk-
|
|
1
|
+
export{startClientTelemetry}from"../chunk-NT4SZH5L.js";import"../chunk-7TD4XKYF.js";import"../chunk-KNUR2UEG.js";
|
package/dist/ui/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as ALT, b as ALT_SHIFT_D, c as ALT_SHIFT_E, d as ALT_SHIFT_N, e as APP_UPDATE_POLL_MS, f as Accordion, g as AccordionItem, h as AccordionProps, i as Align, j as AlignmentGrid, k as AlignmentGridProps, l as AlignmentPoint, m as AngleScale, n as AppUpdateBanner, o as AppUpdateBannerProps, p as AttachButton, q as AttachButtonProps, r as AttachmentDropZone, s as AttachmentDropZoneProps, t as AttachmentList, u as AttachmentListProps, v as AuthScreen, w as AuthScreenProps, x as Avatar, y as AvatarGroup, z as AvatarGroupProps, B as AvatarProps, D as AvatarSize, E as AvatarStatus, F as BORDER_WIDTHS, G as BackgroundVariant, H as BandScale, I as Banner, J as BannerEmphasis, K as BannerProps, L as BannerTone, M as BorderRole, N as BoxPlotBox, O as BoxPlotChart, Q as BoxPlotChartProps, R as BrandAssetEditor, T as BrandAssetEditorProps, U as BrandAssetPreview, V as BrandMark, W as BrandMarkProps, X as BrandMarkSlot, Y as BrandMarkSurface, Z as BrandMarkTreatment, _ as BreadcrumbItem, $ as Breadcrumbs, a0 as BreadcrumbsProps, a1 as BudgetBar, a2 as BudgetBarProps, a3 as BudgetState, a4 as Button, a5 as ButtonClassesOptions, a6 as ButtonProps, a7 as ButtonSize, a8 as ButtonVariant, a9 as CHART_INK, aa as CMD_A, ab as CMD_DOT, ac as CMD_ENTER, ad as CMD_K, ae as CMD_S, af as COLUMN_COUNT_MAX, ag as COLUMN_COUNT_WIDTHS, ah as COLUMN_SHARES_EQUAL, ai as COLUMN_SHARE_MIN, aj as CONTROL_HEIGHTS, ak as CORNERS, al as CORNERS_FOR_THEME, am as Calendar, an as CalendarMode, ao as CalendarProps, ap as Candle, aq as CandlestickChart, ar as CandlestickChartProps, as as Card, at as CardPadding, au as CardProps, av as CardTone, aw as CartesianPlot, ax as CartesianPlotProps, ay as CellStyle, az as ChartBackgroundVariant, aA as ChartBrush, aB as ChartBrushProps, aC as ChartCurve, aD as ChartDefs, aE as ChartDefsProps, aF as ChartDot, aG as ChartDotProps, aH as ChartDotVariant, aI as ChartFillVariant, aJ as ChartFrame, aK as ChartFrameProps, aL as ChartHighlightProvider, aM as ChartLegendEntry, aN as ChartLegendSwatch, aO as ChartRange, aP as ChartReferenceLine, aQ as ChartRevealDirection, aR as ChartSkeleton, aS as ChartSkeletonProps, aT as ChartStatusTone, aU as ChartStrokeVariant, aV as ChartTooltip, aW as ChartTooltipProps, aX as ChartTooltipRow, aY as ChatTemplate, aZ as Checkbox, a_ as CheckboxProps, a$ as CheckoutTemplate, b0 as ChordChart, b1 as ChordChartProps, b2 as ColorPicker, b3 as ColorPickerPanel, b4 as ColorPickerPanelProps, b5 as ColorPickerProps, b6 as ColorPreset, b7 as ColorSwatch, b8 as ColorSwatchProps, b9 as ColorSwatchSize, ba as ColoredBadge, bb as ColoredBadgeProps, bc as ColumnChart, bd as ColumnChartProps, C as ColumnDef, be as ColumnSeries, bf as ColumnShares, bg as ComposerAttachments, bh as ComposerAttachmentsProps, bi as ConfirmProvider, bj as ContainerFillChart, bk as ContainerFillChartProps, bl as ContainerFillItem, bm as ContextMenu, bn as ContextMenuPoint, bo as ContextMenuProps, bp as ContextMenuState, bq as ControlSize, br as CornerOption, bs as Corners, bt as CornersInput, bu as CornersInputProps, bv as CountBadge, bw as CountBadgeProps, bx as CountBadgeTone, by as Curve, bz as DAY_MS, bA as DashboardTemplate, bB as DataTable, bC as DataTableColumn, bD as DataTableColumnGroup, bE as DataTableHeader, bF as DataTablePage, bG as DataTableProps, bH as DataTableRowLink, bI as DataTableRowProps, bJ as DatePicker, bK as DatePickerProps, bL as DateRangePicker, bM as DateRangePickerProps, bN as DateTimePicker, bO as DateTimePickerProps, bP as DescriptionColumns, bQ as DescriptionItem, bR as DescriptionList, bS as DescriptionListProps, bT as Dialog, bU as DialogProps, bV as DialogSize, bW as DisplayChipItem, bX as DisplayChips, bY as DisplayChipsProps, bZ as Divider, b_ as DividerProps, b$ as DividerSpacing, c0 as Drawer, c1 as DrawerProps, c2 as DrawerSide, c3 as DrawerSize, c4 as DropdownMenu, c5 as DropdownMenuAlign, c6 as DropdownMenuCheckboxItem, c7 as DropdownMenuDividerItem, c8 as DropdownMenuEntry, c9 as DropdownMenuItem, ca as DropdownMenuLabelItem, cb as DropdownMenuLinkItem, cc as DropdownMenuProps, cd as DropdownMenuRadioItem, ce as DropdownMenuSide, cf as DropdownMenuStatusItem, cg as DropdownPositionOptions, ch as ELEVATION_LEVELS, ci as ENGLISH, cj as ENTER, ck as EditableGrid, cl as EditableGridProps, cm as ElevationLevel, cn as EmailTemplate, co as EmptyState, cp as EmptyStateProps, cq as EmptyValue, cr as EmptyValueProps, cs as ErrorBoundary, ct as ErrorBoundaryProps, cu as ErrorPage, cv as ErrorPageProps, cw as FONT_WEIGHTS, cx as FileIntake, cy as FilePicker, cz as FilePickerProps, cA as FillVariant, cB as FloatingBar, cC as FloatingBarAlign, cD as FloatingBarProps, cE as FloatingBarSide, cF as FontWeightRole, cG as FormError, cH as FormErrorSummary, cI as FormErrorSummaryProps, cJ as FormField, cK as FormFieldProps, cL as FormLayoutPage, cM as FunnelChart, cN as FunnelChartProps, cO as FunnelStage, cP as GLASS_DIVIDER, cR as GROUP_COLORS, cS as GROUP_COLORS_SOLID, cT as GalleryTemplate, cU as Gap, cV as GlassOptions, cW as GlobalSearch, cX as GlobalSearchProps, cY as Grid, cZ as GridCols, c_ as GridColumn, c$ as GridProps, d0 as HeatmapChart, d1 as HeatmapChartProps, d2 as HelpCenter, d3 as HelpCenterDoc, d4 as HelpCenterProps, d5 as HexInput, d6 as HistogramBin, d7 as HistogramChart, d8 as HistogramChartProps, d9 as Hsv, da as INPUT_BASE, db as INPUT_SIZES, dc as IconButton, dd as IconButtonClassesOptions, de as IconButtonProps, df as IconPicker, dg as IconPickerOption, dh as IconPickerProps, di as IconRail, dj as IconRailButton, dk as IconRailButtonProps, dl as IconRailLabels, dm as IconRailLabelsShown, dn as IconRailOrientation, dp as IconRailProps, dq as ImageFocusPoint, dr as ImageFocusPointProps, ds as Inline, dt as InlineProps, du as Input, dv as InputNumber, dw as InputNumberProps, dx as InputProps, dy as InputSize, dz as Justify, dA as Kanban, dB as KanbanColumn, dC as KanbanProps, dD as Kbd, dE as KbdProps, dF as KbdSize, dG as KbdTone, dH as Label, dI as LabelClassesOptions, dJ as LabelProps, dK as LadderScale, dL as LanguagePanel, dM as LanguagePanelProps, dN as LanguageSelect, dO as LanguageSelectProps, dP as LinearScale, dQ as LinkFilter, dR as LinkFilterField, dS as LinkKindChoice, dT as LinkOption, dU as LinkOptionGroup, dV as LinkPicker, dW as LinkPickerFieldProps, dX as LinkPickerProps, dY as LinkPickerWindowProps, dZ as LinkRules, d_ as LinkTarget, d$ as ListDrop, e0 as ListFooter, e1 as ListLoadError, e2 as ListLoadErrorProps, e3 as ListMove, e4 as ListRow, e5 as ListRowProps, e6 as LoadingSpinner, e7 as LoadingSpinnerProps, e8 as MAX_FRACTION_DIGITS, e9 as MENU_MAX_HEIGHT, ea as MOD, eb as MOTION, ec as MOTION_DURATIONS, ed as Markdown, ed as MarkdownLite, ee as MarkdownLiteProps, ee as MarkdownProps, ef as MediaUploadField, eg as MediaUploadFieldProps, eh as MediaUploadGrid, ei as MediaUploadGridItem, ej as MediaUploadGridProps, ek as MenuPos, el as Meter, em as MeterProps, en as MetricBar, eo as MetricBarProps, ep as Milestone, eq as MilestoneKind, er as MilestoneTimeline, es as MilestoneTimelineProps, et as MotionSpeed, ev as NEXT_CHUNK_PATH_PREFIX, ew as NativeSelect, ex as NiceAxis, ey as NumericKeypad, ez as NumericKeypadProps, eA as OVERLAY_OPEN_EVENT, eB as PLACEHOLDER_INK, eC as POPUP_MAX_WIDTH, eD as POST_PRODUCTION_STATUSES, eE as PageHeader, eF as PageHeaderProps, P as PaginatedResponse, eG as Pagination, eH as PaginationProps, eI as PaperclipGlyph, eJ as Paragraph, eK as ParagraphProps, eL as PieChart, eM as PieChartProps, eN as PieSegment, eO as PlotGeometry, eP as Point, eQ as Popover, eR as PopoverAlign, eS as PopoverProps, eT as PopoverRenderProps, eU as PopoverSide, eV as PopupMenu, eW as PopupMenuDivider, eX as PopupMenuItem, eY as PopupMenuItemProps, eZ as PopupMenuLabel, e_ as PopupMenuProps, e$ as PopupSubmenu, f0 as PopupSubmenuProps, f1 as PortalBrandingContextValue, f2 as PortalBrandingProvider, f3 as PortalBrandingProviderProps, f4 as ProductionTimeline, f5 as ProductionTimelineProps, f6 as ProductionTimelineSnapshot, f7 as ProgressItem, f8 as PublicPortal, f9 as PublicPortalBranding, fa as RADAR_SERIES_CAP, fb as RADIUS_ROLES, fc as ROW_HEIGHTS, fd as RadarAxis, fe as RadarChart, ff as RadarChartProps, fg as RadarSeries, fh as RadialBarChart, fi as RadialBarChartProps, fj as RadialBarRow, fk as Radio, fl as RadioGroup, fm as RadioGroupOption, fn as RadioGroupOrientation, fo as RadioGroupProps, fp as RadioProps, fq as RadiusRole, fr as Range, fs as RangeChart, ft as RangeChartProps, fu as RangeRow, fv as RankedBars, fw as RankedBarsProps, fx as RankedBarsRow, fy as ResizeHandle, fz as ResizeHandleOrientation, fA as ResizeHandleProps, fB as ResizeHandleSide, fC as ResizeHandleStackSide, fD as ResolvedPortalBrandAsset, fE as Result, fF as ResultProps, fG as ResultStatus, fH as RevealDirection, fI as SCATTER_SERIES_CAP, fJ as SERIES_SLOT_COUNT, fK as SERIES_VARS, fL as SHELL_LANGUAGE_STORAGE_KEY, fM as SHIFT, fN as SPACING_ROLES, fO as SPACING_SCALE, fP as STAGES, fQ as STALE_CHUNK_RELOAD_COOLDOWN_MS, fR as STALE_CHUNK_RELOAD_KEY, fS as STATUS_VARS, fT as SankeyChart, fU as SankeyChartProps, fV as SankeyLink, fW as SankeyNode, fX as ScatterChart, fY as ScatterChartProps, fZ as ScatterPoint, f_ as ScatterSeries, S as SearchConfig, f$ as SearchListRoute, g0 as SearchProvider, g1 as SearchQuickAction, g2 as SearchResponse, g3 as SearchResult, g4 as SearchableItem, g5 as SearchableOption, g6 as SearchableOptionGroup, g7 as SearchableSelect, g8 as SearchableSelectBaseProps, g9 as SearchableSelectMultipleProps, ga as SearchableSelectProps, gb as Segmented, gc as SegmentedOption, gd as SegmentedProps, ge as SegmentedSize, gf as Select, gg as SelectBaseProps, gh as SelectFooterAction, gi as SelectItem, gj as SelectMultipleProps, gk as SelectOption, gl as SelectOptionGroup, gm as SelectProps, gn as SemanticGroup, go as SeriesSlots, gp as SettingRow, gq as SettingRowProps, gr as SeverityTone, gu as ShellLanguage, gv as ShellLanguageProvider, gw as ShellLanguageState, gx as ShellPrefsAdapter, gy as ShellPrefsProvider, gz as SidebarActionButton, gA as SidebarActionButtonProps, gB as SidebarGroupLabel, gC as SidebarGroupLabelProps, gD as SidebarLayout, gE as SidebarLayoutProps, gF as SidebarNavGroup, gG as SidebarNavGroupProps, gH as SidebarNavItem, gI as SidebarNavItemProps, gJ as Skeleton, gK as SkeletonProps, gL as SkeletonVariant, gM as Slider, gN as SliderGroup, gO as SliderProps, gP as SliderSize, gQ as Snippet, gR as SnippetProps, gS as SnippetSize, gT as SnippetVariant, a as SortState, gU as SortableList, gV as SortableListProps, gW as SortableListSpacing, gX as SpacingRole, gY as SpacingStep, gZ as Sparkline, g_ as SparklineProps, g$ as SpinnerRing, h0 as SpinnerRingProps, h1 as SplitButton, h2 as SplitButtonProps, h3 as SplitButtonVariant, h4 as Stack, h5 as StackProps, h6 as StaleChunkReloadOptions, h7 as StatCard, h8 as StatCardProps, h9 as StatTile, ha as StatTileProps, hb as Statistic, hc as StatisticProps, hd as StatisticSize, he as StatisticTone, hf as StatusBadge, hg as StatusBadgeProvider, hh as StatusEmphasis, hi as StepItem, hj as Stepper, hk as StepperProps, hl as StrokeVariant, hm as SunburstChart, hn as SunburstChartProps, ho as SunburstNode, hp as Switch, hq as SwitchProps, hr as SwitchSize, hs as TYPE_SCALE, ht as TabItem, hu as Tabs, hv as TabsProps, hw as TagInput, hx as TagInputOption, hy as TagInputProps, hz as TagInputTone, hA as Text, hB as TextLinkField, hC as TextLinkFieldProps, hD as TextProps, hE as TextSize, hF as TextTone, hG as TextToolbar, hH as TextToolbarAlign, hI as TextToolbarCase, hJ as TextToolbarMark, hK as TextToolbarProps, hL as TextWeight, hM as Textarea, hN as TextareaProps, hO as Theme, hP as TileButton, hQ as TileButtonProps, hR as TileSize, hS as TimeAgo, hT as TimeAgoProps, hU as TimePicker, hV as TimePickerProps, hW as TimeSeriesChart, hX as TimeSeriesChartProps, hY as TimeSeriesSeries, hZ as TimelineMarker, h_ as TimelineMarkerKind, h$ as TimelineReport, i0 as TimelineScrubProgress, i1 as TimelineTrack, i2 as TimelineTrackItem, i3 as TimelineTrackKind, i4 as TimelineTrackPending, i5 as TimelineTrackPhase, i6 as TimelineTrackPlayback, i7 as TimelineTrackProps, i8 as TimelineTrackThumb, i9 as Title, ia as TitleLevel, ib as TitleProps, ic as ToastAction, id as ToastCloseReason, ie as ToastOptions, ig as ToastPlacement, ih as ToastUndoableOptions, ii as Tooltip, ij as TooltipProps, ik as TopNav, il as TopNavItem, im as TopNavProps, io as TransferProgress, ip as TransferProgressProps, iq as TransferProgressState, ir as Tree, is as TreeDrop, it as TreeEmptySlot, iu as TreeEmptySlotProps, iv as TreeGroup, iw as TreeGroupLabel, ix as TreeGroupLabelProps, iy as TreeGroupProps, iz as TreeMove, iA as TreeProps, iB as TreeRow, iC as TreeRowProps, iD as TreeSeam, iE as TreeSeamProps, iF as TreemapChart, iG as TreemapChartProps, iH as TreemapItem, iI as TreemapTile, iJ as TypeStep, iK as UNDOABLE_MS, iL as UseAppUpdateOptions, iM as UseContextMenu, iN as UseProductionTimelineOpts, iO as VERSION, iP as VITE_PRELOAD_ERROR_EVENT, iQ as WaterfallChart, iR as WaterfallChartProps, iS as WaterfallStep, iT as WidthsBar, iU as WidthsBarProps, iV as ZLayer, iW as Z_LAYERS, iX as angleScale, iY as appendKey, iZ as applyCorners, i_ as applyIconSet, i$ as applyThemePrefs, j0 as arcPath, j1 as areaBetween, j2 as areaFrom, j3 as assignSeriesSlots, j4 as autoHighlightIndex, j5 as backspace, j6 as bandScale, j7 as binValues, j8 as budgetState, j9 as bumpPath, ja as buttonClasses, jb as calcOverall, jc as calcReportOverall, jd as colorFill, je as colorSwatchClasses, jf as columnSharesWidths, jg as confirm, jh as confirmDestructive, ji as cornersFor, jj as curvePath, jk as dashFor, jm as dismissPopups, jn as fillFor, jo as fillId, jp as fmtSliderDate, jq as fromDateKey, jr as glassStyle, js as glowId, jt as groundId, ju as groupColors, jv as hexToHsv, jw as highlightOpacity, jx as hsvToHex, jy as iconButtonClasses, jz as inputClasses, jA as installStaleChunkReload, jB as isMac, jC as isSeverityTone, jD as isSpacingStep, jE as isStaleChunkError, jG as labelClasses, jH as ladderScale, jI as languageSelectWidth, jJ as leavesContextMenuAlone, jK as linearPath, jL as linearScale, jM as logScale, jN as maskId, jO as matchShellLanguage, jP as mediaFileName, jQ as monotonePath, jR as niceAxis, jS as niceMax, jT as openGlobalSearch, jU as parseHexColor, jV as polygonPoints, jW as popupBounds, jX as prompt, jY as pushRecentSearch, jZ as radiusScale, j_ as readSavedShellLanguage, j$ as registerModalEscapeInterceptor, k0 as resolveBrandMarkTreatment, k1 as resolveColumnShares, k2 as resolveColumnWidths, k3 as resolveCorners, k4 as resolvePortalBrandAsset, k5 as resolveSeriesColor, k6 as resolveSeriesColorWithin, k7 as resolveShellLanguage, k8 as resolveTheme, k9 as sanitizeRecentSearches, ka as saveShellLanguage, kb as seriesColor, kc as severityOf, kd as solidSurfaceStyle, ke as splinePath, kf as squarify, kg as stagger, kh as stepPath, ki as tabButtonId, kj as tabPanelId, kk as textToolbarRows, kl as textToolbarWindowColumns, km as toDateKey, kn as toDayMs, ko as toISODate, kp as toast, kq as toggleSeriesSlot, kr as useAppUpdate, ks as useClickOutside, kt as useConfirm, ku as useContextMenu, kv as useDebouncedValue, kw as useDropdownPosition, kx as useFocusTrap, ky as useHighlight, kz as useIsMobile, kA as useLocalStoragePrefs, kB as usePlotWidth, kC as usePortalBranding, kD as useProductionTimeline, kE as useScrollLock, kF as useShellLanguage, kG as useShellPrefs, kH as useStatusLabel, kI as useTheme, kJ as useTransferProgress } from '../index-CFyMUpku.js';
|
|
1
|
+
export { A as ALT, b as ALT_SHIFT_D, c as ALT_SHIFT_E, d as ALT_SHIFT_N, e as APP_UPDATE_POLL_MS, f as Accordion, g as AccordionItem, h as AccordionProps, i as Align, j as AlignmentGrid, k as AlignmentGridProps, l as AlignmentPoint, m as AngleScale, n as AppUpdateBanner, o as AppUpdateBannerProps, p as AttachButton, q as AttachButtonProps, r as AttachmentDropZone, s as AttachmentDropZoneProps, t as AttachmentList, u as AttachmentListProps, v as AuthScreen, w as AuthScreenProps, x as Avatar, y as AvatarGroup, z as AvatarGroupProps, B as AvatarProps, D as AvatarSize, E as AvatarStatus, F as BORDER_LINE_STYLES, G as BORDER_WIDTHS, H as BackgroundVariant, I as BandScale, J as Banner, K as BannerEmphasis, L as BannerProps, M as BannerTone, N as BorderInput, O as BorderInputProps, Q as BorderLineStyle, R as BorderRole, T as BorderValue, U as BoxPlotBox, V as BoxPlotChart, W as BoxPlotChartProps, X as BrandAssetEditor, Y as BrandAssetEditorProps, Z as BrandAssetPreview, _ as BrandMark, $ as BrandMarkProps, a0 as BrandMarkSlot, a1 as BrandMarkSurface, a2 as BrandMarkTreatment, a3 as BreadcrumbItem, a4 as Breadcrumbs, a5 as BreadcrumbsProps, a6 as BudgetBar, a7 as BudgetBarProps, a8 as BudgetState, a9 as Button, aa as ButtonClassesOptions, ab as ButtonProps, ac as ButtonSize, ad as ButtonVariant, ae as CHART_INK, af as CMD_A, ag as CMD_DOT, ah as CMD_ENTER, ai as CMD_K, aj as CMD_S, ak as COLUMN_COUNT_MAX, al as COLUMN_COUNT_WIDTHS, am as COLUMN_SHARES_EQUAL, an as COLUMN_SHARE_MIN, ao as CONTROL_HEIGHTS, ap as CORNERS, aq as CORNERS_FOR_THEME, ar as Calendar, as as CalendarMode, at as CalendarProps, au as Candle, av as CandlestickChart, aw as CandlestickChartProps, ax as Card, ay as CardPadding, az as CardProps, aA as CardTone, aB as CartesianPlot, aC as CartesianPlotProps, aD as CellStyle, aE as ChartBackgroundVariant, aF as ChartBrush, aG as ChartBrushProps, aH as ChartCurve, aI as ChartDefs, aJ as ChartDefsProps, aK as ChartDot, aL as ChartDotProps, aM as ChartDotVariant, aN as ChartFillVariant, aO as ChartFrame, aP as ChartFrameProps, aQ as ChartHighlightProvider, aR as ChartLegendEntry, aS as ChartLegendSwatch, aT as ChartRange, aU as ChartReferenceLine, aV as ChartRevealDirection, aW as ChartSkeleton, aX as ChartSkeletonProps, aY as ChartStatusTone, aZ as ChartStrokeVariant, a_ as ChartTooltip, a$ as ChartTooltipProps, b0 as ChartTooltipRow, b1 as ChatTemplate, b2 as Checkbox, b3 as CheckboxProps, b4 as CheckoutTemplate, b5 as ChordChart, b6 as ChordChartProps, b7 as ColorPicker, b8 as ColorPickerPanel, b9 as ColorPickerPanelProps, ba as ColorPickerProps, bb as ColorPreset, bc as ColorSwatch, bd as ColorSwatchProps, be as ColorSwatchSize, bf as ColoredBadge, bg as ColoredBadgeProps, bh as ColumnChart, bi as ColumnChartProps, C as ColumnDef, bj as ColumnSeries, bk as ColumnShares, bl as ComposerAttachments, bm as ComposerAttachmentsProps, bn as ConfirmProvider, bo as ContainerFillChart, bp as ContainerFillChartProps, bq as ContainerFillItem, br as ContextMenu, bs as ContextMenuPoint, bt as ContextMenuProps, bu as ContextMenuState, bv as ControlSize, bw as CornerOption, bx as Corners, by as CornersInput, bz as CornersInputProps, bA as CountBadge, bB as CountBadgeProps, bC as CountBadgeTone, bD as Curve, bE as DAY_MS, bF as DashboardTemplate, bG as DataTable, bH as DataTableColumn, bI as DataTableColumnGroup, bJ as DataTableHeader, bK as DataTablePage, bL as DataTableProps, bM as DataTableRowLink, bN as DataTableRowProps, bO as DatePicker, bP as DatePickerProps, bQ as DateRangePicker, bR as DateRangePickerProps, bS as DateTimePicker, bT as DateTimePickerProps, bU as DescriptionColumns, bV as DescriptionItem, bW as DescriptionList, bX as DescriptionListProps, bY as Dialog, bZ as DialogProps, b_ as DialogSize, b$ as DisplayChipItem, c0 as DisplayChips, c1 as DisplayChipsProps, c2 as Divider, c3 as DividerProps, c4 as DividerSpacing, c5 as Drawer, c6 as DrawerProps, c7 as DrawerSide, c8 as DrawerSize, c9 as DropdownMenu, ca as DropdownMenuAlign, cb as DropdownMenuCheckboxItem, cc as DropdownMenuDividerItem, cd as DropdownMenuEntry, ce as DropdownMenuItem, cf as DropdownMenuLabelItem, cg as DropdownMenuLinkItem, ch as DropdownMenuProps, ci as DropdownMenuRadioItem, cj as DropdownMenuSide, ck as DropdownMenuStatusItem, cl as DropdownPositionOptions, cm as ELEVATION_LEVELS, cn as ENGLISH, co as ENTER, cp as EditableGrid, cq as EditableGridProps, cr as ElevationLevel, cs as EmailTemplate, ct as EmptyState, cu as EmptyStateProps, cv as EmptyValue, cw as EmptyValueProps, cx as ErrorBoundary, cy as ErrorBoundaryProps, cz as ErrorPage, cA as ErrorPageProps, cB as FONT_WEIGHTS, cC as FileIntake, cD as FilePicker, cE as FilePickerProps, cF as FillVariant, cG as FloatingBar, cH as FloatingBarAlign, cI as FloatingBarProps, cJ as FloatingBarSide, cK as FontWeightRole, cL as FormError, cM as FormErrorSummary, cN as FormErrorSummaryProps, cO as FormField, cP as FormFieldProps, cQ as FormLayoutPage, cR as FunnelChart, cS as FunnelChartProps, cT as FunnelStage, cU as GLASS_DIVIDER, cW as GROUP_COLORS, cX as GROUP_COLORS_SOLID, cY as GalleryTemplate, cZ as Gap, c_ as GlassOptions, c$ as GlobalSearch, d0 as GlobalSearchProps, d1 as Grid, d2 as GridCols, d3 as GridColumn, d4 as GridProps, d5 as HeatmapChart, d6 as HeatmapChartProps, d7 as HelpCenter, d8 as HelpCenterDoc, d9 as HelpCenterProps, da as HexInput, db as HistogramBin, dc as HistogramChart, dd as HistogramChartProps, de as Hsv, df as INPUT_BASE, dg as INPUT_SIZES, dh as IconButton, di as IconButtonClassesOptions, dj as IconButtonProps, dk as IconPicker, dl as IconPickerOption, dm as IconPickerProps, dn as IconRail, dp as IconRailButton, dq as IconRailButtonProps, dr as IconRailLabels, ds as IconRailLabelsShown, dt as IconRailOrientation, du as IconRailProps, dv as ImageFocusPoint, dw as ImageFocusPointProps, dx as Inline, dy as InlineProps, dz as Input, dA as InputNumber, dB as InputNumberProps, dC as InputProps, dD as InputSize, dE as Justify, dF as Kanban, dG as KanbanColumn, dH as KanbanProps, dI as Kbd, dJ as KbdProps, dK as KbdSize, dL as KbdTone, dM as Label, dN as LabelClassesOptions, dO as LabelProps, dP as LadderScale, dQ as LanguagePanel, dR as LanguagePanelProps, dS as LanguageSelect, dT as LanguageSelectProps, dU as LinearScale, dV as LinkFilter, dW as LinkFilterField, dX as LinkKindChoice, dY as LinkOption, dZ as LinkOptionGroup, d_ as LinkPicker, d$ as LinkPickerFieldProps, e0 as LinkPickerProps, e1 as LinkPickerWindowProps, e2 as LinkRules, e3 as LinkTarget, e4 as ListDrop, e5 as ListFooter, e6 as ListLoadError, e7 as ListLoadErrorProps, e8 as ListMove, e9 as ListRow, ea as ListRowProps, eb as LoadingSpinner, ec as LoadingSpinnerProps, ed as MAX_FRACTION_DIGITS, ee as MENU_MAX_HEIGHT, ef as MOD, eg as MOTION, eh as MOTION_DURATIONS, ei as Markdown, ei as MarkdownLite, ej as MarkdownLiteProps, ej as MarkdownProps, ek as MediaUploadField, el as MediaUploadFieldProps, em as MediaUploadGrid, en as MediaUploadGridItem, eo as MediaUploadGridProps, ep as MenuPos, eq as Meter, er as MeterProps, es as MetricBar, et as MetricBarProps, eu as Milestone, ev as MilestoneKind, ew as MilestoneTimeline, ex as MilestoneTimelineProps, ey as MotionSpeed, eA as NEXT_CHUNK_PATH_PREFIX, eB as NativeSelect, eC as NiceAxis, eD as NumericKeypad, eE as NumericKeypadProps, eF as OVERLAY_OPEN_EVENT, eG as PLACEHOLDER_INK, eH as POPUP_MAX_WIDTH, eI as POST_PRODUCTION_STATUSES, eJ as PageHeader, eK as PageHeaderProps, P as PaginatedResponse, eL as Pagination, eM as PaginationProps, eN as PaperclipGlyph, eO as Paragraph, eP as ParagraphProps, eQ as PieChart, eR as PieChartProps, eS as PieSegment, eT as PlotGeometry, eU as Point, eV as Popover, eW as PopoverAlign, eX as PopoverProps, eY as PopoverRenderProps, eZ as PopoverSide, e_ as PopupMenu, e$ as PopupMenuDivider, f0 as PopupMenuItem, f1 as PopupMenuItemProps, f2 as PopupMenuLabel, f3 as PopupMenuProps, f4 as PopupSubmenu, f5 as PopupSubmenuProps, f6 as PortalBrandingContextValue, f7 as PortalBrandingProvider, f8 as PortalBrandingProviderProps, f9 as ProductionTimeline, fa as ProductionTimelineProps, fb as ProductionTimelineSnapshot, fc as ProgressItem, fd as PublicPortal, fe as PublicPortalBranding, ff as RADAR_SERIES_CAP, fg as RADIUS_ROLES, fh as ROW_HEIGHTS, fi as RadarAxis, fj as RadarChart, fk as RadarChartProps, fl as RadarSeries, fm as RadialBarChart, fn as RadialBarChartProps, fo as RadialBarRow, fp as Radio, fq as RadioGroup, fr as RadioGroupOption, fs as RadioGroupOrientation, ft as RadioGroupProps, fu as RadioProps, fv as RadiusRole, fw as Range, fx as RangeChart, fy as RangeChartProps, fz as RangeRow, fA as RankedBars, fB as RankedBarsProps, fC as RankedBarsRow, fD as ResizeHandle, fE as ResizeHandleOrientation, fF as ResizeHandleProps, fG as ResizeHandleSide, fH as ResizeHandleStackSide, fI as ResolvedPortalBrandAsset, fJ as Result, fK as ResultProps, fL as ResultStatus, fM as RevealDirection, fN as SCATTER_SERIES_CAP, fO as SERIES_SLOT_COUNT, fP as SERIES_VARS, fQ as SHELL_LANGUAGE_STORAGE_KEY, fR as SHIFT, fS as SPACING_ROLES, fT as SPACING_SCALE, fU as STAGES, fV as STALE_CHUNK_RELOAD_COOLDOWN_MS, fW as STALE_CHUNK_RELOAD_KEY, fX as STATUS_VARS, fY as SankeyChart, fZ as SankeyChartProps, f_ as SankeyLink, f$ as SankeyNode, g0 as ScatterChart, g1 as ScatterChartProps, g2 as ScatterPoint, g3 as ScatterSeries, S as SearchConfig, g4 as SearchListRoute, g5 as SearchProvider, g6 as SearchQuickAction, g7 as SearchResponse, g8 as SearchResult, g9 as SearchableItem, ga as SearchableOption, gb as SearchableOptionGroup, gc as SearchableSelect, gd as SearchableSelectBaseProps, ge as SearchableSelectMultipleProps, gf as SearchableSelectProps, gg as Segmented, gh as SegmentedOption, gi as SegmentedProps, gj as SegmentedSize, gk as Select, gl as SelectBaseProps, gm as SelectFooterAction, gn as SelectItem, go as SelectMultipleProps, gp as SelectOption, gq as SelectOptionGroup, gr as SelectProps, gs as SemanticGroup, gt as SeriesSlots, gu as SettingRow, gv as SettingRowProps, gw as SeverityTone, gz as ShellLanguage, gA as ShellLanguageProvider, gB as ShellLanguageState, gC as ShellPrefsAdapter, gD as ShellPrefsProvider, gE as Side, gF as SidebarActionButton, gG as SidebarActionButtonProps, gH as SidebarGroupLabel, gI as SidebarGroupLabelProps, gJ as SidebarLayout, gK as SidebarLayoutProps, gL as SidebarNavGroup, gM as SidebarNavGroupProps, gN as SidebarNavItem, gO as SidebarNavItemProps, gP as SidesEachToggle, gQ as SidesInput, gR as SidesInputProps, gS as SidesValue, gT as Skeleton, gU as SkeletonProps, gV as SkeletonVariant, gW as Slider, gX as SliderGroup, gY as SliderProps, gZ as SliderSize, g_ as Snippet, g$ as SnippetProps, h0 as SnippetSize, h1 as SnippetVariant, a as SortState, h2 as SortableList, h3 as SortableListProps, h4 as SortableListSpacing, h5 as SpacingRole, h6 as SpacingStep, h7 as Sparkline, h8 as SparklineProps, h9 as SpinnerRing, ha as SpinnerRingProps, hb as SplitButton, hc as SplitButtonProps, hd as SplitButtonVariant, he as Stack, hf as StackProps, hg as StaleChunkReloadOptions, hh as StatCard, hi as StatCardProps, hj as StatTile, hk as StatTileProps, hl as Statistic, hm as StatisticProps, hn as StatisticSize, ho as StatisticTone, hp as StatusBadge, hq as StatusBadgeProvider, hr as StatusEmphasis, hs as StepItem, ht as Stepper, hu as StepperProps, hv as StrokeVariant, hw as SunburstChart, hx as SunburstChartProps, hy as SunburstNode, hz as Switch, hA as SwitchProps, hB as SwitchSize, hC as TYPE_SCALE, hD as TabItem, hE as Tabs, hF as TabsProps, hG as TagInput, hH as TagInputOption, hI as TagInputProps, hJ as TagInputTone, hK as Text, hL as TextLinkField, hM as TextLinkFieldProps, hN as TextProps, hO as TextSize, hP as TextTone, hQ as TextToolbar, hR as TextToolbarAlign, hS as TextToolbarCase, hT as TextToolbarMark, hU as TextToolbarProps, hV as TextWeight, hW as Textarea, hX as TextareaProps, hY as Theme, hZ as TileButton, h_ as TileButtonProps, h$ as TileSize, i0 as TimeAgo, i1 as TimeAgoProps, i2 as TimePicker, i3 as TimePickerProps, i4 as TimeSeriesChart, i5 as TimeSeriesChartProps, i6 as TimeSeriesSeries, i7 as TimelineMarker, i8 as TimelineMarkerKind, i9 as TimelineReport, ia as TimelineScrubProgress, ib as TimelineTrack, ic as TimelineTrackItem, id as TimelineTrackKind, ie as TimelineTrackPending, ig as TimelineTrackPhase, ih as TimelineTrackPlayback, ii as TimelineTrackProps, ij as TimelineTrackThumb, ik as Title, il as TitleLevel, im as TitleProps, io as ToastAction, ip as ToastCloseReason, iq as ToastOptions, ir as ToastPlacement, is as ToastUndoableOptions, it as Tooltip, iu as TooltipProps, iv as TopNav, iw as TopNavItem, ix as TopNavProps, iy as TransferProgress, iz as TransferProgressProps, iA as TransferProgressState, iB as Tree, iC as TreeDrop, iD as TreeEmptySlot, iE as TreeEmptySlotProps, iF as TreeGroup, iG as TreeGroupLabel, iH as TreeGroupLabelProps, iI as TreeGroupProps, iJ as TreeMove, iK as TreeProps, iL as TreeRow, iM as TreeRowProps, iN as TreeSeam, iO as TreeSeamProps, iP as TreemapChart, iQ as TreemapChartProps, iR as TreemapItem, iS as TreemapTile, iT as TypeStep, iU as UNDOABLE_MS, iV as UseAppUpdateOptions, iW as UseContextMenu, iX as UseProductionTimelineOpts, iY as VERSION, iZ as VITE_PRELOAD_ERROR_EVENT, i_ as WaterfallChart, i$ as WaterfallChartProps, j0 as WaterfallStep, j1 as WidthsBar, j2 as WidthsBarProps, j3 as ZLayer, j4 as Z_LAYERS, j5 as angleScale, j6 as appendKey, j7 as applyCorners, j8 as applyIconSet, j9 as applyThemePrefs, ja as arcPath, jb as areaBetween, jc as areaFrom, jd as assignSeriesSlots, je as autoHighlightIndex, jf as backspace, jg as bandScale, jh as binValues, ji as borderSides, jj as borderStartEach, jk as budgetState, jl as bumpPath, jm as buttonClasses, jn as calcOverall, jo as calcReportOverall, jp as colorFill, jq as colorSwatchClasses, jr as columnSharesWidths, js as confirm, jt as confirmDestructive, ju as cornersFor, jv as curvePath, jw as dashFor, jy as dismissPopups, jz as fillFor, jA as fillId, jB as fmtSliderDate, jC as fromDateKey, jD as glassStyle, jE as glowId, jF as groundId, jG as groupColors, jH as hexToHsv, jI as highlightOpacity, jJ as hsvToHex, jK as iconButtonClasses, jL as inputClasses, jM as installStaleChunkReload, jN as isMac, jO as isSeverityTone, jP as isSpacingStep, jQ as isStaleChunkError, jS as labelClasses, jT as ladderScale, jU as languageSelectWidth, jV as leavesContextMenuAlone, jW as linearPath, jX as linearScale, jY as logScale, jZ as maskId, j_ as matchShellLanguage, j$ as mediaFileName, k0 as monotonePath, k1 as niceAxis, k2 as niceMax, k3 as openGlobalSearch, k4 as parseHexColor, k5 as polygonPoints, k6 as popupBounds, k7 as prompt, k8 as pushRecentSearch, k9 as radiusScale, ka as readSavedShellLanguage, kb as registerModalEscapeInterceptor, kc as resolveBrandMarkTreatment, kd as resolveColumnShares, ke as resolveColumnWidths, kf as resolveCorners, kg as resolvePortalBrandAsset, kh as resolveSeriesColor, ki as resolveSeriesColorWithin, kj as resolveShellLanguage, kk as resolveTheme, kl as sanitizeRecentSearches, km as saveShellLanguage, kn as seriesColor, ko as severityOf, kp as sidesStartEach, kq as solidSurfaceStyle, kr as splinePath, ks as squarify, kt as stagger, ku as stepPath, kv as tabButtonId, kw as tabPanelId, kx as textToolbarRows, ky as textToolbarWindowColumns, kz as toDateKey, kA as toDayMs, kB as toISODate, kC as toast, kD as toggleSeriesSlot, kE as useAppUpdate, kF as useClickOutside, kG as useConfirm, kH as useContextMenu, kI as useDebouncedValue, kJ as useDropdownPosition, kK as useFocusTrap, kL as useHighlight, kM as useIsMobile, kN as useLocalStoragePrefs, kO as usePlotWidth, kP as usePortalBranding, kQ as useProductionTimeline, kR as useScrollLock, kS as useShellLanguage, kT as useShellPrefs, kU as useStatusLabel, kV as useTheme, kW as useTransferProgress } from '../index-p7sSFfAC.js';
|
|
2
2
|
export { C as CurrencyFormat, D as DATE_FORMAT_OPTIONS, a as DateFormatKey, E as EMPTY_VALUE, F as FOCAL_DEFAULT, b as FOCAL_NUDGE_COARSE, c as FOCAL_NUDGE_STEP, d as FocalPoint, e as FormatDateOptions, f as FormatMoneyOptions, T as TZ_AUTO, g as TimeAgoOptions, h as currencyDecimals, i as currencySymbol, j as firstDayOfWeek, k as focalFromRect, l as formatBytes, m as formatDate, n as formatDateTime, o as formatFocal, p as formatMoney, q as formatTime, r as getUserDateFormat, s as getUserTimezone, t as nudgeFocal, u as parseFocal, v as setCurrencyFormats, w as setUserDateFormat, x as setUserTimezone, y as syncTimezoneFromProfile, z as timeAgo } from '../index-CHufemKB.js';
|
|
3
3
|
export { isSafeLinkHref } from '../markup/index.js';
|
|
4
4
|
export { FileIntakeAlert, FileIntakeLimits, FileIntakeOptions, FileRejection, FileRejectionReason, acceptsFile, useFileIntake } from '../file-intake/index.js';
|
package/dist/ui/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{APP_UPDATE_POLL_MS,Accordion,AlignmentGrid,AppUpdateBanner,AttachButton,AttachmentDropZone,AttachmentList,AuthScreen,Avatar,AvatarGroup,BORDER_WIDTHS,Banner,BoxPlotChart,BrandAssetEditor,BudgetBar,CHART_INK,COLUMN_COUNT_MAX,COLUMN_COUNT_WIDTHS,COLUMN_SHARES_EQUAL,COLUMN_SHARE_MIN,CONTROL_HEIGHTS,CORNERS,CORNERS_FOR_THEME,Calendar,CandlestickChart,Card,CartesianPlot,ChartBrush,ChartDefs,ChartDot,ChartFrame,ChartHighlightProvider,ChartSkeleton,ChartTooltip,ChatTemplate,Checkbox_default as Checkbox,CheckoutTemplate,ChordChart,ColorPicker,ColorPickerPanel,ColorSwatch,ColoredBadge,ColumnChart,ComposerAttachments,ContainerFillChart,ContextMenu,CornersInput,CountBadge,DAY_MS,DashboardTemplate,DataTable,DataTablePage,DatePicker_default as DatePicker,DateRangePicker,DateTimePicker_default as DateTimePicker,DescriptionList,DisplayChips,Divider,Drawer,DropdownMenu,ELEVATION_LEVELS,EmailTemplate,EmptyState,EmptyValue,ErrorBoundary,ErrorPage,FONT_WEIGHTS,FilePicker_default as FilePicker,FloatingBar,FormErrorSummary,FormField,FormLayoutPage,FunnelChart,GROUP_COLORS,GROUP_COLORS_SOLID,GalleryTemplate,Grid,HeatmapChart,HelpCenter,HexInput,HistogramChart,IconPicker,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,SplitButton_default as SplitButton,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_LINE_STYLES,BORDER_WIDTHS,Banner,BorderInput,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,IconPicker,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,SidesEachToggle,SidesInput,Skeleton,Slider,SliderGroup,Snippet,SortableList,Sparkline,SplitButton_default as SplitButton,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,borderSides,borderStartEach,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,sidesStartEach,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-PMDHTWBR.js";export{Breadcrumbs}from"../chunk-22EP5XS2.js";export{EditableGrid}from"../chunk-ZELMENOO.js";import"../chunk-BR22X7E5.js";import"../chunk-AHN2BTZR.js";export{INPUT_BASE,INPUT_SIZES,PLACEHOLDER_INK,inputClasses}from"../chunk-HJQAE6SP.js";export{ResizeHandle,SidebarLayout}from"../chunk-FBXOKW33.js";export{ENGLISH,SHELL_LANGUAGE_STORAGE_KEY,ShellLanguageProvider,matchShellLanguage,readSavedShellLanguage,resolveShellLanguage,saveShellLanguage,useShellLanguage}from"../chunk-PBZ2VHS3.js";export{BrandMark,GlobalSearch,IconButton_default as IconButton,openGlobalSearch,pushRecent as pushRecentSearch,resolveBrandMarkTreatment,sanitizeRecent as sanitizeRecentSearches}from"../chunk-7D6TZW44.js";export{ICON_NAMES,ICON_SET_FOR_THEME,THEME_ICON_SETS,iconSetFor,isIconName,loadIconSet}from"../chunk-FWEGDHFT.js";export{isSafeLinkHref}from"../chunk-PJPK2ADX.js";export{UNDOABLE_MS,toast_default as toast}from"../chunk-WSRZRWN7.js";export{VERSION}from"../chunk-7TD4XKYF.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-QDCMVFK5.js";import"../chunk-KNUR2UEG.js";export{ConfirmProvider,Dialog,confirm,confirmDestructive,prompt,useConfirm,useFocusTrap,useScrollLock}from"../chunk-BY3KWWWU.js";import"../chunk-5A7MWTXX.js";export{PopupMenu,PopupMenuDivider,PopupMenuItem,PopupMenuLabel,PopupSubmenu,leavesContextMenuAlone}from"../chunk-UNA3BQJI.js";import"../chunk-UVBK6YSR.js";export{Button_default as Button}from"../chunk-G5GERM76.js";export{MENU_MAX_HEIGHT,POPUP_MAX_WIDTH,Tooltip,popupBounds,useDropdownPosition}from"../chunk-3E27HV76.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-3G5TA3IF.js";export{FileIntakeAlert,acceptsFile,useFileIntake}from"../chunk-UAG5IEAY.js";export{DEFAULT_SHELL_STRINGS,ShellStringsProvider,useShellLocale,useShellStrings}from"../chunk-LVCRH3K6.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.43.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-UQVSH226.js";import{useWidgetSettings as n}from"./chunk-E4FJNJ2I.js";import"./chunk-F5BQTXGY.js";import"./chunk-OTFHGJSO.js";import"./chunk-KNUR2UEG.js";import"./chunk-TRNQNGYE.js";import"./chunk-DSSLOQDW.js";import"./chunk-5A7MWTXX.js";import"./chunk-VHHZHNJC.js";import"./chunk-UVBK6YSR.js";import"./chunk-G5GERM76.js";import"./chunk-3E27HV76.js";import"./chunk-7IQ3B77H.js";import"./chunk-FIEA5CGB.js";import"./chunk-K7PQXJO7.js";import"./chunk-D65T4H6J.js";import{Icon as r}from"./chunk-4755JEGD.js";import"./chunk-LVCRH3K6.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,w]=l(()=>e(h)),[S,T]=l(!1),[F,H]=l(E),J=c(null);n(i(()=>{H({...E}),T(!0)},[E]));const G=i(e=>{f(""),m(t=>N||"0"===t?(y(!1),"."===e?"0.":e):"."===e&&t.includes(".")?t:t+e)},[N]),B=i(()=>{m("0"),b(null),g(null),y(!1)},[]),O=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}},[]),Q=i(e=>{const t=parseFloat(d);if(null!==k&&p&&!N){const e=O(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,O]),R=i(()=>{if(null===k||!p)return;const e=parseFloat(d),t=O(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,O]),W=i(()=>{m(e=>String(parseFloat(e)/100))},[]),A=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"?G(e.key):"."===e.key?G("."):"+"===e.key?Q("+"):"-"===e.key?Q("-"):"*"===e.key?Q("×"):"/"===e.key?(e.preventDefault(),Q("÷")):"Enter"===e.key||"="===e.key?("Enter"===e.key&&e.target instanceof Node&&J.current?.contains(e.target)&&e.preventDefault(),R()):"Escape"===e.key?B():"Backspace"===e.key?m(e=>e.length>1?e.slice(0,-1):"0"):"%"===e.key&&W())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[G,Q,R,B,W]);const D="flex items-center justify-center rounded-lg text-sm font-medium transition-colors",I=`${D} bg-white border border-gray-200 text-gray-900 hover:bg-gray-50 active:bg-gray-100`,L=`${D} bg-blue-50 border border-blue-200 text-blue-700 hover:bg-blue-100 active:bg-blue-200`,U=`${D} bg-gray-100 border border-gray-200 text-gray-600 hover:bg-gray-200 active:bg-gray-300`,V=`${D} bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800`;/* @__PURE__ */
|
|
2
|
-
return o(s,{children:[
|
|
3
|
-
/* @__PURE__ */o("div",{ref:J,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:B,className:U,children:"AC"}),
|
|
11
|
-
/* @__PURE__ */u("button",{onClick:A,className:U,children:"+/−"}),
|
|
12
|
-
/* @__PURE__ */u("button",{onClick:W,className:U,children:"%"}),
|
|
13
|
-
/* @__PURE__ */u("button",{onClick:()=>Q("÷"),className:`${L} ${"÷"===p?"ring-2 ring-blue-400":""}`,children:"÷"}),
|
|
14
|
-
/* @__PURE__ */u("button",{onClick:()=>G("7"),className:I,children:"7"}),
|
|
15
|
-
/* @__PURE__ */u("button",{onClick:()=>G("8"),className:I,children:"8"}),
|
|
16
|
-
/* @__PURE__ */u("button",{onClick:()=>G("9"),className:I,children:"9"}),
|
|
17
|
-
/* @__PURE__ */u("button",{onClick:()=>Q("×"),className:`${L} ${"×"===p?"ring-2 ring-blue-400":""}`,children:"×"}),
|
|
18
|
-
/* @__PURE__ */u("button",{onClick:()=>G("4"),className:I,children:"4"}),
|
|
19
|
-
/* @__PURE__ */u("button",{onClick:()=>G("5"),className:I,children:"5"}),
|
|
20
|
-
/* @__PURE__ */u("button",{onClick:()=>G("6"),className:I,children:"6"}),
|
|
21
|
-
/* @__PURE__ */u("button",{onClick:()=>Q("-"),className:`${L} ${"-"===p?"ring-2 ring-blue-400":""}`,children:"−"}),
|
|
22
|
-
/* @__PURE__ */u("button",{onClick:()=>G("1"),className:I,children:"1"}),
|
|
23
|
-
/* @__PURE__ */u("button",{onClick:()=>G("2"),className:I,children:"2"}),
|
|
24
|
-
/* @__PURE__ */u("button",{onClick:()=>G("3"),className:I,children:"3"}),
|
|
25
|
-
/* @__PURE__ */u("button",{onClick:()=>Q("+"),className:`${L} ${"+"===p?"ring-2 ring-blue-400":""}`,children:"+"}),
|
|
26
|
-
/* @__PURE__ */u("button",{onClick:()=>G("0"),className:`${I} col-span-2`,children:"0"}),
|
|
27
|
-
/* @__PURE__ */u("button",{onClick:()=>G("."),className:I,children:"."}),
|
|
28
|
-
/* @__PURE__ */u("button",{onClick:R,className:V,children:"="})]})]}),
|
|
29
|
-
/* @__PURE__ */u(t,{open:S,onClose:()=>T(!1),title:"Calculator Settings",appearance:F,onAppearanceChange:H,onSave:()=>{w(F),localStorage.setItem(h,JSON.stringify(F)),T(!1)}})]})}export{d as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{ConfirmProvider,confirm,confirmDestructive,prompt,useConfirm}from"./chunk-TRNQNGYE.js";import"./chunk-UVBK6YSR.js";import"./chunk-FIEA5CGB.js";import"./chunk-K7PQXJO7.js";import"./chunk-4755JEGD.js";import"./chunk-LVCRH3K6.js";import"./chunk-C3QOHMR6.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{PdfViewer as default,fitScale,pdfWasmParams}from"./chunk-3K5JZXDC.js";import"./chunk-WSRZRWN7.js";import"./chunk-K7PQXJO7.js";import"./chunk-4755JEGD.js";import"./chunk-LVCRH3K6.js";import"./chunk-C3QOHMR6.js";import"./chunk-2J6F4EE7.js";
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import{loadAppearance as e,WidgetSettingsModal as t}from"./chunk-UQVSH226.js";import{subscribePomo as a,getPomoSnapshot as o,setPomoDurations as n,setPomoAlarm as r,setPomoAlarmConfig as s,setPomoBehaviour as l,setPomoFocusSound as i,useTodoTasks as c,migratePomodoroTasksOnce as d,pomoSwitchMode as u,pomoPause as m,pomoStart as h,ALARM_OPTIONS as p,playAlarm as g,FOCUS_SOUND_OPTIONS as f,previewFocusSound as b}from"./chunk-XKANXONN.js";import{PLACEHOLDER_INK as k}from"./chunk-HJQAE6SP.js";import"./chunk-WSRZRWN7.js";import{useWidgetSettings as x}from"./chunk-E4FJNJ2I.js";import"./chunk-F5BQTXGY.js";import{useShellPrefs as v}from"./chunk-OTFHGJSO.js";import"./chunk-KNUR2UEG.js";import"./chunk-TRNQNGYE.js";import"./chunk-DSSLOQDW.js";import"./chunk-5A7MWTXX.js";import"./chunk-VHHZHNJC.js";import"./chunk-UVBK6YSR.js";import"./chunk-G5GERM76.js";import"./chunk-3E27HV76.js";import"./chunk-7IQ3B77H.js";import"./chunk-FIEA5CGB.js";import"./chunk-K7PQXJO7.js";import"./chunk-D65T4H6J.js";import{Icon as y}from"./chunk-4755JEGD.js";import"./chunk-LVCRH3K6.js";import"./chunk-C3QOHMR6.js";import"./chunk-2J6F4EE7.js";import{useSyncExternalStore as N,useEffect as w,useMemo as C,useState as S,useRef as B,useCallback as j}from"react";import{jsxs as M,Fragment as T,jsx as P}from"react/jsx-runtime";var I="pomodoro_appearance",A="pomodoro_active_task_id",$={focus:"Pomodoro",short:"Short Break",long:"Long Break"},V={focus:"#0f172a",short:"#508a52",long:"#5b7898"};var D=25,E=5,L=15,R=!1,H=!1,_=4,F=!0,O=!0,W="bell",J=100,G=1,Q="none",K=50,U=(e,t,a,o)=>"number"==typeof e&&isFinite(e)?Math.max(t,Math.min(a,Math.round(e))):o;function X(){const t=N(a,o,o),{prefs:g,save:b}=v(),k=function(e){const t=e&&"object"==typeof e?e:{};return{focusMinutes:U(t.focusMinutes,1,120,D),shortBreakMinutes:U(t.shortBreakMinutes,1,120,E),longBreakMinutes:U(t.longBreakMinutes,1,120,L),autoStartBreaks:"boolean"==typeof t.autoStartBreaks?t.autoStartBreaks:R,autoStartPomodoros:"boolean"==typeof t.autoStartPomodoros?t.autoStartPomodoros:H,longBreakInterval:U(t.longBreakInterval,1,20,_),autoCheckTasks:"boolean"==typeof t.autoCheckTasks?t.autoCheckTasks:F,checkToBottom:"boolean"==typeof t.checkToBottom?t.checkToBottom:O,alarmSound:p.some(e=>e.id===t.alarmSound)?t.alarmSound:W,alarmVolume:U(t.alarmVolume,0,100,J),alarmRepeat:U(t.alarmRepeat,1,5,G),focusSound:f.some(e=>e.id===t.focusSound)?t.focusSound:Q,focusVolume:U(t.focusVolume,0,100,K)}}(g.pomodoro_settings);w(()=>{n({focus:60*k.focusMinutes,short:60*k.shortBreakMinutes,long:60*k.longBreakMinutes})},[k.focusMinutes,k.shortBreakMinutes,k.longBreakMinutes]),w(()=>{r(k.alarmSound),s(k.alarmVolume,k.alarmRepeat)},[k.alarmSound,k.alarmVolume,k.alarmRepeat]),w(()=>{l({autoStartBreaks:k.autoStartBreaks,autoStartPomodoros:k.autoStartPomodoros,longBreakInterval:k.longBreakInterval})},[k.autoStartBreaks,k.autoStartPomodoros,k.longBreakInterval]),w(()=>{i(k.focusSound,k.focusVolume)},[k.focusSound,k.focusVolume]),w(()=>{if("undefined"!=typeof Notification&&"default"===Notification.permission)try{Notification.requestPermission()}catch{}},[]);const X=c(),Y=X.tasks,Z=C(()=>/* @__PURE__ */(new Date).toISOString().slice(0,10),[]),q=function(e,t){return C(()=>t?(e=>{const t=[],a=[];for(const o of e)(o.done?a:t).push(o);return[...t,...a]})(e):e,[e,t])}(C(()=>Y.filter(e=>!!e.dueDate&&(e.dueDate===Z||e.dueDate<Z&&!e.done)),[Y,Z]),k.checkToBottom),[ee,te]=S(()=>localStorage.getItem(A)),[ae,oe]=S(!1),[ne,re]=S(null),se=B(!1);w(()=>{se.current||(se.current=!0,d(Y,X.setAllTasks))},[]),w(()=>{try{ee?localStorage.setItem(A,ee):localStorage.removeItem(A)}catch{}},[ee]),w(()=>{if(!ne)return;const e=()=>re(null),t=setTimeout(()=>document.addEventListener("click",e),0);return()=>{clearTimeout(t),document.removeEventListener("click",e)}},[ne]);const le=B(t.streak);w(()=>{if(t.streak>le.current&&ee){const e=Y.find(e=>e.id===ee);if(e){const t=(e.completed??0)+1,a=e.estimated??0,o=k.autoCheckTasks&&a>0&&t>=a;X.updateTask(ee,{completed:t,done:e.done||o})}}le.current=t.streak},[t.streak,ee,k.autoCheckTasks,Y,X]);const ce=q.reduce((e,t)=>e+(t.completed??0),0),de=q.reduce((e,t)=>e+Math.max(t.estimated??0,t.completed??0),0),ue=q.reduce((e,t)=>t.done?e:e+Math.max(0,(t.estimated??0)-(t.completed??0)),0),me=t.running&&"focus"===t.mode?t.remaining:0,he=ue*k.focusMinutes*60+me,pe=new Date(Date.now()+1e3*he).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",hour12:!1}),ge=(he/3600).toFixed(1),fe=ee?Y.find(e=>e.id===ee)??null:null,be=String(Math.floor(t.remaining/60)).padStart(2,"0"),ke=String(t.remaining%60).padStart(2,"0"),[xe,ve]=S(()=>e(I)),[ye,Ne]=S(!1),[we,Ce]=S(xe),[Se,Be]=S(k);x(j(()=>{Ce({...xe}),Be({...k}),Ne(!0)},[xe,k]));const je="focus"!==t.mode,Me=V[t.mode],Te=je?(Pe=Me,Ie=xe.activeOpacity/100,`rgba(${parseInt(Pe.slice(1,3),16)}, ${parseInt(Pe.slice(3,5),16)}, ${parseInt(Pe.slice(5,7),16)}, ${Ie})`):`rgb(var(--taskbar-bg-rgb, 243 244 246) / ${xe.activeOpacity/100})`;var Pe,Ie;const Ae={primary:je?"text-white":"text-gray-900",secondary:je?"text-white/85":"text-gray-700",muted:je?"text-white/65":"text-gray-500",tabActive:je?"bg-white/15 text-white":"bg-gray-200 text-gray-900",tabInactive:je?"text-white/75 hover:bg-white/10":"text-gray-500 hover:bg-gray-200",divider:je?"border-white/30":"border-gray-200",softDivider:je?"border-white/20":"border-gray-200",iconBtn:je?"bg-black/15 hover:bg-black/25 text-white/85":"bg-gray-200 hover:bg-gray-300 text-gray-600",addTaskBtn:je?"border-white/45 text-white/90 hover:bg-white/[0.06]":"border-gray-300 text-gray-500 hover:bg-gray-200/50"},$e=je?Me:"#0f172a";/* @__PURE__ */
|
|
2
|
-
return M(T,{children:[
|
|
3
|
-
/* @__PURE__ */M("div",{className:`flex flex-col h-full select-none transition-colors duration-300 ${Ae.primary}`,style:{backgroundColor:Te,backdropFilter:xe.activeBlur>0?`blur(${xe.activeBlur}px)`:void 0},children:[
|
|
4
|
-
/* @__PURE__ */P("div",{className:"px-3 pt-3 flex justify-center gap-2",children:["focus","short","long"].map(e=>/* @__PURE__ */P("button",{onClick:()=>u(e),className:`px-3 py-1 text-sm font-bold rounded transition-colors ${t.mode===e?Ae.tabActive:Ae.tabInactive}`,children:$[e]},e))}),
|
|
5
|
-
/* @__PURE__ */M("div",{className:"text-center font-bold tabular-nums leading-none tracking-tight mt-3",style:{fontSize:"4.5rem"},children:[be,":",ke]}),
|
|
6
|
-
/* @__PURE__ */P("div",{className:"flex justify-center mt-3 mb-2",children:/* @__PURE__ */P("button",{onClick:()=>t.running?m():h(),className:"bg-white px-12 py-3 rounded-md font-bold text-base shadow-[0_4px_0_rgba(0,0,0,0.12)] hover:shadow-[0_3px_0_rgba(0,0,0,0.12)] active:translate-y-1 active:shadow-none transition-all",style:{color:$e,letterSpacing:"0.08em"},children:t.running?"PAUSE":"START"})}),
|
|
7
|
-
/* @__PURE__ */P("div",{className:"px-3 py-3 text-center",children:fe?/* @__PURE__ */M(T,{children:[
|
|
8
|
-
/* @__PURE__ */M("div",{className:`text-xs leading-tight ${Ae.muted}`,children:["#",(fe.completed??0)+1]}),
|
|
9
|
-
/* @__PURE__ */P("div",{className:`text-base font-medium leading-tight truncate mt-0.5 ${Ae.primary}`,children:fe.name})]}):/* @__PURE__ */P("div",{className:`text-xs italic ${Ae.muted}`,children:"No task selected"})}),
|
|
10
|
-
/* @__PURE__ */M("div",{className:"px-3 mt-1 flex items-center justify-between",children:[
|
|
11
|
-
/* @__PURE__ */P("h3",{className:`text-base font-bold tracking-tight ${Ae.primary}`,children:"Tasks"}),
|
|
12
|
-
/* @__PURE__ */P("button",{className:`rounded p-1 transition-colors ${Ae.iconBtn}`,"aria-label":"Tasks menu",tabIndex:-1,children:/* @__PURE__ */P(y,{name:"more-vertical",look:"solid",className:"h-4 w-4"})})]}),
|
|
13
|
-
/* @__PURE__ */P("div",{className:`border-t mx-3 mt-2 ${Ae.divider}`}),
|
|
14
|
-
/* @__PURE__ */M("div",{className:"flex-1 px-3 py-3 space-y-2 overflow-y-auto",children:[q.map(e=>{const t=e.id===ee;/* @__PURE__ */
|
|
15
|
-
return M("div",{onClick:()=>te(e.id),className:"bg-white text-gray-800 rounded-md flex items-center pr-2 py-3 shadow-sm cursor-pointer transition-shadow hover:shadow-(--elevation-panel) "+(t?"border-l-4 border-gray-700 pl-2":"pl-3 border-l-4 border-transparent"),children:[
|
|
16
|
-
/* @__PURE__ */P("button",{onClick:t=>{var a;t.stopPropagation(),a=e.id,X.toggleDone(a)},className:"shrink-0",children:e.done?/* @__PURE__ */P("svg",{className:"h-5 w-5",fill:"currentColor",viewBox:"0 0 20 20",style:{color:$e},children:/* @__PURE__ */P("path",{d:"M10 0a10 10 0 100 20 10 10 0 000-20zm-1 14.5l-4.5-4.5 1.4-1.4 3.1 3.1 6.1-6.1 1.4 1.4z"})}):/* @__PURE__ */P("svg",{className:"h-5 w-5 text-gray-300",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:/* @__PURE__ */P("circle",{cx:"12",cy:"12",r:"10"})})}),
|
|
17
|
-
/* @__PURE__ */P("span",{className:"ml-3 flex-1 font-semibold truncate "+(e.done?"line-through text-gray-400":"text-gray-800"),children:e.name}),
|
|
18
|
-
/* @__PURE__ */M("span",{className:"text-sm tabular-nums mr-2 shrink-0",children:[
|
|
19
|
-
/* @__PURE__ */P("span",{className:"font-bold text-gray-500",children:e.completed??0}),
|
|
20
|
-
/* @__PURE__ */P("span",{className:"text-gray-400",children:" / "}),
|
|
21
|
-
/* @__PURE__ */P("span",{className:"text-gray-400",children:e.estimated??"–"})]}),
|
|
22
|
-
/* @__PURE__ */M("div",{className:"relative",children:[
|
|
23
|
-
/* @__PURE__ */P("button",{onClick:t=>{t.stopPropagation(),re(ne===e.id?null:e.id)},className:"rounded p-1 bg-gray-100 hover:bg-gray-200",children:/* @__PURE__ */P(y,{name:"more-vertical",look:"solid",className:"h-4 w-4 text-gray-500"})}),ne===e.id&&/* @__PURE__ */P("div",{className:"absolute right-0 top-full mt-1 bg-white text-gray-800 rounded shadow-lg border border-gray-200 z-10 min-w-[110px] overflow-hidden",onClick:e=>e.stopPropagation(),children:/* @__PURE__ */P("button",{onClick:t=>{var a;t.stopPropagation(),a=e.id,X.removeTask(a),ee===a&&te(null),re(null)},className:"block w-full px-3 h-8 text-sm text-left hover:bg-red-50 text-red-600",children:"Delete"})})]})]},e.id)}),ae?/* @__PURE__ */P(ie,{onSubmit:(e,t)=>{const a=e.trim();if(!a)return;const o=X.addTask({name:a,estimated:t,completed:0,dueDate:Z});ee||te(o),oe(!1)},onCancel:()=>oe(!1),accentColor:$e}):/* @__PURE__ */M("button",{onClick:()=>oe(!0),className:`w-full border-2 border-dashed rounded-md py-3 font-semibold flex items-center justify-center gap-2 transition-colors ${Ae.addTaskBtn}`,children:[
|
|
24
|
-
/* @__PURE__ */P(y,{name:"add-circle",className:"h-5 w-5",strokeWidth:2}),"Add Task"]})]}),
|
|
25
|
-
/* @__PURE__ */M("div",{className:`border-t px-3 py-3 flex items-center justify-center gap-5 text-sm ${Ae.softDivider}`,children:[
|
|
26
|
-
/* @__PURE__ */M("span",{className:Ae.secondary,children:["Pomos: ",
|
|
27
|
-
/* @__PURE__ */P("span",{className:`font-bold ${Ae.primary}`,children:ce}),
|
|
28
|
-
/* @__PURE__ */P("span",{className:Ae.muted,children:" / "}),
|
|
29
|
-
/* @__PURE__ */P("span",{className:`font-bold ${Ae.primary}`,children:de})]}),he>0&&/* @__PURE__ */M("span",{className:Ae.secondary,children:["Finish At: ",
|
|
30
|
-
/* @__PURE__ */P("span",{className:`font-bold ${Ae.primary}`,children:pe}),
|
|
31
|
-
/* @__PURE__ */M("span",{className:Ae.muted,children:[" (",ge,"h)"]})]})]})]}),
|
|
32
|
-
/* @__PURE__ */P(z,{open:ye,onClose:()=>Ne(!1),onSave:()=>{ve(we),localStorage.setItem(I,JSON.stringify(we)),b({pomodoro_settings:Se}),Ne(!1)},configAppearance:we,setConfigAppearance:Ce,configPrefs:Se,setConfigPrefs:Be})]})}function z({open:e,onClose:a,onSave:o,configAppearance:n,setConfigAppearance:r,configPrefs:s,setConfigPrefs:l}){const i=(e,t)=>l(a=>({...a,[e]:t}));/* @__PURE__ */
|
|
33
|
-
return M(t,{open:e,onClose:a,title:"Pomodoro Settings",appearance:n,onAppearanceChange:r,onSave:o,children:[
|
|
34
|
-
/* @__PURE__ */M(Y,{icon:/* @__PURE__ */P(re,{}),label:"TIMER",children:[
|
|
35
|
-
/* @__PURE__ */M("div",{children:[
|
|
36
|
-
/* @__PURE__ */P("p",{className:"text-sm font-bold text-gray-800 mb-2",children:"Time (minutes)"}),
|
|
37
|
-
/* @__PURE__ */M("div",{className:"grid grid-cols-3 gap-3",children:[
|
|
38
|
-
/* @__PURE__ */P(ee,{label:"Pomodoro",value:s.focusMinutes,onChange:e=>i("focusMinutes",e),max:120}),
|
|
39
|
-
/* @__PURE__ */P(ee,{label:"Short Break",value:s.shortBreakMinutes,onChange:e=>i("shortBreakMinutes",e),max:120}),
|
|
40
|
-
/* @__PURE__ */P(ee,{label:"Long Break",value:s.longBreakMinutes,onChange:e=>i("longBreakMinutes",e),max:120})]})]}),
|
|
41
|
-
/* @__PURE__ */P(Z,{label:"Auto Start Breaks",children:/* @__PURE__ */P(oe,{checked:s.autoStartBreaks,onChange:e=>i("autoStartBreaks",e)})}),
|
|
42
|
-
/* @__PURE__ */P(Z,{label:"Auto Start Pomodoros",children:/* @__PURE__ */P(oe,{checked:s.autoStartPomodoros,onChange:e=>i("autoStartPomodoros",e)})}),
|
|
43
|
-
/* @__PURE__ */P(Z,{label:"Long Break interval",children:/* @__PURE__ */P(te,{value:s.longBreakInterval,onChange:e=>i("longBreakInterval",e),min:1,max:20,className:"w-14 text-center"})})]}),
|
|
44
|
-
/* @__PURE__ */M(Y,{icon:/* @__PURE__ */P(se,{}),label:"TASK",children:[
|
|
45
|
-
/* @__PURE__ */P(Z,{label:"Auto Check Tasks",info:'If you enable "Auto Check Tasks", the active task will be automatically checked when the actual pomodoro count reaches the estimated count.',children:/* @__PURE__ */P(oe,{checked:s.autoCheckTasks,onChange:e=>i("autoCheckTasks",e)})}),
|
|
46
|
-
/* @__PURE__ */P(Z,{label:"Check to Bottom",info:'If you enable "Check to Bottom", the checked task will be automatically moved to the bottom of the task list.',children:/* @__PURE__ */P(oe,{checked:s.checkToBottom,onChange:e=>i("checkToBottom",e)})})]}),
|
|
47
|
-
/* @__PURE__ */M(Y,{icon:/* @__PURE__ */P(le,{}),label:"SOUND",children:[
|
|
48
|
-
/* @__PURE__ */P(Z,{label:"Alarm Sound",children:/* @__PURE__ */M("div",{className:"flex items-center gap-2",children:[
|
|
49
|
-
/* @__PURE__ */P(ae,{value:s.alarmSound,onChange:e=>i("alarmSound",e),options:p.map(e=>({id:e.id,label:e.label}))}),"off"!==s.alarmSound&&/* @__PURE__ */P("button",{type:"button",onClick:()=>g(s.alarmSound,{volume:s.alarmVolume,repeat:1}),className:"px-2 py-1 text-2xs rounded border border-gray-300 text-gray-600 hover:bg-gray-100",children:"Play"})]})}),
|
|
50
|
-
/* @__PURE__ */P(q,{value:s.alarmVolume,onChange:e=>i("alarmVolume",e)}),
|
|
51
|
-
/* @__PURE__ */P(Z,{label:"repeat",children:/* @__PURE__ */P(te,{value:s.alarmRepeat,onChange:e=>i("alarmRepeat",e),min:1,max:5,className:"w-14 text-center"})}),
|
|
52
|
-
/* @__PURE__ */P(Z,{label:"Focus Sound",children:/* @__PURE__ */M("div",{className:"flex items-center gap-2",children:[
|
|
53
|
-
/* @__PURE__ */P(ae,{value:s.focusSound,onChange:e=>i("focusSound",e),options:f}),"none"!==s.focusSound&&/* @__PURE__ */P("button",{type:"button",onClick:()=>b(s.focusSound,s.focusVolume),className:"px-2 py-1 text-2xs rounded border border-gray-300 text-gray-600 hover:bg-gray-100",children:"Play"})]})}),
|
|
54
|
-
/* @__PURE__ */P(q,{value:s.focusVolume,onChange:e=>i("focusVolume",e)})]})]})}function Y({icon:e,label:t,children:a}){/* @__PURE__ */
|
|
55
|
-
return M("div",{className:"border-t border-gray-200 pt-3 first:border-0 first:pt-0",children:[
|
|
56
|
-
/* @__PURE__ */M("div",{className:"flex items-center gap-2 mb-3 text-gray-400",children:[e,
|
|
57
|
-
/* @__PURE__ */P("span",{className:"text-xs font-bold tracking-[0.15em]",children:t})]}),
|
|
58
|
-
/* @__PURE__ */P("div",{className:"space-y-3",children:a})]})}function Z({label:e,info:t,children:a}){/* @__PURE__ */
|
|
59
|
-
return M("div",{className:"flex items-center justify-between gap-3",children:[
|
|
60
|
-
/* @__PURE__ */M("div",{className:"flex items-center gap-2 min-w-0",children:[
|
|
61
|
-
/* @__PURE__ */P("span",{className:"text-sm font-semibold text-gray-800",children:e}),t&&/* @__PURE__ */P(ne,{title:t})]}),
|
|
62
|
-
/* @__PURE__ */P("div",{className:"shrink-0",children:a})]})}function q({value:e,onChange:t}){/* @__PURE__ */
|
|
63
|
-
return M("div",{className:"flex items-center justify-end gap-3",children:[
|
|
64
|
-
/* @__PURE__ */P("span",{className:"text-xs text-gray-400 w-7 text-right tabular-nums",children:e}),
|
|
65
|
-
/* @__PURE__ */P("input",{type:"range",min:0,max:100,value:e,onChange:e=>t(parseInt(e.target.value,10)),className:"w-40 accent-blue-500"})]})}function ee({label:e,value:t,onChange:a,min:o=1,max:n=99}){/* @__PURE__ */
|
|
66
|
-
return M("label",{className:"flex flex-col",children:[
|
|
67
|
-
/* @__PURE__ */P("span",{className:"text-xs font-semibold text-gray-500 mb-1",children:e}),
|
|
68
|
-
/* @__PURE__ */P(te,{value:t,onChange:a,min:o,max:n})]})}function te({value:e,onChange:t,min:a=1,max:o=99,className:n=""}){/* @__PURE__ */
|
|
69
|
-
return P("input",{type:"number",min:a,max:o,value:e,onChange:e=>t(Math.max(a,Math.min(o,parseInt(e.target.value,10)||a))),className:`bg-gray-100 border-0 rounded-md px-2 h-8 text-sm font-medium text-gray-800 focus:outline-none focus:ring-2 focus:ring-blue-500 w-full ${n}`})}function ae({value:e,onChange:t,options:a}){/* @__PURE__ */
|
|
70
|
-
return M("div",{className:"relative",children:[
|
|
71
|
-
/* @__PURE__ */P("select",{value:e,onChange:e=>t(e.target.value),className:"appearance-none bg-gray-100 border-0 rounded-md pl-3 pr-8 h-8 text-sm font-medium text-gray-800 focus:outline-none focus:ring-2 focus:ring-blue-500 cursor-pointer",children:a.map(e=>/* @__PURE__ */P("option",{value:e.id,children:e.label},e.id))}),
|
|
72
|
-
/* @__PURE__ */P(y,{name:"chevron-down",className:`absolute right-2 top-1/2 -translate-y-1/2 h-3.5 w-3.5 pointer-events-none ${k}`,strokeWidth:2.5})]})}function oe({checked:e,onChange:t}){/* @__PURE__ */
|
|
73
|
-
return P("button",{type:"button",role:"switch","aria-checked":e,onClick:()=>t(!e),className:"relative inline-flex h-6 w-11 items-center rounded-full transition-colors "+(e?"bg-emerald-500":"bg-gray-300"),children:/* @__PURE__ */P("span",{className:"absolute h-5 w-5 rounded-full bg-white shadow transition-transform "+(e?"translate-x-[22px]":"translate-x-0.5")})})}function ne({title:e}){/* @__PURE__ */
|
|
74
|
-
return P("span",{title:e,className:"inline-flex items-center justify-center w-4 h-4 rounded-full bg-gray-300 text-white text-3xs font-bold cursor-help",children:"i"})}function re(){/* @__PURE__ */
|
|
75
|
-
return M("svg",{className:"h-3.5 w-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,children:[
|
|
76
|
-
/* @__PURE__ */P("circle",{cx:"12",cy:"12",r:"9"}),
|
|
77
|
-
/* @__PURE__ */P("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 7v5l3 2"})]})}function se(){/* @__PURE__ */
|
|
78
|
-
return M("svg",{className:"h-3.5 w-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,children:[
|
|
79
|
-
/* @__PURE__ */P("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2"}),
|
|
80
|
-
/* @__PURE__ */P("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12l2 2 4-4"})]})}function le(){/* @__PURE__ */
|
|
81
|
-
return M("svg",{className:"h-3.5 w-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,children:[
|
|
82
|
-
/* @__PURE__ */P("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11 5L6 9H2v6h4l5 4V5z"}),
|
|
83
|
-
/* @__PURE__ */P("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.5 8.5a5 5 0 010 7M19 5a9 9 0 010 14"})]})}function ie({onSubmit:e,onCancel:t,accentColor:a}){const[o,n]=S(""),[r,s]=S(1),l=()=>e(o,r);/* @__PURE__ */
|
|
84
|
-
return M("div",{className:"bg-white text-gray-800 rounded-md p-3 shadow-(--elevation-panel)",children:[
|
|
85
|
-
/* @__PURE__ */P("input",{autoFocus:!0,value:o,onChange:e=>n(e.target.value),placeholder:"What are you working on?",onKeyDown:e=>{"Enter"===e.key&&l(),"Escape"===e.key&&t()},className:"w-full text-base font-medium bg-transparent border-0 outline-none placeholder-gray-400"}),
|
|
86
|
-
/* @__PURE__ */M("div",{className:"flex items-center justify-between mt-2",children:[
|
|
87
|
-
/* @__PURE__ */P("span",{className:"text-xs font-semibold text-gray-500",children:"Est Pomodoros"}),
|
|
88
|
-
/* @__PURE__ */P("input",{type:"number",min:1,max:20,value:r,onChange:e=>s(Math.max(1,Math.min(20,parseInt(e.target.value,10)||1))),className:"w-16 bg-gray-100 rounded px-2 py-1 text-sm text-right border-0 focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),
|
|
89
|
-
/* @__PURE__ */M("div",{className:"flex gap-2 mt-3 justify-end",children:[
|
|
90
|
-
/* @__PURE__ */P("button",{onClick:t,className:"px-3 py-1 text-sm text-gray-500 hover:bg-gray-100 rounded",children:"Cancel"}),
|
|
91
|
-
/* @__PURE__ */P("button",{onClick:l,className:"px-4 py-1 text-sm font-semibold text-white rounded shadow-sm",style:{backgroundColor:a},children:"Save"})]})]})}export{X as default};
|