efficient-shell 12.23.0 → 12.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/README.md +1 -1
  2. package/dist/{Browser-G3NJJDFN.js → Browser-XIJNQPN5.js} +16 -16
  3. package/dist/Calculator-LSDVIJVQ.js +29 -0
  4. package/dist/CurrencyConverter-G5IYUCN7.js +21 -0
  5. package/dist/Files-3USUXZM2.js +141 -0
  6. package/dist/Notepad-MXANPUG3.js +24 -0
  7. package/dist/PomodoroTimer-SFTPXEDV.js +91 -0
  8. package/dist/{Preview-DRNDT6WX.js → Preview-UVQVZYR7.js} +18 -18
  9. package/dist/{Stock-JY3PJI2M.js → Stock-YCPMLYPR.js} +3 -3
  10. package/dist/{Weather-POQXLYFA.js → Weather-TLFNIPDG.js} +13 -13
  11. package/dist/{WorldClock-FUJOPJ5G.js → WorldClock-66IRFS2W.js} +6 -6
  12. package/dist/ai/index.d.ts +15 -4
  13. package/dist/ai/index.js +115 -111
  14. package/dist/ai.css +1 -1
  15. package/dist/apps/index.js +1 -1
  16. package/dist/bin/media-host-check.js +1 -1
  17. package/dist/bin/ui-check.js +1 -1
  18. package/dist/brand.css +1 -1
  19. package/dist/{chunk-F4XGUOVL.js → chunk-4BKJ6A5H.js} +4 -4
  20. package/dist/{chunk-RKXCB5ZJ.js → chunk-7MJYT6IW.js} +1 -1
  21. package/dist/chunk-7NYCPO54.js +1 -0
  22. package/dist/{chunk-QJWQ6OMF.js → chunk-AQCUGTOR.js} +6 -6
  23. package/dist/{chunk-T2OSPUS6.js → chunk-BZHP645G.js} +3 -3
  24. package/dist/{chunk-OGWQABFP.js → chunk-CALBDO7B.js} +1 -1
  25. package/dist/chunk-EC3P3W7Z.js +28 -0
  26. package/dist/chunk-EIFNESXS.js +1 -0
  27. package/dist/{chunk-2NZ7CVMW.js → chunk-GBTL3G36.js} +14 -14
  28. package/dist/{chunk-ZLKEPDJE.js → chunk-H6WXTJOT.js} +1 -1
  29. package/dist/{chunk-ZNLCITYY.js → chunk-JVOH7776.js} +2 -2
  30. package/dist/chunk-KZRZYLN7.js +99 -0
  31. package/dist/chunk-LDVDNAXP.js +4 -0
  32. package/dist/{chunk-MFSDS6CN.js → chunk-NPTF6MP4.js} +1 -1
  33. package/dist/{chunk-WLX24TG6.js → chunk-TUPPFC74.js} +4 -4
  34. package/dist/{chunk-HOEHV2J5.js → chunk-WVMCKM5Z.js} +1 -1
  35. package/dist/format/index.js +1 -1
  36. package/dist/forms/BrandAssetEditor.js +1 -1
  37. package/dist/forms/LinkPicker.js +1 -1
  38. package/dist/forms/MediaLibrary.d.ts +4 -3
  39. package/dist/forms/MediaLibrary.js +1 -1
  40. package/dist/forms/MediaUploadField.js +1 -1
  41. package/dist/icons/index.js +1 -1
  42. package/dist/index.js +98 -98
  43. package/dist/shell/Avatar.d.ts +3 -1
  44. package/dist/shell/Avatar.js +1 -1
  45. package/dist/shell/Dialog.d.ts +5 -0
  46. package/dist/shell/LanguageSelect.js +1 -1
  47. package/dist/shell/SettingRow.js +1 -1
  48. package/dist/telemetry/index.js +1 -1
  49. package/dist/templates/ChatTemplate.js +1 -1
  50. package/dist/templates/DashboardTemplate.js +1 -1
  51. package/dist/templates/EmailTemplate.js +1 -1
  52. package/dist/ui/index.js +1 -1
  53. package/dist/version.js +1 -1
  54. package/package.json +1 -1
  55. package/dist/Calculator-OUPD7SZV.js +0 -29
  56. package/dist/CurrencyConverter-CNGYEKE3.js +0 -21
  57. package/dist/Files-A5MD7QNE.js +0 -141
  58. package/dist/Notepad-CUWBPETD.js +0 -24
  59. package/dist/PomodoroTimer-I53C5QYM.js +0 -91
  60. package/dist/chunk-EEGTFJUQ.js +0 -28
  61. package/dist/chunk-MDVABA4H.js +0 -1
  62. package/dist/chunk-WESNFWM4.js +0 -4
  63. package/dist/chunk-XQNZJNEJ.js +0 -99
@@ -0,0 +1,99 @@
1
+ import{computeMaximizedBox as e,isSidebarStripReserved as t,boxFillsWorkArea as n,readAlwaysMaximizedFlag as r,WORK_AREA_CHANGED_EVENT as o,scrollerIsFluid as i,growBoxToWidth as a,widthToFit as s,navIcons as l}from"./chunk-4LXCCZDM.js";import{ROW_HEIGHTS as c}from"./chunk-AW7TOB6N.js";import{reportBoundaryError as u}from"./chunk-KNUR2UEG.js";import{isStaleChunkError as d}from"./chunk-JDCM2VHG.js";import{Result as h}from"./chunk-DK5SXOXJ.js";import{CMD_Z as m,CMD_SHIFT_Z as p}from"./chunk-ZDMZM7HD.js";import{CopyButton as f}from"./chunk-UR2ECNBB.js";import{confirm as w}from"./chunk-HMT3MES3.js";import{useModalDragAside as y}from"./chunk-EIFNESXS.js";import{ItemCount as g}from"./chunk-MWTCGJAI.js";import{isInOverlayOver as v}from"./chunk-RIG5FEVS.js";import{dialogA11y as b}from"./chunk-VWGWZY7A.js";import{ColoredBadge as x}from"./chunk-CJHYOHMU.js";import{LoadingSpinner as k}from"./chunk-JZBLOIL7.js";import{activationOrder as E,activeListeners as C,ModalActionsContext as M,subscribeActive as N,getActiveModalId as S,KEY_ACTIVATED_SELECTOR as L}from"./chunk-F3ZOO23R.js";import{useShellAuth as T}from"./chunk-2QY5BJLA.js";import{useIsMobile as z,useIsPhone as A}from"./chunk-UGTRSRIW.js";import{useShellPrefs as D}from"./chunk-KC3EX26K.js";import{focusableIn as I}from"./chunk-DWGYC7OD.js";import{StatusBadge as P}from"./chunk-JMGDGNM7.js";import{PopupMenu as R,PopupMenuItem as W,PopupMenuDivider as K,PopupMenuLabel as O}from"./chunk-THLXDI76.js";import{Button_default as $}from"./chunk-EVYD6UFQ.js";import{Icon as j}from"./chunk-XZXFUZIK.js";import{LoadingSpinner as F}from"./chunk-R2VKEMZH.js";import{Z_LAYERS as q}from"./chunk-62LW225J.js";import{shellHttp as H,isShellHttpConfigured as B}from"./chunk-STKJA4PV.js";import{runEscapeInterceptors as U}from"./chunk-TWVUQUUD.js";import{useShellStrings as Y}from"./chunk-JSHMIMAJ.js";import{createContext as X,createElement as V,useContext as J,Component as G,useLayoutEffect as _,useRef as Z,useEffect as Q,useState as ee,useSyncExternalStore as te,useCallback as ne,isValidElement as re,Fragment as oe,Children as ie,cloneElement as ae,useMemo as se,useId as le,useReducer as ce,Suspense as ue}from"react";import{jsxs as de,jsx as he,Fragment as me}from"react/jsx-runtime";import{createPortal as pe}from"react-dom";import{useLocation as fe}from"react-router-dom";import{useQueryClient as we,useQuery as ye}from"@tanstack/react-query";function ge(e){return"component"in e}function ve(e){return"endpoint"in e}var be={};function xe(e){be=e}var ke=new Proxy({},{get:(e,t)=>be[t],has:(e,t)=>t in be,ownKeys:()=>Object.keys(be),getOwnPropertyDescriptor(e,t){if(t in be)return{configurable:!0,enumerable:!0,value:be[t]}}});function Ee(){return B()}var Ce=H,Me=X({});function Ne({value:e,children:t}){return V(Me.Provider,{value:e},t)}function Se(){return J(Me)}var Le=X(null);function Te(){return J(Le)?.pageSearch??""}var ze=null,Ae=/* @__PURE__ */new Set;function De(e){ze!==e&&(ze=e,Ae.forEach(e=>e()))}function Ie(){return ze}function Pe(e){return Ae.add(e),()=>{Ae.delete(e)}}var Re=null;function We(e){Re=e}function Ke({error:e,onReload:t}){const n=d(e);/* @__PURE__ */
2
+ return de("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 px-6 py-12 text-center",children:[
3
+ /* @__PURE__ */he(j,{name:"warning",className:"h-8 w-8 text-amber-500",strokeWidth:1.5}),
4
+ /* @__PURE__ */de("div",{className:"min-w-0",children:[
5
+ /* @__PURE__ */he("p",{className:"text-sm font-medium text-gray-700",children:n?"This window needs the latest version of the app":"This window crashed"}),
6
+ /* @__PURE__ */he("p",{className:"mt-1 text-xs text-gray-400 max-w-sm break-words",children:n?"A new version was deployed while this tab was open. Reload the page to pick it up.":e.message||String(e)})]}),
7
+ /* @__PURE__ */he("button",{type:"button",onClick:n?()=>window.location.reload():t,className:"bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 text-sm font-medium rounded-lg",children:n?"Reload page":"Reload window"})]})}var Oe=class extends G{state={error:null};static getDerivedStateFromError(e){return{error:e instanceof Error?e:new Error(String(e))}}componentDidCatch(e,t){console.error("[efficient-shell] window content crashed:",e,t.componentStack),u(e)}reset=()=>this.setState({error:null});render(){const{error:e}=this.state;return e?this.props.fallback?this.props.fallback(e,this.reset):/* @__PURE__ */he(Ke,{error:e,onReload:this.reset}):this.props.children}},$e=X(null),je="text-xs text-gray-500 hover:text-gray-700 disabled:opacity-40 disabled:hover:text-gray-500 disabled:cursor-default";function Fe({className:e="",auto:t=!1}){const n=J($e),r=Y().undo,o=n?.claimOwnMount;if(_(()=>{if(!t&&o)return o(!0),()=>o(!1)},[t,o]),!n||!n.enabled)return null;const{undo:i,redo:a,canUndo:s,canRedo:l,undoLabel:c,redoLabel:u}=n;/* @__PURE__ */
8
+ return de("div",{className:`flex items-center gap-2 ${e}`,"data-undo-controls":t?"shell":"form",children:[
9
+ /* @__PURE__ */he("button",{type:"button",onClick:i,disabled:!s,title:s?r.undoStep(c??"",m):r.nothingToUndo,className:je,children:r.undo}),
10
+ /* @__PURE__ */he("button",{type:"button",onClick:a,disabled:!l,title:l?r.redoStep(u??"",p):r.nothingToRedo,className:je,children:r.redo})]})}var qe=/* @__PURE__ */new Set([408,429]);function He(e){const t=e?.response?.status;return"number"==typeof t?t:void 0}function Be(e){const t=He(e);return null!=t&&(t>=400&&t<500&&!qe.has(t))}function Ue(e,t){return!Be(t)&&e<3}function Ye(e){if("page"!==e.type)return!0;const t=e.route?ke[e.route]:void 0;if(!t||!ge(t))return!0;const n=t;return!n.widget&&!n.utility}function Xe(e){const t=e.route?ke[e.route]:void 0;if(!t||!ge(t))return;const n=t;return n.taskbarGroup?n.taskbarGroup:{key:e.route,label:n.label,icon:e.route}}var Ve=(e,t)=>!!t&&"page"===e.type&&e.route===t;var Je="flex-1 min-h-0";function Ge(){const e=Y().record;/* @__PURE__ */
11
+ return he(F,{label:e.loading,padding:"",className:Je})}function _e(e){return e??void 0}function Ze({isPending:e,isFetching:t,enabled:n=!0,error:r,onRetry:o}){const i=Y().record;if(t||e&&n)/* @__PURE__ */return he(Ge,{});if(r){const e=He(r);if(401===e)/* @__PURE__ */
12
+ return he(h,{status:"warning",title:i.signInRequired,subTitle:i.signInBody,className:Je});if(403===e)/* @__PURE__ */
13
+ return he(h,{status:"403",className:Je});if(404===e||410===e)/* @__PURE__ */
14
+ return he(h,{status:"404",title:i.notFound,className:Je});const t=null==e||408===e||429===e||e>=500;/* @__PURE__ */
15
+ return he(h,{status:"500",title:i.loadFailed,subTitle:t?i.checkConnection:i.rejected,extra:t?/* @__PURE__ */he($,{variant:"secondary",size:"sm",onClick:o,children:i.retry}):void 0,className:Je})}/* @__PURE__ */
16
+ return he(h,{status:"404",title:i.notFound,className:Je})}function Qe({entity:e,children:t,...n}){return null!=e?/* @__PURE__ */he(me,{children:t(e)}):/* @__PURE__ */he(Ze,{...n})}var et=/^[a-z]+(?:-[a-z]+)*-\d{13}$/;function tt(e){return"string"==typeof e&&(e.startsWith("new-")||et.test(e))}function nt(e){if(tt(e.entityId))return!0;const t=e.entitySnapshot;return!(!t||"object"!=typeof t||!t._new&&!t._duplicate)}var rt=X({openWindows:[],openEntity:()=>{},openPage:()=>{},reorderWindows:()=>{},closeEntity:()=>{},minimize:()=>{},items:[],restore:()=>{},remove:()=>{},restoreIfMinimized:()=>!1,openItems:[]}),ot=X(null);function it(e){const t=J(ot),n=Z(null);null===n.current&&(n.current=/* @__PURE__ */Symbol("window-dirty")),_(()=>{if(t)return t(n.current,e)},[t,e]),Q(()=>{if(!t||!e)return;const n=e=>{e.preventDefault(),e.returnValue=""};return window.addEventListener("beforeunload",n),()=>window.removeEventListener("beforeunload",n)},[t,e])}function at(){const e=Z(/* @__PURE__ */new Map),[t,n]=ee(!1);return{dirty:t,registerDirty:ne((t,r)=>{const o=()=>{const t=Array.from(e.current.values()).some(Boolean);n(e=>e===t?e:t)};return e.current.set(t,r),o(),()=>{e.current.delete(t),o()}},[])}}function st(){return J(rt)}function lt(e){if("page"!==e.type&&nt(e))return null;const t="page"===e.type?"page":e.entityType||"",n="page"===e.type?e.route||"":e.entityId||"";return t&&n?{entityType:t,entityId:n,label:e.label}:null}function ct({item:e,onClose:t,accentRgb:n}){const{dirty:r,registerDirty:o}=at(),i=ke[e.route];if(!i||!ge(i))return null;const a=i,s=a.component;/* @__PURE__ */
17
+ return he(Zr,{open:!0,onClose:t,icon:l[e.route],title:a.label,size:a.size||"2xl",dirty:r,allowPinOnTop:a.allowPinOnTop,initialPosition:a.initialPosition,widget:a.widget,compact:a.compact,appStyle:a.appStyle,flushBody:a.flushBody,autoHeight:a.autoHeight,autoMinHeight:a.autoMinHeight,autoWidth:a.autoWidth,dimensions:a.dimensions,windowKey:e.id,openedFromKey:e.openedFrom,accentRgb:n,children:/* @__PURE__ */he(ot.Provider,{value:o,children:/* @__PURE__ */he(ue,{fallback:/* @__PURE__ */he("div",{className:"flex items-center justify-center py-12",children:/* @__PURE__ */he(k,{})}),children:/* @__PURE__ */he(s,{})})})})}function ut({entityType:e,entityId:t,label:n}){const r=Y(),o=we(),{data:i}=ye({queryKey:["my-profile-sidebar"],enabled:Ee(),queryFn:()=>Ce.get("/auth/me/").then(e=>e.data)}),a=(i?.preferences||{}).favorite_documents||[],s=a.some(n=>n.entityType===e&&n.entityId===t);/* @__PURE__ */
18
+ return he("button",{onClick:()=>{const r=s?a.filter(n=>!(n.entityType===e&&n.entityId===t)):[...a,{entityType:e,entityId:t,label:n}];Ce.patch("/auth/me/",{preferences:{favorite_documents:r}}).then(()=>{o.invalidateQueries({queryKey:["my-profile-sidebar"]})})},title:s?r.taskbar.removeFromDesktop:r.taskbar.addToDesktop,className:"shrink-0 transition-colors "+(s?"text-yellow-500 hover:text-yellow-600":"text-gray-300 hover:text-yellow-400"),children:/* @__PURE__ */he(j,{name:"star",className:"h-4 w-4",fill:s?"currentColor":"none",strokeWidth:1.5})})}var dt=/* @__PURE__ */new Set,ht=()=>"hidden";function mt({item:e,onClose:t,onMinimize:n,accentRgb:r}){const o=ke[e.entityType];if(!o||!ve(o))return null;const i=o,[a,s]=ee(!1),{dirty:c,registerDirty:u}=at(),d=i.queryKey||i.endpoint.replace(/^\/|\/$/g,"").split("/").pop()||e.entityType,h=e.entitySnapshot?._duplicate,m=tt(e.entityId),p=Se(),f=(w=e.id,te(N,()=>{const e=Hn.get(w);return null!=e&&Kn.has(e)}));var w;const y=!i.selfFetching&&!h&&!m&&Ee(),g=ye({queryKey:[d,e.entityId],queryFn:()=>{return Ce.get((t=i.endpoint,n=String(e.entityId),`${t}${encodeURIComponent(n)}/`)).then(e=>e.data);var t,n},initialData:_e(e.entitySnapshot),initialDataUpdatedAt:0,enabled:y,staleTime:0,refetchOnWindowFocus:()=>{return void 0===(e=p.entityRefetchOnWindowFocus)||("function"==typeof e?e():e);var e},refetchOnMount:"always",refetchInterval:e=>function(e,t={}){if(Be(e))return!1;if(t.minimized)return!1;const n=t.hostInterval;if(void 0===n)return 6e4;const r="function"==typeof n?n():n;return"number"==typeof r&&r>0&&r}(e.state.error,{minimized:f,hostInterval:p.entityRefetchInterval}),refetchIntervalInBackground:!1,retry:Ue}),v=g.data,b=g.refetch;Q(()=>{var t;if(y)return t=t=>{t!==e.id||dt.has(t)||b({cancelRefetch:!1})},or.add(t),()=>{or.delete(t)}},[b,e.id,y]);const x=ne(()=>{a&&!c?s(!1):t()},[a,c,t]),E=(i.useEdit??ht)(v??null),C=!i.useEdit||m||h?void 0:{state:E,editing:a,onEdit:()=>s(!0),onDiscard:()=>s(!1)},M=i.selfFetching?e.label:v?i.title(v,a,s):e.label,S=i.icon,L=S?l[S]:null,T=M,z=!i.selfFetching&&v&&i.footer&&!h?i.footer(v):void 0;return i.rendersOwnModal?i.selfFetching?/* @__PURE__ */he(ue,{fallback:/* @__PURE__ */he(k,{}),children:i.render(v??e.entitySnapshot,t,e.entityId,a,s)}):null!=v?/* @__PURE__ */he(ue,{fallback:/* @__PURE__ */he(Zr,{open:!0,onClose:t,title:e.label,size:i.size||"2xl",children:/* @__PURE__ */he(Ge,{})}),children:i.render(v,t,e.entityId,a,s)}):/* @__PURE__ */he(Zr,{open:!0,onClose:t,title:e.label,size:i.size||"2xl",children:/* @__PURE__ */he(Ze,{isPending:g.isPending,isFetching:g.isFetching,enabled:y,error:g.error,onRetry:b})}):/* @__PURE__ */he(Zr,{open:!0,onClose:x,onMinimize:n,initialBox:e.savedBox,icon:L,title:T,footer:z,copyText:e.label,windowKey:e.id,openedFromKey:e.openedFrom,size:i.size||"2xl",dirty:c,editing:a||m||h,edit:C,dimensions:i.dimensions,autoHeight:i.autoHeight,autoMinHeight:i.autoMinHeight,autoWidth:i.autoWidth,appStyle:i.appStyle,flushBody:i.flushBody,accentRgb:r,children:/* @__PURE__ */he(ot.Provider,{value:u,children:/* @__PURE__ */he(ue,{fallback:/* @__PURE__ */he(Ge,{}),children:i.selfFetching?i.render(null,t,e.entityId,a,s):/* @__PURE__ */he(Qe,{entity:v,isPending:g.isPending,isFetching:g.isFetching,enabled:y,error:g.error,onRetry:b,children:n=>i.render(n,t,e.entityId,a,s)})})})})}function pt(e){return document.querySelector(`[data-modal-panel][data-window-key="${e}"]`)}function ft(e){return document.querySelector(`[data-modal-panel][data-window-root][data-window-owner="${e}"]`)}function wt(e){const t=pt(e),n=t??ft(e);if(!n)return;if(t&&!wr(t))return r=e,void window.dispatchEvent(new CustomEvent("modal-reveal",{detail:{windowKey:r}}));var r;const o=n.getAttribute("data-modal-id");o&&ir(o)}function yt(){const e=S();if(!e)return;const t=document.querySelector(`[data-modal-panel][data-modal-id="${e}"]`);return t?.getAttribute("data-window-key")??void 0}var gt=/* @__PURE__ */new Map;function vt(){const e=yt();if(e)return gt.get(e)}function bt(e){const t=document.querySelectorAll("[data-modal-panel]");for(const n of Array.from(t)){const t=n.querySelector("[data-window-title]");if(t?.textContent?.includes(e))return n}return null}var xt="rosh-peek-style",kt=q.peek,Et=q.taskbarPreview;function Ct(e){"undefined"!=typeof document&&(!function(){if("undefined"==typeof document||document.getElementById(xt))return;const e=document.createElement("style");e.id=xt,e.textContent=`body.rosh-peeking [data-modal-panel]{transition:opacity .18s ease}body.rosh-peeking [data-modal-panel]:not([data-peek-focus]){opacity:.4}body.rosh-peeking [data-modal-panel][data-peek-focus]{opacity:1}body.rosh-peeking [data-modal-panel][data-peek-focus]:not([data-pinned-top]){z-index:${kt}!important}html.rosh-reduce-transparency body.rosh-peeking [data-modal-panel]:not([data-peek-focus]){opacity:.92}@media (prefers-reduced-motion:reduce){body.rosh-peeking [data-modal-panel]{transition:none}}`,document.head.appendChild(e)}(),document.querySelectorAll("[data-modal-panel][data-peek-focus]").forEach(e=>e.removeAttribute("data-peek-focus")),e&&e.setAttribute("data-peek-focus",""),document.body.classList.toggle("rosh-peeking",!!e))}function Mt(){"undefined"!=typeof document&&(document.body.classList.remove("rosh-peeking"),document.querySelectorAll("[data-modal-panel][data-peek-focus]").forEach(e=>e.removeAttribute("data-peek-focus")))}function Nt({id:e,label:t,maxW:n,maxH:r,titleAbove:o=!1,onClick:i,onClose:a}){const s=Y(),l=Z(null),[c,u]=ee({w:n,h:Math.round(.75*r)}),[d,h]=ee(!1);return _(()=>{const o=l.current;if(!o)return;const i=pt(e)??bt(t);if(!i)return void h(!1);const a=i.getBoundingClientRect();if(0===a.width||0===a.height)return void h(!1);const s=Math.min(n/a.width,r/a.height),c=Math.max(80,Math.round(a.width*s)),d=Math.max(60,Math.round(a.height*s));u({w:c,h:d}),h(!0);const m=i.cloneNode(!0);return m.style.position="absolute",m.style.top="0",m.style.left="0",m.style.right="auto",m.style.bottom="auto",m.style.width=a.width+"px",m.style.height=a.height+"px",m.style.transform=`scale(${s})`,m.style.transformOrigin="top left",m.style.pointerEvents="none",m.style.animation="none",m.style.zIndex="auto",m.removeAttribute("data-modal-panel"),m.removeAttribute("data-modal-id"),m.removeAttribute("data-window-key"),m.removeAttribute("role"),m.removeAttribute("aria-labelledby"),m.removeAttribute("aria-label"),m.querySelectorAll('[role="dialog"], [data-portal]').forEach(e=>{e.style.display="none"}),o.innerHTML="",o.appendChild(m),()=>{o.innerHTML=""}},[e,t,n,r]),/* @__PURE__ */de("div",{style:{width:c.w,height:c.h},className:"relative rounded-md overflow-hidden bg-white/95 border border-line-strong shadow-(--elevation-panel) cursor-pointer ring-2 ring-transparent group-hover:ring-blue-400 transition shrink-0",onClick:i,children:[
19
+ /* @__PURE__ */he("div",{ref:l,className:"absolute inset-0 z-0 overflow-hidden"}),!d&&/* @__PURE__ */de("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-gray-400 bg-gray-50",children:[
20
+ /* @__PURE__ */he(j,{name:"window",className:"h-6 w-6",strokeWidth:1.5}),
21
+ /* @__PURE__ */he("span",{className:"mt-1 text-3xs uppercase tracking-wide",children:"Hidden"})]}),!o&&/* @__PURE__ */he("div",{className:"absolute bottom-0 left-0 right-0 z-10 px-2 py-1 text-2xs font-medium text-on-accent bg-gradient-to-t from-black/80 to-transparent truncate pointer-events-none",children:t}),a&&/* @__PURE__ */he("button",{onClick:e=>{e.stopPropagation(),a()},className:"absolute top-1 right-1 z-20 h-5 w-5 rounded-full bg-gray-900/90 ring-1 ring-white/80 shadow-sm hover:bg-red-500 text-on-accent flex items-center justify-center",title:s.taskbar.closeWindow,children:/* @__PURE__ */he(j,{name:"close",className:"h-3 w-3",strokeWidth:3})})]})}function St({items:e,anchorEl:t,onActivate:n,onClose:r,onMouseEnter:o,onMouseLeave:i}){const a=Y(),s=e.length>1,l=Z(null),[c,u]=ee({left:-9999,top:-9999,ready:!1}),[d,h]=ee(()=>"undefined"!=typeof document&&getComputedStyle(document.documentElement).getPropertyValue("--taskbar-position")?.trim()||"bottom");_(()=>{const e=l.current;if(!e)return;const n=()=>{const n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),o=getComputedStyle(document.documentElement).getPropertyValue("--taskbar-position")?.trim()||"bottom";h(o);let i,a=n.left+n.width/2-r.width/2;"top"===o?i=n.bottom+8:"left"===o?(a=n.right+8,i=n.top+n.height/2-r.height/2):"right"===o?(a=n.left-r.width-8,i=n.top+n.height/2-r.height/2):i=n.top-r.height-8,a=Math.max(8,Math.min(a,window.innerWidth-r.width-8)),i=Math.max(8,Math.min(i,window.innerHeight-r.height-8)),u({left:a,top:i,ready:!0})};n();const r=new ResizeObserver(n);return r.observe(e),()=>r.disconnect()},[t,e.length]),Q(()=>Mt,[]);const m="top"===d,p=(m?"mt-1":"mb-1")+" max-w-[240px] truncate text-2xs font-medium text-ink-strongest bg-white/80 px-2 py-0.5 rounded shadow-sm ring-2 ring-transparent transition group-hover:ring-blue-400";return pe(
22
+ /* @__PURE__ */he("div",{ref:l,"data-taskbar-preview":"",style:{position:"fixed",left:c.left,top:c.top,zIndex:Et,maxWidth:"calc(100vw - 16px)",opacity:c.ready?1:0},className:s?"flex gap-2 flex-wrap":"",onMouseEnter:o,onMouseLeave:()=>{Mt(),i()},children:e.map(e=>{const t=pt(e.id)??bt(e.label),o=t?function(e){if(wr(e))return null;const t=e.getBoundingClientRect(),n=ur(),r=t.left+t.width/2-(n.x+n.w/2),o=t.top+t.height/2-(n.y+n.h/2);return 180*Math.atan2(o,r)/Math.PI}(t):null;/* @__PURE__ */
23
+ return de("div",{className:"group flex flex-col items-center",onMouseEnter:()=>Ct(t),children:[!m&&/* @__PURE__ */he("span",{className:p,children:e.label}),
24
+ /* @__PURE__ */he(Nt,{id:e.id,label:e.label,maxW:240,maxH:160,titleAbove:!0,onClick:()=>n(e.id),onClose:()=>r(e.id)}),m&&/* @__PURE__ */he("span",{className:p,children:e.label}),null!==o&&/* @__PURE__ */de("span",{title:a.taskbar.offscreenHint,className:"mt-1 inline-flex items-center gap-1 rounded bg-amber-500 px-2 py-0.5 text-2xs font-semibold text-on-accent shadow-sm",children:[
25
+ /* @__PURE__ */he(j,{name:"arrow-right",className:"h-3 w-3",style:{transform:`rotate(${o}deg)`},strokeWidth:3}),"Off screen"]})]},e.id)})}),document.body)}function Lt(e,t){const n=getComputedStyle(document.documentElement).getPropertyValue("--taskbar-position")?.trim()||"bottom";return"top"===n?{left:Math.min(e,window.innerWidth-220),top:t+4}:"left"===n?{left:e+4,top:Math.min(t,window.innerHeight-160)}:"right"===n?{right:window.innerWidth-e+4,top:Math.min(t,window.innerHeight-160)}:{left:Math.min(e,window.innerWidth-220),bottom:window.innerHeight-t+4}}function Tt({openWindows:e,onRemove:t,onSplitView:n,onActivate:r,onActivateById:o}){const i=Y(),[a,s]=ee(null);Q(()=>{let e,t;const n=()=>{clearInterval(e),clearTimeout(t),e=void 0},r=()=>{const e=document.getElementById("taskbar-windows");return s(t=>t===e?t:e),!!e},o=()=>{n(),r()||(e=setInterval(()=>{r()&&n()},100),t=setTimeout(n,5e3))};return o(),window.addEventListener("react-os-shell:layout-mode-changed",o),()=>{n(),window.removeEventListener("react-os-shell:layout-mode-changed",o)}},[]);const c=te(N,S),[,u]=ee(0);Q(()=>{const e=()=>u(e=>e+1);return window.addEventListener("modal-geometry",e),window.addEventListener("resize",e),()=>{window.removeEventListener("modal-geometry",e),window.removeEventListener("resize",e)}},[]);const[,d]=ee(0);Q(()=>{const e=()=>d(e=>e+1);return window.addEventListener("window-title-update",e),()=>window.removeEventListener("window-title-update",e)},[]);const h=e=>{const t=bt(e),n=t?.querySelector("[data-window-title]");return n?.textContent?.trim()||e},[m,p]=ee(null),[f,w]=ee(null),[y,v]=ee(null),b=Z(null),x=()=>{b.current&&(clearTimeout(b.current),b.current=null),b.current=setTimeout(()=>{p(null),w(null)},150)},k=e.filter(e=>!e.route||!ke[e.route]?.utility);if(!a||!a.isConnected||0===k.length)return null;const E=[],C=/* @__PURE__ */new Map;for(const e of k){const t=e.route?ke[e.route]:void 0,n=t?.taskbarGroup,r=n?.key??e.route??`entity:${e.id}`,o=C.get(r);if(void 0!==o)E[o].items.push(e);else{C.set(r,E.length);const o=n?.label??t?.label??e.label;E.push({key:r,route:n?.icon??e.route,label:o,items:[e]})}}return pe(
26
+ /* @__PURE__ */de(me,{children:[E.map(e=>{const n=e.route?l[e.route]:null,r=e.items[e.items.length-1];let a=!1;if(c){const t=document.querySelector(`[data-modal-id="${c}"]`);if(t){const n=t.querySelector("[data-window-title]"),r=n?.textContent??"";a=e.items.some(e=>r.includes(e.label))}}const s=e.items.length>1,u=e.items.some(e=>{const t=pt(e.id)??bt(e.label);return!!t&&!wr(t)});/* @__PURE__ */
27
+ return de("button",{onClick:()=>o(r.id),onMouseEnter:t=>{return n=e.items,r=t.currentTarget,void(y||(b.current&&(clearTimeout(b.current),b.current=null),b.current=setTimeout(()=>{p(n),w(r)},350)));var n,r},onMouseLeave:x,onDoubleClick:e=>{e.stopPropagation(),window.dispatchEvent(new CustomEvent("modal-center",{detail:{windowKey:r.id,label:r.label}}))},onContextMenu:t=>{t.preventDefault(),t.stopPropagation(),b.current&&(clearTimeout(b.current),b.current=null),p(null),w(null),s?v({x:t.clientX,y:t.clientY,items:e.items,label:e.label}):window.dispatchEvent(new CustomEvent("modal-context-menu",{detail:{windowKey:r.id,label:r.label,x:t.clientX,y:t.clientY}}))},style:{width:"var(--window-tab-width, 200px)",fontSize:"var(--window-tab-font-size, 12px)"},"data-tab-group":e.key,className:"group relative flex items-center gap-2 rounded-lg px-3 py-2 font-medium transition-all min-w-0 shrink "+(a?"bg-blue-100/60 border border-blue-400/60 text-blue-700":"bg-gray-50/40 border border-gray-200/40 text-gray-700 hover:bg-gray-200/40"),children:[n&&re(n)?ae(n,{className:"h-3.5 w-3.5 shrink-0"}):/* @__PURE__ */he(j,{name:"expand",className:"h-3.5 w-3.5 shrink-0",strokeWidth:2}),
28
+ /* @__PURE__ */he("span",{className:"truncate flex-1",children:s?e.label:h(r.label)}),u&&/* @__PURE__ */he("span",{title:i.taskbar.offscreenDot,className:"shrink-0 h-1.5 w-1.5 rounded-full bg-amber-500"}),s&&/* @__PURE__ */he(g,{count:e.items.length,label:i.count.windows(e.items.length)}),!s&&/* @__PURE__ */he("span",{role:"button",onClick:e=>{e.stopPropagation(),t(r.id)},className:"ml-auto text-gray-400 hover:text-red-500 shrink-0 opacity-0 group-hover:opacity-100 transition-opacity",children:/* @__PURE__ */he(j,{name:"close",className:"h-3 w-3",strokeWidth:2})})]},e.key)}),
29
+ /* @__PURE__ */he("div",{className:"flex-1"}),k.length>=2&&/* @__PURE__ */de("button",{onClick:n,title:i.taskbar.expose,className:"flex items-center gap-1 rounded px-2 py-1 text-2xs font-medium text-blue-600 border border-blue-300 hover:bg-accent-tint transition-colors shrink-0",children:[
30
+ /* @__PURE__ */he(j,{name:"grid",className:"h-3 w-3",strokeWidth:2}),"Exposé"]}),y&&/* @__PURE__ */de(R,{portal:!0,minWidth:200,style:Lt(y.x,y.y),onClose:()=>v(null),children:[
31
+ /* @__PURE__ */he(O,{children:y.label}),
32
+ /* @__PURE__ */de(W,{onClick:()=>{v(null),y.items.forEach(e=>function(e){const t=Hn.get(e);t&&ar(t)}(e.id))},children:[
33
+ /* @__PURE__ */he(j,{name:"remove",className:"h-4 w-4",strokeWidth:1.5}),i.taskbar.minimizeAllWindows]}),
34
+ /* @__PURE__ */de(W,{onClick:()=>{v(null),y.items.forEach(e=>o(e.id))},children:[
35
+ /* @__PURE__ */he("svg",{className:"h-4 w-4 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */he("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 3.75h6.5v6.5h-6.5zM13.75 8.75h6.5v6.5h-6.5z"})}),i.taskbar.restoreAllWindows]}),
36
+ /* @__PURE__ */he(K,{}),
37
+ /* @__PURE__ */de(W,{danger:!0,onClick:()=>{v(null),y.items.forEach(e=>t(e.id))},children:[
38
+ /* @__PURE__ */he(j,{name:"close",className:"h-4 w-4",strokeWidth:2}),`${i.taskbar.closeAllWindows} (${y.items.length})`]})]}),m&&f&&/* @__PURE__ */he(St,{items:m,anchorEl:f,onActivate:e=>{o(e),p(null),w(null)},onClose:e=>{t(e),p(null),w(null)},onMouseEnter:()=>{b.current&&(clearTimeout(b.current),b.current=null)},onMouseLeave:x})]}),a)}var zt=["/login","/forgot-password","/reset-password","/force-change-password"];function At({children:e,windowAccentForRoute:t}){const n=fe(),r=zt.some(e=>n.pathname.startsWith(e)),[o,i]=ee([]),a=Z(o);_(()=>{a.current=o},[o]);const s=te(Pe,Ie,Ie),l=Z(/* @__PURE__ */new Map),c=e=>{const t=Ye(e),n=!!s&&"page"===e.type&&e.route===s,r=e.pageSearch||void 0,o=l.current.get(e.id);if(o&&o.tab===t&&o.home===n&&o.pageSearch===r)return o;const i={key:e.id,tab:t,home:n,...r?{pageSearch:r}:{}};return l.current.set(e.id,i),i};Q(()=>{gt.clear();for(const e of o)e.route&&gt.set(e.id,e.route)},[o]);const u=ne(e=>{i(t=>t.filter(t=>t.id!==e))},[]),d=ne(e=>{var t;pt(e)||ft(e)?(t=e,window.dispatchEvent(new CustomEvent(zr,{detail:{windowKey:t}}))):u(e)},[u]),h=(e,t=!1)=>{const n=On;t&&dt.add(e),setTimeout(()=>{const r=document.querySelector(`[data-modal-panel][data-window-key="${e}"]`),o=r?.getAttribute("data-modal-id");var i,a;!o||(i=o,a=n,($n.get(i)??-1)>a)||ir(o),t&&dt.delete(e)},50)},m=(e,t,n)=>{const r=Re;if(n||!r)return[...e,t];const o=function(e,t,n){if(!Ye(t))return e.length;if(t.shellOwned&&Ve(t,n.home))return 0;const r=Ve(t,n.home)?void 0:Xe(t)?.key;if(r){let t=-1;if(e.forEach((e,o)=>{Ye(e)&&!Ve(e,n.home)&&Xe(e)?.key===r&&(t=o)}),t>=0)return t+1}if("page"===t.type&&t.route&&!Ve(t,n.home)&&n.favorites.includes(t.route))return e.length>0&&Ve(e[0],n.home)?1:0;const o=t.openedFrom?e.findIndex(e=>e.id===t.openedFrom):-1;if(o>=0){const t=/* @__PURE__ */new Set([e[o].id]);let r=o+1;for(;r<e.length&&e[r].openedFrom&&t.has(e[r].openedFrom);)t.add(e[r].id),r++;const i=t=>Ye(e[t])&&!Ve(e[t],n.home)?Xe(e[t])?.key:void 0;for(;r>0&&r<e.length&&void 0!==i(r)&&i(r)===i(r-1);)r++;return r}return e.length}(e,t,{home:Ie(),favorites:r.favorites});return[...e.slice(0,o),t,...e.slice(o)]},p=ne(e=>{i(t=>function(e,t){const n=new Set(t),r=new Map(e.map(e=>[e.id,e])),o=t.map(e=>r.get(e)).filter(e=>!!e);if(o.length!==n.size)return e;let i=0;const a=e.map(e=>n.has(e.id)?o[i++]:e);return a.every((t,n)=>t===e[n])?e:a}(t,e))},[]),f=ne((e,t,n,r,o,a={})=>{if(!ke[e]||!ve(ke[e]))return;const s=`${e}:${t}`,l=yt();i(i=>{const c=i.find(n=>n.entityType===e&&String(n.entityId)===String(t));return c?(h(c.id),i):(h(s,!0),m(i,{id:s,type:"modal",label:r||t,route:o||window.location.pathname,entityType:e,entityId:t,entitySnapshot:_e(n),openedFrom:l},!!a.append))})},[]),w=ne((e,t={})=>{if(!ke[e]||!ge(ke[e]))return;const n=ke[e],{reuse:r=!1,background:o=!1,shellOwned:s,search:l,append:c=!1}=t,u=e=>{var t;o?(t=e,Vn.add(t)):h(e)};if(n.widget){const t=a.current.find(t=>"page"===t.type&&t.route===e);if(t)return void d(t.id)}const p=yt();i(t=>{if(n.multiInstance){const i=t.filter(t=>"page"===t.type&&t.route===e);if(r&&!l&&i.length>0)return o||h(i[i.length-1].id),t;const a=`page:${e}:${Math.random().toString(36).slice(2,8)}`;return u(a),m(t,{id:a,type:"page",label:n.label,route:e,openedFrom:p,...s?{shellOwned:s}:{},...l?{pageSearch:l}:{}},c)}const i=t.find(t=>"page"===t.type&&t.route===e);if(i)return n.widget?t:(o||h(i.id),l&&i.pageSearch!==l?t.map(e=>e===i?{...e,pageSearch:l}:e):t);const a=`page:${e}`;return u(a),m(t,{id:a,type:"page",label:n.label,route:e,openedFrom:p,...s?{shellOwned:s}:{},...l?{pageSearch:l}:{}},c)})},[d]),y=ne(()=>{},[]),g=ne(()=>{},[]),v=d,b=d;/* @__PURE__ */
39
+ return de(rt.Provider,{value:{openWindows:o,openEntity:f,openPage:w,reorderWindows:p,closeEntity:v,minimize:y,items:[],openItems:o,restore:g,remove:b,restoreIfMinimized:()=>!1},children:[e,
40
+ /* @__PURE__ */he(Tt,{openWindows:o,onRemove:d,onSplitView:Gr,onActivate:e=>{document.querySelectorAll("[data-modal-panel]").forEach(t=>{const n=t.querySelector("[data-window-title]");if(n?.textContent?.includes(e)){const e=t.getAttribute("data-modal-id");e&&ir(e)}})},onActivateById:wt}),
41
+ /* @__PURE__ */he(_r,{}),!r&&o.map(e=>{const n=e.route?t?.(e.route):void 0;
42
+ /* @__PURE__ */
43
+ return he(Le.Provider,{value:c(e),children:/* @__PURE__ */he(Oe,{fallback:(t,n)=>/* @__PURE__ */he(Zr,{open:!0,onClose:()=>u(e.id),title:e.label,size:"md",autoHeight:!0,windowKey:e.id,children:/* @__PURE__ */he(Ke,{error:t,onReload:n})}),children:/* @__PURE__ */he(ln,{spec:lt(e),children:/* @__PURE__ */he(io,{windowId:e.id,children:"page"===e.type?/* @__PURE__ */he(ct,{item:e,onClose:()=>u(e.id),accentRgb:n}):/* @__PURE__ */he(mt,{item:e,onClose:()=>u(e.id),onMinimize:()=>{},accentRgb:n})})})})},e.id)})]})}var Dt=400;function It({panelRef:e,bodyRef:t,open:n,widget:r,active:o,minimized:i}){const a=Z(null),s=Z(!1);n&&!s.current&&(a.current="undefined"==typeof document?null:document.activeElement),s.current=n;const l=Z(!1),c=Z(void 0),u=Z(i),d=u.current&&!i;u.current=i;const h=()=>{l.current=!0,clearTimeout(c.current),c.current=setTimeout(()=>{l.current=!1},Dt)};Q(()=>{n&&!r&&h()},[n,r]),Q(()=>{d&&n&&!r&&h()},[d]),Q(()=>()=>clearTimeout(c.current),[]),Q(()=>{if(!n||r||!o||i||!l.current)return;l.current=!1;const a=e.current;if(!a||a.contains(document.activeElement))return;if(document.activeElement?.closest('[aria-modal="true"]'))return;const s=t.current?I(t.current)[0]:void 0;s?s.focus():(a.hasAttribute("tabindex")||a.setAttribute("tabindex","-1"),a.focus())},[n,r,o,i,e,t]),_(()=>{if(!n||r)return;const t=e.current;return()=>{const e=a.current,n=document.activeElement;(!n||n===document.body||!!t?.contains(n))&&e&&e.isConnected&&!t?.contains(e)&&e.focus?.()}},[n,r,e])}var Pt=null,Rt=/* @__PURE__ */new Set;function Wt(){return Pt}function Kt(e){if(Pt!==e){Pt=e;for(const e of Rt)e()}}function Ot(e){return Rt.add(e),()=>{Rt.delete(e)}}var $t=!1,jt={menus:0,submenus:0,menuKey:null,moveMs:0,resizeMs:0},Ft=()=>{};function qt(e){$t=e,jt={menus:0,submenus:0,menuKey:null,moveMs:0,resizeMs:0}}function Ht(e,t){$t&&("submenu"===e?jt.submenus++:jt.menus++,jt.menuKey=t)}function Bt(e){if(!$t)return Ft;const t=performance.now();let n=!1;return()=>{if(n)return;if(n=!0,!$t)return;const r=performance.now()-t;"move"===e?jt.moveMs+=r:jt.resizeMs+=r}}function Ut(){const e=jt;return jt={menus:0,submenus:0,menuKey:null,moveMs:0,resizeMs:0},e}var Yt=/* @__PURE__ */new Set([P,x]),Xt=e=>Yt.has(e)||"function"==typeof e&&"badge"===e.titleRole,Vt=/* @__PURE__ */new Set(["button","a","input","select","textarea","kbd"]),Jt=/* @__PURE__ */new Set(["svg"]);function Gt(e){const t=[],n={text:"",accessories:[],badges:[],actions:[]};return _t(e,n,t),n.text=t.join("").replace(/\s+/g," ").trim(),n}function _t(e,t,n){if(null==e||"boolean"==typeof e)return;if("string"==typeof e||"number"==typeof e)return void n.push(String(e));if(Array.isArray(e))return void e.forEach(e=>_t(e,t,n));if(!re(e))return;const r=e;if(r.type===f)return void(void 0===t.copy&&"string"==typeof r.props.text&&r.props.text&&(t.copy=r.props.text));if(r.type===oe)return void ie.toArray(r.props.children).forEach(e=>_t(e,t,n));if("string"==typeof r.type){if(Jt.has(r.type))return;if(!Vt.has(r.type))return n.push(" "),ie.toArray(r.props.children).forEach(e=>_t(e,t,n)),void n.push(" ")}const o=ae(r,{key:`title-part-${t.accessories.length}`});t.accessories.push(o),(Xt(r.type)?t.badges:t.actions).push(o)}var Zt=/* @__PURE__ */new Map,Qt=/* @__PURE__ */new Set,en=0;function tn(){en++,Qt.forEach(e=>e())}function nn(e){return Zt.get(e)}function rn(e){return Qt.add(e),()=>{Qt.delete(e)}}function on(){return en}var an=X(""),sn=X(null);function ln({spec:e,children:t}){/* @__PURE__ */
44
+ return he(sn.Provider,{value:e,children:t})}var cn=/* @__PURE__ */new Set(["button","input","textarea","select","kbd","svg"]),un='button[type="submit"], button[data-submit], button.btn-submit, button.bg-green-600, button.bg-blue-600';function dn(e){return hn(e).replace(/\s+/g," ").trim()}function hn(e){if(null==e||"boolean"==typeof e)return"";if("string"==typeof e)return e;if("number"==typeof e)return String(e);if(Array.isArray(e))return e.map(hn).join("");if(re(e)){const t=e,n="string"==typeof t.type?t.type:"";return cn.has(n)?"":` ${hn(t.props?.children)} `}return""}function mn(e){const t=J(an);Q(()=>{if(!t)return;const n=n=>{n.detail===t&&e()};return window.addEventListener("widget-open-settings",n),()=>window.removeEventListener("widget-open-settings",n)},[e,t])}var pn={};function fn(e,t,n){const r=J(an);Q(()=>{if(!r)return;pn[r]||(pn[r]=[]);const o={label:e,icon:n,onClick:t};return pn[r].push(o),()=>{pn[r]=(pn[r]||[]).filter(e=>e!==o)}},[r,e,t,n])}function wn({title:e}){const t=Z(null);return Q(()=>{const n=setTimeout(()=>{const n=t.current?.closest("[data-modal-id]"),r=n?.getAttribute("data-modal-id");r&&window.dispatchEvent(new CustomEvent("window-title-update",{detail:{id:r,title:e}}))},0);return()=>clearTimeout(n)},[e]),/* @__PURE__ */he("span",{ref:t,style:{display:"none"},"aria-hidden":"true"})}function yn(e){}function gn(){return J(an)}function vn({children:e,position:t="right",quiet:n=!1}){const r=J(M),[o,i]=ee(null);return Q(()=>{if(!r)return;const e="left"===t?r.leftRef:r.rightRef,o=()=>!!e.current&&(i(e.current),n||r.notify(),!0);if(o())return;const a=setInterval(()=>{o()&&clearInterval(a)},50),s=setTimeout(()=>clearInterval(a),2e3);return()=>{clearInterval(a),clearTimeout(s)}},[r,t,n]),o?pe(e,o):null}function bn({onClick:e,children:t,className:n}){const r=J(M);/* @__PURE__ */
45
+ return he("button",{type:"button",onClick:async()=>{if(r?.isDirty){const{confirm:e}=await(import("./shell/ConfirmDialog.js"));if(!await e({title:"Discard changes?",message:"You have unsaved changes. Are you sure you want to cancel? All changes will be lost.",confirmLabel:"Discard",cancelLabel:"Keep Editing",variant:"warning"}))return}e()},className:n||"bg-white text-gray-700 border border-gray-300 px-4 py-2 text-sm font-medium rounded-lg hover:bg-gray-50",children:t||"Cancel"})}var xn="erp_window_positions",kn={};try{const e=localStorage.getItem(xn);e&&(kn=JSON.parse(e))}catch{}var En=null;function Cn(){En&&clearTimeout(En),En=setTimeout(()=>{try{localStorage.setItem(xn,JSON.stringify(kn))}catch{}},500)}var Mn="erp_activation_order",Nn=[];try{const e=localStorage.getItem(Mn),t=e?JSON.parse(e):null;Array.isArray(t)&&t.every(e=>"string"==typeof e)&&(Nn=t)}catch{}var Sn=null;function Ln(){Sn&&clearTimeout(Sn),Sn=setTimeout(()=>{try{localStorage.setItem(Mn,JSON.stringify(Nn))}catch{}},500)}function Tn(e,t){kn[e]||(kn[e]=t,Cn())}function zn(e){return kn[e]?{...kn[e]}:null}function An(e,t){kn[e]=t,Cn()}function Dn(){const r=e(),o=t();let i=!1;for(const e of Object.keys(kn))n(kn[e],r,o)&&(delete kn[e],i=!0);i&&Cn()}var In={sm:384,md:512,lg:672,xl:896,"2xl":1152,"3xl":1408},Pn=4e3,Rn=()=>{if("undefined"==typeof document)return"large";const e=getComputedStyle(document.documentElement).getPropertyValue("--default-window-size")?.trim();return"small"===e||"medium"===e||"maximized"===e?e:"large"},Wn={small:.8,medium:1,large:1.25,maximized:1.25},Kn=/* @__PURE__ */new Set,On=0,$n=/* @__PURE__ */new Map;var jn=0;function Fn(){return jn}function qn(){jn++,C.forEach(e=>e())}var Hn=/* @__PURE__ */new Map,Bn=/* @__PURE__ */new Map,Un=/* @__PURE__ */new Map;function Yn(){for(let e=E.length-1;e>=0;e--){const t=Un.get(E[e]);if(t?.tab)return t.owner}return null}function Xn(){return te(N,Yn,()=>null)}var Vn=/* @__PURE__ */new Set;var Jn=null;function Gn(e){Jn=null,ir(e)}function _n(e){Jn=e;const t=Hn.get(e);t&&Gn(t)}var Zn=/* @__PURE__ */new Map;function Qn(e){return Zn.get(e)?.holdsChanges()??!1}function er(e){const t=Zn.get(e);return t?t.ask():Promise.resolve(!0)}function tr(e){Jn===e&&(Jn=null)}function nr(e,t,n){if(n&&Un.set(e,n),t)if(Hn.set(t,e),Bn.set(e,t),Vn.delete(t)){E.unshift(e);const n=Nn.indexOf(t);-1!==n&&Nn.splice(n,1),Nn.unshift(t),Ln()}else!function(e,t){const n=Nn.indexOf(t);if(-1===n)return void E.push(e);let r=E.length;for(let e=0;e<E.length;e++){const t=Bn.get(E[e]);if(t&&Nn.indexOf(t)>n){r=e;break}}E.splice(r,0,e)}(e,t),-1===Nn.indexOf(t)&&(Nn.push(t),Ln());else E.push(e);qn(),window.dispatchEvent(new CustomEvent("modal-reorder")),t&&Jn===t&&Gn(e)}function rr(e){return e?Un.get(e)?.owner??Bn.get(e)??null:null}var or=/* @__PURE__ */new Set;function ir(e){const t=rr(S()),n=E.indexOf(e);-1!==n&&E.splice(n,1),E.push(e);const r=Un.get(e);if(r?.root)for(const[e,t]of Un){if(t.root||t.owner!==r.owner||Kn.has(e))continue;const n=E.indexOf(e);-1!==n&&E.splice(n,1),E.push(e)}Kn.delete(e);const o=Bn.get(e);if(o){const e=Nn.indexOf(o);-1!==e&&Nn.splice(e,1),Nn.push(o),Ln(),Jn&&Jn!==o&&(Jn=null)}qn(),window.dispatchEvent(new CustomEvent("modal-reorder"));const i=rr(S());i&&i!==t&&or.forEach(e=>e(i))}function ar(e){const t=E.indexOf(e);-1!==t&&E.splice(t,1),Kn.add(e),$n.set(e,++On);const n=Bn.get(e);if(n){const e=Nn.indexOf(n);-1!==e&&(Nn.splice(e,1),Ln())}qn(),window.dispatchEvent(new CustomEvent("modal-reorder"))}var sr=/* @__PURE__ */new Set;var lr=8,cr=32;function ur(){return e()}var dr=c.windowBar,hr=80,mr=384,pr=400;function fr(e,t=ur()){const n=Math.min(Math.max(e.x,t.x+hr-e.w),t.x+t.w-hr),r=Math.min(Math.max(e.y,t.y),t.y+t.h-dr);return n===e.x&&r===e.y?e:{...e,x:n,y:r}}function wr(e){const t=e.getBoundingClientRect();if(0===t.width||0===t.height)return!0;const n=ur();return t.left>=n.x-1&&t.top>=n.y-1&&t.right<=n.x+n.w+1&&t.bottom<=n.y+n.h+1}function yr(e){const t=ur(),n=Math.floor(t.w/2),r=Math.floor(t.h/2);switch(e){case"top":return{x:t.x,y:t.y,w:t.w,h:t.h};case"left":return{x:t.x,y:t.y,w:n,h:t.h};case"right":return{x:t.x+n,y:t.y,w:t.w-n,h:t.h};case"tl":return{x:t.x,y:t.y,w:n,h:r};case"tr":return{x:t.x+n,y:t.y,w:t.w-n,h:r};case"bl":return{x:t.x,y:t.y+r,w:n,h:t.h-r};case"br":return{x:t.x+n,y:t.y+r,w:t.w-n,h:t.h-r}}}var gr=null;function vr(e){const t=(gr||((gr=document.createElement("div")).style.cssText=["position: fixed","pointer-events: none",`z-index: ${q.snapPreview}`,"border-radius: 8px","background: rgba(59, 130, 246, 0.18)","border: 2px solid rgb(59, 130, 246)","transition: left 120ms ease, top 120ms ease, width 120ms ease, height 120ms ease, opacity 120ms ease","opacity: 0","display: none"].join(";"),document.body.appendChild(gr)),gr);t.style.display="block",t.style.left=`${e.x}px`,t.style.top=`${e.y}px`,t.style.width=`${e.w}px`,t.style.height=`${e.h}px`,t.style.opacity="1"}function br(){gr&&(gr.style.opacity="0",gr.style.display="none")}var xr=[{zone:"left",labelKey:"snapLeft",region:"inset-y-0 left-0 w-1/2"},{zone:"right",labelKey:"snapRight",region:"inset-y-0 right-0 w-1/2"},{zone:"tl",labelKey:"snapTopLeft",region:"top-0 left-0 h-1/2 w-1/2"},{zone:"tr",labelKey:"snapTopRight",region:"top-0 right-0 h-1/2 w-1/2"},{zone:"bl",labelKey:"snapBottomLeft",region:"bottom-0 left-0 h-1/2 w-1/2"},{zone:"br",labelKey:"snapBottomRight",region:"bottom-0 right-0 h-1/2 w-1/2"}],kr=350,Er=200;function Cr({maximized:e,onToggleMax:t,onSnap:n,buttonClassName:r,strings:o}){const[i,a]=ee(!1),s=Z(void 0),l=Z(void 0);Q(()=>()=>{clearTimeout(s.current),clearTimeout(l.current)},[]);const c=()=>{clearTimeout(l.current),s.current=setTimeout(()=>a(!0),kr)},u=()=>{clearTimeout(s.current),l.current=setTimeout(()=>a(!1),Er)};/* @__PURE__ */
46
+ return de("span",{className:"relative inline-flex",onMouseEnter:c,onMouseLeave:u,children:[
47
+ /* @__PURE__ */he("button",{onClick:t,onFocus:c,onBlur:u,title:e?o.windowed:o.maximize,className:r,children:e?"❐":"⤢"}),i&&/* @__PURE__ */he("div",{role:"group","aria-label":o.snapLayouts,onMouseEnter:()=>clearTimeout(l.current),onMouseLeave:u,className:"absolute right-0 top-full z-30 mt-1 grid w-max grid-cols-2 gap-1 rounded-lg border border-line bg-surface p-2 shadow-lg",children:xr.map(({zone:e,labelKey:t,region:r})=>/* @__PURE__ */he("button",{type:"button","aria-label":o[t],title:o[t],onClick:()=>{a(!1),n(e)},onFocus:()=>clearTimeout(l.current),onBlur:u,className:"relative h-7 w-11 rounded border border-gray-300 bg-gray-50 hover:border-blue-400 focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-400",children:/* @__PURE__ */he("span",{"aria-hidden":"true",className:`absolute rounded-sm bg-blue-500/70 ${r}`,style:{margin:2}})},e))})]})}var Mr="rosh-gesture-style";var Nr={se:"nwse-resize",nw:"nwse-resize",sw:"nesw-resize",ne:"nesw-resize",n:"ns-resize",s:"ns-resize",e:"ew-resize",w:"ew-resize"},Sr=4;function Lr(e,t,n,r){!function(){if("undefined"==typeof document||document.getElementById(Mr))return;const e=document.createElement("style");e.id=Mr,e.textContent="body.rosh-gesturing [data-modal-panel]{will-change:transform}",document.head.appendChild(e)}();try{e.setPointerCapture(t)}catch{}document.body.classList.add("rosh-gesturing");const o=document.createElement("div");o.setAttribute("data-drag-shield",""),o.style.cssText=`position:fixed;inset:0;z-index:2147483647;cursor:${n};background:transparent;touch-action:none`,document.body.appendChild(o);const i=Bt(r);let a=!1;return()=>{if(!a){a=!0,i();try{e.releasePointerCapture(t)}catch{}o.remove(),document.body.classList.remove("rosh-gesturing")}}}function Tr(e){const t=E.indexOf(e);if(-1===t)return-1;const n=q.window+t*q.windowStep,r=Un.get(e);if(!r||r.root)return n;let o=-1;for(const[e,t]of Un){if(!t.root||t.owner!==r.owner)continue;const n=E.indexOf(e);-1!==n&&(o=Math.max(o,q.window+n*q.windowStep))}return o>=n?o+2+Math.min(t,7):n}"undefined"!=typeof window&&window.addEventListener("deactivate-all-modals",function(){for(let e=E.length-1;e>=0;e--)sr.has(E[e])||E.splice(e,1);Nn=Nn.filter(e=>{const t=Hn.get(e);return null!=t&&sr.has(t)}),Ln(),qn(),window.dispatchEvent(new CustomEvent("modal-reorder"))});var zr="modal-close-request";function Ar(e){te(N,Fn);const t=J(M);if(E.length<=1)return!0;if(e){const t=Hn.get(e);if(null!=t)return S()===t}return t?.active??null!=S()}var Dr=!1,Ir=/* @__PURE__ */new Set;function Pr(e){return Ir.add(e),()=>Ir.delete(e)}function Rr(){return Dr}function Wr(e){Dr!==e&&(Dr=e,Ir.forEach(e=>e()))}function Kr(){Wr(!Dr)}function Or(){Wr(!1)}var $r=null,jr=/* @__PURE__ */new Set;function Fr(e){return jr.add(e),()=>jr.delete(e)}function qr(){return $r}function Hr(e){$r!==e&&($r=e,jr.forEach(e=>e()))}var Br=null,Ur=/* @__PURE__ */new Set;function Yr(e){return Ur.add(e),()=>Ur.delete(e)}function Xr(){return Br}function Vr(e){Br!==e&&(Br=e,Ur.forEach(e=>e()))}function Jr(){if(!Br)return void Wr(!1);Hr(Br),Vr(null),Wr(!1)}function Gr(){Wr(!Dr),window.dispatchEvent(new CustomEvent("modal-split-view"))}function _r(){const e=te(Pr,Rr),[t,n]=ee(e),[r,o]=ee(e);return Q(()=>{if(e){n(!0);const e=requestAnimationFrame(()=>o(!0));return()=>cancelAnimationFrame(e)}o(!1);const t=setTimeout(()=>n(!1),280);return()=>clearTimeout(t)},[e]),t&&"undefined"!=typeof document?pe(
48
+ /* @__PURE__ */he("div",{onMouseDown:e=>{e.stopPropagation(),Wr(!1)},style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.55)",backdropFilter:"blur(2px)",WebkitBackdropFilter:"blur(2px)",zIndex:q.expose,cursor:"pointer",opacity:r?1:0,transition:"opacity 260ms cubic-bezier(0.2, 0.8, 0.2, 1)",pointerEvents:r?"auto":"none"}}),document.body):null}function Zr({open:t,onClose:l,title:c,icon:u,copyText:d,size:h="lg",dirty:m=!1,onNext:p,onPrev:f,footer:g,bodyScroll:x,onMinimize:k,initialBox:C,actions:T,actionsLeft:I,editing:P=!1,edit:O,allowPinOnTop:F,initialPosition:H,widget:B,compact:X,appStyle:V,flushBody:G,autoHeight:oe,autoMinHeight:ie,autoWidth:ce,widgetMenu:ue,dimensions:fe,windowKey:we,openedFromKey:ye,accentRgb:ge,children:ve}){const[be,xe]=ee(()=>r()),ke=z()&&!be,Ee=A()&&!!B,[Ce,Me]=ee(0),[Ne,Se]=ee(!1),Te=Z(null),ze=Z(0);Q(()=>{ze.current=Ce},[Ce]);const Ae=ne(e=>{ke&&(Te.current={startX:e.clientX,startY:e.clientY,pointerId:e.pointerId},Se(!0),Kt(ye??null))},[ke,ye]),De=te(Ot,Wt);Q(()=>{if(!Ne)return;const e=e=>{if(!Te.current)return;const t=e.clientX-Te.current.startX;if(Math.abs(e.clientY-Te.current.startY)>Math.abs(t)+12)return Te.current=null,Se(!1),Me(0),void Kt(null);Me(Math.max(0,t))},t=()=>{if(!Te.current)return;const e=.3*window.innerWidth,t=ze.current>e;Te.current=null,Se(!1),t?(Me(window.innerWidth),setTimeout(()=>{l(),Me(0),Kt(null)},180)):(Me(0),Kt(null))};return window.addEventListener("pointermove",e),window.addEventListener("pointerup",t),window.addEventListener("pointercancel",t),()=>{window.removeEventListener("pointermove",e),window.removeEventListener("pointerup",t),window.removeEventListener("pointercancel",t)}},[Ne]);const[Ie,Pe]=ee(c),Re=Y(),We=Re.window;Q(()=>{Pe(c)},[c]);const Ke=se(()=>dn(Ie).trim()||void 0,[Ie]),je=le(),[qe,He]=ee(!1),Be=Z(!1),[Ue,Ye]=ee(!1),[Xe,Ve]=ee(null),Je=J(sn),Ge=J(Le),{prefs:_e,save:Ze}=D(),Qe=!!_e.window_accent_stripe,et=_e.favorite_documents||[],tt=!!Je&&et.some(e=>e.entityType===Je.entityType&&e.entityId===Je.entityId),nt=ne(()=>{if(!Je)return;const e=tt?et.filter(e=>!(e.entityType===Je.entityType&&e.entityId===Je.entityId)):[...et,{entityType:Je.entityType,entityId:Je.entityId,label:Je.label}];Ze({favorite_documents:e})},[Je,tt,et,Ze]),[rt,ot]=ee(null),[at,lt]=ee("top-right"===H?"right":"left"),ct=Z(!1),ut=Z(null);_(()=>{const e=ut.current;e&&(ge?e.style.setProperty("--window-accent-rgb",ge):e.style.removeProperty("--window-accent-rgb"))},[ge]);const dt=Z(!1),ht=Z(null),mt=Z(null),pt=Z(null),[ft,wt]=ee(!1),yt=Z(null),gt=Z(null),vt=Z(null),[bt,xt]=ee(!1);_(()=>{const e=gt.current,t=vt.current;if(!e||!t)return;const n=()=>xt(function(e,t){return e.scrollWidth>t.clientWidth}(t,e));if(n(),"undefined"==typeof ResizeObserver)return;const r=new ResizeObserver(n);return r.observe(e),r.observe(t),()=>r.disconnect()},[null!=g&&!1!==g]);const kt=!!O&&!B&&!X&&!V&&(O.editing||"hidden"!==O.state),Et=!!(g||T||I)||ft||kt,Ct=J($e),Mt=""!==J(an),Nt=Z(null);Nt.current=Ge?{owner:Ge.key,tab:Ge.tab,root:!Mt}:null;const St=we||(Ge&&!Mt?Ge.key:null),Lt=!!Ct&&!Mt&&Ct.enabled&&Ct.hasState&&(P||Ct.declaredEditable)&&!Ct.handMounted&&Et&&!B&&!X&&!V&&!ke,Tt=/* @__PURE__ */he(j,{name:"window",className:"h-4 w-4",strokeWidth:1.5}),zt=u&&re(u)?ae(u,{className:`h-4 w-4 ${u.props?.className??""}`.trim()}):u??Tt,At=()=>/* @__PURE__ */he("button",{onPointerDown:e=>e.stopPropagation(),onClick:e=>{e.stopPropagation();const t=e.currentTarget.getBoundingClientRect();Ve(e=>e?null:{x:t.left,y:t.bottom+4})},className:"shrink-0 p-0.5 rounded hover:bg-gray-200/50 transition-colors",title:"Window menu",children:zt}),Dt=40,{minimize:Pt,items:Rt,restoreIfMinimized:$t,openWindows:jt}=st(),Ft=Z(`modal-${Math.random().toString(36).slice(2,8)}`).current,qt=y(Ft);Q(()=>{if(B)return sr.add(Ft),()=>{sr.delete(Ft)}},[B,Ft]),Q(()=>{const e=e=>{const t=e.detail;t?.id===Ft&&Pe(t.title)};return window.addEventListener("window-title-update",e),()=>window.removeEventListener("window-title-update",e)},[Ft]);const[Ht,Bt]=ee(q.window),Ut=function(e){const t=te(N,S);return E.length<=1||t===e}(Ft),Yt=Z(O);Yt.current=O;const Xt=!!O&&!O.editing&&"enabled"===O.state;Q(()=>{if(!t||!Ut||!Xt)return;const e=e=>{("KeyE"===e.code||"E"===e.key||"e"===e.key)&&e.altKey&&e.shiftKey&&!e.metaKey&&!e.ctrlKey&&(v(e.target,ut.current)||(e.preventDefault(),e.stopPropagation(),Yt.current?.onEdit()))};return window.addEventListener("keydown",e,!0),()=>window.removeEventListener("keydown",e,!0)},[t,Ut,Xt]);const Vt=function(e){return te(N,()=>Kn.has(e))}(Ft);It({panelRef:ut,bodyRef:ht,open:t,widget:!!B,active:Ut,minimized:Vt});const Jt=te(Pr,Rr),_t=te(Fr,qr),Qt=te(Yr,Xr),en=!F&&!B,nn=Jt&&en,[rn,on]=ee(!1),ln=nn&&Qt===Ft,[cn,hn]=ee(!1),mn=cn&&en&&_t===Ft?"picked":null,fn=Z(nn);Q(()=>{if(fn.current&&!nn){hn(!0);const e=setTimeout(()=>{hn(!1),$r===Ft&&Hr(null)},700);return fn.current=nn,()=>clearTimeout(e)}fn.current=nn},[nn,Ft]),Q(()=>{nn||on(!1)},[nn]),Q(()=>{const e=mt.current,t=pt.current;if(!e&&!t)return;const n=e=>e?Array.from(e.children).filter(e=>"shell"!==e.dataset.undoControls).length:0,r=()=>wt(n(e)+n(t)>0);r();const o=new MutationObserver(r);return e&&o.observe(e,{childList:!0}),t&&o.observe(t,{childList:!0}),()=>o.disconnect()},[t]),Q(()=>{const e=e=>{if(e.target.closest('button[type="submit"]')&&ut.current){const t=ut.current.querySelector("form");t&&(e.preventDefault(),t.requestSubmit())}},t=mt.current,n=pt.current;return t&&t.addEventListener("click",e),n&&n.addEventListener("click",e),()=>{t&&t.removeEventListener("click",e),n&&n.removeEventListener("click",e)}},[t]);const wn=Z(!1),yn=ne(e,[]),gn=ne(()=>{const t=e(),n=fe?fe[0]:In[h]||672,o=t.w-80,i=t.h-80,a=Math.min(n,o),s=Wn[Rn()],l=fe?Math.min(fe[1],i):(()=>{const e=("sm"===h?500:"md"===h?600:"lg"===h?700:"xl"===h?800:920)*s;return Math.max(320,Math.min(e,t.h-80))})(),c="cascade"!==(getComputedStyle(document.documentElement).getPropertyValue("--window-position")?.trim()||"cascade")||r()?0:30*(E.length-1),u=Math.max(Dt,(i-l)/2),d=(o-a)/2,m=t.h-Dt-l-u;return"top-right"===H?{x:t.x+t.w-a-Dt,y:t.y+Dt,w:a,h:l}:"top-left"===H?{x:t.x+Dt,y:t.y+Dt,w:a,h:l}:{x:t.x+Math.max(Dt,(o-a)/2+Dt)+Math.min(c,Math.max(0,d)),y:t.y+u+Math.min(c,Math.max(0,m)),w:a,h:l}},[h]),vn=Z(!1);t||(vn.current=!1);const bn=we||d||null;Q(()=>{if(!t)return;nr(Ft,bn,Nt.current??void 0),we||ir(Ft),wn.current=!1,Bt(Tr(Ft));const e=()=>{Bt(Tr(Ft))},n=()=>{},r=e=>{if(!e)return!1;if(e.windowKey)return e.windowKey===we;if(!e.label)return!1;const t=ut.current?.querySelector("[data-window-title]");return!!t?.textContent?.includes(e.label)},o=e=>{if(!r(e.detail))return;if(ir(Ft),Dn.current)return;const t=ur(),n=Math.min(Jn.current.w,t.w-40),o=Math.min(Jn.current.h,t.h-40),i=t.x+(t.w-n)/2,a=t.y+(t.h-o)/2;Mn({x:i,y:a,w:n,h:o}),Vn(!1)},i=e=>{const t=e.detail;r(t)&&(ir(Ft),Ve({x:t.x,y:t.y}))},a=e=>{if(e.detail?.windowKey!==we)return;ir(Ft);const t=Jn.current,n=function(e,t=ur()){const n=Math.min(e.w,t.w),r=Math.min(e.h,t.h);return{w:n,h:r,x:Math.min(Math.max(e.x,t.x),t.x+t.w-n),y:Math.min(Math.max(e.y,t.y),t.y+t.h-r)}}(t);if(n.x===t.x&&n.y===t.y&&n.w===t.w&&n.h===t.h)return;const r=ut.current,o="function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;if(r&&!o){let e=!1;const t=()=>{e||(e=!0,r.style.transition="",window.dispatchEvent(new CustomEvent("modal-geometry")))};r.style.transition="left .28s ease, top .28s ease, width .28s ease, height .28s ease",r.addEventListener("transitionend",t,{once:!0}),window.setTimeout(t,400)}Mn(n)};return window.addEventListener("modal-reorder",e),window.addEventListener("modal-split-view",n),window.addEventListener("modal-center",o),window.addEventListener("modal-reveal",a),window.addEventListener("modal-context-menu",i),()=>{!function(e){const t=E.indexOf(e);-1!==t&&(E.splice(t,1),qn()),Kn.delete(e),$n.delete(e),Un.delete(e);const n=Bn.get(e);n&&(Bn.delete(e),Hn.delete(n))}(Ft),window.removeEventListener("modal-reorder",e),window.removeEventListener("modal-split-view",n),window.removeEventListener("modal-center",o),window.removeEventListener("modal-reveal",a),window.removeEventListener("modal-context-menu",i),window.dispatchEvent(new CustomEvent("modal-reorder"))}},[t,Ft,bn,yn]);const xn=!B&&"maximized"===Rn(),[En,Mn]=ee(()=>{if(bn&&kn[bn]){const e={...kn[bn]};return fe&&(e.w=fe[0],oe||(e.h=fe[1])),fr(e)}return C?{x:C.x,y:C.y,w:C.w,h:C.h}:xn?yn():gn()}),[Nn,Sn]=ee(()=>!oe),Ln=Z(be),Tn=Z(null);Q(()=>{const e=()=>{const e=r();e!==Ln.current&&Tn.current?.(e),Ln.current=e,xe(e),Bt(Tr(Ft))};return window.addEventListener("react-os-shell:layout-mode-changed",e),()=>window.removeEventListener("react-os-shell:layout-mode-changed",e)},[Ft]);const zn=be&&!!Ge?.tab&&!Mt&&!B&&!ke,An=zn,Dn=Z(An);Dn.current=An;const On=Xn(),jn=be&&!!Ge?.tab&&!B&&!ke&&!Jt&&On!==Ge.key,Fn=!!B&&be&&!Jt&&null!==On,[Yn,Vn]=ee(()=>bn&&kn[bn]||C?An:An||xn),Jn=Z(En);Jn.current=En;const Gn=Z(Yn);_(()=>{Gn.current=Yn},[Yn]),_(()=>{if(Nn||zn)return;const e=ut.current,t=ht.current;if(!e||!t)return;const n=ie??(B?0:240),r=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--taskbar-height"))||0;let o=0,i=null,a=null;const s=()=>{const c=t.firstElementChild;if(!c||e.offsetHeight<=0)return;c!==a&&(a&&l.unobserve(a),l.observe(c),a=c);const u=e.offsetHeight-t.offsetHeight,d=t.style.flex,h=t.style.overflowY,m=t.style.height;t.style.flex="0 0 auto",t.style.height="auto",t.style.overflowY="visible";const p=t.offsetHeight,f=c.offsetHeight;t.style.flex=d,t.style.height=m,t.style.overflowY=h;const w=c.offsetHeight>f+4,y=Math.max(n,window.innerHeight-r-Math.max(0,Jn.current.y)-24),g=w?Math.min(Jn.current.h,y):Math.min(Math.max(n,u+p),y),v=Math.abs(g-o)>1;v&&(o=g,Mn(e=>Math.abs(e.h-g)>1?{...e,h:g}:e)),B||(g<=n?i&&(clearTimeout(i),i=null):(v||null===i)&&(i&&clearTimeout(i),i=setTimeout(()=>{const e=o;s(),o===e&&Sn(!0)},160)))},l=new ResizeObserver(s);s(),yt.current&&l.observe(yt.current);const c=new MutationObserver(s);return c.observe(t,{childList:!0,subtree:!0,characterData:!0}),()=>{l.disconnect(),c.disconnect(),i&&clearTimeout(i)}},[Nn,B,ie,Et,zn]),_(()=>{if(!oe||!Nn||B||!t)return;const e=yt.current;if(!e)return;let n=e.offsetHeight;const r=new ResizeObserver(()=>{if(!e.isConnected)return;const t=e.offsetHeight,r=t-n,o=t>0!=n>0;if(n=t,!o||0===r||Yn)return;if(document.body.classList.contains("rosh-gesturing"))return;const i=ie??240,a=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--taskbar-height"))||0,s=Math.max(i,window.innerHeight-a-Math.max(0,Jn.current.y)-24);Mn(e=>({...e,h:Math.min(Math.max(i,e.h+r),s)}))});return r.observe(e),()=>r.disconnect()},[oe,Nn,B,t,Yn,ie]);const _n=!1!==ce&&!B&&!V&&!ke,[Qn,er]=ee(()=>!_n);_(()=>{if(Qn||!t)return;if(!_n||Yn)return void er(!0);const n=ut.current,r=ht.current;if(!n||!r)return;const o=/* @__PURE__ */new WeakSet;let l=Jn.current.w,c=0;const u=()=>er(!0),d=()=>{c=0;const t=Jn.current;if(Math.abs(t.w-l)>1||document.body.classList.contains("rosh-gesturing"))return void u();const d=e(),h=d.w-80;if(t.w>=h)return void u();const m=[],p=[];for(const e of[r,...Array.from(r.querySelectorAll("*"))]){const t=e.scrollWidth-e.clientWidth;if(t<=4||o.has(e))continue;const n=getComputedStyle(e).overflowX;"auto"!==n&&"scroll"!==n||(m.push(e),p.push(t))}if(!m.length)return;const f=Math.min(h,t.w+Math.max(...p)),w=f-t.w,y=n.style.width;n.style.width=`${f}px`;const g=m.map((e,t)=>({over:p[t],residual:e.scrollWidth-e.clientWidth}));n.style.width=y,g.forEach((e,t)=>{i(e,w)||o.add(m[t])});const v=a(t,s(t.w,w,g),d,Dt);v!==t&&(l=v.w,Mn(v))};d();const h=new MutationObserver(()=>{c||(c=requestAnimationFrame(d))});h.observe(r,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:["style","class","hidden"]});const m=setTimeout(u,Pn);return()=>{h.disconnect(),c&&cancelAnimationFrame(c),clearTimeout(m)}},[Qn,t,_n,Yn]);const tr=Z(null),rr=!(!Ge?.tab||Mt||B||ke);Tn.current=t=>{if(!rr)return;if(t)return tr.current||(tr.current={box:{...Jn.current},maximized:Gn.current}),void(Gn.current=!0);const r=tr.current;tr.current=null;const o=e();if(r?.maximized)return Gn.current=!0,Vn(!0),void Mn(o);const i=r?.box??(bn?kn[bn]:void 0);if(Gn.current=!1,Vn(!1),i&&!n(i,o,!1)){const e={...i};fe&&(e.w=fe[0],oe||(e.h=fe[1])),Mn(fr(e))}else Mn(gn())},Q(()=>{An&&(Gn.current=!0,Vn(!0),Mn(yn()))},[An,yn]),Q(()=>{if(B)return;const e=()=>{const e=bn?kn[bn]:void 0;if(Gn.current=!1,Vn(!1),e){const t={...e};fe&&(t.w=fe[0],oe||(t.h=fe[1])),Mn(fr(t))}else Mn(gn())};return window.addEventListener("react-os-shell:restore-windowed",e),()=>window.removeEventListener("react-os-shell:restore-windowed",e)},[B,gn,bn]),Q(()=>{t&&bn&&!zn&&(kn[bn]=En,Cn()),t&&window.dispatchEvent(new CustomEvent("modal-geometry"))},[En,t,bn,zn]),Q(()=>{if(!t)return;const e=()=>{Gn.current?Mn(yn()):document.body.classList.contains("rosh-gesturing")||Mn(fr)};window.addEventListener("resize",e),window.addEventListener(o,e);let n=null;return Yn&&(n=new MutationObserver(e),n.observe(document.body,{childList:!0,subtree:!1,attributes:!0,attributeFilter:["class"]})),()=>{window.removeEventListener("resize",e),window.removeEventListener(o,e),n?.disconnect()}},[t,Yn,yn]),Q(()=>{if(t&&(He(!1),Be.current=!1,ct.current=!1,er(!_n),!Dn.current)){if(bn&&kn[bn]){const e=kn[bn];return void Mn(t=>fr({...e,...oe?{h:t.h}:{},..._n?{x:t.x,w:t.w}:{}}))}C&&(Mn({x:C.x,y:C.y,w:C.w,h:C.h}),Vn(C.maximized))}},[t]),Q(()=>{if(!t||"auto"!==m)return;let e;const n=t=>{ut.current?.contains(t.target)&&!Be.current&&(Be.current=!0,e=setTimeout(()=>He(!0),0))};return document.addEventListener("input",n,!0),document.addEventListener("change",n,!0),()=>{clearTimeout(e),document.removeEventListener("input",n,!0),document.removeEventListener("change",n,!0)}},[t,m]);const or="auto"===m?qe:!0===m,dr=Ge&&!Mt?Ge.key:null,hr=se(()=>Gt(Ie),[Ie]),wr=Z({shortcutSpec:Je,isOnDesktop:tt,toggleDesktopShortcut:nt,taskbarStrings:Re.taskbar});_(()=>{wr.current={shortcutSpec:Je,isOnDesktop:tt,toggleDesktopShortcut:nt,taskbarStrings:Re.taskbar}});const gr=Z(null);gr.current||(gr.current={open:(e,t)=>Ve({x:e,y:t}),items:()=>{const e=wr.current,t=[];e.shortcutSpec&&t.push({label:e.isOnDesktop?e.taskbarStrings.removeFromDesktop:e.taskbarStrings.addToDesktop,onSelect:e.toggleDesktopShortcut});for(const e of pn[Ft]||[])t.push({label:e.label,icon:e.icon,onSelect:e.onClick});return t}}),Q(()=>{if(t&&dr)return()=>{return e=dr,void(Zt.delete(e)&&tn());var e}},[t,dr]),it(!(we||!t)&&or);const xr=ne(()=>or||"auto"===m&&Be.current,[or,m]),kr=ne(async e=>{if(ct.current)return!1;if(!xr())return!0;ct.current=!0;const t=Ke,n="close"===e?"Are you sure you want to close?":"discard"===e?"Are you sure you want to stop editing?":"Are you sure you want to continue?",r=await w({title:"Discard changes?",message:t?`“${t}” has unsaved changes. ${n} All changes will be lost.`:`You have unsaved changes. ${n} All changes will be lost.`,confirmLabel:"Discard",cancelLabel:"Keep Editing",variant:"warning"});return ct.current=!1,r},[xr,Ke]),Er=ne(()=>ct.current?Promise.resolve():xr()?kr("close").then(e=>{e&&l()}):(l(),Promise.resolve()),[xr,kr,l]),Mr=ne(async()=>{await kr("discard")&&(Be.current=!1,He(!1),Yt.current?.onDiscard())},[kr]),Ar=ne(async()=>{const e=await kr("switch");return e&&(Be.current=!1,He(!1)),e},[kr]),Dr=Z(()=>!1);_(()=>{Dr.current=xr}),_(()=>{if(!t||!we)return;const e={holdsChanges:()=>Dr.current(),ask:Ar};return Zn.set(we,e),()=>{Zn.get(we)===e&&Zn.delete(we)}},[t,we,Ar]),_(()=>{if(!t||!St)return;const e=e=>{e.detail?.windowKey===St&&Er()};return window.addEventListener(zr,e),()=>window.removeEventListener(zr,e)},[t,St,Er]);const Ir=Z(null),Kr=ne(e=>{if(0!==e.button)return;if(e.target.closest("button, input, a, kbd, select, textarea"))return;if(Ve(null),ir(Ft),Dn.current)return void e.preventDefault();e.preventDefault();const t=e.currentTarget,n=e.pointerId;let r=null;const o=e.clientX,i=e.clientY,a=ut.current,s=a?.getBoundingClientRect();let l,c,u,d;if(Ir.current){const t=Ir.current;Ir.current=null,d=t.w,u=t.h;const n=s?Math.min(Math.max(20,e.clientX-s.left),t.w-20):t.w/2;l=e.clientX-n,c=e.clientY-12,a&&(a.style.width=`${d}px`,a.style.height=`${u}px`,a.style.left=`${l}px`,a.style.top=`${c}px`)}else l=s?s.left:Jn.current.x,c=s?s.top:Jn.current.y,u=s?s.height:Jn.current.h,d=s?s.width:Jn.current.w;Vn(!1),Mn(e=>({...e,x:l,y:c,w:d,h:u}));let h=null;const m=e=>{if(!r){if(Math.abs(e.clientX-o)<Sr&&Math.abs(e.clientY-i)<Sr)return;r=Lr(t,n,"move","move"),a&&(a.style.transition="none")}const s=l+e.clientX-o,u=Math.max(0,c+e.clientY-i);if(a&&(a.style.transform=`translate(${s-l}px, ${u-c}px)`),Jn.current={...Jn.current,x:s,y:u},!B){const t=function(e,t){const n=ur(),r=e<=n.x+lr,o=e>=n.x+n.w-lr,i=t<=n.y+lr,a=t>=n.y+n.h-lr,s=e<=n.x+cr,l=e>=n.x+n.w-cr,c=t<=n.y+cr,u=t>=n.y+n.h-cr;return i&&s?"tl":i&&l?"tr":a&&s?"bl":a&&l?"br":c&&r?"tl":c&&o?"tr":u&&r?"bl":u&&o?"br":i?"top":r?"left":o?"right":null}(e.clientX,e.clientY);t!==h&&(h=t,t?vr(yr(t)):br())}},p=()=>{window.removeEventListener("pointermove",m),window.removeEventListener("pointerup",p),r?.(),br();const e=fr({...Jn.current});if(Jn.current=e,!B&&h){Ir.current={x:l,y:c,w:d,h:u};const e=yr(h);return a&&(a.style.left=`${e.x}px`,a.style.top=`${e.y}px`,a.style.width=`${e.w}px`,a.style.height=`${e.h}px`,a.style.transform="",a.style.transition=""),void Mn(e)}if(B){const t=e.x+e.w/2,n=window.innerWidth/2;lt(t>n?"right":"left")}a&&(a.style.left=`${e.x}px`,a.style.top=`${e.y}px`,a.style.transform="",a.style.transition=""),Mn(e)};window.addEventListener("pointermove",m),window.addEventListener("pointerup",p)},[]),Or=ne((e,t)=>{if(0!==e.button)return;e.preventDefault(),e.stopPropagation();const n=e.currentTarget,r=e.pointerId;let o=null;const i=e.clientX,a=e.clientY,s=ut.current,l=s?.getBoundingClientRect(),c=l?l.left:Jn.current.x,u=l?l.top:Jn.current.y,d=l?l.width:Jn.current.w,h=l?l.height:Jn.current.h,m="sw"===t||"nw"===t||"w"===t,p="ne"===t||"nw"===t||"n"===t,f="se"===t||"ne"===t||"e"===t,w="se"===t||"sw"===t||"s"===t;Vn(!1),Mn({x:c,y:u,w:d,h:h}),Jn.current={x:c,y:u,w:d,h:h};let y=0,g=null;const v=()=>{if(y=0,!g)return;const e=g;g=null,Jn.current=e,s&&(s.style.left=`${e.x}px`,s.style.top=`${e.y}px`,s.style.width=`${e.w}px`,s.style.height=`${e.h}px`)},b=e=>{if(!o){if(Math.abs(e.clientX-i)<Sr&&Math.abs(e.clientY-a)<Sr)return;o=Lr(n,r,Nr[t],"resize")}g=((e,t)=>{let n=c,r=u,o=d,i=h;if(f&&(o=Math.max(mr,d+e)),w&&(i=Math.max(pr,h+t)),m){const t=Math.max(mr,d-e);n=c+d-t,o=t}if(p){const e=Math.max(pr,h-t);r=u+h-e,i=e}return{x:n,y:r,w:o,h:i}})(e.clientX-i,e.clientY-a),y||(y=requestAnimationFrame(v))},x=()=>{window.removeEventListener("pointermove",b),window.removeEventListener("pointerup",x),y&&cancelAnimationFrame(y),v(),o?.(),Mn({...Jn.current})};window.addEventListener("pointermove",b),window.addEventListener("pointerup",x)},[]),jr=ne(e=>{if(e.target.closest("button, input, a, kbd, select, textarea"))return;const t={ArrowLeft:[-1,0],ArrowRight:[1,0],ArrowUp:[0,-1],ArrowDown:[0,1]}[e.key];if(!t&&"Enter"!==e.key)return;if(e.preventDefault(),e.stopPropagation(),ir(Ft),"Enter"===e.key)return void(Yn?(Vn(!1),Mn(gn())):(Vn(!0),Mn(yn())));const[n,r]=t;if(e.ctrlKey||e.metaKey){const e=()=>{Ir.current||(Ir.current={...Jn.current})};if(r<0)return e(),Vn(!0),void Mn(yn());if(r>0){if(Yn)return Vn(!1),void Mn(gn());if(Ir.current){const e=fr(Ir.current);return Ir.current=null,Jn.current=e,void Mn(e)}return void ar(Ft)}e(),Vn(!1);const t=yr(n<0?"left":"right");return Jn.current=t,void Mn(t)}if(Yn)return;const o=Jn.current,i=e.shiftKey?{...o,w:Math.max(mr,o.w+24*n),h:Math.max(pr,o.h+24*r)}:fr({...o,x:o.x+24*n,y:Math.max(0,o.y+24*r)});Jn.current=i,Mn(i)},[Ft,Yn,gn,yn]),Br=ne(e=>{Ir.current||(Ir.current={...Jn.current}),Vn(!1);const t=yr(e);Jn.current=t,Mn(t),ir(Ft)},[Ft]),Ur=An||nn?{}:{tabIndex:0,role:"group","aria-label":Ke?`${Ke} — ${We.windowSuffix}`:We.windowSuffix,"aria-keyshortcuts":"ArrowUp ArrowDown ArrowLeft ArrowRight Shift+ArrowUp Shift+ArrowDown Shift+ArrowLeft Shift+ArrowRight Control+ArrowUp Control+ArrowDown Control+ArrowLeft Control+ArrowRight Enter",onKeyDown:jr},Vr=()=>{Vn(!0),Mn(yn())},Jr=ne(()=>{const e=ut.current;if(!e)return;const t=e.querySelector("form");if(t)t.requestSubmit();else{const t=e.querySelector(un);t&&!t.disabled&&t.click()}},[]);Q(()=>{if(!t)return;if(B)return;const e=e=>{if(E[E.length-1]===Ft&&!v(e.target,ut.current)&&"Enter"===e.key){const t=e.target;if("TEXTAREA"===t.tagName||t.isContentEditable)return;if(e.metaKey||e.ctrlKey)e.preventDefault(),Jr();else{if("INPUT"===t.tagName&&t.closest("form"))return;if(!(t instanceof Element&&ut.current?.contains(t)))return;if(t.closest(L))return;e.preventDefault()}}};return window.addEventListener("keydown",e,!0),()=>window.removeEventListener("keydown",e,!0)},[t,Jr,Ft,B]),Q(()=>{if(!t)return;const e=e=>{E[E.length-1]===Ft&&(v(e.target,ut.current)||((e.metaKey||e.ctrlKey)&&"s"===e.key?(e.preventDefault(),document.dispatchEvent(new CustomEvent("modal-save",{detail:{modalId:Ft}})),Be.current=!1,He(!1)):e.altKey&&e.shiftKey&&("KeyD"===e.code||"D"===e.key||"d"===e.key)&&(e.preventDefault(),document.dispatchEvent(new CustomEvent("modal-duplicate",{detail:{modalId:Ft}})))))};return window.addEventListener("keydown",e,!0),()=>window.removeEventListener("keydown",e,!0)},[t]),Q(()=>{if(!t)return;if(B)return;const e=e=>{if("Escape"===e.key&&E[E.length-1]===Ft){if(U(e))return e.preventDefault(),void e.stopPropagation();if(zn&&!P)return;e.preventDefault(),e.stopPropagation(),Er()}};return window.addEventListener("keydown",e,!0),()=>window.removeEventListener("keydown",e,!0)},[t,Er,Ft,B,zn,P]);const Gr=t&&(void 0!==p||void 0!==f),[_r]=ee(()=>{if("undefined"==typeof document)return null;const e=document.createElement("span");return e.className="flex shrink-0 items-center gap-2",e.setAttribute("data-tab-actions",""),e}),Zr=zn&&!Ge?.home&&hr.actions.length>0;Q(()=>{t&&dr&&function(e,t){const n=Zt.get(e);n&&n.title===t.title&&n.dirty===t.dirty&&n.copy===t.copy&&n.actions===t.actions&&n.menu===t.menu||(Zt.set(e,t),tn())}(dr,{title:hr.text||Ke,dirty:or,copy:hr.copy,actions:Zr&&_r?_r:void 0,menu:gr.current??void 0})},[t,dr,Ke,or,hr.text,hr.copy,Zr,_r]);const Qr=ne(e=>{const t=document.getElementById("nav-boundary-toast");t&&t.remove();const n="bottom"===e?["That's the last one, chief.","You've hit rock bottom... of the list.","End of the line, buddy.","Nothing left. Go outside.","Congratulations, you scrolled to the void.","There's no more. I checked.","You've reached the edge of the known universe.","Plot twist: there is no next one.","Even scrolling has limits. Unlike your ambition.","Last one. Time to touch grass."]:["Already at the top. Overachiever.","There is no item above this. Trust me.","You're #1. Literally.","Can't go higher. You've peaked.","This is it. The summit. The top.","First item. No VIP lounge above this.","Going up? Nope. Elevator's broken.","You want negative indexes? Bold.","Top of the list. Top of the world.","The only way is down from here."],r=n[Math.floor(Math.random()*n.length)],o=document.createElement("div");o.id="nav-boundary-toast",o.className="fixed bottom-6 left-1/2 -translate-x-1/2 z-(--z-toast) bg-gray-900 text-on-accent flex min-h-10 items-center px-5 py-3 rounded-lg shadow-lg text-sm font-medium transition-opacity duration-300",o.textContent=r,document.body.appendChild(o),setTimeout(()=>{o.style.opacity="0",setTimeout(()=>o.remove(),300)},2e3)},[]);if(Q(()=>{if(!t)return;const e=e=>{if(E[E.length-1]!==Ft)return;if(v(e.target,ut.current))return;const t=e.target.tagName;"INPUT"!==t&&"TEXTAREA"!==t&&"SELECT"!==t&&(e.target.isContentEditable||("j"===e.key&&Gr&&(e.preventDefault(),p?p():Qr("bottom")),"k"===e.key&&Gr&&(e.preventDefault(),f?f():Qr("top"))))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[t,p,f,Gr,Qr,Ft]),!t||vn.current)return null;const eo=nn?function(e){if("undefined"==typeof document)return null;const t=Array.from(document.querySelectorAll("[data-modal-panel]")).filter(e=>{const t=e;return!t.hasAttribute("data-utility")&&!t.hasAttribute("data-widget")&&"none"!==t.style.display});t.sort((e,t)=>(e.getAttribute("data-modal-id")||"").localeCompare(t.getAttribute("data-modal-id")||""));const n=t.findIndex(t=>t.getAttribute("data-modal-id")===e),r=t.length;if(n<0||r<1)return null;const o=Math.ceil(Math.sqrt(r)),i=Math.ceil(r/o),a=Math.floor(n/o),s=n%o,l=r-o*(i-1),c=a===i-1&&l<o,u=ur(),d=(u.w-20*(o+1))/o,h=(u.h-14*(i+1)-22*i)/i,m=c?(o-l)*(d+20)/2:0;return{x:u.x+20+s*(d+20)+m,y:u.y+14+a*(h+14+22),w:d,h:h}}(Ft):null,to=nn&&eo?Math.min(eo.w/En.w,eo.h/En.h):1,no=(()=>{if(nn&&eo){const e=to,t=En.w*e,n=En.h*e,r=eo.x+(eo.w-t)/2-En.x,o=eo.y+(eo.h-n)/2-En.y,i=rn||ln;return{transform:`translate(${r}px, ${o}px) scale(${e})`,transformOrigin:"top left",transition:"transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 280ms",cursor:"pointer",zIndex:q.expose+(i?20:10),boxShadow:i?"0 24px 72px rgba(0,0,0,0.6), 0 0 0 2px rgba(255,255,255,0.55), 0 0 36px 12px rgba(96,165,250,0.85), 0 0 96px 28px rgba(96,165,250,0.55)":"0 16px 48px rgba(0,0,0,0.55)",pointerEvents:"auto"}}if(cn&&en){const e="picked"===mn;return{transition:e?"transform 640ms cubic-bezier(0.34, 1.42, 0.64, 1), box-shadow 600ms":"transform 600ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 600ms",...e?{zIndex:q.expose+30}:{}}}return null})(),ro=b({modal:!1,titleId:!B&&(zn?!Ge?.home:!ke)?je:void 0,label:hr.text||Ke}),oo=/* @__PURE__ */de("div",{children:[
49
+ /* @__PURE__ */de("div",{ref:ut,"data-modal-panel":!0,"data-modal-id":Ft,"data-window-key":we||void 0,...F?{"data-utility":""}:{},...Ue?{"data-pinned-top":""}:{},...B?{"data-widget":""}:{},...Ge?{"data-window-owner":Ge.key}:{},...Ge&&!Mt?{"data-window-root":""}:{},...zn?{"data-window-tab":""}:{},...ro,className:zn?"fixed flex flex-col overflow-hidden":"fixed rounded-(--radius-window) flex flex-col overflow-hidden "+(B?Ut?"shadow-xl":"shadow-lg":"border "+(Ut?"shadow-xl border-line":"shadow-lg border-line-strong")),onMouseDownCapture:e=>{if(dt.current=!1,nn){if(e.target.closest("[data-expose-close]"))return;return e.preventDefault(),e.stopPropagation(),Hr(Ft),Wr(!1),void ir(Ft)}if(!Ut&&!B&&!Ue&&0===e.button){const t=e.target;t.closest("[data-modal-panel]")===ut.current&&t.closest("button, input, a, select, textarea")&&!t.closest("[data-window-chrome]")&&(e.preventDefault(),e.stopPropagation(),dt.current=!0,Ve(null),ir(Ft),window.addEventListener("mouseup",()=>{setTimeout(()=>{dt.current=!1},0)},{once:!0}))}},onClickCapture:e=>{dt.current&&(dt.current=!1,e.preventDefault(),e.stopPropagation())},onMouseDown:e=>{if(nn)return;Ve(null);e.target.closest("[data-modal-panel]")===ut.current&&(e.target.closest("button, input, a, select, textarea")||ir(Ft))},style:ke?{zIndex:Ht+1,top:0,left:0,right:0,bottom:"var(--mobile-bottom-nav, 56px)",width:"auto",height:"auto",transform:`translateX(${Ce}px)`,transition:Ne?"none":"transform 180ms ease-out",...B?{display:"none"}:{},...Ht<0?{display:"none"}:{},...Ut||Ue||De&&we===De?{}:{display:"none"},...qt?{visibility:"hidden",pointerEvents:"none"}:{}}:{zIndex:Ue?q.pinnedWindow:Ht+1,width:En.w,height:En.h,top:En.y,...B&&"right"===at?{right:window.innerWidth-En.x-En.w}:{left:En.x},...Ht<0&&!Ue?{display:"none"}:{},...Ee?{display:"none"}:{},...jn||Fn||qt?{visibility:"hidden",pointerEvents:"none"}:{},...no??{}},children:[ke&&!B&&/* @__PURE__ */he("div",{onPointerDown:Ae,className:"absolute top-0 bottom-0 left-0 w-[22px] z-[5]",style:{touchAction:"pan-y"},"aria-hidden":"true"}),B?null:zn?Ge?.home?null:/* @__PURE__ */de(me,{children:[
50
+ /* @__PURE__ */he("h2",{id:je,"data-window-title":!0,className:"sr-only",children:hr.text||Ke}),Zr&&_r&&pe(
51
+ /* @__PURE__ */he(me,{children:hr.actions}),_r),hr.badges.length>0&&/* @__PURE__ */he("div",{"data-window-chrome":"","data-record-bar":"",className:"flex h-9 shrink-0 select-none items-center gap-2 overflow-hidden border-b border-gray-200 px-4",style:{backgroundColor:"rgb(var(--window-content-rgb))"},children:hr.badges})]}):ke?null:
52
+ /* @__PURE__ */de("div",X?{onPointerDown:Kr,"data-window-chrome":"",...Ur,className:"flex items-center justify-between h-(--row-height-compact-bar) px-3 border-b border-line shrink-0 cursor-move select-none rounded-t-(--radius-window) focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-blue-400 "+(Ut?"backdrop-blur-sm":""),style:{touchAction:"none",backgroundColor:Ut?"rgb(var(--window-header-rgb) / var(--active-header-opacity, 0.8))":"rgb(var(--window-header-rgb) / var(--inactive-header-opacity, 0.7))"},children:[
53
+ /* @__PURE__ */de("div",{"data-window-title":!0,title:Ke,className:"text-sm font-medium min-w-0 flex-1 truncate flex items-center gap-2",style:{color:Ut?"var(--window-title-active, rgb(17 24 39))":"var(--window-title-inactive, rgb(156 163 175))"},children:[!nn&&At(),
54
+ /* @__PURE__ */he("span",{id:je,className:"truncate",children:nn?dn(Ie):Ie})]}),!nn&&/* @__PURE__ */de("div",{className:"flex items-center gap-2 shrink-0 ml-2",children:[F&&/* @__PURE__ */he("button",{onClick:()=>Ye(e=>!e),title:Ue?We.unpin:We.pinOnTop,className:"p-0.5 rounded hover:bg-gray-200 "+(Ue?"text-blue-600":"text-gray-400 hover:text-gray-600"),children:/* @__PURE__ */he(j,{name:"bookmark-square",className:"h-3 w-3",fill:Ue?"currentColor":"none",strokeWidth:1.5})}),
55
+ /* @__PURE__ */he("button",{type:"button",onClick:Er,"aria-label":We.close,className:"rounded p-0.5 text-ink-faintest hover:text-gray-600 hover:bg-gray-200",children:/* @__PURE__ */he(j,{name:"close",className:"h-4 w-4"})})]})]}:V?{onPointerDown:Kr,"data-window-chrome":"",...Ur,className:"flex items-center justify-between h-(--row-height-compact-bar) px-3 border-b border-line shrink-0 cursor-move select-none rounded-t-(--radius-window) focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-blue-400 "+(Ut?"backdrop-blur-sm":""),style:{touchAction:"none",backgroundColor:Ut?"rgb(var(--window-header-rgb) / var(--active-header-opacity, 0.8))":"rgb(var(--window-header-rgb) / var(--inactive-header-opacity, 0.7))"},children:[
56
+ /* @__PURE__ */de("div",{"data-window-title":!0,title:Ke,className:"text-sm font-medium min-w-0 flex-1 truncate flex items-center gap-2",style:{color:Ut?"var(--window-title-active, rgb(17 24 39))":"var(--window-title-inactive, rgb(156 163 175))"},children:[!nn&&At(),
57
+ /* @__PURE__ */he("span",{id:je,className:"truncate",children:nn?dn(Ie):Ie})]}),!nn&&/* @__PURE__ */de("div",{className:"flex items-center gap-2 shrink-0 ml-2",children:[F&&/* @__PURE__ */he("button",{onClick:()=>Ye(e=>!e),title:Ue?We.unpin:We.pinOnTop,className:"p-0.5 rounded hover:bg-gray-200 "+(Ue?"text-blue-600":"text-gray-400 hover:text-gray-600"),children:/* @__PURE__ */he(j,{name:"bookmark-square",className:"h-3 w-3",fill:Ue?"currentColor":"none",strokeWidth:1.5})}),
58
+ /* @__PURE__ */he("button",{onClick:()=>ar(Ft),title:We.minimize,className:"text-gray-400 hover:text-gray-600 px-1 py-0.5 rounded hover:bg-gray-200 text-xs leading-none",children:"─"}),!An&&/* @__PURE__ */he(Cr,{maximized:Yn,onToggleMax:()=>{Yn?(Vn(!1),Mn(gn())):Vr()},onSnap:Br,buttonClassName:"text-gray-400 hover:text-gray-600 px-1 py-0.5 rounded hover:bg-gray-200 text-xs leading-none",strings:We}),
59
+ /* @__PURE__ */he("button",{type:"button",onClick:Er,"aria-label":We.close,className:"rounded p-0.5 text-ink-faintest hover:text-gray-600 hover:bg-gray-200",children:/* @__PURE__ */he(j,{name:"close",className:"h-4 w-4"})})]})]}:{onPointerDown:Kr,"data-window-chrome":"",...Ur,className:"flex items-center justify-between h-(--row-height-window-bar) px-3 border-b border-gray-200 shrink-0 cursor-move select-none rounded-t-(--radius-window) focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-blue-400 "+(Ut?"backdrop-blur-sm":""),style:{touchAction:"none",backgroundColor:Ut?"rgb(var(--window-header-rgb) / var(--active-header-opacity, 0.8))":"rgb(var(--window-header-rgb) / var(--inactive-header-opacity, 0.7))"},children:[
60
+ /* @__PURE__ */de("div",{"data-window-title":!0,title:Ke,className:"text-sm font-medium min-w-0 flex-1 truncate flex items-center gap-2",style:{color:Ut?"var(--window-title-active, rgb(17 24 39))":"var(--window-title-inactive, rgb(156 163 175))"},children:[!nn&&At(),
61
+ /* @__PURE__ */he("span",{id:je,className:"truncate",children:nn?dn(Ie):Ie})]}),!nn&&/* @__PURE__ */de("div",{className:"flex items-center gap-3 shrink-0 ml-4",children:[F&&/* @__PURE__ */he("button",{onClick:()=>Ye(e=>!e),title:Ue?We.unpin:We.pinOnTop,className:"text-xs px-2 py-1 rounded hover:bg-gray-200 "+(Ue?"text-blue-600":"text-gray-400 hover:text-gray-600"),children:/* @__PURE__ */he(j,{name:"bookmark-square",className:"h-3.5 w-3.5",fill:Ue?"currentColor":"none",strokeWidth:1.5})}),
62
+ /* @__PURE__ */he("button",{onClick:()=>ar(Ft),title:We.minimize,className:"text-gray-400 hover:text-gray-600 text-xs px-2 py-1 rounded hover:bg-gray-200",children:"─"}),!An&&/* @__PURE__ */he(Cr,{maximized:Yn,onToggleMax:()=>{Yn?(Vn(!1),Mn(gn())):Vr()},onSnap:Br,buttonClassName:"text-gray-400 hover:text-gray-600 text-xs px-2 py-1 rounded hover:bg-gray-200",strings:We}),
63
+ /* @__PURE__ */he("button",{type:"button",onClick:Er,"aria-label":We.close,className:"rounded-(--radius-control) text-ink-faintest hover:text-gray-600",children:/* @__PURE__ */he(j,{name:"close",className:"h-5 w-5"})})]})]}),ge&&Qe&&!B&&!ke&&/* @__PURE__ */he("div",{"aria-hidden":"true",className:"h-[3px] shrink-0 pointer-events-none",style:{backgroundColor:`rgb(var(--window-accent-rgb) / ${Ut?.9:.55})`}}),
64
+ /* @__PURE__ */he(an.Provider,{value:Ft,children:/* @__PURE__ */he(M.Provider,{value:{rightRef:mt,leftRef:pt,notify:()=>wt(!0),active:Ut,isDirty:or,footerOpen:Et&&!B&&!X&&!V&&!ke},children:/* @__PURE__ */he("div",{ref:ht,...B?{onPointerDown:Kr,onContextMenu:e=>{e.preventDefault(),ot({x:e.clientX,y:e.clientY})}}:{},className:`flex-1 min-h-0 flex flex-col ${B?"p-0 cursor-move":V||G?"p-0":X?"p-2":"p-4"} ${B||zn?"":"backdrop-blur-sm"} ${!1===x||V||G?"overflow-hidden":"overflow-y-auto overscroll-contain"} ${B?"rounded-2xl select-none":""}`,style:{...B?{touchAction:"none"}:{},backgroundColor:B?"transparent":zn?"rgb(var(--window-content-rgb))":Ut?"rgb(var(--window-content-rgb) / var(--active-content-opacity, 0.9))":"rgb(var(--window-content-rgb) / var(--inactive-content-opacity, 0.8))"},children:/* @__PURE__ */he(Oe,{children:ve})})})}),B&&rt&&/* @__PURE__ */de(R,{minWidth:160,style:{left:rt.x,top:rt.y},onClose:()=>ot(null),children:[
65
+ /* @__PURE__ */he(W,{onClick:()=>{ot(null),window.dispatchEvent(new CustomEvent("widget-open-settings",{detail:Ft}))},children:"Settings"}),
66
+ /* @__PURE__ */he(K,{}),ue&&/* @__PURE__ */de(me,{children:[ue,
67
+ /* @__PURE__ */he(K,{})]}),
68
+ /* @__PURE__ */de(W,{onClick:()=>{ot(null),Ye(e=>!e)},children:[
69
+ /* @__PURE__ */he("span",{className:"flex-1",children:"Always on Top"}),Ue&&/* @__PURE__ */he(j,{name:"check",className:"h-4 w-4 text-blue-600 shrink-0",strokeWidth:2})]}),
70
+ /* @__PURE__ */he(K,{}),
71
+ /* @__PURE__ */he(W,{onClick:()=>{ot(null),Er()},children:"Close"})]}),
72
+ /* @__PURE__ */de("div",{onPointerDown:Kr,ref:yt,"data-modal-footer":"",className:`px-4 py-2 border-t border-gray-200 shrink-0 flex items-center justify-between text-xs select-none${zn?"":" cursor-move"}${Ut&&!zn?" backdrop-blur-sm":""}${B||X||V||ke||!Et?" hidden":""}`,style:{touchAction:"none",backgroundColor:zn?"rgb(var(--window-footer-rgb))":Ut?"rgb(var(--window-footer-rgb) / var(--active-header-opacity, 0.8))":"rgb(var(--window-footer-rgb) / var(--inactive-header-opacity, 0.7))"},children:[
73
+ /* @__PURE__ */de("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[Lt&&/* @__PURE__ */he(Fe,{auto:!0}),I,
74
+ /* @__PURE__ */he("div",{ref:pt,"data-modal-actions-left":!0,className:"flex items-center gap-2 shrink-0"}),null!=g&&!1!==g&&
75
+ /* @__PURE__ */he("div",{ref:gt,"data-modal-footer-facts":"",className:"min-w-0 flex-1 overflow-hidden",children:/* @__PURE__ */he("div",{ref:vt,className:"inline-flex items-center gap-2 whitespace-nowrap"+(bt?" invisible":""),children:g})})]}),
76
+ /* @__PURE__ */de("div",{"data-modal-footer-right":"",className:"flex items-center gap-2 ml-auto shrink-0",children:[kt&&O&&(O.editing?/* @__PURE__ */he($,{variant:"secondary",size:"sm","data-modal-discard":"",onClick:()=>{Mr()},children:We.discard}):"object"==typeof O.state?/* @__PURE__ */he($,{variant:"secondary",size:"sm","data-modal-edit":"","aria-disabled":!0,disabledReason:O.state.disabledReason,children:We.edit}):/* @__PURE__ */he($,{variant:"secondary",size:"sm","data-modal-edit":"",onClick:()=>O.onEdit(),children:We.edit})),
77
+ /* @__PURE__ */he("div",{ref:mt,"data-modal-actions":!0,className:"flex items-center gap-2"}),T]})]}),!B&&!ke&&!nn&&Ut&&!An&&/* @__PURE__ */de(me,{children:[
78
+ /* @__PURE__ */he("div",{onPointerDown:e=>Or(e,"se"),className:"absolute bottom-0 right-0 w-3 h-3 cursor-nwse-resize z-10"}),
79
+ /* @__PURE__ */he("div",{onPointerDown:e=>Or(e,"sw"),className:"absolute bottom-0 left-0 w-3 h-3 cursor-nesw-resize z-10"}),
80
+ /* @__PURE__ */he("div",{onPointerDown:e=>Or(e,"ne"),className:"absolute top-0 right-0 w-3 h-3 cursor-nesw-resize z-10"}),
81
+ /* @__PURE__ */he("div",{onPointerDown:e=>Or(e,"nw"),className:"absolute top-0 left-0 w-3 h-3 cursor-nwse-resize z-10"}),
82
+ /* @__PURE__ */he("div",{onPointerDown:e=>Or(e,"n"),className:"absolute top-0 left-3 right-3 h-1 cursor-ns-resize"}),
83
+ /* @__PURE__ */he("div",{onPointerDown:e=>Or(e,"s"),className:"absolute bottom-0 left-3 right-3 h-1 cursor-ns-resize"}),
84
+ /* @__PURE__ */he("div",{onPointerDown:e=>Or(e,"e"),className:"absolute top-3 bottom-3 right-0 w-1 cursor-ew-resize"}),
85
+ /* @__PURE__ */he("div",{onPointerDown:e=>Or(e,"w"),className:"absolute top-3 bottom-3 left-0 w-1 cursor-ew-resize"})]}),nn&&/* @__PURE__ */he("div",{className:"absolute inset-0",style:{zIndex:q.hint,cursor:"pointer",background:"transparent"},onMouseEnter:()=>on(!0),onMouseLeave:()=>on(!1),onMouseDown:e=>{e.stopPropagation(),e.preventDefault(),ir(Ft),Wr(!1)},onClick:e=>{e.stopPropagation(),e.preventDefault()},children:rn&&/* @__PURE__ */he("button",{type:"button","data-expose-close":!0,"aria-label":Re.taskbar.closeWindow,title:"Close",className:"absolute flex items-center justify-center rounded-full bg-black/55 text-on-accent shadow-lg ring-1 ring-white/40 transition-colors hover:bg-red-500",style:{top:8,right:8,width:30,height:30,transform:`scale(${1/to})`,transformOrigin:"top right",zIndex:q.raised},onMouseDown:e=>{e.stopPropagation(),e.preventDefault()},onClick:e=>{e.stopPropagation(),e.preventDefault(),Er()},children:/* @__PURE__ */he(j,{name:"close",className:"h-4 w-4",strokeWidth:2.2})})})]}),nn&&eo&&/* @__PURE__ */he("div",{className:"fixed pointer-events-none select-none truncate text-center",style:{left:eo.x,top:eo.y+eo.h+4,width:eo.w,zIndex:q.expose+(rn?21:11),color:"white",fontSize:"var(--text-xs)",fontWeight:500,textShadow:"0 1px 2px rgba(0,0,0,0.6)"},children:dn(Ie)})]}),io=Xe&&/* @__PURE__ */de(R,{style:{left:Xe.x,top:Xe.y},onClose:()=>Ve(null),minWidth:160,children:[!B&&!X&&!zn&&/* @__PURE__ */de(me,{children:[
86
+ /* @__PURE__ */de(W,{onClick:()=>{ar(Ft),Ve(null)},children:[
87
+ /* @__PURE__ */he(j,{name:"remove",className:"h-4 w-4",strokeWidth:1.5}),We.minimize]}),!An&&/* @__PURE__ */de(W,Yn?{onClick:()=>{Vn(!1),Mn(gn()),Ve(null)},children:[
88
+ /* @__PURE__ */he(j,{name:"collapse",className:"h-4 w-4",strokeWidth:1.5}),We.windowed]}:{onClick:()=>{Vr(),Ve(null)},children:[
89
+ /* @__PURE__ */he(j,{name:"expand",className:"h-4 w-4",strokeWidth:1.5}),We.maximize]})]}),F&&!zn&&/* @__PURE__ */de(W,{onClick:()=>{Ye(e=>!e),Ve(null)},children:[
90
+ /* @__PURE__ */he(j,{name:"bookmark-square",className:"h-4 w-4 "+(Ue?"text-blue-600":""),fill:Ue?"currentColor":"none",strokeWidth:1.5}),Ue?We.unpin:We.pinOnTop]}),Je&&/* @__PURE__ */de(W,{onClick:()=>{Ve(null),nt()},children:[
91
+ /* @__PURE__ */he(j,{name:"star",className:"h-4 w-4",fill:tt?"currentColor":"none",strokeWidth:1.5}),tt?Re.taskbar.removeFromDesktop:Re.taskbar.addToDesktop]}),(pn[Ft]||[]).length>0&&/* @__PURE__ */he(me,{children:(pn[Ft]||[]).map((e,t)=>/* @__PURE__ */de(W,{onClick:()=>{Ve(null),e.onClick()},children:[e.icon,e.label]},t))}),!(zn&&Ge?.home)&&/* @__PURE__ */de(me,{children:[
92
+ /* @__PURE__ */he(K,{}),
93
+ /* @__PURE__ */de(W,{danger:!0,onClick:()=>{Ve(null),Er()},children:[
94
+ /* @__PURE__ */he(j,{name:"close",className:"h-4 w-4"}),We.close]})]})]}),ao=!!we&&jt.some(e=>e.id===we),so=!Vt||ao||B?null:/* @__PURE__ */de("div",{"data-modal-restore-tab":!0,"data-modal-id":Ft,className:"fixed left-1/2 z-(--z-restore-tab) flex -translate-x-1/2 items-center gap-1 rounded-lg border border-line-strong bg-surface px-2 py-1 shadow-lg",style:{bottom:"calc(var(--taskbar-height, 0px) + 12px)"},children:[
95
+ /* @__PURE__ */he("button",{type:"button",onClick:()=>ir(Ft),title:We.restore,className:"max-w-[16rem] truncate rounded px-2 py-0.5 text-sm font-medium text-gray-700 hover:bg-gray-100 hover:text-gray-900",children:Ke||We.windowSuffix}),
96
+ /* @__PURE__ */he("button",{type:"button",onClick:()=>ir(Ft),title:We.restore,"aria-label":We.restore,className:"rounded px-2 py-0.5 text-xs leading-none text-ink-faintest hover:bg-gray-100 hover:text-gray-600",children:"▴"}),
97
+ /* @__PURE__ */he("button",{type:"button",onClick:()=>{Er()},title:We.close,"aria-label":We.close,className:"rounded px-2 py-0.5 text-xs leading-none text-ink-faintest hover:bg-gray-100 hover:text-gray-600",children:"✕"})]});return pe(
98
+ /* @__PURE__ */de(sn.Provider,{value:null,children:[oo,io,so]}),document.body)}"undefined"!=typeof window&&window.addEventListener("keydown",e=>{Dr&&"Escape"===e.key&&(Vr(null),Wr(!1))});var Qr=100,eo={past:[],future:[]};function to(e,t){switch(t.type){case"record":{const n=e.past[e.past.length-1];if(null!==t.step.coalesceKey&&n?.coalesceKey===t.step.coalesceKey)return 0===e.future.length?e:{...e,future:[]};const r=[...e.past,t.step];return{past:r.length>Qr?r.slice(r.length-Qr):r,future:[]}}case"undo":return 0===e.past.length?e:{past:e.past.slice(0,-1),future:[t.redoStep,...e.future]};case"redo":return 0===e.future.length?e:{past:[...e.past,t.undoStep],future:e.future.slice(1)};case"clear":return 0===e.past.length&&0===e.future.length?e:eo}}var no=/* @__PURE__ */new Set(["INPUT","TEXTAREA","SELECT"]);var ro=500,oo=250;function io({children:e,canEdit:t=!0,perms:n,windowId:r}){const[o,i]=ce(to,eo),a=Z(/* @__PURE__ */new Map),[s,l]=ee(0),c=s>0,[u,d]=ee(0),[h,m]=ee(0),p=h>0,{hasAnyPerm:f}=T(),w=t&&0===u&&(!(n&&n.length>0)||f(n)),y=Z(null),g=Z(!1),v=ne(()=>{const e={};for(const[t,n]of a.current)e[t]=n.getLast();return e},[]),b=ne((e,t)=>{a.current.has(e)||l(e=>e+1),a.current.set(e,t)},[]),x=ne(e=>{a.current.delete(e)&&l(e=>e-1)},[]),k=ne(e=>{d(t=>t+(e?1:-1))},[]),E=ne(e=>{m(t=>t+(e?1:-1))},[]),[C,N]=ee(0),S=C>0,L=ne(e=>{N(t=>t+(e?1:-1))},[]),z=J($e),A=z?.claimReadOnly;Q(()=>{if(A&&!w)return A(!0),()=>A(!1)},[A,w]);const D=z?.claimOwnMount;Q(()=>{if(D&&S)return D(!0),()=>D(!1)},[D,S]);const I=Z({last:0,count:0,tripped:!1}),P=Z(!1),R=ne((e,t,n)=>{if(g.current)return void(n&&function(e,t){if(Object.is(e,t))return!0;if("object"!=typeof e||"object"!=typeof t||null===e||null===t)return!1;if(Array.isArray(e)!==Array.isArray(t))return!1;try{return JSON.stringify(e)===JSON.stringify(t)}catch{return!1}}(n.prev,n.next)||(P.current=!0));if(!w||y.current)return;const r=I.current;if(r.tripped)return;const o=Date.now();if(o-r.last>oo&&(r.count=0),r.last=o,++r.count>ro)return r.tripped=!0,void console.error(`[efficient-shell] UndoProvider: "${e}" recorded ${ro} undo steps with no pause between them, which no user action can do. The value passed to useUndoable for this slice is almost certainly rebuilt on every render (a .map/.filter/object literal in the call) rather than held in state, so it reads as changed every time — and since recording a step re-renders the form, that is a loop. Undo recording is now off for this form to keep the tab responsive.`);y.current={values:v(),label:e,coalesceKey:t},queueMicrotask(()=>{const e=y.current;y.current=null,e&&i({type:"record",step:e})})},[w,v]),W=ne(e=>{for(const[t,n]of Object.entries(e)){const e=a.current.get(t);e&&(e.setLast(n),e.apply(n))}},[]),K=ne(()=>{const e=o.past[o.past.length-1];if(!e)return;const t={values:v(),label:e.label,coalesceKey:null};W(e.values),i({type:"undo",redoStep:t})},[o.past,v,W]),O=ne(()=>{const e=o.future[0];if(!e)return;const t={values:v(),label:e.label,coalesceKey:null};W(e.values),i({type:"redo",undoStep:t})},[o.future,v,W]),[$,j]=ee(0),F=Z(0),q=Z(0),H=Z(!1),B=ne(()=>{g.current=!0,P.current=!1,y.current=null,F.current+=1,q.current=F.current,j(F.current)},[]),U=Z(void 0),Y=ne(e=>{void 0!==e&&(void 0!==U.current&&e!==U.current&&(H.current=!0),U.current=e),B()},[B]);Q(()=>{g.current&&$===q.current&&(g.current=!1,y.current=null,(P.current||H.current)&&i({type:"clear"}),P.current=!1,H.current=!1)},[$]);const X=ne(()=>{H.current=!0,i({type:"clear"}),B()},[B]),V=w&&o.past.length>0,G=w&&o.future.length>0,_=Ar(r),te=Z({undo:K,redo:O,canUndo:V,canRedo:G});te.current={undo:K,redo:O,canUndo:V,canRedo:G},Q(()=>{if(!_||!w)return;const e=e=>{const t=function(e){if(!e.metaKey&&!e.ctrlKey||e.altKey)return null;const t=e.key.toLowerCase(),n="z"===t?e.shiftKey?"redo":"undo":"y"!==t||!e.ctrlKey||e.metaKey||e.shiftKey?null:"redo";if(!n)return null;const r=e.target;return r?.isContentEditable||r?.tagName&&no.has(r.tagName.toUpperCase())?null:n}(e);if(!t)return;const n=te.current;("undo"===t?n.canUndo:n.canRedo)&&(e.preventDefault(),"undo"===t?n.undo():n.redo())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[_,w]);const re=se(()=>({register:b,unregister:x,record:R,undo:K,redo:O,clear:X,baseline:Y,canUndo:V,canRedo:G,enabled:w,hasState:c,handMounted:S,claimOwnMount:L,claimReadOnly:k,declaredEditable:p,claimEditable:E,undoLabel:V?o.past[o.past.length-1].label:null,redoLabel:G?o.future[0].label:null}),[b,x,R,K,O,X,Y,V,G,w,c,S,L,k,p,E,o.past,o.future]),oe=""!==gn(),ie=J(M)?.footerOpen??!1,ae=oe&&w&&c&&!S&&ie;/* @__PURE__ */
99
+ return de($e.Provider,{value:re,children:[ae&&/* @__PURE__ */he(vn,{position:"left",quiet:!0,children:/* @__PURE__ */he(Fe,{auto:!0})}),e]})}function ao(){const e=J($e),t=ne(()=>{},[]);return{undo:e?.undo??t,redo:e?.redo??t,clear:e?.clear??t,baseline:e?.baseline??t,canUndo:e?.canUndo??!1,canRedo:e?.canRedo??!1,undoLabel:e?.undoLabel??null,redoLabel:e?.redoLabel??null,enabled:e?.enabled??!1,hasState:e?.hasState??!1}}function so(e){const t=J($e),n=t?.claimReadOnly,r=t?.claimEditable;Q(()=>{const t=e?r:n;if(t)return t(!0),()=>t(!1)},[n,r,e])}function lo(e,t,n){const r=J($e),o=le(),i=Z(e),a=Z(t);a.current=t,Q(()=>{if(r)return r.register(o,{getLast:()=>i.current,setLast:e=>{i.current=e},apply:e=>a.current(e)}),()=>r.unregister(o)},[r,o]);const{label:s,coalesceKey:l=null}=n,c=Z(r);c.current=r;const u=Z({label:s,coalesceKey:l});u.current={label:s,coalesceKey:l},Q(()=>{const t=c.current;t&&(Object.is(e,i.current)||(t.record(u.current.label,u.current.coalesceKey,{prev:i.current,next:e}),i.current=e))},[e])}function co(e,t){const[n,r]=ee(e);return lo(n,e=>r(()=>e),t),[n,r]}export{bn as CancelButton,Ne as DesktopHostProvider,ut as DocFavStar,Ze as EntityWindowFallback,Ge as EntityWindowLoading,Qe as EntityWindowState,un as MODAL_SUBMIT_SELECTOR,Zr as Modal,vn as ModalActions,Fe as UndoControls,io as UndoProvider,ke as WINDOW_REGISTRY,Ke as WindowCrashedFallback,Oe as WindowErrorBoundary,At as WindowManagerProvider,wn as WindowTitle,wt as activateWindowById,Bt as beginWindowGesture,tr as cancelWindowFront,Ce as client_default,Jr as commitExposeHighlight,er as confirmWindowDiscard,Ut as drainPerfEvents,Or as exitExposeMode,Dn as forgetMaximizedWindowBoxes,vt as getActiveWindowRoute,Xr as getExposeHighlight,on as getWindowChromeVersion,zn as getWindowPosition,tt as isDraftEntityId,nt as isDraftEntityWindow,ve as isEntityEntry,ge as isPageEntry,Ee as isShellApiClientConfigured,Ye as isTabWindow,Ht as markMenuOpen,nn as readWindowChrome,_n as requestWindowFront,Vr as setExposeHighlight,qt as setPerfCollecting,De as setShellHomeRoute,We as setShellTabStrip,xe as setShellWindowRegistry,Tn as setWindowDefaultPosition,An as setWindowPosition,Gt as splitTitle,Yr as subscribeExposeHighlight,rn as subscribeWindowChrome,Xe as tabGroupOf,Kr as toggleExposeMode,Xn as useCurrentTabKey,Se as useDesktopHost,gn as useEnclosingModalId,Ar as useIsActiveWindow,Te as usePageSearch,ao as useUndo,so as useUndoCanEdit,lo as useUndoable,co as useUndoableState,mn as useWidgetSettings,it as useWindowDirty,st as useWindowManager,fn as useWindowMenuItem,yn as useWindowTitle,Qn as windowHoldsChanges};
@@ -0,0 +1,4 @@
1
+ import{useShellLocale as e}from"./chunk-JSHMIMAJ.js";import{formatPlain as t}from"./chunk-C3QOHMR6.js";import{useState as r,useEffect as n,Children as i}from"react";import{jsxs as l,jsx as a}from"react/jsx-runtime";var s={"2xs":16,xs:24,sm:32,md:40,lg:56},o={online:"bg-green-500",offline:"bg-gray-400",busy:"bg-red-500",away:"bg-amber-500"};function m(e){if(!e)return"?";const t=e.trim().split(/\s+/).filter(Boolean);if(0===t.length)return"?";return((t[0][0]??"")+(t.length>1?t[t.length-1][0]:"")).toUpperCase()||"?"}function c({src:e,name:t,size:i="md",status:c,className:h=""}){const u=s[i],f=Math.max(8,Math.round(.28*u)),[d,g]=r(!1);n(()=>{g(!1)},[e]);const y=Boolean(e)&&!d;
2
+ /* @__PURE__ */
3
+ return l("span",{className:`relative inline-flex shrink-0 ${h}`.trim(),style:{width:u,height:u},...t?{role:"img","aria-label":t}:{"aria-hidden":!0},children:[y?/* @__PURE__ */a("img",{src:e,alt:"",onError:()=>g(!0),className:"h-full w-full rounded-full object-cover"}):/* @__PURE__ */a("span",{className:"flex h-full w-full items-center justify-center rounded-full bg-gray-100 font-medium text-gray-600",style:{fontSize:Math.max(7,Math.round(.4*u))},children:m(t)}),c&&/* @__PURE__ */a("span",{className:`absolute bottom-0 right-0 rounded-full ring-2 ring-white ${o[c]}`,style:{width:f,height:f}})]})}function h({children:r,max:n,size:o="md",className:m=""}){const c=i.toArray(r),h=n?c.slice(0,n):c,u=n?c.length-h.length:0,f=s[o],d=Math.round(.3*f),g=e();/* @__PURE__ */
4
+ return l("div",{className:`flex items-center ${m}`.trim(),children:[h.map((e,t)=>/* @__PURE__ */a("span",{className:"rounded-full ring-2 ring-white",style:{marginLeft:0===t?0:-d},children:e},t)),u>0&&/* @__PURE__ */l("span",{className:"flex items-center justify-center rounded-full bg-gray-200 font-medium text-gray-600 ring-2 ring-white",style:{width:f,height:f,marginLeft:-d,fontSize:Math.round(.36*f)},children:["+",t(u,g)]})]})}export{c as Avatar,h as AvatarGroup};
@@ -1 +1 @@
1
- import{setBoundaryErrorReporter as e}from"./chunk-KNUR2UEG.js";import{VERSION as t}from"./chunk-MDVABA4H.js";var n=-1,i=()=>n,a=e=>{addEventListener("pageshow",t=>{t.persisted&&(n=t.timeStamp,e(t))},!0)},r=(e,t,n,i)=>{let a,r;return o=>{var s,c;t.value>=0&&(o||i)&&(r=t.value-(a??0),(r||void 0===a)&&(a=t.value,t.delta=r,t.rating=(s=t.value)>(c=n)[1]?"poor":s>c[0]?"needs-improvement":"good",e(t)))}},o=e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))},s=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},c=()=>s()?.activationStart??0,d=-1,l=/* @__PURE__ */new Set,u=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,f=e=>{if("hidden"===document.visibilityState){if("visibilitychange"===e.type)for(const e of l)e();isFinite(d)||(d="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("prerenderingchange",f,!0))}},h=(e=!1)=>{if(e&&(d=1/0),d<0){const e=c(),t=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").find(t=>"hidden"===t.name&&t.startTime>=e)?.startTime;d=t??u(),addEventListener("visibilitychange",f,!0),addEventListener("prerenderingchange",f,!0),a(()=>{setTimeout(()=>{d=u()})})}return{get firstHiddenTime(){return d},onHidden(e){l.add(e)}}},g=(e,t=-1,n,a=0,r,o,d)=>{const l=s(),u=l?.navigationId||0;let f="navigate";return n?f=n:i()>=0?f="back-forward-cache":l&&(document.prerendering||c()>0?f="prerender":document.wasDiscarded?f="restore":l.type&&(f=l.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v6-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:f,navigationId:a||u,navigationInteractionId:r,navigationURL:o||l?.name,navigationStartTime:d||0}},v=/* @__PURE__ */new WeakMap;function p(e,t){let n=v.get(t);return n||(n=/* @__PURE__ */new WeakMap,v.set(t,n)),n.get(e)||n.set(e,new t),n.get(e)}var m,y=class{t;i=0;o=[];h(e){if(e.hadRecentInput)return;const t=this.o[0],n=this.o.at(-1);this.i&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),this.t?.(e)}},T=(e,t,n={})=>{try{const i=e.filter(e=>PerformanceObserver.supportedEntryTypes.includes(e));if(i.length>0){const e=new PerformanceObserver(e=>{queueMicrotask(()=>{const n=e.getEntries();i.length>1&&n.sort((e,t)=>e.startTime+e.duration-(t.startTime+t.duration)),t(n)})});for(const t of i)e.observe({type:t,buffered:!0,...n});return e}}catch{}},w=e=>globalThis.PerformanceObserver?.supportedEntryTypes?.includes("soft-navigation")&&"function"==typeof globalThis.PerformanceSoftNavigation?.prototype?.getLargestInteractionContentfulPaint&&e&&e.reportSoftNavs,I=(e,t)=>{if(e.set(t.navigationId,t),e.size>2){const t=e.keys().next().value;void 0!==t&&e.delete(t)}},b=e=>{let t=!1;return()=>{t||(e(),t=!0)}},C=class{l},E=e=>{document.prerendering?addEventListener("prerenderingchange",e,!0):e()},L=[1800,3e3],A=(e,t={})=>{const n=w(t);E(()=>{const s=p(t,C),d=h();let l,u=g("FCP");const f=T(["paint"],e=>{for(const t of e)"first-contentful-paint"===t.name&&(f.disconnect(),t.startTime<d.firstHiddenTime&&(u.value=Math.max(t.startTime-c(),0),u.entries.push(t),u.navigationId=t.navigationId||u.navigationId,l(!0)))});f&&(l=r(e,u,L,t.reportAllChanges),a(n=>{u=g("FCP",-1,"back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),l=r(e,u,L,t.reportAllChanges),o(()=>{u.value=performance.now()-n.timeStamp,l(!0)})})),n&&T(["soft-navigation"],n=>{n.forEach(n=>{s.l&&n.navigationId&&I(s.l,n);const i=Math.max((n.presentationTime||n.paintTime||0)-n.startTime,0);u=g("FCP",i,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),l=r(e,u,L,t.reportAllChanges),l(!0)})},t)})},P=[.1,.25],k=0,S=1/0,z=0,M=e=>{for(const t of e)t.interactionId&&(S=Math.min(S,t.interactionId),z=Math.max(z,t.interactionId),k=z?(z-S)/7+1:0)},$=()=>m?k:performance.interactionCount??0,_=class{u=0;v=[];m=/* @__PURE__ */new Map;p;T;_(){return $()-this.u}M(){this.u=$(),this.v.length=0,this.m.clear()}L(e){const t=this._(),n=Math.min(this.v.length-1,Math.floor(t/50));return!t||-1!==n||"soft-navigation"!==e&&"back-forward-cache"!==e?this.v[n]:{P:8,id:-1,entries:[]}}h(e){if(this.p?.(e),!e.interactionId)return;const t=this.v.at(-1);let n=this.m.get(e.interactionId);if(n||this.v.length<10||e.duration>t.P){if(n?e.duration>n.P?(n.entries=[e],n.P=e.duration):e.duration===n.P&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],P:e.duration},this.m.set(n.id,n),this.v.push(n)),this.v.sort((e,t)=>t.P-e.P),this.v.length>10){const e=this.v.splice(10);for(const t of e)this.m.delete(t.id)}this.T?.(n)}}},Z=e=>{const t="requestIdleCallback"in globalThis?1e3:0,n=globalThis.requestIdleCallback||setTimeout,i=globalThis.cancelIdleCallback||clearTimeout;if("hidden"===document.visibilityState)e();else{const a=b(e);let r=-1;const o=()=>{i(r),a()};addEventListener("visibilitychange",o,{once:!0,capture:!0}),r=n(()=>{removeEventListener("visibilitychange",o,{capture:!0}),a()},{timeout:t})}},F=[200,500],R=(e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=h();E(()=>{"interactionCount"in performance||m||(m=T(["event"],M,{durationThreshold:0}));let o,s=g("INP");const c=p(t,_),d=(n,i,a,d,l)=>{c.M(),s=g("INP",-1,n,i,a,d,l),o=r(e,s,F,t.reportAllChanges)},l=()=>{const e=c.L(s.navigationType);e&&e.P!==s.value&&(s.value=e.P,s.entries=e.entries,o())},u=e=>{l(),o(!0),d("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},f=(e,t=!1)=>{Z(()=>{for(const t of e)"soft-navigation"!==t.entryType?c.h(t):u(t);l(),t&&o(!0)})},h=["event","first-input"];w(t)&&h.push("soft-navigation");const v=T(h,f,{...t,durationThreshold:t.durationThreshold??40});o=r(e,s,F,t.reportAllChanges),v&&(n.onHidden(()=>{f(v.takeRecords(),!0)}),a(()=>{d("back-forward-cache",s.navigationId,s.navigationInteractionId,s.navigationURL,i())}))})},j=class{p;l;h(e){this.p?.(e)}},x=[2500,4e3],B=[800,1800],N=e=>{document.prerendering?E(()=>N(e)):"complete"!==document.readyState?addEventListener("load",()=>N(e),!0):setTimeout(e)};var U=/^[A-Za-z0-9/_:.\-[\]{}*@~]+$/,H=/^[A-Za-z_$][A-Za-z0-9_$.]*$/,O=/^[A-Za-z0-9][A-Za-z0-9.+_-]*$/;var q=class{constructor(e){this.head=e}head;events=[];waiting=/* @__PURE__ */new Map;seen=/* @__PURE__ */new Set;get size(){return this.events.length}addVital(e){this.events.push(e)}addError(e){const t=function(e){return e.frames.length?`${e.name}|${e.frames.join("|")}`:`${e.name}|${e.message.replace(/\d/g,"0")}`}(e),n=this.waiting.get(t);return n?(n.count=Math.min(1e3,n.count+e.count),!0):!(this.seen.has(t)||this.seen.size>=20)&&(this.seen.add(t),this.waiting.set(t,e),this.events.push(e),!0)}drain(){const e=this.events;this.events=[],this.waiting.clear();const t=[],n=JSON.stringify({...this.head,events:[]}).length;let i=[],a=n;for(const r of e){const e=JSON.stringify(r).length+1;n+e>30720||((50===i.length||a+e>30720)&&(t.push({...this.head,events:i}),i=[],a=n),i.push(r),a+=e)}return i.length&&t.push({...this.head,events:i}),t}},J=/[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/g,K=/\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}(?:\.[A-Za-z0-9_-]*)?|\b[Bb]earer\s+[A-Za-z0-9._~+/=-]{8,}/g,V=/\b[a-z][a-z0-9+.-]*:\/\/\S+/gi,D=/\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi,W=/\d{4,}/g,G=/(^|[/:])(?:\d+|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|[0-9a-f]{16,})(?=$|[/:])/gi,Q=/^[a-z][a-z0-9+.-]*:\/\/[^/]*/i,X=/(?:\(|@|\bat\s+)?((?:[a-z][a-z0-9+.-]*:\/\/|\/)[^\s()@]*?):(\d+):(\d+)\)?\s*$/i;function Y(e,t,n){const i=e.replace(Q,"").split(/[?#]/,1)[0];return i?`${i}:${t}:${n}`.slice(0,256):null}function ee(e){if("string"!=typeof e)return[];const t=[];for(const n of e.split("\n")){const e=X.exec(n.trim()),i=e&&Y(e[1],e[2],e[3]);if(i&&t.push(i),5===t.length)break}return t}function te(e){const t=e instanceof Error?e.name:void 0;return"string"==typeof t&&t.length<=64&&H.test(t)?t:"Error"}function ne(e){if("string"!=typeof e)return"unknown";const t=e.trim().replace(Q,"").split(/[?#]/,1)[0].replace(G,(e,t)=>":"===t?":id":`${t}:id`);return t&&t.length<=128&&!t.includes("//")&&U.test(t)?t:"unknown"}var ie={flush(){},reportError(){},stop(){}},ae=null,re=/* @__PURE__ */new Set(["LCP","FCP","TTFB"]);function oe(e,t,n){const i=function(e){if(e.anonymous)return{credentials:"omit",headers:{"Content-Type":"application/json"}};const t=e.getAccessToken();return t?{credentials:"same-origin",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}}:null}(t);if(!i)return;const a=t.anonymous?"/api/storefront-analytics/web-vitals/":"/api/client-telemetry/web-batches/";n(t.endpoint??a,{...i,method:"POST",keepalive:!0,body:JSON.stringify(e)}).catch(e=>{console.debug("[efficient-shell] client telemetry batch dropped:",e)})}function se(e){((e,t={})=>{let n=!1;const s=w(t);E(()=>{let d,l=h(),u=g("LCP");const f=p(t,j),v=(i,a,o,s,c)=>{u=g("LCP",-1,i,a,o,s,c),d=r(e,u,x,t.reportAllChanges),n=!1,"soft-navigation"===i&&(l=h(!0))},m=e=>{f.l&&e.navigationId&&I(f.l,e),n||d(!0),v("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime);const t=e.getLargestInteractionContentfulPaint?.();t&&y([t])},y=e=>{t.reportAllChanges||s||(e=e.slice(-1));for(const t of e){if(!t)continue;if("soft-navigation"===t.entryType){m(t);continue}let e=0,n=[],i=t.startTime;if("largest-contentful-paint"===t.entryType)e=Math.max(t.startTime-c(),0),f.h(t),n=[t];else if("interaction-contentful-paint"===t.entryType){const a=t;if(!u.navigationId)continue;if("interactionId"in a&&a.interactionId!=u.navigationInteractionId)continue;i=a.largestContentfulPaint?.renderTime||0,e=Math.max(i-t.startTime,0),a.largestContentfulPaint&&(f.h(a.largestContentfulPaint),n=[a.largestContentfulPaint])}i<l.firstHiddenTime&&(u.value=e,u.entries=n,d())}},w=["largest-contentful-paint"];s&&w.push("interaction-contentful-paint","soft-navigation");const b=T(w,y);if(b){d=r(e,u,x,t.reportAllChanges);const c=["keydown","click","visibilitychange"],l=e=>{if(e.isTrusted&&!n){const e=u.id;Z(()=>{if(!n){if(!s){b.disconnect();for(const e of c)removeEventListener(e,l,{capture:!0})}e===u.id&&(n=!0,d(!0))}})}};for(const e of c)addEventListener(e,l,{capture:!0});a(a=>{v("back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),d=r(e,u,x,t.reportAllChanges),o(()=>{u.value=performance.now()-a.timeStamp,n=!0,d(!0)})})}})})(e),R(e),((e,t={})=>{const n=h();A(b(()=>{let s,c=g("CLS",0);const d=p(t,y),l=(n,i,a,o,l)=>{c=g("CLS",0,n,i,a,o,l),d.i=0,s=r(e,c,P,t.reportAllChanges)},u=(e=!1)=>{d.i>c.value&&(c.value=d.i,c.entries=d.o),s(e)},f=e=>{u(!0),l("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},h=e=>{for(const t of e)"soft-navigation"!==t.entryType?d.h(t):f(t);u()},v=["layout-shift"];w(t)&&v.push("soft-navigation");const m=T(v,h);m&&(s=r(e,c,P,t.reportAllChanges),n.onHidden(()=>{h(m.takeRecords()),s(!0)}),a(()=>{l("back-forward-cache",c.navigationId,c.navigationInteractionId,c.navigationURL,i()),o(s)}),setTimeout(s))}))})(e),A(e),((e,t={})=>{const n=w(t);let o=g("TTFB"),d=r(e,o,B,t.reportAllChanges);N(()=>{const l=s();if(l){const s=l.responseStart;o.value=Math.max(s-c(),0),o.entries=[l],d(!0),a(()=>{o=g("TTFB",0,"back-forward-cache",o.navigationId,o.navigationInteractionId,o.navigationURL,i()),d=r(e,o,B,t.reportAllChanges),d(!0)}),n&&T(["soft-navigation"],n=>{n.forEach(n=>{n.navigationId&&(o=g("TTFB",0,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),o.entries=[n],d=r(e,o,B,t.reportAllChanges),d(!0))})},t)}})})(e)}function ce(n){if(ae?.stop(),ae=null,!1===n.enabled||"undefined"==typeof window||"undefined"==typeof document)return ie;if(!function(e){const t="string"==typeof e.app&&O.test(e.app),n="string"==typeof e.release&&O.test(e.release);return t&&n||console.warn("[efficient-shell] client telemetry not started: `app` and `release` must be version-like strings."),t&&n}(n))return ie;const i=function(e){const t=e.vitalsSampleRate??1;return t>0&&(t>=1||(e.random??Math.random)()<t)}(n);if(n.anonymous&&!i)return ie;const a=n.fetch??window.fetch.bind(window),r=new q({app:n.app,release:n.release,shell_version:O.test(t)?t:""}),o=ne(n.routeKey()),s=function(e=("undefined"==typeof window?void 0:window)){if(!e)return"desktop";const t="function"==typeof e.matchMedia&&e.matchMedia("(pointer: coarse)").matches,n=e.innerWidth;return n<600?"mobile":t&&n<1280?"tablet":"desktop"}(window);let c=!1;const d=()=>{for(const e of r.drain())oe(e,n,a)},l=e=>{c||n.anonymous||(r.addError(e),r.size>=50&&d())},u=(e,t)=>{return{type:"error",source:t,name:te(e),message:(a=e,i=a instanceof Error?a.message:"string"==typeof a?a:a&&"object"==typeof a&&"string"==typeof a.message?a.message:"",i.slice(0,640).replace(J,"[redacted]").replace(K,"[redacted]").replace(V,"[url]").replace(D,"[id]").replace(W,"[n]").replace(/\s+/g," ").trim().slice(0,160)),frames:ee(e instanceof Error?e.stack:void 0),route:ne(n.routeKey()),count:1};var i,a};i&&(n.observeVitals??se)(e=>{c||(r.addVital(function(e,t,n,i){return{type:"vital",name:e.name,value:e.value,route:re.has(e.name)?t:n(),navigation:e.navigationType??"navigate",device:i}}(e,o,()=>ne(n.routeKey()),s)),r.size>=50&&d())});const f=n.anonymous?()=>{}:function(t,n){const i=e=>{const{error:i,message:a,filename:r,lineno:o,colno:s}=e;if(null!=i)return void t(n(i,"onerror"));const c=r?ee(`at ${r}:${o??0}:${s??0}`):[];t({...n(a??"","onerror"),frames:c})},a=e=>t(n(e.reason,"unhandledrejection"));window.addEventListener("error",i),window.addEventListener("unhandledrejection",a);const r=e(e=>t(n(e,"boundary")));return()=>{window.removeEventListener("error",i),window.removeEventListener("unhandledrejection",a),r()}}(l,u),h=()=>{"hidden"===document.visibilityState&&d()};document.addEventListener("visibilitychange",h),window.addEventListener("pagehide",d);const g=window.setInterval(d,n.flushIntervalMs??6e4),v={flush:d,reportError:e=>l(u(e,"boundary")),stop(){c||(d(),c=!0,f(),document.removeEventListener("visibilitychange",h),window.removeEventListener("pagehide",d),window.clearInterval(g),ae===v&&(ae=null))}};return ae=v,v}export{ce as startClientTelemetry};
1
+ import{setBoundaryErrorReporter as e}from"./chunk-KNUR2UEG.js";import{VERSION as t}from"./chunk-7NYCPO54.js";var n=-1,i=()=>n,a=e=>{addEventListener("pageshow",t=>{t.persisted&&(n=t.timeStamp,e(t))},!0)},r=(e,t,n,i)=>{let a,r;return o=>{var s,c;t.value>=0&&(o||i)&&(r=t.value-(a??0),(r||void 0===a)&&(a=t.value,t.delta=r,t.rating=(s=t.value)>(c=n)[1]?"poor":s>c[0]?"needs-improvement":"good",e(t)))}},o=e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))},s=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},c=()=>s()?.activationStart??0,d=-1,l=/* @__PURE__ */new Set,u=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,f=e=>{if("hidden"===document.visibilityState){if("visibilitychange"===e.type)for(const e of l)e();isFinite(d)||(d="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("prerenderingchange",f,!0))}},h=(e=!1)=>{if(e&&(d=1/0),d<0){const e=c(),t=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").find(t=>"hidden"===t.name&&t.startTime>=e)?.startTime;d=t??u(),addEventListener("visibilitychange",f,!0),addEventListener("prerenderingchange",f,!0),a(()=>{setTimeout(()=>{d=u()})})}return{get firstHiddenTime(){return d},onHidden(e){l.add(e)}}},g=(e,t=-1,n,a=0,r,o,d)=>{const l=s(),u=l?.navigationId||0;let f="navigate";return n?f=n:i()>=0?f="back-forward-cache":l&&(document.prerendering||c()>0?f="prerender":document.wasDiscarded?f="restore":l.type&&(f=l.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v6-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:f,navigationId:a||u,navigationInteractionId:r,navigationURL:o||l?.name,navigationStartTime:d||0}},v=/* @__PURE__ */new WeakMap;function p(e,t){let n=v.get(t);return n||(n=/* @__PURE__ */new WeakMap,v.set(t,n)),n.get(e)||n.set(e,new t),n.get(e)}var m,y=class{t;i=0;o=[];h(e){if(e.hadRecentInput)return;const t=this.o[0],n=this.o.at(-1);this.i&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),this.t?.(e)}},T=(e,t,n={})=>{try{const i=e.filter(e=>PerformanceObserver.supportedEntryTypes.includes(e));if(i.length>0){const e=new PerformanceObserver(e=>{queueMicrotask(()=>{const n=e.getEntries();i.length>1&&n.sort((e,t)=>e.startTime+e.duration-(t.startTime+t.duration)),t(n)})});for(const t of i)e.observe({type:t,buffered:!0,...n});return e}}catch{}},w=e=>globalThis.PerformanceObserver?.supportedEntryTypes?.includes("soft-navigation")&&"function"==typeof globalThis.PerformanceSoftNavigation?.prototype?.getLargestInteractionContentfulPaint&&e&&e.reportSoftNavs,I=(e,t)=>{if(e.set(t.navigationId,t),e.size>2){const t=e.keys().next().value;void 0!==t&&e.delete(t)}},b=e=>{let t=!1;return()=>{t||(e(),t=!0)}},C=class{l},E=e=>{document.prerendering?addEventListener("prerenderingchange",e,!0):e()},L=[1800,3e3],P=(e,t={})=>{const n=w(t);E(()=>{const s=p(t,C),d=h();let l,u=g("FCP");const f=T(["paint"],e=>{for(const t of e)"first-contentful-paint"===t.name&&(f.disconnect(),t.startTime<d.firstHiddenTime&&(u.value=Math.max(t.startTime-c(),0),u.entries.push(t),u.navigationId=t.navigationId||u.navigationId,l(!0)))});f&&(l=r(e,u,L,t.reportAllChanges),a(n=>{u=g("FCP",-1,"back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),l=r(e,u,L,t.reportAllChanges),o(()=>{u.value=performance.now()-n.timeStamp,l(!0)})})),n&&T(["soft-navigation"],n=>{n.forEach(n=>{s.l&&n.navigationId&&I(s.l,n);const i=Math.max((n.presentationTime||n.paintTime||0)-n.startTime,0);u=g("FCP",i,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),l=r(e,u,L,t.reportAllChanges),l(!0)})},t)})},A=[.1,.25],k=0,S=1/0,z=0,M=e=>{for(const t of e)t.interactionId&&(S=Math.min(S,t.interactionId),z=Math.max(z,t.interactionId),k=z?(z-S)/7+1:0)},$=()=>m?k:performance.interactionCount??0,_=class{u=0;v=[];m=/* @__PURE__ */new Map;p;T;_(){return $()-this.u}M(){this.u=$(),this.v.length=0,this.m.clear()}L(e){const t=this._(),n=Math.min(this.v.length-1,Math.floor(t/50));return!t||-1!==n||"soft-navigation"!==e&&"back-forward-cache"!==e?this.v[n]:{P:8,id:-1,entries:[]}}h(e){if(this.p?.(e),!e.interactionId)return;const t=this.v.at(-1);let n=this.m.get(e.interactionId);if(n||this.v.length<10||e.duration>t.P){if(n?e.duration>n.P?(n.entries=[e],n.P=e.duration):e.duration===n.P&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],P:e.duration},this.m.set(n.id,n),this.v.push(n)),this.v.sort((e,t)=>t.P-e.P),this.v.length>10){const e=this.v.splice(10);for(const t of e)this.m.delete(t.id)}this.T?.(n)}}},Z=e=>{const t="requestIdleCallback"in globalThis?1e3:0,n=globalThis.requestIdleCallback||setTimeout,i=globalThis.cancelIdleCallback||clearTimeout;if("hidden"===document.visibilityState)e();else{const a=b(e);let r=-1;const o=()=>{i(r),a()};addEventListener("visibilitychange",o,{once:!0,capture:!0}),r=n(()=>{removeEventListener("visibilitychange",o,{capture:!0}),a()},{timeout:t})}},F=[200,500],R=(e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=h();E(()=>{"interactionCount"in performance||m||(m=T(["event"],M,{durationThreshold:0}));let o,s=g("INP");const c=p(t,_),d=(n,i,a,d,l)=>{c.M(),s=g("INP",-1,n,i,a,d,l),o=r(e,s,F,t.reportAllChanges)},l=()=>{const e=c.L(s.navigationType);e&&e.P!==s.value&&(s.value=e.P,s.entries=e.entries,o())},u=e=>{l(),o(!0),d("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},f=(e,t=!1)=>{Z(()=>{for(const t of e)"soft-navigation"!==t.entryType?c.h(t):u(t);l(),t&&o(!0)})},h=["event","first-input"];w(t)&&h.push("soft-navigation");const v=T(h,f,{...t,durationThreshold:t.durationThreshold??40});o=r(e,s,F,t.reportAllChanges),v&&(n.onHidden(()=>{f(v.takeRecords(),!0)}),a(()=>{d("back-forward-cache",s.navigationId,s.navigationInteractionId,s.navigationURL,i())}))})},j=class{p;l;h(e){this.p?.(e)}},x=[2500,4e3],N=[800,1800],B=e=>{document.prerendering?E(()=>B(e)):"complete"!==document.readyState?addEventListener("load",()=>B(e),!0):setTimeout(e)};var O=/^[A-Za-z0-9/_:.\-[\]{}*@~]+$/,U=/^[A-Za-z_$][A-Za-z0-9_$.]*$/,H=/^[A-Za-z0-9][A-Za-z0-9.+_-]*$/;var q=class{constructor(e){this.head=e}head;events=[];waiting=/* @__PURE__ */new Map;seen=/* @__PURE__ */new Set;get size(){return this.events.length}addVital(e){this.events.push(e)}addError(e){const t=function(e){return e.frames.length?`${e.name}|${e.frames.join("|")}`:`${e.name}|${e.message.replace(/\d/g,"0")}`}(e),n=this.waiting.get(t);return n?(n.count=Math.min(1e3,n.count+e.count),!0):!(this.seen.has(t)||this.seen.size>=20)&&(this.seen.add(t),this.waiting.set(t,e),this.events.push(e),!0)}drain(){const e=this.events;this.events=[],this.waiting.clear();const t=[],n=JSON.stringify({...this.head,events:[]}).length;let i=[],a=n;for(const r of e){const e=JSON.stringify(r).length+1;n+e>30720||((50===i.length||a+e>30720)&&(t.push({...this.head,events:i}),i=[],a=n),i.push(r),a+=e)}return i.length&&t.push({...this.head,events:i}),t}},J=/[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/g,K=/\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}(?:\.[A-Za-z0-9_-]*)?|\b[Bb]earer\s+[A-Za-z0-9._~+/=-]{8,}/g,V=/\b[a-z][a-z0-9+.-]*:\/\/\S+/gi,W=/\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi,D=/\d{4,}/g,G=/(^|[/:])(?:\d+|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|[0-9a-f]{16,})(?=$|[/:])/gi,Y=/^[a-z][a-z0-9+.-]*:\/\/[^/]*/i,Q=/(?:\(|@|\bat\s+)?((?:[a-z][a-z0-9+.-]*:\/\/|\/)[^\s()@]*?):(\d+):(\d+)\)?\s*$/i;function X(e,t,n){const i=e.replace(Y,"").split(/[?#]/,1)[0];return i?`${i}:${t}:${n}`.slice(0,256):null}function ee(e){if("string"!=typeof e)return[];const t=[];for(const n of e.split("\n")){const e=Q.exec(n.trim()),i=e&&X(e[1],e[2],e[3]);if(i&&t.push(i),5===t.length)break}return t}function te(e){const t=e instanceof Error?e.name:void 0;return"string"==typeof t&&t.length<=64&&U.test(t)?t:"Error"}function ne(e){if("string"!=typeof e)return"unknown";const t=e.trim().replace(Y,"").split(/[?#]/,1)[0].replace(G,(e,t)=>":"===t?":id":`${t}:id`);return t&&t.length<=128&&!t.includes("//")&&O.test(t)?t:"unknown"}var ie={flush(){},reportError(){},stop(){}},ae=null,re=/* @__PURE__ */new Set(["LCP","FCP","TTFB"]);function oe(e,t,n){const i=function(e){if(e.anonymous)return{credentials:"omit",headers:{"Content-Type":"application/json"}};const t=e.getAccessToken();return t?{credentials:"same-origin",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}}:null}(t);if(!i)return;const a=t.anonymous?"/api/storefront-analytics/web-vitals/":"/api/client-telemetry/web-batches/";n(t.endpoint??a,{...i,method:"POST",keepalive:!0,body:JSON.stringify(e)}).catch(e=>{console.debug("[efficient-shell] client telemetry batch dropped:",e)})}function se(e){((e,t={})=>{let n=!1;const s=w(t);E(()=>{let d,l=h(),u=g("LCP");const f=p(t,j),v=(i,a,o,s,c)=>{u=g("LCP",-1,i,a,o,s,c),d=r(e,u,x,t.reportAllChanges),n=!1,"soft-navigation"===i&&(l=h(!0))},m=e=>{f.l&&e.navigationId&&I(f.l,e),n||d(!0),v("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime);const t=e.getLargestInteractionContentfulPaint?.();t&&y([t])},y=e=>{t.reportAllChanges||s||(e=e.slice(-1));for(const t of e){if(!t)continue;if("soft-navigation"===t.entryType){m(t);continue}let e=0,n=[],i=t.startTime;if("largest-contentful-paint"===t.entryType)e=Math.max(t.startTime-c(),0),f.h(t),n=[t];else if("interaction-contentful-paint"===t.entryType){const a=t;if(!u.navigationId)continue;if("interactionId"in a&&a.interactionId!=u.navigationInteractionId)continue;i=a.largestContentfulPaint?.renderTime||0,e=Math.max(i-t.startTime,0),a.largestContentfulPaint&&(f.h(a.largestContentfulPaint),n=[a.largestContentfulPaint])}i<l.firstHiddenTime&&(u.value=e,u.entries=n,d())}},w=["largest-contentful-paint"];s&&w.push("interaction-contentful-paint","soft-navigation");const b=T(w,y);if(b){d=r(e,u,x,t.reportAllChanges);const c=["keydown","click","visibilitychange"],l=e=>{if(e.isTrusted&&!n){const e=u.id;Z(()=>{if(!n){if(!s){b.disconnect();for(const e of c)removeEventListener(e,l,{capture:!0})}e===u.id&&(n=!0,d(!0))}})}};for(const e of c)addEventListener(e,l,{capture:!0});a(a=>{v("back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),d=r(e,u,x,t.reportAllChanges),o(()=>{u.value=performance.now()-a.timeStamp,n=!0,d(!0)})})}})})(e),R(e),((e,t={})=>{const n=h();P(b(()=>{let s,c=g("CLS",0);const d=p(t,y),l=(n,i,a,o,l)=>{c=g("CLS",0,n,i,a,o,l),d.i=0,s=r(e,c,A,t.reportAllChanges)},u=(e=!1)=>{d.i>c.value&&(c.value=d.i,c.entries=d.o),s(e)},f=e=>{u(!0),l("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},h=e=>{for(const t of e)"soft-navigation"!==t.entryType?d.h(t):f(t);u()},v=["layout-shift"];w(t)&&v.push("soft-navigation");const m=T(v,h);m&&(s=r(e,c,A,t.reportAllChanges),n.onHidden(()=>{h(m.takeRecords()),s(!0)}),a(()=>{l("back-forward-cache",c.navigationId,c.navigationInteractionId,c.navigationURL,i()),o(s)}),setTimeout(s))}))})(e),P(e),((e,t={})=>{const n=w(t);let o=g("TTFB"),d=r(e,o,N,t.reportAllChanges);B(()=>{const l=s();if(l){const s=l.responseStart;o.value=Math.max(s-c(),0),o.entries=[l],d(!0),a(()=>{o=g("TTFB",0,"back-forward-cache",o.navigationId,o.navigationInteractionId,o.navigationURL,i()),d=r(e,o,N,t.reportAllChanges),d(!0)}),n&&T(["soft-navigation"],n=>{n.forEach(n=>{n.navigationId&&(o=g("TTFB",0,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),o.entries=[n],d=r(e,o,N,t.reportAllChanges),d(!0))})},t)}})})(e)}function ce(n){if(ae?.stop(),ae=null,!1===n.enabled||"undefined"==typeof window||"undefined"==typeof document)return ie;if(!function(e){const t="string"==typeof e.app&&H.test(e.app),n="string"==typeof e.release&&H.test(e.release);return t&&n||console.warn("[efficient-shell] client telemetry not started: `app` and `release` must be version-like strings."),t&&n}(n))return ie;const i=function(e){const t=e.vitalsSampleRate??1;return t>0&&(t>=1||(e.random??Math.random)()<t)}(n);if(n.anonymous&&!i)return ie;const a=n.fetch??window.fetch.bind(window),r=new q({app:n.app,release:n.release,shell_version:H.test(t)?t:""}),o=ne(n.routeKey()),s=function(e=("undefined"==typeof window?void 0:window)){if(!e)return"desktop";const t="function"==typeof e.matchMedia&&e.matchMedia("(pointer: coarse)").matches,n=e.innerWidth;return n<600?"mobile":t&&n<1280?"tablet":"desktop"}(window);let c=!1;const d=()=>{for(const e of r.drain())oe(e,n,a)},l=e=>{c||n.anonymous||(r.addError(e),r.size>=50&&d())},u=(e,t)=>{return{type:"error",source:t,name:te(e),message:(a=e,i=a instanceof Error?a.message:"string"==typeof a?a:a&&"object"==typeof a&&"string"==typeof a.message?a.message:"",i.slice(0,640).replace(J,"[redacted]").replace(K,"[redacted]").replace(V,"[url]").replace(W,"[id]").replace(D,"[n]").replace(/\s+/g," ").trim().slice(0,160)),frames:ee(e instanceof Error?e.stack:void 0),route:ne(n.routeKey()),count:1};var i,a};i&&(n.observeVitals??se)(e=>{c||(r.addVital(function(e,t,n,i){return{type:"vital",name:e.name,value:e.value,route:re.has(e.name)?t:n(),navigation:e.navigationType??"navigate",device:i}}(e,o,()=>ne(n.routeKey()),s)),r.size>=50&&d())});const f=n.anonymous?()=>{}:function(t,n){const i=e=>{const{error:i,message:a,filename:r,lineno:o,colno:s}=e;if(null!=i)return void t(n(i,"onerror"));const c=r?ee(`at ${r}:${o??0}:${s??0}`):[];t({...n(a??"","onerror"),frames:c})},a=e=>t(n(e.reason,"unhandledrejection"));window.addEventListener("error",i),window.addEventListener("unhandledrejection",a);const r=e(e=>t(n(e,"boundary")));return()=>{window.removeEventListener("error",i),window.removeEventListener("unhandledrejection",a),r()}}(l,u),h=()=>{"hidden"===document.visibilityState&&d()};document.addEventListener("visibilitychange",h),window.addEventListener("pagehide",d);const g=window.setInterval(d,n.flushIntervalMs??6e4),v={flush:d,reportError:e=>l(u(e,"boundary")),stop(){c||(d(),c=!0,f(),document.removeEventListener("visibilitychange",h),window.removeEventListener("pagehide",d),window.clearInterval(g),ae===v&&(ae=null))}};return ae=v,v}export{ce as startClientTelemetry};
@@ -1,8 +1,8 @@
1
- import{SearchableSelect as e}from"./chunk-ZQ24H5UO.js";import{labelClasses as a}from"./chunk-EQKUFYX6.js";import{Select_default as l}from"./chunk-TM4CRQ3W.js";import{isSafeLinkHref as t}from"./chunk-Z5TE3MEG.js";import{Input_default as r}from"./chunk-6RK6R3RY.js";import{INPUT_SIZES as n}from"./chunk-AYZY3YNC.js";import{Button_default as i}from"./chunk-EVYD6UFQ.js";import{Icon as o}from"./chunk-XZXFUZIK.js";import{registerModalEscapeInterceptor as s}from"./chunk-TWVUQUUD.js";import{useShellStrings as u}from"./chunk-JSHMIMAJ.js";import{useId as d,useRef as c,useState as p,useEffect as m}from"react";import{jsx as f,jsxs as v,Fragment as g}from"react/jsx-runtime";function h(e){return"select"===e.type?e.options:"groups"===e.type?e.groups.flatMap(e=>e.options):[]}var b="address",x={kindOf:()=>b,targetOf:e=>e,readFilter:()=>null,withFilter:e=>e},k=e=>t(e.trim());function y(t){const{value:n,kinds:o,rules:y=x,filtersFor:w,label:C,readOnly:N,placeholder:F,className:j="",tidyAddress:O,addressAddon:E}=t,$=void 0!==t.onApply,A=u().link,T=y.isSafe??k,U=d(),z=c(null),M=c(null),[R,Y]=p({url:n}),D=$?R.url:n,[K,Q]=p(!1),[Z,W]=p(null),[H,P]=p(null),[S,X]=p(!1),B=c(null),I=c(()=>{});I.current=$?t.onCancel:()=>{},m(()=>{if($)return s(e=>{const a=z.current;return!!("Escape"===e.key&&a&&e.target instanceof Node&&a.contains(e.target))&&(I.current(),!0)},()=>z.current)},[$]),m(()=>{if(!$)return;const e=M.current;e?(e.focus(),e.select()):z.current?.querySelector("button, input")?.focus()},[]);const J=o??[{value:b,label:A.address,target:{type:"text"}}],L=Z&&Z.against===D?Z.kind:y.kindOf(D),V=J.filter(e=>!e.hideWhenEmpty||h(e.target).length>0||e.value===L),q=V.find(e=>"text"===e.target.type),G=V.find(e=>e.value===L)??q??V[0];if(!G)return null;const _="text"!==G.target.type,ee=_?y.targetOf(D):D,ae=h(G.target),le=ae.find(e=>e.value===ee),te=e=>({value:e,label:A.unavailable(e)}),re="select"===G.target.type&&ee&&w?w(ee):null,ne=re?y.readFilter(D):null,ie=ne?re?.find(e=>e.param===ne.param):void 0,oe=H&&H.against===D?H.text:D,se=_?D:O?O(oe.trim()).trim():oe.trim(),ue=$&&O?se:oe,de=!_&&""!==ue.trim()&&!T(ue),ce=de&&(!$||K);_&&S&&X(!1);const pe=(e,a)=>{$?Y({url:e,name:a}):void 0===a?t.onChange(e):t.onChange(e,a)},me=(e,a)=>{W(a=>a?{...a,against:e}:a),pe(e,a)},fe=e=>{if(!e)return me("");const a=ae.find(a=>a.value===e);me(e,a?.label)},ve=e=>{Q(!1);const a=e.trim();a?T(e)?(P({text:e,against:a}),me(a)):P({text:e,against:D}):(P({text:e,against:""}),me(""))},ge=e=>{const a=e.relatedTarget;if(a&&(a===M.current||B.current?.contains(a)))return;if(X(!1),$||!O||N)return;const l=O(oe.trim());l.trim()!==oe.trim()&&ve(l)},he=()=>{if(!$||!se)return;if(!_&&de)return void Q(!0);const e=_&&R.url===se?R.name:void 0,a=t.onApply;void 0===e?a(se):a(se,e)},be=(e,a)=>a&&!e.some(e=>e.value===a)?[te(a),...e]:[...e],xe=(a,t,r,n,i)=>{const o=[];for(const e of r){const a=o[o.length-1],l={value:e.value,label:e.label};e.group?a&&"options"in a&&a.label===e.group?a.options.push(l):o.push({label:e.group,options:[l]}):o.push(l)}if(i){const l=r.some(e=>""===e.value);/* @__PURE__ */
2
- return f(e,{"aria-label":a,value:t,options:o,disabled:N,clearable:l,placeholder:r.find(e=>""===e.value)?.label,onChange:n})}/* @__PURE__ */
3
- return f(l,{size:"sm","aria-label":a,value:t,options:o,readOnly:N,onChange:n})};let ke;if("text"===G.target.type)ke=/* @__PURE__ */f(r,{ref:M,id:`${U}-address`,size:"sm",type:"text",invalid:ce,"aria-label":A.address,"aria-describedby":ce?`${U}-why`:void 0,placeholder:F??A.addressPlaceholder,spellCheck:!1,autoComplete:"off",value:oe,readOnly:N,onChange:e=>ve(e.target.value),onFocus:()=>X(!0),onBlur:ge,onKeyDown:O&&!$?e=>{"Enter"===e.key&&e.currentTarget.blur()}:void 0});else{const e="groups"===G.target.type?G.target.groups.flatMap(e=>e.options.map(a=>({value:a.value,label:a.label,group:e.label}))):G.target.options.map(e=>({value:e.value,label:e.label})),a=[{value:"",label:G.target.placeholder},...be(e,ee)];ke=xe(G.label,ee,a,fe,e.length>10)}const ye=/* @__PURE__ */v(g,{children:[o&&xe(A.linkType,G.value,V.map(e=>({value:e.value,label:e.label})),e=>{P(null),Q(!1);const a=V.find(a=>a.value===e);if(!a||"text"===a.target.type)return void W({kind:e,against:D});const l=h(a.target)[0];W({kind:e,against:l?l.value:""}),l?pe(l.value,l.label):pe("")},!1),ke,E&&S&&!N&&"text"===G.target.type&&/* @__PURE__ */f("div",{ref:B,onBlur:ge,children:E({url:oe,onChange:ve})}),re&&xe(A.filter,ne?.param??"",[{value:"",label:A.noFilter},...ne&&!ie?[te(ne.param)]:[],...re.map(e=>({value:e.param,label:e.label}))],e=>{if(!e)return me(ee,le?.label);const a=re?.find(a=>a.param===e),l=a?.values[0];l&&me(y.withFilter(ee,{param:e,value:l.value}),l.label)},!1),re&&ne&&xe(A.value,ne.value,be((ie?.values??[]).map(e=>({value:e.value,label:e.label})),ne.value),e=>{if(!ne)return;const a=ie?.values.find(a=>a.value===e);me(y.withFilter(ee,{param:ne.param,value:e}),a?.label)},(ie?.values.length??0)>10),ce&&/* @__PURE__ */f("p",{id:`${U}-why`,role:"alert",className:"text-2xs leading-4 text-red-600",children:A.unsafe}),G.hint&&/* @__PURE__ */f("p",{className:"text-2xs leading-4 text-ink-faintest",children:G.hint}),re&&/* @__PURE__ */f("p",{className:"text-2xs leading-4 text-ink-faintest",children:A.filterHint})]});if(!$)/* @__PURE__ */
1
+ import{SearchableSelect as e}from"./chunk-ZQ24H5UO.js";import{Select_default as a}from"./chunk-TM4CRQ3W.js";import{labelClasses as l}from"./chunk-EQKUFYX6.js";import{isSafeLinkHref as t}from"./chunk-Z5TE3MEG.js";import{Input_default as r}from"./chunk-6RK6R3RY.js";import{INPUT_SIZES as n}from"./chunk-AYZY3YNC.js";import{Button_default as i}from"./chunk-EVYD6UFQ.js";import{Icon as o}from"./chunk-XZXFUZIK.js";import{registerModalEscapeInterceptor as s}from"./chunk-TWVUQUUD.js";import{useShellStrings as u}from"./chunk-JSHMIMAJ.js";import{useId as d,useRef as c,useState as p,useEffect as m}from"react";import{jsx as f,jsxs as v,Fragment as g}from"react/jsx-runtime";function h(e){return"select"===e.type?e.options:"groups"===e.type?e.groups.flatMap(e=>e.options):[]}var b="address",x={kindOf:()=>b,targetOf:e=>e,readFilter:()=>null,withFilter:e=>e},k=e=>t(e.trim());function y(t){const{value:n,kinds:o,rules:y=x,filtersFor:w,label:C,readOnly:N,placeholder:F,className:j="",tidyAddress:O,addressAddon:E}=t,$=void 0!==t.onApply,A=u().link,T=y.isSafe??k,U=d(),z=c(null),M=c(null),[R,Y]=p({url:n}),D=$?R.url:n,[K,Q]=p(!1),[Z,W]=p(null),[H,P]=p(null),[S,X]=p(!1),B=c(null),I=c(()=>{});I.current=$?t.onCancel:()=>{},m(()=>{if($)return s(e=>{const a=z.current;return!!("Escape"===e.key&&a&&e.target instanceof Node&&a.contains(e.target))&&(I.current(),!0)},()=>z.current)},[$]),m(()=>{if(!$)return;const e=M.current;e?(e.focus(),e.select()):z.current?.querySelector("button, input")?.focus()},[]);const J=o??[{value:b,label:A.address,target:{type:"text"}}],L=Z&&Z.against===D?Z.kind:y.kindOf(D),V=J.filter(e=>!e.hideWhenEmpty||h(e.target).length>0||e.value===L),q=V.find(e=>"text"===e.target.type),G=V.find(e=>e.value===L)??q??V[0];if(!G)return null;const _="text"!==G.target.type,ee=_?y.targetOf(D):D,ae=h(G.target),le=ae.find(e=>e.value===ee),te=e=>({value:e,label:A.unavailable(e)}),re="select"===G.target.type&&ee&&w?w(ee):null,ne=re?y.readFilter(D):null,ie=ne?re?.find(e=>e.param===ne.param):void 0,oe=H&&H.against===D?H.text:D,se=_?D:O?O(oe.trim()).trim():oe.trim(),ue=$&&O?se:oe,de=!_&&""!==ue.trim()&&!T(ue),ce=de&&(!$||K);_&&S&&X(!1);const pe=(e,a)=>{$?Y({url:e,name:a}):void 0===a?t.onChange(e):t.onChange(e,a)},me=(e,a)=>{W(a=>a?{...a,against:e}:a),pe(e,a)},fe=e=>{if(!e)return me("");const a=ae.find(a=>a.value===e);me(e,a?.label)},ve=e=>{Q(!1);const a=e.trim();a?T(e)?(P({text:e,against:a}),me(a)):P({text:e,against:D}):(P({text:e,against:""}),me(""))},ge=e=>{const a=e.relatedTarget;if(a&&(a===M.current||B.current?.contains(a)))return;if(X(!1),$||!O||N)return;const l=O(oe.trim());l.trim()!==oe.trim()&&ve(l)},he=()=>{if(!$||!se)return;if(!_&&de)return void Q(!0);const e=_&&R.url===se?R.name:void 0,a=t.onApply;void 0===e?a(se):a(se,e)},be=(e,a)=>a&&!e.some(e=>e.value===a)?[te(a),...e]:[...e],xe=(l,t,r,n,i)=>{const o=[];for(const e of r){const a=o[o.length-1],l={value:e.value,label:e.label};e.group?a&&"options"in a&&a.label===e.group?a.options.push(l):o.push({label:e.group,options:[l]}):o.push(l)}if(i){const a=r.some(e=>""===e.value);/* @__PURE__ */
2
+ return f(e,{"aria-label":l,value:t,options:o,disabled:N,clearable:a,placeholder:r.find(e=>""===e.value)?.label,onChange:n})}/* @__PURE__ */
3
+ return f(a,{size:"sm","aria-label":l,value:t,options:o,readOnly:N,onChange:n})};let ke;if("text"===G.target.type)ke=/* @__PURE__ */f(r,{ref:M,id:`${U}-address`,size:"sm",type:"text",invalid:ce,"aria-label":A.address,"aria-describedby":ce?`${U}-why`:void 0,placeholder:F??A.addressPlaceholder,spellCheck:!1,autoComplete:"off",value:oe,readOnly:N,onChange:e=>ve(e.target.value),onFocus:()=>X(!0),onBlur:ge,onKeyDown:O&&!$?e=>{"Enter"===e.key&&e.currentTarget.blur()}:void 0});else{const e="groups"===G.target.type?G.target.groups.flatMap(e=>e.options.map(a=>({value:a.value,label:a.label,group:e.label}))):G.target.options.map(e=>({value:e.value,label:e.label})),a=[{value:"",label:G.target.placeholder},...be(e,ee)];ke=xe(G.label,ee,a,fe,e.length>10)}const ye=/* @__PURE__ */v(g,{children:[o&&xe(A.linkType,G.value,V.map(e=>({value:e.value,label:e.label})),e=>{P(null),Q(!1);const a=V.find(a=>a.value===e);if(!a||"text"===a.target.type)return void W({kind:e,against:D});const l=h(a.target)[0];W({kind:e,against:l?l.value:""}),l?pe(l.value,l.label):pe("")},!1),ke,E&&S&&!N&&"text"===G.target.type&&/* @__PURE__ */f("div",{ref:B,onBlur:ge,children:E({url:oe,onChange:ve})}),re&&xe(A.filter,ne?.param??"",[{value:"",label:A.noFilter},...ne&&!ie?[te(ne.param)]:[],...re.map(e=>({value:e.param,label:e.label}))],e=>{if(!e)return me(ee,le?.label);const a=re?.find(a=>a.param===e),l=a?.values[0];l&&me(y.withFilter(ee,{param:e,value:l.value}),l.label)},!1),re&&ne&&xe(A.value,ne.value,be((ie?.values??[]).map(e=>({value:e.value,label:e.label})),ne.value),e=>{if(!ne)return;const a=ie?.values.find(a=>a.value===e);me(y.withFilter(ee,{param:ne.param,value:e}),a?.label)},(ie?.values.length??0)>10),ce&&/* @__PURE__ */f("p",{id:`${U}-why`,role:"alert",className:"text-2xs leading-4 text-red-600",children:A.unsafe}),G.hint&&/* @__PURE__ */f("p",{className:"text-2xs leading-4 text-ink-faintest",children:G.hint}),re&&/* @__PURE__ */f("p",{className:"text-2xs leading-4 text-ink-faintest",children:A.filterHint})]});if(!$)/* @__PURE__ */
4
4
  return f("div",{ref:z,className:`flex min-w-0 flex-auto flex-col gap-2 ${j}`.trim(),role:C?"group":void 0,"aria-label":C,children:ye});const we=t.onRemove;/* @__PURE__ */
5
- return v("div",{ref:z,role:"dialog","aria-label":C??A.title,className:`flex min-w-0 flex-col gap-2 rounded-xl border border-line bg-surface p-3 shadow-lg ${j}`.trim(),onKeyDown:e=>{"Enter"!==e.key||e.defaultPrevented||e.target instanceof Element&&e.target.closest("button")||(e.preventDefault(),he())},children:[_?/* @__PURE__ */f("span",{className:a({inline:!0}),children:A.title}):/* @__PURE__ */f("label",{htmlFor:`${U}-address`,className:a({inline:!0}),children:A.title}),ye,
5
+ return v("div",{ref:z,role:"dialog","aria-label":C??A.title,className:`flex min-w-0 flex-col gap-2 rounded-xl border border-line bg-surface p-3 shadow-lg ${j}`.trim(),onKeyDown:e=>{"Enter"!==e.key||e.defaultPrevented||e.target instanceof Element&&e.target.closest("button")||(e.preventDefault(),he())},children:[_?/* @__PURE__ */f("span",{className:l({inline:!0}),children:A.title}):/* @__PURE__ */f("label",{htmlFor:`${U}-address`,className:l({inline:!0}),children:A.title}),ye,
6
6
  /* @__PURE__ */v("div",{className:"flex items-center justify-between gap-2",children:[we?/* @__PURE__ */f(i,{variant:"ghost-danger",size:"sm","data-window-action":"remove",onClick:we,children:A.remove}):null,
7
7
  /* @__PURE__ */v("span",{className:"ml-auto flex gap-1",children:[
8
8
  /* @__PURE__ */f(i,{variant:"secondary",size:"sm","data-window-action":"cancel",onClick:()=>I.current(),children:A.cancel}),
@@ -1,4 +1,4 @@
1
- import{SidebarLayout as e}from"./chunk-JGRDG7CB.js";import{Avatar as t}from"./chunk-WESNFWM4.js";import{ItemCount as r}from"./chunk-MWTCGJAI.js";import{Button_default as a}from"./chunk-EVYD6UFQ.js";import{useState as i}from"react";import{jsx as l,jsxs as n}from"react/jsx-runtime";var s=[{id:"inbox",label:"Inbox",count:12},{id:"starred",label:"Starred",count:3},{id:"sent",label:"Sent"},{id:"drafts",label:"Drafts",count:1},{id:"archive",label:"Archive"},{id:"trash",label:"Trash"}],d=[{id:1,from:"Marco Reyes",subject:"Q3 roadmap review",preview:"Sharing the deck ahead of Thursday — let me know what you think before the review.",time:"9:14",unread:!0},{id:2,from:"Priya Patel",subject:"Design handoff",preview:"The Figma file is ready for engineering. I exported every icon at 1x and 2x.",time:"8:02",unread:!0},{id:3,from:"GitHub",subject:"[acme/web] PR #482 merged",preview:"Your pull request was merged into main by the release bot after all checks passed.",time:"Yest"},{id:4,from:"Sara Lind",subject:"Lunch Friday?",preview:"A few of us are heading to the new place on 5th at noon if you want to join.",time:"Yest"}];function c(){const[c,o]=i(1),m=d.find(e=>e.id===c)??d[0];/* @__PURE__ */
1
+ import{SidebarLayout as e}from"./chunk-JGRDG7CB.js";import{Avatar as t}from"./chunk-LDVDNAXP.js";import{ItemCount as r}from"./chunk-MWTCGJAI.js";import{Button_default as a}from"./chunk-EVYD6UFQ.js";import{useState as i}from"react";import{jsx as l,jsxs as n}from"react/jsx-runtime";var s=[{id:"inbox",label:"Inbox",count:12},{id:"starred",label:"Starred",count:3},{id:"sent",label:"Sent"},{id:"drafts",label:"Drafts",count:1},{id:"archive",label:"Archive"},{id:"trash",label:"Trash"}],d=[{id:1,from:"Marco Reyes",subject:"Q3 roadmap review",preview:"Sharing the deck ahead of Thursday — let me know what you think before the review.",time:"9:14",unread:!0},{id:2,from:"Priya Patel",subject:"Design handoff",preview:"The Figma file is ready for engineering. I exported every icon at 1x and 2x.",time:"8:02",unread:!0},{id:3,from:"GitHub",subject:"[acme/web] PR #482 merged",preview:"Your pull request was merged into main by the release bot after all checks passed.",time:"Yest"},{id:4,from:"Sara Lind",subject:"Lunch Friday?",preview:"A few of us are heading to the new place on 5th at noon if you want to join.",time:"Yest"}];function c(){const[c,o]=i(1),m=d.find(e=>e.id===c)??d[0];/* @__PURE__ */
2
2
  return l("div",{className:"h-full",children:/* @__PURE__ */l(e,{side:"left",defaultWidth:200,sidebar:/* @__PURE__ */n("div",{className:"flex h-full flex-col p-2",children:[
3
3
  /* @__PURE__ */l(a,{block:!0,className:"mb-2",children:"Compose"}),s.map((e,t)=>/* @__PURE__ */n("button",{className:"flex items-center justify-between rounded-md px-3 py-2 text-left text-sm "+(0===t?"bg-blue-50 font-medium text-blue-700":"text-gray-700 hover:bg-gray-100"),children:[
4
4
  /* @__PURE__ */l("span",{children:e.label}),null!=e.count&&/* @__PURE__ */l(r,{count:e.count,active:0===t})]},e.id))]}),children:/* @__PURE__ */n("div",{className:"flex h-full",children:[
@@ -1 +1 @@
1
- export{slugify}from"../chunk-24AL3CDS.js";import{ENTRANCE_ATTR as t}from"../chunk-ZSEB7XW4.js";export{ENTRANCE_ATTR,ENTRANCE_DELAY_VAR,ENTRANCE_DURATION_VAR,ENTRANCE_FROM,ENTRANCE_FROM_ATTR,ENTRANCE_FROM_DEFAULT,ENTRANCE_KINDS,ENTRANCE_KINDS_WITH_FROM,ENTRANCE_STATE_ATTR,armEntrance,entranceAttrs,playEntrance,readEntrance}from"../chunk-ZSEB7XW4.js";export{HOVER_MOTION,MOTION_EASING,MOTION_GROUPS,MOTION_TIMING,motionSeconds,rotateDegrees}from"../chunk-AIJ3G6BD.js";export{hexWithAlpha,mixHex,rgbToHex}from"../chunk-CJSZW3OS.js";export{addShowWhenFacts,isShown,lazyShowWhenContext,showWhenFactReaders,showWhenFactsContext,showWhenOf,shownForOption,truthy,withRowRules,withRowsShownWhen,withShowWhen,withShowWhenFacts}from"../chunk-HCP7WOAL.js";export{fromDateKey,toDateKey}from"../chunk-2HMNOLKX.js";export{BORDER_LINE_STYLES}from"../chunk-NOMWJTN2.js";export{contrastRatio,hexToRgb,parseHexColor,readableInk,relativeLuminance}from"../chunk-S6OB6HJB.js";export{FOCAL_DEFAULT,FOCAL_NUDGE_COARSE,FOCAL_NUDGE_STEP,focalFromRect,formatFocal,nudgeFocal,parseFocal}from"../chunk-25RR3GQW.js";export{escapeHtml}from"../chunk-G6DKCCWH.js";export{currencyDecimals,currencySymbol,formatBytes,formatMoney,setCurrencyFormats,timeAgo}from"../chunk-GEYM4WN3.js";export{DATE_FORMAT_OPTIONS,TZ_AUTO,formatDate,formatDateTime,formatTime,getUserDateFormat,getUserTimezone,setUserDateFormat,setUserTimezone,syncTimezoneFromProfile}from"../chunk-Y3JW2GW5.js";export{EMPTY_VALUE}from"../chunk-36BRD5J3.js";import"../chunk-LF27WIN2.js";export{ROOT_THEME_ATTRIBUTES,rootIsDark,watchRootTheme}from"../chunk-LNXBTK7Q.js";var e=["none","zoom-in","zoom-out","fade-in","fade-out","move-up","move-down","reveal","parallax"],o=["zoom-in","zoom-out"],n=(t,e,o,n)=>({default:t,min:e,max:o,step:n}),r=n(30,0,100,10),i=n(0,0,100,5),s=n(100,0,100,5),a=n(2,0,4,.5),m="data-motion-scroll",u="data-motion-pin",c="data-motion-pin-frame",l="data-motion-pin-above",f="--motion-zoom",h="--motion-origin",p="--motion-scroll-start",d="--motion-scroll-end",T="--motion-p",E="--motion-pin-on",N="--motion-pin-top",A="--motion-pin-length",S="--motion-pin-position",R="--motion-pin-stick",g="--motion-pin-track-position",y="--motion-pin-above-z",w=["track","stick"],x=/^\s*-?\d+(\.\d+)?\s*$/;function F(t,e){const o="number"==typeof e?e:"string"==typeof e&&x.test(e)?Number(e):Number.NaN;if(!Number.isFinite(o))return t.default;const n=Math.min(t.max,Math.max(t.min,o)),r=Math.round(Number((n/t.step).toFixed(6)));return Number((r*t.step).toFixed(3))}function O(t,o,n,a){const m=e.includes(t)?t:"none",u=F(i,n),c=F(s,a);return{effect:m,zoom:F(r,o),start:Math.min(u,c),end:Math.max(u,c)}}function _(t,e){if("none"===t.effect)return{attrs:{},style:{}};const n={};var r;return r=t.effect,o.includes(r)&&(n[f]=String(Number((1+t.zoom/100).toFixed(3))),e&&(n[h]=e)),t.start!==i.default&&(n[p]=String(t.start)),t.end!==s.default&&(n[d]=String(t.end)),{attrs:{[m]:t.effect},style:n}}function k(t,e){return{on:!0===t,length:F(a,e)}}function C(t){return t?{[R]:"1",[g]:"sticky"}:{[R]:"0",[g]:"relative"}}function v(t,e="track",o={}){if(!t.on)return{attrs:{},style:{}};const n=!0===o.above?{[l]:""}:{};if("stick"===e)return{attrs:{[u]:"stick",...n},style:{}};const r=t.length===a.default?{}:{[A]:String(t.length)};return{attrs:{[u]:"",...n},style:!0===o.stick?{...r,...C(!0)}:r}}function D(t,e,o,n){let r;if(e){const t=e.length*e.vh;r=t>0?((e.stop??0)-e.top)/t:1}else r=(t.vh-t.top)/(t.vh+t.height);const i=o/100,s=n/100,a=s>i?(r-i)/(s-i):r>=s?1:0;return Math.min(1,Math.max(0,Number(a.toFixed(4))))}var M=(t,e)=>{const o=Number.parseFloat(t);return Number.isFinite(o)?o:e};function W(e=document){const o=()=>{};if("undefined"==typeof window||"undefined"==typeof CSS)return o;if(CSS.supports("animation-timeline: view()"))return o;let n=0;const r=()=>{n=0;const o=window.innerHeight||document.documentElement.clientHeight,r=[];for(const n of e.querySelectorAll(`[${m}]`)){if(n.hasAttribute(t))continue;const e=getComputedStyle(n),m=n.closest(`[${u}]:not([${u}="stick"])`),l=m?getComputedStyle(m):null,f=!!l&&(0===M(l.getPropertyValue(E),1)||0!==M(l.getPropertyValue(R),0)),h=I(f&&m?m:n,o),T=m?.querySelector(`[${c}]`),N=m&&!f?{...I(m,o),length:M(l.getPropertyValue(A),a.default),stop:T?M(getComputedStyle(T).top,0):0}:null;r.push({el:n,p:D({top:h.top,height:h.height,vh:o},N,M(e.getPropertyValue(p),i.default),M(e.getPropertyValue(d),s.default))})}for(const{el:t,p:e}of r)t.style.setProperty(T,String(e))},l=()=>{n||(n=requestAnimationFrame(r))};return r(),window.addEventListener("scroll",l,{passive:!0}),window.addEventListener("resize",l,{passive:!0}),()=>{n&&cancelAnimationFrame(n),window.removeEventListener("scroll",l),window.removeEventListener("resize",l)}}function I(t,e,o=("undefined"==typeof window?0:window.scrollY)){let n=0;for(let e=t;e;e=e.offsetParent)n+=e.offsetTop;return{top:n-o,height:t.offsetHeight,vh:e}}var L=["none","nextImage","rotate","zoom","lift","mono"];function b(t){return L.filter(e=>t.includes(e))}export{L as HOVER_KINDS,l as PIN_ABOVE_ATTR,y as PIN_ABOVE_Z_VAR,u as PIN_ATTR,w as PIN_FORMS,c as PIN_FRAME_ATTR,a as PIN_LENGTH,A as PIN_LENGTH_VAR,E as PIN_ON_VAR,S as PIN_POSITION_VAR,R as PIN_STICK_VAR,N as PIN_TOP_VAR,g as PIN_TRACK_POSITION_VAR,m as SCROLL_ATTR,e as SCROLL_EFFECTS,o as SCROLL_EFFECTS_WITH_ZOOM,s as SCROLL_END,d as SCROLL_END_VAR,h as SCROLL_ORIGIN_VAR,T as SCROLL_PROGRESS_VAR,i as SCROLL_START,p as SCROLL_START_VAR,r as SCROLL_ZOOM,f as SCROLL_ZOOM_VAR,W as armScrollProgress,b as hoverKindsOf,I as layoutBox,v as pinAttrs,C as pinStickVars,k as readPin,O as readScroll,_ as scrollAttrs,D as scrollProgress};
1
+ export{slugify}from"../chunk-24AL3CDS.js";import{ENTRANCE_ATTR as t}from"../chunk-ZSEB7XW4.js";export{ENTRANCE_ATTR,ENTRANCE_DELAY_VAR,ENTRANCE_DURATION_VAR,ENTRANCE_FROM,ENTRANCE_FROM_ATTR,ENTRANCE_FROM_DEFAULT,ENTRANCE_KINDS,ENTRANCE_KINDS_WITH_FROM,ENTRANCE_STATE_ATTR,armEntrance,entranceAttrs,playEntrance,readEntrance}from"../chunk-ZSEB7XW4.js";export{HOVER_MOTION,MOTION_EASING,MOTION_GROUPS,MOTION_TIMING,motionSeconds,rotateDegrees}from"../chunk-AIJ3G6BD.js";export{hexWithAlpha,mixHex,rgbToHex}from"../chunk-CJSZW3OS.js";export{addShowWhenFacts,isShown,lazyShowWhenContext,showWhenFactReaders,showWhenFactsContext,showWhenOf,shownForOption,truthy,withRowRules,withRowsShownWhen,withShowWhen,withShowWhenFacts}from"../chunk-HCP7WOAL.js";export{BORDER_LINE_STYLES}from"../chunk-NOMWJTN2.js";export{contrastRatio,hexToRgb,parseHexColor,readableInk,relativeLuminance}from"../chunk-S6OB6HJB.js";export{FOCAL_DEFAULT,FOCAL_NUDGE_COARSE,FOCAL_NUDGE_STEP,focalFromRect,formatFocal,nudgeFocal,parseFocal}from"../chunk-25RR3GQW.js";export{fromDateKey,toDateKey}from"../chunk-2HMNOLKX.js";export{escapeHtml}from"../chunk-G6DKCCWH.js";export{currencyDecimals,currencySymbol,formatBytes,formatMoney,setCurrencyFormats,timeAgo}from"../chunk-GEYM4WN3.js";export{DATE_FORMAT_OPTIONS,TZ_AUTO,formatDate,formatDateTime,formatTime,getUserDateFormat,getUserTimezone,setUserDateFormat,setUserTimezone,syncTimezoneFromProfile}from"../chunk-Y3JW2GW5.js";export{EMPTY_VALUE}from"../chunk-36BRD5J3.js";import"../chunk-LF27WIN2.js";export{ROOT_THEME_ATTRIBUTES,rootIsDark,watchRootTheme}from"../chunk-LNXBTK7Q.js";var e=["none","zoom-in","zoom-out","fade-in","fade-out","move-up","move-down","reveal","parallax"],o=["zoom-in","zoom-out"],n=(t,e,o,n)=>({default:t,min:e,max:o,step:n}),r=n(30,0,100,10),i=n(0,0,100,5),s=n(100,0,100,5),a=n(2,0,4,.5),m="data-motion-scroll",u="data-motion-pin",c="data-motion-pin-frame",l="data-motion-pin-above",f="--motion-zoom",h="--motion-origin",p="--motion-scroll-start",d="--motion-scroll-end",T="--motion-p",E="--motion-pin-on",N="--motion-pin-top",A="--motion-pin-length",S="--motion-pin-position",R="--motion-pin-stick",g="--motion-pin-track-position",y="--motion-pin-above-z",w=["track","stick"],x=/^\s*-?\d+(\.\d+)?\s*$/;function F(t,e){const o="number"==typeof e?e:"string"==typeof e&&x.test(e)?Number(e):Number.NaN;if(!Number.isFinite(o))return t.default;const n=Math.min(t.max,Math.max(t.min,o)),r=Math.round(Number((n/t.step).toFixed(6)));return Number((r*t.step).toFixed(3))}function O(t,o,n,a){const m=e.includes(t)?t:"none",u=F(i,n),c=F(s,a);return{effect:m,zoom:F(r,o),start:Math.min(u,c),end:Math.max(u,c)}}function _(t,e){if("none"===t.effect)return{attrs:{},style:{}};const n={};var r;return r=t.effect,o.includes(r)&&(n[f]=String(Number((1+t.zoom/100).toFixed(3))),e&&(n[h]=e)),t.start!==i.default&&(n[p]=String(t.start)),t.end!==s.default&&(n[d]=String(t.end)),{attrs:{[m]:t.effect},style:n}}function k(t,e){return{on:!0===t,length:F(a,e)}}function C(t){return t?{[R]:"1",[g]:"sticky"}:{[R]:"0",[g]:"relative"}}function v(t,e="track",o={}){if(!t.on)return{attrs:{},style:{}};const n=!0===o.above?{[l]:""}:{};if("stick"===e)return{attrs:{[u]:"stick",...n},style:{}};const r=t.length===a.default?{}:{[A]:String(t.length)};return{attrs:{[u]:"",...n},style:!0===o.stick?{...r,...C(!0)}:r}}function D(t,e,o,n){let r;if(e){const t=e.length*e.vh;r=t>0?((e.stop??0)-e.top)/t:1}else r=(t.vh-t.top)/(t.vh+t.height);const i=o/100,s=n/100,a=s>i?(r-i)/(s-i):r>=s?1:0;return Math.min(1,Math.max(0,Number(a.toFixed(4))))}var M=(t,e)=>{const o=Number.parseFloat(t);return Number.isFinite(o)?o:e};function W(e=document){const o=()=>{};if("undefined"==typeof window||"undefined"==typeof CSS)return o;if(CSS.supports("animation-timeline: view()"))return o;let n=0;const r=()=>{n=0;const o=window.innerHeight||document.documentElement.clientHeight,r=[];for(const n of e.querySelectorAll(`[${m}]`)){if(n.hasAttribute(t))continue;const e=getComputedStyle(n),m=n.closest(`[${u}]:not([${u}="stick"])`),l=m?getComputedStyle(m):null,f=!!l&&(0===M(l.getPropertyValue(E),1)||0!==M(l.getPropertyValue(R),0)),h=I(f&&m?m:n,o),T=m?.querySelector(`[${c}]`),N=m&&!f?{...I(m,o),length:M(l.getPropertyValue(A),a.default),stop:T?M(getComputedStyle(T).top,0):0}:null;r.push({el:n,p:D({top:h.top,height:h.height,vh:o},N,M(e.getPropertyValue(p),i.default),M(e.getPropertyValue(d),s.default))})}for(const{el:t,p:e}of r)t.style.setProperty(T,String(e))},l=()=>{n||(n=requestAnimationFrame(r))};return r(),window.addEventListener("scroll",l,{passive:!0}),window.addEventListener("resize",l,{passive:!0}),()=>{n&&cancelAnimationFrame(n),window.removeEventListener("scroll",l),window.removeEventListener("resize",l)}}function I(t,e,o=("undefined"==typeof window?0:window.scrollY)){let n=0;for(let e=t;e;e=e.offsetParent)n+=e.offsetTop;return{top:n-o,height:t.offsetHeight,vh:e}}var L=["none","nextImage","rotate","zoom","lift","mono"];function b(t){return L.filter(e=>t.includes(e))}export{L as HOVER_KINDS,l as PIN_ABOVE_ATTR,y as PIN_ABOVE_Z_VAR,u as PIN_ATTR,w as PIN_FORMS,c as PIN_FRAME_ATTR,a as PIN_LENGTH,A as PIN_LENGTH_VAR,E as PIN_ON_VAR,S as PIN_POSITION_VAR,R as PIN_STICK_VAR,N as PIN_TOP_VAR,g as PIN_TRACK_POSITION_VAR,m as SCROLL_ATTR,e as SCROLL_EFFECTS,o as SCROLL_EFFECTS_WITH_ZOOM,s as SCROLL_END,d as SCROLL_END_VAR,h as SCROLL_ORIGIN_VAR,T as SCROLL_PROGRESS_VAR,i as SCROLL_START,p as SCROLL_START_VAR,r as SCROLL_ZOOM,f as SCROLL_ZOOM_VAR,W as armScrollProgress,b as hoverKindsOf,I as layoutBox,v as pinAttrs,C as pinStickVars,k as readPin,O as readScroll,_ as scrollAttrs,D as scrollProgress};
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{BrandAssetEditor as default}from"../chunk-QJWQ6OMF.js";import"../chunk-T2OSPUS6.js";import"../chunk-HNIIDDLJ.js";import"../chunk-EFKJLUYP.js";import"../chunk-6KBDNYRW.js";import"../chunk-232YPI2L.js";import"../chunk-25RR3GQW.js";import"../chunk-MI67DI3H.js";import"../chunk-VLMBXPRM.js";import"../chunk-FJVZ2W55.js";import"../chunk-V4XR4MOS.js";import"../chunk-JMGDGNM7.js";import"../chunk-EVYD6UFQ.js";import"../chunk-M5K4AX4E.js";import"../chunk-XZXFUZIK.js";import"../chunk-J75ZT2JQ.js";import"../chunk-R2VKEMZH.js";import"../chunk-G67CJAQ2.js";import"../chunk-SOZCWT6I.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-UQYNPYF4.js";import"../chunk-MRJKZWWV.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-JSHMIMAJ.js";import"../chunk-C3QOHMR6.js";
2
+ export{BrandAssetEditor as default}from"../chunk-AQCUGTOR.js";import"../chunk-BZHP645G.js";import"../chunk-HNIIDDLJ.js";import"../chunk-EFKJLUYP.js";import"../chunk-232YPI2L.js";import"../chunk-6KBDNYRW.js";import"../chunk-MI67DI3H.js";import"../chunk-25RR3GQW.js";import"../chunk-VLMBXPRM.js";import"../chunk-FJVZ2W55.js";import"../chunk-V4XR4MOS.js";import"../chunk-JMGDGNM7.js";import"../chunk-EVYD6UFQ.js";import"../chunk-M5K4AX4E.js";import"../chunk-XZXFUZIK.js";import"../chunk-J75ZT2JQ.js";import"../chunk-R2VKEMZH.js";import"../chunk-G67CJAQ2.js";import"../chunk-SOZCWT6I.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-UQYNPYF4.js";import"../chunk-MRJKZWWV.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-JSHMIMAJ.js";import"../chunk-C3QOHMR6.js";
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{TextLinkField,LinkPicker as default}from"../chunk-WLX24TG6.js";import"../chunk-ZQ24H5UO.js";import"../chunk-EQKUFYX6.js";import"../chunk-TM4CRQ3W.js";import"../chunk-EO5RLFRX.js";import"../chunk-GLRRX4AL.js";import"../chunk-2NMW66P5.js";import"../chunk-UJUTS6LJ.js";import"../chunk-Z5TE3MEG.js";import"../chunk-6RK6R3RY.js";import"../chunk-SFULX4E3.js";import"../chunk-FTMCNC66.js";import"../chunk-SV5RRBVA.js";import"../chunk-AYZY3YNC.js";import"../chunk-UGTRSRIW.js";import"../chunk-DWGYC7OD.js";import"../chunk-THLXDI76.js";import"../chunk-URHGHXDN.js";import"../chunk-5QFPTDQF.js";import"../chunk-EVYD6UFQ.js";import"../chunk-M5K4AX4E.js";import"../chunk-XZXFUZIK.js";import"../chunk-J75ZT2JQ.js";import"../chunk-R2VKEMZH.js";import"../chunk-SOZCWT6I.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-UQYNPYF4.js";import"../chunk-MRJKZWWV.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-JSHMIMAJ.js";import"../chunk-C3QOHMR6.js";
2
+ export{TextLinkField,LinkPicker as default}from"../chunk-TUPPFC74.js";import"../chunk-ZQ24H5UO.js";import"../chunk-TM4CRQ3W.js";import"../chunk-EO5RLFRX.js";import"../chunk-GLRRX4AL.js";import"../chunk-EQKUFYX6.js";import"../chunk-2NMW66P5.js";import"../chunk-UJUTS6LJ.js";import"../chunk-Z5TE3MEG.js";import"../chunk-6RK6R3RY.js";import"../chunk-SFULX4E3.js";import"../chunk-FTMCNC66.js";import"../chunk-SV5RRBVA.js";import"../chunk-AYZY3YNC.js";import"../chunk-UGTRSRIW.js";import"../chunk-DWGYC7OD.js";import"../chunk-THLXDI76.js";import"../chunk-URHGHXDN.js";import"../chunk-5QFPTDQF.js";import"../chunk-EVYD6UFQ.js";import"../chunk-M5K4AX4E.js";import"../chunk-XZXFUZIK.js";import"../chunk-J75ZT2JQ.js";import"../chunk-R2VKEMZH.js";import"../chunk-SOZCWT6I.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-UQYNPYF4.js";import"../chunk-MRJKZWWV.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-JSHMIMAJ.js";import"../chunk-C3QOHMR6.js";
@@ -169,9 +169,10 @@ interface MediaLibraryProps {
169
169
  * popup). In All files the same drag still moves the file to a folder: the
170
170
  * tile carries both, and `dropped` then says only that SOMETHING took it. The tile carries the file under
171
171
  * {@link MEDIA_FILE_DRAG_TYPE} (read it with {@link readMediaFileDrag}), and
172
- * this hears `start`, then `dropped` or `cancelled`, so the host can step its
173
- * popup aside and close it or bring it back. A private or locked file does
174
- * not drag, as it cannot be chosen.
172
+ * this hears `start`, then `dropped` or `cancelled`. In a shell window, that
173
+ * window steps aside for the drag by itself (invisible, the pointer goes
174
+ * through, still mounted) and comes back when it ends: the host adds no
175
+ * style. A private or locked file does not drag, as it cannot be chosen.
175
176
  */
176
177
  onDragOut?: (state: MediaLibraryDragOut) => void;
177
178
  className?: string;
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{MEDIA_FILES_DRAG_TYPE,MEDIA_FILE_DRAG_TYPE,MEDIA_FOLDER_DRAG_TYPE,MediaLibrary as default,readMediaFileDrag}from"../chunk-EEGTFJUQ.js";import"../chunk-OLCRYT3N.js";import"../chunk-RF3ZFTAU.js";import"../chunk-IC72MGON.js";import"../chunk-T2TZBTSM.js";import"../chunk-436PJFHC.js";import"../chunk-CGUMJZUB.js";import"../chunk-SACUSHVN.js";import"../chunk-UP4HLGMZ.js";import"../chunk-QMSINDXL.js";import"../chunk-VLKDWKVR.js";import"../chunk-OLFYNMTD.js";import"../chunk-LACL4MAR.js";import"../chunk-VQ4X3OBR.js";import"../chunk-NOGSS432.js";import"../chunk-GEZM6ARD.js";import"../chunk-TM4CRQ3W.js";import"../chunk-EO5RLFRX.js";import"../chunk-GLRRX4AL.js";import"../chunk-OG53D3R5.js";import"../chunk-FQ4IRBMA.js";import"../chunk-2NMW66P5.js";import"../chunk-HNIIDDLJ.js";import"../chunk-EFKJLUYP.js";import"../chunk-6KBDNYRW.js";import"../chunk-Y7KDCC6E.js";import"../chunk-CGZBDI6C.js";import"../chunk-6FZ5JTBY.js";import"../chunk-N3R6N7LG.js";import"../chunk-6RK6R3RY.js";import"../chunk-SFULX4E3.js";import"../chunk-FTMCNC66.js";import"../chunk-SV5RRBVA.js";import"../chunk-AYZY3YNC.js";import"../chunk-VLMBXPRM.js";import"../chunk-FJVZ2W55.js";import"../chunk-V4XR4MOS.js";import"../chunk-MWTCGJAI.js";import"../chunk-RIG5FEVS.js";import"../chunk-5WK56FA3.js";import"../chunk-VWGWZY7A.js";import"../chunk-7QSDPSXP.js";import"../chunk-CJHYOHMU.js";import"../chunk-F3ZOO23R.js";import"../chunk-UGTRSRIW.js";import"../chunk-DWGYC7OD.js";import"../chunk-JMGDGNM7.js";import"../chunk-THLXDI76.js";import"../chunk-URHGHXDN.js";import"../chunk-5QFPTDQF.js";import"../chunk-EVYD6UFQ.js";import"../chunk-M5K4AX4E.js";import"../chunk-XZXFUZIK.js";import"../chunk-J75ZT2JQ.js";import"../chunk-R2VKEMZH.js";import"../chunk-G67CJAQ2.js";import"../chunk-SOZCWT6I.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-3YBXA72C.js";import"../chunk-UQYNPYF4.js";import"../chunk-MRJKZWWV.js";import"../chunk-MAFUXCPZ.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-JSHMIMAJ.js";import"../chunk-C3QOHMR6.js";
2
+ export{MEDIA_FILES_DRAG_TYPE,MEDIA_FILE_DRAG_TYPE,MEDIA_FOLDER_DRAG_TYPE,MediaLibrary as default,readMediaFileDrag}from"../chunk-EC3P3W7Z.js";import"../chunk-OLCRYT3N.js";import"../chunk-RF3ZFTAU.js";import"../chunk-IC72MGON.js";import"../chunk-T2TZBTSM.js";import"../chunk-436PJFHC.js";import"../chunk-CGUMJZUB.js";import"../chunk-SACUSHVN.js";import"../chunk-UP4HLGMZ.js";import"../chunk-QMSINDXL.js";import"../chunk-VQ4X3OBR.js";import"../chunk-NOGSS432.js";import"../chunk-GEZM6ARD.js";import"../chunk-TM4CRQ3W.js";import"../chunk-EO5RLFRX.js";import"../chunk-GLRRX4AL.js";import"../chunk-OG53D3R5.js";import"../chunk-FQ4IRBMA.js";import"../chunk-2NMW66P5.js";import"../chunk-HNIIDDLJ.js";import"../chunk-EFKJLUYP.js";import"../chunk-6KBDNYRW.js";import"../chunk-VLKDWKVR.js";import"../chunk-OLFYNMTD.js";import"../chunk-LACL4MAR.js";import"../chunk-Y7KDCC6E.js";import"../chunk-CGZBDI6C.js";import"../chunk-6FZ5JTBY.js";import"../chunk-N3R6N7LG.js";import"../chunk-6RK6R3RY.js";import"../chunk-SFULX4E3.js";import"../chunk-FTMCNC66.js";import"../chunk-SV5RRBVA.js";import"../chunk-AYZY3YNC.js";import"../chunk-VLMBXPRM.js";import"../chunk-FJVZ2W55.js";import"../chunk-V4XR4MOS.js";import"../chunk-EIFNESXS.js";import"../chunk-MWTCGJAI.js";import"../chunk-RIG5FEVS.js";import"../chunk-5WK56FA3.js";import"../chunk-VWGWZY7A.js";import"../chunk-7QSDPSXP.js";import"../chunk-CJHYOHMU.js";import"../chunk-F3ZOO23R.js";import"../chunk-UGTRSRIW.js";import"../chunk-DWGYC7OD.js";import"../chunk-JMGDGNM7.js";import"../chunk-THLXDI76.js";import"../chunk-URHGHXDN.js";import"../chunk-5QFPTDQF.js";import"../chunk-EVYD6UFQ.js";import"../chunk-M5K4AX4E.js";import"../chunk-XZXFUZIK.js";import"../chunk-J75ZT2JQ.js";import"../chunk-R2VKEMZH.js";import"../chunk-G67CJAQ2.js";import"../chunk-SOZCWT6I.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-3YBXA72C.js";import"../chunk-UQYNPYF4.js";import"../chunk-MRJKZWWV.js";import"../chunk-MAFUXCPZ.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-JSHMIMAJ.js";import"../chunk-C3QOHMR6.js";
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{MediaUploadField as default}from"../chunk-T2OSPUS6.js";import"../chunk-HNIIDDLJ.js";import"../chunk-EFKJLUYP.js";import"../chunk-6KBDNYRW.js";import"../chunk-232YPI2L.js";import"../chunk-25RR3GQW.js";export{mediaFileName}from"../chunk-VLMBXPRM.js";import"../chunk-FJVZ2W55.js";import"../chunk-V4XR4MOS.js";import"../chunk-JMGDGNM7.js";import"../chunk-XZXFUZIK.js";import"../chunk-J75ZT2JQ.js";import"../chunk-R2VKEMZH.js";import"../chunk-G67CJAQ2.js";import"../chunk-SOZCWT6I.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-MRJKZWWV.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-JSHMIMAJ.js";import"../chunk-C3QOHMR6.js";
2
+ export{MediaUploadField as default}from"../chunk-BZHP645G.js";import"../chunk-HNIIDDLJ.js";import"../chunk-EFKJLUYP.js";import"../chunk-232YPI2L.js";import"../chunk-6KBDNYRW.js";import"../chunk-25RR3GQW.js";export{mediaFileName}from"../chunk-VLMBXPRM.js";import"../chunk-FJVZ2W55.js";import"../chunk-V4XR4MOS.js";import"../chunk-JMGDGNM7.js";import"../chunk-XZXFUZIK.js";import"../chunk-J75ZT2JQ.js";import"../chunk-R2VKEMZH.js";import"../chunk-G67CJAQ2.js";import"../chunk-SOZCWT6I.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-MRJKZWWV.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-JSHMIMAJ.js";import"../chunk-C3QOHMR6.js";
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{BRAND_ICON_NAMES,ICON_NAMES,isBrandIconName,isIconName}from"../chunk-HNBMBC77.js";export{ICON_SET_FOR_THEME,THEME_ICON_SETS,iconSetFor,loadIconSet}from"../chunk-VQCKMT5F.js";export{BRAND_MAX_HEIGHT,BRAND_MIN_HEIGHT_PX,brandBox}from"../chunk-64ACCUNN.js";export{Icon}from"../chunk-XZXFUZIK.js";export{activeIconSet,iconSets,iconsVersion,registerIconSet,registerIcons,resolveIcon,setDefaultIconSet,setIconSet,subscribeIcons}from"../chunk-J75ZT2JQ.js";
2
+ export{BRAND_ICON_NAMES,ICON_NAMES,isBrandIconName,isIconName}from"../chunk-HNBMBC77.js";export{BRAND_MAX_HEIGHT,BRAND_MIN_HEIGHT_PX,brandBox}from"../chunk-64ACCUNN.js";export{ICON_SET_FOR_THEME,THEME_ICON_SETS,iconSetFor,loadIconSet}from"../chunk-VQCKMT5F.js";export{Icon}from"../chunk-XZXFUZIK.js";export{activeIconSet,iconSets,iconsVersion,registerIconSet,registerIcons,resolveIcon,setDefaultIconSet,setIconSet,subscribeIcons}from"../chunk-J75ZT2JQ.js";